From 3fbde4dd7e79fdb11f1fd140de0d5ada1f16d04d Mon Sep 17 00:00:00 2001
From: zhangc <zc@123>
Date: 星期二, 11 二月 2025 08:15:58 +0800
Subject: [PATCH] 兼容四期

---
 src/main/java/com/zy/asrs/service/impl/OrderServiceImpl.java |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/OrderServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/OrderServiceImpl.java
index d40aa5c..49eac78 100644
--- a/src/main/java/com/zy/asrs/service/impl/OrderServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/OrderServiceImpl.java
@@ -25,6 +25,7 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
@@ -107,6 +108,9 @@
     @Override
     public void checkComplete(String orderNo, Integer pltType) {
         Order order = this.selectByNo(orderNo);
+        if (order.getDocType() == 38) {
+            return;
+        }
         if (Cools.isEmpty(order)) {
             return;
         }
@@ -124,7 +128,7 @@
         }
 
         // 濡傛灉 浣滀笟鏁伴噺绛変簬鍗曟嵁鎬绘暟閲� && 宸ヤ綔鏄庣粏妗d腑鏃犺鍗曟嵁鐨勬暟鎹� && AGV宸ヤ綔鏄庣粏妗d腑鏃犺鍗曟嵁鐨勬暟鎹�
-        int count = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("order_no", orderNo));
+        //int count = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("order_no", orderNo));
         boolean wrkDeltExist = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().like("order_no", orderNo)) < 1;
         boolean agvWrkDetlExist = agvWrkDetlService.selectCount(new EntityWrapper<AgvWrkDetl>().like("order_no", orderNo)) < 1;
         boolean waitPakinExist = agvWaitPakinService.selectCount(new EntityWrapper<AgvWaitPakin>().like("order_no", orderNo)) < 1;
@@ -134,10 +138,10 @@
         boolean manPakoutExist = Cools.isEmpty(manPakOut) || (manPakOut.getPayment() != null && manPakOut.getPayment() == 1);
         if (complete && wrkDeltExist && agvWrkDetlExist && waitPakinExist && manPakoutExist) {
             if (pltType == null) {
-                if (!this.updateSettle(order.getId(), 4L, 9528L)) {
+                if (!this.updateSettle(order.getId(), 6L, 9528L)) {
                     throw new CoolException("淇敼璁㈠崟銆恛rderNo = " + order.getOrderNo() + "銆戠姸鎬佷负宸插畬鎴愬け璐�");
                 }
-            } else if (!this.updateSettle2(order.getId(), 4L, pltType, DateUtils.convert(new Date(), DateUtils.yyyyMMddHHmmsssss_F))) {
+            } else if (!this.updateSettle2(order.getId(), 6L, pltType, DateUtils.convert(new Date(), DateUtils.yyyyMMddHHmmsssss_F))) {
                 throw new CoolException("淇敼璁㈠崟銆恛rderNo = " + order.getOrderNo() + "銆戠姸鎬佷负宸插畬鎴愬け璐�");
             }
         } else {
@@ -150,8 +154,12 @@
     }
 
     @Override
+    @Transactional
     public void checkComplete2(String orderNo) {
         Order order = this.selectByNo(orderNo);
+        if (order.getDocType() == 38) {
+            return;
+        }
         if (Cools.isEmpty(order)) {
             return;
         }
@@ -169,7 +177,7 @@
         }
 
         // 濡傛灉 浣滀笟鏁伴噺绛変簬鍗曟嵁鎬绘暟閲� && 宸ヤ綔鏄庣粏妗d腑鏃犺鍗曟嵁鐨勬暟鎹� && AGV宸ヤ綔鏄庣粏妗d腑鏃犺鍗曟嵁鐨勬暟鎹�
-        int count = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("order_no", orderNo));
+        //int count = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("order_no", orderNo));
         boolean wrkDeltExist = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().like("order_no", orderNo)) < 1;
         boolean agvWrkDetlExist = agvWrkDetlService.selectCount(new EntityWrapper<AgvWrkDetl>().like("order_no", orderNo)) < 1;
         boolean waitPakinExist = agvWaitPakinService.selectCount(new EntityWrapper<AgvWaitPakin>().like("order_no", orderNo)) < 1;
@@ -178,7 +186,7 @@
 
         boolean manPakoutExist = Cools.isEmpty(manPakOut) || (manPakOut.getPayment() != null && manPakOut.getPayment() == 1);
         if (complete && wrkDeltExist && agvWrkDetlExist && waitPakinExist && manPakoutExist) {
-            if (!this.updateSettle(order.getId(), 4L, 9528L)) {
+            if (!this.updateSettle(order.getId(), 6L, 9528L)) {
                 throw new CoolException("淇敼璁㈠崟銆恛rderNo = " + order.getOrderNo() + "銆戠姸鎬佷负宸插畬鎴愬け璐�");
             }
         }

--
Gitblit v1.9.1