From 21432990c798ed5ad945e2eb2668f1ce197282cc Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期四, 27 五月 2021 15:06:18 +0800
Subject: [PATCH] #

---
 src/main/java/zy/cloud/wms/common/service/erp/ErpScheduler.java |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/main/java/zy/cloud/wms/common/service/erp/ErpScheduler.java b/src/main/java/zy/cloud/wms/common/service/erp/ErpScheduler.java
index e4f8b0c..64acc73 100644
--- a/src/main/java/zy/cloud/wms/common/service/erp/ErpScheduler.java
+++ b/src/main/java/zy/cloud/wms/common/service/erp/ErpScheduler.java
@@ -34,7 +34,7 @@
 @RestController
 public class ErpScheduler {
 
-    public static final String URI = "http://8.133.182.21:8080/api";
+    public static final String URI = "http://8.133.182.21:6220/api";
     public static final String GET_ORDERS = "cM/basis/getOrders";
     public static final String GET_BASIS = "cM/basis/getBasis";
     public static final String UPLOAD_BILL = "cM/basis/uploadBill";
@@ -424,7 +424,7 @@
     public void getOrdersExecute(){
         try {
             Map<String, Object> json = new HashMap<>();
-            json.put("vchType", 151);
+            json.put("vchType", 11);
             String response = new HttpHandler.Builder()
                     .setUri(URI)
                     .setPath(GET_ORDERS)
@@ -585,7 +585,7 @@
                         if (result.getCode() != 1) {
                             continue;
                         }
-                        if (!orderService.updateSettle(getOrderResult0.getNumber(), 6L)) {
+                        if (!orderService.updateSettle(order.getOrderNo(), 6L)) {
                             throw new CoolException("淇敼璁㈠崟鐘舵�佸け璐�");
                         }
 //                        // 杞巻鍙叉。
@@ -747,7 +747,7 @@
     public void getCancelOrdersExecute(){
         try {
             Map<String, Object> json = new HashMap<>();
-            json.put("vchType", 151);
+            json.put("vchType", 11);
             json.put("flag", 2);
             String response = new HttpHandler.Builder()
                     .setUri(URI)
@@ -769,8 +769,13 @@
                         existNumbers.add(result0.getNumber());
                     }
                     for (String number : existNumbers) {
-                        if (!orderService.updateSettle(number, 5L)) {
+                        Order order = orderService.selectByOrderNo(number);
+                        if (order != null) {
+                            if (order.getSettle() != 3L && order.getSettle() != 5L) {
+                                if (!orderService.updateSettle(number, 5L)) {
 //                            throw new CoolException("淇敼璁㈠崟鐘舵�佸け璐�");
+                                }
+                            }
                         }
                     }
 

--
Gitblit v1.9.1