From e72f4946b1696a570022d6ae715fa07656ab89f7 Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期三, 27 九月 2023 13:07:43 +0800
Subject: [PATCH] Merge branch 'tzskasrs' of http://47.97.1.152:5880/r/zy-asrs into tzskasrs
---
src/main/java/com/zy/asrs/controller/LocRuleController.java | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/LocRuleController.java b/src/main/java/com/zy/asrs/controller/LocRuleController.java
index e06e445..017f75b 100644
--- a/src/main/java/com/zy/asrs/controller/LocRuleController.java
+++ b/src/main/java/com/zy/asrs/controller/LocRuleController.java
@@ -10,6 +10,7 @@
import com.core.common.DateUtils;
import com.core.common.R;
import com.zy.asrs.entity.LocRule;
+import com.zy.asrs.service.LocMastService;
import com.zy.asrs.service.LocRuleService;
import com.zy.common.web.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
@@ -22,6 +23,8 @@
@Autowired
private LocRuleService locRuleService;
+ @Autowired
+ private LocMastService locMastService;
@RequestMapping(value = "/locRule/{id}/auth")
@ManagerAuth
@@ -76,7 +79,14 @@
locRule.setCreateTime(now);
locRule.setUpdateBy(getUserId());
locRule.setUpdateTime(now);
+ Integer locType2 = 1;//鍗曞搧鍖哄煙
+ if (locRule.getMixed() == 1) {
+ //娣疯浇
+ locRule.setMatnr("00000000");
+ locType2 = 2;//娣锋斁鍖哄煙
+ }
locRuleService.insert(locRule);
+ locMastService.updateLocType2ByRBL(locType2, locRule.getRowBeg(), locRule.getRowEnd(), locRule.getBayBeg(), locRule.getBayEnd(), locRule.getLevBeg(), locRule.getLevEnd());
return R.ok();
}
@@ -98,6 +108,14 @@
locRule.setUpdateBy(getUserId());
locRule.setUpdateTime(new Date());
locRuleService.updateById(locRule);
+ Integer locType2 = 1;//鍗曞搧鍖哄煙
+ if (locRule.getMixed() == 0) {
+ locRuleService.updateKeepGoByMatnr(locRule.getMatnr(), locRule.getKeepGo());
+ }else {//娣疯浇
+ locRuleService.updateKeepGoByMixed(locRule.getKeepGo());
+ locType2 = 2;//娣锋斁鍖哄煙
+ }
+ locMastService.updateLocType2ByRBL(locType2, locRule.getRowBeg(), locRule.getRowEnd(), locRule.getBayBeg(), locRule.getBayEnd(), locRule.getLevBeg(), locRule.getLevEnd());
return R.ok();
}
@@ -105,7 +123,9 @@
@ManagerAuth
public R delete(@RequestParam(value="ids[]") Long[] ids){
for (Long id : ids){
- locRuleService.deleteById(id);
+ LocRule locRule = locRuleService.selectById(id);
+ locMastService.updateLocType2ByRBL(1, locRule.getRowBeg(), locRule.getRowEnd(), locRule.getBayBeg(), locRule.getBayEnd(), locRule.getLevBeg(), locRule.getLevEnd());
+ locRuleService.deleteById(id);
}
return R.ok();
}
--
Gitblit v1.9.1