From 0345d3175861c5612e937487770a5ba4e8468b14 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期六, 10 五月 2025 09:49:52 +0800
Subject: [PATCH] 收货单打印功能优化

---
 rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/QlyInspect.java |  130 ++++++++++++++++++++++++++++---------------
 1 files changed, 84 insertions(+), 46 deletions(-)

diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/QlyInspect.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/QlyInspect.java
index 2d29b4a..2e347ff 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/QlyInspect.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/QlyInspect.java
@@ -4,19 +4,30 @@
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.vincent.rsf.framework.common.Cools;
 import com.vincent.rsf.framework.common.SpringUtils;
+import com.vincent.rsf.server.system.constant.DictTypeCode;
+import com.vincent.rsf.server.system.entity.DictData;
 import com.vincent.rsf.server.system.entity.User;
+import com.vincent.rsf.server.system.service.DictDataService;
 import com.vincent.rsf.server.system.service.UserService;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import lombok.experimental.Accessors;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.format.annotation.DateTimeFormat;
 
 import java.io.Serializable;
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
 
 @Data
+@Accessors(chain = true)
 @TableName("man_qly_inspect")
 public class QlyInspect implements Serializable {
 
@@ -35,29 +46,23 @@
     @ApiModelProperty(value= "缂栫爜")
     private String code;
 
-    /**
-     * 鍚嶇О
-     */
-    @ApiModelProperty(value= "鍚嶇О")
-    private String name;
+    @ApiModelProperty("鍗曟嵁ID")
+    private Long asnId;
+
+    @ApiModelProperty("鍗曟嵁缂栫爜")
+    private String asnCode;
+
+    @ApiModelProperty("璐ㄦ鐘舵��")
+    private Short isptStatus;
+
+    @ApiModelProperty("璐ㄦ缁撴灉")
+    private Short isptResult;
 
     /**
-     * 鏍囩鐮�
+     * 涓氬姟绫诲瀷
      */
-    @ApiModelProperty(value= "鏍囩鐮�")
-    private String barcode;
-
-    /**
-     * 閫氱煡鍗曟槑缁嗘爣璇�
-     */
-    @ApiModelProperty(value= "閫氱煡鍗曟槑缁嗘爣璇�")
-    private Long asnItemId;
-
-    /**
-     * PO鍗曟槑缁嗘爣璇�
-     */
-    @ApiModelProperty(value= "PO鍗曟槑缁嗘爣璇�")
-    private Long poItemId;
+    @ApiModelProperty(value= "涓氬姟绫诲瀷")
+    private String wkType;
 
     /**
      * 鍚堟牸鏁伴噺
@@ -66,22 +71,33 @@
     private Double safeQty;
 
     /**
-     * 涓嶅悎鏍兼暟閲�
+     * 閫佽揣鏁伴噺
      */
-    @ApiModelProperty(value= "涓嶅悎鏍兼暟閲�")
-    private Double disQty;
+    @ApiModelProperty(value= "閫佽揣鏁伴噺")
+    private Double dlyQty;
 
     /**
-     * 鐘舵�� 3:  閮ㄥ垎鍚堟牸   2: 涓嶅悎鏍�   1: 鍚堟牸   0: 鏈鏌�  
+     * 鏀惰揣鏁伴噺
      */
-    @ApiModelProperty(value= "鐘舵�� 3:  閮ㄥ垎鍚堟牸   2: 涓嶅悎鏍�   1: 鍚堟牸   0: 鏈鏌�  ")
+    @ApiModelProperty(value= "鏀惰揣鏁伴噺")
+    private Double rcptQty;
+
+    /**
+     * 璐ㄦ鏁伴噺
+     */
+    @ApiModelProperty(value= "璐ㄦ鏁伴噺")
+    private Double isptQty;
+
+    /**
+     * 鐘舵�� 1: 璐ㄦ瀹屾垚  0: 寰呰川妫�   2: 璐ㄦ涓�   3: 鍏抽棴  
+     */
+    @ApiModelProperty(value= "鐘舵�� 1: 璐ㄦ瀹屾垚  0: 寰呰川妫�   2: 璐ㄦ涓�   3: 鍏抽棴  ")
     private Integer status;
 
     /**
      * 鏄惁鍒犻櫎 1: 鏄�  0: 鍚�  
      */
     @ApiModelProperty(value= "鏄惁鍒犻櫎 1: 鏄�  0: 鍚�  ")
-    @TableLogic
     private Integer deleted;
 
     /**
@@ -101,6 +117,7 @@
      */
     @ApiModelProperty(value= "娣诲姞鏃堕棿")
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
     private Date createTime;
 
     /**
@@ -114,6 +131,7 @@
      */
     @ApiModelProperty(value= "淇敼鏃堕棿")
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
     private Date updateTime;
 
     /**
@@ -124,14 +142,13 @@
 
     public QlyInspect() {}
 
-    public QlyInspect(String code, String name, String barcode, Long asnItemId, Long poItemId, Double safeQty, Double disQty, Integer status, Integer deleted, Integer tenantId, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) {
+    public QlyInspect(String code, String wkType, Double safeQty, Double dlyQty, Double rcptQty, Double isptQty, Integer status, Integer deleted, Integer tenantId, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) {
         this.code = code;
-        this.name = name;
-        this.barcode = barcode;
-        this.asnItemId = asnItemId;
-        this.poItemId = poItemId;
+        this.wkType = wkType;
         this.safeQty = safeQty;
-        this.disQty = disQty;
+        this.dlyQty = dlyQty;
+        this.rcptQty = rcptQty;
+        this.isptQty = isptQty;
         this.status = status;
         this.deleted = deleted;
         this.tenantId = tenantId;
@@ -144,12 +161,11 @@
 
 //    QlyInspect qlyInspect = new QlyInspect(
 //            null,    // 缂栫爜[闈炵┖]
-//            null,    // 鍚嶇О
-//            null,    // 鏍囩鐮�
-//            null,    // 閫氱煡鍗曟槑缁嗘爣璇�
-//            null,    // PO鍗曟槑缁嗘爣璇�
+//            null,    // 涓氬姟绫诲瀷
 //            null,    // 鍚堟牸鏁伴噺
-//            null,    // 涓嶅悎鏍兼暟閲�
+//            null,    // 閫佽揣鏁伴噺
+//            null,    // 鏀惰揣鏁伴噺
+//            null,    // 璐ㄦ鏁伴噺
 //            null,    // 鐘舵�乕闈炵┖]
 //            null,    // 鏄惁鍒犻櫎[闈炵┖]
 //            null,    // 绉熸埛
@@ -160,17 +176,41 @@
 //            null    // 澶囨敞
 //    );
 
+    public String getwkType$() {
+        if (null == this.wkType) {return  null;}
+        DictDataService dictDataService = SpringUtils.getBean(DictDataService.class);
+        DictData dictDatas = dictDataService.getOne(new LambdaQueryWrapper<DictData>()
+                .eq(DictData::getDictTypeCode, DictTypeCode.DICT_SYS_BUSINESS_TYPE)
+                .eq(DictData::getValue, this.wkType));
+        if (Objects.isNull(dictDatas) || Objects.isNull(dictDatas.getLabel())) {
+            return null;
+        }
+        return dictDatas.getLabel();
+    }
+
+    public String getIsptStatus$() {
+        if (null == this.isptStatus) {return  null;}
+        DictDataService dictDataService = SpringUtils.getBean(DictDataService.class);
+        DictData dictDatas = dictDataService.getOne(new LambdaQueryWrapper<DictData>()
+                .eq(DictData::getDictTypeCode, DictTypeCode.DICT_QLY_INSPECT_STATUS)
+                .eq(DictData::getValue, this.isptStatus));
+        if (Objects.isNull(dictDatas) || Objects.isNull(dictDatas.getLabel())) {
+            return null;
+        }
+        return dictDatas.getLabel();
+    }
+
     public String getStatus$(){
         if (null == this.status){ return null; }
         switch (this.status){
-            case 3:
-                return " 閮ㄥ垎鍚堟牸";
+            case 1:
+                return "璐ㄦ瀹屾垚";
+            case 0:
+                return "寰呰川妫�";
             case  2:
-                return "涓嶅悎鏍�";
-            case  1:
-                return "鍚堟牸";
-            case  0:
-                return "鏈鏌�";
+                return "璐ㄦ涓�";
+            case  3:
+                return "鍏抽棴";
             default:
                 return String.valueOf(this.status);
         }
@@ -207,8 +247,6 @@
         }
         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
     }
-
-
 
     public Boolean getStatusBool(){
         if (null == this.status){ return null; }

--
Gitblit v1.9.1