qushaowei
2025-06-10 1bf6cb4c0bfc149737afa37a1df1c809b29c6139
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/InspectionOrderController.java
@@ -140,9 +140,9 @@
          String id = (String)record.get("id");
//          String equipmentId = (String)record.get("equipmentId");
//          String status = (String)record.get("status");
//          String inspectionStandardId = (String)record.get("inspectionStandardId");
//          List<InspectionCycleVo> inspectionCycles = inspectionOrderService.getInspectionCycleByEqId(inspectionStandardId);
//          record.put("inspectionCycles",inspectionCycles);
          String inspectionStandardId = (String)record.get("inspectionStandardId");
          List<InspectionCycleVo> inspectionCycles = inspectionOrderService.getInspectionCycleByEqId(inspectionStandardId);
          record.put("inspectionCycles",inspectionCycles);
          List<Map<String, Object>> inspectionOrderDetails = inspectionOrderService.getInspectionOrderDetailByOrderId(id);
          record.put("inspectionOrderDetails",inspectionOrderDetails);
@@ -714,9 +714,19 @@
       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);
//       DailyInspectionStandard standard = dailyInspectionStandardService.getOne(new LambdaQueryWrapper<DailyInspectionStandard>()
//             .eq(DailyInspectionStandard::getEquipmentId, equipment.getId())
//             .eq(DailyInspectionStandard::getDelFlag, 0)
//             .eq(DailyInspectionStandard::getVersionStatus, "2"));
       List<DailyInspectionStandard> list = dailyInspectionStandardService.lambdaQuery().eq(DailyInspectionStandard::getEquipmentId, equipment.getId())
             .eq(DailyInspectionStandard::getDelFlag, 0)
             .eq(DailyInspectionStandard::getVersionStatus, "2").list();
       List<Map<String, Object>> list1 = this.getInspectionStandars(equipmentNum,"day",dataTime);
@@ -729,8 +739,14 @@
       mapResult.put("equipentNum",equipment.getNum());
       mapResult.put("equipentName",equipment.getName());
       mapResult.put("equipmentModel",equipment.getModel());
       mapResult.put("equipmentModel",equipment.getModel());
       if(area != null){
          mapResult.put("workCenterName",area.getName());
       }
       if(list.size() > 0){
          mapResult.put("regulations",list.get(0).getDisUda1());
       }else{
          mapResult.put("regulations","-");
       }
       mapResult.put("list1",list1);
       mapResult.put("list2",list2);
@@ -750,16 +766,17 @@
          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);
@@ -775,8 +792,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{
@@ -788,6 +808,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);
@@ -812,6 +833,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);
@@ -825,7 +847,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{
@@ -836,6 +860,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);
@@ -858,6 +883,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);
@@ -872,8 +898,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<>();
@@ -883,6 +912,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);