From 63a5530a85e6eaf7f8be733e87d32af2d16477a8 Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期日, 07 四月 2024 13:39:02 +0800 Subject: [PATCH] 设备管理 报表打印修改 --- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/InspectionOrderController.java | 85 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 85 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..51bfc63 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,89 @@ } } + + /** + *鐢熶骇璁惧鑷富缁存姢鐐规琛� 鎶ヨ〃 + * 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); + } + } + 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); + } + } -- Gitblit v1.9.3