lyh
2025-06-30 0843d9fa608a6d319d9d1c37860a0f16ce263a19
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);
        }