Commit cd1b0e66 by jianan

电子报聘回退优化3

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