From c2559ec44a1d51a30622125af2064f07c1d3d8b7 Mon Sep 17 00:00:00 2001 From: zenglf <18502938215@163.com> Date: 星期三, 18 十月 2023 18:06:49 +0800 Subject: [PATCH] 操作证管理 明细更新 --- 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