Browse Source

统一垛码命名

bess-WeiganCai 3 years ago
parent
commit
ecb01fa651
18 changed files with 37 additions and 52 deletions
  1. 2 8
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/controller/console/InspectionCaseController.java
  2. 2 2
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/controller/wx/WxInspectionCaseController.java
  3. 1 1
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dao/entity/FlowQueryRecord.java
  4. 1 1
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dao/enums/FlowQueryTypeEnum.java
  5. 1 1
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dao/vo/result/FlowQueryRecordInfoVo.java
  6. 1 1
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dao/vo/result/ListFlowQueryRecordVO.java
  7. 1 1
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dao/vo/result/WxListFlowQueryRecordVO.java
  8. 1 1
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/req/AddFlowQueryRecordReq.java
  9. 1 1
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/req/ExportFlowQueryRecordReq.java
  10. 1 1
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/req/PageListFlowQueryRecordReq.java
  11. 1 1
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/res/ExportFlowQueryRecordRes.java
  12. 1 1
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/res/PageListFlowQueryRecordRes.java
  13. 1 1
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/res/WxPageListFlowQueryRecordRes.java
  14. 1 1
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/IInspectionCaseService.java
  15. 3 3
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/impl/FlowQueryRecordServiceImpl.java
  16. 7 7
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/impl/FlowQueryServiceImpl.java
  17. 2 11
      abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/impl/InspectionCaseServiceImpl.java
  18. 9 9
      abi-cloud-qr-platform-server/src/main/resources/dao/mapper/FlowQueryRecordMapper.xml

+ 2 - 8
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/controller/console/InspectionCaseController.java

@@ -1,22 +1,16 @@
 package com.abi.qms.platform.controller.console;
 
 import java.util.List;
-import java.util.Arrays;
 
 import cn.hutool.core.util.StrUtil;
 import com.abi.qms.platform.dto.req.*;
 import com.abi.qms.platform.dto.res.*;
 import com.abi.qms.platform.feign.SkuFeign;
-import com.abi.qms.platform.service.IInspectionCaseService;
+import com.abi.qms.platform.service.InspectionCaseService;
 import com.abi.task.common.api.base.BaseResponse;
-import com.abi.task.common.excel.ExcelInputFactory;
 import com.abi.task.common.excel.ExcelOutputFactory;
-import com.abi.task.common.excel.preperties.MaterialProperty;
-import com.abi.task.common.excel.preperties.QrBoxExportProperty;
-import lombok.RequiredArgsConstructor;
 
 import javax.servlet.http.HttpServletResponse;
-import javax.validation.Valid;
 import javax.validation.constraints.*;
 
 import lombok.extern.slf4j.Slf4j;
@@ -40,7 +34,7 @@ import io.swagger.annotations.ApiOperation;
 public class InspectionCaseController {
 
     @Autowired
-    private IInspectionCaseService inspectionCaseService;
+    private InspectionCaseService inspectionCaseService;
 
     @Autowired
     private SkuFeign skuFeign;

+ 2 - 2
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/controller/wx/WxInspectionCaseController.java

@@ -2,7 +2,7 @@ package com.abi.qms.platform.controller.wx;
 
 import com.abi.platform.Base.BaseResponse;
 import com.abi.qms.platform.dto.req.WxSaveInspectionCaseReq;
-import com.abi.qms.platform.service.IInspectionCaseService;
+import com.abi.qms.platform.service.InspectionCaseService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
@@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.RestController;
 public class WxInspectionCaseController {
 
     @Autowired
-    private IInspectionCaseService inspectionCaseService;
+    private InspectionCaseService inspectionCaseService;
 
     @ApiOperation("新增稽查案件 ")
     @PostMapping("/save")

+ 1 - 1
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dao/entity/FlowQueryRecord.java

@@ -46,7 +46,7 @@ public class FlowQueryRecord implements Serializable {
     /**
      * 托盘码
      */
-    private String trayCode;
+    private String stackCode;
 
     /**
      * 品牌code

+ 1 - 1
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dao/enums/FlowQueryTypeEnum.java

@@ -18,7 +18,7 @@ import java.util.Set;
 @JsonFormat(shape = JsonFormat.Shape.OBJECT)
 public enum FlowQueryTypeEnum {
     BOX_CODE(1, "箱码查询"),
-    TRAY_CODE(2, "托盘码查询"),
+    STACK_CODE(2, "托盘码查询"),
     INVISIBLE_CODE(3, "隐形码查询");
 
     @EnumValue

+ 1 - 1
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dao/vo/result/FlowQueryRecordInfoVo.java

@@ -47,7 +47,7 @@ public class FlowQueryRecordInfoVo implements Serializable {
      * 托盘码
      */
     @ApiModelProperty(value = "托盘码")
-    private String trayCode;
+    private String stackCode;
 
     /**
      * 查询平台

+ 1 - 1
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dao/vo/result/ListFlowQueryRecordVO.java

@@ -45,7 +45,7 @@ public class ListFlowQueryRecordVO implements Serializable {
      * 托盘码
      */
     @ApiModelProperty(value = "托盘码")
-    private String trayCode;
+    private String stackCode;
 
 
     /**

+ 1 - 1
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dao/vo/result/WxListFlowQueryRecordVO.java

@@ -23,7 +23,7 @@ public class WxListFlowQueryRecordVO {
 	private String boxCode;
 
 	@ApiModelProperty(value = "托盘码")
-	private String trayCode;
+	private String stackCode;
 
 	@ApiModelProperty(value = "SKU编码")
 	private String skuCode;

+ 1 - 1
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/req/AddFlowQueryRecordReq.java

@@ -48,7 +48,7 @@ public class AddFlowQueryRecordReq {
      * 托盘码
      */
     @ApiModelProperty("托盘码 查询类型为托盘码时必传")
-    private String trayCode;
+    private String stackCode;
 
     /**
      * 品牌

+ 1 - 1
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/req/ExportFlowQueryRecordReq.java

@@ -30,7 +30,7 @@ public class ExportFlowQueryRecordReq implements Serializable {
      * 托盘码
      */
     @ApiModelProperty(value = "托盘码 不支持模糊搜索")
-    private String trayCode;
+    private String stackCode;
 
     /**
      * 流向状态 1-正常  2-异常

+ 1 - 1
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/req/PageListFlowQueryRecordReq.java

@@ -34,7 +34,7 @@ public class PageListFlowQueryRecordReq extends PageReq implements Serializable
      * 托盘码
      */
     @ApiModelProperty(value = "托盘码 不支持模糊搜索")
-    private String trayCode;
+    private String stackCode;
 
     /**
      * 流向状态 1-正常  2-异常

+ 1 - 1
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/res/ExportFlowQueryRecordRes.java

@@ -44,7 +44,7 @@ public class ExportFlowQueryRecordRes implements AbstractExcelProperty, Serializ
      */
     @ApiModelProperty(value = "托盘码")
     @ExcelHeadAlias("托盘码")
-    private String trayCode;
+    private String stackCode;
 
 
     /**

+ 1 - 1
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/res/PageListFlowQueryRecordRes.java

@@ -57,7 +57,7 @@ public class PageListFlowQueryRecordRes extends PageResp implements Serializable
          * 托盘码
          */
         @ApiModelProperty(value = "托盘码")
-        private String trayCode;
+        private String stackCode;
 
 
         /**

+ 1 - 1
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/res/WxPageListFlowQueryRecordRes.java

@@ -42,7 +42,7 @@ public class WxPageListFlowQueryRecordRes extends PageResp implements Serializab
         private String boxCode;
 
         @ApiModelProperty(value = "托盘码")
-        private String trayCode;
+        private String stackCode;
 
         @ApiModelProperty(value = "SKU")
         private String skuName;

+ 1 - 1
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/IInspectionCaseService.java

@@ -13,7 +13,7 @@ import java.util.List;
  * @author ruoyi
  * @date 2021-07-19
  */
-public interface IInspectionCaseService {
+public interface InspectionCaseService {
 
     /**
      * 新增案件

+ 3 - 3
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/impl/FlowQueryRecordServiceImpl.java

@@ -304,9 +304,9 @@ public class FlowQueryRecordServiceImpl implements IFlowQueryRecordService {
 
 
         //托盘码
-        if (FlowQueryTypeEnum.TRAY_CODE.is(queryType)) {
-            String trayCode = addReq.getTrayCode();
-            AssertUtil.isMeets(trayCode, StrUtil::isNotBlank, "托盘码查询时  托盘码不能为空!");
+        if (FlowQueryTypeEnum.STACK_CODE.is(queryType)) {
+            String stackCode = addReq.getStackCode();
+            AssertUtil.isMeets(stackCode, StrUtil::isNotBlank, "托盘码查询时  托盘码不能为空!");
         }
 
 

+ 7 - 7
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/impl/FlowQueryServiceImpl.java

@@ -14,7 +14,7 @@ import com.abi.qms.platform.infrastructure.util.AssertUtil;
 import com.abi.qms.platform.infrastructure.util.UserUtil;
 import com.abi.qms.platform.service.FlowQueryService;
 import com.abi.qms.platform.service.IFlowQueryRecordService;
-import com.abi.qms.platform.service.IInspectionCaseService;
+import com.abi.qms.platform.service.InspectionCaseService;
 import com.abi.task.common.utils.PojoConverterUtils;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -39,7 +39,7 @@ public class FlowQueryServiceImpl implements FlowQueryService {
     private IFlowQueryRecordService flowQueryRecordService;
 
     @Autowired
-    private IInspectionCaseService caseService;
+    private InspectionCaseService caseService;
 
     @Autowired
     private UserUtil userUtil;
@@ -225,7 +225,7 @@ public class FlowQueryServiceImpl implements FlowQueryService {
         } else if (FlowQueryTypeEnum.INVISIBLE_CODE.is(queryType)) {
             // 箱码(隐形码)查询
             res = this.getFlowInfoByInvisibleCode(inquireCode);
-        } else if (FlowQueryTypeEnum.TRAY_CODE.is(queryType)) {
+        } else if (FlowQueryTypeEnum.STACK_CODE.is(queryType)) {
             // 剁码查询
             res = this.getFlowInfoByStackCode(inquireCode);
         }
@@ -414,7 +414,7 @@ public class FlowQueryServiceImpl implements FlowQueryService {
         // TODO 处理逻辑同console端,待流向查询接口完成后修改
         GetFlowInfoRes res = this.getFlowInfoByStackCode(req.getStackCode());
         SaveFlowQueryRecordReq saveFlowQueryRecordReq = new SaveFlowQueryRecordReq()
-                .setQueryType(FlowQueryTypeEnum.TRAY_CODE.getCode())
+                .setQueryType(FlowQueryTypeEnum.STACK_CODE.getCode())
                 .setQueryPlatform(ReqChannelTypeEnum.WECHAT.getCode())
                 .setQueryAddress("");
         this.saveQueryRecord(res, saveFlowQueryRecordReq);
@@ -434,7 +434,7 @@ public class FlowQueryServiceImpl implements FlowQueryService {
             Integer queryType = req.getQueryType();
             //判断流向状态
             Map<Integer, GetFlowInfoRes.FlowBean> abnormalNodeMap = new HashMap<>();
-            if (!FlowQueryTypeEnum.TRAY_CODE.is(queryType)) {
+            if (!FlowQueryTypeEnum.STACK_CODE.is(queryType)) {
                 abnormalNodeMap = res.getFlowList()
                         .stream()
                         .filter(s -> !(s.getNodeStatus().equals(1)))
@@ -449,8 +449,8 @@ public class FlowQueryServiceImpl implements FlowQueryService {
 
 
             //  箱码 查询类型为箱码时必传
-            if (FlowQueryTypeEnum.TRAY_CODE.is(queryType)) {
-                addReq.setTrayCode(res.getStack().getStackCode());
+            if (FlowQueryTypeEnum.STACK_CODE.is(queryType)) {
+                addReq.setStackCode(res.getStack().getStackCode());
             } else {
                 addReq.setBoxCode(res.getBoxStack().getBoxCode());
             }

+ 2 - 11
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/impl/InspectionCaseServiceImpl.java

@@ -3,7 +3,6 @@ package com.abi.qms.platform.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollectionUtil;
-import cn.hutool.core.map.MapUtil;
 import cn.hutool.core.util.StrUtil;
 import com.abi.qms.platform.dao.entity.InspectionCase;
 import com.abi.qms.platform.dao.entity.InspectionCaseBoxCode;
@@ -15,34 +14,26 @@ import com.abi.qms.platform.dao.mapper.InspectionCaseFlowMapper;
 import com.abi.qms.platform.dao.mapper.InspectionCaseMapper;
 import com.abi.qms.platform.dao.vo.result.InspectionCaseDetailVO;
 import com.abi.qms.platform.dao.vo.result.ListInspectionCaseVO;
-import com.abi.qms.platform.dao.vo.result.ListRoleVO;
 import com.abi.qms.platform.dto.req.*;
 import com.abi.qms.platform.dto.res.*;
 import com.abi.qms.platform.feign.SkuFeign;
 import com.abi.qms.platform.infrastructure.util.AssertUtil;
 import com.abi.qms.platform.infrastructure.util.PageUtil;
 import com.abi.qms.platform.service.FlowQueryService;
-import com.abi.qms.platform.service.IInspectionCaseService;
-import com.abi.qms.platform.service.InspectionCaseFlowService;
+import com.abi.qms.platform.service.InspectionCaseService;
 import com.abi.qms.platform.service.InspectionCaseNumberService;
 import com.abi.task.common.api.exception.BusinessException;
 import com.abi.task.common.utils.PojoConverterUtils;
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import io.swagger.models.auth.In;
-import jodd.util.StringUtil;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
 
-import javax.validation.constraints.NotNull;
 import java.time.LocalDateTime;
 import java.util.*;
-import java.util.function.Consumer;
-import java.util.function.Predicate;
 import java.util.stream.Collectors;
 
 
@@ -53,7 +44,7 @@ import java.util.stream.Collectors;
  * @date: 2021-07-19
  */
 @Service
-public class InspectionCaseServiceImpl implements IInspectionCaseService {
+public class InspectionCaseServiceImpl implements InspectionCaseService {
 
 
     @Autowired

+ 9 - 9
abi-cloud-qr-platform-server/src/main/resources/dao/mapper/FlowQueryRecordMapper.xml

@@ -8,7 +8,7 @@
         <result property="id" column="id"/>
         <result property="flowStatus" column="flow_status"/>
         <result property="boxCode" column="box_code"/>
-        <result property="trayCode" column="tray_code"/>
+        <result property="stackCode" column="stack_code"/>
         <result property="brandCode" column="brand_code"/>
         <result property="brandName" column="brand_name"/>
         <result property="skuCode" column="sku_code"/>
@@ -40,7 +40,7 @@
         <result property="id" column="id"/>
         <result property="flowStatus" column="flow_status"/>
         <result property="boxCode" column="box_code"/>
-        <result property="trayCode" column="tray_code"/>
+        <result property="stackCode" column="stack_code"/>
         <result property="brandCode" column="brand_code"/>
         <result property="brandName" column="brand_name"/>
         <result property="skuCode" column="sku_code"/>
@@ -60,7 +60,7 @@
         <result property="id" column="id"/>
         <result property="flowStatus" column="flow_status"/>
         <result property="boxCode" column="box_code"/>
-        <result property="trayCode" column="tray_code"/>
+        <result property="stackCode" column="stack_code"/>
         <result property="skuCode" column="sku_code"/>
         <result property="caseNumber" column="case_number"/>
         <result property="caseName" column="case_name"/>
@@ -84,7 +84,7 @@
         `id`,
         `flow_status`,
         `box_code`,
-        `tray_code`,
+        `stack_code`,
         `sku_code`,
         `brand_code`,
         `brand_name`,
@@ -112,8 +112,8 @@
             </if>
 
             <!-- 托盘码 不支持模糊搜索 -->
-            <if test="param.trayCode!=null and param.trayCode!=''">
-                AND `tray_code` = #{param.trayCode}
+            <if test="param.stackCode!=null and param.stackCode!=''">
+                AND `stack_code` = #{param.stackCode}
             </if>
 
             <!-- 流向状态 1-正常  2-异常 -->
@@ -148,7 +148,7 @@
         <result property="id" column="id"/>
         <result property="flowStatus" column="flow_status"/>
         <result property="boxCode" column="box_code"/>
-        <result property="trayCode" column="tray_code"/>
+        <result property="stackCode" column="stack_code"/>
         <result property="queryPlatform" column="query_platform"/>
         <result property="queryAddress" column="query_address"/>
         <result property="brandCode" column="brand_code"/>
@@ -169,7 +169,7 @@
         `id`,
         `flow_status`,
         `box_code`,
-        `tray_code`,
+        `stack_code`,
         `sku_code`,
         `production_batch`,
         `production_time`,
@@ -190,7 +190,7 @@
 
     <select id="wxPageListQuery" resultMap="WxListFlowQueryRecordVO">
         SELECT
-            f.id, f.flow_status, f.box_code, f.tray_code, f.sku_code, f.create_time,
+            f.id, f.flow_status, f.box_code, f.stack_code, f.sku_code, f.create_time,
             i.case_number, i.case_name,
             p.name AS 'province_name', c.name AS 'city_name'
         FROM