From 7d322631f160c443cf0ab0cc80d7207fb257f65f Mon Sep 17 00:00:00 2001 From: Junjie <fallin.jie@qq.com> Date: 星期四, 05 十月 2023 16:17:39 +0800 Subject: [PATCH] #Redis可视化 --- src/main/java/com/zy/asrs/controller/LocRuleController.java | 13 ++++++++++++- 1 files changed, 12 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 93cc9fc..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,11 +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(); } @@ -102,11 +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(); } @@ -114,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