From 1182b8b80bf3859cd962384ee4f01a43b1ecd139 Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期一, 01 九月 2025 16:09:50 +0800 Subject: [PATCH] 设备管理首页新增车间级控制权限 --- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamHomeController.java | 57 +++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 49 insertions(+), 8 deletions(-) diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamHomeController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamHomeController.java index bf90445..dc96784 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamHomeController.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamHomeController.java @@ -1,11 +1,16 @@ package org.jeecg.modules.eam.controller; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.jeecg.common.api.vo.Result; +import org.jeecg.modules.eam.dto.EamReportRepairDto; import org.jeecg.modules.eam.dto.EchartsDto; +import org.jeecg.modules.eam.entity.EamEquipment; import org.jeecg.modules.eam.entity.EamFactorySecondMaintPlan; +import org.jeecg.modules.eam.entity.EamThirdMaintenanceOrder; import org.jeecg.modules.eam.service.IEamEquipmentService; import org.jeecg.modules.eam.service.IEamFactorySecondMaintPlanService; import org.jeecg.modules.eam.service.IEamReportRepairService; @@ -13,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import java.util.HashMap; @@ -48,11 +54,11 @@ */ @ApiOperation(value = "璁惧绠$悊棣栭〉-鎶�鏈姸鎬佷笌璁惧鎶ヤ慨鏁呴殰鎯呭喌", notes = "璁惧绠$悊棣栭〉-鎶�鏈姸鎬佷笌璁惧鎶ヤ慨鏁呴殰鎯呭喌") @GetMapping(value = "/techornology") - public Result<?> techOrNology() { + public Result<?> techOrNology(String productionCode) { //鎶�鏈姸鎬� - List<EchartsDto> echartsDtoList=iEamEquipmentService.echartsList(); + List<EchartsDto> echartsDtoList=iEamEquipmentService.echartsList(productionCode); //璁惧鎶ヤ慨鏁呴殰鎯呭喌 - List<EchartsDto> echartsDtoList1=iEamReportRepairService.reportRepairList(); + List<EchartsDto> echartsDtoList1=iEamReportRepairService.reportRepairList(productionCode); Map<String,Object> map=new HashMap<>(); map.put("jszt",echartsDtoList); map.put("bxqk",echartsDtoList1); @@ -66,9 +72,9 @@ */ @ApiOperation(value = "璁惧绠$悊棣栭〉-涓夌骇淇濆吇", notes = "璁惧绠$悊棣栭〉-涓夌骇淇濆吇") @GetMapping(value = "/maintenance") - public Result<?> maintenance() { + public Result<?> maintenance(String productionCode) { //涓夌骇淇濆吇 - List<EchartsDto> echartsDtoList = iEamThirdMaintenanceOrderService.selectList(); + List<EchartsDto> echartsDtoList = iEamThirdMaintenanceOrderService.selectList(productionCode); return Result.ok(echartsDtoList); } @@ -78,9 +84,44 @@ */ @ApiOperation(value = "璁惧绠$悊棣栭〉-浜屼繚鍒楄〃", notes = "璁惧绠$悊棣栭〉-浜屼繚鍒楄〃") @GetMapping(value = "/secondmaintenance") - public Result<?> secondmaintenance() { - //浜岀骇淇濆吇 - List<EamFactorySecondMaintPlan> echartsDtoList = iEamFactorySecondMaintPlanService.list(); + public Result<?> secondmaintenance(String productionCode) { + List<EamFactorySecondMaintPlan> echartsDtoList = iEamFactorySecondMaintPlanService.queryAllList(productionCode); return Result.ok(echartsDtoList); } + + /** + * 璁惧绠$悊棣栭〉-璁惧鎶ヤ慨鏁呴殰鍒楄〃 + * @param code + * @param pageNo + * @param pageSize + * @return + */ + @ApiOperation(value = "璁惧绠$悊棣栭〉-璁惧鎶ヤ慨鏁呴殰鍒楄〃", notes = "璁惧绠$悊棣栭〉-璁惧鎶ヤ慨鏁呴殰鍒楄〃") + @GetMapping(value = "/repairList") + public Result<?> repair(@RequestParam(name = "code", required = false) String code, + @RequestParam(name = "pageNo", required = false, defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", required = false, defaultValue = "10") Integer pageSize, + String productionCode) { + Page<EamReportRepairDto> page = new Page<>(pageNo, pageSize); + IPage<EamReportRepairDto> iPage = iEamReportRepairService.reportRepairList(code,productionCode,page); + return Result.ok(iPage); + } + + /** + * 璁惧绠$悊棣栭〉-涓夌骇淇濆吇鍒楄〃 + * @param code + * @param pageNo + * @param pageSize + * @return + */ + @ApiOperation(value = "璁惧绠$悊棣栭〉-涓夌骇淇濆吇鍒楄〃", notes = "璁惧绠$悊棣栭〉-涓夌骇淇濆吇鍒楄〃") + @GetMapping(value = "/maintenanceList") + public Result<?> maintenanceList(@RequestParam(name = "code", required = false) String code, + @RequestParam(name = "pageNo", required = false, defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", required = false, defaultValue = "10") Integer pageSize, + String productionCode) { + Page<EamThirdMaintenanceOrder> page = new Page<>(pageNo, pageSize); + IPage<EamThirdMaintenanceOrder> iPage = iEamThirdMaintenanceOrderService.maintenanceList(code,productionCode,page); + return Result.ok(iPage); + } } -- Gitblit v1.9.3