From 12067f657bc3dc169a7a466e433374368e8daf73 Mon Sep 17 00:00:00 2001
From: chen.llin <1442464845@qq.comm>
Date: 星期日, 18 一月 2026 16:14:27 +0800
Subject: [PATCH] 越库订单逻辑调整

---
 src/main/java/com/zy/asrs/entity/OrderPakoutLog.java |   69 +++++++++++++++++++++++++++++++---
 1 files changed, 62 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/zy/asrs/entity/OrderPakoutLog.java b/src/main/java/com/zy/asrs/entity/OrderPakoutLog.java
index 32757ce..709ce74 100644
--- a/src/main/java/com/zy/asrs/entity/OrderPakoutLog.java
+++ b/src/main/java/com/zy/asrs/entity/OrderPakoutLog.java
@@ -8,11 +8,12 @@
 import com.core.common.SpringUtils;
 import com.zy.asrs.service.DocTypeService;
 import com.zy.asrs.service.OrderSettleService;
-import com.zy.common.utils.Synchro;
+import com.zy.common.properties.CrossDockProperties;
 import com.zy.system.entity.User;
 import com.zy.system.service.UserService;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import org.springframework.beans.BeanUtils;
 import org.springframework.format.annotation.DateTimeFormat;
 
 import java.io.Serializable;
@@ -20,7 +21,7 @@
 import java.util.Date;
 
 @Data
-@TableName("man_order_pakout_log")
+@TableName("man_order_log_pakout")
 public class OrderPakoutLog implements Serializable {
 
     private static final long serialVersionUID = 1L;
@@ -29,7 +30,7 @@
      * ID
      */
     @ApiModelProperty(value = "ID")
-    @TableId(value = "id", type = IdType.AUTO)
+    @TableId(value = "id", type = IdType.INPUT)
     private Long id;
 
     /**
@@ -94,7 +95,7 @@
      * 瀹㈡埛缂栧彿
      */
     @ApiModelProperty(value = "瀹㈡埛缂栧彿")
-    private Long cstmr;
+    private String cstmr;
 
     /**
      * 瀹㈡埛
@@ -276,10 +277,31 @@
     @TableField("pakin_pakout_status")
     private Integer pakinPakoutStatus;
 
+    /**
+     * 鏈堢粨ID
+     */
+    @ApiModelProperty(value = "鏈堢粨ID")
+    @TableField("monthly_settle_id")
+    private Long monthlySettleId;
+
+    /**
+     * 鏈堢粨缂栧彿
+     */
+    @ApiModelProperty(value = "鏈堢粨缂栧彿")
+    @TableField("monthly_settle_no")
+    private String monthlySettleNo;
+
+    /**
+     * 鏄惁鏈変笟鍔℃椂闂村彉鏇磋褰曪紙涓存椂瀛楁锛屼笉鏄犲皠鍒版暟鎹簱锛�
+     */
+    @ApiModelProperty(value = "鏄惁鏈変笟鍔℃椂闂村彉鏇磋褰�")
+    @TableField(exist = false)
+    private Boolean hasChangeLog;
+
     public OrderPakoutLog() {
     }
 
-    public OrderPakoutLog(String uuid, String orderNo, String orderTime, Long docType, Long itemId, String itemName, Long allotItemId, String defNumber, String number, Long cstmr, String cstmrName, String tel, String operMemb, Double totalFee, Double discount, Double discountFee, Double otherFee, Double actFee, Integer payType, String salesman, Integer accountDay, Integer postFeeType, Double postFee, Date payTime, Date sendTime, String shipName, String shipCode, Long settle, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) {
+    public OrderPakoutLog(String uuid, String orderNo, String orderTime, Long docType, Long itemId, String itemName, Long allotItemId, String defNumber, String number, String cstmr, String cstmrName, String tel, String operMemb, Double totalFee, Double discount, Double discountFee, Double otherFee, Double actFee, Integer payType, String salesman, Integer accountDay, Integer postFeeType, Double postFee, Date payTime, Date sendTime, String shipName, String shipCode, Long settle, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) {
         this.uuid = uuid;
         this.orderNo = orderNo;
         this.orderTime = orderTime;
@@ -357,9 +379,42 @@
         DocTypeService service = SpringUtils.getBean(DocTypeService.class);
         DocType docType = service.selectById(this.docType);
         if (!Cools.isEmpty(docType)) {
-            return String.valueOf(docType.getDocName());
+            String docName = String.valueOf(docType.getDocName());
+            // 濡傛灉鏄秺搴撳崟鎹紝娣诲姞"瓒婂簱"鏍囪瘑
+            if (isCrossDock()) {
+                return docName + "(瓒婂簱)";
+            }
+            return docName;
         }
         return null;
+    }
+
+    /**
+     * 鍒ゆ柇鏄惁涓鸿秺搴撳崟鎹�
+     * 閫氳繃璁㈠崟缂栧彿鍒ゆ柇锛堣秺搴撳嚭搴撳崟浠�"CK"寮�澶达級鎴栭�氳繃澶囨敞瀛楁鍒ゆ柇锛堝娉ㄤ腑鍖呭惈"瓒婂簱"锛�
+     * 
+     * @return true: 瓒婂簱鍗曟嵁, false: 鏅�氬崟鎹�
+     */
+    public boolean isCrossDock() {
+        // 鍒ゆ柇璁㈠崟缂栧彿鏄惁浠�"CK"寮�澶达紙瓒婂簱鍑哄簱鍗曠紪鍙锋牸寮忥級
+        if (!Cools.isEmpty(this.orderNo) && this.orderNo.startsWith("CK")) {
+            return true;
+        }
+        // 鍒ゆ柇澶囨敞涓槸鍚﹀寘鍚�"瓒婂簱"
+        if (!Cools.isEmpty(this.memo) && this.memo.contains("瓒婂簱")) {
+            return true;
+        }
+        // 鍒ゆ柇鏄惁涓鸿秺搴撳嚭搴撳崟绫诲瀷
+        try {
+            CrossDockProperties crossDockProperties = SpringUtils.getBean(CrossDockProperties.class);
+            if (crossDockProperties != null && this.docType != null 
+                    && this.docType.equals(crossDockProperties.getOutboundDocTypeId())) {
+                return true;
+            }
+        } catch (Exception e) {
+            // 濡傛灉鑾峰彇閰嶇疆澶辫触锛屽拷鐣ュ紓甯�
+        }
+        return false;
     }
 
     public String getPayType$() {
@@ -488,7 +543,7 @@
     }
 
     public void sync(Object source) {
-        Synchro.Copy(source, this);
+        BeanUtils.copyProperties(source, this);
     }
 
 }

--
Gitblit v1.9.1