任务列表后端代码

cert
1178634255 2 years ago
parent c166838758
commit d921b75894

@ -11,16 +11,15 @@ import com.glxp.api.entity.purchase.SupCertRemindMsgEntity;
import com.glxp.api.entity.sup.UserCertEntity;
import com.glxp.api.entity.trace.TraceManuCodeRelEntity;
import com.glxp.api.entity.trace.TraceManuOrderEntity;
import com.glxp.api.req.trace.TraceManuDetailRequest;
import com.glxp.api.req.trace.TraceManuOrderRequest;
import com.glxp.api.req.trace.TraceManuOrderUploadRequest;
import com.glxp.api.req.trace.TraceRecordRequest;
import com.glxp.api.req.trace.*;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.res.trace.TraceManuCodeRellResponse;
import com.glxp.api.res.trace.TraceManuOrderResponse;
import com.glxp.api.res.trace.TraceRecordResponse;
import com.glxp.api.res.trace.TraceTaskDlResponse;
import com.glxp.api.service.trace.TraceManuCodeRelService;
import com.glxp.api.service.trace.TraceManuOrderService;
import com.glxp.api.service.trace.TraceTaskService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.validation.BindingResult;
@ -48,6 +47,8 @@ public class TraceManuOrderController {
TraceManuOrderService traceManuOrderService;
@Resource
TraceManuCodeRelService traceManuCodeRelService;
@Resource
TraceTaskService traceTaskService;
@AuthRuleAnnotation("udi/trace/manu/order/filter")
@GetMapping("udi/trace/manu/order/filter")
@ -106,5 +107,26 @@ public class TraceManuOrderController {
return ResultVOUtils.success("成功");
}
//任务列表
@AuthRuleAnnotation("udi/trace/task/filter")
@GetMapping("udi/trace/task/filter")
public BaseResponse filterTask(TraceTaskDetailRequest traceTaskDetailRequest) {
List<TraceTaskDlResponse> traceTaskDlResponses = traceTaskService.queryTraceTaskList(traceTaskDetailRequest);
PageInfo<TraceTaskDlResponse> pageInfo = new PageInfo<>(traceTaskDlResponses);
PageSimpleResponse<TraceTaskDlResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(traceTaskDlResponses);
return ResultVOUtils.success(pageSimpleResponse);
}
}

@ -2,8 +2,15 @@ package com.glxp.api.dao.trace;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.entity.trace.TraceTaskNoticeEntity;
import com.glxp.api.req.trace.TraceTaskDetailRequest;
import com.glxp.api.res.trace.TraceTaskDlResponse;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface TraceTaskNoticeMapper extends BaseMapper<TraceTaskNoticeEntity> {
List<TraceTaskDlResponse> queryTraceTaskList(TraceTaskDetailRequest traceTaskDetailRequest);
}

@ -0,0 +1,80 @@
package com.glxp.api.req.trace;
import com.glxp.api.util.page.ListPageRequest;
import lombok.Data;
import java.util.Date;
import java.util.List;
@Data
public class TraceTaskDetailRequest extends ListPageRequest {
private Long id;
/**
* UDI
*/
private String udiCode;
/**
* ID
*/
private Long recordCode;
/**
* //
*
*/
private Integer status;
/**
* 1nte3
*/
private Integer taskType;
/**
* DIDI
*/
private List<String> diList;
/**
* ID
*/
private Long companyIdFk;
/**
*
*/
private String ylqxzcrbarmc;
/**
*
*/
private String creditNum;
/**
*
*/
private String cpmctymc;
/**
*
*/
private String ggxh;
/**
*
*/
private String batchNo;
/**
*
*/
private String expireDate;
/**
*
*/
private String serialNo;
/**
*
*/
private Date createTime;
}

@ -10,7 +10,7 @@ import java.util.List;
*/
@Data
public class TraceTaskDlResponse {
private Long id;
/**
* UDI
*/
@ -22,11 +22,17 @@ public class TraceTaskDlResponse {
private Long recordCode;
/**
* 1nte3
* 123
*/
private Integer taskType;
/**
* //
*
*/
private Integer status;
/**
* DIDI
* DI
*/
private List<String> diList;
@ -59,7 +65,10 @@ public class TraceTaskDlResponse {
*
*/
private String batchNo;
/**
*
*/
private String produceDate;
/**
*
*/
@ -71,8 +80,13 @@ public class TraceTaskDlResponse {
private String serialNo;
/**
*
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
}

@ -0,0 +1,20 @@
package com.glxp.api.service.trace;
import com.baomidou.mybatisplus.extension.service.IService;
import com.glxp.api.entity.trace.TraceManuOrderEntity;
import com.glxp.api.entity.trace.TraceTaskNoticeEntity;
import com.glxp.api.req.trace.TraceManuOrderRequest;
import com.glxp.api.req.trace.TraceTaskDetailRequest;
import com.glxp.api.res.trace.TraceManuOrderResponse;
import com.glxp.api.res.trace.TraceTaskDlResponse;
import java.util.List;
public interface TraceTaskService extends IService<TraceTaskNoticeEntity> {
List<TraceTaskDlResponse> queryTraceTaskList(TraceTaskDetailRequest traceTaskDetailRequest);
}

@ -0,0 +1,35 @@
package com.glxp.api.service.trace.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.trace.TraceOrderMapper;
import com.glxp.api.dao.trace.TraceTaskNoticeMapper;
import com.glxp.api.entity.trace.TraceTaskNoticeEntity;
import com.glxp.api.req.trace.TraceTaskDetailRequest;
import com.glxp.api.res.trace.TraceTaskDlResponse;
import com.glxp.api.service.trace.TraceTaskService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
@Service
public class TraceTaskServiceImpl extends ServiceImpl<TraceTaskNoticeMapper, TraceTaskNoticeEntity> implements TraceTaskService {
@Resource
TraceTaskNoticeMapper traceTaskNoticeMapper;
@Override
public List<TraceTaskDlResponse> queryTraceTaskList(TraceTaskDetailRequest traceTaskDetailRequest) {
if (traceTaskDetailRequest == null) {
return Collections.emptyList();
}
if (traceTaskDetailRequest.getPage() != null) {
int offset = (traceTaskDetailRequest.getPage() - 1) * traceTaskDetailRequest.getLimit();
PageHelper.offsetPage(offset, traceTaskDetailRequest.getLimit());
}
return traceTaskNoticeMapper.queryTraceTaskList(traceTaskDetailRequest);
}
}

@ -2,4 +2,34 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.api.dao.trace.TraceTaskNoticeMapper">
<select id="queryTraceTaskList" parameterType="com.glxp.api.req.trace.TraceTaskDetailRequest"
resultType="com.glxp.api.res.trace.TraceTaskDlResponse">
SELECT *
FROM trace_task_notice
<where>
<if test="taskType != '' and taskType != null">
and taskType = #{taskType}
</if>
<if test="status != '' and status != null">
and status = #{status}
</if>
<if test="cpmctymc != '' and cpmctymc != null">
and cpmctymc LIKE CONCAT('%', #{cpmctymc}, '%')
</if>
<if test="ggxh != '' and ggxh != null">
and ggxh = #{ggxh}
</if>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
and ylqxzcrbarmc = #{ylqxzcrbarmc}
</if>
<if test="batchNo != '' and batchNo != null">
and batchNo = #{batchNo}
</if>
</where>
</select>
</mapper>

Loading…
Cancel
Save