From d000f6408f4baa0a0f87d4eda39bc8b9b543ed5b Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期五, 30 五月 2025 09:51:01 +0800 Subject: [PATCH] 设备管理后端修改 --- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/InspectionOrderController.java | 33 ++++++++++++++++++++++++++++++--- 1 files changed, 30 insertions(+), 3 deletions(-) diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/InspectionOrderController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/InspectionOrderController.java index 02cbbb6..db5a03c 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/InspectionOrderController.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/InspectionOrderController.java @@ -93,6 +93,10 @@ @Lazy private IDailyInspectionStandardService dailyInspectionStandardService; + @Autowired + @Lazy + private IAreaService areaService; + // @Autowired // private IUploadRelaService uploadRelaService; // @@ -710,6 +714,12 @@ String equipmentNum = (String)params.get("num"); String dataTime = (String)params.get("dataTime"); Equipment equipment = equipmentService.getOne(new LambdaQueryWrapper<Equipment>().eq(Equipment::getNum, equipmentNum).eq(Equipment::getDelFlag, 0)); + if(equipment == null){ + return Result.error("璁惧缁熶竴缂栧彿涓嶅瓨鍦紒"); + } + String workCenterId = equipment.getWorkCenterId(); + Area area = areaService.getById(workCenterId); + List<Map<String, Object>> list1 = this.getInspectionStandars(equipmentNum,"day",dataTime); List<Map<String, Object>> list2 = this.getUserQianzi(equipmentNum,"day",dataTime); @@ -720,6 +730,10 @@ mapResult.put("equipentNum",equipment.getNum()); mapResult.put("equipentName",equipment.getName()); + mapResult.put("equipmentModel",equipment.getModel()); + if(area != null){ + mapResult.put("workCenterName",area.getName()); + } mapResult.put("list1",list1); mapResult.put("list2",list2); mapResult.put("list3",list3); @@ -737,18 +751,18 @@ String name = (String)map.get("name"); String detectionStandard = (String)map.get("detectionStandard"); List<Map<String, Object>> record = inspectionOrderService.findDayInspectionStandardProject(equipmentNum,name, detectionStandard,dataTime); - List<InspectionResultVo> listS = new ArrayList<>(); - for (Map<String, Object> r : record) { + if(maps.size()>0){ Boolean flag = false; for (Map<String, Object> map1 : maps) { if(map1.containsValue(r.get("name")) && map1.containsValue(r.get("detectionStandard"))){ -// map1.put(r.get("dayTime").toString(),r.get("insResult")); + map1.put(r.get("dayTime").toString(),r.get("insResult")); flag = true; InspectionResultVo inspectionResultVo = new InspectionResultVo(); inspectionResultVo.setDayTime((String)r.get("dayTime")); + inspectionResultVo.setWeekOfMonth((Integer)r.get("weekOfMonth")); inspectionResultVo.setInsResult((String)r.get("insResult")); listS.add(inspectionResultVo); @@ -764,8 +778,11 @@ // hashMap.put(r.get("dayTime").toString(),r.get("insResult")); InspectionResultVo inspectionResultVo = new InspectionResultVo(); inspectionResultVo.setDayTime((String)r.get("dayTime")); + inspectionResultVo.setWeekOfMonth((Integer)r.get("weekOfMonth")); inspectionResultVo.setInsResult((String)r.get("insResult")); listS.add(inspectionResultVo); + + hashMap.put("dataList",listS);//---- maps.add(hashMap); } }else{ @@ -777,6 +794,7 @@ InspectionResultVo inspectionResultVo = new InspectionResultVo(); inspectionResultVo.setDayTime((String)r.get("dayTime")); inspectionResultVo.setInsResult((String)r.get("insResult")); + inspectionResultVo.setWeekOfMonth((Integer)r.get("weekOfMonth")); listS.add(inspectionResultVo); hashMap.put("dataList",listS); @@ -801,6 +819,7 @@ InspectionResultVo inspectionResultVo = new InspectionResultVo(); inspectionResultVo.setDayTime((String)map.get("dayTime")); inspectionResultVo.setInspectionUserName((String)map.get("inspectionUserName")); + inspectionResultVo.setWeekOfMonth((Integer)map.get("weekOfMonth")); listIn.add(inspectionResultVo); map1.put("dataList",listIn); @@ -814,7 +833,9 @@ InspectionResultVo inspectionResultVo = new InspectionResultVo(); inspectionResultVo.setDayTime((String)map.get("dayTime")); inspectionResultVo.setInspectionUserName((String)map.get("inspectionUserName")); + inspectionResultVo.setWeekOfMonth((Integer)map.get("weekOfMonth")); listIn.add(inspectionResultVo); + hashMap.put("dataList",listIn);//--- hashMap.put("dataList",listIn); } }else{ @@ -825,6 +846,7 @@ InspectionResultVo inspectionResultVo = new InspectionResultVo(); inspectionResultVo.setDayTime((String)map.get("dayTime")); inspectionResultVo.setInspectionUserName((String)map.get("inspectionUserName")); + inspectionResultVo.setWeekOfMonth((Integer)map.get("weekOfMonth")); listIn.add(inspectionResultVo); hashMap.put("dataList",listIn); @@ -847,6 +869,7 @@ InspectionResultVo inspectionResultVo = new InspectionResultVo(); inspectionResultVo.setDayTime((String)map.get("dayTime")); inspectionResultVo.setRepairConfirmPerson((String)map.get("repairConfirmPerson")); + inspectionResultVo.setWeekOfMonth((Integer)map.get("weekOfMonth")); listRe.add(inspectionResultVo); map1.put("dataList",listRe); @@ -861,8 +884,11 @@ InspectionResultVo inspectionResultVo = new InspectionResultVo(); inspectionResultVo.setDayTime((String)map.get("dayTime")); inspectionResultVo.setRepairConfirmPerson((String)map.get("repairConfirmPerson")); + inspectionResultVo.setWeekOfMonth((Integer)map.get("weekOfMonth")); listRe.add(inspectionResultVo); hashMap.put("dataList",listRe); + + maps3.add(hashMap);//--- } }else{ HashMap<String, Object> hashMap = new HashMap<>(); @@ -872,6 +898,7 @@ InspectionResultVo inspectionResultVo = new InspectionResultVo(); inspectionResultVo.setDayTime((String)map.get("dayTime")); inspectionResultVo.setRepairConfirmPerson((String)map.get("repairConfirmPerson")); + inspectionResultVo.setWeekOfMonth((Integer)map.get("weekOfMonth")); listRe.add(inspectionResultVo); hashMap.put("dataList",listRe); -- Gitblit v1.9.3