From dfcb0d2bfce339749feb639a394ccd9323ce3b45 Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期三, 01 四月 2026 17:36:26 +0800
Subject: [PATCH] no message

---
 src/main/java/com/zy/asrs/controller/WrkMastController.java |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/WrkMastController.java b/src/main/java/com/zy/asrs/controller/WrkMastController.java
index 06a42ff..7fad2d2 100644
--- a/src/main/java/com/zy/asrs/controller/WrkMastController.java
+++ b/src/main/java/com/zy/asrs/controller/WrkMastController.java
@@ -15,7 +15,6 @@
 import com.zy.asrs.entity.WrkMast;
 import com.zy.asrs.service.WrkDetlService;
 import com.zy.asrs.service.WrkMastService;
-import com.zy.asrs.service.impl.WrkDetlServiceImpl;
 import com.zy.common.web.BaseController;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
@@ -52,7 +51,6 @@
         EntityWrapper<WrkMast> wrapper = new EntityWrapper<>();
         convert(param, wrapper);
         allLike(WrkMast.class, param.keySet(), wrapper, condition);
-
         if (!Cools.isEmpty(orderNo)) {
             List<WrkDetl> detls = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("order_no", orderNo));
             if (!Cools.isEmpty(detls)) {
@@ -169,10 +167,10 @@
             return R.error("璇疯嚦灏戦�夋嫨涓�琛屾暟鎹�");
         }
         for (WrkMast entity : list){
-           entity.setIoPri(entity.getIoPri() + 1);
-          if (!wrkMastService.update(entity,  new EntityWrapper<WrkMast>().eq("wrk_no", entity.getWrkNo()))) {
-              throw new CoolException("浼樺厛绾ф洿鏂板け璐�!");
-          }
+            entity.setIoPri(entity.getIoPri() + 1);
+            if (!wrkMastService.update(entity,  new EntityWrapper<WrkMast>().eq("wrk_no", entity.getWrkNo()))) {
+                throw new CoolException("浼樺厛绾ф洿鏂板け璐�!");
+            }
         }
 //        wrkMastService.updateBatchById(list);
         return R.ok();
@@ -180,14 +178,19 @@
 
     @RequestMapping(value = "/wrkMast/red/pri/auth")
     @ManagerAuth(memo = "宸ヤ綔妗i檷浣庝紭鍏堢骇")
+    @Transactional(rollbackFor = Exception.class)
+
     public R redPri(@RequestBody List<WrkMast> list) {
         if (list.isEmpty()) {
             return R.error("璇疯嚦灏戦�夋嫨涓�琛屾暟鎹�");
         }
         for (WrkMast entity : list){
             entity.setIoPri(entity.getIoPri() - 1);
+            if (!wrkMastService.update(entity,  new EntityWrapper<WrkMast>().eq("wrk_no", entity.getWrkNo()))) {
+                throw new CoolException("浼樺厛绾ф洿鏂板け璐�!");
+            }
         }
-        wrkMastService.updateBatchById(list);
+//        wrkMastService.updateBatchById(list);
         return R.ok();
     }
 

--
Gitblit v1.9.1