From 9aec4562c1b7a32180a5fc34e7ef6cb79beb5c86 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期二, 13 十二月 2022 17:15:56 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/common/service/erp/task/ErpScheduler.java |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/zy/common/service/erp/task/ErpScheduler.java b/src/main/java/com/zy/common/service/erp/task/ErpScheduler.java
index 499fda5..9d9c781 100644
--- a/src/main/java/com/zy/common/service/erp/task/ErpScheduler.java
+++ b/src/main/java/com/zy/common/service/erp/task/ErpScheduler.java
@@ -76,13 +76,12 @@
 
                     if (!matService.insert(mat)) {
                         throw new CoolException(good.getBarCode() + "鍟嗗搧鍚屾澶辫触");
-                    } else {
-                        int state = 1;
-                        if (!erpService.updateStateForGoods(good.getBarCode(), state)) {
-                            throw new CoolException(good.getBarCode() + "鍟嗗搧淇敼State涓�"+state+"澶辫触");
-                        }
                     }
                 }
+                int state = 1;
+                if (!erpService.updateStateForGoods(good.getBarCode(), state)) {
+                    throw new CoolException(good.getBarCode() + "鍟嗗搧淇敼State涓�"+state+"澶辫触");
+                }
             }
         }
     }

--
Gitblit v1.9.1