From db0cd1d60268811918f38a165052f94911f18e1e Mon Sep 17 00:00:00 2001 From: Lius <Lius2225@163.com> Date: 星期四, 11 四月 2024 15:26:06 +0800 Subject: [PATCH] 更新 --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcHomeController.java | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcHomeController.java b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcHomeController.java index 65d39c8..2b64c30 100644 --- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcHomeController.java +++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcHomeController.java @@ -14,6 +14,7 @@ import org.jeecg.modules.mdc.service.IMdcEquipmentService; import org.jeecg.modules.mdc.service.IMdcHomeService; import org.jeecg.modules.mdc.vo.MdcCommonVo; +import org.jeecg.modules.mdc.vo.MdcHomeEfficiencyVo; import org.jeecg.modules.system.entity.MdcProduction; import org.jeecg.modules.system.service.IMdcProductionService; import org.springframework.web.bind.annotation.GetMapping; @@ -73,7 +74,7 @@ List<MdcCommonVo> resultMap = mdcHomeService.getEquipmentStatusStatistics(userId, key); Map<String, Object> map = new HashMap<>(); map.put("list", resultMap); - map.put("producitonId", key); + map.put("productionId", key); return Result.OK(map); } @@ -191,5 +192,23 @@ return Result.OK(result); } + @ApiOperation(value = "MDC棣栭〉鎺ュ彛-宸ユ绾ц澶囨晥鐜囩粺璁�", notes = "MDC棣栭〉鎺ュ彛-宸ユ绾ц澶囨晥鐜囩粺璁�") + @GetMapping("/equipmentEfficiencyStatistics") + public Result<?> equipmentEfficiencyStatistics(String productionCode) { + LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + String userId = user.getId(); + String key = ""; + if (StringUtils.isNotBlank(productionCode)) { + //鍘傚尯 + MdcProduction mdcProduction = mdcProductionService.getOne(new LambdaQueryWrapper<MdcProduction>().eq(MdcProduction::getProductionCode, productionCode).eq(MdcProduction::getDelFlag, CommonConstant.DEL_FLAG_0.toString())); + key = mdcProduction.getId(); + } else { + //宸ユ 鏌ヨ鐢ㄦ埛鎷ユ湁鐨勫伐娈垫潈闄� + key = mdcProductionService.findThreeProductionId(userId); + } + MdcHomeEfficiencyVo result = mdcHomeService.getEquipmentEfficiencyStatistics(userId, key); + return Result.OK(result); + } + } -- Gitblit v1.9.3