From d69da9b903c107251f77450aac986d2477a5f4c5 Mon Sep 17 00:00:00 2001
From: Lius <Lius2225@163.com>
Date: 星期四, 09 一月 2025 09:52:28 +0800
Subject: [PATCH] 处理设备单表名特殊字符
---
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/InspectionOrderController.java | 126 +++++++++++++++++++++++++++++++++++------
1 files changed, 106 insertions(+), 20 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 15fe908..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
@@ -132,32 +132,32 @@
List<Map<String, Object>> records = inspectionOrderList.getRecords();
for (Map<String, Object> record : records) {
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 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);
List<Map<String, Object>> inspectionOrderDetails = inspectionOrderService.getInspectionOrderDetailByOrderId(id);
record.put("inspectionOrderDetails",inspectionOrderDetails);
- List<InspectionOrderDetail> failCount = inspectionOrderDetailService.lambdaQuery()
- .eq(InspectionOrderDetail::getInspectionOrderId, id)
- .eq(InspectionOrderDetail::getJudgmentResult, "fail")
- .eq(InspectionOrderDetail::getDelFlag, 0).list();
+// List<InspectionOrderDetail> failCount = inspectionOrderDetailService.lambdaQuery()
+// .eq(InspectionOrderDetail::getInspectionOrderId, id)
+// .eq(InspectionOrderDetail::getJudgmentResult, "fail")
+// .eq(InspectionOrderDetail::getDelFlag, 0).list();
+//
+// List<InspectionOrderDetail> passCount = inspectionOrderDetailService.lambdaQuery()
+// .eq(InspectionOrderDetail::getInspectionOrderId, id)
+// .eq(InspectionOrderDetail::getJudgmentResult,"pass")
+// .eq(InspectionOrderDetail::getDelFlag, 0).list();
+// record.put("result","姝e父:"+passCount.size()+"锛�"+"寮傚父:"+failCount.size());
- List<InspectionOrderDetail> passCount = inspectionOrderDetailService.lambdaQuery()
- .eq(InspectionOrderDetail::getInspectionOrderId, id)
- .eq(InspectionOrderDetail::getJudgmentResult,"pass")
- .eq(InspectionOrderDetail::getDelFlag, 0).list();
- record.put("result","姝e父:"+passCount.size()+"锛�"+"寮傚父:"+failCount.size());
-
- if("5".equals(status) ){
- record.put("distable",true);
- }else{
- record.put("distable",false);
- }
+// if("5".equals(status) ){
+// record.put("distable",true);
+// }else{
+// record.put("distable",false);
+// }
}
return Result.ok(inspectionOrderList);
}
@@ -570,6 +570,7 @@
}
}
inspectionOrder.setActualEndTime(new Date());
+ inspectionOrder.setInspectionOrderUda2(sysUser.getRealname());
boolean b = inspectionOrderService.updateById(inspectionOrder);
if (!b) {
return Result.error("鎶ュ伐澶辫触!");
@@ -598,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