From 0e6be9f75b84ebdf6ed3943853d514966134da34 Mon Sep 17 00:00:00 2001
From: 18516761980 <tqsxp@163.com>
Date: 星期五, 23 九月 2022 14:05:13 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/controller/LocMastController.java | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 46 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/LocMastController.java b/src/main/java/com/zy/asrs/controller/LocMastController.java
index a5aea8f..4b17fd5 100644
--- a/src/main/java/com/zy/asrs/controller/LocMastController.java
+++ b/src/main/java/com/zy/asrs/controller/LocMastController.java
@@ -204,4 +204,50 @@
locMastService.insertBatch(list);
return R.ok("鍒濆鍖栨垚鍔�");
}
+ @RequestMapping(value = "/locMast/disableALL/auth")
+ @ManagerAuth(memo = "绂佺敤鎸囧畾璁惧鍙峰簱浣�")
+ public R disableALL(@RequestParam String param){
+ return updateAll(param,"O");
+ }
+ @RequestMapping(value = "/locMast/openAll/auth")
+ @ManagerAuth(memo = "鎵撳紑鎸囧畾璁惧鍙峰簱浣�")
+ public R openAll(@RequestParam String param){
+ return updateAll(param,"X");
+ }
+
+ private R updateAll(String param,String locSts){
+ List<LocMast> list = JSONArray.parseArray(param, LocMast.class);
+ if (Cools.isEmpty(list)){
+ return R.error();
+ }
+ int locType2=99;
+ for (LocMast locMast : list){
+ if (!locMast.getLocSts().equals(locSts)){
+ if (locSts.equals("O")){
+ return R.error("姝よ澶囦笅鏈夊簱浣嶉潪绌�,搴撲綅鍙凤細"+locMast.getLocNo()+"\t璇锋煡鐪嬪簱浣�");
+ }else if (locSts.equals("X")){
+ return R.error("姝よ澶囦笅鏈夊簱浣嶉潪绂佺敤鐘舵��,搴撲綅鍙凤細"+locMast.getLocNo()+"\t璇锋煡鐪嬪簱浣�");
+ }
+ }else if (locType2==99){
+ locType2 = locMast.getLocType2();
+ }else if(locType2 != locMast.getLocType2()){
+ return R.error("璇烽�夋嫨鍚屼竴璁惧鍙蜂笅鐨勫簱浣�");
+ }
+ }
+ if (locSts.equals("O")){
+ locSts="X";
+ }else if (locSts.equals("X")){
+ locSts="O";
+ }
+ for (LocMast locMast : list){
+ if (Cools.isEmpty(locMast) || null==locMast.getLocNo()){
+ return R.error("搴撲綅鍙蜂负绌猴細"+locMast);
+ }
+ locMast.setModiUser(getUserId());
+ locMast.setModiTime(new Date());
+ locMast.setLocSts(locSts);
+ locMastService.updateById(locMast);
+ }
+ return R.ok();
+ }
}
--
Gitblit v1.9.1