From 9b015b51b72ba050b4c38a6ba79eb45b7065e67d Mon Sep 17 00:00:00 2001 From: Lius <Lius2225@163.com> Date: 星期四, 25 七月 2024 10:11:52 +0800 Subject: [PATCH] 调整sql --- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/OperationCertificateServiceImpl.java | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/OperationCertificateServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/OperationCertificateServiceImpl.java index e4ba5ad..7f3cbfc 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/OperationCertificateServiceImpl.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/OperationCertificateServiceImpl.java @@ -48,7 +48,7 @@ String equipmentIds = operationCertificate.getEquipmentIds(); Integer currentCycleScore = operationCertificate.getCurrentCycleScore(); for (OperationCertificateDetail entity : operationCertificateDetailList) { - if ("addEquipment".equals(entity.getType())) { + if ("addEquipment".equals(entity.getType()) && !equipmentIds.contains(entity.getEquipmentId())) { equipmentIds = equipmentIds + "," + entity.getEquipmentId(); } else if ("deduction".equals(entity.getType())) { String deductionItemId = entity.getDeductionItem(); @@ -61,8 +61,8 @@ } operationCertificate.setEquipmentIds(equipmentIds); - if(currentCycleScore<=0){ - currentCycleScore=0; + if (currentCycleScore <= 0) { + currentCycleScore = 0; // 褰撳垎鏁颁负0鏃�,璁剧疆鎿嶄綔璇佺殑鐘舵�佷负绂佺敤 operationCertificate.setStatus(CommonConstant.STATUS_0); } @@ -91,7 +91,7 @@ String equipmentIds = operationCertificate.getEquipmentIds(); Integer currentCycleScore = operationCertificate.getCurrentCycleScore(); for (OperationCertificateDetail entity : operationCertificateDetailList) { - if ("addEquipment".equals(entity.getType())) { + if ("addEquipment".equals(entity.getType()) && !equipmentIds.contains(entity.getEquipmentId())) { equipmentIds = equipmentIds + "," + entity.getEquipmentId(); } else if ("deduction".equals(entity.getType())) { String deductionItemId = entity.getDeductionItem(); @@ -104,8 +104,8 @@ } operationCertificate.setEquipmentIds(equipmentIds); - if(currentCycleScore<=0){ - currentCycleScore=0; + if (currentCycleScore <= 0) { + currentCycleScore = 0; // 褰撳垎鏁颁负0鏃�,璁剧疆鎿嶄綔璇佺殑鐘舵�佷负绂佺敤 operationCertificate.setStatus(CommonConstant.STATUS_0); } -- Gitblit v1.9.3