1. 改了n多
This commit is contained in:
parent
41039810d6
commit
83db6b9046
|
|
@ -28,8 +28,8 @@ public class MybatisPlusMetaObjectHandler implements MetaObjectHandler {
|
|||
}
|
||||
// 修改人, 创建人
|
||||
// 用于填充 创建人以及修改人
|
||||
String userName = SecurityContextHolder.getUserName();
|
||||
// String userName = "system";
|
||||
// String userName = SecurityContextHolder.getUserName();
|
||||
String userName = "system";
|
||||
this.strictInsertFill(metaObject, "createTime", LocalDateTime.class, LocalDateTime.now());
|
||||
this.strictInsertFill(metaObject, "createBy", String.class, userName);
|
||||
}
|
||||
|
|
@ -41,8 +41,8 @@ public class MybatisPlusMetaObjectHandler implements MetaObjectHandler {
|
|||
@Override
|
||||
public void updateFill(MetaObject metaObject) {
|
||||
log.debug("mybatis plus start update fill ....");
|
||||
String userName = SecurityContextHolder.getUserName();
|
||||
// String userName = "system";
|
||||
// String userName = SecurityContextHolder.getUserName();
|
||||
String userName = "system";
|
||||
this.strictUpdateFill(metaObject, "updateTime", LocalDateTime.class, LocalDateTime.now());
|
||||
this.strictUpdateFill(metaObject, "updateBy", String.class, userName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,46 @@
|
|||
package com.chushang.redis.advice;
|
||||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.extra.servlet.ServletUtil;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.chushang.common.core.util.IPUtils;
|
||||
import com.chushang.redis.annotation.AutoIdempotent;
|
||||
import com.chushang.redis.cache.utils.RedisUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.core.MethodParameter;
|
||||
import org.springframework.http.HttpInputMessage;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.RequestBodyAdviceAdapter;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.lang.reflect.Type;
|
||||
import java.time.Duration;
|
||||
|
||||
@RestControllerAdvice
|
||||
@SuppressWarnings("all")
|
||||
@RequiredArgsConstructor
|
||||
public class IdempotentAdvice extends RequestBodyAdviceAdapter {
|
||||
@Override
|
||||
public boolean supports(MethodParameter methodParameter, Type targetType, Class<? extends HttpMessageConverter<?>> converterType) {
|
||||
return methodParameter.hasMethodAnnotation(AutoIdempotent.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object afterBodyRead(Object body, HttpInputMessage inputMessage, MethodParameter parameter, Type targetType, Class<? extends HttpMessageConverter<?>> converterType) {
|
||||
String value = JSON.toJSONString(body);
|
||||
if (StrUtil.isEmpty(value)) {
|
||||
return body;
|
||||
}
|
||||
HttpServletRequest request = IPUtils.getRequest();
|
||||
String key = StrUtil.format("{}_{}", ServletUtil.getClientIP(request), request.getRequestURI());
|
||||
AutoIdempotent idempotent = parameter.getMethodAnnotation(AutoIdempotent.class);
|
||||
try {
|
||||
Assert.isTrue(RedisUtils.tryLock(key, idempotent.expireTime()), "请勿重复提交");
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return body;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.chushang.redis.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* 幂等性注解
|
||||
*/
|
||||
@Target({ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface AutoIdempotent {
|
||||
|
||||
/** 时间(秒) */
|
||||
long expireTime() default 5;
|
||||
}
|
||||
|
|
@ -11,6 +11,7 @@ import java.util.Collection;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
|
@ -460,4 +461,9 @@ public class RedisUtils {
|
|||
return rKeys.countExists(getNameMapper().map(key)) > 0;
|
||||
}
|
||||
|
||||
public static boolean tryLock(String key, long expireTime) throws InterruptedException {
|
||||
RLock lock = CLIENT.getLock(key);
|
||||
return lock.tryLock(expireTime, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public class TaskDTO implements Serializable {
|
|||
/**
|
||||
* 负责的部门 -- 为空时 取当前用户部门id
|
||||
*/
|
||||
@NotEmpty(message = "必须指定负责的部门", groups = {Create.class})
|
||||
@NotNull(message = "必须指定负责的部门", groups = {Create.class})
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public class TaskQuery extends CommonParam {
|
|||
|
||||
/** 任务名称或联系人 */
|
||||
@Size(max = 32, message = "任务名称或联系人长度不能超过32位")
|
||||
@Condition(name = "`name`,contact", type = Condition.ConditionType.or_eq)
|
||||
@Condition(name = "`name`,contact", type = Condition.ConditionType.or_like)
|
||||
private String blurry;
|
||||
|
||||
/** 创建时间 */
|
||||
|
|
|
|||
|
|
@ -69,5 +69,12 @@ public class InspectionConfig extends BaseEntity {
|
|||
* 模板所属路径
|
||||
*/
|
||||
@TableField(value = "template_url")
|
||||
@NotNull(message = "巡检单所属模板路径", groups = Create.class)
|
||||
private String templateUrl;
|
||||
/**
|
||||
* 模板所属fid
|
||||
*/
|
||||
@TableField(value = "template_fid")
|
||||
@NotNull(message = "巡检单所属文件id", groups = Create.class)
|
||||
private String templateFid;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,4 +46,9 @@ public class InspectionData extends BaseEntity {
|
|||
*/
|
||||
@TableField(value = "remark")
|
||||
private String remark;
|
||||
/**
|
||||
* label 对应的结果值--此值为选项值, 非最终呈现值
|
||||
*/
|
||||
@TableField(value = "result")
|
||||
private String result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,4 +55,9 @@ public class InspectionDetail extends BaseEntity {
|
|||
@TableField(value = "config_type")
|
||||
@NotNull(message = "config_type 不能为空", groups = {Create.class, Update.class})
|
||||
private Short configType;
|
||||
/**
|
||||
* label 对应的结果值--此值为选项值, 非最终呈现值
|
||||
*/
|
||||
@TableField(value = "result")
|
||||
private String result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,62 @@
|
|||
package com.chushang.inspection.project.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.chushang.common.core.validator.Create;
|
||||
import com.chushang.common.core.validator.Update;
|
||||
import com.chushang.common.dict.annotation.DictFormat;
|
||||
import com.chushang.common.mybatis.annotation.Condition;
|
||||
import com.chushang.common.mybatis.base.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @auther: zhao
|
||||
* @date: 2024/7/2 10:55
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper=true)
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName(value = "sy_template")
|
||||
public class Template extends BaseEntity {
|
||||
@NotNull(message = "模板id不能为空",groups = Update.class)
|
||||
@TableId(value = "template_id", type = IdType.ASSIGN_ID)
|
||||
@Condition(name = "template_id")
|
||||
private Long templateId;
|
||||
|
||||
@NotNull(message = "模板名称不能为空",groups = {Create.class, Update.class})
|
||||
@TableField(value = "template_name")
|
||||
@Condition(name = "template_name", type = Condition.ConditionType.like)
|
||||
private String templateName;
|
||||
|
||||
@NotNull(message = "模板fid不能为空",groups = {Create.class, Update.class})
|
||||
@TableField(value = "template_fid")
|
||||
@Condition(name = "template_fid")
|
||||
private String templateFid;
|
||||
@NotNull(message = "模板url不能为空",groups = {Create.class, Update.class})
|
||||
@TableField(value = "template_url")
|
||||
private String templateUrl;
|
||||
@NotNull(message = "模板alias不能为空",groups = {Create.class, Update.class})
|
||||
@TableField(value = "template_alias")
|
||||
@Condition(name = "template_alias")
|
||||
private String templateAlias;
|
||||
@NotNull(message = "模板所属任务不能为空",groups = {Create.class, Update.class})
|
||||
@TableField(value = "task_id")
|
||||
@Condition(name = "task_id")
|
||||
private Long taskId;
|
||||
|
||||
@TableField(value = "task_name")
|
||||
private String taskName;
|
||||
@NotNull(message = "模板类型不能为空",groups = {Create.class, Update.class})
|
||||
@TableField(value = "template_type")
|
||||
@Condition(name = "template_type")
|
||||
@DictFormat(dictType = "template_type")
|
||||
private Integer templateType;
|
||||
}
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
package com.chushang.inspection.project.vo;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import com.alibaba.excel.annotation.format.DateTimeFormat;
|
||||
import com.chushang.common.core.util.TreeNode;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
|
@ -38,11 +40,13 @@ public class TaskVO extends TreeNode<TaskVO> {
|
|||
/**
|
||||
* 项目开始时间
|
||||
*/
|
||||
@DateTimeFormat(DatePattern.NORM_DATETIME_MS_PATTERN)
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 项目结束时间
|
||||
*/
|
||||
@DateTimeFormat(DatePattern.NORM_DATETIME_MS_PATTERN)
|
||||
private LocalDateTime endTime;
|
||||
|
||||
/**
|
||||
|
|
@ -83,5 +87,10 @@ public class TaskVO extends TreeNode<TaskVO> {
|
|||
* 所属部门
|
||||
*/
|
||||
private Long deptId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(DatePattern.NORM_DATETIME_MS_PATTERN)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.chushang.inspection.project.vo;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import com.alibaba.excel.annotation.format.DateTimeFormat;
|
||||
import com.chushang.common.dict.annotation.DictFormat;
|
||||
import com.chushang.inspection.terminal.vo.StoreVO;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
|
@ -89,6 +91,7 @@ public class TerminalApp implements Serializable {
|
|||
* wrk_info_ id
|
||||
* (state = :state) order by dispose_time desc limit 1
|
||||
*/
|
||||
@DateTimeFormat(DatePattern.NORM_DATETIME_MS_PATTERN)
|
||||
private LocalDateTime processingTime;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.chushang.inspection.project.vo;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import com.alibaba.excel.annotation.format.DateTimeFormat;
|
||||
import com.chushang.common.dict.annotation.DictFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
|
|
@ -53,6 +55,7 @@ public class TerminalAppVO implements Serializable {
|
|||
/**
|
||||
* 上次工单处理时间
|
||||
*/
|
||||
@DateTimeFormat(DatePattern.NORM_DATETIME_MS_PATTERN)
|
||||
private LocalDateTime inspectionTime;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.chushang.inspection.terminal.vo;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import com.alibaba.excel.annotation.format.DateTimeFormat;
|
||||
import com.chushang.common.dict.annotation.DictFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
|
|
@ -135,10 +137,12 @@ public class TerminalVO implements Serializable {
|
|||
/**
|
||||
* 巡检时间
|
||||
*/
|
||||
@DateTimeFormat(DatePattern.NORM_DATETIME_MS_PATTERN)
|
||||
private LocalDateTime inspectionTime;
|
||||
|
||||
/**
|
||||
* 巡检时间
|
||||
*/
|
||||
@DateTimeFormat(DatePattern.NORM_DATETIME_MS_PATTERN)
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,226 @@
|
|||
package com.chushang.inspection.work.dto;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import com.chushang.inspection.terminal.vo.FiveStoreVO;
|
||||
import com.chushang.inspection.work.vo.InspectionConfigVO;
|
||||
import com.chushang.inspection.work.vo.WrkInfoStoreVO;
|
||||
import com.chushang.inspection.work.vo.WrkInfoTerminalVO;
|
||||
import com.chushang.inspection.work.vo.WrkInfoVO;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 单傲
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class WrkInfoDTO implements Serializable {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@NotNull(message = "工单id不能为空")
|
||||
private Long wrkId;
|
||||
/**
|
||||
* 巡检方式
|
||||
*/
|
||||
@Range(min = 1, max = 2, message = "巡检方式非法")
|
||||
private Integer workMethod;
|
||||
/**
|
||||
* 工单类型
|
||||
*/
|
||||
@Range(min = 1, max = 50, message = "工单类型非法")
|
||||
private Integer workType;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@NotNull(message = "工单状态不能为空")
|
||||
@Range(min = 1, max = 7, message = "状态非法")
|
||||
private Integer wrkStatus;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Size(max = 100, message = "备注不能超过100个字符")
|
||||
private String remark;
|
||||
/**
|
||||
* 服务结果
|
||||
*/
|
||||
@Range(min = 1, max = 7, message = "服务结果非法")
|
||||
private Integer serviceResult;
|
||||
/**
|
||||
* 操作员编号 -- 这个应当是提交人id
|
||||
*/
|
||||
@Size(max = 50, message = "操作员编号不能超过50个字符")
|
||||
private String userId;
|
||||
/**
|
||||
* 客户经理
|
||||
*/
|
||||
@Size(max = 30, message = "客户经理不能超过30个字符")
|
||||
private String accountManager;
|
||||
/**
|
||||
* 经理电话
|
||||
*/
|
||||
@Size(max = 30, message = "经理电话不能超过30个字符")
|
||||
private String accountPhone;
|
||||
|
||||
/**
|
||||
* 终端状态
|
||||
*/
|
||||
@Range(min = 1, max = 20, message = "终端状态非法")
|
||||
private Integer terminalStatus;
|
||||
/**
|
||||
* 终端类型
|
||||
*/
|
||||
@Range(min = 1, max = 10, message = "终端类型非法")
|
||||
private Integer terminalType;
|
||||
/**
|
||||
* 终端版本号
|
||||
*/
|
||||
@Size(max = 64, message = "终端版本号不能超过64个字符")
|
||||
private String terminalVersion;
|
||||
/**
|
||||
* 终端地址
|
||||
*/
|
||||
@Size(max = 300, message = "终端地址不能超过300个字符")
|
||||
private String terminalAddress;
|
||||
/**
|
||||
* 终端来源
|
||||
*/
|
||||
@Range(min = 1, max = 3, message = "终端来源非法")
|
||||
private Integer terminalSource;
|
||||
/**
|
||||
* 终端编号
|
||||
*/
|
||||
@Size(max = 30, message = "终端编号不能超过30个字符")
|
||||
private String terminalNo;
|
||||
/**
|
||||
* 终端sn号
|
||||
*/
|
||||
@Size(max = 100, message = "终端sn号不能超过100个字符")
|
||||
private String terminalSn;
|
||||
/**
|
||||
* 终端型号
|
||||
*/
|
||||
@Size(max = 64, message = "终端型号不能超过64个字符")
|
||||
private String terminalModel;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 商户编号
|
||||
*/
|
||||
@Size(max = 64, message = "商户编号不能超过64个字符")
|
||||
private String storeNo;
|
||||
/**
|
||||
* 门店状态
|
||||
*/
|
||||
@Range(min = 1, max = 10, message = "门店状态非法")
|
||||
private Integer storeStatus;
|
||||
/**
|
||||
* 商户名称
|
||||
*/
|
||||
@Size(max = 128, message = "商户名称不能超过64个字符")
|
||||
private String storeName;
|
||||
/**
|
||||
* 商户联系人
|
||||
*/
|
||||
@Size(max = 128, message = "商户联系人不能超过128个字符")
|
||||
private String storeContact;
|
||||
/**
|
||||
* 商户联系电话
|
||||
*/
|
||||
@Size(max = 50, message = "商户联系方式不能超过50个字符")
|
||||
private String storePhone;
|
||||
/**
|
||||
* 商户地址
|
||||
*/
|
||||
@Size(max = 300, message = "商户地址不能超过300个字符")
|
||||
private String storeAddress;
|
||||
/**
|
||||
* 商户特殊编号
|
||||
*/
|
||||
@Size(max = 30, message = "特殊商户编号不能超过30个字符")
|
||||
private String specialNum;
|
||||
/**
|
||||
* 门店名称
|
||||
*/
|
||||
@Size(max = 128, message = "门店名称不能超过128个字符")
|
||||
private String shopName;
|
||||
/**
|
||||
* 商户类型
|
||||
*/
|
||||
@Range(min = 1, max = 10, message = "商户类型非法")
|
||||
private Integer storeType;
|
||||
/**
|
||||
* 现有其他收单产品
|
||||
*/
|
||||
@Size(max = 50, message = "现有其他收单产品不能超过50个字符")
|
||||
private String products;
|
||||
/**
|
||||
* 商户提示工具
|
||||
*/
|
||||
@Size(max = 50, message = "商户提示工具不能超过50个字符")
|
||||
private String tipTool;
|
||||
/**
|
||||
* 巡检频次
|
||||
*/
|
||||
@Range(min = 1, max = 5, message = "巡检频次非法")
|
||||
private Integer insFre;
|
||||
/**
|
||||
* 注册地址
|
||||
*/
|
||||
@Size(max = 128, message = "注册地址不能超过128个字符")
|
||||
private String registerAddress;
|
||||
/**
|
||||
* 法人/负责人
|
||||
*/
|
||||
@Size(max = 64, message = "法人/负责人不能超过64个字符")
|
||||
private String legalName;
|
||||
/**
|
||||
* 地理位置信息 经度,纬度
|
||||
*/
|
||||
@NotBlank(message = "地理位置信息不能为空")
|
||||
@Size(max = 128, message = "地理位置信息不能超过128个字符")
|
||||
private String geographicLocation;
|
||||
/**
|
||||
* 地理位置信息地址
|
||||
*/
|
||||
@NotBlank(message = "地理位置信息地址")
|
||||
@Size(max = 256, message = "地理位置信息地址不能超过256个字符")
|
||||
private String locationAddress;
|
||||
|
||||
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
@NotNull(message = "任务id不能为空")
|
||||
private Long taskId;
|
||||
/**
|
||||
* 建档日期
|
||||
*/
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DatePattern.NORM_DATE_PATTERN)
|
||||
private LocalDate registerTime;
|
||||
/**
|
||||
* 巡检单信息
|
||||
*/
|
||||
private List<InspectionConfigVO> inspections;
|
||||
|
||||
/**
|
||||
* 五统一商户明细(内蒙古建行随付贷)
|
||||
*/
|
||||
private FiveStoreVO fiveUnifiedStoreDetails;
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
package com.chushang.inspection.work.enums;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <h1>巡检结果</h1>
|
||||
*
|
||||
* <p>农行湖北巡检单</p>
|
||||
*
|
||||
* @author 单傲
|
||||
* @date 2023/1/16 10:21
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum InsResult {
|
||||
|
||||
/**
|
||||
* 正常营业
|
||||
*/
|
||||
NORMAL(1, "正常营业"),
|
||||
|
||||
/**
|
||||
* 商户撤机
|
||||
*/
|
||||
WEANING(2, "商户撤机"),
|
||||
|
||||
/**
|
||||
* 商户撤店
|
||||
*/
|
||||
REMOVE(3, "商户撤店"),
|
||||
|
||||
/**
|
||||
* 拒绝拜访
|
||||
*/
|
||||
REFUSE(4, "拒绝拜访"),
|
||||
|
||||
/**
|
||||
* 巡检失败
|
||||
*/
|
||||
LOSE(5, "巡检失败");
|
||||
|
||||
/**
|
||||
* 状态值
|
||||
*/
|
||||
private final Integer val;
|
||||
|
||||
/**
|
||||
* 状态名称
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
/**
|
||||
* 比较val获取值
|
||||
*/
|
||||
public static Map<String, String> getResultMap() {
|
||||
InsResult[] results = InsResult.class.getEnumConstants();
|
||||
HashMap<String, String> resultMap = MapUtil.newHashMap(results.length);
|
||||
for (InsResult result : results) {
|
||||
resultMap.put(Convert.toStr(ReflectUtil.getFieldValue(result, "val")),
|
||||
Convert.toStr(ReflectUtil.getFieldValue(result, "name")));
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
|||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.chushang.common.mybatis.base.BaseEntity;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
|
|
@ -135,4 +136,9 @@ public class WrkInfo extends BaseEntity {
|
|||
*/
|
||||
@TableField(value = "wrk_status")
|
||||
private Integer wrkStatus;
|
||||
/**
|
||||
* 建档日期
|
||||
*/
|
||||
@TableField(value = "register_time")
|
||||
private LocalDate registerTime;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.chushang.inspection.work.vo;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import com.chushang.common.dict.annotation.DictFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
|
|
@ -41,6 +43,7 @@ public class AuditVO implements Serializable {
|
|||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
@JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
|
||||
private LocalDateTime auditTime;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -22,6 +22,14 @@ public class ConfigDataVO {
|
|||
* key 对应值
|
||||
*/
|
||||
private String configValue;
|
||||
/**
|
||||
* 最后拼接的 result 值
|
||||
*/
|
||||
private String finalResult;
|
||||
/**
|
||||
* 问题
|
||||
*/
|
||||
private String middleResult;
|
||||
/**
|
||||
* data
|
||||
* 备注信息
|
||||
|
|
|
|||
|
|
@ -36,6 +36,10 @@ public class InspectionConfigVO implements Serializable {
|
|||
* 模板路径
|
||||
*/
|
||||
private String templateUrl;
|
||||
/**
|
||||
* 默认所属文件id
|
||||
*/
|
||||
private String templateFid;
|
||||
/**
|
||||
* 对应的工单id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.chushang.inspection.work.vo;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import com.chushang.common.dict.annotation.DictFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -95,15 +97,17 @@ public class WrkAuditVO {
|
|||
/**
|
||||
* 处理时间
|
||||
*/
|
||||
@JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
|
||||
private LocalDateTime disposeTime;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
protected String createBy;
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
protected LocalDateTime createTime;
|
||||
@JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.chushang.inspection.work.vo;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import com.chushang.common.dict.annotation.DictFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -80,15 +82,22 @@ public class WrkDispatchVO implements Serializable {
|
|||
/**
|
||||
* 截至时间
|
||||
*/
|
||||
@JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
|
||||
private LocalDateTime endTime;
|
||||
/**
|
||||
* 派单时间
|
||||
*/
|
||||
@JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
|
||||
private LocalDateTime createTime;
|
||||
/**
|
||||
* 派单人
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 建档时间
|
||||
*/
|
||||
@JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
|
||||
private LocalDateTime registerTime;
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import lombok.Builder;
|
|||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
|
|
@ -17,6 +18,7 @@ import java.io.Serializable;
|
|||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class WrkInfoPhoneVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 工单编号
|
||||
|
|
|
|||
|
|
@ -1,16 +1,19 @@
|
|||
package com.chushang.inspection.work.vo;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.chushang.common.dict.annotation.DictFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
|
@ -71,6 +74,7 @@ public class WrkInfoVO implements Serializable {
|
|||
/**
|
||||
* 业务员处理时间
|
||||
*/
|
||||
@JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
|
||||
private LocalDateTime disposeTime;
|
||||
|
||||
/**
|
||||
|
|
@ -94,6 +98,7 @@ public class WrkInfoVO implements Serializable {
|
|||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
|
||||
private LocalDateTime endTime;
|
||||
/**
|
||||
* 工单状态
|
||||
|
|
@ -110,6 +115,7 @@ public class WrkInfoVO implements Serializable {
|
|||
/**
|
||||
* 派单时间
|
||||
*/
|
||||
@JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.chushang.inspection.work.vo;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import com.chushang.common.dict.annotation.DictFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -41,6 +43,7 @@ public class WrkListAppVO implements Serializable {
|
|||
private Integer workType;
|
||||
|
||||
/** 上次工单处理时间 */
|
||||
@JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
|
||||
private LocalDateTime lastDisposeTime;
|
||||
|
||||
/** 上次工单服务结果 */
|
||||
|
|
|
|||
|
|
@ -114,6 +114,18 @@
|
|||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<encoding>UTF-8</encoding>
|
||||
<nonFilteredFileExtensions>
|
||||
<!--过滤掉不需要编码的文件:过滤后缀为 .doc、.xlsx。。。 的所有文件,不对其进行统一编码-->
|
||||
<nonFilteredFileExtension>doc</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>docx</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>txt</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>ftl</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>xls</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>xlsx</nonFilteredFileExtension>
|
||||
</nonFilteredFileExtensions>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
package com.chushang.inspection.common.controller;
|
||||
|
||||
import com.chushang.common.core.web.AjaxResult;
|
||||
import com.chushang.common.log.annotation.SysLog;
|
||||
import com.chushang.common.log.enums.BusinessType;
|
||||
import com.chushang.inspection.common.service.CommonService;
|
||||
import com.chushang.security.annotation.RequiresPermissions;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @auther: zhao
|
||||
* @date: 2024/7/2 11:26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(value = "/common")
|
||||
public class CommonController {
|
||||
|
||||
@Resource
|
||||
CommonService commonService;
|
||||
|
||||
/**
|
||||
* 上传文件上传
|
||||
*/
|
||||
@SysLog(value = "上传模板", businessType = BusinessType.UPLOAD)
|
||||
@PostMapping(value = "/upload")
|
||||
@RequiresPermissions("ins:template:upload")
|
||||
public AjaxResult templateUpload(@RequestParam("file") MultipartFile file,
|
||||
@RequestParam("fileType") String fileType)
|
||||
{
|
||||
return AjaxResult.success(commonService.uploadFile(file, fileType));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
package com.chushang.inspection.common.service;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.chushang.common.core.constant.SecurityConstants;
|
||||
import com.chushang.common.core.exception.ResultException;
|
||||
import com.chushang.common.core.web.Result;
|
||||
import com.chushang.oss.entity.dto.UploadFileDTO;
|
||||
import com.chushang.oss.entity.vo.FileSourceVo;
|
||||
import com.chushang.oss.feign.RemoteOssService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @auther: zhao
|
||||
* @date: 2024/7/2 11:25
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class CommonService {
|
||||
|
||||
@Resource
|
||||
RemoteOssService remoteOssService;
|
||||
|
||||
/**
|
||||
* 上传文件 -- 公共
|
||||
*/
|
||||
public FileSourceVo uploadFile(MultipartFile file, String fileType) {
|
||||
// 上传模板信息
|
||||
Result<List<FileSourceVo>> listResult =
|
||||
remoteOssService.uploadFile(UploadFileDTO.builder()
|
||||
.files(new MultipartFile[]{file})
|
||||
.build(), null, false, null, fileType, SecurityConstants.INNER);
|
||||
if (listResult.isSuccess() && CollectionUtil.isNotEmpty(listResult.getData())){
|
||||
return listResult.getData().get(0);
|
||||
}
|
||||
throw new ResultException("上传失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,151 +0,0 @@
|
|||
package com.chushang.inspection.ins;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.io.resource.ResourceUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.chushang.common.core.constant.SecurityConstants;
|
||||
import com.chushang.common.core.web.Result;
|
||||
import com.chushang.inspection.project.vo.DetailsVO;
|
||||
import com.chushang.inspection.work.vo.*;
|
||||
import com.chushang.oss.feign.RemoteOssService;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.data.PictureRenderData;
|
||||
import com.deepoove.poi.data.Pictures;
|
||||
import com.deepoove.poi.data.UrlPictureRenderData;
|
||||
import com.google.common.collect.Maps;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @auther: zhao
|
||||
* @date: 2024/6/29 11:43
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public abstract class DefaultGeneratedInspection implements GeneratedInspection {
|
||||
|
||||
@Resource
|
||||
RemoteOssService remoteOssService;
|
||||
|
||||
@Override
|
||||
public abstract List<CompletableFuture<Void>> generated(Map<Long, WrkInfoDetailsVO> info, InspectionConfigVO inspection, String path, Executor executor);
|
||||
|
||||
@Override
|
||||
public void compileWord(String fileName, String templatePath, Map<String, Object> data) {
|
||||
XWPFTemplate template = null;
|
||||
try (InputStream stream = ResourceUtil.getStream("template" + File.separator + templatePath)) {
|
||||
template = XWPFTemplate.compile(stream);
|
||||
template.render(data);
|
||||
FileUtil.touch(fileName);
|
||||
template.writeToFile(fileName);
|
||||
} catch (Exception e) {
|
||||
log.error("【{}】模版替换失败", fileName, e);
|
||||
} finally {
|
||||
IoUtil.close(template);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends GeneratedInspection> Map<String, Object> InspectionToMap(WrkInfoDetailsVO inspection, Integer width, Integer height, int... imgTypes) {
|
||||
Map<String, Object> map = BeanUtil.beanToMap(inspection, Maps.newHashMap(),
|
||||
true, v -> "images".equals(v) ? null : v);
|
||||
WrkInfoVO wrkInfo = inspection.getWrkInfo();
|
||||
List<WrkImgVO> images = inspection.getInfoImg();
|
||||
map.put("disposeTime", LocalDateTimeUtil.format(wrkInfo.getDisposeTime(), DatePattern.CHINESE_DATE_PATTERN));
|
||||
map.put("createTime", LocalDateTimeUtil.format(wrkInfo.getDisposeTime(), DatePattern.CHINESE_DATE_PATTERN));
|
||||
if (ArrayUtil.isEmpty(imgTypes) || CollUtil.isEmpty(images)) {
|
||||
return map;
|
||||
}
|
||||
getImage(images, map, width, height, null, imgTypes);
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends GeneratedInspection> void getImage(List<WrkImgVO> images, Map<String, Object> data, Integer width, Integer height, int[] exclude, int... imgTypes) {
|
||||
if (CollUtil.isEmpty(images)) {
|
||||
return;
|
||||
}
|
||||
Map<Integer, WrkImgVO> imgMap = images.stream().filter(img -> exclude == null || !ArrayUtil.contains(exclude, img.getImgType()))
|
||||
.collect(Collectors.toMap(WrkImgVO::getImgType, v -> v, (v1, v2) -> v1));
|
||||
if (CollUtil.isEmpty(imgMap)) {
|
||||
return;
|
||||
}
|
||||
if (ArrayUtil.isNotEmpty(imgTypes)) {
|
||||
for (int imgType : imgTypes) {
|
||||
if (!imgMap.containsKey(imgType) || imgType == -1) {
|
||||
continue;
|
||||
}
|
||||
// 此处需要直接通过minio 获取?
|
||||
WrkImgVO img = imgMap.get(imgType);
|
||||
data.put("img" + imgType, getFile(width, height, img));
|
||||
}
|
||||
} else {
|
||||
AtomicInteger i = new AtomicInteger(1);
|
||||
|
||||
imgMap.forEach((imgType, img) -> {
|
||||
if (imgType != -1) {
|
||||
data.put("img" + imgType, getFile(width, height, img));
|
||||
i.getAndIncrement();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFormat(String template, ConfigDataVO details, int i, boolean isRemark) {
|
||||
Object[] arr = new Object[i];
|
||||
String value = details.getConfigValue() == null ? StrUtil.EMPTY : details.getConfigValue();
|
||||
if (value.contains(StrUtil.COMMA)) {
|
||||
List<String> list = StrUtil.split(value, StrUtil.COMMA);
|
||||
for (int j = 0; j < i; j++) {
|
||||
if (list.contains(Convert.toStr(j + 1))) {
|
||||
arr[j] = "☑";
|
||||
} else {
|
||||
arr[j] = "□";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (int j = 0; j < i; j++) {
|
||||
if (Convert.toStr(j + 1).equals(value)) {
|
||||
arr[j] = "☑";
|
||||
} else {
|
||||
arr[j] = "□";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isRemark) {
|
||||
arr[i - 1] = StrUtil.isBlank(details.getRemark()) ? StrUtil.EMPTY : details.getRemark();
|
||||
}
|
||||
return StrUtil.format(template, arr);
|
||||
}
|
||||
/**
|
||||
* 获取图片
|
||||
*/
|
||||
private PictureRenderData getFile(Integer width, Integer height, WrkImgVO img) {
|
||||
Result<byte[]> result = remoteOssService.getFile(img.getFid(), SecurityConstants.INNER);
|
||||
if (result.isSuccess() && result.getData() != null) {
|
||||
byte[] bytes = result.getData();
|
||||
return Pictures.ofBytes(bytes).size(width, height).create();
|
||||
}
|
||||
return new UrlPictureRenderData(img.getRealPath());
|
||||
}
|
||||
}
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
package com.chushang.inspection.ins;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.io.resource.ResourceUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.chushang.inspection.project.vo.DetailsVO;
|
||||
import com.chushang.inspection.work.vo.*;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.data.Pictures;
|
||||
import com.google.common.collect.Maps;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 生成巡检单信息
|
||||
*/
|
||||
public interface GeneratedInspection {
|
||||
|
||||
String SUFFIX_NAME = ".docx";
|
||||
|
||||
List<CompletableFuture<Void>> generated(Map<Long, WrkInfoDetailsVO> info, InspectionConfigVO inspection, String path, Executor executor);
|
||||
|
||||
default String generateAFileName(String path, String... value) {
|
||||
StringBuilder fileName = new StringBuilder(path);
|
||||
fileName.append(File.separator);
|
||||
for (String v : value) {
|
||||
if (StrUtil.isNotEmpty(v) && v.equals(value[0])) {
|
||||
fileName.append(v);
|
||||
} else if (StrUtil.isNotEmpty(v)) {
|
||||
fileName.append("-").append(v);
|
||||
}
|
||||
}
|
||||
return fileName.append(SUFFIX_NAME).toString();
|
||||
}
|
||||
|
||||
void compileWord(String fileName, String templatePath, Map<String, Object> data);
|
||||
|
||||
<T extends GeneratedInspection> Map<String, Object> InspectionToMap(WrkInfoDetailsVO inspection, Integer width, Integer height, int... imgTypes);
|
||||
|
||||
<T extends GeneratedInspection> void getImage(List<WrkImgVO> images, Map<String, Object> data,Integer width, Integer height, int[] exclude, int... imgTypes);
|
||||
|
||||
String getFormat(String template, ConfigDataVO insList, int i, boolean isRemark);
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.chushang.inspection.ins;
|
||||
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.io.resource.ResourceUtil;
|
||||
import com.chushang.common.core.constant.SecurityConstants;
|
||||
import com.chushang.common.core.exception.utils.AssertUtil;
|
||||
import com.chushang.common.core.web.Result;
|
||||
import com.chushang.oss.feign.RemoteOssService;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 模板相关操作
|
||||
* @auther: zhao
|
||||
* @date: 2024/7/1 11:50
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class TemplateService {
|
||||
|
||||
@Resource
|
||||
RemoteOssService remoteOssService;
|
||||
|
||||
public void computeWord(String fileName, String templateFid, Map<String, Object> data){
|
||||
XWPFTemplate template = null;
|
||||
// 如果为null 时, 获取 本地
|
||||
if (null == templateFid){
|
||||
try (InputStream stream = ResourceUtil.getStream("template" + File.separator + "default.docx")) {
|
||||
template = XWPFTemplate.compile(stream);
|
||||
template.render(data);
|
||||
FileUtil.touch(fileName);
|
||||
template.writeToFile(fileName);
|
||||
} catch (Exception e) {
|
||||
log.error("【{}】模版替换失败", fileName, e);
|
||||
} finally {
|
||||
IoUtil.close(template);
|
||||
}
|
||||
}else {
|
||||
Result<byte[]> result = remoteOssService.getFile(templateFid, SecurityConstants.INNER);
|
||||
if (result.isSuccess() && null != result.getData()){
|
||||
try (InputStream stream = new ByteArrayInputStream(result.getData())) {
|
||||
template = XWPFTemplate.compile(stream);
|
||||
template.render(data);
|
||||
FileUtil.touch(fileName);
|
||||
template.writeToFile(fileName);
|
||||
} catch (Exception e) {
|
||||
log.error("【{}】模版替换失败", fileName, e);
|
||||
} finally {
|
||||
IoUtil.close(template);
|
||||
}
|
||||
}else {
|
||||
AssertUtil.invalidate(true, "获取模板文件失败, 失败原因: " + result.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -37,9 +37,9 @@ public class InsConfigController {
|
|||
* @param query 条件
|
||||
* @return 分页信息
|
||||
*/
|
||||
@PostMapping("/page")
|
||||
@GetMapping("/page")
|
||||
@RequiresPermissions("ins:config:page")
|
||||
public AjaxResult findPage(@RequestBody @Validated InsConfigQuery query) {
|
||||
public AjaxResult findPage(@Validated InsConfigQuery query) {
|
||||
return AjaxResult.success(configService.pageList(query));
|
||||
}
|
||||
|
||||
|
|
@ -49,7 +49,7 @@ public class InsConfigController {
|
|||
* @param configId 字典类型id
|
||||
* @return 详细信息
|
||||
*/
|
||||
@PostMapping("/info/{configId}")
|
||||
@GetMapping("/info/{configId}")
|
||||
@RequiresPermissions("ins:config:info")
|
||||
public AjaxResult get(@PathVariable Long configId) {
|
||||
return AjaxResult.success(configService.getById(configId));
|
||||
|
|
@ -60,7 +60,7 @@ public class InsConfigController {
|
|||
*
|
||||
* @return 详细信息
|
||||
*/
|
||||
@PostMapping("/alias/{alias}")
|
||||
@GetMapping("/alias/{alias}")
|
||||
@RequiresPermissions("ins:config:info")
|
||||
public AjaxResult get(@PathVariable String alias) {
|
||||
return AjaxResult.success(configService.getByAlias(alias));
|
||||
|
|
@ -85,7 +85,7 @@ public class InsConfigController {
|
|||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
* 修改
|
||||
*/
|
||||
@SysLog(value = "巡检单配置", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/update")
|
||||
|
|
@ -103,16 +103,4 @@ public class InsConfigController {
|
|||
configService.updateByEntityId(config);
|
||||
return AjaxResult.success(config.getConfigId());
|
||||
}
|
||||
/**
|
||||
* 巡检单上传
|
||||
*/
|
||||
@SysLog(value = "巡检单", businessType = BusinessType.UPLOAD)
|
||||
@PostMapping(value = "/upload")
|
||||
@RequiresPermissions("wrk:config:upload")
|
||||
public AjaxResult templateUpload(@RequestParam("file") MultipartFile file)
|
||||
{
|
||||
return AjaxResult.success(configService.uploadTemplate(file));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.*;
|
|||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 巡检单配置详情
|
||||
* @auther: zhao
|
||||
* @date: 2024/6/20 17:27
|
||||
*/
|
||||
|
|
@ -33,14 +34,14 @@ public class InsDetailController {
|
|||
InspectionDetailService detailService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* 配置详情查询
|
||||
*
|
||||
* @param query 条件
|
||||
* @return 分页信息
|
||||
*/
|
||||
@PostMapping("/page")
|
||||
@GetMapping("/page")
|
||||
@RequiresPermissions("ins:detail:page")
|
||||
public AjaxResult findPage(@RequestBody @Validated InsDetailQuery query) {
|
||||
public AjaxResult findPage(@Validated InsDetailQuery query) {
|
||||
return AjaxResult.success(detailService.findPage(query));
|
||||
}
|
||||
|
||||
|
|
@ -49,7 +50,7 @@ public class InsDetailController {
|
|||
*
|
||||
* @return 详细信息
|
||||
*/
|
||||
@PostMapping("/info/{detailId}")
|
||||
@GetMapping("/info/{detailId}")
|
||||
@RequiresPermissions("ins:details:info")
|
||||
public AjaxResult get(@PathVariable Long detailId) {
|
||||
return AjaxResult.success(detailService.getById(detailId));
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class PollTaskController {
|
|||
* 查询任务列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@RequiresPermissions("store:task:list")
|
||||
// @RequiresPermissions("store:task:list")
|
||||
public AjaxResult findList(TaskQuery taskQuery) {
|
||||
return AjaxResult.success(pollingTaskService.findList(taskQuery));
|
||||
}
|
||||
|
|
@ -48,7 +48,7 @@ public class PollTaskController {
|
|||
* 查询顶级任务列表
|
||||
*/
|
||||
@GetMapping("/list/top")
|
||||
@RequiresPermissions("store:task:top")
|
||||
// @RequiresPermissions("store:task:top")
|
||||
public AjaxResult findTopList(){
|
||||
return AjaxResult.success(pollingTaskService.findTopList(CommonParam.buildPageRequest()));
|
||||
}
|
||||
|
|
@ -57,9 +57,9 @@ public class PollTaskController {
|
|||
* 查询顶级任务配置
|
||||
*/
|
||||
@GetMapping("/config/{taskId}")
|
||||
@RequiresPermissions("store:task:config")
|
||||
public ConfigVO findTaskConfig(@PathVariable Long taskId) {
|
||||
return pollingTaskService.findTaskConfig(taskId);
|
||||
// @RequiresPermissions("store:task:config")
|
||||
public AjaxResult findTaskConfig(@PathVariable Long taskId) {
|
||||
return AjaxResult.success(pollingTaskService.findTaskConfig(taskId));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -69,9 +69,9 @@ public class PollTaskController {
|
|||
* @return 详情
|
||||
*/
|
||||
@GetMapping("/info/{taskId}")
|
||||
@RequiresPermissions("store:task:info")
|
||||
public TaskVO getTaskById(@PathVariable Long taskId) {
|
||||
return pollingTaskService.getTaskById(taskId);
|
||||
// @RequiresPermissions("store:task:info")
|
||||
public AjaxResult getTaskById(@PathVariable Long taskId) {
|
||||
return AjaxResult.success(pollingTaskService.getTaskById(taskId));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -80,7 +80,7 @@ public class PollTaskController {
|
|||
* @param task 任务信息
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@RequiresPermissions("store:task:save")
|
||||
// @RequiresPermissions("store:task:save")
|
||||
@SysLog( value = "任务", businessType = BusinessType.INSERT)
|
||||
public AjaxResult save(@RequestBody @Validated(Create.class) TaskDTO task) {
|
||||
Long taskId = pollingTaskService.saveTask(task);
|
||||
|
|
@ -94,7 +94,7 @@ public class PollTaskController {
|
|||
* @param task 任务信息
|
||||
*/
|
||||
@PostMapping("/{taskId}")
|
||||
@RequiresPermissions("store:task:update")
|
||||
// @RequiresPermissions("store:task:update")
|
||||
@SysLog(value = "任务", businessType = BusinessType.UPDATE)
|
||||
public AjaxResult update(@RequestBody @Validated(Update.class) TaskDTO task,
|
||||
@PathVariable Long taskId)
|
||||
|
|
@ -108,7 +108,7 @@ public class PollTaskController {
|
|||
* @param taskId 删除的id
|
||||
*/
|
||||
@DeleteMapping("/del/{taskId}")
|
||||
@RequiresPermissions("store:task:delete")
|
||||
// @RequiresPermissions("store:task:delete")
|
||||
@SysLog(value = "任务", businessType = BusinessType.DELETE)
|
||||
public AjaxResult delete(@PathVariable Long taskId) {
|
||||
pollingTaskService.removeById(taskId);
|
||||
|
|
@ -121,7 +121,7 @@ public class PollTaskController {
|
|||
* @param delete 删除的id 集合
|
||||
*/
|
||||
@PostMapping("/del/batch")
|
||||
@RequiresPermissions("store:task:delete")
|
||||
// @RequiresPermissions("store:task:delete")
|
||||
@SysLog(value = "批量任务", businessType = BusinessType.DELETE)
|
||||
public AjaxResult delete(@RequestBody Delete delete) {
|
||||
List<Long> ids = delete.getIds();
|
||||
|
|
@ -133,7 +133,7 @@ public class PollTaskController {
|
|||
* 导入任务 读取
|
||||
*/
|
||||
@PostMapping("/import/read")
|
||||
@RequiresPermissions("store:task:import")
|
||||
// @RequiresPermissions("store:task:import")
|
||||
public AjaxResult importRead(@RequestParam("file") MultipartFile file) {
|
||||
return AjaxResult.success(pollingTaskService.importRead(file));
|
||||
}
|
||||
|
|
@ -143,9 +143,11 @@ public class PollTaskController {
|
|||
*/
|
||||
@SysLog(value = "任务", businessType = BusinessType.IMPORT)
|
||||
@PostMapping("/import/{parentId}")
|
||||
@RequiresPermissions("store:task:save")
|
||||
// @RequiresPermissions("store:task:save")
|
||||
public AjaxResult importSave(@RequestBody List<TaskExcelDTO> taskExcel, @PathVariable Long parentId) {
|
||||
pollingTaskService.importSave(taskExcel, parentId);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
// todo 下载导入模板
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,54 @@
|
|||
package com.chushang.inspection.project.controller;
|
||||
|
||||
import com.chushang.common.core.validator.Create;
|
||||
import com.chushang.common.core.web.AjaxResult;
|
||||
import com.chushang.common.log.annotation.SysLog;
|
||||
import com.chushang.common.log.enums.BusinessType;
|
||||
import com.chushang.inspection.project.po.Template;
|
||||
import com.chushang.inspection.project.service.TbTemplateService;
|
||||
import com.chushang.security.annotation.RequiresPermissions;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 模板相关管理
|
||||
* @auther: zhao
|
||||
* @date: 2024/7/2 11:09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(value = "/template")
|
||||
public class TemplateController {
|
||||
|
||||
@Resource
|
||||
TbTemplateService tbTemplateService;
|
||||
/**
|
||||
* 模板列表页面
|
||||
*/
|
||||
@GetMapping(value = "/page")
|
||||
@RequiresPermissions(value = "ins:template:page")
|
||||
public AjaxResult pageList(Template template){
|
||||
return AjaxResult.success(tbTemplateService.pageList(template));
|
||||
}
|
||||
/**
|
||||
* 新增模板
|
||||
*/
|
||||
@SysLog(value = "模板", businessType = BusinessType.INSERT)
|
||||
@PostMapping(value = "/save")
|
||||
@RequiresPermissions(value = "ins:template:save")
|
||||
public AjaxResult save(@RequestBody@Validated(Create.class) Template template){
|
||||
return AjaxResult.success(tbTemplateService.saveTemplate(template));
|
||||
}
|
||||
/**
|
||||
* 修改模板
|
||||
*/
|
||||
@SysLog(value = "模板", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update")
|
||||
@RequiresPermissions(value = "ins:template:update")
|
||||
public AjaxResult update(@RequestBody@Validated(Create.class) Template template){
|
||||
return AjaxResult.success(tbTemplateService.updateTemplate(template));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ package com.chushang.inspection.project.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.chushang.common.core.util.StringUtils;
|
||||
import com.chushang.inspection.project.po.PollingTask;
|
||||
|
||||
/**
|
||||
|
|
@ -12,9 +13,11 @@ public interface PollingTaskMapper extends BaseMapper<PollingTask> {
|
|||
default Integer childMaxIndex(String index, int level){
|
||||
QueryWrapper<PollingTask> taskSql = new QueryWrapper<>();
|
||||
taskSql.select("max(search_index) AS search_index").lambda()
|
||||
.likeLeft(PollingTask::getSearchNum,index)
|
||||
.likeRight(StringUtils.isNotBlank(index), PollingTask::getSearchNum,index)
|
||||
.eq(PollingTask::getLevel, level);
|
||||
PollingTask pollingTask = selectOne(taskSql);
|
||||
if (null == pollingTask) return null;
|
||||
// 此处为null
|
||||
return pollingTask.getSearchIndex();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
package com.chushang.inspection.project.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.chushang.inspection.project.po.Template;
|
||||
import com.chushang.inspection.terminal.po.Terminal;
|
||||
|
||||
/**
|
||||
* @auther: zhao
|
||||
* @date: 2024/7/2 11:04
|
||||
*/
|
||||
public interface TemplateMapper extends BaseMapper<Template> {
|
||||
}
|
||||
|
|
@ -9,6 +9,7 @@ import com.chushang.common.mybatis.utils.WrapperUtils;
|
|||
import com.chushang.inspection.project.po.InspectionConfig;
|
||||
import com.chushang.inspection.project.query.InsConfigQuery;
|
||||
import com.chushang.inspection.project.vo.InsConfigVO;
|
||||
import com.chushang.oss.entity.vo.FileSourceVo;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
|
|
@ -34,6 +35,4 @@ public interface InspectionConfigService extends IService<InspectionConfig>{
|
|||
void updateByEntityId(InspectionConfig config);
|
||||
|
||||
void saveEntity(InspectionConfig config);
|
||||
|
||||
String uploadTemplate(MultipartFile file);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
package com.chushang.inspection.project.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.chushang.common.mybatis.utils.PageResult;
|
||||
import com.chushang.inspection.project.po.Template;
|
||||
|
||||
/**
|
||||
* @auther: zhao
|
||||
* @date: 2024/7/2 11:04
|
||||
*/
|
||||
public interface TbTemplateService extends IService<Template> {
|
||||
PageResult pageList(Template template);
|
||||
|
||||
Long saveTemplate(Template template);
|
||||
|
||||
Long updateTemplate(Template template);
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package com.chushang.inspection.project.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.chushang.common.core.constant.SecurityConstants;
|
||||
import com.chushang.common.core.exception.ResultException;
|
||||
import com.chushang.common.core.exception.utils.AssertUtil;
|
||||
import com.chushang.common.core.web.Result;
|
||||
import com.chushang.common.mybatis.page.CommonParam;
|
||||
import com.chushang.common.mybatis.utils.PageResult;
|
||||
import com.chushang.common.mybatis.utils.WrapperUtils;
|
||||
import com.chushang.inspection.project.mapper.TemplateMapper;
|
||||
import com.chushang.inspection.project.po.Template;
|
||||
import com.chushang.inspection.project.service.TbTemplateService;
|
||||
import com.chushang.oss.entity.dto.UploadFileDTO;
|
||||
import com.chushang.oss.entity.vo.FileSourceVo;
|
||||
import com.chushang.oss.feign.RemoteOssService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @auther: zhao
|
||||
* @date: 2024/7/2 11:05
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class TemplateServiceImpl extends ServiceImpl<TemplateMapper, Template> implements TbTemplateService {
|
||||
@Resource
|
||||
RemoteOssService remoteOssService;
|
||||
|
||||
@Override
|
||||
public PageResult pageList(Template template) {
|
||||
CommonParam commonParam = CommonParam.buildPageRequest();
|
||||
LambdaQueryWrapper<Template> templateSql = WrapperUtils.builder(template, commonParam);
|
||||
Page<Template> page = this.page(new Page<>(commonParam.getPage(), commonParam.getLimit()), templateSql);
|
||||
return new PageResult(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long saveTemplate(Template template) {
|
||||
// 模板别名
|
||||
String templateAlias = template.getTemplateAlias();
|
||||
|
||||
long count = count(new LambdaQueryWrapper<Template>()
|
||||
.eq(Template::getTemplateAlias, templateAlias)
|
||||
);
|
||||
AssertUtil.invalidate(count > 0, "模板别名重复");
|
||||
template.setTemplateId(null);
|
||||
save(template);
|
||||
return template.getTemplateId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long updateTemplate(Template template) {
|
||||
// 模板别名
|
||||
String templateAlias = template.getTemplateAlias();
|
||||
Long templateId = template.getTemplateId();
|
||||
|
||||
long count = count(new LambdaQueryWrapper<Template>()
|
||||
.eq(Template::getTemplateAlias, templateAlias)
|
||||
.ne(Template::getTaskId, templateId)
|
||||
);
|
||||
AssertUtil.invalidate(count > 0, "模板别名重复");
|
||||
updateById(template);
|
||||
return templateId;
|
||||
}
|
||||
}
|
||||
|
|
@ -24,9 +24,9 @@ public class ConsumableDetailsController {
|
|||
/**
|
||||
* 查询耗材详情
|
||||
*/
|
||||
@PostMapping("/page")
|
||||
@GetMapping("/page")
|
||||
@RequiresPermissions("consumables:details:page")
|
||||
public AjaxResult findPage(@RequestBody @Validated ConsumablesDetailsQuery query) {
|
||||
public AjaxResult findPage(@Validated ConsumablesDetailsQuery query) {
|
||||
return AjaxResult.success(consumableDetailsService.findPage(query));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class ConsumablesTotalController {
|
|||
*/
|
||||
@GetMapping("/page")
|
||||
@RequiresPermissions("consumables:total:page")
|
||||
public AjaxResult findPage(@RequestBody @Validated ConsumablesTotalQuery query) {
|
||||
public AjaxResult findPage(@Validated ConsumablesTotalQuery query) {
|
||||
return AjaxResult.success(consumablesTotalService.findPage(query));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,9 +36,9 @@ public class StoreController {
|
|||
* @param query 条件
|
||||
*/
|
||||
@SysLog(value = "查询商户", businessType = BusinessType.QUERY)
|
||||
@PostMapping("/page")
|
||||
@GetMapping("/page")
|
||||
@RequiresPermissions("ins:store:page")
|
||||
public AjaxResult pageList(@RequestBody @Validated StoreQuery query) {
|
||||
public AjaxResult pageList(@Validated StoreQuery query) {
|
||||
return AjaxResult.success(storeService.pageList(query));
|
||||
}
|
||||
|
||||
|
|
@ -58,9 +58,9 @@ public class StoreController {
|
|||
* 查询商户
|
||||
*/
|
||||
@SysLog(value = "查询商户", businessType = BusinessType.QUERY)
|
||||
@PostMapping("/info")
|
||||
@GetMapping("/info")
|
||||
@RequiresPermissions("ins:store:info")
|
||||
public AjaxResult update(@RequestBody @NotNull(message = "商户id不能为空") Long id) {
|
||||
public AjaxResult update(@NotNull(message = "商户id不能为空") Long id) {
|
||||
Store store = storeService.getById(id);
|
||||
return AjaxResult.success(BeanUtil.copyProperties(store, StoreVO.class));
|
||||
}
|
||||
|
|
@ -88,4 +88,7 @@ public class StoreController {
|
|||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
// todo 导入商户 read
|
||||
// todo 下载导入模板
|
||||
// todo 导入商户 save
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ public class TerminalController {
|
|||
* @param query 条件
|
||||
*/
|
||||
@SysLog(value = "终端", businessType = BusinessType.QUERY)
|
||||
@PostMapping("/page")
|
||||
@GetMapping("/page")
|
||||
@RequiresPermissions("ins:terminal:page")
|
||||
public AjaxResult pageList(@RequestBody @Validated TerminalQuery query) {
|
||||
public AjaxResult pageList(@Validated TerminalQuery query) {
|
||||
return AjaxResult.success(terminalService.pageList(query));
|
||||
}
|
||||
|
||||
|
|
@ -45,9 +45,9 @@ public class TerminalController {
|
|||
* @param query 条件
|
||||
*/
|
||||
@SysLog(value = "终端app", businessType = BusinessType.QUERY)
|
||||
@PostMapping("/page/app")
|
||||
@GetMapping("/page/app")
|
||||
@RequiresPermissions("terminal:page:app")
|
||||
public AjaxResult queryPageApp(@RequestBody @Validated TerminalAppQuery query) {
|
||||
public AjaxResult queryPageApp(@Validated TerminalAppQuery query) {
|
||||
return AjaxResult.success(terminalService.queryPageApp(query));
|
||||
}
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ public class TerminalController {
|
|||
* 查询终端app
|
||||
*/
|
||||
@SysLog(value = "终端详情app", businessType = BusinessType.QUERY)
|
||||
@PostMapping("/info/app/{terminalId}")
|
||||
@GetMapping("/info/app/{terminalId}")
|
||||
@RequiresPermissions("terminal:info:app")
|
||||
public AjaxResult infoApp(@PathVariable Long terminalId,
|
||||
@RequestParam("taskId") Long taskId) {
|
||||
|
|
@ -83,6 +83,9 @@ public class TerminalController {
|
|||
Terminal terminal = BeanUtil.copyProperties(query, Terminal.class);
|
||||
return AjaxResult.success(terminalService.updateById(terminal));
|
||||
}
|
||||
// todo 导入终端 read
|
||||
// todo 下载导入模板
|
||||
// todo 导入终端 save
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,4 @@ import java.util.List;
|
|||
* @date: 2024/6/21 11:47
|
||||
*/
|
||||
public interface ConsumablesTotalMapper extends BaseMapper<ConsumablesTotal> {
|
||||
List<ConsumableDetails> findPage(@Param("query") ConsumablesDetailsQuery query,
|
||||
Page<SysUser> page);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.chushang.inspection.terminal.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.chushang.datascope.annotation.DataScope;
|
||||
import com.chushang.inspection.terminal.po.Store;
|
||||
import com.chushang.inspection.terminal.query.StoreQuery;
|
||||
import com.chushang.inspection.terminal.vo.StoreVO;
|
||||
|
|
@ -14,6 +15,7 @@ import java.util.List;
|
|||
* @date: 2024/6/21 16:39
|
||||
*/
|
||||
public interface StoreMapper extends BaseMapper<Store> {
|
||||
@DataScope(deptAlias = "s")
|
||||
List<StoreVO> pageList(@Param("query") StoreQuery query,
|
||||
Page<Store> page);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ public class StoreServiceImpl extends ServiceImpl<StoreMapper, Store> implements
|
|||
|
||||
|
||||
@Override
|
||||
@DataScope(deptAlias = "s")
|
||||
public PageResult pageList(StoreQuery query) {
|
||||
CommonParam commonParam = CommonParam.buildPageRequest();
|
||||
LambdaQueryWrapper<Store> storeSql = WrapperUtils.builder(query, commonParam);
|
||||
|
|
|
|||
|
|
@ -7,14 +7,18 @@ import cn.hutool.core.util.StrUtil;
|
|||
import com.chushang.common.core.web.AjaxResult;
|
||||
import com.chushang.common.log.annotation.SysLog;
|
||||
import com.chushang.common.log.enums.BusinessType;
|
||||
import com.chushang.inspection.ins.GeneratedInsFactory;
|
||||
import com.chushang.inspection.utils.TaskConfigUtils;
|
||||
import com.chushang.inspection.work.dto.WrkInfoDTO;
|
||||
import com.chushang.inspection.work.query.DispatchQuery;
|
||||
import com.chushang.inspection.work.query.ReviewedQuery;
|
||||
import com.chushang.inspection.work.query.WrkAppQuery;
|
||||
import com.chushang.inspection.work.query.WrkInfoQuery;
|
||||
import com.chushang.inspection.work.service.WrkInfoService;
|
||||
import com.chushang.redis.annotation.AutoIdempotent;
|
||||
import com.chushang.security.annotation.RequiresPermissions;
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.extern.java.Log;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
|
@ -39,6 +43,7 @@ public class WrkInfoController {
|
|||
@Resource
|
||||
WrkInfoService wrkInfoService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询派单/领取列表
|
||||
*/
|
||||
|
|
@ -195,4 +200,16 @@ public class WrkInfoController {
|
|||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交
|
||||
*/
|
||||
@AutoIdempotent
|
||||
@PostMapping("/submit")
|
||||
@RequiresPermissions("wrk:submit")
|
||||
@SysLog(value = "工单提交", businessType = BusinessType.INSERT)
|
||||
public AjaxResult submit(@Validated @RequestBody WrkInfoDTO info) {
|
||||
// wrkInfoService.submit(info);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ public class WrkInfoPhoneController {
|
|||
* 查询工单
|
||||
*/
|
||||
@SysLog(value = "电话工单", businessType = BusinessType.QUERY)
|
||||
@PostMapping("/dispatch/page")
|
||||
@GetMapping("/dispatch/page")
|
||||
@RequiresPermissions("wrk:phone:page")
|
||||
public AjaxResult pageList(@RequestBody @Validated WrkInfoQuery query) {
|
||||
public AjaxResult pageList(@Validated WrkInfoQuery query) {
|
||||
return AjaxResult.success(infoPhoneService.pageList(query));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.chushang.inspection.work.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.chushang.datascope.annotation.DataScope;
|
||||
import com.chushang.inspection.work.po.WrkInfo;
|
||||
import com.chushang.inspection.work.query.ReviewedQuery;
|
||||
import com.chushang.inspection.work.query.WrkAppQuery;
|
||||
|
|
@ -19,12 +20,12 @@ import java.util.List;
|
|||
* @date: 2024/6/26 17:13
|
||||
*/
|
||||
public interface WrkInfoMapper extends BaseMapper<WrkInfo> {
|
||||
|
||||
@DataScope(deptAlias = "i")
|
||||
List<WrkDispatchVO> queryDispatchPage(@Param("query") WrkInfoQuery query,
|
||||
Page<WrkDispatchVO> page);
|
||||
|
||||
@DataScope(deptAlias = "i")
|
||||
List<WrkAuditVO> queryArchivePage(@Param("query") ReviewedQuery query, Page<WrkAuditVO> page);
|
||||
|
||||
@DataScope(deptAlias = "i")
|
||||
List<WrkListAppVO> queryAppPage(@Param("query") WrkAppQuery query, Page<WrkListAppVO> page);
|
||||
|
||||
List<WrkInfoDetailsVO> listInsTemplate(@Param("query") ReviewedQuery query);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package com.chushang.inspection.work.service.impl;
|
||||
package com.chushang.inspection.work.service;
|
||||
|
||||
import com.chushang.inspection.work.po.WrkIcbcJs;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
|
@ -1,10 +1,11 @@
|
|||
package com.chushang.inspection.work.service;
|
||||
package com.chushang.inspection.work.service.impl;
|
||||
|
||||
import com.chushang.inspection.work.service.WrkIcbcJsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.chushang.inspection.work.mapper.WrkIcbcJsMapper;
|
||||
import com.chushang.inspection.work.po.WrkIcbcJs;
|
||||
import com.chushang.inspection.work.service.impl.WrkIcbcJsService;
|
||||
|
||||
/**
|
||||
* @auther: zhao
|
||||
* @date: 2024/6/28 15:38
|
||||
|
|
@ -19,12 +19,10 @@ import com.chushang.common.mybatis.page.CommonParam;
|
|||
import com.chushang.common.mybatis.utils.PageResult;
|
||||
import com.chushang.common.mybatis.utils.WrapperUtils;
|
||||
import com.chushang.datascope.annotation.DataScope;
|
||||
import com.chushang.inspection.ins.GeneratedIns;
|
||||
import com.chushang.inspection.ins.GeneratedInsFactory;
|
||||
import com.chushang.inspection.project.service.InspectionDataService;
|
||||
import com.chushang.inspection.terminal.po.FiveStore;
|
||||
import com.chushang.inspection.terminal.po.Terminal;
|
||||
import com.chushang.inspection.terminal.service.FiveStoreService;
|
||||
import com.chushang.inspection.terminal.service.StoreService;
|
||||
import com.chushang.inspection.terminal.service.TerminalService;
|
||||
import com.chushang.inspection.terminal.vo.FiveStoreVO;
|
||||
import com.chushang.inspection.utils.StreamUtils;
|
||||
|
|
@ -87,7 +85,7 @@ public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> impl
|
|||
@Resource
|
||||
RemoteUserService userFeignService;
|
||||
@Resource
|
||||
GeneratedIns generatedIns;
|
||||
GeneratedInsFactory generatedInsFactory;
|
||||
|
||||
@Value("${push.icbc-js.enable:false}")
|
||||
private boolean enable;
|
||||
|
|
@ -95,7 +93,6 @@ public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> impl
|
|||
|
||||
|
||||
@Override
|
||||
@DataScope(deptAlias = "i")
|
||||
public PageResult queryDispatchPage(WrkInfoQuery query) {
|
||||
CommonParam commonParam = CommonParam.buildPageRequest();
|
||||
WrapperUtils.buildSql(query);
|
||||
|
|
@ -105,7 +102,6 @@ public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> impl
|
|||
}
|
||||
|
||||
@Override
|
||||
@DataScope(deptAlias = "i")
|
||||
public PageResult queryArchivePage(ReviewedQuery query) {
|
||||
CommonParam commonParam = CommonParam.buildPageRequest();
|
||||
WrapperUtils.buildSql(query);
|
||||
|
|
@ -118,7 +114,7 @@ public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> impl
|
|||
* app查询
|
||||
*/
|
||||
@Override
|
||||
@DataScope(deptAlias = "i")
|
||||
|
||||
public PageResult queryAppPage(WrkAppQuery query) {
|
||||
CommonParam commonParam = CommonParam.buildPageRequest();
|
||||
WrapperUtils.buildSql(query);
|
||||
|
|
@ -211,7 +207,7 @@ public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> impl
|
|||
}
|
||||
|
||||
/**
|
||||
* 此处调用后台执行
|
||||
* 此处调用后台执行 -- 下载word 工单
|
||||
*/
|
||||
public Result<String> downInspectionTemplate(String params){
|
||||
ReviewedQuery query = JSON.parseObject(params, ReviewedQuery.class);
|
||||
|
|
@ -225,9 +221,8 @@ public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> impl
|
|||
// 工单map
|
||||
Map<Long, WrkInfoDetailsVO> wrkMap =
|
||||
wrkInfoDetailsVOS.stream().collect(Collectors.toMap(w -> w.getWrkInfo().getWrkId(), o -> o));
|
||||
List<WrkImgVO> imgList = wrkImgService.listImgByWrkIds(wrkMap.keySet());
|
||||
// 工单图片
|
||||
// List<WrkImg> imgList = wrkImgService.list(new LambdaQueryWrapper<WrkImg>().in(WrkImg::getImgId, wrkMap.keySet()));
|
||||
List<WrkImgVO> imgList = wrkImgService.listImgByWrkIds(wrkMap.keySet());
|
||||
Map<Long, List<WrkImgVO>> imgMap = imgList.stream().collect(Collectors.groupingBy(WrkImgVO::getWrkId));
|
||||
List<InspectionConfigVO> insConfigs = inspectionDataService.listInspections(wrkMap.keySet());
|
||||
Map<Long, List<InspectionConfigVO>> configMap = insConfigs.stream().collect(Collectors.groupingBy(InspectionConfigVO::getWrkId));
|
||||
|
|
@ -238,8 +233,7 @@ public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> impl
|
|||
infoDetail.setInspections(inspectionConfigVOS);
|
||||
});
|
||||
// 此处 去调用 生成 word 文档
|
||||
// generatedIns.generated(wrkMap);
|
||||
return Result.ok();
|
||||
return Result.ok(generatedInsFactory.generated(wrkMap));
|
||||
}
|
||||
|
||||
private WrkInfo makeWrkInfoEntity(DispatchDTO dispatch,DispatchQuery query,Long userId,String userName,Integer workMethod){
|
||||
|
|
|
|||
|
|
@ -36,8 +36,11 @@
|
|||
<if test="query.totalId != null">
|
||||
AND cd.total_id = #{query.totalId}
|
||||
</if>
|
||||
</where>
|
||||
<if test="1 == 1">
|
||||
<!-- 数据范围过滤 -->
|
||||
${query.sqlParam.dataScope}
|
||||
${query.sqlParam.get('dataScope')}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.chushang.inspection.terminal.mapper.ConsumablesTotalMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chushang.inspection.terminal.po.ConsumablesTotal">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table consumables_total-->
|
||||
<result column="total_id" jdbcType="BIGINT" property="totalId" />
|
||||
<result column="dept_id" jdbcType="BIGINT" property="deptId" />
|
||||
<result column="type" jdbcType="TINYINT" property="type" />
|
||||
<result column="source" jdbcType="TINYINT" property="source" />
|
||||
<result column="total" jdbcType="BIGINT" property="total" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="task_id" jdbcType="BIGINT" property="taskId" />
|
||||
<result column="version" jdbcType="BIGINT" property="version" />
|
||||
<result column="del_state" jdbcType="BOOLEAN" property="delState" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
total_id, dept_id, `type`, `source`, total, remark, task_id, version, del_state,
|
||||
create_by, create_time, update_by, update_time
|
||||
</sql>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.chushang.inspection.project.mapper.InspectionConfigMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chushang.inspection.project.po.InspectionConfig">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table inspection_config-->
|
||||
<id column="config_id" jdbcType="BIGINT" property="configId" />
|
||||
<result column="task_id" jdbcType="BIGINT" property="taskId" />
|
||||
<result column="dept_id" jdbcType="BIGINT" property="deptId" />
|
||||
<result column="config_name" jdbcType="VARCHAR" property="configName" />
|
||||
<result column="alias" jdbcType="VARCHAR" property="alias" />
|
||||
<result column="template" jdbcType="VARCHAR" property="template" />
|
||||
<result column="version" jdbcType="BIGINT" property="version" />
|
||||
<result column="del_state" jdbcType="BOOLEAN" property="delState" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
config_id, task_id, dept_id, config_name, `alias`, `template`, version, del_state,
|
||||
create_by, create_time, update_by, update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -8,6 +8,7 @@
|
|||
<result column="alias" property="alias"/>
|
||||
<result column="template" property="template"/>
|
||||
<result column="template_url" property="templateUrl"/>
|
||||
<result column="template_fid" property="templateFid"/>
|
||||
<collection property="details" ofType="com.chushang.inspection.work.vo.ConfigDataVO">
|
||||
<id column="data_id" property="dataId"/>
|
||||
<result column="detail_id" property="detailId"/>
|
||||
|
|
@ -15,6 +16,8 @@
|
|||
<result column="config_type" property="configType"/>
|
||||
<result column="config_label" property="configLabel"/>
|
||||
<result column="config_value" property="configValue"/>
|
||||
<result column="finalResult" property="finalResult"/>
|
||||
<result column="middleResult" property="middleResult"/>
|
||||
<result column="remark" property="remark"/>
|
||||
<result column="ins_id" property="wrkId"/>
|
||||
</collection>
|
||||
|
|
@ -42,15 +45,18 @@
|
|||
id.config_value,
|
||||
id.remark,
|
||||
id.ins_id,
|
||||
id.result AS finalResult,
|
||||
idl.detail_id,
|
||||
idl.config_key,
|
||||
idl.config_type,
|
||||
idl.config_label,
|
||||
idl.result AS middleResult,
|
||||
ic.config_id,
|
||||
ic.template,
|
||||
ic.alias,
|
||||
ic.config_name,
|
||||
ic.template_url
|
||||
ic.template_url,
|
||||
ic.template_fid
|
||||
FROM inspection_data id
|
||||
INNER JOIN inspection_detail idl ON id.detail_id = idl.detail_id
|
||||
INNER JOIN inspection_config ic ON ic.config_id = idl.config_id
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.chushang.inspection.project.mapper.InspectionDetailMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chushang.inspection.project.po.InspectionDetail">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table inspection_detail-->
|
||||
<id column="config_id" jdbcType="BIGINT" property="configId" />
|
||||
<result column="inspection_id" jdbcType="BIGINT" property="inspectionId" />
|
||||
<result column="dept_id" jdbcType="BIGINT" property="deptId" />
|
||||
<result column="config_label" jdbcType="VARCHAR" property="configLabel" />
|
||||
<result column="config_key" jdbcType="VARCHAR" property="configKey" />
|
||||
<result column="config_type" jdbcType="SMALLINT" property="configType" />
|
||||
<result column="version" jdbcType="BIGINT" property="version" />
|
||||
<result column="del_state" jdbcType="BOOLEAN" property="delState" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
config_id, inspection_id, dept_id, config_label, config_key, config_type, version,
|
||||
del_state, create_by, create_time, update_by, update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.chushang.inspection.project.mapper.PollingTaskAutographMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chushang.inspection.project.po.PollingTaskAutograph">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table polling_task_autograph-->
|
||||
<id column="task_id" jdbcType="BIGINT" property="taskId" />
|
||||
<result column="graph_name" jdbcType="VARCHAR" property="graphName" />
|
||||
<result column="img_url" jdbcType="VARCHAR" property="imgUrl" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
task_id, graph_name, img_url
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.chushang.inspection.project.mapper.PollingTaskMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chushang.inspection.project.po.PollingTask">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table polling_task-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="pid" jdbcType="BIGINT" property="pid" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="contact" jdbcType="VARCHAR" property="contact" />
|
||||
<result column="phone" jdbcType="VARCHAR" property="phone" />
|
||||
<result column="number" jdbcType="VARCHAR" property="number" />
|
||||
<result column="is_inspection" jdbcType="TINYINT" property="isInspection" />
|
||||
<result column="dispatch_method" jdbcType="TINYINT" property="dispatchMethod" />
|
||||
<result column="review_method" jdbcType="TINYINT" property="reviewMethod" />
|
||||
<result column="is_repeat" jdbcType="TINYINT" property="isRepeat" />
|
||||
<result column="dept_id" jdbcType="BIGINT" property="deptId" />
|
||||
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
||||
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
||||
<result column="enabled" jdbcType="BOOLEAN" property="enabled" />
|
||||
<result column="version" jdbcType="BIGINT" property="version" />
|
||||
<result column="del_state" jdbcType="BOOLEAN" property="delState" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="search_num" jdbcType="VARCHAR" property="searchNum" />
|
||||
<result column="level" jdbcType="INTEGER" property="level" />
|
||||
<result column="search_index" jdbcType="TINYINT" property="searchIndex" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, pid, `name`, contact, phone, `number`, is_inspection, dispatch_method, review_method,
|
||||
is_repeat, dept_id, start_time, end_time, enabled, version, del_state, create_by,
|
||||
create_time, update_by, update_time, search_num, `level`, search_index
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.chushang.inspection.project.mapper.WrkAuditMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chushang.inspection.project.po.WrkAudit">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table wrk_audit-->
|
||||
<id column="audit_id" jdbcType="BIGINT" property="auditId" />
|
||||
<result column="third_id" jdbcType="BIGINT" property="thirdId" />
|
||||
<result column="audit_status" jdbcType="SMALLINT" property="auditStatus" />
|
||||
<result column="third_type" jdbcType="SMALLINT" property="thirdType" />
|
||||
<result column="audit_time" jdbcType="TIMESTAMP" property="auditTime" />
|
||||
<result column="audit_user_id" jdbcType="BIGINT" property="auditUserId" />
|
||||
<result column="audit_name" jdbcType="VARCHAR" property="auditName" />
|
||||
<result column="sub_audit_user_id" jdbcType="BIGINT" property="subAuditUserId" />
|
||||
<result column="sub_audit_name" jdbcType="VARCHAR" property="subAuditName" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="version" jdbcType="BIGINT" property="version" />
|
||||
<result column="del_state" jdbcType="BOOLEAN" property="delState" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
audit_id, third_id, audit_status, third_type, audit_time, audit_user_id, audit_name,
|
||||
sub_audit_user_id, sub_audit_name, remark, version, del_state, create_by, create_time,
|
||||
update_by, update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.chushang.inspection.work.mapper.WrkIcbcJsMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chushang.inspection.work.po.WrkIcbcJs">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table wrk_icbc_js-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="wrk_id" jdbcType="BIGINT" property="wrkId" />
|
||||
<result column="terminal_id" jdbcType="BIGINT" property="terminalId" />
|
||||
<result column="store_id" jdbcType="BIGINT" property="storeId" />
|
||||
<result column="trans_code" jdbcType="VARCHAR" property="transCode" />
|
||||
<result column="mer_id" jdbcType="VARCHAR" property="merId" />
|
||||
<result column="mer_name" jdbcType="VARCHAR" property="merName" />
|
||||
<result column="term_id" jdbcType="VARCHAR" property="termId" />
|
||||
<result column="start_date" jdbcType="DATE" property="startDate" />
|
||||
<result column="order_no" jdbcType="VARCHAR" property="orderNo" />
|
||||
<result column="order_type" jdbcType="VARCHAR" property="orderType" />
|
||||
<result column="link_name" jdbcType="VARCHAR" property="linkName" />
|
||||
<result column="contact_way" jdbcType="VARCHAR" property="contactWay" />
|
||||
<result column="mer_address" jdbcType="VARCHAR" property="merAddress" />
|
||||
<result column="device_type" jdbcType="VARCHAR" property="deviceType" />
|
||||
<result column="device_no" jdbcType="VARCHAR" property="deviceNo" />
|
||||
<result column="note_msg" jdbcType="VARCHAR" property="noteMsg" />
|
||||
<result column="agent_id" jdbcType="VARCHAR" property="agentId" />
|
||||
<result column="req_date" jdbcType="DATE" property="reqDate" />
|
||||
<result column="req_time" jdbcType="TIME" property="reqTime" />
|
||||
<result column="order_status" jdbcType="VARCHAR" property="orderStatus" />
|
||||
<result column="file_path" jdbcType="VARCHAR" property="filePath" />
|
||||
<result column="desc_info" jdbcType="VARCHAR" property="descInfo" />
|
||||
<result column="area" jdbcType="VARCHAR" property="area" />
|
||||
<result column="status" jdbcType="TINYINT" property="status" />
|
||||
<result column="mer_type" jdbcType="VARCHAR" property="merType" />
|
||||
<result column="comp_date" jdbcType="DATE" property="compDate" />
|
||||
<result column="comp_time" jdbcType="TIME" property="compTime" />
|
||||
<result column="resp_mssg" jdbcType="VARCHAR" property="respMssg" />
|
||||
<result column="is_bank" jdbcType="BOOLEAN" property="isBank" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, wrk_id, terminal_id, store_id, trans_code, mer_id, mer_name, term_id, start_date,
|
||||
order_no, order_type, link_name, contact_way, mer_address, device_type, device_no,
|
||||
note_msg, agent_id, req_date, req_time, order_status, file_path, desc_info, area,
|
||||
`status`, mer_type, comp_date, comp_time, resp_mssg, is_bank
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.chushang.inspection.work.mapper.WrkImgMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chushang.inspection.work.po.WrkImg">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table wrk_img-->
|
||||
<id column="img_id" jdbcType="BIGINT" property="imgId" />
|
||||
<result column="wrk_id" jdbcType="BIGINT" property="wrkId" />
|
||||
<result column="img_type" jdbcType="TINYINT" property="imgType" />
|
||||
<result column="real_path" jdbcType="VARCHAR" property="realPath" />
|
||||
<result column="fid" jdbcType="VARCHAR" property="fid" />
|
||||
<result column="size" jdbcType="BIGINT" property="size" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="del_state" jdbcType="BOOLEAN" property="delState" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="version" jdbcType="BIGINT" property="version" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="dept_id" jdbcType="BIGINT" property="deptId" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
img_id, wrk_id, img_type, real_path, fid, `size`, create_by, del_state, create_time,
|
||||
update_time, version, update_by, dept_id
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.chushang.inspection.work.mapper.WrkInfoAuditMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chushang.inspection.work.po.WrkInfoAudit">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table wrk_info_audit-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="wrk_id" jdbcType="BIGINT" property="wrkId" />
|
||||
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||
<result column="user_name" jdbcType="VARCHAR" property="userName" />
|
||||
<result column="audit_time" jdbcType="TIMESTAMP" property="auditTime" />
|
||||
<result column="audit_state" jdbcType="TINYINT" property="auditState" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="is_record" jdbcType="TINYINT" property="isRecord" />
|
||||
<result column="dept_id" jdbcType="BIGINT" property="deptId" />
|
||||
<result column="version" jdbcType="BIGINT" property="version" />
|
||||
<result column="del_state" jdbcType="BOOLEAN" property="delState" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, wrk_id, user_id, user_name, audit_time, audit_state, remark, is_record, dept_id,
|
||||
version, del_state, create_by, create_time, update_by, update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -14,6 +14,7 @@
|
|||
i.end_time AS endTime,
|
||||
i.create_time AS createTime,
|
||||
i.create_by AS createBy,
|
||||
i.register_time AS registerTime,
|
||||
isr.store_id AS storeId,
|
||||
isr.store_no AS storeName,
|
||||
isr.store_name AS storeNo,
|
||||
|
|
|
|||
|
|
@ -1,39 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.chushang.inspection.work.mapper.WrkInfoPhoneMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chushang.inspection.work.po.WrkInfoPhone">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table wrk_info_phone-->
|
||||
<id column="wrk_id" jdbcType="BIGINT" property="wrkId" />
|
||||
<result column="wrk_no" jdbcType="VARCHAR" property="wrkNo" />
|
||||
<result column="store_id" jdbcType="BIGINT" property="storeId" />
|
||||
<result column="store_no" jdbcType="VARCHAR" property="storeNo" />
|
||||
<result column="terminal_id" jdbcType="BIGINT" property="terminalId" />
|
||||
<result column="terminal_no" jdbcType="VARCHAR" property="terminalNo" />
|
||||
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||
<result column="user_name" jdbcType="VARCHAR" property="userName" />
|
||||
<result column="work_source" jdbcType="TINYINT" property="workSource" />
|
||||
<result column="wrk_result" jdbcType="VARCHAR" property="wrkResult" />
|
||||
<result column="wrk_specific_result" jdbcType="VARCHAR" property="wrkSpecificResult" />
|
||||
<result column="wrk_detail_result" jdbcType="VARCHAR" property="wrkDetailResult" />
|
||||
<result column="task_id" jdbcType="BIGINT" property="taskId" />
|
||||
<result column="lower_task_id" jdbcType="BIGINT" property="lowerTaskId" />
|
||||
<result column="dept_id" jdbcType="BIGINT" property="deptId" />
|
||||
<result column="version" jdbcType="BIGINT" property="version" />
|
||||
<result column="del_state" jdbcType="BOOLEAN" property="delState" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="wrk_status" jdbcType="SMALLINT" property="wrkStatus" />
|
||||
<result column="dispose_time" jdbcType="TIMESTAMP" property="disposeTime" />
|
||||
<result column="terminal_type" jdbcType="SMALLINT" property="terminalType" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
wrk_id, wrk_no, store_id, store_no, terminal_id, terminal_no, user_id, user_name,
|
||||
work_source, wrk_result, wrk_specific_result, wrk_detail_result, task_id, lower_task_id,
|
||||
dept_id, version, del_state, create_by, create_time, update_by, update_time, wrk_status,
|
||||
dispose_time, terminal_type
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.chushang.inspection.work.mapper.WrkInfoStoreRecordMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chushang.inspection.work.po.WrkInfoStoreRecord">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table wrk_info_store_record-->
|
||||
<id column="wrk_id" jdbcType="BIGINT" property="wrkId" />
|
||||
<result column="wrk_no" jdbcType="BIGINT" property="wrkNo" />
|
||||
<result column="dept_id" jdbcType="BIGINT" property="deptId" />
|
||||
<result column="task_id" jdbcType="BIGINT" property="taskId" />
|
||||
<result column="lower_task_id" jdbcType="BIGINT" property="lowerTaskId" />
|
||||
<result column="task_name" jdbcType="VARCHAR" property="taskName" />
|
||||
<result column="lower_task_name" jdbcType="VARCHAR" property="lowerTaskName" />
|
||||
<result column="service_result" jdbcType="TINYINT" property="serviceResult" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
||||
<result column="store_id" jdbcType="BIGINT" property="storeId" />
|
||||
<result column="store_status" jdbcType="TINYINT" property="storeStatus" />
|
||||
<result column="store_no" jdbcType="VARCHAR" property="storeNo" />
|
||||
<result column="store_name" jdbcType="VARCHAR" property="storeName" />
|
||||
<result column="store_contact" jdbcType="VARCHAR" property="storeContact" />
|
||||
<result column="store_phone" jdbcType="VARCHAR" property="storePhone" />
|
||||
<result column="store_address" jdbcType="VARCHAR" property="storeAddress" />
|
||||
<result column="special_num" jdbcType="VARCHAR" property="specialNum" />
|
||||
<result column="shop_name" jdbcType="VARCHAR" property="shopName" />
|
||||
<result column="store_type" jdbcType="TINYINT" property="storeType" />
|
||||
<result column="products" jdbcType="VARCHAR" property="products" />
|
||||
<result column="tip_tool" jdbcType="VARCHAR" property="tipTool" />
|
||||
<result column="admin_id" jdbcType="VARCHAR" property="adminId" />
|
||||
<result column="ins_fre" jdbcType="TINYINT" property="insFre" />
|
||||
<result column="register_address" jdbcType="VARCHAR" property="registerAddress" />
|
||||
<result column="legal_name" jdbcType="VARCHAR" property="legalName" />
|
||||
<result column="geographic_location" jdbcType="VARCHAR" property="geographicLocation" />
|
||||
<result column="location_address" jdbcType="VARCHAR" property="locationAddress" />
|
||||
<result column="work_location" jdbcType="VARCHAR" property="workLocation" />
|
||||
<result column="work_adderss" jdbcType="VARCHAR" property="workAdderss" />
|
||||
<result column="deviation" jdbcType="BIGINT" property="deviation" />
|
||||
<result column="precode_encoding" jdbcType="VARCHAR" property="precodeEncoding" />
|
||||
<result column="version" jdbcType="BIGINT" property="version" />
|
||||
<result column="del_state" jdbcType="BOOLEAN" property="delState" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
wrk_id, wrk_no, dept_id, task_id, lower_task_id, task_name, lower_task_name, service_result,
|
||||
remark, end_time, store_id, store_status, store_no, store_name, store_contact, store_phone,
|
||||
store_address, special_num, shop_name, store_type, products, tip_tool, admin_id,
|
||||
ins_fre, register_address, legal_name, geographic_location, location_address, work_location,
|
||||
work_adderss, deviation, precode_encoding, version, del_state, create_by, create_time,
|
||||
update_by, update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.chushang.inspection.work.mapper.WrkInfoTerminalRecordMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chushang.inspection.work.po.WrkInfoTerminalRecord">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table wrk_info_terminal_record-->
|
||||
<id column="wrk_id" jdbcType="BIGINT" property="wrkId" />
|
||||
<result column="dept_id" jdbcType="BIGINT" property="deptId" />
|
||||
<result column="wrk_no" jdbcType="BIGINT" property="wrkNo" />
|
||||
<result column="task_id" jdbcType="BIGINT" property="taskId" />
|
||||
<result column="lower_task_id" jdbcType="BIGINT" property="lowerTaskId" />
|
||||
<result column="task_name" jdbcType="VARCHAR" property="taskName" />
|
||||
<result column="lower_task_name" jdbcType="VARCHAR" property="lowerTaskName" />
|
||||
<result column="service_result" jdbcType="TINYINT" property="serviceResult" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
||||
<result column="terminal_id" jdbcType="BIGINT" property="terminalId" />
|
||||
<result column="terminal_sn" jdbcType="VARCHAR" property="terminalSn" />
|
||||
<result column="terminal_type" jdbcType="TINYINT" property="terminalType" />
|
||||
<result column="terminal_model" jdbcType="VARCHAR" property="terminalModel" />
|
||||
<result column="terminal_no" jdbcType="VARCHAR" property="terminalNo" />
|
||||
<result column="terminal_source" jdbcType="TINYINT" property="terminalSource" />
|
||||
<result column="terminal_address" jdbcType="VARCHAR" property="terminalAddress" />
|
||||
<result column="terminal_version" jdbcType="VARCHAR" property="terminalVersion" />
|
||||
<result column="terminal_property" jdbcType="TINYINT" property="terminalProperty" />
|
||||
<result column="occupy" jdbcType="BOOLEAN" property="occupy" />
|
||||
<result column="terminal_status" jdbcType="TINYINT" property="terminalStatus" />
|
||||
<result column="version" jdbcType="BIGINT" property="version" />
|
||||
<result column="del_state" jdbcType="BOOLEAN" property="delState" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
wrk_id, dept_id, wrk_no, task_id, lower_task_id, task_name, lower_task_name, service_result,
|
||||
remark, end_time, terminal_id, terminal_sn, terminal_type, terminal_model, terminal_no,
|
||||
terminal_source, terminal_address, terminal_version, terminal_property, occupy, terminal_status,
|
||||
version, del_state, create_by, create_time, update_by, update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.chushang.inspection.project.mapper.WrkProjectMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chushang.inspection.project.po.WrkProject">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table wrk_project-->
|
||||
<id column="project_id" jdbcType="BIGINT" property="projectId" />
|
||||
<result column="project_name" jdbcType="VARCHAR" property="projectName" />
|
||||
<result column="project_concat" jdbcType="VARCHAR" property="projectConcat" />
|
||||
<result column="project_phone" jdbcType="VARCHAR" property="projectPhone" />
|
||||
<result column="dept_id" jdbcType="BIGINT" property="deptId" />
|
||||
<result column="audit_status" jdbcType="SMALLINT" property="auditStatus" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="version" jdbcType="BIGINT" property="version" />
|
||||
<result column="del_state" jdbcType="BOOLEAN" property="delState" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
project_id, project_name, project_concat, project_phone, dept_id, audit_status, remark,
|
||||
version, del_state, create_by, create_time, update_by, update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.chushang.inspection.project.mapper.WrkProjectPaymentMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chushang.inspection.project.po.WrkProjectPayment">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table wrk_project_payment-->
|
||||
<result column="payment_id" jdbcType="BIGINT" property="paymentId" />
|
||||
<result column="project_id" jdbcType="BIGINT" property="projectId" />
|
||||
<result column="contracty_id" jdbcType="BIGINT" property="contractyId" />
|
||||
<result column="project_name" jdbcType="VARCHAR" property="projectName" />
|
||||
<result column="dept_id" jdbcType="BIGINT" property="deptId" />
|
||||
<result column="payment_amount" jdbcType="DECIMAL" property="paymentAmount" />
|
||||
<result column="payment_receipt" jdbcType="VARCHAR" property="paymentReceipt" />
|
||||
<result column="payment_date" jdbcType="VARCHAR" property="paymentDate" />
|
||||
<result column="payment_month" jdbcType="VARCHAR" property="paymentMonth" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="version" jdbcType="BIGINT" property="version" />
|
||||
<result column="del_state" jdbcType="BOOLEAN" property="delState" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
payment_id, project_id, contracty_id, project_name, dept_id, payment_amount, payment_receipt,
|
||||
payment_date, payment_month, remark, version, del_state, create_by, create_time,
|
||||
update_by, update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
Binary file not shown.
|
|
@ -1,5 +1,6 @@
|
|||
import com.chushang.InspectionApplication;
|
||||
import com.chushang.inspection.ins.GeneratedIns;
|
||||
import com.chushang.inspection.ins.TemplateService;
|
||||
import com.chushang.inspection.work.service.WrkInfoService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.Test;
|
||||
|
|
@ -8,6 +9,8 @@ import org.springframework.boot.test.context.SpringBootTest;
|
|||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @auther: zhao
|
||||
|
|
@ -18,15 +21,20 @@ import javax.annotation.Resource;
|
|||
@SpringBootTest(classes = InspectionApplication.class)
|
||||
public class GenInsTest {
|
||||
|
||||
@Resource
|
||||
GeneratedIns generatedIns;
|
||||
@Resource
|
||||
WrkInfoService wrkInfoService;
|
||||
@Resource
|
||||
TemplateService templateService;
|
||||
|
||||
@Test
|
||||
public void genTest(){
|
||||
|
||||
// generatedIns.generated();
|
||||
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("1", "1");
|
||||
data.put("2", "2");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue