From c731084698d89c12c23180f57598d521abb97a23 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期一, 12 五月 2025 14:15:32 +0800
Subject: [PATCH] 质检功能优化

---
 rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/QlyInspect.java |  129 ++++++++++++++++++++++++++++++++++--------
 1 files changed, 103 insertions(+), 26 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 afcf43c..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
@@ -1,27 +1,33 @@
 package com.vincent.rsf.server.manager.entity;
 
-import com.baomidou.mybatisplus.annotation.TableLogic;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import org.springframework.format.annotation.DateTimeFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
+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.service.UserService;
+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 {
 
@@ -40,23 +46,58 @@
     @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;
 
     /**
-     * 鐘舵�� 1: 姝e父  0: 鍐荤粨  
+     * 涓氬姟绫诲瀷
      */
-    @ApiModelProperty(value= "鐘舵�� 1: 姝e父  0: 鍐荤粨  ")
+    @ApiModelProperty(value= "涓氬姟绫诲瀷")
+    private String wkType;
+
+    /**
+     * 鍚堟牸鏁伴噺
+     */
+    @ApiModelProperty(value= "鍚堟牸鏁伴噺")
+    private Double safeQty;
+
+    /**
+     * 閫佽揣鏁伴噺
+     */
+    @ApiModelProperty(value= "閫佽揣鏁伴噺")
+    private Double dlyQty;
+
+    /**
+     * 鏀惰揣鏁伴噺
+     */
+    @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;
 
     /**
@@ -76,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;
 
     /**
@@ -89,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;
 
     /**
@@ -99,9 +142,13 @@
 
     public QlyInspect() {}
 
-    public QlyInspect(String code,String name,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.wkType = wkType;
+        this.safeQty = safeQty;
+        this.dlyQty = dlyQty;
+        this.rcptQty = rcptQty;
+        this.isptQty = isptQty;
         this.status = status;
         this.deleted = deleted;
         this.tenantId = tenantId;
@@ -114,7 +161,11 @@
 
 //    QlyInspect qlyInspect = new QlyInspect(
 //            null,    // 缂栫爜[闈炵┖]
-//            null,    // 鍚嶇О
+//            null,    // 涓氬姟绫诲瀷
+//            null,    // 鍚堟牸鏁伴噺
+//            null,    // 閫佽揣鏁伴噺
+//            null,    // 鏀惰揣鏁伴噺
+//            null,    // 璐ㄦ鏁伴噺
 //            null,    // 鐘舵�乕闈炵┖]
 //            null,    // 鏄惁鍒犻櫎[闈炵┖]
 //            null,    // 绉熸埛
@@ -125,13 +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 1:
-                return "姝e父";
+                return "璐ㄦ瀹屾垚";
             case 0:
-                return "鍐荤粨";
+                return "寰呰川妫�";
+            case  2:
+                return "璐ㄦ涓�";
+            case  3:
+                return "鍏抽棴";
             default:
                 return String.valueOf(this.status);
         }
@@ -168,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