Commit c9019188 by jianan

电子报聘回退优化7

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