From 9e40c63ecc04d9d7b3dd98cd2f396c0ff2a79e13 Mon Sep 17 00:00:00 2001
From: zhangc <zc@123>
Date: 星期二, 03 十二月 2024 16:11:00 +0800
Subject: [PATCH] 添加订单电话更新功能及优化查询

---
 src/main/java/com/zy/asrs/service/impl/OrderServiceImpl.java |   19 ++++++++++++++-----
 1 files changed, 14 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 53936a5..d456053 100644
--- a/src/main/java/com/zy/asrs/service/impl/OrderServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/OrderServiceImpl.java
@@ -28,7 +28,9 @@
 
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
+import java.util.concurrent.TimeUnit;
 
 @Slf4j
 @Service("orderService")
@@ -88,13 +90,18 @@
     }
 
     @Override
+    public boolean updateTel(Long orderId, String tel) {
+        return this.baseMapper.updateTel(orderId, tel) > 0;
+    }
+
+    @Override
     public boolean updateSettle(Long orderId, Long settle, Long userId) {
         return this.baseMapper.updateSettle(orderId, settle, userId) > 0;
     }
 
     @Override
-    public boolean updateSettle2(Long orderId, Long settle, Integer plt) {
-        return this.baseMapper.updateSettle2(orderId, settle, plt) > 0;
+    public boolean updateSettle2(Long orderId, Long settle, Integer plt, String inTime) {
+        return this.baseMapper.updateSettle2(orderId, settle, plt, inTime) > 0;
     }
 
     @Override
@@ -126,14 +133,15 @@
 
         boolean manPakoutExist = Cools.isEmpty(manPakOut) || (manPakOut.getPayment() != null && manPakOut.getPayment() == 1);
         if (complete && wrkDeltExist && agvWrkDetlExist && waitPakinExist && manPakoutExist) {
-            if (!this.updateSettle2(order.getId(), 4L, pltType)) {
+            if (!this.updateSettle2(order.getId(), 4L, pltType, DateUtils.convert(new Date(), DateUtils.yyyyMMdd))) {
                 throw new CoolException("淇敼璁㈠崟銆恛rderNo = " + order.getOrderNo() + "銆戠姸鎬佷负宸插畬鎴愬け璐�");
             }
         } else {
-            if (!Cools.isEmpty(pltType)) {
+            if (pltType != null && pltType > 0) {
                 order.setPltType(pltType);
-                super.updateById(order);
             }
+            //order.setInTime(DateUtils.convert(new Date(), DateUtils.yyyyMMddHHmmsssss_F));
+            super.updateById(order);
 
         }
 
@@ -288,6 +296,7 @@
             response = new HttpHandler.Builder()
                     .setUri(url)
                     .setPath(path)
+                    .setTimeout(30, TimeUnit.SECONDS)
                     .setJson(JSONObject.toJSONString(requestParam))
                     .build()
                     .doPost();

--
Gitblit v1.9.1