lyh
3 天以前 40bf019f0b348378385ed0a819b5b06e1708d558
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportProductHazardsServiceImpl.java
@@ -294,15 +294,27 @@
                values.put("comment", eamReportProductHazardsDto.getDeputyDepartmentComment());
                values.put("deputyDepartmentResult", eamReportProductHazardsDto.getDeputyDepartmentResult());
                eamReportProductHazardsDto.setComment(eamReportProductHazardsDto.getDeputyDepartmentComment());
                eamReportProductHazards.setDeputyDepartment(user.getUsername());
                eamReportProductHazards.setDeputyDepartmentTime(new Date());
                eamReportProductHazards.setDeputyDepartmentResult(eamReportProductHazardsDto.getDeputyDepartmentResult());
                eamReportProductHazards.setDeputyDepartmentComment(eamReportProductHazardsDto.getDeputyDepartmentComment());
                if ("2".equals(eamReportProductHazardsDto.getDeputyDepartmentResult())){
                    //副部级领导拒绝
                    eamReportProductHazards.setConfirmStatus(EamReportProductHazardsEnum.REJECTED.name());
                    userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0024);
                    if (CollectionUtil.isEmpty(userSelectors)) {
                        throw new JeecgBootException("设备未存在主管工艺,无法进入驳回操作!");
                    }else {
                        userApprovalList = userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList());
                        values.put("NextAssignee", userApprovalList);
                        //副部级领导拒绝
                        eamReportProductHazards.setConfirmStatus(EamReportProductHazardsEnum.PENDING_SUPERIOR_TECHNICAL_CONFIRMATION.name());
                        eamReportProductHazards.setTechnologist(null);
                        eamReportProductHazards.setTechnologistTime(null);
                        eamReportProductHazards.setTechnologistResult(null);
                        eamReportProductHazards.setTechnologistComment(null);
                    }
                }else {
                    eamReportProductHazards.setConfirmStatus(EamReportProductHazardsEnum.REPAIR_COMPLETED.name());
                    eamReportProductHazards.setDeputyDepartment(user.getUsername());
                    eamReportProductHazards.setDeputyDepartmentTime(new Date());
                    eamReportProductHazards.setDeputyDepartmentResult(eamReportProductHazardsDto.getDeputyDepartmentResult());
                    eamReportProductHazards.setDeputyDepartmentComment(eamReportProductHazardsDto.getDeputyDepartmentComment());
                }
                break;
            default: