项目库-任务清单-批量设置认证进度和状态-校验修改
This commit is contained in:
+24
-17
@@ -483,36 +483,43 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
@Override
|
||||
public List<String> verifyRoleCode(ProjectTaskInventoryVO projectTaskInventoryVO) {
|
||||
List<String> projectLawsInventoryIdList = Arrays.asList(projectTaskInventoryVO.getProjectLawsInventoryIds().split(","));
|
||||
List<String> roleCodeList = Arrays.asList(projectTaskInventoryVO.getRoleCodes().split(","));
|
||||
List<String> roleCodeList = new ArrayList<>();
|
||||
if (StringUtils.isNotEmpty(projectTaskInventoryVO.getRoleCodes())) {
|
||||
roleCodeList = Arrays.asList(projectTaskInventoryVO.getRoleCodes().split(","));
|
||||
}
|
||||
String cut = projectTaskInventoryVO.getCut();
|
||||
String operation = projectTaskInventoryVO.getOperation();
|
||||
|
||||
List<Map<String, String>> 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<String, String> 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<String> getMsg(List<Map<String, String>> msgMapList, String cut, String operation) {
|
||||
@@ -525,14 +532,14 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
if (CutEnum.EN.getValue().equals(cut)) {
|
||||
stringBuilder.append("Number ").append("<span style='color: red'>").append(serialNumber).append("</span>").append(", the current user can not maintain homologation progress.");
|
||||
} else {
|
||||
stringBuilder.append("编号").append("<span style='color: red'>").append(serialNumber).append("</span>").append(",当前用户没有维护认证进度权限。");
|
||||
stringBuilder.append("编号").append("<span style='color: red'>").append(serialNumber).append("</span>").append(",当前用户没有维护认证进度权限。");
|
||||
}
|
||||
|
||||
} else if("2".equals(operation)) {
|
||||
if (CutEnum.EN.getValue().equals(cut)) {
|
||||
stringBuilder.append("Number ").append("<span style='color: red'>").append(serialNumber).append("</span>").append(", the current user can not modify current status.");
|
||||
} else {
|
||||
stringBuilder.append("编号").append("<span style='color: red'>").append(serialNumber).append("</span>").append("当前用户没有修改状态权限。");
|
||||
stringBuilder.append("编号").append("<span style='color: red'>").append(serialNumber).append("</span>").append(",当前用户没有修改状态权限。");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user