1. 模板迁移
This commit is contained in:
parent
bf67b50a63
commit
c182da5a1b
|
|
@ -60,6 +60,16 @@ public class DictUtils {
|
||||||
return dictMap.get(value);
|
return dictMap.get(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据字段值获取字典标签
|
||||||
|
*
|
||||||
|
* @param value 字典值
|
||||||
|
* @return 字典标签
|
||||||
|
*/
|
||||||
|
public static String getDictWrkStatusLabel(String value) {
|
||||||
|
return getDictLabel("wrk_status", value);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据字典标签获取字段值
|
* 根据字典标签获取字段值
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -19,91 +19,102 @@ import java.util.List;
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class TerminalQuery extends CommonParam {
|
public class TerminalQuery extends CommonParam {
|
||||||
|
|
||||||
/**
|
|
||||||
* 任务id
|
|
||||||
*/
|
|
||||||
private Long taskId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商户编号
|
* 商户编号
|
||||||
*/
|
*/
|
||||||
@Size(max = 64, message = "商户编号不能超过64个字符")
|
@Size(max = 64, message = "商户编号不能超过64个字符")
|
||||||
|
@Condition(name = "store_no", type = Condition.ConditionType.eq, tableName = "s")
|
||||||
private String storeNo;
|
private String storeNo;
|
||||||
|
@Condition(name = "store_name", type = Condition.ConditionType.like, tableName = "s")
|
||||||
|
private String storeName;
|
||||||
/**
|
/**
|
||||||
* 终端编号
|
* 终端编号
|
||||||
*/
|
*/
|
||||||
@Size(max = 30, message = "终端编号不能超过30个字符")
|
@Size(max = 30, message = "终端编号不能超过30个字符")
|
||||||
|
@Condition(name = "terminal_no", type = Condition.ConditionType.eq, tableName = "t")
|
||||||
private String terminalNo;
|
private String terminalNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端sn号
|
* 终端sn号
|
||||||
*/
|
*/
|
||||||
@Size(max = 100, message = "终端sn号不能超过100个字符")
|
@Size(max = 100, message = "终端sn号不能超过100个字符")
|
||||||
|
@Condition(name = "terminal_sn", type = Condition.ConditionType.eq, tableName = "t")
|
||||||
private String terminalSn;
|
private String terminalSn;
|
||||||
|
|
||||||
/**
|
|
||||||
* 终端类型
|
|
||||||
*/
|
|
||||||
@Range(min = 1, max = 10, message = "终端类型输入错误")
|
|
||||||
private Integer terminalType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 终端来源
|
|
||||||
*/
|
|
||||||
@Range(min = 1, max = 10, message = "终端来源输入错误")
|
|
||||||
private Integer terminalSource;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端版本号
|
* 终端版本号
|
||||||
*/
|
*/
|
||||||
@Size(max = 64, message = "终端版本号不能超过64个字符")
|
@Size(max = 64, message = "终端版本号不能超过64个字符")
|
||||||
|
@Condition(name = "terminal_version", type = Condition.ConditionType.like, tableName = "t")
|
||||||
private String terminalVersion;
|
private String terminalVersion;
|
||||||
|
/**
|
||||||
|
* 终端类型
|
||||||
|
*/
|
||||||
|
@Range(min = 1, max = 10, message = "终端类型输入错误")
|
||||||
|
@Condition(name = "terminal_type", type = Condition.ConditionType.eq, tableName = "t")
|
||||||
|
private Integer terminalType;
|
||||||
/**
|
/**
|
||||||
* 终端地址
|
* 终端地址
|
||||||
*/
|
*/
|
||||||
@Size(max = 300, message = "终端版本号不能超过300个字符")
|
@Size(max = 300, message = "终端版本号不能超过300个字符")
|
||||||
|
@Condition(name = "terminal_address", type = Condition.ConditionType.eq, tableName = "t")
|
||||||
private String terminalAddress;
|
private String terminalAddress;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端型号
|
* 所属部门
|
||||||
*/
|
*/
|
||||||
@Size(max = 64, message = "终端型号不能超过64个字符")
|
@Condition(name = "dept_id", type = Condition.ConditionType.eq, tableName = "s")
|
||||||
private String terminalModel;
|
private Long deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 下级任务id
|
* 所属银行
|
||||||
*/
|
*/
|
||||||
private List<Long> lowerTaskIds;
|
@Condition(name = "task_id", type = Condition.ConditionType.eq, tableName = "s")
|
||||||
|
private Long taskId;
|
||||||
/**
|
|
||||||
* 商户名称
|
|
||||||
*/
|
|
||||||
@Size(max = 128, message = "商户名称不能超过128个字符")
|
|
||||||
private String storeName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商户状态
|
|
||||||
*/
|
|
||||||
@Range(min = 1, max = 3, message = "商户状态输入错误")
|
|
||||||
private Integer storeState;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 巡检状态 1 以巡检 2未巡检
|
* 巡检状态 1 以巡检 2未巡检
|
||||||
*/
|
*/
|
||||||
@Range(min = 1, max = 2, message = "巡检状态输入错误")
|
@Range(min = 1, max = 2, message = "巡检状态输入错误")
|
||||||
|
@Condition(name = "inspection_status", type = Condition.ConditionType.eq, tableName = "ti")
|
||||||
private Integer inspectionStatus;
|
private Integer inspectionStatus;
|
||||||
|
/**
|
||||||
|
* 终端来源
|
||||||
|
*/
|
||||||
|
@Range(min = 1, max = 10, message = "终端来源输入错误")
|
||||||
|
@Condition(name = "inspection_source", type = Condition.ConditionType.eq, tableName = "ti")
|
||||||
|
private Integer terminalSource;
|
||||||
|
/**
|
||||||
|
* 商户状态
|
||||||
|
*/
|
||||||
|
@Range(min = 1, max = 3, message = "商户状态输入错误")
|
||||||
|
@Condition(name = "`state`", type = Condition.ConditionType.eq, tableName = "s")
|
||||||
|
private Integer storeState;
|
||||||
/**
|
/**
|
||||||
* 巡检时间
|
* 巡检时间
|
||||||
*/
|
*/
|
||||||
@JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
|
@JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
|
||||||
|
@Condition(name = "`inspection_time`", type = Condition.ConditionType.in, tableName = "ti")
|
||||||
private List<LocalDateTime> inspectionTime;
|
private List<LocalDateTime> inspectionTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
@JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
|
@JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
|
||||||
|
@Condition(name = "`create_time`", type = Condition.ConditionType.in, tableName = "s")
|
||||||
private List<LocalDateTime> createTimes;
|
private List<LocalDateTime> createTimes;
|
||||||
|
/**
|
||||||
|
* 终端型号
|
||||||
|
*/
|
||||||
|
@Size(max = 64, message = "终端型号不能超过64个字符")
|
||||||
|
@Condition(name = "`terminal_model`", type = Condition.ConditionType.like, tableName = "t")
|
||||||
|
private String terminalModel;
|
||||||
|
/**
|
||||||
|
* 下级任务id
|
||||||
|
*/
|
||||||
|
private List<Long> lowerTaskIds;
|
||||||
|
/**
|
||||||
|
* 用于 查询用户id
|
||||||
|
*/
|
||||||
|
@Condition(name = "`admin_id`", type = Condition.ConditionType.in, tableName = "s")
|
||||||
|
private List<Long> userIds;
|
||||||
|
/**
|
||||||
|
* 所属项目id
|
||||||
|
*/
|
||||||
|
@Condition(name = "`project_id`", type = Condition.ConditionType.eq, tableName = "p")
|
||||||
|
private Long projectId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,204 @@
|
||||||
|
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.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端商户池
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/7/3 15:04
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class StoreTerminalVO {
|
||||||
|
/**
|
||||||
|
* 所属项目id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
/**
|
||||||
|
* 所属项目
|
||||||
|
*/
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
private Long storeId;
|
||||||
|
/**
|
||||||
|
* 商户编号
|
||||||
|
*/
|
||||||
|
private String storeNo;
|
||||||
|
/**
|
||||||
|
* 商户名称
|
||||||
|
*/
|
||||||
|
private String storeName;
|
||||||
|
/**
|
||||||
|
* 商户联系人
|
||||||
|
*/
|
||||||
|
private String storeContact;
|
||||||
|
/**
|
||||||
|
* 门店名称
|
||||||
|
*/
|
||||||
|
private String shopName;
|
||||||
|
/**
|
||||||
|
* 特殊商户编号
|
||||||
|
*/
|
||||||
|
private String specialNum;
|
||||||
|
/**
|
||||||
|
* 商户联系方式
|
||||||
|
*/
|
||||||
|
private String storePhone;
|
||||||
|
/**
|
||||||
|
* 商户地址
|
||||||
|
*/
|
||||||
|
private String storeAddress;
|
||||||
|
/**
|
||||||
|
* 当前任务id
|
||||||
|
*/
|
||||||
|
private Long lowerTaskId;
|
||||||
|
/**
|
||||||
|
* 当前任务名称
|
||||||
|
* lower_task_id
|
||||||
|
*/
|
||||||
|
private String lowerTaskName;
|
||||||
|
/**
|
||||||
|
* 商户类型
|
||||||
|
*/
|
||||||
|
@DictFormat(dictType = "store_type")
|
||||||
|
private Integer storeType;
|
||||||
|
/**
|
||||||
|
* 现有其他收单产品
|
||||||
|
*/
|
||||||
|
private String products;
|
||||||
|
/**
|
||||||
|
* 商户提示工具
|
||||||
|
*/
|
||||||
|
private String tipTool;
|
||||||
|
/**
|
||||||
|
* 建档日期
|
||||||
|
*/
|
||||||
|
private LocalDate registerTime;
|
||||||
|
/**
|
||||||
|
* 巡检频次
|
||||||
|
*/
|
||||||
|
@DictFormat(dictType = "ins_fre")
|
||||||
|
private Integer insFre;
|
||||||
|
/**
|
||||||
|
* 客户经理
|
||||||
|
*/
|
||||||
|
private String accountManager;
|
||||||
|
/**
|
||||||
|
* 经理电话
|
||||||
|
*/
|
||||||
|
private String accountPhone;
|
||||||
|
/**
|
||||||
|
* 任务id
|
||||||
|
*/
|
||||||
|
private Long taskId;
|
||||||
|
/**
|
||||||
|
* 总任务名
|
||||||
|
* -- taskId
|
||||||
|
*/
|
||||||
|
private String taskName;
|
||||||
|
/**
|
||||||
|
* 注册地址
|
||||||
|
*/
|
||||||
|
private String registerAddress;
|
||||||
|
/**
|
||||||
|
* 法人/负责人
|
||||||
|
*/
|
||||||
|
private String legalName;
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
* -- 创建人
|
||||||
|
*/
|
||||||
|
protected String createBy;
|
||||||
|
/**
|
||||||
|
* 创建日期
|
||||||
|
*/
|
||||||
|
protected LocalDateTime createTime;
|
||||||
|
/**
|
||||||
|
* 终端 主键
|
||||||
|
*/
|
||||||
|
private Long terminalId;
|
||||||
|
/**
|
||||||
|
* 商户状态
|
||||||
|
*/
|
||||||
|
@DictFormat(dictType = "mer_status")
|
||||||
|
private Integer storeState;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端sn号
|
||||||
|
*/
|
||||||
|
private String terminalSn;
|
||||||
|
/**
|
||||||
|
* 终端编号
|
||||||
|
*/
|
||||||
|
private String terminalNo;
|
||||||
|
/**
|
||||||
|
* 终端类型
|
||||||
|
*/
|
||||||
|
@DictFormat(dictType = "terminal_type")
|
||||||
|
private Integer terminalType;
|
||||||
|
/**
|
||||||
|
* 终端型号
|
||||||
|
*/
|
||||||
|
private String terminalModel;
|
||||||
|
/**
|
||||||
|
* 终端版本号
|
||||||
|
*/
|
||||||
|
private String terminalVersion;
|
||||||
|
/**
|
||||||
|
* 终端地址
|
||||||
|
*/
|
||||||
|
private String terminalAddress;
|
||||||
|
/**
|
||||||
|
* 终端来源
|
||||||
|
*/
|
||||||
|
@DictFormat(dictType = "terminal_source")
|
||||||
|
private Integer terminalSource;
|
||||||
|
/**
|
||||||
|
* 是否占用
|
||||||
|
*/
|
||||||
|
private Integer occupy;
|
||||||
|
/**
|
||||||
|
* 巡检状态
|
||||||
|
*/
|
||||||
|
@DictFormat(dictType = "terminal_status")
|
||||||
|
private Integer terminalStatus;
|
||||||
|
/**
|
||||||
|
* 终端--状态
|
||||||
|
*/
|
||||||
|
@DictFormat(dictType = "mer_status")
|
||||||
|
private Integer state;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 偏差(直线距离 米)
|
||||||
|
*/
|
||||||
|
private Long deviation;
|
||||||
|
/**
|
||||||
|
* 操作人
|
||||||
|
*/
|
||||||
|
private String operatorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检状态 1 以巡检 2未巡检
|
||||||
|
*/
|
||||||
|
private Integer inspectionStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检时间
|
||||||
|
*/
|
||||||
|
@DateTimeFormat(DatePattern.NORM_DATETIME_MS_PATTERN)
|
||||||
|
private LocalDateTime inspectionTime;
|
||||||
|
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -73,7 +73,7 @@ public class StoreVO implements Serializable {
|
||||||
* 商户类型
|
* 商户类型
|
||||||
*/
|
*/
|
||||||
@DictFormat(dictType = "store_type")
|
@DictFormat(dictType = "store_type")
|
||||||
private Integer type;
|
private Integer storeType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 现有其他收单产品
|
* 现有其他收单产品
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,6 @@ public class TerminalVO implements Serializable {
|
||||||
|
|
||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端 主键
|
* 终端 主键
|
||||||
*/
|
*/
|
||||||
|
|
@ -37,17 +34,18 @@ public class TerminalVO implements Serializable {
|
||||||
* 下级任务id
|
* 下级任务id
|
||||||
*/
|
*/
|
||||||
private Long lowerTaskId;
|
private Long lowerTaskId;
|
||||||
|
/**
|
||||||
|
* 顶级任务id
|
||||||
|
*/
|
||||||
|
private Long taskId;
|
||||||
/**
|
/**
|
||||||
* 任务名称
|
* 任务名称
|
||||||
*/
|
*/
|
||||||
private String pollingName;
|
private String taskName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商户编号
|
* 商户编号
|
||||||
*/
|
*/
|
||||||
private String storeNo;
|
private String storeNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商户名称
|
* 商户名称
|
||||||
* 查询商户表
|
* 查询商户表
|
||||||
|
|
|
||||||
|
|
@ -117,40 +117,4 @@ public class WrkInfoStoreRecord extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "legal_name")
|
@TableField(value = "legal_name")
|
||||||
private String legalName;
|
private String legalName;
|
||||||
|
|
||||||
/**
|
|
||||||
* 地理位置信息
|
|
||||||
*/
|
|
||||||
@TableField(value = "geographic_location")
|
|
||||||
private String geographicLocation;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 地理位置信息地址
|
|
||||||
*/
|
|
||||||
@TableField(value = "location_address")
|
|
||||||
private String locationAddress;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 本次巡检位置经纬度
|
|
||||||
*/
|
|
||||||
@TableField(value = "work_location")
|
|
||||||
private String workLocation;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 本次巡检位置信息(根据经纬度)
|
|
||||||
*/
|
|
||||||
@TableField(value = "work_address")
|
|
||||||
private String workAddress;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 偏差(直线距离 米)
|
|
||||||
*/
|
|
||||||
@TableField(value = "deviation")
|
|
||||||
private Long deviation;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 预制码编码
|
|
||||||
*/
|
|
||||||
@TableField(value = "pre_code_encoding")
|
|
||||||
private String preCodeEncoding;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,131 @@
|
||||||
|
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;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/7/3 11:31
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper=true)
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName(value = "wrk_info_terminal_ins_record")
|
||||||
|
public class WrkInfoTerminalInsRecord extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 工单id
|
||||||
|
*/
|
||||||
|
@TableId(value = "wrk_id", type = IdType.INPUT)
|
||||||
|
private Long wrkId;
|
||||||
|
/**
|
||||||
|
* 终端id
|
||||||
|
*/
|
||||||
|
@TableField(value = "terminal_id")
|
||||||
|
private Long terminalId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 银行资产管理码
|
||||||
|
*/
|
||||||
|
@TableField(value = "management_code")
|
||||||
|
private String managementCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地理位置信息
|
||||||
|
*/
|
||||||
|
@TableField(value = "geographic_location")
|
||||||
|
private String geographicLocation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地理位置信息地址
|
||||||
|
*/
|
||||||
|
@TableField(value = "geographic_address")
|
||||||
|
private String geographicAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检位置信息
|
||||||
|
*/
|
||||||
|
@TableField(value = "work_location")
|
||||||
|
private String workLocation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检位置信息
|
||||||
|
*/
|
||||||
|
@TableField(value = "work_address")
|
||||||
|
private String workAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 偏差(直线距离 米)
|
||||||
|
*/
|
||||||
|
@TableField(value = "deviation")
|
||||||
|
private Long deviation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入库时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "storage_time")
|
||||||
|
private LocalDateTime storageTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "delivery_time")
|
||||||
|
private LocalDateTime deliveryTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库原因
|
||||||
|
*/
|
||||||
|
@TableField(value = "reason_for_shipment")
|
||||||
|
private Integer reasonForShipment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作员编号
|
||||||
|
*/
|
||||||
|
@TableField(value = "operator_id")
|
||||||
|
private String operatorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预制码编码
|
||||||
|
*/
|
||||||
|
@TableField(value = "pre_code_encoding")
|
||||||
|
private String preCodeEncoding;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否为业务员录入(1是 2否)
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_enter")
|
||||||
|
private Integer isEnter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上次服务结果
|
||||||
|
*/
|
||||||
|
@TableField(value = "service_result")
|
||||||
|
private Integer serviceResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核通过次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "times_pass")
|
||||||
|
private Integer timesPass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检状态 1 已巡检 2 未巡检
|
||||||
|
*/
|
||||||
|
@TableField(value = "inspection_status")
|
||||||
|
private Integer inspectionStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检时间(上次业务员处理时间)
|
||||||
|
*/
|
||||||
|
@TableField(value = "inspection_time")
|
||||||
|
private LocalDateTime inspectionTime;
|
||||||
|
}
|
||||||
|
|
@ -86,12 +86,6 @@ public class WrkInfoTerminalRecord extends BaseEntity {
|
||||||
@TableField(value = "terminal_property")
|
@TableField(value = "terminal_property")
|
||||||
private Integer terminalProperty;
|
private Integer terminalProperty;
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否占用
|
|
||||||
*/
|
|
||||||
@TableField(value = "occupy")
|
|
||||||
private Integer occupy;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端状态
|
* 终端状态
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.chushang.inspection.work.vo;
|
package com.chushang.inspection.work.vo;
|
||||||
|
|
||||||
import com.chushang.inspection.terminal.vo.FiveStoreVO;
|
import com.chushang.inspection.terminal.vo.FiveStoreVO;
|
||||||
|
import com.chushang.inspection.work.po.WrkInfoTerminalInsRecord;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
|
|
@ -27,6 +28,10 @@ public class WrkInfoDetailsVO implements java.io.Serializable{
|
||||||
* 工单终端
|
* 工单终端
|
||||||
*/
|
*/
|
||||||
private WrkInfoTerminalVO infoTerminal;
|
private WrkInfoTerminalVO infoTerminal;
|
||||||
|
/**
|
||||||
|
* 工单终端巡检信息
|
||||||
|
*/
|
||||||
|
private WrkInfoTerminalInsVO infoTerminalIns;
|
||||||
/**
|
/**
|
||||||
* 工单图片
|
* 工单图片
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -89,34 +89,4 @@ public class WrkInfoStoreVO implements Serializable {
|
||||||
* 法人/负责人
|
* 法人/负责人
|
||||||
*/
|
*/
|
||||||
private String legalName;
|
private String legalName;
|
||||||
|
|
||||||
/**
|
|
||||||
* 地理位置信息
|
|
||||||
*/
|
|
||||||
private String geographicLocation;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 地理位置信息地址
|
|
||||||
*/
|
|
||||||
private String locationAddress;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 本次巡检位置经纬度
|
|
||||||
*/
|
|
||||||
private String workLocation;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 本次巡检位置信息(根据经纬度)
|
|
||||||
*/
|
|
||||||
private String workAddress;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 偏差(直线距离 米)
|
|
||||||
*/
|
|
||||||
private Long deviation;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 预制码编码
|
|
||||||
*/
|
|
||||||
private String preCodeEncoding;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,86 @@
|
||||||
|
package com.chushang.inspection.work.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/7/3 11:38
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WrkInfoTerminalInsVO implements Serializable {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
/**
|
||||||
|
* 终端id
|
||||||
|
*/
|
||||||
|
private Long terminalId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地理位置信息
|
||||||
|
*/
|
||||||
|
private String geographicLocation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地理位置信息地址
|
||||||
|
*/
|
||||||
|
private String locationAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本次巡检位置经纬度
|
||||||
|
*/
|
||||||
|
private String workLocation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本次巡检位置信息(根据经纬度)
|
||||||
|
*/
|
||||||
|
private String workAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 偏差(直线距离 米)
|
||||||
|
*/
|
||||||
|
private Long deviation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预制码编码
|
||||||
|
*/
|
||||||
|
private String preCodeEncoding;
|
||||||
|
/**
|
||||||
|
* 巡检结果
|
||||||
|
*/
|
||||||
|
private Integer serviceResult;
|
||||||
|
/**
|
||||||
|
* 审核通过次数
|
||||||
|
*/
|
||||||
|
private Integer timesPass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检状态 1 已巡检 2 未巡检
|
||||||
|
*/
|
||||||
|
private Integer inspectionStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检时间(上次业务员处理时间)
|
||||||
|
*/
|
||||||
|
private LocalDateTime inspectionTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入库时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime storageTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime deliveryTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库原因
|
||||||
|
*/
|
||||||
|
private Integer reasonForShipment;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
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));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
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,11 +1,14 @@
|
||||||
package com.chushang.inspection.project.controller;
|
package com.chushang.inspection.project.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.chushang.common.core.validator.Create;
|
import com.chushang.common.core.validator.Create;
|
||||||
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.project.po.Template;
|
import com.chushang.inspection.project.po.Template;
|
||||||
import com.chushang.inspection.project.service.TbTemplateService;
|
import com.chushang.inspection.project.service.TbTemplateService;
|
||||||
|
import com.chushang.oss.entity.dto.UploadFileDTO;
|
||||||
|
import com.chushang.oss.feign.RemoteOssService;
|
||||||
import com.chushang.security.annotation.RequiresPermissions;
|
import com.chushang.security.annotation.RequiresPermissions;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
@ -22,8 +25,26 @@ import javax.annotation.Resource;
|
||||||
@RequestMapping(value = "/template")
|
@RequestMapping(value = "/template")
|
||||||
public class TemplateController {
|
public class TemplateController {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增 模板, 然后 巡检单模板, 去进行筛选选择
|
||||||
|
*/
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
TbTemplateService tbTemplateService;
|
TbTemplateService tbTemplateService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取全部类型的模板信息
|
||||||
|
* 用于筛选
|
||||||
|
* @param templateType 模板类型
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public AjaxResult allList(@RequestParam(name = "templateType") String templateType){
|
||||||
|
return AjaxResult.success(tbTemplateService.list(
|
||||||
|
new LambdaQueryWrapper<Template>()
|
||||||
|
.eq(Template::getTemplateType, templateType)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 模板列表页面
|
* 模板列表页面
|
||||||
*/
|
*/
|
||||||
|
|
@ -55,11 +76,22 @@ public class TemplateController {
|
||||||
/**
|
/**
|
||||||
* 删除模板
|
* 删除模板
|
||||||
*/
|
*/
|
||||||
@SysLog(value = "模板", businessType = BusinessType.UPDATE)
|
@SysLog(value = "模板", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping(value = "/del/{templateId}")
|
@DeleteMapping(value = "/del/{templateId}")
|
||||||
@RequiresPermissions(value = "ins:template:del")
|
@RequiresPermissions(value = "ins:template:del")
|
||||||
public AjaxResult del(@PathVariable Long templateId){
|
public AjaxResult del(@PathVariable Long templateId){
|
||||||
return AjaxResult.success(tbTemplateService.removeById(templateId));
|
return AjaxResult.success(tbTemplateService.removeById(templateId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传模板
|
||||||
|
* @param file 文件
|
||||||
|
*/
|
||||||
|
@SysLog(value = "模板", businessType = BusinessType.UPLOAD)
|
||||||
|
@PostMapping(value = "/upload")
|
||||||
|
@RequiresPermissions(value = "ins:template:upload")
|
||||||
|
public AjaxResult uploadTemplate(@RequestParam MultipartFile file){
|
||||||
|
return AjaxResult.success(tbTemplateService.uploadFile(file));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.chushang.common.mybatis.enums.Operator;
|
import com.chushang.common.mybatis.enums.Operator;
|
||||||
import com.chushang.common.mybatis.utils.PageResult;
|
import com.chushang.common.mybatis.utils.PageResult;
|
||||||
import com.chushang.inspection.project.po.Template;
|
import com.chushang.inspection.project.po.Template;
|
||||||
|
import com.chushang.oss.entity.vo.FileSourceVo;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @auther: zhao
|
* @auther: zhao
|
||||||
|
|
@ -24,4 +26,6 @@ public interface TbTemplateService extends IService<Template> {
|
||||||
.last(Operator.LIMIT_ONE.getCharacter())
|
.last(Operator.LIMIT_ONE.getCharacter())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FileSourceVo uploadFile(MultipartFile file);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ public class PollingTaskServiceImpl extends ServiceImpl<PollingTaskMapper, Polli
|
||||||
Assert.notNull(currentTask, "修改的任务不存在");
|
Assert.notNull(currentTask, "修改的任务不存在");
|
||||||
PollingTask pollingTask = BeanUtil.copyProperties(task, PollingTask.class);
|
PollingTask pollingTask = BeanUtil.copyProperties(task, PollingTask.class);
|
||||||
if (!Objects.equals(pollingTask.getParentId(), currentTask.getParentId())) {
|
if (!Objects.equals(pollingTask.getParentId(), currentTask.getParentId())) {
|
||||||
processIndexes(currentTask);
|
processIndexes(pollingTask);
|
||||||
|
|
||||||
LambdaQueryWrapper<PollingTask> taskSql = WrapperUtils.builder();
|
LambdaQueryWrapper<PollingTask> taskSql = WrapperUtils.builder();
|
||||||
taskSql.likeLeft(PollingTask::getSearchNum, currentTask.getSearchNum());
|
taskSql.likeLeft(PollingTask::getSearchNum, currentTask.getSearchNum());
|
||||||
|
|
|
||||||
|
|
@ -70,4 +70,21 @@ public class TemplateServiceImpl extends ServiceImpl<TemplateMapper, Template> i
|
||||||
updateById(template);
|
updateById(template);
|
||||||
return templateId;
|
return templateId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FileSourceVo uploadFile(MultipartFile file) {
|
||||||
|
// 上传模板信息
|
||||||
|
Result<List<FileSourceVo>> listResult =
|
||||||
|
remoteOssService.uploadFile(UploadFileDTO.builder()
|
||||||
|
.files(new MultipartFile[]{file})
|
||||||
|
.build(), null, false, null, "template", SecurityConstants.INNER);
|
||||||
|
if (listResult.isSuccess() && CollectionUtil.isNotEmpty(listResult.getData())){
|
||||||
|
FileSourceVo fileSourceVo = listResult.getData().get(0);
|
||||||
|
Template template = new Template();
|
||||||
|
template.setTemplateFid(fileSourceVo.getFid());
|
||||||
|
template.setTemplateUrl(fileSourceVo.getFilePath());
|
||||||
|
return listResult.getData().get(0);
|
||||||
|
}
|
||||||
|
throw new ResultException("上传失败");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,12 @@ public class StoreController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
StoreService storeService;
|
StoreService storeService;
|
||||||
|
/**
|
||||||
|
* 1. 终端商户池
|
||||||
|
* 2. 我的终端池
|
||||||
|
* 3. 分配记录
|
||||||
|
* 4. 派单记录
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询商户
|
* 查询商户
|
||||||
|
|
@ -45,7 +50,7 @@ public class StoreController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改商户(内部使用)
|
* 修改商户
|
||||||
*/
|
*/
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@RequiresPermissions("ins:store:update")
|
@RequiresPermissions("ins:store:update")
|
||||||
|
|
@ -57,7 +62,7 @@ public class StoreController {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询商户
|
* 商户详情 --> 查询商户详情
|
||||||
*/
|
*/
|
||||||
@SysLog(value = "查询商户", businessType = BusinessType.QUERY)
|
@SysLog(value = "查询商户", businessType = BusinessType.QUERY)
|
||||||
@GetMapping("/info")
|
@GetMapping("/info")
|
||||||
|
|
@ -69,7 +74,7 @@ public class StoreController {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除商户(内部使用)
|
* 删除商户
|
||||||
*/
|
*/
|
||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
@RequiresPermissions("ins:store:delete")
|
@RequiresPermissions("ins:store:delete")
|
||||||
|
|
|
||||||
|
|
@ -38,9 +38,6 @@ import java.util.List;
|
||||||
@RequestMapping(value = "/store/import")
|
@RequestMapping(value = "/store/import")
|
||||||
public class StoreImportController {
|
public class StoreImportController {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
TbTemplateService tbTemplateService;
|
TbTemplateService tbTemplateService;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ 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.project.po.PollingTaskAutograph;
|
import com.chushang.inspection.project.po.PollingTaskAutograph;
|
||||||
import com.chushang.inspection.terminal.po.Terminal;
|
import com.chushang.inspection.terminal.po.Terminal;
|
||||||
|
import com.chushang.inspection.terminal.po.TerminalIns;
|
||||||
import com.chushang.inspection.terminal.query.TerminalAppQuery;
|
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;
|
||||||
|
|
@ -28,8 +29,7 @@ public class TerminalController {
|
||||||
TerminalService terminalService;
|
TerminalService terminalService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询终端
|
* 商户终端池
|
||||||
* TODO 需要查询 st_terminal_ins 表
|
|
||||||
* @param query 条件
|
* @param query 条件
|
||||||
*/
|
*/
|
||||||
@SysLog(value = "终端", businessType = BusinessType.QUERY)
|
@SysLog(value = "终端", businessType = BusinessType.QUERY)
|
||||||
|
|
@ -41,7 +41,6 @@ public class TerminalController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询终端app
|
* 查询终端app
|
||||||
*
|
|
||||||
* @param query 条件
|
* @param query 条件
|
||||||
*/
|
*/
|
||||||
@SysLog(value = "终端app", businessType = BusinessType.QUERY)
|
@SysLog(value = "终端app", businessType = BusinessType.QUERY)
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import com.chushang.inspection.terminal.po.Store;
|
||||||
import com.chushang.inspection.terminal.po.Terminal;
|
import com.chushang.inspection.terminal.po.Terminal;
|
||||||
import com.chushang.inspection.terminal.query.TerminalAppQuery;
|
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.StoreTerminalVO;
|
||||||
import com.chushang.inspection.terminal.vo.TerminalVO;
|
import com.chushang.inspection.terminal.vo.TerminalVO;
|
||||||
import com.chushang.inspection.work.dto.DispatchDTO;
|
import com.chushang.inspection.work.dto.DispatchDTO;
|
||||||
import com.chushang.inspection.work.query.DispatchQuery;
|
import com.chushang.inspection.work.query.DispatchQuery;
|
||||||
|
|
@ -21,8 +22,8 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public interface TerminalMapper extends BaseMapper<Terminal> {
|
public interface TerminalMapper extends BaseMapper<Terminal> {
|
||||||
@DataScope(deptAlias = "t")
|
@DataScope(deptAlias = "t")
|
||||||
List<TerminalVO> pageList(@Param("query") TerminalQuery query,
|
List<StoreTerminalVO> pageList(@Param("query") TerminalQuery query,
|
||||||
Page<TerminalVO> page);
|
Page<StoreTerminalVO> page);
|
||||||
@DataScope(deptAlias = "t")
|
@DataScope(deptAlias = "t")
|
||||||
List<TerminalAppVO> selectPageApp(@Param("query") TerminalAppQuery query, Page<TerminalAppVO> page);
|
List<TerminalAppVO> selectPageApp(@Param("query") TerminalAppQuery query, Page<TerminalAppVO> page);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,6 @@ public class StoreServiceImpl extends ServiceImpl<StoreMapper, Store> implements
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
PollingTaskService taskService;
|
PollingTaskService taskService;
|
||||||
@Resource
|
|
||||||
TbTemplateService tbTemplateService;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult pageList(StoreQuery query) {
|
public PageResult pageList(StoreQuery query) {
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,16 @@
|
||||||
package com.chushang.inspection.terminal.service.impl;
|
package com.chushang.inspection.terminal.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
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.constant.SecurityConstants;
|
||||||
import com.chushang.common.dict.utils.DictUtils;
|
import com.chushang.common.dict.utils.DictUtils;
|
||||||
import com.chushang.common.mybatis.enums.Operator;
|
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.inspection.project.vo.TerminalApp;
|
import com.chushang.inspection.project.vo.TerminalApp;
|
||||||
import com.chushang.inspection.project.vo.TerminalAppVO;
|
import com.chushang.inspection.project.vo.TerminalAppVO;
|
||||||
import com.chushang.inspection.terminal.po.Store;
|
import com.chushang.inspection.terminal.po.Store;
|
||||||
|
|
@ -16,17 +19,22 @@ 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.StoreService;
|
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.StoreTerminalVO;
|
||||||
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.dto.DispatchDTO;
|
||||||
import com.chushang.inspection.work.po.WrkInfo;
|
import com.chushang.inspection.work.po.WrkInfo;
|
||||||
import com.chushang.inspection.work.query.DispatchQuery;
|
import com.chushang.inspection.work.query.DispatchQuery;
|
||||||
|
import com.chushang.system.feign.RemoteDeptService;
|
||||||
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.terminal.mapper.TerminalMapper;
|
import com.chushang.inspection.terminal.mapper.TerminalMapper;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @auther: zhao
|
* @auther: zhao
|
||||||
|
|
@ -36,12 +44,25 @@ import java.util.List;
|
||||||
public class TerminalServiceImpl extends ServiceImpl<TerminalMapper, Terminal> implements TerminalService {
|
public class TerminalServiceImpl extends ServiceImpl<TerminalMapper, Terminal> implements TerminalService {
|
||||||
@Resource
|
@Resource
|
||||||
private StoreService storeService;
|
private StoreService storeService;
|
||||||
|
@Resource
|
||||||
|
private RemoteDeptService remoteDeptService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult pageList(TerminalQuery query) {
|
public PageResult pageList(TerminalQuery query) {
|
||||||
|
WrapperUtils.buildSql(query);
|
||||||
CommonParam commonParam = CommonParam.buildPageRequest();
|
CommonParam commonParam = CommonParam.buildPageRequest();
|
||||||
Page<TerminalVO> page = new Page<>(commonParam.getPage(), commonParam.getLimit());
|
Page<StoreTerminalVO> page = new Page<>(commonParam.getPage(), commonParam.getLimit());
|
||||||
List<TerminalVO> terminalVOS = baseMapper.pageList(query, page);
|
List<StoreTerminalVO> terminalVOS = baseMapper.pageList(query, page);
|
||||||
|
if (CollectionUtil.isNotEmpty(terminalVOS)){
|
||||||
|
Set<Long> deptIds =
|
||||||
|
terminalVOS.stream().map(StoreTerminalVO::getDeptId).collect(Collectors.toSet());
|
||||||
|
Map<Long, String> deptNameByIds
|
||||||
|
= remoteDeptService.getDeptNameByIds(deptIds, SecurityConstants.INNER);
|
||||||
|
if (CollectionUtil.isNotEmpty(deptNameByIds)){
|
||||||
|
terminalVOS.forEach(s-> s.setDeptName(deptNameByIds.get(s.getDeptId())));
|
||||||
|
}
|
||||||
|
}
|
||||||
return new PageResult(terminalVOS, page);
|
return new PageResult(terminalVOS, page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,8 @@ public class WrkInfoController {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询派单/领取列表
|
* 查询派单/领取列表 --> 查询派单领取
|
||||||
|
* todo
|
||||||
*/
|
*/
|
||||||
@SysLog(value = "派单/领取列表", businessType = BusinessType.QUERY)
|
@SysLog(value = "派单/领取列表", businessType = BusinessType.QUERY)
|
||||||
@GetMapping("/dispatch/page")
|
@GetMapping("/dispatch/page")
|
||||||
|
|
@ -54,6 +55,7 @@ public class WrkInfoController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询待审核列表
|
* 查询待审核列表
|
||||||
|
* todo
|
||||||
*
|
*
|
||||||
* @param query 条件
|
* @param query 条件
|
||||||
*/
|
*/
|
||||||
|
|
@ -98,6 +100,7 @@ public class WrkInfoController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工单归档信息查询
|
* 工单归档信息查询
|
||||||
|
* todo
|
||||||
*/
|
*/
|
||||||
@SysLog(value = "工单归档信息", businessType = BusinessType.QUERY)
|
@SysLog(value = "工单归档信息", businessType = BusinessType.QUERY)
|
||||||
@GetMapping("/archive/page")
|
@GetMapping("/archive/page")
|
||||||
|
|
@ -108,6 +111,9 @@ public class WrkInfoController {
|
||||||
return AjaxResult.success(wrkInfoService.queryArchivePage(query));
|
return AjaxResult.success(wrkInfoService.queryArchivePage(query));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出工单 word
|
||||||
|
*/
|
||||||
@SysLog(value = "工单信息", businessType = BusinessType.DOWNLOAD)
|
@SysLog(value = "工单信息", businessType = BusinessType.DOWNLOAD)
|
||||||
@GetMapping("/archive/export")
|
@GetMapping("/archive/export")
|
||||||
@RequiresPermissions("wrk:archive:export")
|
@RequiresPermissions("wrk:archive:export")
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,10 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public interface WrkInfoMapper extends BaseMapper<WrkInfo> {
|
public interface WrkInfoMapper extends BaseMapper<WrkInfo> {
|
||||||
@DataScope(deptAlias = "i")
|
@DataScope(deptAlias = "i")
|
||||||
List<WrkDispatchVO> queryDispatchPage(@Param("query") WrkInfoQuery query,
|
List<WrkInfoDetailsVO> queryDispatchPage(@Param("query") WrkInfoQuery query,
|
||||||
Page<WrkDispatchVO> page);
|
Page<WrkInfoDetailsVO> page);
|
||||||
@DataScope(deptAlias = "i")
|
@DataScope(deptAlias = "i")
|
||||||
List<WrkAuditVO> queryArchivePage(@Param("query") ReviewedQuery query, Page<WrkAuditVO> page);
|
List<WrkInfoDetailsVO> queryArchivePage(@Param("query") ReviewedQuery query, Page<WrkInfoDetailsVO> page);
|
||||||
@DataScope(deptAlias = "i")
|
@DataScope(deptAlias = "i")
|
||||||
List<WrkListAppVO> queryAppPage(@Param("query") WrkAppQuery query, Page<WrkListAppVO> page);
|
List<WrkListAppVO> queryAppPage(@Param("query") WrkAppQuery query, Page<WrkListAppVO> page);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.chushang.inspection.work.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.chushang.inspection.work.po.WrkInfoTerminalInsRecord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/7/3 11:32
|
||||||
|
*/
|
||||||
|
public interface WrkInfoTerminalInsRecordMapper extends BaseMapper<WrkInfoTerminalInsRecord> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.chushang.inspection.work.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.chushang.inspection.work.po.WrkInfoTerminalInsRecord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/7/3 11:33
|
||||||
|
*/
|
||||||
|
public interface WrkInfoTerminalInsRecordService extends IService<WrkInfoTerminalInsRecord> {
|
||||||
|
}
|
||||||
|
|
@ -8,6 +8,10 @@ import cn.hutool.core.lang.Assert;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.http.HttpUtil;
|
||||||
|
import cn.hutool.json.JSONArray;
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
|
@ -17,6 +21,7 @@ import com.chushang.common.core.exception.utils.AssertUtil;
|
||||||
import com.chushang.common.core.util.DateUtils;
|
import com.chushang.common.core.util.DateUtils;
|
||||||
import com.chushang.common.core.util.IPUtils;
|
import com.chushang.common.core.util.IPUtils;
|
||||||
import com.chushang.common.core.web.Result;
|
import com.chushang.common.core.web.Result;
|
||||||
|
import com.chushang.common.dict.utils.DictUtils;
|
||||||
import com.chushang.common.mybatis.enums.Operator;
|
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;
|
||||||
|
|
@ -26,8 +31,10 @@ import com.chushang.inspection.project.service.InspectionDataService;
|
||||||
import com.chushang.inspection.terminal.po.FiveStore;
|
import com.chushang.inspection.terminal.po.FiveStore;
|
||||||
import com.chushang.inspection.terminal.po.Store;
|
import com.chushang.inspection.terminal.po.Store;
|
||||||
import com.chushang.inspection.terminal.po.Terminal;
|
import com.chushang.inspection.terminal.po.Terminal;
|
||||||
|
import com.chushang.inspection.terminal.po.TerminalIns;
|
||||||
import com.chushang.inspection.terminal.service.FiveStoreService;
|
import com.chushang.inspection.terminal.service.FiveStoreService;
|
||||||
import com.chushang.inspection.terminal.service.StoreService;
|
import com.chushang.inspection.terminal.service.StoreService;
|
||||||
|
import com.chushang.inspection.terminal.service.TerminalInsService;
|
||||||
import com.chushang.inspection.terminal.service.TerminalService;
|
import com.chushang.inspection.terminal.service.TerminalService;
|
||||||
import com.chushang.inspection.terminal.vo.FiveStoreVO;
|
import com.chushang.inspection.terminal.vo.FiveStoreVO;
|
||||||
import com.chushang.inspection.utils.StreamUtils;
|
import com.chushang.inspection.utils.StreamUtils;
|
||||||
|
|
@ -58,9 +65,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.*;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -81,12 +86,16 @@ public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> impl
|
||||||
@Resource
|
@Resource
|
||||||
WrkInfoTerminalRecordService wrkInfoTerminalRecordService;
|
WrkInfoTerminalRecordService wrkInfoTerminalRecordService;
|
||||||
@Resource
|
@Resource
|
||||||
|
WrkInfoTerminalInsRecordService wrkInfoTerminalInsRecordService;
|
||||||
|
@Resource
|
||||||
FiveStoreService fiveStoreService;
|
FiveStoreService fiveStoreService;
|
||||||
@Resource
|
@Resource
|
||||||
StoreService storeService;
|
StoreService storeService;
|
||||||
@Resource
|
@Resource
|
||||||
TerminalService terminalService;
|
TerminalService terminalService;
|
||||||
@Resource
|
@Resource
|
||||||
|
TerminalInsService terminalInsService;
|
||||||
|
@Resource
|
||||||
RemoteTaskService remoteTaskService;
|
RemoteTaskService remoteTaskService;
|
||||||
@Resource
|
@Resource
|
||||||
RemoteUserService userFeignService;
|
RemoteUserService userFeignService;
|
||||||
|
|
@ -102,8 +111,8 @@ public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> impl
|
||||||
public PageResult queryDispatchPage(WrkInfoQuery query) {
|
public PageResult queryDispatchPage(WrkInfoQuery query) {
|
||||||
CommonParam commonParam = CommonParam.buildPageRequest();
|
CommonParam commonParam = CommonParam.buildPageRequest();
|
||||||
WrapperUtils.buildSql(query);
|
WrapperUtils.buildSql(query);
|
||||||
Page<WrkDispatchVO> page = new Page<>(commonParam.getPage(), commonParam.getLimit());
|
Page<WrkInfoDetailsVO> page = new Page<>(commonParam.getPage(), commonParam.getLimit());
|
||||||
List<WrkDispatchVO> records = baseMapper.queryDispatchPage(query, page);
|
List<WrkInfoDetailsVO> records = baseMapper.queryDispatchPage(query, page);
|
||||||
return new PageResult(records, page);
|
return new PageResult(records, page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -111,8 +120,8 @@ public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> impl
|
||||||
public PageResult queryArchivePage(ReviewedQuery query) {
|
public PageResult queryArchivePage(ReviewedQuery query) {
|
||||||
CommonParam commonParam = CommonParam.buildPageRequest();
|
CommonParam commonParam = CommonParam.buildPageRequest();
|
||||||
WrapperUtils.buildSql(query);
|
WrapperUtils.buildSql(query);
|
||||||
Page<WrkAuditVO> page = new Page<>(commonParam.getPage(), commonParam.getLimit());
|
Page<WrkInfoDetailsVO> page = new Page<>(commonParam.getPage(), commonParam.getLimit());
|
||||||
List<WrkAuditVO> records = baseMapper.queryArchivePage(query, page);
|
List<WrkInfoDetailsVO> records = baseMapper.queryArchivePage(query, page);
|
||||||
return new PageResult(records, page);
|
return new PageResult(records, page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -188,7 +197,7 @@ public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> impl
|
||||||
public Long downInsTemplate(ReviewedQuery query) {
|
public Long downInsTemplate(ReviewedQuery query) {
|
||||||
// 先查询是否存在对应的记录
|
// 先查询是否存在对应的记录
|
||||||
WrapperUtils.buildSql(query);
|
WrapperUtils.buildSql(query);
|
||||||
Page<WrkAuditVO> page = new Page<>(1, 1);
|
Page<WrkInfoDetailsVO> page = new Page<>(1, 1);
|
||||||
baseMapper.queryArchivePage(query, page);
|
baseMapper.queryArchivePage(query, page);
|
||||||
// 必须 total 大于0, 才走下一步
|
// 必须 total 大于0, 才走下一步
|
||||||
AssertUtil.invalidate(page.getTotal() == 0, "下载信息为空");
|
AssertUtil.invalidate(page.getTotal() == 0, "下载信息为空");
|
||||||
|
|
@ -219,8 +228,6 @@ public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> impl
|
||||||
public void submit(WrkInfoDTO info) {
|
public void submit(WrkInfoDTO info) {
|
||||||
// 获取 任务的审核方式 1 无审核, 2 初审, 3 复审
|
// 获取 任务的审核方式 1 无审核, 2 初审, 3 复审
|
||||||
Integer reviewMethod = TaskConfigUtils.reviewMethod(info.getTaskId());
|
Integer reviewMethod = TaskConfigUtils.reviewMethod(info.getTaskId());
|
||||||
// // 获取工单信息
|
|
||||||
// WrkInfo wrkInfo = getById(info.getWrkId());
|
|
||||||
// 工单, 商户, 终端信息
|
// 工单, 商户, 终端信息
|
||||||
WrkInfoDetailsVO infoDetail = baseMapper.getWrkInfoDetails(info.getWrkId());
|
WrkInfoDetailsVO infoDetail = baseMapper.getWrkInfoDetails(info.getWrkId());
|
||||||
// 工单
|
// 工单
|
||||||
|
|
@ -235,89 +242,188 @@ public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> impl
|
||||||
WrkInfoStoreRecord tempStorageStore = BeanUtil.copyProperties(info, WrkInfoStoreRecord.class);
|
WrkInfoStoreRecord tempStorageStore = BeanUtil.copyProperties(info, WrkInfoStoreRecord.class);
|
||||||
// 暂存 终端信息
|
// 暂存 终端信息
|
||||||
WrkInfoTerminalRecord tempStorageTerminalRecord = BeanUtil.copyProperties(info, WrkInfoTerminalRecord.class);
|
WrkInfoTerminalRecord tempStorageTerminalRecord = BeanUtil.copyProperties(info, WrkInfoTerminalRecord.class);
|
||||||
// 工单状态比较 -- 7应该是暂存
|
// 终端 巡检信息
|
||||||
if (info.getWrkStatus() == 7) {
|
WrkInfoTerminalInsRecord tempStorageTerminalInsRecord = BeanUtil.copyProperties(info, WrkInfoTerminalInsRecord.class);
|
||||||
// geo
|
// geo
|
||||||
tempStorageStore.setWorkLocation(info.getGeographicLocation());
|
tempStorageTerminalInsRecord.setWorkLocation(info.getGeographicLocation());
|
||||||
tempStorageStore.setWorkAddress(info.getLocationAddress());
|
tempStorageTerminalInsRecord.setWorkAddress(info.getLocationAddress());
|
||||||
tempStorageStore.setWrkId(wrkInfo.getWrkId());
|
|
||||||
tempStorageTerminalRecord.setWrkId(wrkInfo.getWrkId());
|
tempStorageWrkInfo.setWrkId(wrkInfo.getWrkId());
|
||||||
tempStorageWrkInfo.setWrkId(wrkInfo.getWrkId());
|
tempStorageStore.setWrkId(wrkInfo.getWrkId());
|
||||||
// 修改 工单信息
|
tempStorageTerminalRecord.setWrkId(wrkInfo.getWrkId());
|
||||||
updateById(tempStorageWrkInfo);
|
tempStorageTerminalInsRecord.setWrkId(wrkInfo.getWrkId());
|
||||||
// 修改 商户信息
|
|
||||||
wrkInfoStoreRecordService.updateById(tempStorageStore);
|
|
||||||
// 修改 终端信息
|
|
||||||
wrkInfoTerminalRecordService.updateById(tempStorageTerminalRecord);
|
|
||||||
// 有巡检单并且巡检单不为空时, 去提交巡检单信息
|
|
||||||
if (TaskConfigUtils.isisInspection(info.getTaskId()) && CollUtil.isNotEmpty(info.getInspections())) {
|
|
||||||
inspectionDataService.submit(info);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
wrkInfo.setWrkStatus(info.getWrkStatus());
|
|
||||||
LocalDateTime now = LocalDateTime.now();
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
// 工单状态比较 -- 7应该是暂存
|
||||||
|
if (info.getWrkStatus() != 7) {
|
||||||
|
tempStorageWrkInfo.setWrkStatus(info.getWrkStatus());
|
||||||
|
tempStorageWrkInfo.setDisposeTime(now);
|
||||||
|
|
||||||
|
// // 修改 工单信息
|
||||||
|
// updateById(tempStorageWrkInfo);
|
||||||
|
// // 修改 商户信息
|
||||||
|
// wrkInfoStoreRecordService.updateById(tempStorageStore);
|
||||||
|
// // 修改 终端信息
|
||||||
|
// wrkInfoTerminalRecordService.updateById(tempStorageTerminalRecord);
|
||||||
|
// // 修改 终端巡检信息
|
||||||
|
// wrkInfoTerminalInsRecordService.updateById(tempStorageTerminalInsRecord);
|
||||||
|
// // 有巡检单并且巡检单不为空时, 去提交巡检单信息
|
||||||
|
// if (TaskConfigUtils.isisInspection(info.getTaskId()) && CollUtil.isNotEmpty(info.getInspections())) {
|
||||||
|
// inspectionDataService.submit(info);
|
||||||
|
// }
|
||||||
|
// return;
|
||||||
|
}
|
||||||
|
|
||||||
// 无需审核, 此处改变下 终端以及对应的商户信息
|
// 无需审核, 此处改变下 终端以及对应的商户信息
|
||||||
if (reviewMethod == 1) {
|
if (reviewMethod == 1) {
|
||||||
|
// 此处应当修改 商户记录表
|
||||||
// // 1. 修改工单
|
// // 1. 修改工单
|
||||||
// Assert.notNull(wrkInfo, "请确认此工单是否存在");
|
Assert.notNull(wrkInfo, "请确认此工单是否存在");
|
||||||
// Store store = BeanUtil.copyProperties(info, Store.class);
|
Store store = BeanUtil.copyProperties(info, Store.class);
|
||||||
// store.setStoreId(infoStore.getStoreId());
|
store.setStoreId(infoStore.getStoreId());
|
||||||
// // 更新商户 信息, 同时 也需要更新
|
Long terminalId = infoTerminal.getTerminalId();
|
||||||
// Assert.isTrue(storeService.updateById(store), "更新商户失败");
|
Terminal terminal = BeanUtil.copyProperties(info, Terminal.class);
|
||||||
//
|
TerminalIns terminalIns = terminalInsService.getById(terminalId);
|
||||||
// Terminal terminal = BeanUtil.copyProperties(info, Terminal.class);
|
// 终端附加信息 不为空
|
||||||
// terminal.setOccupy(0);
|
AssertUtil.invalidate(ObjectUtil.isEmpty(terminalIns), "终端获取为空");
|
||||||
// terminal.setTerminalId(infoTerminal.getTerminalId());
|
// 拷贝复制 一些 提交的终端信息
|
||||||
// terminal.setInspectionTime(now);
|
BeanUtil.copyProperties(info, terminalIns);
|
||||||
// terminal.setTerminalStatus(1);
|
terminal.setTerminalId(terminalId);
|
||||||
// terminal.setServiceResult(info.getServiceResult());
|
// 解除终端占用
|
||||||
// Integer timesPass = terminalService.getById(terminalId).getTimesPass();
|
terminal.setOccupy(0);
|
||||||
// terminal.setTimesPass(timesPass == null ? 1 : timesPass + 1);
|
terminalIns.setTerminalId(terminalId);
|
||||||
// getMerState(wrkInfo, terminal);
|
// 设置 巡检时间为当前
|
||||||
// // 更新终端信息? 为啥要更新终端
|
terminalIns.setInspectionTime(now);
|
||||||
// Assert.isTrue(terminalService.updateById(terminal), "解除终端占用失败");
|
// 设置终端状态为 已巡检
|
||||||
} else if (reviewMethod == 2) {
|
terminal.setTerminalStatus(1);
|
||||||
// Assert.isTrue(wrkInfo.getState().equals(1) || wrkInfo.getState().equals(5),
|
// 本次巡检结果, 取字典表数据
|
||||||
// "【{}】此状态无法提交,指定的审核方式为初审,只有已分配和初审拒绝可以提交",
|
terminalIns.setServiceResult(info.getServiceResult());
|
||||||
// DictUtils.getWrkStatusLabel(wrkInfo.getState()));
|
// 设置 审核通过次数 + 1
|
||||||
//
|
Integer timesPass = terminalIns.getTimesPass();
|
||||||
// wrkInfo.setState(2);
|
terminalIns.setTimesPass(timesPass == null ? 1 : timesPass + 1);
|
||||||
//
|
// 修改 终端的状态
|
||||||
// BeanUtil.copyProperties(info, wrkInfo, "geographicLocation", "locationAddress", "state");
|
getMerState(info, terminal, store);
|
||||||
|
|
||||||
} else {
|
tempStorageStore.setStoreStatus(store.getState());
|
||||||
// Assert.isFalse(ListUtil.toList(2, 3, 4).contains(wrkInfo.getState()),
|
tempStorageTerminalInsRecord.setTimesPass(timesPass);
|
||||||
// "【{}】此状态无法提交,指定的审核方式为复审,只有已分配,初审拒绝或复审拒绝可以提交",
|
tempStorageTerminalInsRecord.setInspectionStatus(1);
|
||||||
// DictUtils.getWrkStatusLabel(wrkInfo.getState()));
|
tempStorageTerminalInsRecord.setInspectionTime(now);
|
||||||
// // 审核(处,复)拒绝 都需要初审
|
|
||||||
// if (ListUtil.toList(1, 5, 6).contains(wrkInfo.getState())) {
|
// 更新商户 信息, 同时 也需要更新
|
||||||
// wrkInfo.setState(2);
|
// 更新商户状态
|
||||||
// } else {
|
storeService.updateById(store);
|
||||||
// wrkInfo.setState(3);
|
// 更新终端状态
|
||||||
// }
|
terminalService.updateById(terminal);
|
||||||
//
|
// 更新终端巡检时间以及审核通过次数等
|
||||||
// BeanUtil.copyProperties(info, wrkInfo, "geographic_location", "location_address", "state");
|
terminalInsService.updateById(terminalIns);
|
||||||
|
// 还需要 更改 记录表对应的数据.
|
||||||
}
|
}
|
||||||
|
// 需要初审
|
||||||
|
else if (reviewMethod == 2) {
|
||||||
|
AssertUtil.invalidate(wrkInfo.getWrkStatus().equals(1) || wrkInfo.getWrkStatus().equals(5),
|
||||||
|
String.format("【%s】此状态无法提交,指定的审核方式为初审,只有已分配和初审拒绝可以提交",
|
||||||
|
DictUtils.getDictLabel("wrk_status",wrkInfo.getWrkStatus()+""))
|
||||||
|
);
|
||||||
|
tempStorageWrkInfo.setWrkStatus(2);
|
||||||
|
}
|
||||||
|
// 需要复审
|
||||||
|
else if (reviewMethod == 3){
|
||||||
|
Assert.isFalse(ListUtil.toList(2, 3, 4).contains(wrkInfo.getWrkStatus()),
|
||||||
|
String.format("【%s】此状态无法提交,指定的审核方式为复审,只有已分配,初审拒绝或复审拒绝可以提交",
|
||||||
|
DictUtils.getDictWrkStatusLabel(wrkInfo.getWrkStatus()+""))
|
||||||
|
);
|
||||||
|
// 审核(处,复)拒绝 都需要初审
|
||||||
|
if (ListUtil.toList(1, 5, 6).contains(wrkInfo.getWrkStatus())) {
|
||||||
|
tempStorageWrkInfo.setWrkStatus(2);
|
||||||
|
} else {
|
||||||
|
tempStorageWrkInfo.setWrkStatus(3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 偏差
|
||||||
|
Long deviation = StrUtil.isNotEmpty(tempStorageTerminalInsRecord.getGeographicLocation())
|
||||||
|
? distance(tempStorageTerminalInsRecord.getGeographicLocation(), tempStorageTerminalInsRecord.getWorkLocation()) : null;
|
||||||
|
// 偏差(直线距离 米)
|
||||||
|
tempStorageTerminalInsRecord.setDeviation(deviation);
|
||||||
|
|
||||||
// wrkInfo.setDisposeTime(now);
|
updateById(tempStorageWrkInfo);
|
||||||
// wrkInfo.setWorkLocation(info.getGeographicLocation());
|
// 修改 商户信息
|
||||||
// wrkInfo.setWorkAdderss(info.getLocationAddress());
|
wrkInfoStoreRecordService.updateById(tempStorageStore);
|
||||||
//
|
// 修改 终端信息
|
||||||
// Long deviation = StrUtil.isNotEmpty(wrkInfo.getGeographicLocation()) ? distance(wrkInfo.getGeographicLocation(), wrkInfo.getWorkLocation()) : null;
|
wrkInfoTerminalRecordService.updateById(tempStorageTerminalRecord);
|
||||||
//
|
// 修改 终端对应巡检信息
|
||||||
// wrkInfo.setDeviation(deviation);
|
wrkInfoTerminalInsRecordService.updateById(tempStorageTerminalInsRecord);
|
||||||
//
|
if (TaskConfigUtils.isisInspection(info.getTaskId()) && CollUtil.isNotEmpty(info.getInspections())) {
|
||||||
//// Assert.isTrue(mapper.update(wrkInfo) == 1, "提交失败");
|
inspectionDataService.submit(info);
|
||||||
// // 修改 工单信息
|
}
|
||||||
// updateById(tempStorageWrkInfo);
|
}
|
||||||
// // 修改 商户信息
|
|
||||||
// wrkInfoStoreRecordService.updateById(tempStorageStore);
|
/**
|
||||||
// // 修改 终端信息
|
* 计算经纬度 偏差
|
||||||
// wrkInfoTerminalRecordService.updateById(tempStorageTerminalRecord);
|
*/
|
||||||
// if (TaskConfigUtils.isisInspection(info.getTaskId()) && CollUtil.isNotEmpty(info.getInspections())) {
|
private Long distance(String origins, String destination) {
|
||||||
// dataService.submit(info);
|
HashMap<String, Object> map = new HashMap<>() {{
|
||||||
// }
|
put("origins", origins);
|
||||||
|
put("destination", destination);
|
||||||
|
put("type", 0);
|
||||||
|
put("output", "JSON");
|
||||||
|
put("key", "630449710597f6cdb7b6210fc1ab1063");
|
||||||
|
}};
|
||||||
|
|
||||||
|
try {
|
||||||
|
String value = HttpUtil.get("https://restapi.amap.com/v3/distance", map);
|
||||||
|
JSONObject jsonObject = JSONUtil.parseObj(value);
|
||||||
|
JSONArray results = jsonObject.getJSONArray("results");
|
||||||
|
if (jsonObject.getInt("status") == 1 && results != null && !results.isEmpty()) {
|
||||||
|
return JSONUtil.parseObj(results.get(0)).getLong("distance");
|
||||||
|
} else if ("DAILY_QUERY_OVER_LIMIT".equals(jsonObject.getStr("info"))) {
|
||||||
|
return (long) -2;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("获取位置信息失败");
|
||||||
|
}
|
||||||
|
return (long) -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取商户状态
|
||||||
|
*/
|
||||||
|
private void getMerState(WrkInfoDTO info, Terminal record, Store store) {
|
||||||
|
|
||||||
|
// 2023年4月19号修改 : 市场部
|
||||||
|
//撤机 两种情况下归属撤机
|
||||||
|
|
||||||
|
//异常 四种情况归为异常
|
||||||
|
// 不管是撤机还是异常 只有在审核通过之后才改变状态
|
||||||
|
// 审核拒绝之后 撤回 回归原来状态
|
||||||
|
|
||||||
|
// 撤机 1 机具状态 选择 银行撤机 2 工单类型选择 撤机
|
||||||
|
if (DictUtils.getDictLabel("terminal_status", "银行撤机").equals(info.getTerminalStatus()+"") ||
|
||||||
|
DictUtils.getDictLabel("wrk_type","撤机").equals(info.getWorkType() + "")) {
|
||||||
|
//设置商户状态为异常
|
||||||
|
store.setState(Integer.valueOf(Objects.requireNonNull(DictUtils.getDictValue("mer_status", "异常"))));
|
||||||
|
// 添加备注
|
||||||
|
// 终端状态
|
||||||
|
// 终端状态改为 已经撤机, 此处可能会改为 异常
|
||||||
|
record.setTerminalStatus(Integer.valueOf(DictUtils.getDictLabel("terminal_status", "银行撤机")));
|
||||||
|
record.setRemark(DictUtils.getDictLabel("terminal_status", info.getTerminalStatus() + ""));
|
||||||
|
|
||||||
|
}
|
||||||
|
// 异常 服务结果 选择 原址无此终端 和 原址无此商户 机具状态 选择 设备丢失 门店状态 选择 门店不存在
|
||||||
|
else if (DictUtils.getDictLabel("terminal_status","设备丢失").equals(info.getTerminalStatus() + "") ||
|
||||||
|
// 门店状态
|
||||||
|
DictUtils.getDictLabel("store_status","门店不存在").equals(info.getStoreStatus() + "") ||
|
||||||
|
// service_results 服务结果
|
||||||
|
List.of(DictUtils.getDictLabel("service_results","原址无此终端"), DictUtils.getDictLabel("service_results","原址无此商户"))
|
||||||
|
.contains(info.getServiceResult() + "")) {
|
||||||
|
// 设置商户状态为异常
|
||||||
|
//设置商户状态为异常
|
||||||
|
store.setState(Integer.valueOf(Objects.requireNonNull(DictUtils.getDictValue("mer_status", "异常"))));
|
||||||
|
record.setRemark(DictUtils.getDictLabel("terminal_status", info.getTerminalStatus() + ""));
|
||||||
|
} else {
|
||||||
|
// 商户正常
|
||||||
|
store.setState(Integer.valueOf(Objects.requireNonNull(DictUtils.getDictValue("mer_status", "正常"))));
|
||||||
|
// 终端正常
|
||||||
|
record.setRemark(DictUtils.getDictLabel("terminal_status", info.getTerminalStatus() + ""));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -399,12 +505,17 @@ public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> impl
|
||||||
for (DispatchDTO dispatchDTO : dispatch){
|
for (DispatchDTO dispatchDTO : dispatch){
|
||||||
Assert.notNull(nickName, "【{}】未设置商户", dispatchDTO.getAccountManager());
|
Assert.notNull(nickName, "【{}】未设置商户", dispatchDTO.getAccountManager());
|
||||||
WrkInfo wrkInfo = makeWrkInfoEntity(dispatchDTO, query, query.getUserId(), dispatchDTO.getAccountManager(), method);
|
WrkInfo wrkInfo = makeWrkInfoEntity(dispatchDTO, query, query.getUserId(), dispatchDTO.getAccountManager(), method);
|
||||||
// 组装wrkinfo实体
|
// 工单信息
|
||||||
save(wrkInfo);
|
save(wrkInfo);
|
||||||
//组装wrkterminal 实体
|
//终端信息
|
||||||
WrkInfoTerminalRecord wrkInfoTerminalRecord = BeanUtil.copyProperties(dispatchDTO, WrkInfoTerminalRecord.class);
|
WrkInfoTerminalRecord wrkInfoTerminalRecord = BeanUtil.copyProperties(dispatchDTO, WrkInfoTerminalRecord.class);
|
||||||
wrkInfoTerminalRecord.setWrkId(wrkInfo.getWrkId());
|
wrkInfoTerminalRecord.setWrkId(wrkInfo.getWrkId());
|
||||||
wrkInfoTerminalRecordService.save(wrkInfoTerminalRecord);
|
wrkInfoTerminalRecordService.save(wrkInfoTerminalRecord);
|
||||||
|
// 终端巡检信息
|
||||||
|
WrkInfoTerminalInsRecord wrkInfoTerminalInsRecord = BeanUtil.copyProperties(dispatchDTO, WrkInfoTerminalInsRecord.class);
|
||||||
|
wrkInfoTerminalInsRecord.setWrkId(wrkInfo.getWrkId());
|
||||||
|
wrkInfoTerminalInsRecordService.save(wrkInfoTerminalInsRecord);
|
||||||
|
// 商户信息
|
||||||
WrkInfoStoreRecord wrkInfoStoreRecord = BeanUtil.copyProperties(dispatchDTO, WrkInfoStoreRecord.class);
|
WrkInfoStoreRecord wrkInfoStoreRecord = BeanUtil.copyProperties(dispatchDTO, WrkInfoStoreRecord.class);
|
||||||
wrkInfoStoreRecord.setWrkId(wrkInfo.getWrkId());
|
wrkInfoStoreRecord.setWrkId(wrkInfo.getWrkId());
|
||||||
wrkInfoStoreRecordService.save(wrkInfoStoreRecord);
|
wrkInfoStoreRecordService.save(wrkInfoStoreRecord);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.chushang.inspection.work.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.chushang.inspection.work.mapper.WrkInfoTerminalInsRecordMapper;
|
||||||
|
import com.chushang.inspection.work.po.WrkInfoTerminalInsRecord;
|
||||||
|
import com.chushang.inspection.work.service.WrkInfoTerminalInsRecordService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/7/3 11:33
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class WrkInfoTerminalInsRecordServiceImpl extends
|
||||||
|
ServiceImpl<WrkInfoTerminalInsRecordMapper, WrkInfoTerminalInsRecord> implements WrkInfoTerminalInsRecordService {
|
||||||
|
}
|
||||||
|
|
@ -1,47 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!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.StoreMapper">
|
<mapper namespace="com.chushang.inspection.terminal.mapper.StoreMapper">
|
||||||
<resultMap id="BaseResultMap" type="com.chushang.inspection.terminal.po.Store">
|
|
||||||
<!--@mbg.generated-->
|
|
||||||
<!--@Table st_store-->
|
|
||||||
<id column="store_id" jdbcType="BIGINT" property="storeId" />
|
|
||||||
<result column="task_id" jdbcType="BIGINT" property="taskId" />
|
|
||||||
<result column="lower_task_id" jdbcType="BIGINT" property="lowerTaskId" />
|
|
||||||
<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="register_time" jdbcType="TIMESTAMP" property="registerTime" />
|
|
||||||
<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="account_manager" jdbcType="VARCHAR" property="accountManager" />
|
|
||||||
<result column="account_phone" jdbcType="VARCHAR" property="accountPhone" />
|
|
||||||
<result column="register_address" jdbcType="VARCHAR" property="registerAddress" />
|
|
||||||
<result column="dept_id" jdbcType="BIGINT" property="deptId" />
|
|
||||||
<result column="legal_name" jdbcType="VARCHAR" property="legalName" />
|
|
||||||
<result column="is_enter" jdbcType="TINYINT" property="isEnter" />
|
|
||||||
<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="state" property="state" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
<!--@mbg.generated-->
|
|
||||||
store_id, task_id, lower_task_id, store_no, store_name, store_contact, store_phone,
|
|
||||||
store_address, special_num, shop_name, register_time, store_type, products, tip_tool,
|
|
||||||
admin_id, ins_fre, account_manager, account_phone, register_address, dept_id, legal_name,
|
|
||||||
is_enter, version, del_state, create_by, create_time, update_by, update_time,state
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="pageList" resultType="com.chushang.inspection.terminal.vo.StoreVO">
|
<select id="pageList" resultType="com.chushang.inspection.terminal.vo.StoreVO">
|
||||||
SELECT s.store_id AS storeId,
|
SELECT s.store_id AS storeId,
|
||||||
s.store_no AS storeNo,
|
s.store_no AS storeNo,
|
||||||
|
|
|
||||||
|
|
@ -55,107 +55,86 @@
|
||||||
update_time
|
update_time
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="pageList" resultType="com.chushang.inspection.terminal.vo.TerminalVO">
|
<select id="pageList" resultType="com.chushang.inspection.terminal.vo.StoreTerminalVO">
|
||||||
SELECT
|
<include refid="selectStoreTerminalSql"/>
|
||||||
s.state AS storeState,
|
|
||||||
s.store_name AS storeName,
|
|
||||||
t.store_id AS storeId,
|
|
||||||
t.store_no AS storeNo,
|
|
||||||
t.terminal_id AS terminalId,
|
|
||||||
t.terminal_no AS terminalNo,
|
|
||||||
t.terminal_sn AS terminalSn,
|
|
||||||
t.terminal_type As terminalType,
|
|
||||||
t.terminal_model AS terminalModel,
|
|
||||||
t.terminal_version AS terminalVersion,
|
|
||||||
t.terminal_address AS terminalAddress,
|
|
||||||
t.occupy,
|
|
||||||
t.create_time AS createTime,
|
|
||||||
t.terminal_status AS terminalStatus,
|
|
||||||
t.lower_task_id AS lowerTaskId,
|
|
||||||
t.dept_id AS deptId,
|
|
||||||
ts.inspection_status as inspectionStatus,
|
|
||||||
ts.deviation AS deviation,
|
|
||||||
ts.admin_id AS operatorId,
|
|
||||||
ts.inspection_time AS inspectionTime,
|
|
||||||
t3.name pollingName
|
|
||||||
FROM st_terminal t
|
|
||||||
LEFT JOIN st_store s ON t.store_id = s.store_id
|
|
||||||
LEFT JOIN st_terminal_ins ts on t.terminal_id = ts.terminal_id
|
|
||||||
LEFT JOIN ta_polling_task t3 on t3.id = t.task_id
|
|
||||||
<where>
|
<where>
|
||||||
<if test="query.taskId != null">
|
<if test="1 == 1">
|
||||||
AND t.task_id = #{query.taskId}
|
${query.sqlParam.get('sqlWhere')}
|
||||||
</if>
|
|
||||||
<if test="query.storeNo != null">
|
|
||||||
AND t.store_no = #{query.storeNo}
|
|
||||||
</if>
|
|
||||||
<if test="query.terminalNo != null">
|
|
||||||
AND t.terminal_no = #{query.terminalNo}
|
|
||||||
</if>
|
|
||||||
<if test="query.terminalSn != null">
|
|
||||||
AND t.terminal_sn = #{query.terminalSn}
|
|
||||||
</if>
|
|
||||||
<if test="query.terminalType != null">
|
|
||||||
AND t.terminal_type = #{query.terminalType}
|
|
||||||
</if>
|
|
||||||
<if test="query.terminalSource != null">
|
|
||||||
AND t.terminal_source = #{query.terminalSource}
|
|
||||||
</if>
|
|
||||||
<if test="query.terminalVersion != null">
|
|
||||||
AND t.terminal_version = #{query.terminalVersion}
|
|
||||||
</if>
|
|
||||||
<if test="query.terminalAddress != null and query.terminalAddress != ''">
|
|
||||||
AND t.terminal_address like concat('%', #{query.terminalAddress}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="query.terminalModel != null and query.terminalModel != ''">
|
|
||||||
AND t.terminal_model like concat('%', #{query.terminalModel}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="query.lowerTaskIds != null and query.lowerTaskIds.size() > 0">
|
|
||||||
AND t.lower_task_id IN
|
|
||||||
<foreach collection="query.lowerTaskIds" item="lowerTaskId" open="(" close=")" separator=",">
|
|
||||||
#{lowerTaskId}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
<if test="query.storeName != null and query.storeName != ''">
|
|
||||||
AND s.store_name like concat('%', #{query.storeName}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="query.storeState != null ">
|
|
||||||
AND s.state = #{query.storeState}
|
|
||||||
</if>
|
|
||||||
<if test="query.inspectionStatus != null ">
|
|
||||||
AND ts.inspection_status = #{query.inspectionStatus}
|
|
||||||
</if>
|
|
||||||
<if test="query.createTimes != null and query.createTimes.size() > 0">
|
|
||||||
AND t.create_time BETWEEN #{query.createTimes[0]} AND #{query.createTimes[1]}
|
|
||||||
</if>
|
|
||||||
<if test="query.inspectionTime != null and query.inspectionTime.size() > 0">
|
|
||||||
AND ts.inspection_time BETWEEN #{query.inspectionTime[0]} AND #{query.inspectionTime[1]}
|
|
||||||
</if>
|
|
||||||
<if test="1==1">
|
|
||||||
${query.sqlParam.get('dataScope')}
|
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY #{query.orderBy} #{query.isAsc}
|
ORDER BY #{query.orderBy} #{query.isAsc}
|
||||||
</select>
|
</select>
|
||||||
|
<sql id="selectStoreTerminalSql">
|
||||||
|
SELECT pt.project_id AS projectId,
|
||||||
|
p.project_name AS projectName,
|
||||||
|
pt.id AS task_id,
|
||||||
|
pt.`name` AS taskName,
|
||||||
|
s.lower_task_id AS lowerTaskId,
|
||||||
|
s.dept_id AS deptId,
|
||||||
|
s.store_id AS storeId,
|
||||||
|
s.store_no AS storeNo,
|
||||||
|
s.store_name AS storeName,
|
||||||
|
s.store_contact AS storeContact,
|
||||||
|
s.store_phone AS storePhone,
|
||||||
|
s.shop_name AS shopName,
|
||||||
|
s.special_num AS specialNum,
|
||||||
|
s.store_address AS storeAddress,
|
||||||
|
s.store_type AS storeType,
|
||||||
|
s.products AS products,
|
||||||
|
s.tip_tool AS tipTool,
|
||||||
|
s.register_time AS registerTime,
|
||||||
|
s.register_address AS registerAddress,
|
||||||
|
s.legal_name AS legalName,
|
||||||
|
s.create_by AS createBy,
|
||||||
|
s.create_time AS createTime,
|
||||||
|
s.state AS storeState,
|
||||||
|
s.ins_fre AS insFre,
|
||||||
|
s.account_phone AS accountPhone,
|
||||||
|
s.account_manager AS accountManager,
|
||||||
|
t.terminal_id AS terminalId,
|
||||||
|
t.terminal_no AS terminalNo,
|
||||||
|
t.terminal_sn AS terminalSn,
|
||||||
|
t.terminal_type AS terminalType,
|
||||||
|
t.terminal_model AS terminalModel,
|
||||||
|
t.terminal_version AS terminalVersion,
|
||||||
|
t.terminal_address AS terminalAddress,
|
||||||
|
t.terminal_source AS terminalSource,
|
||||||
|
t.occupy AS occupy,
|
||||||
|
t.terminal_status AS terminalStatus,
|
||||||
|
ti.deviation AS deviation,
|
||||||
|
ti.operator_id AS operatorId,
|
||||||
|
ti.inspection_status AS inspectionStatus,
|
||||||
|
ti.inspection_time AS inspectionTime,
|
||||||
|
ti.times_pass AS timesPass,
|
||||||
|
ti.service_result AS serviceResult,
|
||||||
|
ti.geographic_address AS geographicAddress,
|
||||||
|
ti.geographic_location AS geographicLocation,
|
||||||
|
ti.work_location AS workLocation,
|
||||||
|
ti.work_adderss AS workAdderss
|
||||||
|
FROM st_terminal t
|
||||||
|
INNER JOIN st_store s ON t.store_id = s.store_id
|
||||||
|
INNER JOIN st_terminal_ins ti ON t.terminal_id = ti.terminal_id
|
||||||
|
INNER JOIN ta_polling_task pt ON t.task_id = pt.id
|
||||||
|
INNER JOIN wrk_project p ON pt.project_id = p.project_id
|
||||||
|
</sql>
|
||||||
<select id="selectPageApp" resultType="com.chushang.inspection.project.vo.TerminalAppVO">
|
<select id="selectPageApp" resultType="com.chushang.inspection.project.vo.TerminalAppVO">
|
||||||
SELECT
|
SELECT
|
||||||
t.terminal_id,
|
t.terminal_id,
|
||||||
t.terminal_no,
|
t.terminal_no,
|
||||||
t.terminal_address,
|
t.terminal_address,
|
||||||
t.inspection_status,
|
t.inspection_status,
|
||||||
t.inspection_time,
|
t.inspection_time,
|
||||||
t.times_pass,
|
t.times_pass,
|
||||||
t.service_result,
|
t.service_result,
|
||||||
s.store_contact,
|
s.store_contact,
|
||||||
s.store_address,
|
s.store_address,
|
||||||
s.ins_fre,
|
s.ins_fre,
|
||||||
s.store_name,
|
s.store_name,
|
||||||
pt.`name` AS taskName
|
pt.`name` AS taskName
|
||||||
FROM
|
FROM
|
||||||
st_terminal t
|
st_terminal t
|
||||||
LEFT JOIN ta_polling_task pt on pt.id = t.lower_task_id
|
LEFT JOIN ta_polling_task pt on pt.id = t.lower_task_id
|
||||||
INNER JOIN st_store s ON s.store_id = t.store_id
|
INNER JOIN st_store s ON s.store_id = t.store_id
|
||||||
<where>
|
<where>
|
||||||
<if test="query.taskId != null">
|
<if test="query.taskId != null">
|
||||||
AND t.task_id = #{query.taskId}
|
AND t.task_id = #{query.taskId}
|
||||||
|
|
@ -200,7 +179,6 @@
|
||||||
ORDER BY t.create_time DESC
|
ORDER BY t.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="getStoreByTasKIdOrIds" resultType="com.chushang.inspection.work.dto.DispatchDTO">
|
<select id="getStoreByTasKIdOrIds" resultType="com.chushang.inspection.work.dto.DispatchDTO">
|
||||||
select t1.terminal_id,
|
select t1.terminal_id,
|
||||||
t1.terminal_sn,
|
t1.terminal_sn,
|
||||||
|
|
@ -234,7 +212,7 @@
|
||||||
t3.geographic_address
|
t3.geographic_address
|
||||||
from st_terminal t1
|
from st_terminal t1
|
||||||
left join st_store t2 on t1.store_id = t2.store_id
|
left join st_store t2 on t1.store_id = t2.store_id
|
||||||
left join st_terminal_ins t3 on t3.terminal_id = t1.terminal_id
|
left join st_terminal_ins t3 on t3.terminal_id = t1.terminal_id
|
||||||
|
|
||||||
<where>
|
<where>
|
||||||
<if test="query.taskId != null">
|
<if test="query.taskId != null">
|
||||||
|
|
@ -246,5 +224,4 @@
|
||||||
</where>
|
</where>
|
||||||
ORDER BY t.create_time DESC
|
ORDER BY t.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -1,64 +1,16 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!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.WrkInfoMapper">
|
<mapper namespace="com.chushang.inspection.work.mapper.WrkInfoMapper">
|
||||||
<select id="queryDispatchPage" resultType="com.chushang.inspection.work.vo.WrkDispatchVO">
|
<select id="queryDispatchPage" resultType="com.chushang.inspection.work.vo.WrkInfoDetailsVO">
|
||||||
SELECT i.wrk_id AS wrkId,
|
<include refid="wrkInfoDetailSql" />
|
||||||
i.user_name AS userName,
|
|
||||||
i.user_id AS userId,
|
|
||||||
i.dept_id AS deptId,
|
|
||||||
i.dept_name AS deptName,
|
|
||||||
i.work_type AS workType,
|
|
||||||
i.work_no AS workNo,
|
|
||||||
i.work_sort AS workSort,
|
|
||||||
i.remark AS remark,
|
|
||||||
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,
|
|
||||||
itr.terminal_id AS terminalId,
|
|
||||||
itr.terminal_no AS terminalNo,
|
|
||||||
itr.terminal_sn AS terminalSn,
|
|
||||||
itr.terminal_type AS terminalType,
|
|
||||||
itr.terminal_model AS terminalModel
|
|
||||||
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 i.del_state = 0
|
|
||||||
<if test="1 == 1">
|
<if test="1 == 1">
|
||||||
${query.sqlParam.get('sqlWhere')}
|
${query.sqlParam.get('sqlWhere')}
|
||||||
</if>
|
</if>
|
||||||
ORDER BY i.create_time desc
|
ORDER BY i.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="queryArchivePage" resultType="com.chushang.inspection.work.vo.WrkAuditVO">
|
<select id="queryArchivePage" resultType="com.chushang.inspection.work.vo.WrkInfoDetailsVO">
|
||||||
SELECT i.wrk_id AS wrkId,
|
<include refid="wrkInfoDetailSql" />
|
||||||
i.work_no AS workNo,
|
|
||||||
isr.store_no AS storeNo,
|
|
||||||
isr.store_id AS storeId,
|
|
||||||
i.user_id AS userId,
|
|
||||||
i.user_name AS userName,
|
|
||||||
itr.terminal_id AS terminalId,
|
|
||||||
itr.terminal_no AS terminalNo,
|
|
||||||
i.work_type AS workType,
|
|
||||||
isr.ins_fre AS insFre,
|
|
||||||
i.wrk_status AS wrkStatus,
|
|
||||||
isr.geographic_location AS geographicLocation,
|
|
||||||
isr.location_address AS locationAddress,
|
|
||||||
isr.deviation AS deviation,
|
|
||||||
i.dispose_time AS disposeTime,
|
|
||||||
i.create_by AS createBy,
|
|
||||||
i.create_time AS createTime,
|
|
||||||
i.task_id AS taskId,
|
|
||||||
i.task_name AS taskName,
|
|
||||||
i.lower_task_id AS lowerTaskId,
|
|
||||||
i.lower_task_name AS lowerTaskName
|
|
||||||
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 i.del_state = 0
|
|
||||||
<if test="1 == 1">
|
<if test="1 == 1">
|
||||||
${query.sqlParam.get('sqlWhere')}
|
${query.sqlParam.get('sqlWhere')}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -134,12 +86,9 @@
|
||||||
</association>
|
</association>
|
||||||
<association property="infoStore" javaType="com.chushang.inspection.work.vo.WrkInfoStoreVO">
|
<association property="infoStore" javaType="com.chushang.inspection.work.vo.WrkInfoStoreVO">
|
||||||
<id column="store_id" property="storeId" />
|
<id column="store_id" property="storeId" />
|
||||||
<result column="deviation" property="deviation" />
|
|
||||||
<result column="geographic_location" property="geographicLocation" />
|
|
||||||
<result column="ins_fre" property="insFre" />
|
<result column="ins_fre" property="insFre" />
|
||||||
<result column="legal_name" property="legalName" />
|
<result column="legal_name" property="legalName" />
|
||||||
<result column="location_address" property="locationAddress" />
|
|
||||||
<result column="pre_code_encoding" property="preCodeEncoding" />
|
|
||||||
<result column="products" property="products" />
|
<result column="products" property="products" />
|
||||||
<result column="register_address" property="registerAddress" />
|
<result column="register_address" property="registerAddress" />
|
||||||
<result column="shop_name" property="shopName" />
|
<result column="shop_name" property="shopName" />
|
||||||
|
|
@ -152,12 +101,9 @@
|
||||||
<result column="store_status" property="storeStatus" />
|
<result column="store_status" property="storeStatus" />
|
||||||
<result column="store_type" property="storeType" />
|
<result column="store_type" property="storeType" />
|
||||||
<result column="tip_tool" property="tipTool" />
|
<result column="tip_tool" property="tipTool" />
|
||||||
<result column="work_adderss" property="workAddress" />
|
|
||||||
<result column="work_location" property="workLocation" />
|
|
||||||
</association>
|
</association>
|
||||||
<association property="infoTerminal" javaType="com.chushang.inspection.work.vo.WrkInfoTerminalVO">
|
<association property="infoTerminal" javaType="com.chushang.inspection.work.vo.WrkInfoTerminalVO">
|
||||||
<id column="terminal_id" property="terminalId" />
|
<id column="terminal_id" property="terminalId" />
|
||||||
<result column="occupy" property="occupy" />
|
|
||||||
<result column="terminal_address" property="terminalAddress" />
|
<result column="terminal_address" property="terminalAddress" />
|
||||||
<result column="terminal_model" property="terminalModel" />
|
<result column="terminal_model" property="terminalModel" />
|
||||||
<result column="terminal_no" property="terminalNo" />
|
<result column="terminal_no" property="terminalNo" />
|
||||||
|
|
@ -168,6 +114,21 @@
|
||||||
<result column="terminal_type" property="terminalType" />
|
<result column="terminal_type" property="terminalType" />
|
||||||
<result column="terminal_version" property="terminalVersion" />
|
<result column="terminal_version" property="terminalVersion" />
|
||||||
</association>
|
</association>
|
||||||
|
<association property="infoTerminalIns" javaType="com.chushang.inspection.work.vo.WrkInfoTerminalInsVO">
|
||||||
|
<id column="terminal_id" property="terminalId" />
|
||||||
|
<result column="deviation" property="deviation" />
|
||||||
|
<result column="geographic_location" property="geographicLocation" />
|
||||||
|
<result column="work_adderss" property="workAddress" />
|
||||||
|
<result column="work_location" property="workLocation" />
|
||||||
|
<result column="geographic_address" property="locationAddress" />
|
||||||
|
<result column="pre_code_encoding" property="preCodeEncoding" />
|
||||||
|
<result column="service_result" property="serviceResult" />
|
||||||
|
<result column="storage_time" property="storageTime" />
|
||||||
|
<result column="times_pass" property="timesPass" />
|
||||||
|
<result column="delivery_time" property="deliveryTime" />
|
||||||
|
<result column="inspection_status" property="inspectionStatus" />
|
||||||
|
<result column="inspection_time" property="inspectionTime" />
|
||||||
|
</association>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<select id="listInsTemplate" resultType="com.chushang.inspection.work.vo.WrkInfoDetailsVO">
|
<select id="listInsTemplate" resultType="com.chushang.inspection.work.vo.WrkInfoDetailsVO">
|
||||||
<include refid="wrkInfoDetailSql" />
|
<include refid="wrkInfoDetailSql" />
|
||||||
|
|
@ -206,6 +167,7 @@
|
||||||
i.`lower_task_name`,
|
i.`lower_task_name`,
|
||||||
i.`dept_name`,
|
i.`dept_name`,
|
||||||
i.`wrk_status`,
|
i.`wrk_status`,
|
||||||
|
|
||||||
isr.`store_id`,
|
isr.`store_id`,
|
||||||
isr.`store_status`,
|
isr.`store_status`,
|
||||||
isr.`store_no`,
|
isr.`store_no`,
|
||||||
|
|
@ -221,12 +183,21 @@
|
||||||
isr.`ins_fre`,
|
isr.`ins_fre`,
|
||||||
isr.`register_address`,
|
isr.`register_address`,
|
||||||
isr.`legal_name`,
|
isr.`legal_name`,
|
||||||
isr.`geographic_location`,
|
|
||||||
isr.`location_address`,
|
itir.`geographic_location`,
|
||||||
isr.`work_location`,
|
itir.`geographic_address`,
|
||||||
isr.`work_adderss`,
|
itir.`work_location`,
|
||||||
isr.`deviation`,
|
itir.`work_adderss`,
|
||||||
isr.`pre_code_encoding`,
|
itir.`deviation`,
|
||||||
|
itir.`pre_code_encoding`,
|
||||||
|
itir.`service_result`,
|
||||||
|
itir.`deviation`,
|
||||||
|
itir.`storage_time`,
|
||||||
|
itir.`delivery_time`,
|
||||||
|
itir.`times_pass`,
|
||||||
|
itir.`inspection_status`,
|
||||||
|
itir.`inspection_time`,
|
||||||
|
|
||||||
itr.`terminal_id`,
|
itr.`terminal_id`,
|
||||||
itr.`terminal_sn`,
|
itr.`terminal_sn`,
|
||||||
itr.`terminal_type`,
|
itr.`terminal_type`,
|
||||||
|
|
@ -236,12 +207,12 @@
|
||||||
itr.`terminal_address`,
|
itr.`terminal_address`,
|
||||||
itr.`terminal_version`,
|
itr.`terminal_version`,
|
||||||
itr.`terminal_property`,
|
itr.`terminal_property`,
|
||||||
itr.`occupy`,
|
|
||||||
itr.`terminal_status`
|
itr.`terminal_status`
|
||||||
FROM
|
FROM
|
||||||
`wrk_info` i
|
`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
|
||||||
|
INNER JOIN wrk_info_terminal_ins_record itir ON i.wrk_id = itir.wrk_id
|
||||||
WHERE i.del_state = 0
|
WHERE i.del_state = 0
|
||||||
</sql>
|
</sql>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.chushang.system.feign;
|
||||||
|
|
||||||
|
import com.chushang.common.core.constant.SecurityConstants;
|
||||||
|
import com.chushang.system.constants.SystemConstants;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 远程获取 部门信息
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/7/3 17:50
|
||||||
|
*/
|
||||||
|
@FeignClient(contextId = "remoteDeptService",
|
||||||
|
value = SystemConstants.SYSTEM_SERVICE,
|
||||||
|
path = SystemConstants.APPLICATION_CONTENT_PATH + "/dept/remote"
|
||||||
|
)
|
||||||
|
public interface RemoteDeptService {
|
||||||
|
|
||||||
|
@GetMapping(value = "/getDeptNameByIds")
|
||||||
|
Map<Long, String> getDeptNameByIds(@RequestParam(value = "deptIds") Set<Long> deptIds,
|
||||||
|
@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.chushang.system.remote;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import com.chushang.security.annotation.InnerAuth;
|
||||||
|
import com.chushang.security.entity.po.SysDept;
|
||||||
|
import com.chushang.system.feign.RemoteDeptService;
|
||||||
|
import com.chushang.system.service.ISysDeptService;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @auther: zhao
|
||||||
|
* @date: 2024/7/3 17:52
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(value = "/dept/remote")
|
||||||
|
public class RemoteDeptController implements RemoteDeptService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
ISysDeptService deptService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@GetMapping(value = "/getDeptNameByIds")
|
||||||
|
@InnerAuth
|
||||||
|
public Map<Long, String> getDeptNameByIds(@RequestParam Set<Long> deptIds, String source) {
|
||||||
|
List<SysDept> sysDepts = deptService.listByIds(deptIds);
|
||||||
|
if (CollectionUtil.isNotEmpty(sysDepts)){
|
||||||
|
return sysDepts.stream().collect(Collectors.toMap(SysDept::getDeptId, SysDept::getDeptName));
|
||||||
|
}
|
||||||
|
return Map.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue