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 = "体系负责人";
break; } else if ("2".equals(stepsSeqBackTo)) {
case "2":
stepSeqStart = 3; stepSeqStart = 3;
approveName = "公司运营主管"; approveName = "公司运营主管";
break; } else if ("3".equals(stepsSeqBackTo)) {
case "3":
stepSeqStart = 4; stepSeqStart = 4;
approveName = "寿险总经理"; approveName = "寿险总经理";
break; } else if ("4".equals(stepsSeqBackTo)) {
case "4":
stepSeqStart = 5; stepSeqStart = 5;
approveName = "公司总经理"; approveName = "公司总经理";
break; } else {
default:
stepSeqStart = 1; stepSeqStart = 1;
approveName = "辅导人"; approveName = "辅导人";
break; }
if (stepSeqStart >= stepSeq) {
throw new RuntimeException("只能退回到已审核的步骤");
} }
// 查询审批记录 // 查询审批记录
List<AclPractitionerHiringApproveRecords> recordsList = aclPractitionerHiringApproveRecordsDalService.queryListByBasicInfoId(basicInfoId); List<AclPractitionerHiringApproveRecords> recordsList = aclPractitionerHiringApproveRecordsDalService.queryListByBasicInfoId(basicInfoId);
...@@ -609,10 +609,12 @@ public class AgmsHiringServiceImpl implements AgmsHiringService { ...@@ -609,10 +609,12 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
.map(AclPractitionerHiringApproveRecords::getApprovingPractitionerId) .map(AclPractitionerHiringApproveRecords::getApprovingPractitionerId)
.collect(Collectors.toList()); .collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(practitionerIds)) {
List<PractitionerInfo> practitionerList = aclPractitionerDalService.findPractitionerInfoByIdList(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) {
AclPractitionerHiringBasicInfo basicInfo = aclPractitionerHiringBasicInfoDalService.findById(basicInfoId); AclPractitionerHiringBasicInfo basicInfo = aclPractitionerHiringBasicInfoDalService.findById(basicInfoId);
......
...@@ -297,41 +297,41 @@ public class PractitionerHiringDALServiceImpl implements PractitionerHiringDALSe ...@@ -297,41 +297,41 @@ 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";
case 2 : } else if (Integer.valueOf(2).equals(stepSeq)) {
return "1"; return "1";
case 3 : } else if (Integer.valueOf(3).equals(stepSeq)) {
return "2"; return "2";
case 4 : } else if (Integer.valueOf(4).equals(stepSeq)) {
return "3"; return "3";
case 5 : } else if (Integer.valueOf(5).equals(stepSeq)) {
return "4"; return "4";
case 6 : } else if (Integer.valueOf(6).equals(stepSeq)) {
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");
case "1" : } else if ("1".equals(approveStatus)) {
return Integer.valueOf("2"); return Integer.valueOf("2");
case "2" : } else if ("2".equals(approveStatus)) {
return Integer.valueOf("3"); return Integer.valueOf("3");
case "3" : } else if ("3".equals(approveStatus)) {
return Integer.valueOf("4"); return Integer.valueOf("4");
case "4" : } else if ("4".equals(approveStatus)) {
return Integer.valueOf("5"); return Integer.valueOf("5");
case "5" : } else if ("5".equals(approveStatus)) {
return Integer.valueOf("6"); return Integer.valueOf("6");
} } else {
return null; return null;
} }
}
@Override @Override
public List<Long> queryBasicInfoIdList(List<Long> list) { public List<Long> queryBasicInfoIdList(List<Long> list) {
......
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