From 07a7e4e1a172960806e41ce686044aabc50ca379 Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期四, 29 五月 2025 14:36:01 +0800 Subject: [PATCH] 点检报表修改 --- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/DailyMaintenanceOrderController.java | 4 ++-- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/vo/InspectionResultVo.java | 1 + lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/InspectionOrderMapper.xml | 6 ++++-- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/InspectionOrderController.java | 13 +++++++++++-- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/DailyMaintenanceOrderController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/DailyMaintenanceOrderController.java index b00dc2f..c9cd930 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/DailyMaintenanceOrderController.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/DailyMaintenanceOrderController.java @@ -161,8 +161,8 @@ // List<MaintenanceCycleVo> maintenanceCycles = dailyMaintenanceOrderService.getMaintenanceCycleByStandardId(maintenanceStandardId); // record.put("maintenanceCycles", maintenanceCycles); -// List<Map<String, Object>> dailyMaintenanceDetails = dailyMaintenanceOrderService.getDailyMaintenanceDetailByOrderId(id); -// record.put("dailyMaintenanceDetails", dailyMaintenanceDetails); + List<Map<String, Object>> dailyMaintenanceDetails = dailyMaintenanceOrderService.getDailyMaintenanceDetailByOrderId(id); + record.put("dailyMaintenanceDetails", dailyMaintenanceDetails); List<Map<String, Object>> operationUserDetails = dailyMaintenanceOrderService.getOperationUser(id); record.put("operationUserDetails", operationUserDetails); 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 3a7a1cc..598a690 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 @@ -752,16 +752,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); @@ -777,6 +778,7 @@ // 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); maps.add(hashMap); @@ -790,6 +792,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); @@ -814,6 +817,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); @@ -827,6 +831,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); } @@ -838,6 +843,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); @@ -860,6 +866,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); @@ -874,6 +881,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); } @@ -885,6 +893,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); diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/InspectionOrderMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/InspectionOrderMapper.xml index 794eca5..0f066c3 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/InspectionOrderMapper.xml +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/InspectionOrderMapper.xml @@ -311,7 +311,8 @@ t2.inspection_order_uda2 as inspectionUserName, t2.inspection_order_uda1 AS repairConfirmPerson, case t1.inspection_project_result when '1' then '鈭�' when '2' then 'x' when '3' then '鈻�' when '4' then 'T' else '' end as insResult, - CONVERT(VARCHAR, DATEPART(DAY, t2.create_time)) as dayTime + CONVERT(VARCHAR, DATEPART(DAY, t2.create_time)) as dayTime, + DATEPART(WEEK, t2.create_time) - DATEPART(WEEK, DATEADD(DAY, 1 - DAY(t2.create_time), t2.create_time)) + 1 AS weekOfMonth FROM mom_eam_inspection_order_detail t1 LEFT JOIN mom_eam_inspection_order t2 ON t1.inspection_order_id= t2.id @@ -341,7 +342,8 @@ SELECT t1.inspection_order_uda2 AS inspectionUserName, t1.inspection_order_uda1 AS repairConfirmPerson, - CONVERT ( VARCHAR, DATEPART( DAY, t1.create_time ) ) AS dayTime + CONVERT ( VARCHAR, DATEPART( DAY, t1.create_time ) ) AS dayTime, + DATEPART(WEEK, t1.create_time) - DATEPART(WEEK, DATEADD(DAY, 1 - DAY(t1.create_time), t1.create_time)) + 1 AS weekOfMonth FROM mom_eam_inspection_order t1 LEFT JOIN mom_eam_equipment t2 ON t1.equipment_id = t2.id diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/vo/InspectionResultVo.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/vo/InspectionResultVo.java index c31150a..d7dc6e3 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/vo/InspectionResultVo.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/vo/InspectionResultVo.java @@ -6,6 +6,7 @@ public class InspectionResultVo { private String dayTime; + private Integer weekOfMonth; private String insResult; private String inspectionUserName; private String repairConfirmPerson; -- Gitblit v1.9.3