From e5a85d904ce028a35229ab6245ab894afbca6531 Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期六, 26 七月 2025 17:07:30 +0800 Subject: [PATCH] 维修工单 --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcHomeController.java | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 54 insertions(+), 0 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 0c52d3c..29867c9 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 @@ -10,6 +10,9 @@ import org.jeecg.common.constant.CommonConstant; import org.jeecg.common.system.vo.LoginUser; import org.jeecg.modules.mdc.constant.MdcConstant; +import org.jeecg.modules.mdc.dto.MdcEquipmentDto; +import org.jeecg.modules.mdc.entity.MdcEquipment; +import org.jeecg.modules.mdc.entity.MdcFeedback; import org.jeecg.modules.mdc.entity.MdcOverallEquipmentEfficiency; import org.jeecg.modules.mdc.service.IMdcEquipmentService; import org.jeecg.modules.mdc.service.IMdcHomeService; @@ -225,4 +228,55 @@ return Result.OK(result); } + @ApiOperation(value = "MDC棣栭〉鎺ュ彛-璁惧绾ц澶囪缁嗕俊鎭�", notes = "MDC棣栭〉鎺ュ彛-璁惧绾ц澶囪缁嗕俊鎭�") + @GetMapping("/equipmentDetails") + public Result<?> equipmentDetails(@RequestParam(name = "equipmentId", required = true) String equipmentId) { + MdcEquipmentDto result = mdcHomeService.getEquipmentDetails(equipmentId); + return Result.OK(result); + } + + @ApiOperation(value = "MDC棣栭〉鎺ュ彛-璁惧绾ц澶囧垪琛�", notes = "MDC棣栭〉鎺ュ彛-璁惧绾ц澶囧垪琛�") + @GetMapping("/equipmentList") + public Result<?> equipmentList(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); + } + List<MdcEquipment> result = mdcHomeService.getEquipmentList(key); + return Result.OK(result); + } + + @ApiOperation(value = "MDC棣栭〉鎺ュ彛-闂鍒楄〃", notes = "MDC棣栭〉鎺ュ彛-闂鍒楄〃") + @GetMapping("/feedbackList") + public Result<?> feedbackList(String productionCode) { + LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + Integer userType = user.getUserType(); + 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 { + //鍒ゆ柇鏄叕鍙哥骇杩樻槸鍘傚尯 + MdcProduction mdcProduction = mdcProductionService.getOne(new LambdaQueryWrapper<MdcProduction>().eq(MdcProduction::getParentId, "")); + if (userType.equals(MdcConstant.USER_TYPE_4)) { + //鍏徃 + key = mdcProduction.getId(); + } else if (userType.equals(MdcConstant.USER_TYPE_3)) { + //鍘傚尯 + key = mdcProductionService.findFirstProduction(userId, mdcProduction.getId()); + } + } + List<MdcFeedback> result = mdcHomeService.getFeedbackList(key); + return Result.OK(result); + } + } -- Gitblit v1.9.3