From 4f626eccf34d0e8b6e6033c8fbddaa28baa99799 Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期四, 11 十二月 2025 10:32:48 +0800
Subject: [PATCH] agv工作档日志修复,重新建历史表,id自增去掉

---
 src/main/java/com/zy/asrs/entity/TaskLog.java |  257 +++++++++++++--------------------------------------
 1 files changed, 67 insertions(+), 190 deletions(-)

diff --git a/src/main/java/com/zy/asrs/entity/TaskLog.java b/src/main/java/com/zy/asrs/entity/TaskLog.java
index 47d9f5c..afcd760 100644
--- a/src/main/java/com/zy/asrs/entity/TaskLog.java
+++ b/src/main/java/com/zy/asrs/entity/TaskLog.java
@@ -1,28 +1,26 @@
 package com.zy.asrs.entity;
 
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.enums.IdType;
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.core.common.Cools;import com.core.common.SpringUtils;
-import com.zy.asrs.service.WrkMastService;
+import com.zy.asrs.service.*;
 import com.zy.asrs.entity.WrkMast;
 import com.baomidou.mybatisplus.annotations.TableField;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import org.springframework.format.annotation.DateTimeFormat;
 import com.core.common.SpringUtils;
-import com.zy.asrs.service.BasWrkStatusService;
 import com.zy.asrs.entity.BasWrkStatus;
 import com.core.common.SpringUtils;
-import com.zy.asrs.service.BasWrkIotypeService;
 import com.zy.asrs.entity.BasWrkIotype;
 import com.core.common.SpringUtils;
-import com.zy.asrs.service.BasCrnpService;
 import com.zy.asrs.entity.BasCrnp;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import com.core.common.SpringUtils;
-import com.zy.asrs.service.LocMastService;
 import com.zy.asrs.entity.LocMast;
 import com.core.common.SpringUtils;
-import com.zy.asrs.service.BasDevpService;
 import com.zy.asrs.entity.BasDevp;
 import com.core.common.SpringUtils;
 import com.zy.asrs.service.BasDevpService;
@@ -69,7 +67,15 @@
     private static final long serialVersionUID = 1L;
 
     @ApiModelProperty(value= "")
+//    @TableId(value = "id", type = IdType.AUTO)
     private Long id;
+
+    /**
+     * 浠诲姟绫诲瀷锛� agv  , crn
+     */
+    @ApiModelProperty(value= "浠诲姟绫诲瀷锛� agv  , crn")
+    @TableField("task_type")
+    private String taskType;
 
     /**
      * 宸ヤ綔鍙�
@@ -79,15 +85,10 @@
     private Integer wrkNo;
 
     @ApiModelProperty(value= "")
-    @TableField("log_id")
-    private Long logId;
-
-    @ApiModelProperty(value= "")
     @TableField("inv_wh")
     private String invWh;
 
     @ApiModelProperty(value= "")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     private Date ymd;
 
     @ApiModelProperty(value= "")
@@ -102,7 +103,7 @@
      */
     @ApiModelProperty(value= "宸ヤ綔鐘舵��")
     @TableField("wrk_sts")
-    private Integer wrkSts;
+    private Long wrkSts;
 
     /**
      * 鍏ュ嚭搴撶被鍨�
@@ -112,9 +113,9 @@
     private Integer ioType;
 
     /**
-     * 鍫嗗灈鏈哄彿
+     * 鍫嗗灈鏈�
      */
-    @ApiModelProperty(value= "鍫嗗灈鏈哄彿")
+    @ApiModelProperty(value= "鍫嗗灈鏈�")
     @TableField("crn_no")
     private Integer crnNo;
 
@@ -131,7 +132,6 @@
 
     @ApiModelProperty(value= "")
     @TableField("wrk_date")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     private Date wrkDate;
 
     /**
@@ -146,14 +146,14 @@
      */
     @ApiModelProperty(value= "鐩爣绔�")
     @TableField("sta_no")
-    private Integer staNo;
+    private String staNo;
 
     /**
      * 婧愮珯
      */
     @ApiModelProperty(value= "婧愮珯")
     @TableField("source_sta_no")
-    private Integer sourceStaNo;
+    private String sourceStaNo;
 
     /**
      * 婧愬簱浣�
@@ -167,9 +167,9 @@
     private String locSts;
 
     /**
-     * 鎷f枡(checkBox)
+     * 鎷f枡
      */
-    @ApiModelProperty(value= "鎷f枡(checkBox)")
+    @ApiModelProperty(value= "鎷f枡")
     private String picking;
 
     @ApiModelProperty(value= "")
@@ -185,9 +185,9 @@
     private String updMk;
 
     /**
-     * 閫�鍑�(checkBox)
+     * 閫�鍑�
      */
-    @ApiModelProperty(value= "閫�鍑�(checkBox)")
+    @ApiModelProperty(value= "閫�鍑�")
     @TableField("exit_mk")
     private String exitMk;
 
@@ -196,9 +196,9 @@
     private Integer pltType;
 
     /**
-     * 绌烘澘(checkBox)
+     * 绌烘澘
      */
-    @ApiModelProperty(value= "绌烘澘(checkBox)")
+    @ApiModelProperty(value= "绌烘澘")
     @TableField("empty_mk")
     private String emptyMk;
 
@@ -207,7 +207,6 @@
      */
     @ApiModelProperty(value= "宸ヤ綔鏃堕棿")
     @TableField("io_time")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     private Date ioTime;
 
     @ApiModelProperty(value= "")
@@ -234,7 +233,6 @@
      */
     @ApiModelProperty(value= "鍫嗗灈鏈哄惎鍔ㄦ椂闂�")
     @TableField("crn_str_time")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     private Date crnStrTime;
 
     /**
@@ -242,20 +240,14 @@
      */
     @ApiModelProperty(value= "鍫嗗灈鏈哄仠姝㈡椂闂�")
     @TableField("crn_end_time")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     private Date crnEndTime;
 
-    /**
-     * 鎷f枡鏃堕棿
-     */
-    @ApiModelProperty(value= "鎷f枡鏃堕棿")
+    @ApiModelProperty(value= "")
     @TableField("plc_str_time")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     private Date plcStrTime;
 
     @ApiModelProperty(value= "")
     @TableField("crn_pos_time")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     private Date crnPosTime;
 
     @ApiModelProperty(value= "")
@@ -270,9 +262,11 @@
     @TableField("ref_wrkno")
     private Double refWrkno;
 
-    @ApiModelProperty(value= "")
+    /**
+     * 鎷f枡鏃堕棿
+     */
+    @ApiModelProperty(value= "鎷f枡鏃堕棿")
     @TableField("ref_iotime")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     private Date refIotime;
 
     /**
@@ -287,7 +281,6 @@
      */
     @ApiModelProperty(value= "淇敼鏃堕棿")
     @TableField("modi_time")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     private Date modiTime;
 
     /**
@@ -302,7 +295,6 @@
      */
     @ApiModelProperty(value= "娣诲姞鏃堕棿")
     @TableField("appe_time")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     private Date appeTime;
 
     @ApiModelProperty(value= "")
@@ -311,7 +303,6 @@
 
     @ApiModelProperty(value= "")
     @TableField("error_time")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     private Date errorTime;
 
     @ApiModelProperty(value= "")
@@ -326,9 +317,11 @@
     @TableField("manu_type")
     private String manuType;
 
-    @ApiModelProperty(value= "")
-    @TableField("memo_m")
-    private String memoM;
+    /**
+     * 澶囨敞
+     */
+    @ApiModelProperty(value= "澶囨敞")
+    private String memo;
 
     @ApiModelProperty(value= "")
     @TableField("sc_weight")
@@ -340,7 +333,6 @@
 
     @ApiModelProperty(value= "")
     @TableField("log_err_time")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     private Date logErrTime;
 
     @ApiModelProperty(value= "")
@@ -353,6 +345,7 @@
     @ApiModelProperty(value= "鏉$爜")
     private String barcode;
 
+    // Y:閿�鍞鍗曞嚭搴撲换鍔�
     @ApiModelProperty(value= "")
     @TableField("Pdc_type")
     private String PdcType;
@@ -362,160 +355,34 @@
     private String ctnNo;
 
     /**
-     * 婊℃澘(checkBox)
+     * 婊℃澘
      */
-    @ApiModelProperty(value= "婊℃澘(checkBox)")
+    @ApiModelProperty(value= "婊℃澘")
     @TableField("full_plt")
     private String fullPlt;
 
-    @ApiModelProperty(value= "")
+    /**
+     * 鍏堝叆鍝� / 鍙岄噸鍏ュ簱
+     */
+    @ApiModelProperty(value= "鍏堝叆鍝�")
     @TableField("pre_have")
     private String preHave;
 
-    @ApiModelProperty(value= "")
+    /**
+     * 绌烘搷浣� / 鍙栬揣鏃犵
+     */
+    @ApiModelProperty(value= "绌烘搷浣�")
     @TableField("take_none")
     private String takeNone;
 
-    @ApiModelProperty(value= "")
-    @TableField("line_number")
-    private Long lineNumber;
+    /**
+     * 澶栭儴浠诲姟缂栧彿
+     */
+    @ApiModelProperty(value= "澶栭儴浠诲姟缂栧彿")
+    @TableField("task_no")
+    private String taskNo;
 
     public TaskLog() {}
-
-    public TaskLog(Long id,Integer wrkNo,Long logId,String invWh,Date ymd,String mk,Integer whsType,Integer wrkSts,Integer ioType,Integer crnNo,String sheetNo,Double ioPri,Date wrkDate,String locNo,Integer staNo,Integer sourceStaNo,String sourceLocNo,String locSts,String picking,String linkMis,String onlineYn,String updMk,String exitMk,Integer pltType,String emptyMk,Date ioTime,Integer ctnType,String packed,String oveMk,Double mtnType,String userNo,Date crnStrTime,Date crnEndTime,Date plcStrTime,Date crnPosTime,Double loadTime,Double expTime,Double refWrkno,Date refIotime,Long modiUser,Date modiTime,Long appeUser,Date appeTime,String pauseMk,Date errorTime,String errorMemo,Integer ctnKind,String manuType,String memoM,Double scWeight,String logMk,Date logErrTime,String logErrMemo,String barcode,String PdcType,String ctnNo,String fullPlt,String preHave,String takeNone,Long lineNumber) {
-        this.id = id;
-        this.wrkNo = wrkNo;
-        this.logId = logId;
-        this.invWh = invWh;
-        this.ymd = ymd;
-        this.mk = mk;
-        this.whsType = whsType;
-        this.wrkSts = wrkSts;
-        this.ioType = ioType;
-        this.crnNo = crnNo;
-        this.sheetNo = sheetNo;
-        this.ioPri = ioPri;
-        this.wrkDate = wrkDate;
-        this.locNo = locNo;
-        this.staNo = staNo;
-        this.sourceStaNo = sourceStaNo;
-        this.sourceLocNo = sourceLocNo;
-        this.locSts = locSts;
-        this.picking = picking;
-        this.linkMis = linkMis;
-        this.onlineYn = onlineYn;
-        this.updMk = updMk;
-        this.exitMk = exitMk;
-        this.pltType = pltType;
-        this.emptyMk = emptyMk;
-        this.ioTime = ioTime;
-        this.ctnType = ctnType;
-        this.packed = packed;
-        this.oveMk = oveMk;
-        this.mtnType = mtnType;
-        this.userNo = userNo;
-        this.crnStrTime = crnStrTime;
-        this.crnEndTime = crnEndTime;
-        this.plcStrTime = plcStrTime;
-        this.crnPosTime = crnPosTime;
-        this.loadTime = loadTime;
-        this.expTime = expTime;
-        this.refWrkno = refWrkno;
-        this.refIotime = refIotime;
-        this.modiUser = modiUser;
-        this.modiTime = modiTime;
-        this.appeUser = appeUser;
-        this.appeTime = appeTime;
-        this.pauseMk = pauseMk;
-        this.errorTime = errorTime;
-        this.errorMemo = errorMemo;
-        this.ctnKind = ctnKind;
-        this.manuType = manuType;
-        this.memoM = memoM;
-        this.scWeight = scWeight;
-        this.logMk = logMk;
-        this.logErrTime = logErrTime;
-        this.logErrMemo = logErrMemo;
-        this.barcode = barcode;
-        this.PdcType = PdcType;
-        this.ctnNo = ctnNo;
-        this.fullPlt = fullPlt;
-        this.preHave = preHave;
-        this.takeNone = takeNone;
-        this.lineNumber = lineNumber;
-    }
-
-//    TaskLog taskLog = new TaskLog(
-//            null,    // 
-//            null,    // 宸ヤ綔鍙穂闈炵┖]
-//            null,    // 
-//            null,    // 
-//            null,    // 
-//            null,    // 
-//            null,    // 
-//            null,    // 宸ヤ綔鐘舵��
-//            null,    // 鍏ュ嚭搴撶被鍨�
-//            null,    // 鍫嗗灈鏈哄彿
-//            null,    // 
-//            null,    // 浼樺厛绾�
-//            null,    // 
-//            null,    // 鐩爣搴撲綅
-//            null,    // 鐩爣绔�
-//            null,    // 婧愮珯
-//            null,    // 婧愬簱浣�
-//            null,    // 
-//            null,    // 鎷f枡(checkBox)
-//            null,    // 
-//            null,    // 
-//            null,    // 
-//            null,    // 閫�鍑�(checkBox)
-//            null,    // 
-//            null,    // 绌烘澘(checkBox)
-//            null,    // 宸ヤ綔鏃堕棿
-//            null,    // 
-//            null,    // 
-//            null,    // 
-//            null,    // 
-//            null,    // 
-//            null,    // 鍫嗗灈鏈哄惎鍔ㄦ椂闂�
-//            null,    // 鍫嗗灈鏈哄仠姝㈡椂闂�
-//            null,    // 鎷f枡鏃堕棿
-//            null,    // 
-//            null,    // 
-//            null,    // 
-//            null,    // 
-//            null,    // 
-//            null,    // 淇敼浜哄憳
-//            null,    // 淇敼鏃堕棿
-//            null,    // 鍒涘缓鑰�
-//            null,    // 娣诲姞鏃堕棿
-//            null,    // 
-//            null,    // 
-//            null,    // 
-//            null,    // 
-//            null,    // 
-//            null,    // 
-//            null,    // 
-//            null,    // 
-//            null,    // 
-//            null,    // 
-//            null,    // 鏉$爜
-//            null,    // 
-//            null,    // 
-//            null,    // 婊℃澘(checkBox)
-//            null,    // 
-//            null,    // 
-//            null    // 
-//    );
-
-    public String getWrkNo$(){
-        WrkMastService service = SpringUtils.getBean(WrkMastService.class);
-        WrkMast wrkMast = service.selectById(this.wrkNo);
-        if (!Cools.isEmpty(wrkMast)){
-            return String.valueOf(wrkMast.getId());
-        }
-        return null;
-    }
 
     public String getYmd$(){
         if (Cools.isEmpty(this.ymd)){
@@ -567,9 +434,19 @@
         return null;
     }
 
+    public String getTaskType$(){
+        if (Cools.isEmpty(this.taskType)){return  null;}
+        if (taskType.equals("AGV")) {
+            return "AGV浠诲姟";
+        } else {
+            return "鍫嗗灈鏈轰换鍔�";
+        }
+    }
+
+
     public String getStaNo$(){
-        BasDevpService service = SpringUtils.getBean(BasDevpService.class);
-        BasDevp basDevp = service.selectById(this.staNo);
+        BasStationService service = SpringUtils.getBean(BasStationService.class);
+        BasStation basDevp = service.selectOne(new EntityWrapper<BasStation>().eq("dev_no", this.staNo));
         if (!Cools.isEmpty(basDevp)){
             return String.valueOf(basDevp.getDevNo());
         }
@@ -577,8 +454,8 @@
     }
 
     public String getSourceStaNo$(){
-        BasDevpService service = SpringUtils.getBean(BasDevpService.class);
-        BasDevp basDevp = service.selectById(this.sourceStaNo);
+        BasStationService service = SpringUtils.getBean(BasStationService.class);
+        BasStation basDevp = service.selectOne(new EntityWrapper<BasStation>().eq("dev_no", this.sourceStaNo));
         if (!Cools.isEmpty(basDevp)){
             return String.valueOf(basDevp.getDevNo());
         }
@@ -640,7 +517,7 @@
         UserService service = SpringUtils.getBean(UserService.class);
         User user = service.selectById(this.modiUser);
         if (!Cools.isEmpty(user)){
-            return String.valueOf(user.getNickname());
+            return String.valueOf(user.getUsername());
         }
         return null;
     }
@@ -656,7 +533,7 @@
         UserService service = SpringUtils.getBean(UserService.class);
         User user = service.selectById(this.appeUser);
         if (!Cools.isEmpty(user)){
-            return String.valueOf(user.getNickname());
+            return String.valueOf(user.getUsername());
         }
         return null;
     }
@@ -675,12 +552,12 @@
         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.errorTime);
     }
 
+
     public String getLogErrTime$(){
         if (Cools.isEmpty(this.logErrTime)){
             return "";
         }
         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.logErrTime);
     }
-
 
 }

--
Gitblit v1.9.1