From dc3f9cc91759823ce59486f19b138be4b296a0f1 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期二, 28 四月 2026 09:43:28 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/entity/WrkMast.java |   60 +++++++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 45 insertions(+), 15 deletions(-)

diff --git a/src/main/java/com/zy/asrs/entity/WrkMast.java b/src/main/java/com/zy/asrs/entity/WrkMast.java
index e339021..bec8eda 100644
--- a/src/main/java/com/zy/asrs/entity/WrkMast.java
+++ b/src/main/java/com/zy/asrs/entity/WrkMast.java
@@ -1,10 +1,10 @@
 package com.zy.asrs.entity;
 
-import com.baomidou.mybatisplus.annotations.TableField;
-import com.baomidou.mybatisplus.annotations.TableId;
-import com.baomidou.mybatisplus.annotations.TableName;
-import com.baomidou.mybatisplus.enums.FieldStrategy;
-import com.baomidou.mybatisplus.enums.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.FieldStrategy;
+import com.baomidou.mybatisplus.annotation.IdType;
 import com.core.common.Cools;
 import com.core.common.SpringUtils;
 import com.zy.asrs.mapper.BasWrkIotypeMapper;
@@ -14,6 +14,7 @@
 import com.zy.system.service.UserService;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.io.Serializable;
 import java.text.SimpleDateFormat;
@@ -30,7 +31,6 @@
      */
     @ApiModelProperty(value= "宸ヤ綔鍙�")
     @TableId(value = "wrk_no", type = IdType.INPUT)
-    @TableField("wrk_no")
     private Integer wrkNo;
 
     @ApiModelProperty(value= "")
@@ -90,6 +90,7 @@
      */
     @ApiModelProperty(value= "宸ヤ綔鏃堕棿")
     @TableField("io_time")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     private Date ioTime;
 
     /**
@@ -104,6 +105,7 @@
      */
     @ApiModelProperty(value= "淇敼鏃堕棿")
     @TableField("modi_time")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     private Date modiTime;
 
     /**
@@ -118,10 +120,12 @@
      */
     @ApiModelProperty(value= "娣诲姞鏃堕棿")
     @TableField("appe_time")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     private Date appeTime;
 
     @ApiModelProperty(value= "")
     @TableField("error_time")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     private Date errorTime;
 
     @ApiModelProperty(value= "")
@@ -144,21 +148,21 @@
      * 鍫嗗灈鏈哄彿
      */
     @ApiModelProperty(value= "鍫嗗灈鏈哄彿")
-    @TableField(value = "crn_no",strategy = FieldStrategy.IGNORED)
+    @TableField(value = "crn_no", insertStrategy = FieldStrategy.ALWAYS, updateStrategy = FieldStrategy.ALWAYS)
     private Integer crnNo;
 
     /**
      * 鍙屽伐浣嶅爢鍨涙満鍙�
      */
     @ApiModelProperty(value= "鍙屽伐浣嶅爢鍨涙満鍙�")
-    @TableField(value = "dual_crn_no",strategy = FieldStrategy.IGNORED)
+    @TableField(value = "dual_crn_no", insertStrategy = FieldStrategy.ALWAYS, updateStrategy = FieldStrategy.ALWAYS)
     private Integer dualCrnNo;
 
     /**
      * RGV鍙�
      */
     @ApiModelProperty(value= "RGV鍙�")
-    @TableField(value = "rgv_no",strategy = FieldStrategy.IGNORED)
+    @TableField(value = "rgv_no", insertStrategy = FieldStrategy.ALWAYS, updateStrategy = FieldStrategy.ALWAYS)
     private Integer rgvNo;
 
     /**
@@ -174,6 +178,13 @@
     @ApiModelProperty(value= "绯荤粺娑堟伅")
     @TableField(value = "system_msg")
     private String systemMsg;
+
+    /**
+     * 涓嬪彂澶辫触娆℃暟
+     */
+    @ApiModelProperty(value= "涓嬪彂澶辫触娆℃暟")
+    @TableField(value = "send_fail_count")
+    private Integer sendFailCount;
 
     /**
      * 鎵规鍙�
@@ -195,6 +206,9 @@
         if (entity != null) {
             return entity.getWrkDesc();
         }
+        try {
+            return com.zy.core.enums.WrkStsType.query(this.wrkSts).desc;
+        } catch (Exception ignore) {}
         return null;
     }
 
@@ -209,20 +223,32 @@
 
     public String getLocNo$(){
         LocMastService service = SpringUtils.getBean(LocMastService.class);
-        LocMast locMast = service.selectById(this.locNo);
+        LocMast locMast = service.getById(this.locNo);
         if (!Cools.isEmpty(locMast)){
-            return String.valueOf(locMast.getLocNo());
+            return formatMappedLocNo(String.valueOf(locMast.getLocNo()));
         }
         return null;
     }
 
     public String getSourceLocNo$(){
         LocMastService service = SpringUtils.getBean(LocMastService.class);
-        LocMast locMast = service.selectById(this.sourceLocNo);
+        LocMast locMast = service.getById(this.sourceLocNo);
         if (!Cools.isEmpty(locMast)){
-            return String.valueOf(locMast.getLocNo());
+            return formatMappedLocNo(String.valueOf(locMast.getLocNo()));
         }
         return null;
+    }
+
+    private String formatMappedLocNo(String locNo){
+        if (Cools.isEmpty(this.crnNo)){
+            return locNo;
+        }
+        BasCrnpService basCrnpService = SpringUtils.getBean(BasCrnpService.class);
+        BasCrnp basCrnp = basCrnpService.getById(this.crnNo);
+        if (Cools.isEmpty(basCrnp)){
+            return locNo;
+        }
+        return basCrnp.formatMappedLocNo(locNo);
     }
 
     public String getIoTime$(){
@@ -234,7 +260,7 @@
 
     public String getModiUser$(){
         UserService service = SpringUtils.getBean(UserService.class);
-        User user = service.selectById(this.modiUser);
+        User user = service.getById(this.modiUser);
         if (!Cools.isEmpty(user)){
             return String.valueOf(user.getUsername());
         }
@@ -250,7 +276,7 @@
 
     public String getAppeUser$(){
         UserService service = SpringUtils.getBean(UserService.class);
-        User user = service.selectById(this.appeUser);
+        User user = service.getById(this.appeUser);
         if (!Cools.isEmpty(user)){
             return String.valueOf(user.getUsername());
         }
@@ -276,6 +302,10 @@
     }
 
     public void setErrorMemo(String errorMemo) {
+        if (errorMemo == null) {
+            this.errorMemo = null;
+            return;
+        }
         if (errorMemo.length() > 255) {
             errorMemo = errorMemo.substring(0, 150);
         }

--
Gitblit v1.9.1