Commit cd1b0e66 by jianan

电子报聘回退优化3

parent d1ef92cc
...@@ -113,8 +113,13 @@ public class PractitionerHiringDALServiceImpl implements PractitionerHiringDALSe ...@@ -113,8 +113,13 @@ public class PractitionerHiringDALServiceImpl implements PractitionerHiringDALSe
item.setLevelName(levelName); item.setLevelName(levelName);
} }
// 如果已审核结束,则不需要手动创建未审批的流程
if ("0".equals(approveStatus)) {
return records;
}
// 声明最终返回的List // 声明最终返回的List
List<HiringApproveRecords> resultList = new ArrayList<>(); List<HiringApproveRecords> resultList = new ArrayList<>(records);
// 所有的审批流程 // 所有的审批流程
List<MdPractitionerHiringApproveSteps> stepsList = systemConfigService.findHiringApproveStepsAll(); List<MdPractitionerHiringApproveSteps> stepsList = systemConfigService.findHiringApproveStepsAll();
// 当前经纪人的报聘职级 // 当前经纪人的报聘职级
...@@ -127,42 +132,39 @@ public class PractitionerHiringDALServiceImpl implements PractitionerHiringDALSe ...@@ -127,42 +132,39 @@ public class PractitionerHiringDALServiceImpl implements PractitionerHiringDALSe
subsystemOwnerName = (approvedBy != null) ? approvedBy.getName() : ""; subsystemOwnerName = (approvedBy != null) ? approvedBy.getName() : "";
} }
// 如果已审核结束,则不需要手动创建未审批的流程 for (MdPractitionerHiringApproveSteps step : stepsList) {
if ("0".equals(approveStatus)) { // S2前2步不用审批
for (MdPractitionerHiringApproveSteps step : stepsList) { if ((mdDropOptionName.indexOf("S2") >= 0 || mdDropOptionName.indexOf("S3") >= 0)
// S2前2步不用审批 && (step.getStepSeq() == 1 || step.getStepSeq() == 2)
if ((mdDropOptionName.indexOf("S2") >= 0 || mdDropOptionName.indexOf("S3") >= 0) ) {
&& (step.getStepSeq() == 1 || step.getStepSeq() == 2) continue;
) { }
continue; // 没有辅导人,前2步不用审批
} if ((hiringMemberShip.getMentorPractitionerId() == null || hiringMemberShip.getMentor() == null)
// 没有辅导人,前2步不用审批 && (step.getStepSeq() == 1 || step.getStepSeq() == 2)
if ((hiringMemberShip.getMentorPractitionerId() == null || hiringMemberShip.getMentor() == null) ) {
&& (step.getStepSeq() == 1 || step.getStepSeq() == 2) continue;
) { }
continue;
}
if (step.getStepSeq() >= Integer.valueOf(approveStatus)) { if (step.getStepSeq() >= Integer.valueOf(approveStatus)) {
HiringApproveRecords obj = new HiringApproveRecords(); HiringApproveRecords obj = new HiringApproveRecords();
obj.setApproveStepId(step.getId()); obj.setApproveStepId(step.getId());
obj.setApproveStepName(step.getStepName()); obj.setApproveStepName(step.getStepName());
obj.setApprovingStatusId(Long.valueOf("2")); obj.setApprovingStatusId(Long.valueOf("2"));
obj.setApprovingStatus("未审批"); obj.setApprovingStatus("未审批");
// 获取每一步审批人姓名 // 获取每一步审批人姓名
if ("mentor".equals(step.getApproveRole())) { if ("mentor".equals(step.getApproveRole())) {
obj.setApprovingPractitionerName(hiringMemberShip.getMentor()); obj.setApprovingPractitionerName(hiringMemberShip.getMentor());
} else if ("subsystemOwner".equals(step.getApproveRole())) { } else if ("subsystemOwner".equals(step.getApproveRole())) {
obj.setApprovingPractitionerName(subsystemOwnerName); obj.setApprovingPractitionerName(subsystemOwnerName);
} else { } else {
String names = aclUserDalService.selectNamesByMobileNos(step.getAppointedApprovePractitioners()); String names = aclUserDalService.selectNamesByMobileNos(step.getAppointedApprovePractitioners());
obj.setApprovingPractitionerName(names); obj.setApprovingPractitionerName(names);
}
resultList.add(obj);
} }
resultList.add(obj);
} }
} }
return resultList; return resultList;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment