From e298d496541c49f39b5e5b41049f432602317f64 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期六, 13 六月 2020 17:03:51 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/common/service/CommonService.java |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java
index 130c7ea..8e1074e 100644
--- a/src/main/java/com/zy/common/service/CommonService.java
+++ b/src/main/java/com/zy/common/service/CommonService.java
@@ -14,7 +14,7 @@
 import java.util.List;
 
 /**
- * 鍙屾繁寮忚揣鏋舵牳蹇冨姛鑳�
+ * 璐ф灦鏍稿績鍔熻兘
  * Created by vincent on 2020/6/11
  */
 @Service
@@ -63,9 +63,15 @@
                 }
             }
             if (workNo > 0){
-                // todo
                 wrkLastno.setWrkNo(workNo);
                 wrkLastnoService.updateById(wrkLastno);
+            }
+        }
+        if (workNo == 0) {
+            throw new CoolException("鐢熸垚宸ヤ綔鍙峰け璐ワ紝璇疯仈绯荤鐞嗗憳");
+        } else {
+            if (wrkMastService.selectById(workNo)!=null) {
+                throw new CoolException("鐢熸垚宸ヤ綔鍙�" + workNo + "鍦ㄥ伐浣滄。涓凡瀛樺湪");
             }
         }
         return workNo;
@@ -100,6 +106,7 @@
             for (List<Integer> node : shelves.nodes){
                 if (node.contains(curRow)) {
                     crnNo = shelves.nodes.indexOf(node) + 1;
+                    break;
                 }
             }
             BasCrnp crnp = basCrnpService.selectById(crnNo);

--
Gitblit v1.9.1