| | |
| | | @RequestParam Map<String, Object> params) { |
| | | IPage<Map<String, Object>> dayInspectionProjectList = inspectionOrderService.findDayInspectionProjectList(pageNo, 1000, params); |
| | | List<Map<String, Object>> records = dayInspectionProjectList.getRecords(); |
| | | |
| | | List<Map<String, Object>> maps = new ArrayList<>(); |
| | | |
| | | for (Map<String, Object> record : records) { |
| | | |
| | | if(maps.size()>0){ |
| | | Boolean flag = false; |
| | | for (Map<String, Object> map : maps) { |
| | |
| | | hashMap.put(record.get("createTime").toString(),record.get("insResult")); |
| | | maps.add(hashMap); |
| | | } |
| | | // hashMap.put("name",record.get("name")); |
| | | // hashMap.put("equipmentNum",record.get("equipmentNum")); |
| | | // hashMap.put("equipmentName",record.get("equipmentName")); |
| | | // hashMap.put("detectionStandard",record.get("detectionStandard")); |
| | | // hashMap.put(record.get("createTime").toString(),record.get("insResult")); |
| | | } |
| | | // maps.add(hashMap); |
| | | return Result.ok(maps); |
| | | } |
| | | |
| | | /** |
| | | *生产设备自主维护周点检表 报表 |
| | | * 2024-3-27 qsw |
| | | */ |
| | | @GetMapping("findWeekInspectionProjectList") |
| | | public Result<?> findWeekInspectionProjectList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
| | | @RequestParam(name = "pageSize", defaultValue = "1000") Integer pageSize, |
| | | @RequestParam Map<String, Object> params) { |
| | | IPage<Map<String, Object>> dayInspectionProjectList = inspectionOrderService.findWeekInspectionProjectList(pageNo, 1000, params); |
| | | List<Map<String, Object>> records = dayInspectionProjectList.getRecords(); |
| | | List<Map<String, Object>> maps = new ArrayList<>(); |
| | | for (Map<String, Object> record : records) { |
| | | if(maps.size()>0){ |
| | | Boolean flag = false; |
| | | for (Map<String, Object> map : maps) { |
| | | if(map.containsValue(record.get("name")) && map.containsValue(record.get("detectionStandard"))){ |
| | | map.put(record.get("createTime").toString(),record.get("insResult")); |
| | | flag = true; |
| | | } |
| | | } |
| | | if(flag == false){ |
| | | HashMap<String, Object> hashMap = new HashMap<>(); |
| | | hashMap.put("name",record.get("name")); |
| | | hashMap.put("equipmentNum",record.get("equipmentNum")); |
| | | hashMap.put("equipmentName",record.get("equipmentName")); |
| | | hashMap.put("detectionStandard",record.get("detectionStandard")); |
| | | hashMap.put(record.get("createTime").toString(),record.get("insResult")); |
| | | maps.add(hashMap); |
| | | } |
| | | }else{ |
| | | HashMap<String, Object> hashMap = new HashMap<>(); |
| | | hashMap.put("name",record.get("name")); |
| | | hashMap.put("equipmentNum",record.get("equipmentNum")); |
| | | hashMap.put("equipmentName",record.get("equipmentName")); |
| | | hashMap.put("detectionStandard",record.get("detectionStandard")); |
| | | hashMap.put(record.get("createTime").toString(),record.get("insResult")); |
| | | maps.add(hashMap); |
| | | } |
| | | } |
| | | return Result.ok(maps); |
| | | } |
| | | |