From 50dce496771f0802cc2ba5edf3b749c42611ff5f Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期四, 08 五月 2025 12:55:44 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/common/service/CommonService.java |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java
index 4e32bd5..fd32480 100644
--- a/src/main/java/com/zy/common/service/CommonService.java
+++ b/src/main/java/com/zy/common/service/CommonService.java
@@ -21,8 +21,6 @@
     @Autowired
     private WrkMastService wrkMastService;
     @Autowired
-    private WrkMastLogService wrkMastLogService;
-    @Autowired
     private WrkLastnoService wrkLastnoService;
     @Autowired
     private LocMastService locMastService;
@@ -63,6 +61,21 @@
             }
         }
         return workNo;
+    }
+
+    //妫�娴嬪伐浣滃彿鏄惁鍦ㄦ寚瀹氱被鍨嬪伐浣滆寖鍥村唴
+    public synchronized boolean checkWorkNoContainMk(Integer workNo, Integer wrkMk) {
+        WrkLastno wrkLastno = wrkLastnoService.selectById(wrkMk);
+        if (Cools.isEmpty(wrkLastno)) {
+            throw new CoolException("鏁版嵁寮傚父锛岃鑱旂郴绠$悊鍛�");
+        }
+
+        int sNo = wrkLastno.getSNo();
+        int eNo = wrkLastno.getENo();
+        if (workNo >= sNo && workNo <= eNo) {
+            return true;
+        }
+        return false;
     }
 
     public static String zerofill(String msg, Integer count) {
@@ -110,8 +123,9 @@
             throw new CoolException("浠诲姟涓嶅瓨鍦�");
         }
 
-        wrkMastLogService.save(wrkNo);
-        wrkMastService.deleteById(wrkNo);
+        wrkMast.setMk("taskCancel");
+        wrkMast.setModiTime(new Date());
+        wrkMastService.updateById(wrkMast);
         return true;
     }
 

--
Gitblit v1.9.1