1. 工单相关
This commit is contained in:
parent
f54159e492
commit
1d73036a74
|
|
@ -42,6 +42,8 @@ public class WrapperUtils {
|
||||||
if (ObjectUtil.isEmpty(value)) {
|
if (ObjectUtil.isEmpty(value)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// 检查 值是否包含关键字
|
||||||
|
SqlUtil.filterKeyword(String.valueOf(value));
|
||||||
String name = condition.name();
|
String name = condition.name();
|
||||||
String tableName = condition.tableName();
|
String tableName = condition.tableName();
|
||||||
String[] split = name.split(",");
|
String[] split = name.split(",");
|
||||||
|
|
@ -293,15 +295,4 @@ public class WrapperUtils {
|
||||||
}
|
}
|
||||||
return queryWrapper.lambda();
|
return queryWrapper.lambda();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
StringBuilder s = new StringBuilder();
|
|
||||||
s.append("sss")
|
|
||||||
.append("(")
|
|
||||||
.append(",")
|
|
||||||
.append(")")
|
|
||||||
.append(" AND ");
|
|
||||||
s.delete(s.length() - 4, s.length());
|
|
||||||
System.out.println(s.toString());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.chushang.inspection.terminal.po;
|
package com.chushang.inspection.terminal.po;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
|
@ -57,6 +58,12 @@ public class FiveStore extends BaseEntity {
|
||||||
@TableField(value = "first_level_branch")
|
@TableField(value = "first_level_branch")
|
||||||
private Long firstLevelBranch;
|
private Long firstLevelBranch;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 一级分行名称
|
||||||
|
*/
|
||||||
|
@TableField(value = "first_level_branch_name")
|
||||||
|
private String firstLevelBranchName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 二级分行
|
* 二级分行
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,207 @@
|
||||||
|
package com.chushang.inspection.work.dto;
|
||||||
|
|
||||||
|
import com.chushang.inspection.work.enums.BankBranchesEnum;
|
||||||
|
import com.chushang.inspection.work.enums.TerminalTypeOperation;
|
||||||
|
import com.chushang.inspection.work.po.WrkIcbcJs;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class DispatchDTO implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private Long terminalId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门id
|
||||||
|
*/
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户id
|
||||||
|
*/
|
||||||
|
private Long storeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务id
|
||||||
|
*/
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下级任务id
|
||||||
|
*/
|
||||||
|
private Long lowerTaskId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户编号
|
||||||
|
*/
|
||||||
|
private String storeNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户名称
|
||||||
|
*/
|
||||||
|
private String storeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户联系人
|
||||||
|
*/
|
||||||
|
private String storeContact;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户联系电话
|
||||||
|
*/
|
||||||
|
private String storePhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户地址
|
||||||
|
*/
|
||||||
|
private String storeAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户特殊编号
|
||||||
|
*/
|
||||||
|
private String specialNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店名称
|
||||||
|
*/
|
||||||
|
private String shopName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 建档日期
|
||||||
|
*/
|
||||||
|
private LocalDate registerTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户类型
|
||||||
|
*/
|
||||||
|
private Integer storeType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 现有其他收单产品
|
||||||
|
*/
|
||||||
|
private String products;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户提示工具
|
||||||
|
*/
|
||||||
|
private String tipTool;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作员编号
|
||||||
|
*/
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检频次
|
||||||
|
*/
|
||||||
|
private Integer insFre;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户经理
|
||||||
|
*/
|
||||||
|
private String accountManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经理电话
|
||||||
|
*/
|
||||||
|
private String accountPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册地址
|
||||||
|
*/
|
||||||
|
private String registerAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法人/负责人
|
||||||
|
*/
|
||||||
|
private String legalName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端sn号
|
||||||
|
*/
|
||||||
|
private String terminalSn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端编号
|
||||||
|
*/
|
||||||
|
private String terminalNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端类型
|
||||||
|
*/
|
||||||
|
private Integer terminalType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端型号
|
||||||
|
*/
|
||||||
|
private String terminalModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端版本号
|
||||||
|
*/
|
||||||
|
private String terminalVersion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端地址
|
||||||
|
*/
|
||||||
|
private String terminalAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端来源
|
||||||
|
*/
|
||||||
|
private Integer terminalSource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地理位置信息
|
||||||
|
*/
|
||||||
|
private String geographicLocation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 偏差(直线距离 米)
|
||||||
|
*/
|
||||||
|
private Long deviation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
protected String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建日期
|
||||||
|
*/
|
||||||
|
protected LocalDateTime createTime;
|
||||||
|
|
||||||
|
public DispatchDTO dispatch(WrkIcbcJs entity) {
|
||||||
|
terminalId = entity.getTerminalId();
|
||||||
|
// 此处应当为 江苏工行的部门id
|
||||||
|
deptId = 200L;
|
||||||
|
taskId = 1701151817643495425L;
|
||||||
|
storeId = entity.getStoreId();
|
||||||
|
Long lowerTaskId = BankBranchesEnum.getByCode(entity.getArea());
|
||||||
|
this.lowerTaskId = lowerTaskId == null ? this.taskId : lowerTaskId;
|
||||||
|
storeNo = entity.getMerId();
|
||||||
|
storeName = entity.getMerName();
|
||||||
|
storeContact = entity.getLinkName();
|
||||||
|
storePhone = entity.getContactWay();
|
||||||
|
storeAddress = entity.getMerAddress();
|
||||||
|
createBy = "zhuguihua";
|
||||||
|
createTime = LocalDateTime.now();
|
||||||
|
terminalAddress = entity.getMerAddress();
|
||||||
|
terminalNo = entity.getTermId();
|
||||||
|
terminalSn = entity.getDeviceNo();
|
||||||
|
terminalType = TerminalTypeOperation.valueOfCode(entity.getDeviceType());
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
package com.chushang.inspection.work.enums;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO 此处需要改下 对应的本级任务id
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum BankBranchesEnum {
|
||||||
|
|
||||||
|
NANJING_BRANCH("4301", 82582240034336768L),
|
||||||
|
SUZHOU_BRANCH("1102", 75464095280726016L),
|
||||||
|
WUXI_BRANCH("1103", 1712316534449692673L),
|
||||||
|
ZHENJIANG_BRANCH("1104", 130057876893859840L),
|
||||||
|
CHANGZHOU_BRANCH("1105", 130058354490892288L),
|
||||||
|
XUZHOU_BRANCH("1106", 130058663179059200L),
|
||||||
|
LIANYUNGANG_BRANCH("1107", 104793956746788864L),
|
||||||
|
YANGZHOU_BRANCH("1108", 130041300719325184L),
|
||||||
|
YANCheng_BRANCH("1109", 130058775791927296L),
|
||||||
|
HUAIAN_BRANCH("1110", 130058895585443840L),
|
||||||
|
NANTONG_BRANCH("1111", 130058943010463744L),
|
||||||
|
TAIZHOU_BRANCH("1115", 1706151311862829058L),
|
||||||
|
SUQIAN_BRANCH("1116", 130059053442293760L);
|
||||||
|
|
||||||
|
|
||||||
|
private final String code;
|
||||||
|
private final long lowerTaskId;
|
||||||
|
|
||||||
|
public static Long getByCode(String code) {
|
||||||
|
if (code == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (BankBranchesEnum branch : BankBranchesEnum.values()) {
|
||||||
|
if (branch.code.equals(code)) {
|
||||||
|
return branch.lowerTaskId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getByLowerTaskId(Long lowerTaskId) {
|
||||||
|
for (BankBranchesEnum branch : BankBranchesEnum.values()) {
|
||||||
|
if (branch.lowerTaskId == lowerTaskId) {
|
||||||
|
return branch.code;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
package com.chushang.inspection.work.enums;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum TerminalTypeOperation {
|
||||||
|
NEW_INSTALLATION("001", 4),
|
||||||
|
INSPECTION("002", 5),
|
||||||
|
REMOVAL("003", 3),
|
||||||
|
REPLACEMENT("004", 2);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private final String code;
|
||||||
|
private final Integer terminalType;
|
||||||
|
|
||||||
|
|
||||||
|
// 通过编号获取枚举值
|
||||||
|
public static Integer valueOfCode(String code) {
|
||||||
|
if (StrUtil.isEmpty(code)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (TerminalTypeOperation operation : TerminalTypeOperation.values()) {
|
||||||
|
if (operation.code.equals(code)) {
|
||||||
|
return operation.terminalType;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 通过编号获取枚举值
|
||||||
|
public static String valueOfTerminalType(Integer workType) {
|
||||||
|
if (workType == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (TerminalTypeOperation operation : TerminalTypeOperation.values()) {
|
||||||
|
if (operation.terminalType.equals(workType)) {
|
||||||
|
return operation.code;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.chushang.inspection.work.enums;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum WorkTypeOperation {
|
||||||
|
NEW_INSTALLATION("001", 4),
|
||||||
|
INSPECTION("002", 5),
|
||||||
|
REMOVAL("003", 3),
|
||||||
|
REPLACEMENT("004", 2),
|
||||||
|
INEFFICIENT_ACTIVATION("005", 35),
|
||||||
|
COMPLIANCE_INSPECTION("006", 36),
|
||||||
|
ROUTINE_MAINTENANCE("007", 37),
|
||||||
|
NEW_HOUSEHOLDS("008", 16);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private final String code;
|
||||||
|
private final Integer workType;
|
||||||
|
|
||||||
|
|
||||||
|
// 通过编号获取枚举值
|
||||||
|
public static Integer valueOfCode(String code) {
|
||||||
|
if (StrUtil.isEmpty(code)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (WorkTypeOperation operation : WorkTypeOperation.values()) {
|
||||||
|
if (operation.code.equals(code)) {
|
||||||
|
return operation.workType;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Set<Integer> workTypes() {
|
||||||
|
return Arrays.stream(WorkTypeOperation.values()).map(typeOperation -> typeOperation.workType)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 通过编号获取枚举值
|
||||||
|
public static String valueOfWorkType(Integer workType) {
|
||||||
|
if (workType == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (WorkTypeOperation operation : WorkTypeOperation.values()) {
|
||||||
|
if (operation.workType.equals(workType)) {
|
||||||
|
return operation.code;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,206 @@
|
||||||
|
package com.chushang.inspection.work.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.mybatis.base.BaseEntity;
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/28 15:38
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 江苏工行数据推送
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper=true)
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName(value = "wrk_icbc_js")
|
||||||
|
public class WrkIcbcJs extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单id
|
||||||
|
*/
|
||||||
|
@TableField(value = "wrk_id")
|
||||||
|
private Long wrkId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端id
|
||||||
|
*/
|
||||||
|
@TableField(value = "terminal_id")
|
||||||
|
private Long terminalId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户id
|
||||||
|
*/
|
||||||
|
@TableField(value = "store_id")
|
||||||
|
private Long storeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 交易码
|
||||||
|
*/
|
||||||
|
@TableField(value = "trans_code")
|
||||||
|
private String transCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户 id
|
||||||
|
*/
|
||||||
|
@TableField(value = "mer_id")
|
||||||
|
private String merId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户名
|
||||||
|
*/
|
||||||
|
@TableField(value = "mer_name")
|
||||||
|
private String merName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端编号
|
||||||
|
*/
|
||||||
|
@TableField(value = "term_id")
|
||||||
|
private String termId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单创建日期(yyyyMMdd)
|
||||||
|
*/
|
||||||
|
@TableField(value = "start_date")
|
||||||
|
private Date startDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单编号
|
||||||
|
*/
|
||||||
|
@TableField(value = "order_no")
|
||||||
|
private String orderNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单类型
|
||||||
|
*/
|
||||||
|
@TableField(value = "order_type")
|
||||||
|
private String orderType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系人
|
||||||
|
*/
|
||||||
|
@TableField(value = "link_name")
|
||||||
|
private String linkName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系方式
|
||||||
|
*/
|
||||||
|
@TableField(value = "contact_way")
|
||||||
|
private String contactWay;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户地址
|
||||||
|
*/
|
||||||
|
@TableField(value = "mer_address")
|
||||||
|
private String merAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备类型
|
||||||
|
*/
|
||||||
|
@TableField(value = "device_type")
|
||||||
|
private String deviceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备序列号
|
||||||
|
*/
|
||||||
|
@TableField(value = "device_no")
|
||||||
|
private String deviceNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注信息
|
||||||
|
*/
|
||||||
|
@TableField(value = "note_msg")
|
||||||
|
private String noteMsg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务商编号
|
||||||
|
*/
|
||||||
|
@TableField(value = "agent_id")
|
||||||
|
private String agentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求日期
|
||||||
|
*/
|
||||||
|
@TableField(value = "req_date")
|
||||||
|
private Date reqDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "req_time")
|
||||||
|
private Date reqTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单状态
|
||||||
|
*/
|
||||||
|
@TableField(value = "order_status")
|
||||||
|
private String orderStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传文件路径
|
||||||
|
*/
|
||||||
|
@TableField(value = "file_path")
|
||||||
|
private String filePath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述信息
|
||||||
|
*/
|
||||||
|
@TableField(value = "desc_info")
|
||||||
|
private String descInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分行地区号
|
||||||
|
*/
|
||||||
|
@TableField(value = "area")
|
||||||
|
private String area;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(1 下发 2 回送成功 3 回送失败)
|
||||||
|
*/
|
||||||
|
@TableField(value = "`status`")
|
||||||
|
private Byte status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户类型
|
||||||
|
*/
|
||||||
|
@TableField(value = "mer_type")
|
||||||
|
private String merType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求日期
|
||||||
|
*/
|
||||||
|
@TableField(value = "comp_date")
|
||||||
|
private Date compDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "comp_time")
|
||||||
|
private Date compTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 异常消息
|
||||||
|
*/
|
||||||
|
@TableField(value = "resp_mssg")
|
||||||
|
private String respMssg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否为银行派单(1 是 2否)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_bank")
|
||||||
|
private Boolean isBank;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
package com.chushang.inspection.work.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.mybatis.base.BaseEntity;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/28 11:25
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 工单图片
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper=true)
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName(value = "wrk_img")
|
||||||
|
public class WrkImg extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@TableId(value = "img_id", type = IdType.ASSIGN_ID)
|
||||||
|
private Long imgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单id
|
||||||
|
*/
|
||||||
|
@TableField(value = "wrk_id")
|
||||||
|
private Long wrkId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片类型
|
||||||
|
*/
|
||||||
|
@TableField(value = "img_type")
|
||||||
|
private Integer imgType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 真实请求路径
|
||||||
|
*/
|
||||||
|
@TableField(value = "real_path")
|
||||||
|
private String realPath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件fid 值
|
||||||
|
*/
|
||||||
|
@TableField(value = "fid")
|
||||||
|
private String fid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件大小
|
||||||
|
*/
|
||||||
|
@TableField(value = "`size`")
|
||||||
|
private Long size;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属部门
|
||||||
|
*/
|
||||||
|
@TableField(value = "dept_id")
|
||||||
|
private Long deptId;
|
||||||
|
}
|
||||||
|
|
@ -8,10 +8,8 @@ import com.chushang.common.mybatis.base.BaseEntity;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
import lombok.*;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @auther: zhao
|
* @auther: zhao
|
||||||
|
|
@ -26,6 +24,7 @@ import lombok.NoArgsConstructor;
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@TableName(value = "wrk_info")
|
@TableName(value = "wrk_info")
|
||||||
|
@Builder
|
||||||
public class WrkInfo extends BaseEntity {
|
public class WrkInfo extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
|
|
@ -78,13 +77,13 @@ public class WrkInfo extends BaseEntity {
|
||||||
* 工单类型
|
* 工单类型
|
||||||
*/
|
*/
|
||||||
@TableField(value = "work_type")
|
@TableField(value = "work_type")
|
||||||
private Short workType;
|
private Integer workType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 巡检方式
|
* 巡检方式
|
||||||
*/
|
*/
|
||||||
@TableField(value = "work_method")
|
@TableField(value = "work_method")
|
||||||
private Short workMethod;
|
private Integer workMethod;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工单优先级
|
* 工单优先级
|
||||||
|
|
@ -136,5 +135,4 @@ public class WrkInfo extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "wrk_status")
|
@TableField(value = "wrk_status")
|
||||||
private Integer wrkStatus;
|
private Integer wrkStatus;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,76 @@
|
||||||
|
package com.chushang.inspection.work.query;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.ListUtil;
|
||||||
|
import cn.hutool.core.date.DatePattern;
|
||||||
|
import com.chushang.common.core.text.Convert;
|
||||||
|
import com.chushang.common.dict.utils.DictUtils;
|
||||||
|
import com.chushang.inspection.work.enums.WorkTypeOperation;
|
||||||
|
import com.chushang.inspection.work.po.WrkIcbcJs;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.hibernate.validator.constraints.Range;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class DispatchQuery implements Serializable {
|
||||||
|
|
||||||
|
/** 终端id */
|
||||||
|
private List<Long> terminalIds;
|
||||||
|
|
||||||
|
/** 任务id */
|
||||||
|
@NotNull(message = "必须指定任务")
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
/** 业务员id */
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/** 工单类型 */
|
||||||
|
@NotNull(message = "必须指定工单类型")
|
||||||
|
@Range(min = 1, max = 50, message = "工单类型非法")
|
||||||
|
private Integer workType;
|
||||||
|
|
||||||
|
/** 截至时间 */
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DatePattern.NORM_DATETIME_PATTERN)
|
||||||
|
private LocalDateTime endTime;
|
||||||
|
|
||||||
|
/** 工单优先级 */
|
||||||
|
@Builder.Default
|
||||||
|
private Integer workSort = Convert.toInt(DictUtils.getDictLabel("wrk_priority", "普通工单"));
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
@Size(max = 100, message = "备注不能超过100个字符")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/** 工单来源 */
|
||||||
|
@Range(min = 1, max = 4, message = "工单来源非法")
|
||||||
|
private Integer workSource;
|
||||||
|
|
||||||
|
/** 商户号 */
|
||||||
|
@Builder.Default
|
||||||
|
private List<String> nos = ListUtil.toList();
|
||||||
|
|
||||||
|
/** 终端号 */
|
||||||
|
@Builder.Default
|
||||||
|
private List<String> terminalNos = ListUtil.toList();
|
||||||
|
|
||||||
|
public DispatchQuery dispatchOrder(WrkIcbcJs entity, Long userId) {
|
||||||
|
this.terminalIds = ListUtil.toList(entity.getTerminalId());
|
||||||
|
this.taskId = 1701151817643495425L;
|
||||||
|
this.userId = userId;
|
||||||
|
this.workType = WorkTypeOperation.valueOfCode(entity.getOrderType());
|
||||||
|
this.remark = entity.getNoteMsg();
|
||||||
|
this.workSource = 1;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,109 @@
|
||||||
|
package com.chushang.inspection.work.query;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DatePattern;
|
||||||
|
import com.chushang.common.mybatis.annotation.Condition;
|
||||||
|
import com.chushang.common.mybatis.page.CommonParam;
|
||||||
|
import com.chushang.security.utils.SecurityUtils;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import lombok.*;
|
||||||
|
import org.hibernate.validator.constraints.Range;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import javax.validation.constraints.Null;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class WrkAppQuery extends CommonParam {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
@Builder.Default
|
||||||
|
@JsonIgnore
|
||||||
|
@Condition(name = "user_id", tableName = "i")
|
||||||
|
private Long userId = SecurityUtils.getUserId();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户编号
|
||||||
|
*/
|
||||||
|
@Condition(name = "store_no", tableName = "isr")
|
||||||
|
@Size(max = 64, message = "商户编号不能超过64个字符")
|
||||||
|
private String storeNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务id
|
||||||
|
*/
|
||||||
|
@Condition(name = "task_id", tableName = "i")
|
||||||
|
@NotNull(message = "任务id不能为空")
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单状态
|
||||||
|
*/
|
||||||
|
@NotNull(message = "工单状态不能为空")
|
||||||
|
@Range(min = 1, max = 7, message = "工单状态非法")
|
||||||
|
private Integer wrkStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端sn号
|
||||||
|
*/
|
||||||
|
@Condition(name = "terminal_sn", tableName = "itr")
|
||||||
|
@Size(max = 100, message = "终端sn号不能超过100个字符")
|
||||||
|
private String terminalSn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端编号
|
||||||
|
*/
|
||||||
|
@Condition(name = "terminal_no", tableName = "itr")
|
||||||
|
@Size(max = 30, message = "终端编号不能超过30个字符")
|
||||||
|
private String terminalNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户名称
|
||||||
|
*/
|
||||||
|
@Size(max = 128, message = "商户名称不能超过128个字符")
|
||||||
|
@Condition(name = "store_name", type = Condition.ConditionType.like, tableName = "isr")
|
||||||
|
private String storeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下级任务名称
|
||||||
|
*/
|
||||||
|
@Size(max = 64, message = "下级任务名称不能超过64个字符")
|
||||||
|
@Condition(name = "task_name", type = Condition.ConditionType.like, tableName = "i")
|
||||||
|
private String taskName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店名称
|
||||||
|
*/
|
||||||
|
@Condition(name = "shop_name", type = Condition.ConditionType.like, tableName = "isr")
|
||||||
|
@Size(max = 128, message = "门店名称不能超过128个字符")
|
||||||
|
private String shopName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商戶地址
|
||||||
|
*/
|
||||||
|
@Condition(name = "store_address", type = Condition.ConditionType.like, tableName = "isr")
|
||||||
|
@Size(max = 300, message = "商戶地址不能超过300个字符")
|
||||||
|
private String storeAddress;
|
||||||
|
/**
|
||||||
|
* 处理时间
|
||||||
|
*/
|
||||||
|
@Condition(name = "dispose_time", type = Condition.ConditionType.between, tableName = "i")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DatePattern.NORM_DATETIME_PATTERN)
|
||||||
|
private List<LocalDateTime> disposeTimes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单状态, 当查询 审核通过时, 此处为3,4 拒绝时此处为5,6
|
||||||
|
*/
|
||||||
|
@Condition(name = "wrk_status", type = Condition.ConditionType.in, tableName = "i")
|
||||||
|
@Null(message = "内部流转参数")
|
||||||
|
private List<Integer> wrkStatusList;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
package com.chushang.inspection.work.vo;
|
||||||
|
|
||||||
|
import com.chushang.common.dict.annotation.DictFormat;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class AuditVO implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核人id
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核人名称
|
||||||
|
*/
|
||||||
|
@JsonProperty("userName")
|
||||||
|
private String auditName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核描述
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态
|
||||||
|
*/
|
||||||
|
@DictFormat(dictType = "wrk_status")
|
||||||
|
private String state;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime auditTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单id
|
||||||
|
*/
|
||||||
|
private Long wrkId;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
package com.chushang.inspection.work.vo;
|
||||||
|
|
||||||
|
import com.chushang.inspection.project.vo.DetailsVO;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检单信息
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class InspectionConfigVO implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配置id
|
||||||
|
*/
|
||||||
|
private Long inspectionConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 别名
|
||||||
|
*/
|
||||||
|
private String alias;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模板路径
|
||||||
|
*/
|
||||||
|
private String template;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详细信息
|
||||||
|
*/
|
||||||
|
// @RelationOneToMany(
|
||||||
|
// selfField = "inspectionConfig",
|
||||||
|
// targetField = "inspectionConfig",
|
||||||
|
// targetTable = "inspection_details",
|
||||||
|
// selectColumns = {"id", "inspection_config", "label", "value as configValue"}
|
||||||
|
// )
|
||||||
|
private List<DetailsVO> details;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
package com.chushang.inspection.work.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.chushang.common.dict.annotation.DictFormat;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonAlias;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class WrkImgVO implements Serializable {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@TableId(value = "img_id", type = IdType.ASSIGN_ID)
|
||||||
|
private Long imgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单id
|
||||||
|
*/
|
||||||
|
@TableField(value = "wrk_id")
|
||||||
|
private Long wrkId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片类型
|
||||||
|
*/
|
||||||
|
@DictFormat(dictType = "work_img")
|
||||||
|
private Integer imgType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 真实请求路径
|
||||||
|
*/
|
||||||
|
@TableField(value = "real_path")
|
||||||
|
private String realPath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件fid 值
|
||||||
|
*/
|
||||||
|
@TableField(value = "fid")
|
||||||
|
private String fid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件大小
|
||||||
|
*/
|
||||||
|
@TableField(value = "`size`")
|
||||||
|
private Long size;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
package com.chushang.inspection.work.vo;
|
||||||
|
|
||||||
|
import com.chushang.inspection.terminal.vo.FiveStoreVO;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/28 10:30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WrkInfoDetailsVO implements java.io.Serializable{
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
/**
|
||||||
|
* 工单信息
|
||||||
|
*/
|
||||||
|
private WrkInfoVO wrkInfo;
|
||||||
|
/**
|
||||||
|
* 工单商户
|
||||||
|
*/
|
||||||
|
private WrkInfoStoreVO infoStore;
|
||||||
|
/**
|
||||||
|
* 工单终端
|
||||||
|
*/
|
||||||
|
private WrkInfoTerminalVO infoTerminal;
|
||||||
|
/**
|
||||||
|
* 工单图片
|
||||||
|
*/
|
||||||
|
private List<WrkImgVO> infoImg;
|
||||||
|
/**
|
||||||
|
* 工单审核
|
||||||
|
*/
|
||||||
|
private List<AuditVO> infoAudit;
|
||||||
|
/**
|
||||||
|
* 工单巡检单信息
|
||||||
|
*/
|
||||||
|
private List<InspectionConfigVO> inspections;
|
||||||
|
/**
|
||||||
|
* 五统一商户明细(内蒙古建行随付贷)
|
||||||
|
*/
|
||||||
|
private FiveStoreVO fiveStoreDetails;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
package com.chushang.inspection.work.vo;
|
||||||
|
|
||||||
|
import com.chushang.common.dict.annotation.DictFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/28 10:30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WrkInfoStoreVO implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
private Long storeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店状态
|
||||||
|
*/
|
||||||
|
@DictFormat(dictType = "store_status")
|
||||||
|
private Integer storeStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户编号
|
||||||
|
*/
|
||||||
|
private String storeNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户名称
|
||||||
|
*/
|
||||||
|
private String storeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户联系人
|
||||||
|
*/
|
||||||
|
private String storeContact;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户联系电话
|
||||||
|
*/
|
||||||
|
private String storePhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户地址
|
||||||
|
*/
|
||||||
|
private String storeAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户特殊编号
|
||||||
|
*/
|
||||||
|
private String specialNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店名称
|
||||||
|
*/
|
||||||
|
private String shopName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户类型
|
||||||
|
*/
|
||||||
|
@DictFormat(dictType = "store_type")
|
||||||
|
private Integer storeType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 现有其他收单产品
|
||||||
|
*/
|
||||||
|
private String products;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户提示工具
|
||||||
|
*/
|
||||||
|
private String tipTool;
|
||||||
|
/**
|
||||||
|
* 巡检频次
|
||||||
|
*/
|
||||||
|
@DictFormat(dictType = "ins_fre")
|
||||||
|
private Integer insFre;
|
||||||
|
/**
|
||||||
|
* 注册地址
|
||||||
|
*/
|
||||||
|
private String registerAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法人/负责人
|
||||||
|
*/
|
||||||
|
private String legalName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地理位置信息
|
||||||
|
*/
|
||||||
|
private String geographicLocation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地理位置信息地址
|
||||||
|
*/
|
||||||
|
private String locationAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本次巡检位置经纬度
|
||||||
|
*/
|
||||||
|
private String workLocation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本次巡检位置信息(根据经纬度)
|
||||||
|
*/
|
||||||
|
private String workAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 偏差(直线距离 米)
|
||||||
|
*/
|
||||||
|
private Long deviation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预制码编码
|
||||||
|
*/
|
||||||
|
private String preCodeEncoding;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,74 @@
|
||||||
|
package com.chushang.inspection.work.vo;
|
||||||
|
|
||||||
|
import com.chushang.common.dict.annotation.DictFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/28 10:31
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WrkInfoTerminalVO implements Serializable {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端id
|
||||||
|
*/
|
||||||
|
private Long terminalId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端sn号
|
||||||
|
*/
|
||||||
|
private String terminalSn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端类型
|
||||||
|
*/
|
||||||
|
@DictFormat(dictType = "terminal_type")
|
||||||
|
private Integer terminalType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端型号
|
||||||
|
*/
|
||||||
|
private String terminalModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端编号
|
||||||
|
*/
|
||||||
|
private String terminalNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端来源
|
||||||
|
*/
|
||||||
|
@DictFormat(dictType = "terminal_source")
|
||||||
|
private Integer terminalSource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端版地址
|
||||||
|
*/
|
||||||
|
private String terminalAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端版本号
|
||||||
|
*/
|
||||||
|
private String terminalVersion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端产权人
|
||||||
|
*/
|
||||||
|
private Integer terminalProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否占用
|
||||||
|
*/
|
||||||
|
private Integer occupy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端状态
|
||||||
|
*/
|
||||||
|
private Integer terminalStatus;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,137 @@
|
||||||
|
package com.chushang.inspection.work.vo;
|
||||||
|
|
||||||
|
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 lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class WrkInfoVO implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
private Long wrkId;
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
private Long deptId;
|
||||||
|
private String deptName;
|
||||||
|
/**
|
||||||
|
* 总任务id
|
||||||
|
*/
|
||||||
|
private Long taskId;
|
||||||
|
private String taskName;
|
||||||
|
/**
|
||||||
|
* 本级id
|
||||||
|
*/
|
||||||
|
private Long lowerTaskId;
|
||||||
|
private String lowerTaskName;
|
||||||
|
/**
|
||||||
|
* 业务员id
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
/**
|
||||||
|
* 业务员名字
|
||||||
|
*/
|
||||||
|
private String userName;
|
||||||
|
/**
|
||||||
|
* 工单编号
|
||||||
|
*/
|
||||||
|
private Long workNo;
|
||||||
|
/**
|
||||||
|
* 工单类型
|
||||||
|
*/
|
||||||
|
private Integer workType;
|
||||||
|
/**
|
||||||
|
* 巡检方式
|
||||||
|
*/
|
||||||
|
private Integer workMethod;
|
||||||
|
/**
|
||||||
|
* 工单优先级
|
||||||
|
*/
|
||||||
|
private Integer workSort;
|
||||||
|
/**
|
||||||
|
* 工单来源
|
||||||
|
*/
|
||||||
|
private Integer workSource;
|
||||||
|
/**
|
||||||
|
* 业务员处理时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime disposeTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户经理
|
||||||
|
*/
|
||||||
|
private String accountManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经理电话
|
||||||
|
*/
|
||||||
|
private String accountPhone;
|
||||||
|
/**
|
||||||
|
* 服务结果
|
||||||
|
*/
|
||||||
|
@DictFormat(dictType = "service_results")
|
||||||
|
private Integer serviceResult;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime endTime;
|
||||||
|
/**
|
||||||
|
* 工单状态
|
||||||
|
*/
|
||||||
|
private Integer wrkStatus;
|
||||||
|
/**
|
||||||
|
* 门头照片
|
||||||
|
*/
|
||||||
|
private String doorImage;
|
||||||
|
/**
|
||||||
|
* 剩余时间
|
||||||
|
*/
|
||||||
|
private String overtimeTime;
|
||||||
|
/**
|
||||||
|
* 派单时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 派单人
|
||||||
|
*/
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
public String getOvertimeTime() {
|
||||||
|
if (endTime == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
DateTime date = ObjectUtil.isNotEmpty(disposeTime) ? DateUtil.date(disposeTime) : DateUtil.date();
|
||||||
|
|
||||||
|
DateTime time = DateUtil.date(endTime);
|
||||||
|
|
||||||
|
String[] split = DateUtil.formatBetween(date, time).split("小时");
|
||||||
|
|
||||||
|
return StrUtil.format("{}{}小时",
|
||||||
|
DateUtil.between(date, time, DateUnit.HOUR, false) > 0 ? "剩余" : "超时",
|
||||||
|
split.length != 1 ? split[0] : "1");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
package com.chushang.inspection.work.vo;
|
||||||
|
|
||||||
|
import com.chushang.common.dict.annotation.DictFormat;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class WrkListAppVO implements Serializable {
|
||||||
|
|
||||||
|
/** 任务名称 */
|
||||||
|
private String taskName;
|
||||||
|
|
||||||
|
/** 工单id */
|
||||||
|
private Long wrkId;
|
||||||
|
|
||||||
|
/** 终端id */
|
||||||
|
private Long terminalId;
|
||||||
|
|
||||||
|
/** 联系人 */
|
||||||
|
private String storeContact;
|
||||||
|
|
||||||
|
/** 联系电话 */
|
||||||
|
private String storePhone;
|
||||||
|
|
||||||
|
/** 终端地址 */
|
||||||
|
private String terminalAddress;
|
||||||
|
|
||||||
|
/** 商户名称 */
|
||||||
|
private String storeName;
|
||||||
|
|
||||||
|
/** 工单类型 */
|
||||||
|
@DictFormat(dictType = "wrk_type")
|
||||||
|
private Integer workType;
|
||||||
|
|
||||||
|
/** 上次工单处理时间 */
|
||||||
|
private LocalDateTime lastDisposeTime;
|
||||||
|
|
||||||
|
/** 上次工单服务结果 */
|
||||||
|
@DictFormat(dictType = "service_results")
|
||||||
|
private Integer lastServiceResult;
|
||||||
|
|
||||||
|
/** 领取次数 */
|
||||||
|
private Integer numberOfPickups;
|
||||||
|
|
||||||
|
/** 巡检频次 */
|
||||||
|
@DictFormat(dictType = "ins_fre")
|
||||||
|
private Integer insFre;
|
||||||
|
}
|
||||||
|
|
@ -10,12 +10,10 @@ import com.chushang.inspection.terminal.query.TerminalAppQuery;
|
||||||
import com.chushang.inspection.terminal.query.TerminalQuery;
|
import com.chushang.inspection.terminal.query.TerminalQuery;
|
||||||
import com.chushang.inspection.terminal.service.TerminalService;
|
import com.chushang.inspection.terminal.service.TerminalService;
|
||||||
import com.chushang.security.annotation.RequiresPermissions;
|
import com.chushang.security.annotation.RequiresPermissions;
|
||||||
import lombok.extern.java.Log;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端信息表(st_terminal)表控制层
|
* 终端信息表(st_terminal)表控制层
|
||||||
|
|
@ -45,7 +43,6 @@ public class TerminalController {
|
||||||
* 查询终端app
|
* 查询终端app
|
||||||
*
|
*
|
||||||
* @param query 条件
|
* @param query 条件
|
||||||
* TODO 需要查询 st_terminal_ins 表
|
|
||||||
*/
|
*/
|
||||||
@SysLog(value = "终端app", businessType = BusinessType.QUERY)
|
@SysLog(value = "终端app", businessType = BusinessType.QUERY)
|
||||||
@PostMapping("/page/app")
|
@PostMapping("/page/app")
|
||||||
|
|
@ -56,7 +53,6 @@ public class TerminalController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询终端
|
* 查询终端
|
||||||
* TODO 需要查询 st_terminal_ins 表
|
|
||||||
*/
|
*/
|
||||||
@SysLog(value = "终端详情", businessType = BusinessType.QUERY)
|
@SysLog(value = "终端详情", businessType = BusinessType.QUERY)
|
||||||
@GetMapping("/info/{terminalId}")
|
@GetMapping("/info/{terminalId}")
|
||||||
|
|
@ -67,7 +63,6 @@ public class TerminalController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询终端app
|
* 查询终端app
|
||||||
* TODO 需要查询 st_terminal_ins 表
|
|
||||||
*/
|
*/
|
||||||
@SysLog(value = "终端详情app", businessType = BusinessType.QUERY)
|
@SysLog(value = "终端详情app", businessType = BusinessType.QUERY)
|
||||||
@PostMapping("/info/app/{terminalId}")
|
@PostMapping("/info/app/{terminalId}")
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import com.chushang.inspection.terminal.query.TerminalAppQuery;
|
||||||
import com.chushang.inspection.terminal.query.TerminalQuery;
|
import com.chushang.inspection.terminal.query.TerminalQuery;
|
||||||
import com.chushang.inspection.terminal.vo.TerminalVO;
|
import com.chushang.inspection.terminal.vo.TerminalVO;
|
||||||
import com.chushang.inspection.work.po.WrkInfo;
|
import com.chushang.inspection.work.po.WrkInfo;
|
||||||
|
import com.chushang.inspection.work.dto.DispatchDTO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -43,4 +44,6 @@ public interface TerminalService extends IService<Terminal>{
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<WrkInfo> dispatch(DispatchQuery query, int i);
|
List<WrkInfo> dispatch(DispatchQuery query, int i);
|
||||||
|
|
||||||
|
List<DispatchDTO> getStoreByTasKIdOrIds(Long taskId, List<Long> termintalIds, List<String> nos, List<String> terminalNos, int i);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,6 @@ public class FiveStoreServiceImpl extends ServiceImpl<FiveStoreMapper, FiveStore
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void convert(List<FiveStoreVO> listFiveStores){
|
public void convert(List<FiveStoreVO> listFiveStores){
|
||||||
if (CollectionUtil.isNotEmpty(listFiveStores))
|
if (CollectionUtil.isNotEmpty(listFiveStores))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ import com.chushang.inspection.terminal.service.StoreService;
|
||||||
import com.chushang.inspection.terminal.service.TerminalService;
|
import com.chushang.inspection.terminal.service.TerminalService;
|
||||||
import com.chushang.inspection.terminal.vo.TerminalVO;
|
import com.chushang.inspection.terminal.vo.TerminalVO;
|
||||||
import com.chushang.inspection.utils.TaskConfigUtils;
|
import com.chushang.inspection.utils.TaskConfigUtils;
|
||||||
|
import com.chushang.inspection.work.dto.DispatchDTO;
|
||||||
import com.chushang.inspection.work.po.WrkInfo;
|
import com.chushang.inspection.work.po.WrkInfo;
|
||||||
import com.sun.xml.bind.v2.TODO;
|
import com.sun.xml.bind.v2.TODO;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -77,6 +78,11 @@ public class TerminalServiceImpl extends ServiceImpl<TerminalMapper, Terminal> i
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DispatchDTO> getStoreByTasKIdOrIds(Long taskId, List<Long> ids, List<String> nos, List<String> terminalNos, int i) {
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<WrkInfo> dispatch(DispatchQuery query, int i) {
|
public List<WrkInfo> dispatch(DispatchQuery query, int i) {
|
||||||
// TODO 先关联终端和商户查询出来要派单的终端信息 然后通过派单方式走不同的策略拼接wrk_entity实体
|
// TODO 先关联终端和商户查询出来要派单的终端信息 然后通过派单方式走不同的策略拼接wrk_entity实体
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.chushang.inspection.work.controller;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 江苏工行数据推送(wrk_icbc_js)表控制层
|
||||||
|
*
|
||||||
|
* @author xxxxx
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/wrk_icbc_js")
|
||||||
|
public class WrkIcbcJsController {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.chushang.inspection.work.controller;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单图片(wrk_img)表控制层
|
||||||
|
*
|
||||||
|
* @author xxxxx
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/wrk_img")
|
||||||
|
public class WrkImgController {
|
||||||
|
}
|
||||||
|
|
@ -1,20 +1,29 @@
|
||||||
package com.chushang.inspection.work.controller;
|
package com.chushang.inspection.work.controller;
|
||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.collection.ListUtil;
|
import cn.hutool.core.collection.ListUtil;
|
||||||
import cn.hutool.core.lang.Assert;
|
import cn.hutool.core.lang.Assert;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.chushang.common.core.web.AjaxResult;
|
import com.chushang.common.core.web.AjaxResult;
|
||||||
import com.chushang.common.log.annotation.SysLog;
|
import com.chushang.common.log.annotation.SysLog;
|
||||||
import com.chushang.common.log.enums.BusinessType;
|
import com.chushang.common.log.enums.BusinessType;
|
||||||
import com.chushang.inspection.utils.TaskConfigUtils;
|
import com.chushang.inspection.utils.TaskConfigUtils;
|
||||||
|
import com.chushang.inspection.work.query.DispatchQuery;
|
||||||
import com.chushang.inspection.work.query.ReviewedQuery;
|
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.query.WrkInfoQuery;
|
||||||
import com.chushang.inspection.work.service.WrkInfoService;
|
import com.chushang.inspection.work.service.WrkInfoService;
|
||||||
import com.chushang.security.annotation.RequiresPermissions;
|
import com.chushang.security.annotation.RequiresPermissions;
|
||||||
import com.google.common.collect.Lists;
|
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;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.text.NumberFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -22,6 +31,7 @@ import java.util.List;
|
||||||
*
|
*
|
||||||
* @author xxxxx
|
* @author xxxxx
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/wrk/info")
|
@RequestMapping("/wrk/info")
|
||||||
public class WrkInfoController {
|
public class WrkInfoController {
|
||||||
|
|
@ -34,7 +44,7 @@ public class WrkInfoController {
|
||||||
*/
|
*/
|
||||||
@SysLog(value = "派单/领取列表", businessType = BusinessType.QUERY)
|
@SysLog(value = "派单/领取列表", businessType = BusinessType.QUERY)
|
||||||
@GetMapping("/dispatch/page")
|
@GetMapping("/dispatch/page")
|
||||||
// @RequiresPermissions("wrk:dispatch:page")
|
@RequiresPermissions("wrk:dispatch:page")
|
||||||
public AjaxResult queryDispatchPage(@Validated WrkInfoQuery query) {
|
public AjaxResult queryDispatchPage(@Validated WrkInfoQuery query) {
|
||||||
query.setStates(Lists.newArrayList(1, 5, 6, 7));
|
query.setStates(Lists.newArrayList(1, 5, 6, 7));
|
||||||
return AjaxResult.success(wrkInfoService.queryDispatchPage(query));
|
return AjaxResult.success(wrkInfoService.queryDispatchPage(query));
|
||||||
|
|
@ -59,4 +69,118 @@ public class WrkInfoController {
|
||||||
query.setStates(status);
|
query.setStates(status);
|
||||||
return AjaxResult.success(wrkInfoService.queryArchivePage(query));
|
return AjaxResult.success(wrkInfoService.queryArchivePage(query));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* app查询
|
||||||
|
*
|
||||||
|
* @param query 条件
|
||||||
|
*/
|
||||||
|
@SysLog(value = "app", businessType = BusinessType.QUERY)
|
||||||
|
@GetMapping("/app/page")
|
||||||
|
@RequiresPermissions("wrk:app:page")
|
||||||
|
public AjaxResult queryAppPage(@RequestBody @Validated WrkAppQuery query) {
|
||||||
|
boolean isRecheck = TaskConfigUtils.reviewMethod(query.getTaskId()) == 3;
|
||||||
|
Integer wrkStatus = query.getWrkStatus();
|
||||||
|
List<Integer> wrkStatusList = new ArrayList<>();
|
||||||
|
wrkStatusList.add(wrkStatus);
|
||||||
|
if (wrkStatus.equals(3) && isRecheck) {
|
||||||
|
wrkStatusList.add(4);
|
||||||
|
} else if (wrkStatus.equals(5) && isRecheck) {
|
||||||
|
wrkStatusList.add(6);
|
||||||
|
}
|
||||||
|
query.setWrkStatusList(wrkStatusList);
|
||||||
|
query.setWrkStatus(isRecheck ? 4 : 3);
|
||||||
|
return AjaxResult.success(wrkInfoService.queryAppPage(query));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单归档信息查询
|
||||||
|
*/
|
||||||
|
@SysLog(value = "工单归档信息", businessType = BusinessType.QUERY)
|
||||||
|
@GetMapping("/archive/page")
|
||||||
|
@RequiresPermissions("wrk:archive:page")
|
||||||
|
public AjaxResult queryArchivePage(@RequestBody @Validated ReviewedQuery query) {
|
||||||
|
Integer reviewMethod = TaskConfigUtils.reviewMethod(query.getTaskId());
|
||||||
|
query.setStates(reviewMethod == 3 ? Lists.newArrayList(4) : Lists.newArrayList(3));
|
||||||
|
return AjaxResult.success(wrkInfoService.queryArchivePage(query));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询工单详情
|
||||||
|
*/
|
||||||
|
@SysLog("工单详情")
|
||||||
|
@PostMapping("/info/{wrkId}")
|
||||||
|
@RequiresPermissions("wrk:info")
|
||||||
|
public AjaxResult info(@PathVariable Long wrkId) {
|
||||||
|
return AjaxResult.success(wrkInfoService.queryWorkOrderDetails(wrkId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量派单/领取
|
||||||
|
*/
|
||||||
|
@PostMapping("/dispatch")
|
||||||
|
@RequiresPermissions("wrk:dispatch")
|
||||||
|
@SysLog(value = "批量派单/领取", businessType = BusinessType.IMPORT)
|
||||||
|
public AjaxResult dispatch(@RequestPart("file") MultipartFile file, @Validated DispatchQuery query) {
|
||||||
|
if (file.isEmpty()) {
|
||||||
|
wrkInfoService.dispatch(query, 0);
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
try (Workbook workbook = WorkbookFactory.create(file.getInputStream())) {
|
||||||
|
Sheet sheet = workbook.getSheetAt(0);
|
||||||
|
// 商户编号行号
|
||||||
|
int merchantIdRowNum = -1;
|
||||||
|
// 终端编号行号
|
||||||
|
int terminalIdRowNum = -1;
|
||||||
|
|
||||||
|
NumberFormat nf = NumberFormat.getInstance();
|
||||||
|
nf.setGroupingUsed(false);
|
||||||
|
|
||||||
|
for (Row row : sheet) {
|
||||||
|
if (row.getRowNum() == 0) {
|
||||||
|
for (Cell cell : row) {
|
||||||
|
if ("商户编号".equals(cell.getStringCellValue().trim())) {
|
||||||
|
merchantIdRowNum = cell.getColumnIndex();
|
||||||
|
} else if ("终端编号".equals(cell.getStringCellValue().trim())) {
|
||||||
|
terminalIdRowNum = cell.getColumnIndex();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (merchantIdRowNum != -1) {
|
||||||
|
Cell cell = row.getCell(merchantIdRowNum);
|
||||||
|
switch (cell.getCellType()) {
|
||||||
|
case BLANK:
|
||||||
|
break;
|
||||||
|
case STRING:
|
||||||
|
query.getNos().add(StrUtil.trim(cell.getStringCellValue()));
|
||||||
|
break;
|
||||||
|
case NUMERIC:
|
||||||
|
Double aDouble = cell.getNumericCellValue();
|
||||||
|
query.getNos().add(nf.format(aDouble));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (terminalIdRowNum != -1) {
|
||||||
|
Cell cell = row.getCell(terminalIdRowNum);
|
||||||
|
switch (cell.getCellType()) {
|
||||||
|
case BLANK:
|
||||||
|
break;
|
||||||
|
case STRING:
|
||||||
|
query.getTerminalNos().add(StrUtil.trim(cell.getStringCellValue()));
|
||||||
|
break;
|
||||||
|
case NUMERIC:
|
||||||
|
Double aDouble = cell.getNumericCellValue();
|
||||||
|
query.getTerminalNos().add(nf.format(aDouble));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("解析上传的文件失败", e);
|
||||||
|
}
|
||||||
|
wrkInfoService.dispatch(query, 0);
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.chushang.inspection.work.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.chushang.inspection.work.po.WrkIcbcJs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/28 15:38
|
||||||
|
*/
|
||||||
|
public interface WrkIcbcJsMapper extends BaseMapper<WrkIcbcJs> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.chushang.inspection.work.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.chushang.inspection.work.po.WrkImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/28 11:25
|
||||||
|
*/
|
||||||
|
public interface WrkImgMapper extends BaseMapper<WrkImg> {
|
||||||
|
}
|
||||||
|
|
@ -4,9 +4,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.chushang.inspection.work.po.WrkInfo;
|
import com.chushang.inspection.work.po.WrkInfo;
|
||||||
import com.chushang.inspection.work.query.ReviewedQuery;
|
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.query.WrkInfoQuery;
|
||||||
import com.chushang.inspection.work.vo.WrkAuditVO;
|
import com.chushang.inspection.work.vo.WrkAuditVO;
|
||||||
import com.chushang.inspection.work.vo.WrkDispatchVO;
|
import com.chushang.inspection.work.vo.WrkDispatchVO;
|
||||||
|
import com.chushang.inspection.work.vo.WrkListAppVO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -20,5 +22,7 @@ public interface WrkInfoMapper extends BaseMapper<WrkInfo> {
|
||||||
List<WrkDispatchVO> queryDispatchPage(@Param("query") WrkInfoQuery query,
|
List<WrkDispatchVO> queryDispatchPage(@Param("query") WrkInfoQuery query,
|
||||||
Page<WrkDispatchVO> page);
|
Page<WrkDispatchVO> page);
|
||||||
|
|
||||||
List<WrkAuditVO> queryArchivePage(ReviewedQuery query, Page<WrkAuditVO> page);
|
List<WrkAuditVO> queryArchivePage(@Param("query") ReviewedQuery query, Page<WrkAuditVO> page);
|
||||||
|
|
||||||
|
List<WrkListAppVO> queryAppPage(@Param("query") WrkAppQuery query, Page<WrkListAppVO> page);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.chushang.inspection.work.service;
|
||||||
|
|
||||||
|
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
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WrkIcbcJsServiceImpl extends ServiceImpl<WrkIcbcJsMapper, WrkIcbcJs> implements WrkIcbcJsService{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.chushang.inspection.work.service;
|
||||||
|
|
||||||
|
import com.chushang.inspection.work.po.WrkImg;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/28 11:25
|
||||||
|
*/
|
||||||
|
public interface WrkImgService extends IService<WrkImg>{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.chushang.inspection.work.service;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import com.chushang.inspection.work.dto.DispatchDTO;
|
||||||
|
import com.chushang.inspection.work.po.WrkInfo;
|
||||||
|
import com.chushang.inspection.work.query.DispatchQuery;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface WrkInfoDispatch {
|
||||||
|
|
||||||
|
List<WrkInfo> dispatch(DispatchQuery query, List<DispatchDTO> dispatch);
|
||||||
|
|
||||||
|
default WrkInfo construct(DispatchQuery query, DispatchDTO record, String nickName, Long userId) {
|
||||||
|
WrkInfo info = WrkInfo.builder().endTime(query.getEndTime() == null ? null : query.getEndTime())
|
||||||
|
.wrkStatus(1).workType(query.getWorkType())
|
||||||
|
.workNo(IdUtil.getSnowflake().nextId())
|
||||||
|
.remark(query.getRemark()).workSort(query.getWorkSort())
|
||||||
|
.userId(userId).workSource(query.getWorkSource())
|
||||||
|
// 业务员名称 不随着用户表名称变化而变化
|
||||||
|
.userName(nickName).build();
|
||||||
|
BeanUtil.copyProperties(record, info);
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -3,8 +3,13 @@ package com.chushang.inspection.work.service;
|
||||||
import com.chushang.common.mybatis.utils.PageResult;
|
import com.chushang.common.mybatis.utils.PageResult;
|
||||||
import com.chushang.inspection.work.po.WrkInfo;
|
import com.chushang.inspection.work.po.WrkInfo;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.chushang.inspection.work.query.DispatchQuery;
|
||||||
import com.chushang.inspection.work.query.ReviewedQuery;
|
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.query.WrkInfoQuery;
|
||||||
|
import com.chushang.inspection.work.vo.WrkInfoDetailsVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @auther: zhao
|
* @auther: zhao
|
||||||
|
|
@ -16,4 +21,10 @@ public interface WrkInfoService extends IService<WrkInfo> {
|
||||||
PageResult queryDispatchPage(WrkInfoQuery query);
|
PageResult queryDispatchPage(WrkInfoQuery query);
|
||||||
|
|
||||||
PageResult queryArchivePage(ReviewedQuery query);
|
PageResult queryArchivePage(ReviewedQuery query);
|
||||||
|
|
||||||
|
PageResult queryAppPage(WrkAppQuery query);
|
||||||
|
|
||||||
|
WrkInfoDetailsVO queryWorkOrderDetails(Long wrkId);
|
||||||
|
|
||||||
|
List<WrkInfo> dispatch(DispatchQuery query, int i);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.chushang.inspection.work.service.impl;
|
||||||
|
|
||||||
|
import com.chushang.inspection.work.po.WrkIcbcJs;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/28 15:38
|
||||||
|
*/
|
||||||
|
public interface WrkIcbcJsService extends IService<WrkIcbcJs>{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.chushang.inspection.work.service.impl;
|
||||||
|
|
||||||
|
import com.chushang.inspection.work.service.WrkImgService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.chushang.inspection.work.mapper.WrkImgMapper;
|
||||||
|
import com.chushang.inspection.work.po.WrkImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/28 11:25
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WrkImgServiceImpl extends ServiceImpl<WrkImgMapper, WrkImg> implements WrkImgService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.chushang.inspection.work.service.impl;
|
||||||
|
|
||||||
|
import com.chushang.inspection.work.dto.DispatchDTO;
|
||||||
|
import com.chushang.inspection.work.po.WrkInfo;
|
||||||
|
import com.chushang.inspection.work.query.DispatchQuery;
|
||||||
|
import com.chushang.inspection.work.service.WrkInfoDispatch;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/6/28 17:16
|
||||||
|
*/
|
||||||
|
public class WrkInfoDispatchImpl implements WrkInfoDispatch {
|
||||||
|
@Override
|
||||||
|
public List<WrkInfo> dispatch(DispatchQuery query, List<DispatchDTO> dispatch) {
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,24 +1,41 @@
|
||||||
package com.chushang.inspection.work.service.impl;
|
package com.chushang.inspection.work.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.lang.Assert;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.chushang.common.core.exception.utils.AssertUtil;
|
||||||
|
import com.chushang.common.core.util.IPUtils;
|
||||||
|
import com.chushang.common.mybatis.enums.Operator;
|
||||||
import com.chushang.common.mybatis.page.CommonParam;
|
import com.chushang.common.mybatis.page.CommonParam;
|
||||||
import com.chushang.common.mybatis.utils.PageResult;
|
import com.chushang.common.mybatis.utils.PageResult;
|
||||||
import com.chushang.common.mybatis.utils.WrapperUtils;
|
import com.chushang.common.mybatis.utils.WrapperUtils;
|
||||||
import com.chushang.datascope.annotation.DataScope;
|
import com.chushang.datascope.annotation.DataScope;
|
||||||
|
import com.chushang.inspection.project.service.InspectionDataService;
|
||||||
|
import com.chushang.inspection.terminal.po.FiveStore;
|
||||||
|
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.TaskConfigUtils;
|
||||||
|
import com.chushang.inspection.work.dto.DispatchDTO;
|
||||||
|
import com.chushang.inspection.work.po.*;
|
||||||
|
import com.chushang.inspection.work.query.DispatchQuery;
|
||||||
import com.chushang.inspection.work.query.ReviewedQuery;
|
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.query.WrkInfoQuery;
|
||||||
import com.chushang.inspection.work.service.WrkInfoService;
|
import com.chushang.inspection.work.service.*;
|
||||||
import com.chushang.inspection.work.vo.WrkAuditVO;
|
import com.chushang.inspection.work.vo.*;
|
||||||
import com.chushang.inspection.work.vo.WrkDispatchVO;
|
|
||||||
import com.chushang.system.feign.RemoteUserService;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.chushang.inspection.work.mapper.WrkInfoMapper;
|
import com.chushang.inspection.work.mapper.WrkInfoMapper;
|
||||||
import com.chushang.inspection.work.po.WrkInfo;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @auther: zhao
|
* @auther: zhao
|
||||||
|
|
@ -26,8 +43,25 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> implements WrkInfoService {
|
public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> implements WrkInfoService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
RemoteUserService remoteUserService;
|
WrkInfoTerminalRecordService terminalRecordService;
|
||||||
|
@Resource
|
||||||
|
WrkInfoStoreRecordService storeRecordService;
|
||||||
|
@Resource
|
||||||
|
WrkInfoAuditService infoAuditService;
|
||||||
|
@Resource
|
||||||
|
InspectionDataService inspectionDataService;
|
||||||
|
@Resource
|
||||||
|
WrkImgService wrkImgService;
|
||||||
|
@Resource
|
||||||
|
FiveStoreService fiveStoreService;
|
||||||
|
@Resource
|
||||||
|
TerminalService terminalService;
|
||||||
|
@Resource
|
||||||
|
StoreService service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@DataScope(deptAlias = "i")
|
@DataScope(deptAlias = "i")
|
||||||
|
|
@ -48,4 +82,69 @@ public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> impl
|
||||||
List<WrkAuditVO> records = baseMapper.queryArchivePage(query, page);
|
List<WrkAuditVO> records = baseMapper.queryArchivePage(query, page);
|
||||||
return new PageResult(records, page);
|
return new PageResult(records, page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@DataScope(deptAlias = "i")
|
||||||
|
public PageResult queryAppPage(WrkAppQuery query) {
|
||||||
|
CommonParam commonParam = CommonParam.buildPageRequest();
|
||||||
|
WrapperUtils.buildSql(query);
|
||||||
|
Page<WrkListAppVO> page = new Page<>(commonParam.getPage(), commonParam.getLimit());
|
||||||
|
List<WrkListAppVO> records = baseMapper.queryAppPage(query, page);
|
||||||
|
return new PageResult(records, page);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WrkInfoDetailsVO queryWorkOrderDetails(Long wrkId) {
|
||||||
|
WrkInfoDetailsVO infoDetail = new WrkInfoDetailsVO();
|
||||||
|
// 终端信息
|
||||||
|
WrkInfoTerminalRecord terminalRecord = terminalRecordService.getById(wrkId);
|
||||||
|
// 商户信息
|
||||||
|
WrkInfoStoreRecord storeRecord = storeRecordService.getById(wrkId);
|
||||||
|
infoDetail.setInfoTerminal(BeanUtil.copyProperties(terminalRecord, WrkInfoTerminalVO.class));
|
||||||
|
infoDetail.setInfoStore(BeanUtil.copyProperties(storeRecord, WrkInfoStoreVO.class));
|
||||||
|
// 工单信息
|
||||||
|
WrkInfo wrkInfo = getById(wrkId);
|
||||||
|
infoDetail.setWrkInfo(BeanUtil.copyProperties(wrkInfo, WrkInfoVO.class));
|
||||||
|
// 工单审核
|
||||||
|
List<WrkInfoAudit> auditList = infoAuditService.list(new LambdaQueryWrapper<WrkInfoAudit>()
|
||||||
|
.eq(WrkInfoAudit::getWrkId, wrkId));
|
||||||
|
infoDetail.setInfoAudit(BeanUtil.copyToList(auditList, AuditVO.class));
|
||||||
|
// 工单图片
|
||||||
|
List<WrkImg> imgList = wrkImgService.list(new LambdaQueryWrapper<WrkImg>()
|
||||||
|
.eq(WrkImg::getImgId, wrkId));
|
||||||
|
infoDetail.setInfoImg(BeanUtil.copyToList(imgList, WrkImgVO.class));
|
||||||
|
// 内蒙古 五统一商户
|
||||||
|
if (terminalRecord.getTerminalId() != null && "建行内蒙古".equals(TaskConfigUtils.getConfig(wrkInfo.getTaskId()).getName())){
|
||||||
|
FiveStore fiveStore = fiveStoreService.getOne(new LambdaQueryWrapper<FiveStore>()
|
||||||
|
.eq(FiveStore::getTerminalId, terminalRecord.getTerminalId()).last(Operator.LIMIT_ONE.getCharacter()));
|
||||||
|
infoDetail.setFiveStoreDetails(BeanUtil.copyProperties(fiveStore, FiveStoreVO.class));
|
||||||
|
}
|
||||||
|
// 门头照片
|
||||||
|
if (IPUtils.isMobile() && ObjectUtil.equals(wrkInfo.getWrkStatus(), 1) && terminalRecord.getTerminalId() != null) {
|
||||||
|
infoDetail.getWrkInfo().setDoorImage(wrkImgService.getOne(new LambdaQueryWrapper<WrkImg>()
|
||||||
|
.eq(WrkImg::getWrkId, wrkId)
|
||||||
|
.eq(WrkImg::getImgType, -1)
|
||||||
|
.last(Operator.LIMIT_ONE.getCharacter())).getRealPath());
|
||||||
|
}
|
||||||
|
// todo 巡检单还没搞
|
||||||
|
return infoDetail;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<WrkInfo> dispatch(DispatchQuery query, int i) {
|
||||||
|
List<DispatchDTO> dispatch = terminalService.getStoreByTasKIdOrIds(query.getTaskId(), query.getTerminalIds(), query.getNos(), query.getTerminalNos(), i);
|
||||||
|
AssertUtil.invalidate(CollectionUtil.isEmpty(dispatch), "您指定派单/领取的终端不存在");
|
||||||
|
Integer method = TaskConfigUtils.dispatchMethod(query.getTaskId());
|
||||||
|
// WrkInfoDispatch infoDispatch = Assert.notNull(dispatchMap.get("dispatch" + method), "派单方式不支持");
|
||||||
|
// List<WrkInfo> infoEntities = infoDispatch.dispatch(query, dispatch);
|
||||||
|
// Db.tx(() -> {
|
||||||
|
// Assert.isTrue(mapper.insertBatch(infoEntities) == infoEntities.size(), "派单失败");
|
||||||
|
// if (!TaskConfigUtils.isRepeat(query.getTaskId())) {
|
||||||
|
// terminalService.updateOccupy(infoEntities.stream().map(WrkInfoEntity::getTerminalId).collect(Collectors.toList()), 1);
|
||||||
|
// }
|
||||||
|
// scheduleService.updateWorkOrderProgress(6, StreamUtils.toList(infoEntities, WrkInfoEntity::getId), null);
|
||||||
|
// return true;
|
||||||
|
// });
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,7 @@
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
five_id, terminal_id, store_id, dept_id, first_level_branch, secondary_branches,
|
five_id, terminal_id, store_id, dept_id, first_level_branch, secondary_branches,
|
||||||
logo_of_newly_signed_merchants_that_year, logo_of_newly_signed_merchants_of_the_month,
|
new_year, new_month,new_day, client_name, customer_id, marketing_date,
|
||||||
logo_of_newly_signed_merchants_on_the_day, client_name, customer_id, marketing_date,
|
|
||||||
consumption_date, marketer, version, del_state, create_by, create_time, update_by,
|
consumption_date, marketer, version, del_state, create_by, create_time, update_by,
|
||||||
update_time
|
update_time
|
||||||
</sql>
|
</sql>
|
||||||
|
|
@ -52,7 +51,7 @@
|
||||||
fs.marketer AS marketer
|
fs.marketer AS marketer
|
||||||
FROM st_terminal t
|
FROM st_terminal t
|
||||||
LEFT JOIN st_five_store fs ON t.terminal_id= fs.terminal_id
|
LEFT JOIN st_five_store fs ON t.terminal_id= fs.terminal_id
|
||||||
WHERE 1 = 1
|
<where>
|
||||||
<if test="query.terminalNo != null and query.terminalNo != ''">
|
<if test="query.terminalNo != null and query.terminalNo != ''">
|
||||||
AND t.terminal_no = #{query.terminalNo}
|
AND t.terminal_no = #{query.terminalNo}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -62,13 +61,18 @@
|
||||||
<if test="query.firstLevelBranch != null">
|
<if test="query.firstLevelBranch != null">
|
||||||
AND fs.first_level_branch = #{query.firstLevelBranch}
|
AND fs.first_level_branch = #{query.firstLevelBranch}
|
||||||
</if>
|
</if>
|
||||||
<if test="query.secondaryBranches != null AND query.secondaryBranches.size() > 0 ">
|
<if test="query.secondaryBranches != null and query.secondaryBranches.size() > 0 ">
|
||||||
AND fs.secondary_branches IN
|
AND fs.secondary_branches IN
|
||||||
<foreach collection="query.secondaryBranches" item="item" index="index" open="(" close=")" separator=",">
|
<foreach collection="query.secondaryBranches" item="item" index="index" open="(" close=")" separator=",">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
${query.sqlParam.dataScpoe}
|
<if test="1 == 1">
|
||||||
|
${query.sqlParam.get('dataScpoe')}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</where>
|
||||||
|
|
||||||
ORDER BY #{query.orderBy} #{query.isAsc}
|
ORDER BY #{query.orderBy} #{query.isAsc}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
<?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>
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?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>
|
||||||
|
|
@ -34,31 +34,81 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="queryArchivePage" resultType="com.chushang.inspection.work.vo.WrkAuditVO">
|
<select id="queryArchivePage" resultType="com.chushang.inspection.work.vo.WrkAuditVO">
|
||||||
SELECT i.wrk_id,
|
SELECT i.wrk_id AS wrkId,
|
||||||
i.work_no,
|
i.work_no AS workNo,
|
||||||
isr.store_no,
|
isr.store_no AS storeNo,
|
||||||
isr.store_id,
|
isr.store_id AS storeId,
|
||||||
i.user_id,
|
i.user_id AS userId,
|
||||||
i.user_name,
|
i.user_name AS userName,
|
||||||
itr.terminal_id,
|
itr.terminal_id AS terminalId,
|
||||||
itr.terminal_no,
|
itr.terminal_no AS terminalNo,
|
||||||
i.work_type,
|
i.work_type AS workType,
|
||||||
isr.ins_fre,
|
isr.ins_fre AS insFre,
|
||||||
i.wrk_status,
|
i.wrk_status AS wrkStatus,
|
||||||
isr.geographic_location,
|
isr.geographic_location AS geographicLocation,
|
||||||
isr.location_address,
|
isr.location_address AS locationAddress,
|
||||||
isr.deviation,
|
isr.deviation AS deviation,
|
||||||
i.dispose_time,
|
i.dispose_time AS disposeTime,
|
||||||
i.create_by,
|
i.create_by AS createBy,
|
||||||
i.create_time,
|
i.create_time AS createTime,
|
||||||
i.task_id,
|
i.task_id AS taskId,
|
||||||
i.task_name,
|
i.task_name AS taskName,
|
||||||
i.lower_task_id,
|
i.lower_task_id AS lowerTaskId,
|
||||||
i.lower_task_name
|
i.lower_task_name AS lowerTaskName
|
||||||
FROM wrk_info i
|
FROM wrk_info i
|
||||||
INNER JOIN wrk_info_store_record isr ON i.wrk_id = isr.wrk_id
|
INNER JOIN wrk_info_store_record isr ON i.wrk_id = isr.wrk_id
|
||||||
INNER JOIN wrk_info_terminal_record itr ON i.wrk_id = itr.wrk_id
|
INNER JOIN wrk_info_terminal_record itr ON i.wrk_id = itr.wrk_id
|
||||||
|
<where>
|
||||||
|
<if test="1==1">
|
||||||
|
${query.sqlParam.get('sqlWhere')}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
ORDER BY i.create_time desc
|
ORDER BY i.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="queryAppPage" resultType="com.chushang.inspection.work.vo.WrkListAppVO">
|
||||||
|
SELECT
|
||||||
|
i.wrk_id AS wrkId,
|
||||||
|
i.work_type AS workType,
|
||||||
|
i.task_name AS taskName,
|
||||||
|
isr.store_name AS storeName,
|
||||||
|
isr.store_contact AS storeContact,
|
||||||
|
isr.store_phone AS storePhone,
|
||||||
|
isr.ins_fre AS insFre,
|
||||||
|
itr.terminal_id AS terminalId,
|
||||||
|
itr.terminal_address AS terminalAddress,
|
||||||
|
(
|
||||||
|
SELECT count(w1.wrk_id)
|
||||||
|
FROM
|
||||||
|
wrk_info w1 INNER JOIN
|
||||||
|
wrk_info_terminal_record w2 ON w1.wrk_id = w2.wrk_id
|
||||||
|
WHERE w2.terminal_id = itr.terminal_id AND w1.wrk_status = #{query.wrkStatus}
|
||||||
|
) AS numberOfPickups,
|
||||||
|
(
|
||||||
|
SELECT w1.dispose_time
|
||||||
|
FROM
|
||||||
|
wrk_info w1 INNER JOIN
|
||||||
|
wrk_info_terminal_record w2 ON w1.wrk_id = w2.wrk_id
|
||||||
|
WHERE w2.terminal_id = itr.terminal_id
|
||||||
|
AND w1.wrk_status = #{query.wrkStatus} order by w1.dispose_time desc limit 1
|
||||||
|
) AS lastDisposeTime,
|
||||||
|
(
|
||||||
|
SELECT w1.service_result
|
||||||
|
FROM
|
||||||
|
wrk_info w1 INNER JOIN
|
||||||
|
wrk_info_terminal_record w2 ON w1.wrk_id = w2.wrk_id
|
||||||
|
WHERE w2.terminal_id = itr.terminal_id
|
||||||
|
AND w1.wrk_status = #{query.wrkStatus} order by w1.dispose_time desc limit 1
|
||||||
|
) AS lastServiceResult
|
||||||
|
FROM
|
||||||
|
wrk_info i
|
||||||
|
INNER JOIN wrk_info_store_record isr ON i.wrk_id = isr.wrk_id
|
||||||
|
INNER JOIN wrk_info_terminal_record itr ON i.wrk_id = itr.wrk_id
|
||||||
|
<where>
|
||||||
|
<if test="1==1">
|
||||||
|
${query.sqlParam.get('sqlWhere')}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY i.create_time desc
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue