1.下载记录增加taskId 任务ID字段

master
x_z 3 years ago
parent db682bb340
commit 1ce8d710e0

@ -7,7 +7,15 @@ import java.util.Date;
@Data @Data
public class BasicDownloadStatusEntity { public class BasicDownloadStatusEntity {
/**
* ID
*/
private String id; private String id;
/**
* ID
*/
private String taskId;
private String idDatas; private String idDatas;
private Integer status; private Integer status;
private Integer type; private Integer type;

@ -6,6 +6,7 @@ import lombok.Data;
@Data @Data
public class BasicDownloadRequest extends ListPageRequest { public class BasicDownloadRequest extends ListPageRequest {
private String id; private String id;
private String taskId; //任务ID
private Integer status; private Integer status;
private Integer type; private Integer type;
private String idDatas; private String idDatas;

@ -36,6 +36,7 @@ import com.glxp.api.admin.service.info.SystemParamConfigService;
import com.glxp.api.admin.service.inout.OrderService; import com.glxp.api.admin.service.inout.OrderService;
import com.glxp.api.admin.service.inventory.InvWarehouseService; import com.glxp.api.admin.service.inventory.InvWarehouseService;
import com.glxp.api.admin.service.thrsys.ThrInvWarehouseService; import com.glxp.api.admin.service.thrsys.ThrInvWarehouseService;
import com.glxp.api.admin.util.CustomUtil;
import com.glxp.api.admin.util.RedisUtil; import com.glxp.api.admin.util.RedisUtil;
import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.res.BaseResponse;
import org.apache.ibatis.session.ExecutorType; import org.apache.ibatis.session.ExecutorType;
@ -103,7 +104,8 @@ public class DlBasicService {
//构造下载记录 //构造下载记录
BasicDownloadStatusEntity basicDownloadStatusEntity = new BasicDownloadStatusEntity(); BasicDownloadStatusEntity basicDownloadStatusEntity = new BasicDownloadStatusEntity();
basicDownloadStatusEntity.setId(syncDataResponse.getTaskId()); basicDownloadStatusEntity.setId(CustomUtil.getId());
basicDownloadStatusEntity.setTaskId(syncDataResponse.getTaskId());
basicDownloadStatusEntity.setStartTime(new Date()); basicDownloadStatusEntity.setStartTime(new Date());
basicDownloadStatusEntity.setIdDatas(ConstantStatus.SYNC_DOWNLOAD_BASIC_DATA); basicDownloadStatusEntity.setIdDatas(ConstantStatus.SYNC_DOWNLOAD_BASIC_DATA);
basicDownloadStatusEntity.setStatus(0); //下载中 basicDownloadStatusEntity.setStatus(0); //下载中
@ -313,7 +315,8 @@ public class DlBasicService {
//构造下载记录 //构造下载记录
BasicDownloadStatusEntity basicDownloadStatusEntity = new BasicDownloadStatusEntity(); BasicDownloadStatusEntity basicDownloadStatusEntity = new BasicDownloadStatusEntity();
basicDownloadStatusEntity.setId(syncDataResponse.getTaskId()); basicDownloadStatusEntity.setId(CustomUtil.getId());
basicDownloadStatusEntity.setTaskId(syncDataResponse.getTaskId());
basicDownloadStatusEntity.setStartTime(new Date()); basicDownloadStatusEntity.setStartTime(new Date());
basicDownloadStatusEntity.setIdDatas(ConstantStatus.SYNC_DOWNLOAD_BUS_TYPE); basicDownloadStatusEntity.setIdDatas(ConstantStatus.SYNC_DOWNLOAD_BUS_TYPE);
basicDownloadStatusEntity.setStatus(0); //下载中 basicDownloadStatusEntity.setStatus(0); //下载中
@ -419,7 +422,8 @@ public class DlBasicService {
SpsSyncOrderResponse syncDataResponse = response.getData(); SpsSyncOrderResponse syncDataResponse = response.getData();
BasicDownloadStatusEntity basicDownloadStatusEntity = new BasicDownloadStatusEntity(); BasicDownloadStatusEntity basicDownloadStatusEntity = new BasicDownloadStatusEntity();
basicDownloadStatusEntity.setId(syncDataResponse.getTaskId()); basicDownloadStatusEntity.setId(CustomUtil.getId());
basicDownloadStatusEntity.setTaskId(syncDataResponse.getTaskId());
basicDownloadStatusEntity.setStartTime(new Date()); basicDownloadStatusEntity.setStartTime(new Date());
basicDownloadStatusEntity.setIdDatas(ConstantStatus.SYNC_DOWNLOAD_SCAN_ORDER); basicDownloadStatusEntity.setIdDatas(ConstantStatus.SYNC_DOWNLOAD_SCAN_ORDER);
basicDownloadStatusEntity.setStatus(0); //下载中 basicDownloadStatusEntity.setStatus(0); //下载中
@ -525,7 +529,8 @@ public class DlBasicService {
SpSyncUdiResponse spSyncUdiResponse = response.getData(); SpSyncUdiResponse spSyncUdiResponse = response.getData();
BasicDownloadStatusEntity basicDownloadStatusEntity = new BasicDownloadStatusEntity(); BasicDownloadStatusEntity basicDownloadStatusEntity = new BasicDownloadStatusEntity();
basicDownloadStatusEntity.setId(spSyncUdiResponse.getTaskId()); basicDownloadStatusEntity.setId(CustomUtil.getId());
basicDownloadStatusEntity.setTaskId(spSyncUdiResponse.getTaskId());
basicDownloadStatusEntity.setStartTime(new Date()); basicDownloadStatusEntity.setStartTime(new Date());
basicDownloadStatusEntity.setIdDatas(ConstantStatus.SYNC_DOWNLOAD_DI_PRODUCTS); basicDownloadStatusEntity.setIdDatas(ConstantStatus.SYNC_DOWNLOAD_DI_PRODUCTS);
basicDownloadStatusEntity.setStatus(0); //下载中 basicDownloadStatusEntity.setStatus(0); //下载中

@ -5,21 +5,25 @@
<select id="filterDownloadStatus" parameterType="com.glxp.api.admin.req.basic.BasicDownloadRequest" <select id="filterDownloadStatus" parameterType="com.glxp.api.admin.req.basic.BasicDownloadRequest"
resultType="com.glxp.api.admin.entity.basic.BasicDownloadStatusEntity"> resultType="com.glxp.api.admin.entity.basic.BasicDownloadStatusEntity">
select * from basic_download_status select *
from basic_download_status
<where> <where>
<if test="id != '' and id!=null"> <if test="id != '' and id != null">
and id = #{id} and id = #{id}
</if> </if>
<if test="status!=null"> <if test="taskId != null and taskId != ''">
and taskId = #{taskId}
</if>
<if test="status != null">
and status = #{status} and status = #{status}
</if> </if>
<if test="type!=null"> <if test="type != null">
and `type` = #{type} and `type` = #{type}
</if> </if>
<if test="idDatas != '' and idDatas!=null"> <if test="idDatas != '' and idDatas != null">
and idDatas = #{idDatas} and idDatas = #{idDatas}
</if> </if>
<if test="scheduleType!=null"> <if test="scheduleType != null">
and scheduleType = #{scheduleType} and scheduleType = #{scheduleType}
</if> </if>
</where> </where>
@ -30,9 +34,10 @@
<insert id="insertDownloadStatus" keyProperty="id" <insert id="insertDownloadStatus" keyProperty="id"
parameterType="com.glxp.api.admin.entity.basic.BasicDownloadStatusEntity"> parameterType="com.glxp.api.admin.entity.basic.BasicDownloadStatusEntity">
replace replace
INTO basic_download_status(id,idDatas,status,type,updateTime,scheduleType,startTime,endTime,remark) INTO basic_download_status(id,taskId,idDatas,status,type,updateTime,scheduleType,startTime,endTime,remark)
values( values(
#{id}, #{id},
#{taskId},
#{idDatas}, #{idDatas},
#{status}, #{status},
#{type}, #{type},

Loading…
Cancel
Save