Merge remote-tracking branch 'origin/master'

cert
1178634255 2 years ago
commit 0ea7ed8a2e

@ -297,7 +297,7 @@ public class SupCertController {
return ResultVOUtils.success("成功");
}
@AuthRuleAnnotation("")
// @AuthRuleAnnotation("")
@PostMapping("/sup/info/insertCompanyCert")
@Log(title = "资质证书", businessType = BusinessType.INSERT)
public BaseResponse cptInsertCompanyCert(@RequestBody SupCertEntity supCertEntity) {

@ -51,7 +51,7 @@ public class SupCertSetController {
@AuthRuleAnnotation("")
@PostMapping("/sup/cert/set/add")
@PostMapping("/directToCpt/sup/cert/set/add")
@Log(title = "资质证书", businessType = BusinessType.INSERT)
public BaseResponse addCertSet(@RequestBody SupCertSetEntity supCertSetEntity) {
if (supCertSetEntity == null) {
@ -79,7 +79,7 @@ public class SupCertSetController {
@AuthRuleAnnotation("")
@PostMapping("/sup/cert/set/update")
@PostMapping("/directToCpt/sup/cert/set/update")
@Log(title = "资质证书", businessType = BusinessType.UPDATE)
public BaseResponse updateCertSet(@RequestBody SupCertSetEntity supCertSetEntity) {
if (CollUtil.isNotEmpty(supCertSetEntity.getFlbmList())) {
@ -102,7 +102,7 @@ public class SupCertSetController {
@AuthRuleAnnotation("")
@PostMapping("/sup/cert/set/delete")
@PostMapping("/directToCpt/sup/cert/set/delete")
@Log(title = "资质证书", businessType = BusinessType.DELETE)
public BaseResponse deleteCertSet(@RequestBody DeleteRequest deleteRequest) {

@ -122,8 +122,8 @@ public class SupManufacturerController {
@AuthRuleAnnotation("")
@GetMapping("/directToCpt/sup/manufacturer/getCompanyBySup")
public BaseResponse getCompanyBySup(FilterSupManufacturerRequest filterSupManufacturerRequest) {
filterSupManufacturerRequest.setCustomerId(getCompanyId());
System.out.println("111111111111111111111111111111111111:"+getCompanyId());
filterSupManufacturerRequest.setCustomerId(getCustomerId());
System.out.println("111111111111111111111111111111111111:"+getCustomerId());
List<SupManufacturerEntity> companyEntities = supManufacturerService.getCompany(filterSupManufacturerRequest);
PageInfo<SupManufacturerEntity> pageInfo = new PageInfo<>(companyEntities);
PageSimpleResponse<SupManufacturerEntity> pageSimpleResponse = new PageSimpleResponse<>();
@ -237,7 +237,6 @@ public class SupManufacturerController {
public BaseResponse directToCptAddCompany(@RequestBody SupManufacturerEntity supManufacturerEntity) {
String customerId = getCustomerId();
// String customerId = getCustomerId();
supManufacturerEntity.setCustomerId(customerId);
//判断用户名和社会信用代码不能重复
FilterSupManufacturerRequest filterSupManufacturerRequest = new FilterSupManufacturerRequest();

@ -315,10 +315,10 @@ public class UserRegisterController extends BaseController {
userRegisterEntity.setId(Long.valueOf(registComPerResponse.getId()));
userRegisterEntity.setCheckStatus(registComPerResponse.getCheckStatus());
userCompanyEntity.setId(Long.valueOf(registComPerResponse.getUcId()));
userCompanyEntity.setCustomerId(registComPerResponse.getUcId());
// userCompanyEntity.setCustomerId(registComPerResponse.getUcId());
userCompanyEntity.setCheckStatus(registComPerResponse.getCheckStatus());
userCompanyEntity.setReason(registComPerResponse.getReason());
userCompanyEntity.setAuditStatus(Integer.valueOf(company.getCheckStatus()));
// userCompanyEntity.setAuditStatus(Integer.valueOf(company.getCheckStatus()));
String queueName = "fanout_" + userCompanyEntity.getId() + "";
rabbitQueueService.createQueue(queueName);
userRegisterService.updateById(userRegisterEntity);

@ -102,6 +102,9 @@ public class TraceOrderController extends BaseController {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
TraceTaskNoticeEntity taskNoticeEntity = traceTaskNoticeService.getById(traceOrderUploadRequest.getTaskId());
if (taskNoticeEntity == null) {
return ResultVOUtils.error(500, "任务已过期!");
}
TraceOrderEntity traceOrderEntity = new TraceOrderEntity();
BeanUtils.copyProperties(traceOrderUploadRequest, traceOrderEntity);
traceOrderEntity.setCompanyIdFk(taskNoticeEntity.getCompanyIdFk());
@ -119,16 +122,21 @@ public class TraceOrderController extends BaseController {
if (StrUtil.isNotEmpty(traceOrderEntity.getToCorpCreditNum()) &&
!traceOrderEntity.getToCorpCreditNum().equals(userCompanyEntity.getCreditNum())) {
UserCompanyEntity toUserCompanyEntity = userCompanyService.getOne(new QueryWrapper<UserCompanyEntity>().eq("creditNum", traceOrderEntity.getToCorpCreditNum()), false);
TraceTaskNoticeEntity nextNotity = traceTaskNoticeService.findTask(2, traceOrderEntity.getTraceProductIdFk(), toUserCompanyEntity.getId());
if (nextNotity == null) {
TraceProductDetailEntity traceProductDetailEntity = traceProductDetailService.getById(traceOrderEntity.getTraceProductIdFk());
nextNotity = udiTraceService.createTraceNotice(2, traceProductDetailEntity, toUserCompanyEntity.getId());
udiTraceService.pushDelayExpireTask(nextNotity);
udiTraceService.pushMq(nextNotity, toUserCompanyEntity.getId());
} else if (nextNotity.getStatus() == 4) {
//任务超时未处理,重新推送消息
udiTraceService.pushMq(nextNotity, toUserCompanyEntity.getId());
if (toUserCompanyEntity != null) {
TraceTaskNoticeEntity nextNotity = traceTaskNoticeService.findTask(2, traceOrderEntity.getTraceProductIdFk(), toUserCompanyEntity.getId());
if (nextNotity == null) {
TraceProductDetailEntity traceProductDetailEntity = traceProductDetailService.getById(traceOrderEntity.getTraceProductIdFk());
nextNotity = udiTraceService.createTraceNotice(2, traceProductDetailEntity, toUserCompanyEntity.getId());
udiTraceService.pushDelayExpireTask(nextNotity);
udiTraceService.pushMq(nextNotity, toUserCompanyEntity.getId());
} else if (nextNotity.getStatus() == 4) {
//任务超时未处理,重新推送消息
udiTraceService.pushMq(nextNotity, toUserCompanyEntity.getId());
}
} else {
log.error("未找到下一家企业");
}
}

@ -1,15 +1,19 @@
package com.glxp.api.controller.trace;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.entity.basic.BasicUdiProductEntity;
import com.glxp.api.entity.trace.TraceTaskNoticeEntity;
import com.glxp.api.req.system.DeleteRequest;
import com.glxp.api.req.trace.TraceDlTaskRequest;
import com.glxp.api.req.trace.TraceTaskDetailRequest;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.res.trace.TraceTaskDlResponse;
import com.glxp.api.service.trace.TraceTaskHistoryService;
import com.glxp.api.service.trace.TraceTaskNoticeService;
import com.glxp.api.service.trace.TraceTaskService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -17,6 +21,8 @@ import io.swagger.annotations.ApiResponses;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
@ -38,7 +44,8 @@ public class TraceTaskController {
@Resource
TraceTaskHistoryService traceTaskHistoryService;
@Resource
TraceTaskNoticeService traceTaskNoticeService;
//任务列表
@ApiOperation(value = "查询任务列表", response = TraceTaskDlResponse.class)
@ -84,4 +91,29 @@ public class TraceTaskController {
pageSimpleResponse.setList(traceTaskDlResponses);
return ResultVOUtils.success(pageSimpleResponse);
}
//任务列表删除
@ApiOperation(value = "任务列表删除", response = BaseResponse.class)
@AuthRuleAnnotation("udi/trace/task/delete")
@PostMapping("udi/trace/task/delete")
public BaseResponse deleteTask(@RequestBody DeleteRequest deleteRequest) {
traceTaskNoticeService.removeById(deleteRequest.getId());
return ResultVOUtils.success("删除成功!");
}
//历史任务列表删除
@ApiOperation(value = "历史任务列表删除", response = BaseResponse.class)
@AuthRuleAnnotation("udi/trace/task/deleteTaskList")
@PostMapping("udi/trace/task/deleteTaskList")
public BaseResponse deleteTaskList(@RequestBody DeleteRequest deleteRequest) {
traceTaskHistoryService.removeById(deleteRequest.getId());
return ResultVOUtils.success("删除成功!");
}
}

@ -290,97 +290,97 @@ public class UdiTraceController extends BaseController {
}
/**
*
*
* @param traceOrderUploadRequest
* @param bindingResult
* @return
*/
@Transactional
@ApiOperation(value = "客户端根据任务上传出入库单据", response = BaseResponse.class)
@AuthRuleAnnotation("udi/trace/order/upload")
@PostMapping("udi/trace/order/upload")
public BaseResponse uploadOrder(@RequestBody TraceOrderUploadRequest traceOrderUploadRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
TraceTaskNoticeEntity taskNoticeEntity = traceTaskNoticeService.getById(traceOrderUploadRequest.getTaskId());
if (taskNoticeEntity == null) {
return ResultVOUtils.error(500, "任务已过期,或任务不存在!");
}
//清空历史数据
traceOrderService.deleteByCompanyId(taskNoticeEntity.getProdudctRecordIdFk(), taskNoticeEntity.getCompanyIdFk());
TraceOrderEntity traceOrderEntity = new TraceOrderEntity();
BeanUtils.copyProperties(traceOrderUploadRequest, traceOrderEntity);
traceOrderEntity.setId(IdUtil.getSnowflakeNextId());
traceOrderEntity.setUpdateTime(new Date());
traceOrderService.save(traceOrderEntity);
//设置任务已完成
taskNoticeEntity.setStatus(3);
traceTaskNoticeService.updateById(taskNoticeEntity);
udiTraceService.pushDelayRemoveTask(taskNoticeEntity);
return ResultVOUtils.success("上传成功");
}
/**
*
*
* @param traceManuOrderUploadRequest
* @param bindingResult
* @return
*/
@Transactional
@ApiOperation(value = "客户端根据任务上传生产关联关系信息", response = BaseResponse.class)
@AuthRuleAnnotation("udi/trace/manuOrder/upload")
@PostMapping("udi/trace/manuOrder/upload")
public BaseResponse uploadManuOrder(@RequestBody TraceManuOrderUploadRequest traceManuOrderUploadRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
TraceTaskNoticeEntity taskNoticeEntity = traceTaskNoticeService.getById(traceManuOrderUploadRequest.getTaskId());
if (taskNoticeEntity == null) {
return ResultVOUtils.error(500, "任务已过期,或任务不存在!");
}
//清除历史数据
TraceManuOrderEntity originOrder = traceManuOrderService.findByBillNo(traceManuOrderUploadRequest.getBillNo(), taskNoticeEntity.getProdudctRecordIdFk(), taskNoticeEntity.getCompanyIdFk());
if (originOrder != null) {
traceManuOrderService.removeById(originOrder.getId());
traceManuCodeRelService.remove(new QueryWrapper<TraceManuCodeRelEntity>().eq("manuOrderIdFk", originOrder.getId()));
}
//新增生产订单
TraceManuOrderEntity traceManuOrderEntity = new TraceManuOrderEntity();
BeanUtils.copyProperties(traceManuOrderUploadRequest, traceManuOrderEntity);
traceManuOrderEntity.setId(IdUtil.getSnowflakeNextId());
traceManuOrderService.save(traceManuOrderEntity);
//新增订单关联明细
List<TraceManuDetailRequest> traceManuDetailRequests = traceManuOrderUploadRequest.getDetails();
if (CollUtil.isNotEmpty(traceManuDetailRequests)) {
for (TraceManuDetailRequest traceManuDetailRequest : traceManuDetailRequests) {
TraceManuCodeRelEntity traceManuCodeRelEntity = new TraceManuCodeRelEntity();
BeanUtils.copyProperties(traceManuDetailRequest, traceManuCodeRelEntity);
traceManuCodeRelEntity.setId(IdUtil.getSnowflakeNextId());
traceManuCodeRelEntity.setManuOrderIdFk(traceManuOrderEntity.getId());
traceManuOrderService.save(traceManuOrderEntity);
}
}
//设置任务已完成
taskNoticeEntity.setStatus(3);
traceTaskNoticeService.updateById(taskNoticeEntity);
udiTraceService.pushDelayRemoveTask(taskNoticeEntity);
return ResultVOUtils.success("上传成功");
}
// /**
// * 客户端根据任务上传出入库单据
// *
// * @param traceOrderUploadRequest
// * @param bindingResult
// * @return
// */
// @Transactional
// @ApiOperation(value = "客户端根据任务上传出入库单据", response = BaseResponse.class)
// @AuthRuleAnnotation("udi/trace/order/upload")
// @PostMapping("udi/trace/order/upload")
// public BaseResponse uploadOrder(@RequestBody TraceOrderUploadRequest traceOrderUploadRequest, BindingResult bindingResult) {
// if (bindingResult.hasErrors()) {
// return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
// }
//
// TraceTaskNoticeEntity taskNoticeEntity = traceTaskNoticeService.getById(traceOrderUploadRequest.getTaskId());
// if (taskNoticeEntity == null) {
// return ResultVOUtils.error(500, "任务已过期,或任务不存在!");
// }
//
// //清空历史数据
// traceOrderService.deleteByCompanyId(taskNoticeEntity.getProdudctRecordIdFk(), taskNoticeEntity.getCompanyIdFk());
//
// TraceOrderEntity traceOrderEntity = new TraceOrderEntity();
// BeanUtils.copyProperties(traceOrderUploadRequest, traceOrderEntity);
// traceOrderEntity.setId(IdUtil.getSnowflakeNextId());
// traceOrderEntity.setUpdateTime(new Date());
// traceOrderService.save(traceOrderEntity);
//
// //设置任务已完成
// taskNoticeEntity.setStatus(3);
// traceTaskNoticeService.updateById(taskNoticeEntity);
// udiTraceService.pushDelayRemoveTask(taskNoticeEntity);
// return ResultVOUtils.success("上传成功");
// }
//
//
// /**
// * 客户端根据任务上传生产关联关系信息
// *
// * @param traceManuOrderUploadRequest
// * @param bindingResult
// * @return
// */
// @Transactional
// @ApiOperation(value = "客户端根据任务上传生产关联关系信息", response = BaseResponse.class)
// @AuthRuleAnnotation("udi/trace/manuOrder/upload")
// @PostMapping("udi/trace/manuOrder/upload")
// public BaseResponse uploadManuOrder(@RequestBody TraceManuOrderUploadRequest traceManuOrderUploadRequest, BindingResult bindingResult) {
// if (bindingResult.hasErrors()) {
// return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
// }
//
//
// TraceTaskNoticeEntity taskNoticeEntity = traceTaskNoticeService.getById(traceManuOrderUploadRequest.getTaskId());
// if (taskNoticeEntity == null) {
// return ResultVOUtils.error(500, "任务已过期,或任务不存在!");
// }
//
// //清除历史数据
// TraceManuOrderEntity originOrder = traceManuOrderService.findByBillNo(traceManuOrderUploadRequest.getBillNo(), taskNoticeEntity.getProdudctRecordIdFk(), taskNoticeEntity.getCompanyIdFk());
// if (originOrder != null) {
// traceManuOrderService.removeById(originOrder.getId());
// traceManuCodeRelService.remove(new QueryWrapper<TraceManuCodeRelEntity>().eq("manuOrderIdFk", originOrder.getId()));
// }
//
// //新增生产订单
// TraceManuOrderEntity traceManuOrderEntity = new TraceManuOrderEntity();
// BeanUtils.copyProperties(traceManuOrderUploadRequest, traceManuOrderEntity);
// traceManuOrderEntity.setId(IdUtil.getSnowflakeNextId());
// traceManuOrderService.save(traceManuOrderEntity);
//
// //新增订单关联明细
// List<TraceManuDetailRequest> traceManuDetailRequests = traceManuOrderUploadRequest.getDetails();
// if (CollUtil.isNotEmpty(traceManuDetailRequests)) {
// for (TraceManuDetailRequest traceManuDetailRequest : traceManuDetailRequests) {
// TraceManuCodeRelEntity traceManuCodeRelEntity = new TraceManuCodeRelEntity();
// BeanUtils.copyProperties(traceManuDetailRequest, traceManuCodeRelEntity);
// traceManuCodeRelEntity.setId(IdUtil.getSnowflakeNextId());
// traceManuCodeRelEntity.setManuOrderIdFk(traceManuOrderEntity.getId());
// traceManuOrderService.save(traceManuOrderEntity);
// }
// }
//
// //设置任务已完成
// taskNoticeEntity.setStatus(3);
// traceTaskNoticeService.updateById(taskNoticeEntity);
// udiTraceService.pushDelayRemoveTask(taskNoticeEntity);
//
// return ResultVOUtils.success("上传成功");
// }
}

@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
import io.swagger.annotations.ApiModel;
@ -105,242 +104,13 @@ public class UserCompanyEntity implements Serializable {
@TableField(value = "`reason`")
private String reason;
private String customerId;
private String classes;
/**
*
*/
private String area;
/**
*
*/
private String detailAddr;
/**
* x
*/
private String appId;
/**
* x
*/
private String appSecret;
/**
*
*/
private String contacts;
/**
*
*/
private String mobile;
/**
*
*/
private String tel;
/**
*
*/
private String email;
private String areaCode;
/**
* x
*/
private String refEntId;
/**
* IDx
*/
private String entId;
/**
* 012x
*/
private Integer networkType;
/**
* appkeyIDx
*/
private Integer certIdFk;
/**
* x
*/
private String parentCompany;
/**
* Idx
*/
private String parentIdFk;
/**
* 1
*/
private String contactsPapersType;
/**
*
*/
private String contactsPapersCode;
/**
* 1234
*/
private String registerStatus;
/**
*
*/
private String jyxkzh;
/**
*
*/
private String jyxkzfzjg;
/**
*
*/
private LocalDate jyxkzyxq;
/**
*
* 线 1线2线
*/
private String jybapzh;
/**
*
*/
private String jybabm;
/**
*
*/
@TableField("fzrq")
private Date fzrq;
/**
*
*/
private String suihao;
/**
*
*/
private String kaihuhang;
/**
*
*/
private String kaihuzhanghao;
/**
* 0稿435612
*/
private Integer auditStatus;
/**
*
*/
private String filePath;
/**
*
*/
private String filePath2;
/**
*
*/
private String filePath3;
/**
*
*/
private String filePath4;
/**
*
*/
private String unitIdFk;
/**
*
*/
private String createBy;
/**
*
*/
private Date auditTime;
/**
*
*/
private String auditComment;
/**
* 1.稿2.)
*/
private Integer editStatus;
/**
*
*/
private String remark;
/**
*
*/
private String createUser;
/**
*
*/
private Date createTime;
/**
*
*/
private String updateUser;
/**
*
*/
private Date updateTime;
private String auditor;
private String roleId;
@ApiModelProperty(value = "在线状态 1在线2离线")
@TableField(exist = false)
private String failCout;
@TableField(exist = false)
private String passCout;
@TableField(exist = false)
private String productFailCout;
@TableField(exist = false)
private String prouctPassCout;
private Integer onLineStatus;
private static final long serialVersionUID = 1L;
}

@ -19,7 +19,7 @@ import lombok.Data;
*/
@Data
@ApiModel("任务公告表")
@TableName(value = "trace_task_notice")
@TableName(value = "trace_task_notice", autoResultMap = true)
public class TraceTaskNoticeEntity implements Serializable {
@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.INPUT)
@ -53,20 +53,20 @@ public class TraceTaskNoticeEntity implements Serializable {
@TableField(value = "companyIdFk")
private Long companyIdFk;
/**
*
*/
@ApiModelProperty(value = "注册企业统一社会信用号")
@TableField(value = "creditNum")
private String creditNum;
/**
*
*
*/
@ApiModelProperty(value = "医疗器械注册人")
@TableField(value = "ylqxzcrbarmc")
private String ylqxzcrbarmc;
/**
*
*/
@ApiModelProperty(value = "医疗器械注册人统一社会信用号")
@TableField(value = "creditNum")
private String creditNum;
/**
*

@ -110,5 +110,6 @@ public class TraceTaskDlResponse {
@ApiModelProperty(value = "任务更新时间")
private Date updateTime;
private String companyName;
}

@ -1,5 +1,6 @@
package com.glxp.api.service.trace;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.trace.TraceTaskNoticeMapper;
import com.glxp.api.req.trace.TraceTaskDetailRequest;
@ -28,4 +29,6 @@ public class TraceTaskHistoryService extends ServiceImpl<TraceTaskHistoryMapper,
}
return traceTaskHistoryMapper.queryTraceTaskList(traceTaskDetailRequest);
}
}

@ -223,6 +223,7 @@ public class UdiTraceService {
//创建任务列表
public TraceTaskNoticeEntity createTraceNotice(Integer taskType, TraceProductDetailEntity traceProductDetailEntity, Long companyId) {
UserCompanyEntity userCompanyEntity = userCompanyService.getById(companyId);
TraceTaskNoticeEntity traceTaskNoticeEntity = new TraceTaskNoticeEntity();
traceTaskNoticeEntity.setId(IdUtil.getSnowflakeNextId());
traceTaskNoticeEntity.setProdudctRecordIdFk(traceProductDetailEntity.getId());
@ -230,7 +231,7 @@ public class UdiTraceService {
traceTaskNoticeEntity.setStatus(1);
traceTaskNoticeEntity.setCompanyIdFk(companyId);
traceTaskNoticeEntity.setYlqxzcrbarmc(traceProductDetailEntity.getYlqxzcrbarmc());
traceTaskNoticeEntity.setCreditNum(traceProductDetailEntity.getCreditNum());
traceTaskNoticeEntity.setCreditNum(userCompanyEntity.getCreditNum());
traceTaskNoticeEntity.setCpmctymc(traceProductDetailEntity.getCpmctymc());
traceTaskNoticeEntity.setGgxh(traceProductDetailEntity.getGgxh());
traceTaskNoticeEntity.setBatchNo(traceProductDetailEntity.getBatchNo());

@ -33,6 +33,7 @@
</select>
<select id="filterCompanyCert" parameterType="com.glxp.api.req.purchase.FilterSupCertRequest"
resultType="com.glxp.api.entity.sup.UserCertEntity">
-- select * from sup_cert
select * from user_cert
<where>
<if test="businessId != '' and businessId!=null">
@ -41,6 +42,9 @@
<if test="customerId != '' and customerId!=null">
and customerId = #{customerId}
</if>
<if test="businessId != '' and businessId!=null">
and businessId = #{businessId}
</if>
<if test="manufacturerIdFk != '' and manufacturerIdFk!=null">
and manufacturerIdFk = #{manufacturerIdFk}
</if>

@ -78,6 +78,7 @@
and batchNo = #{batchNo}
</if>
</where>
order by trace_order.billDate
</select>

@ -1,29 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.api.dao.trace.TraceTaskNoticeMapper">
<resultMap type="com.glxp.api.res.trace.TraceTaskDlResponse" id="TraceTaskDlResult">
<result column="diList" property="diList"
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
</resultMap>
<select id="queryTraceTaskList" parameterType="com.glxp.api.req.trace.TraceTaskDetailRequest"
resultType="com.glxp.api.res.trace.TraceTaskDlResponse">
SELECT *
FROM trace_task_notice
resultMap="TraceTaskDlResult">
SELECT ttn.*, uc.companyName
FROM trace_task_notice ttn
left join user_company uc on ttn.companyIdFk = uc.id
<where>
<if test="taskType != '' and taskType != null">
and taskType = #{taskType}
and ttn.taskType = #{taskType}
</if>
<if test="status != '' and status != null">
and status = #{status}
and ttn.status = #{status}
</if>
<if test="cpmctymc != '' and cpmctymc != null">
and cpmctymc LIKE CONCAT('%', #{cpmctymc}, '%')
and ttn.cpmctymc LIKE CONCAT('%', #{cpmctymc}, '%')
</if>
<if test="ggxh != '' and ggxh != null">
and ggxh LIKE CONCAT('%', #{ggxh}, '%')
and ttn.ggxh LIKE CONCAT('%', #{ggxh}, '%')
</if>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
and ylqxzcrbarmc = #{ylqxzcrbarmc}
and ttn.ylqxzcrbarmc = #{ylqxzcrbarmc}
</if>
<if test="batchNo != '' and batchNo != null">
and batchNo = #{batchNo}
and ttn.batchNo = #{batchNo}
</if>
</where>
</select>

Loading…
Cancel
Save