Commit c9019188 by jianan

电子报聘回退优化7

parent 6e4e11e8
...@@ -34,6 +34,7 @@ import org.slf4j.Logger; ...@@ -34,6 +34,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
...@@ -168,6 +169,7 @@ public class AgmsHiringServiceImpl implements AgmsHiringService { ...@@ -168,6 +169,7 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
} }
@Override @Override
@Transactional
public PractitionerHiringApproveResponseVO practitionerHiringApprove(PractitionerHiringApproveRequestVO requestVO) { public PractitionerHiringApproveResponseVO practitionerHiringApprove(PractitionerHiringApproveRequestVO requestVO) {
PractitionerHiringApproveResponseVO responseVO = new PractitionerHiringApproveResponseVO(); PractitionerHiringApproveResponseVO responseVO = new PractitionerHiringApproveResponseVO();
...@@ -574,31 +576,29 @@ public class AgmsHiringServiceImpl implements AgmsHiringService { ...@@ -574,31 +576,29 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
private void setRecordsRollBack(String stepsSeqBackTo, Integer stepSeq, String rejectNote, Long basicInfoId) { private void setRecordsRollBack(String stepsSeqBackTo, Integer stepSeq, String rejectNote, Long basicInfoId) {
String approveName; String approveName;
int stepSeqStart; int stepSeqStart;
switch (stepsSeqBackTo) {
case "-2": if ("-2".equals(stepsSeqBackTo)) {
stepSeqStart = 1; stepSeqStart = 1;
approveName = "辅导人"; approveName = "辅导人";
break; } else if ("1".equals(stepsSeqBackTo)) {
case "1": stepSeqStart = 2;
stepSeqStart = 2; approveName = "体系负责人";
approveName = "体系负责人"; } else if ("2".equals(stepsSeqBackTo)) {
break; stepSeqStart = 3;
case "2": approveName = "公司运营主管";
stepSeqStart = 3; } else if ("3".equals(stepsSeqBackTo)) {
approveName = "公司运营主管"; stepSeqStart = 4;
break; approveName = "寿险总经理";
case "3": } else if ("4".equals(stepsSeqBackTo)) {
stepSeqStart = 4; stepSeqStart = 5;
approveName = "寿险总经理"; approveName = "公司总经理";
break; } else {
case "4": stepSeqStart = 1;
stepSeqStart = 5; approveName = "辅导人";
approveName = "公司总经理"; }
break;
default: if (stepSeqStart >= stepSeq) {
stepSeqStart = 1; throw new RuntimeException("只能退回到已审核的步骤");
approveName = "辅导人";
break;
} }
// 查询审批记录 // 查询审批记录
List<AclPractitionerHiringApproveRecords> recordsList = aclPractitionerHiringApproveRecordsDalService.queryListByBasicInfoId(basicInfoId); List<AclPractitionerHiringApproveRecords> recordsList = aclPractitionerHiringApproveRecordsDalService.queryListByBasicInfoId(basicInfoId);
...@@ -609,9 +609,11 @@ public class AgmsHiringServiceImpl implements AgmsHiringService { ...@@ -609,9 +609,11 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
.map(AclPractitionerHiringApproveRecords::getApprovingPractitionerId) .map(AclPractitionerHiringApproveRecords::getApprovingPractitionerId)
.collect(Collectors.toList()); .collect(Collectors.toList());
List<PractitionerInfo> practitionerList = aclPractitionerDalService.findPractitionerInfoByIdList(practitionerIds); if (CollectionUtils.isNotEmpty(practitionerIds)) {
// 回退提醒发消息(短信和微信推送) List<PractitionerInfo> practitionerList = aclPractitionerDalService.findPractitionerInfoByIdList(practitionerIds);
this.approveRollBackNoticeSendMsg(approveName, rejectNote, practitionerList, basicInfoId); // 回退提醒发消息(短信和微信推送)
this.approveRollBackNoticeSendMsg(approveName, rejectNote, practitionerList, basicInfoId);
}
} }
private void approveRollBackNoticeSendMsg(String approveName, String rejectNote, List<PractitionerInfo> practitionerList, Long basicInfoId) { private void approveRollBackNoticeSendMsg(String approveName, String rejectNote, List<PractitionerInfo> practitionerList, Long basicInfoId) {
......
...@@ -297,40 +297,40 @@ public class PractitionerHiringDALServiceImpl implements PractitionerHiringDALSe ...@@ -297,40 +297,40 @@ public class PractitionerHiringDALServiceImpl implements PractitionerHiringDALSe
@Override @Override
public String getApproveStatusByStepSeq(Integer stepSeq) { public String getApproveStatusByStepSeq(Integer stepSeq) {
switch (stepSeq) { if (Integer.valueOf(1).equals(stepSeq)) {
case 1 : return "-2";
return "-2"; } else if (Integer.valueOf(2).equals(stepSeq)) {
case 2 : return "1";
return "1"; } else if (Integer.valueOf(3).equals(stepSeq)) {
case 3 : return "2";
return "2"; } else if (Integer.valueOf(4).equals(stepSeq)) {
case 4 : return "3";
return "3"; } else if (Integer.valueOf(5).equals(stepSeq)) {
case 5 : return "4";
return "4"; } else if (Integer.valueOf(6).equals(stepSeq)) {
case 6 : return "5";
return "5"; } else {
return null;
} }
return null;
} }
@Override @Override
public Integer getNextStepSeqByApproveStatus(String approveStatus) { public Integer getNextStepSeqByApproveStatus(String approveStatus) {
switch (approveStatus) { if ("-2".equals(approveStatus)) {
case "-2" : return Integer.valueOf("1");
return Integer.valueOf("1"); } else if ("1".equals(approveStatus)) {
case "1" : return Integer.valueOf("2");
return Integer.valueOf("2"); } else if ("2".equals(approveStatus)) {
case "2" : return Integer.valueOf("3");
return Integer.valueOf("3"); } else if ("3".equals(approveStatus)) {
case "3" : return Integer.valueOf("4");
return Integer.valueOf("4"); } else if ("4".equals(approveStatus)) {
case "4" : return Integer.valueOf("5");
return Integer.valueOf("5"); } else if ("5".equals(approveStatus)) {
case "5" : return Integer.valueOf("6");
return Integer.valueOf("6"); } else {
return null;
} }
return null;
} }
@Override @Override
......
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