From 7f2d8230bd6bb29dc18e91a843018113cd6eb4c0 Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期四, 28 三月 2024 09:26:49 +0800 Subject: [PATCH] 提交 --- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/InspectionOrderController.java | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 52 insertions(+), 0 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 9b4ca57..5b07bb6 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 @@ -599,4 +599,56 @@ } } + + /** + *鐢熶骇璁惧鑷富缁存姢鐐规琛� 鎶ヨ〃 + * 2024-3-27 qsw + */ + @GetMapping("findInspectionProjectList") + public Result<?> findInspectionProjectList(@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.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) { + 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); + } +// 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); + } + } -- Gitblit v1.9.3