From 473da408619b57c656cc22e191e9ed2e1c3eafaa Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期五, 13 六月 2025 10:41:19 +0800
Subject: [PATCH] *

---
 src/main/java/com/zy/asrs/entity/BasRgvOpt.java |   30 +++++++++++++++++++++++++++++-
 1 files changed, 29 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/zy/asrs/entity/BasRgvOpt.java b/src/main/java/com/zy/asrs/entity/BasRgvOpt.java
index a12bd5a..1c4e9ff 100644
--- a/src/main/java/com/zy/asrs/entity/BasRgvOpt.java
+++ b/src/main/java/com/zy/asrs/entity/BasRgvOpt.java
@@ -5,6 +5,10 @@
 import com.baomidou.mybatisplus.annotations.TableField;
 import java.text.SimpleDateFormat;
 import java.util.Date;
+
+import com.zy.core.enums.RgvTaskModeType;
+import com.zy.core.model.command.RgvCommand;
+import com.zy.core.model.protocol.RgvProtocol;
 import org.springframework.format.annotation.DateTimeFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
@@ -27,7 +31,7 @@
      * ID
      */
     @ApiModelProperty(value= "ID")
-    @TableId(value = "id", type = IdType.INPUT)
+    @TableId(value = "id", type = IdType.AUTO)
     private Long id;
 
     /**
@@ -149,6 +153,30 @@
     private String memo;
 
     public BasRgvOpt() {}
+    public BasRgvOpt(RgvProtocol rgvProtocol, RgvCommand command) {
+        Date now = new Date();
+        this.wrkNo1 = rgvProtocol.getTaskNo1().intValue();
+        this.rgvNo = rgvProtocol.getRgvNo();
+        this.sendTime = now;
+        this.mode = command.getTaskModeType1().name();
+        this.sourceSta = command.getSourceStaNo1().intValue();
+        this.posSta = command.getDestinationStaNo1().intValue();
+        this.updateTime = now;
+        this.updateBy = 9999L;
+        this.memo = "浠诲姟涓嬪彂鑷姩鐢熸垚鎸囦护鏃ュ織";
+    }
+    public BasRgvOpt(RgvProtocol rgvProtocol, Long command) {
+        Date now = new Date();
+        this.wrkNo1 = rgvProtocol.getTaskNo1().intValue();
+        this.rgvNo = rgvProtocol.getRgvNo();
+        this.sendTime = now;
+        this.mode = "婕父";
+        this.sourceSta = rgvProtocol.getRgvPosI();
+        this.posSta = command.intValue();
+        this.updateTime = now;
+        this.updateBy = 9999L;
+        this.memo = "婕父浠诲姟瑙﹀彂";
+    }
 
     public BasRgvOpt(Integer wrkNo1,Integer wrkNo2,Integer rgvNo,Date sendTime,String mode,Integer sourceRow,Integer sourceBay,Integer sourceLev,Integer sourceSta,Integer posRow,Integer posBay,Integer posLev,Integer posSta,Integer response,Date updateTime,Long updateBy,String memo) {
         this.wrkNo1 = wrkNo1;

--
Gitblit v1.9.1