1. 接口联调
This commit is contained in:
parent
8b5a81f30a
commit
909a4aee09
|
|
@ -51,6 +51,10 @@ public class TerminalAppVO implements Serializable {
|
|||
*/
|
||||
@DictFormat(dictType = "ins_fre")
|
||||
private Integer insFre;
|
||||
/**
|
||||
* 巡检状态
|
||||
*/
|
||||
private Integer inspectionStatus;
|
||||
|
||||
/**
|
||||
* 上次工单处理时间
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
|||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.chushang.common.mybatis.base.BaseEntity;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
|
@ -88,7 +90,7 @@ public class Store extends BaseEntity {
|
|||
* 建档日期
|
||||
*/
|
||||
@TableField(value = "register_time")
|
||||
private Date registerTime;
|
||||
private LocalDateTime registerTime;
|
||||
|
||||
/**
|
||||
* 商户类型
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ public class StoreQuery extends CommonParam {
|
|||
* 任务id
|
||||
*/
|
||||
@Condition(name = "task_id")
|
||||
@NotNull(message = "任务id不能为空")
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -16,6 +16,10 @@ import java.time.LocalDateTime;
|
|||
*/
|
||||
@Data
|
||||
public class StoreTerminalVO {
|
||||
|
||||
private Long wrkId;
|
||||
private Long workNo;
|
||||
|
||||
/**
|
||||
* 所属项目id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ import lombok.Data;
|
|||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @auther: zhao
|
||||
* @date: 2024/6/26 17:13
|
||||
|
|
@ -30,18 +32,6 @@ public class WrkInfoStoreRecord extends BaseEntity {
|
|||
@TableId(value = "wrk_id", type = IdType.INPUT)
|
||||
private Long wrkId;
|
||||
|
||||
/**
|
||||
* 商户id
|
||||
*/
|
||||
@TableField(value = "store_id")
|
||||
private Long storeId;
|
||||
|
||||
/**
|
||||
* 门店状态
|
||||
*/
|
||||
@TableField(value = "store_status")
|
||||
private Integer storeStatus;
|
||||
|
||||
/**
|
||||
* 商户编号
|
||||
*/
|
||||
|
|
@ -84,6 +74,12 @@ public class WrkInfoStoreRecord extends BaseEntity {
|
|||
@TableField(value = "shop_name")
|
||||
private String shopName;
|
||||
|
||||
/**
|
||||
* 建档日期
|
||||
*/
|
||||
@TableField(value = "register_time")
|
||||
private LocalDateTime registerTime;
|
||||
|
||||
/**
|
||||
* 商户类型
|
||||
*/
|
||||
|
|
@ -101,20 +97,57 @@ public class WrkInfoStoreRecord extends BaseEntity {
|
|||
*/
|
||||
@TableField(value = "tip_tool")
|
||||
private String tipTool;
|
||||
|
||||
/**
|
||||
* 操作员编号
|
||||
*/
|
||||
@TableField(value = "admin_id")
|
||||
private String adminId;
|
||||
|
||||
/**
|
||||
* 巡检频次
|
||||
*/
|
||||
@TableField(value = "ins_fre")
|
||||
private Integer insFre;
|
||||
|
||||
/**
|
||||
* 客户经理
|
||||
*/
|
||||
@TableField(value = "account_manager")
|
||||
private String accountManager;
|
||||
|
||||
/**
|
||||
* 经理电话
|
||||
*/
|
||||
@TableField(value = "account_phone")
|
||||
private String accountPhone;
|
||||
|
||||
/**
|
||||
* 注册地址
|
||||
*/
|
||||
@TableField(value = "register_address")
|
||||
private String registerAddress;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@TableField(value = "dept_id")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 法人/负责人
|
||||
*/
|
||||
@TableField(value = "legal_name")
|
||||
private String legalName;
|
||||
|
||||
/**
|
||||
* 是否为业务员录入(1是 2否)
|
||||
*/
|
||||
@TableField(value = "is_enter")
|
||||
private Integer isEnter;
|
||||
/**
|
||||
* 商户状态
|
||||
*/
|
||||
@TableField(value = "state")
|
||||
private Integer state;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,10 +28,15 @@ public class WrkInfoTerminalInsRecord extends BaseEntity {
|
|||
@TableId(value = "wrk_id", type = IdType.INPUT)
|
||||
private Long wrkId;
|
||||
/**
|
||||
* 终端id
|
||||
* 主键
|
||||
*/
|
||||
@TableField(value = "terminal_id")
|
||||
private Long terminalId;
|
||||
/**
|
||||
* 所属商户id
|
||||
*/
|
||||
@TableField(value = "store_id")
|
||||
private Long storeId;
|
||||
|
||||
/**
|
||||
* 银行资产管理码
|
||||
|
|
|
|||
|
|
@ -33,17 +33,35 @@ public class WrkInfoTerminalRecord extends BaseEntity {
|
|||
private Long wrkId;
|
||||
|
||||
/**
|
||||
* 终端id
|
||||
* 主键
|
||||
*/
|
||||
@TableField(value = "terminal_id")
|
||||
private Long terminalId;
|
||||
|
||||
/**
|
||||
* 所属商户id
|
||||
*/
|
||||
@TableField(value = "store_id")
|
||||
private Long storeId;
|
||||
|
||||
/**
|
||||
* 所属商户编号
|
||||
*/
|
||||
@TableField(value = "store_no")
|
||||
private String storeNo;
|
||||
|
||||
/**
|
||||
* 终端sn号
|
||||
*/
|
||||
@TableField(value = "terminal_sn")
|
||||
private String terminalSn;
|
||||
|
||||
/**
|
||||
* 终端编号
|
||||
*/
|
||||
@TableField(value = "terminal_no")
|
||||
private String terminalNo;
|
||||
|
||||
/**
|
||||
* 终端类型
|
||||
*/
|
||||
|
|
@ -57,10 +75,16 @@ public class WrkInfoTerminalRecord extends BaseEntity {
|
|||
private String terminalModel;
|
||||
|
||||
/**
|
||||
* 终端编号
|
||||
* 版本号
|
||||
*/
|
||||
@TableField(value = "terminal_no")
|
||||
private String terminalNo;
|
||||
@TableField(value = "terminal_version")
|
||||
private String terminalVersion;
|
||||
|
||||
/**
|
||||
* 终端地址
|
||||
*/
|
||||
@TableField(value = "terminal_address")
|
||||
private String terminalAddress;
|
||||
|
||||
/**
|
||||
* 终端来源
|
||||
|
|
@ -68,27 +92,26 @@ public class WrkInfoTerminalRecord extends BaseEntity {
|
|||
@TableField(value = "terminal_source")
|
||||
private Integer terminalSource;
|
||||
|
||||
/**
|
||||
* 终端版地址
|
||||
*/
|
||||
@TableField(value = "terminal_address")
|
||||
private String terminalAddress;
|
||||
|
||||
/**
|
||||
* 终端版本号
|
||||
*/
|
||||
@TableField(value = "terminal_version")
|
||||
private String terminalVersion;
|
||||
|
||||
/**
|
||||
* 终端产权人
|
||||
*/
|
||||
@TableField(value = "terminal_property")
|
||||
private Integer terminalProperty;
|
||||
|
||||
/**
|
||||
* 是否占用
|
||||
*/
|
||||
@TableField(value = "occupy")
|
||||
private Integer occupy;
|
||||
|
||||
/**
|
||||
* 终端状态
|
||||
*/
|
||||
@TableField(value = "terminal_status")
|
||||
private Integer terminalStatus;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField(value = "remark")
|
||||
private String remark;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import cn.hutool.core.collection.ListUtil;
|
|||
import cn.hutool.core.date.DatePattern;
|
||||
import com.chushang.common.core.text.Convert;
|
||||
import com.chushang.common.dict.utils.DictUtils;
|
||||
import com.chushang.common.mybatis.page.CommonParam;
|
||||
import com.chushang.inspection.work.enums.WorkTypeOperation;
|
||||
import com.chushang.inspection.work.po.WrkIcbcJs;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
|
@ -23,7 +24,7 @@ import java.util.List;
|
|||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class DispatchQuery implements Serializable {
|
||||
public class DispatchQuery extends CommonParam {
|
||||
|
||||
/** 终端id */
|
||||
private List<Long> terminalIds;
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ public class ReviewedQuery extends CommonParam {
|
|||
* 任务id
|
||||
*/
|
||||
@Condition(name = "task_id", tableName = "i")
|
||||
@NotNull(message = "任务id不能为空")
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ public class WrkAppQuery extends CommonParam {
|
|||
* 任务id
|
||||
*/
|
||||
@Condition(name = "task_id", tableName = "i")
|
||||
@NotNull(message = "任务id不能为空")
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ public class WrkInfoQuery extends CommonParam {
|
|||
* 任务id
|
||||
*/
|
||||
@Condition(name = "task_id", tableName = "i")
|
||||
@NotNull(message = "任务id不能为空")
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@ public interface WrkInfoMapper extends BaseMapper<WrkInfo> {
|
|||
List<WrkInfoDetailsVO> queryDispatchPage(@Param("query") WrkInfoQuery query,
|
||||
Page<WrkInfoDetailsVO> page);
|
||||
@DataScope(deptAlias = "i")
|
||||
List<WrkInfoDetailsVO> queryArchivePage(@Param("query") ReviewedQuery query, Page<WrkInfoDetailsVO> page);
|
||||
List<WrkInfoDetailsVO> queryArchivePage(@Param("query") ReviewedQuery query,
|
||||
Page<WrkInfoDetailsVO> page);
|
||||
@DataScope(deptAlias = "i")
|
||||
List<WrkListAppVO> queryAppPage(@Param("query") WrkAppQuery query, Page<WrkListAppVO> page);
|
||||
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> impl
|
|||
// 修改 终端的状态
|
||||
getMerState(info, terminal, store);
|
||||
|
||||
tempStorageStore.setStoreStatus(store.getState());
|
||||
tempStorageStore.setState(store.getState());
|
||||
tempStorageTerminalInsRecord.setTimesPass(timesPass);
|
||||
tempStorageTerminalInsRecord.setInspectionStatus(1);
|
||||
tempStorageTerminalInsRecord.setInspectionTime(now);
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@
|
|||
AND #{query.createTime[1]}
|
||||
</if>
|
||||
<if test="1==1">
|
||||
${query.sqlParam.dataScpoe}
|
||||
${query.sqlParam.get('dataScpoe')}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY #{query.orderBy} #{query.isAsc}
|
||||
|
|
|
|||
|
|
@ -118,23 +118,22 @@
|
|||
INNER JOIN wrk_project p ON pt.project_id = p.project_id
|
||||
</sql>
|
||||
<select id="selectPageApp" resultType="com.chushang.inspection.project.vo.TerminalAppVO">
|
||||
SELECT
|
||||
t.terminal_id,
|
||||
t.terminal_no,
|
||||
t.terminal_address,
|
||||
t.inspection_status,
|
||||
t.inspection_time,
|
||||
t.times_pass,
|
||||
t.service_result,
|
||||
s.store_contact,
|
||||
s.store_address,
|
||||
s.ins_fre,
|
||||
s.store_name,
|
||||
pt.`name` AS taskName
|
||||
FROM
|
||||
st_terminal t
|
||||
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
|
||||
SELECT t.terminal_id AS terminalId,
|
||||
t.terminal_no AS terminalNo,
|
||||
t.terminal_address AS terminalAddress,
|
||||
ti.inspection_status AS inspectionStatus,
|
||||
ti.inspection_time AS inspectionTime,
|
||||
ti.times_pass AS timesPass,
|
||||
ti.service_result AS serviceResults,
|
||||
s.store_contact AS storeContact,
|
||||
s.store_address AS storeAddress,
|
||||
s.ins_fre AS insFre,
|
||||
s.store_name AS storeName,
|
||||
pt.`name` AS taskName
|
||||
FROM st_terminal t
|
||||
LEFT JOIN st_terminal_ins ti ON t.terminal_id = ti.terminal_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
|
||||
<where>
|
||||
<if test="query.taskId != null">
|
||||
AND t.task_id = #{query.taskId}
|
||||
|
|
@ -149,28 +148,28 @@
|
|||
AND t.terminal_no = #{query.terminalSn}
|
||||
</if>
|
||||
<if test="query.terminalAddress != null and query.terminalAddress != ''">
|
||||
AND t.terminal_address like concat('%',#{query.terminalAddress},'%')
|
||||
AND t.terminal_address like concat('%', #{query.terminalAddress}, '%')
|
||||
</if>
|
||||
<if test="query.occupy != null ">
|
||||
<if test="query.occupy != null">
|
||||
AND t.occupy = #{query.occupy}
|
||||
</if>
|
||||
<if test="query.storeState != null">
|
||||
AND t.state = #{query.storeState}
|
||||
AND s.state = #{query.storeState}
|
||||
</if>
|
||||
<if test="query.shopName != null and query.shopName != ''">
|
||||
AND s.shop_name like concat('%',#{query.shopName},'%')
|
||||
AND s.shop_name like concat('%', #{query.shopName}, '%')
|
||||
</if>
|
||||
<if test="query.lowerTaskName != null and query.lowerTaskName != ''">
|
||||
AND pt.name like concat('%',#{query.lowerTaskName},'%')
|
||||
AND pt.name like concat('%', #{query.lowerTaskName}, '%')
|
||||
</if>
|
||||
<if test="query.storeName != null and query.storeName != ''">
|
||||
AND s.store_name like concat('%',#{query.storeName},'%')
|
||||
AND s.store_name like concat('%', #{query.storeName}, '%')
|
||||
</if>
|
||||
<if test="query.storeContact != null and query.storeContact != ''">
|
||||
AND s.store_contact like concat('%',#{query.storeContact},'%')
|
||||
AND s.store_contact like concat('%', #{query.storeContact}, '%')
|
||||
</if>
|
||||
<if test="query.storeAddress != null and query.storeAddress != ''">
|
||||
AND s.store_address like concat('%',#{query.storeAddress},'%')
|
||||
AND s.store_address like concat('%', #{query.storeAddress}, '%')
|
||||
</if>
|
||||
<if test="1 == 1">
|
||||
${query.sqlParam.get('dataScope')}
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@
|
|||
<result column="store_name" property="storeName" />
|
||||
<result column="store_no" property="storeNo" />
|
||||
<result column="store_phone" property="storePhone" />
|
||||
<result column="store_status" property="storeStatus" />
|
||||
<result column="state" property="storeStatus" />
|
||||
<result column="store_type" property="storeType" />
|
||||
<result column="tip_tool" property="tipTool" />
|
||||
</association>
|
||||
|
|
@ -169,7 +169,7 @@
|
|||
i.`wrk_status`,
|
||||
|
||||
isr.`store_id`,
|
||||
isr.`store_status`,
|
||||
isr.`state`,
|
||||
isr.`store_no`,
|
||||
isr.`store_name`,
|
||||
isr.`store_contact`,
|
||||
|
|
@ -210,9 +210,9 @@
|
|||
itr.`terminal_status`
|
||||
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
|
||||
INNER JOIN wrk_info_terminal_ins_record itir ON i.wrk_id = itir.wrk_id
|
||||
LEFT JOIN wrk_info_store_record isr ON i.wrk_id = isr.wrk_id
|
||||
LEFT JOIN wrk_info_terminal_record itr ON i.wrk_id = itr.wrk_id
|
||||
LEFT JOIN wrk_info_terminal_ins_record itir ON i.wrk_id = itir.wrk_id
|
||||
WHERE i.del_state = 0
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -3,59 +3,62 @@
|
|||
<mapper namespace="com.chushang.inspection.work.mapper.WrkInfoTerminalRecordMapper">
|
||||
|
||||
<select id="minePageList" resultType="com.chushang.inspection.terminal.vo.StoreTerminalVO">
|
||||
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 workAddress
|
||||
SELECT pt.project_id AS projectId,
|
||||
p.project_name AS projectName,
|
||||
|
||||
i.task_id AS task_id,
|
||||
i.`task_name` AS taskName,
|
||||
i.lower_task_id AS lowerTaskId,
|
||||
i.dept_id AS deptId,
|
||||
i.work_no AS workNo,
|
||||
i.wrk_id AS wrkId,
|
||||
|
||||
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 workAddress
|
||||
FROM wrk_info i
|
||||
LEFT JOIN ta_polling_task pt ON i.task_id = pt.id
|
||||
LEFT JOIN wrk_project p ON pt.project_id = p.project_id
|
||||
INNER JOIN wrk_info_store_record s ON i.wrk_id = s.wrk_id
|
||||
INNER JOIN wrk_info_terminal_record t ON i.wrk_id = t.wrk_id
|
||||
INNER JOIN wrk_info_terminal_ins_record ti ON i.wrk_id = ti.wrk_id
|
||||
INNER JOIN ta_polling_task pt ON i.task_id = pt.id
|
||||
INNER JOIN wrk_project p ON pt.project_id = p.project_id
|
||||
LEFT JOIN wrk_info_terminal_ins_record ti ON i.wrk_id = ti.wrk_id
|
||||
<where>
|
||||
<if test="1 == 1">
|
||||
${query.sqlParam.get('sqlWhere')}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ public class DemoTest {
|
|||
LoginBody loginBody = new LoginBody();
|
||||
loginBody.setPassword("1");
|
||||
loginBody.setUsername("2");
|
||||
|
||||
// 创建任务
|
||||
remoteTaskService.createTask(CreateTaskDTO.builder()
|
||||
.params(JSON.toJSONString(loginBody))
|
||||
.taskName("测试后台任务")
|
||||
|
|
|
|||
Loading…
Reference in New Issue