diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryEOServiceImpl.java index 029bd88d1..8730fe829 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryEOServiceImpl.java @@ -483,36 +483,43 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl verifyRoleCode(ProjectTaskInventoryVO projectTaskInventoryVO) { List projectLawsInventoryIdList = Arrays.asList(projectTaskInventoryVO.getProjectLawsInventoryIds().split(",")); - List roleCodeList = Arrays.asList(projectTaskInventoryVO.getRoleCodes().split(",")); + List roleCodeList = new ArrayList<>(); + if (StringUtils.isNotEmpty(projectTaskInventoryVO.getRoleCodes())) { + roleCodeList = Arrays.asList(projectTaskInventoryVO.getRoleCodes().split(",")); + } String cut = projectTaskInventoryVO.getCut(); String operation = projectTaskInventoryVO.getOperation(); List> msgMapList = new ArrayList<>(); for (int i=0; i < projectLawsInventoryIdList.size(); i++) { String projectLawsInventoryId = projectLawsInventoryIdList.get(i); - String roleCode = roleCodeList.get(i); ProjectLawsInventoryEO projectLawsInventoryEO = projectLawsInventoryEOService.getById(projectLawsInventoryId); Map msgMap = new HashMap<>(); - if ("1".equals(operation)) { - if (! (ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue().equals(roleCode) - || ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getValue().equals(roleCode))) { - msgMap.put("serialNumber", projectLawsInventoryEO.getSerialNumber()); - msgMapList.add(msgMap); - } - } else if ("2".equals(operation)) { - if (!(ProjectRoleEnum.REGULATI_ENGINEER.getValue().equals(roleCode) - || ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue().equals(roleCode) - || ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getValue().equals(roleCode))) { - msgMap.put("serialNumber", projectLawsInventoryEO.getSerialNumber()); - msgMapList.add(msgMap); + if (CollectionUtils.isEmpty(roleCodeList)) { + msgMap.put("serialNumber", projectLawsInventoryEO.getSerialNumber()); + msgMapList.add(msgMap); + } else { + String roleCode = roleCodeList.get(i); + if ("1".equals(operation)) { + if (!(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue().equals(roleCode) + || ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getValue().equals(roleCode))) { + msgMap.put("serialNumber", projectLawsInventoryEO.getSerialNumber()); + msgMapList.add(msgMap); + } + } else if ("2".equals(operation)) { + if (!(ProjectRoleEnum.REGULATI_ENGINEER.getValue().equals(roleCode) + || ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue().equals(roleCode) + || ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getValue().equals(roleCode))) { + msgMap.put("serialNumber", projectLawsInventoryEO.getSerialNumber()); + msgMapList.add(msgMap); + } } } } return getMsg(msgMapList, cut, operation); - } private List getMsg(List> msgMapList, String cut, String operation) { @@ -525,14 +532,14 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl").append(serialNumber).append("").append(", the current user can not maintain homologation progress."); } else { - stringBuilder.append("编号").append("").append(serialNumber).append("").append(",当前用户没有维护认证进度权限。"); + stringBuilder.append("编号").append("").append(serialNumber).append("").append(",当前用户没有维护认证进度权限。"); } } else if("2".equals(operation)) { if (CutEnum.EN.getValue().equals(cut)) { stringBuilder.append("Number ").append("").append(serialNumber).append("").append(", the current user can not modify current status."); } else { - stringBuilder.append("编号").append("").append(serialNumber).append("").append("当前用户没有修改状态权限。"); + stringBuilder.append("编号").append("").append(serialNumber).append("").append(",当前用户没有修改状态权限。"); } }