Commit 8852e440 authored by hongguangwu's avatar hongguangwu

MVP1.6.4-优化社保士兵-多sheet

parent a3ab7bc5
...@@ -1048,6 +1048,9 @@ public class TSocialInfo extends BaseEntity { ...@@ -1048,6 +1048,9 @@ public class TSocialInfo extends BaseEntity {
// 派单id,社保士兵使用 // 派单id,社保士兵使用
@TableField(exist = false) @TableField(exist = false)
private String dispatchId; private String dispatchId;
// 派单类型0派增1派减,社保士兵使用
@TableField(exist = false)
private String dispatchType;
// 过期Flag,0未过期,1过期,社保士兵使用(过期的自动变为中止办理) // 过期Flag,0未过期,1过期,社保士兵使用(过期的自动变为中止办理)
@TableField(exist = false) @TableField(exist = false)
private String ygsOverDueFlag; private String ygsOverDueFlag;
......
...@@ -4848,91 +4848,121 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4848,91 +4848,121 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(socialType)){ if (Common.isNotNull(socialType)){
//派增处理 //派增处理
if (CommonConstants.ZERO_STRING.equals(dis.getType())){ if (CommonConstants.ZERO_STRING.equals(dis.getType())){
if (socialType.contains(CommonConstants.ONE_STRING) if (CommonConstants.ONE_STRING.equals(dis.getAutoFlag()) || CommonConstants.FIVE_STRING.equals(socialInfo.getYgsHandleStatus())) {
&& Common.isNotNull(socialInfo.getPensionHandle()) if (socialType.contains(CommonConstants.ONE_STRING)
&& CommonConstants.ZERO_STRING.equals(socialInfo.getPensionHandle()) && Common.isNotNull(socialInfo.getPensionHandle())
&& !CommonConstants.ONE_STRING.equals(sf.getPensionHandle())) { && CommonConstants.ZERO_STRING.equals(socialInfo.getPensionHandle())
socialInfo.setPensionHandle(handleStatus); && !CommonConstants.ONE_STRING.equals(sf.getPensionHandle())) {
sf.setPensionHandle(handleStatus); socialInfo.setPensionHandle(handleStatus);
if (CommonConstants.ONE_STRING.equals(handleStatus)){ sf.setPensionHandle(handleStatus);
sf.setPensionReduceStart(null); if (CommonConstants.ONE_STRING.equals(handleStatus)) {
sf.setPensionReduceStart(null);
}
} }
} if (socialType.contains(CommonConstants.THREE_STRING)
if (socialType.contains(CommonConstants.TWO_STRING) && Common.isNotNull(socialInfo.getUnemployHandle())
&& Common.isNotNull(socialInfo.getMedicalHandle()) && CommonConstants.ZERO_STRING.equals(socialInfo.getUnemployHandle())
&& CommonConstants.ZERO_STRING.equals(socialInfo.getMedicalHandle()) && !CommonConstants.ONE_STRING.equals(sf.getUnemployHandle())) {
&& !CommonConstants.ONE_STRING.equals(sf.getMedicalHandle())) { socialInfo.setUnemployHandle(handleStatus);
socialInfo.setMedicalHandle(handleStatus); sf.setUnemployHandle(handleStatus);
sf.setMedicalHandle(handleStatus); if (CommonConstants.ONE_STRING.equals(handleStatus)) {
if (CommonConstants.ONE_STRING.equals(handleStatus)){ sf.setUnemployReduceStart(null);
sf.setMedicalReduceStart(null); }
} }
} if (socialType.contains(CommonConstants.FOUR_STRING)
if (socialType.contains(CommonConstants.THREE_STRING) && Common.isNotNull(socialInfo.getWorkInjuryHandle())
&& Common.isNotNull(socialInfo.getUnemployHandle()) && CommonConstants.ZERO_STRING.equals(socialInfo.getWorkInjuryHandle())
&& CommonConstants.ZERO_STRING.equals(socialInfo.getUnemployHandle()) && !CommonConstants.ONE_STRING.equals(sf.getWorkInjuryHandle())) {
&& !CommonConstants.ONE_STRING.equals(sf.getUnemployHandle())) { socialInfo.setWorkInjuryHandle(handleStatus);
socialInfo.setUnemployHandle(handleStatus); sf.setWorkInjuryHandle(handleStatus);
sf.setUnemployHandle(handleStatus); if (CommonConstants.ONE_STRING.equals(handleStatus)) {
if (CommonConstants.ONE_STRING.equals(handleStatus)){ sf.setWorkInjuryReduceStart(null);
sf.setUnemployReduceStart(null); }
} }
} // 单个办理的时候处理派单和社保的办理状态 有办理成功也有办理失败的 为办理中
if (socialType.contains(CommonConstants.FOUR_STRING) if ((CommonConstants.ONE_STRING.equals(socialInfo.getPensionHandle())
&& Common.isNotNull(socialInfo.getWorkInjuryHandle()) || CommonConstants.TWO_STRING.equals(socialInfo.getPensionHandle())
&& CommonConstants.ZERO_STRING.equals(socialInfo.getWorkInjuryHandle()) || CommonConstants.ONE_STRING.equals(socialInfo.getMedicalHandle())
&& !CommonConstants.ONE_STRING.equals(sf.getWorkInjuryHandle())) { || CommonConstants.ONE_STRING.equals(socialInfo.getWorkInjuryHandle())
socialInfo.setWorkInjuryHandle(handleStatus); || CommonConstants.ONE_STRING.equals(socialInfo.getBirthHandle())
sf.setWorkInjuryHandle(handleStatus); || CommonConstants.ONE_STRING.equals(socialInfo.getUnemployHandle())
if (CommonConstants.ONE_STRING.equals(handleStatus)){ || (CommonConstants.ONE_STRING.equals(socialInfo.getBigailmentHandle())
sf.setWorkInjuryReduceStart(null); && CommonConstants.ZERO_STRING.equals(socialInfo.getIsIllness()))
|| CommonConstants.TWO_STRING.equals(socialInfo.getMedicalHandle())
|| CommonConstants.TWO_STRING.equals(socialInfo.getWorkInjuryHandle())
|| CommonConstants.TWO_STRING.equals(socialInfo.getBirthHandle())
|| CommonConstants.TWO_STRING.equals(socialInfo.getUnemployHandle())
|| (CommonConstants.TWO_STRING.equals(socialInfo.getBigailmentHandle())
&& CommonConstants.ZERO_STRING.equals(socialInfo.getIsIllness())))
&& (CommonConstants.ZERO_STRING.equals(socialInfo.getPensionHandle())
|| CommonConstants.ZERO_STRING.equals(socialInfo.getMedicalHandle())
|| CommonConstants.ZERO_STRING.equals(socialInfo.getWorkInjuryHandle())
|| CommonConstants.ZERO_STRING.equals(socialInfo.getBirthHandle())
|| CommonConstants.ZERO_STRING.equals(socialInfo.getUnemployHandle())
|| (CommonConstants.ZERO_STRING.equals(socialInfo.getBigailmentHandle())
&& CommonConstants.ZERO_STRING.equals(socialInfo.getIsIllness())))
){
socialInfo.setHandleStatus(CommonConstants.FOUR_STRING);
} }
} }
if (socialType.contains(CommonConstants.FIVE_STRING)
&& Common.isNotNull(socialInfo.getBirthHandle()) if (CommonConstants.ONE_STRING.equals(dis.getAutoFlag()) || CommonConstants.FIVE_STRING.equals(socialInfo.getYsdHandleStatus())) {
&& CommonConstants.ZERO_STRING.equals(socialInfo.getBirthHandle()) if (socialType.contains(CommonConstants.TWO_STRING)
&& !CommonConstants.ONE_STRING.equals(sf.getBirthHandle())) { && Common.isNotNull(socialInfo.getMedicalHandle())
socialInfo.setBirthHandle(handleStatus); && CommonConstants.ZERO_STRING.equals(socialInfo.getMedicalHandle())
sf.setBirthHandle(handleStatus); && !CommonConstants.ONE_STRING.equals(sf.getMedicalHandle())) {
if (CommonConstants.ONE_STRING.equals(handleStatus)){ socialInfo.setMedicalHandle(handleStatus);
sf.setBirthReduceStart(null); sf.setMedicalHandle(handleStatus);
if (CommonConstants.ONE_STRING.equals(handleStatus)) {
sf.setMedicalReduceStart(null);
}
} }
} if (socialType.contains(CommonConstants.FIVE_STRING)
if (socialType.contains(CommonConstants.SIX_STRING) && Common.isNotNull(socialInfo.getBirthHandle())
&& Common.isNotNull(socialInfo.getBigailmentHandle()) && CommonConstants.ZERO_STRING.equals(socialInfo.getBirthHandle())
&& CommonConstants.ZERO_STRING.equals(socialInfo.getBigailmentHandle()) && !CommonConstants.ONE_STRING.equals(sf.getBirthHandle())) {
&& !CommonConstants.ONE_STRING.equals(sf.getBigailmentHandle()) socialInfo.setBirthHandle(handleStatus);
&& CommonConstants.ZERO_STRING.equals(sf.getIsIllness())) { sf.setBirthHandle(handleStatus);
socialInfo.setBigailmentHandle(handleStatus); if (CommonConstants.ONE_STRING.equals(handleStatus)) {
sf.setBigailmentHandle(handleStatus); sf.setBirthReduceStart(null);
if (CommonConstants.ONE_STRING.equals(handleStatus)){ }
sf.setBigailmentReduceStart(null); }
if (socialType.contains(CommonConstants.SIX_STRING)
&& Common.isNotNull(socialInfo.getBigailmentHandle())
&& CommonConstants.ZERO_STRING.equals(socialInfo.getBigailmentHandle())
&& !CommonConstants.ONE_STRING.equals(sf.getBigailmentHandle())
&& CommonConstants.ZERO_STRING.equals(sf.getIsIllness())) {
socialInfo.setBigailmentHandle(handleStatus);
sf.setBigailmentHandle(handleStatus);
if (CommonConstants.ONE_STRING.equals(handleStatus)) {
sf.setBigailmentReduceStart(null);
}
}
// 单个办理的时候处理派单和社保的办理状态 有办理成功也有办理失败的 为办理中
if ((CommonConstants.ONE_STRING.equals(socialInfo.getPensionHandle())
|| CommonConstants.TWO_STRING.equals(socialInfo.getPensionHandle())
|| CommonConstants.ONE_STRING.equals(socialInfo.getMedicalHandle())
|| CommonConstants.ONE_STRING.equals(socialInfo.getWorkInjuryHandle())
|| CommonConstants.ONE_STRING.equals(socialInfo.getBirthHandle())
|| CommonConstants.ONE_STRING.equals(socialInfo.getUnemployHandle())
|| (CommonConstants.ONE_STRING.equals(socialInfo.getBigailmentHandle())
&& CommonConstants.ZERO_STRING.equals(socialInfo.getIsIllness()))
|| CommonConstants.TWO_STRING.equals(socialInfo.getMedicalHandle())
|| CommonConstants.TWO_STRING.equals(socialInfo.getWorkInjuryHandle())
|| CommonConstants.TWO_STRING.equals(socialInfo.getBirthHandle())
|| CommonConstants.TWO_STRING.equals(socialInfo.getUnemployHandle())
|| (CommonConstants.TWO_STRING.equals(socialInfo.getBigailmentHandle())
&& CommonConstants.ZERO_STRING.equals(socialInfo.getIsIllness())))
&& (CommonConstants.ZERO_STRING.equals(socialInfo.getPensionHandle())
|| CommonConstants.ZERO_STRING.equals(socialInfo.getMedicalHandle())
|| CommonConstants.ZERO_STRING.equals(socialInfo.getWorkInjuryHandle())
|| CommonConstants.ZERO_STRING.equals(socialInfo.getBirthHandle())
|| CommonConstants.ZERO_STRING.equals(socialInfo.getUnemployHandle())
|| (CommonConstants.ZERO_STRING.equals(socialInfo.getBigailmentHandle())
&& CommonConstants.ZERO_STRING.equals(socialInfo.getIsIllness())))
){
socialInfo.setHandleStatus(CommonConstants.FOUR_STRING);
} }
}
// 单个办理的时候处理派单和社保的办理状态 有办理成功也有办理失败的 为办理中
if ((CommonConstants.ONE_STRING.equals(socialInfo.getPensionHandle())
|| CommonConstants.TWO_STRING.equals(socialInfo.getPensionHandle())
|| CommonConstants.ONE_STRING.equals(socialInfo.getMedicalHandle())
|| CommonConstants.ONE_STRING.equals(socialInfo.getWorkInjuryHandle())
|| CommonConstants.ONE_STRING.equals(socialInfo.getBirthHandle())
|| CommonConstants.ONE_STRING.equals(socialInfo.getUnemployHandle())
|| (CommonConstants.ONE_STRING.equals(socialInfo.getBigailmentHandle())
&& CommonConstants.ZERO_STRING.equals(socialInfo.getIsIllness()))
|| CommonConstants.TWO_STRING.equals(socialInfo.getMedicalHandle())
|| CommonConstants.TWO_STRING.equals(socialInfo.getWorkInjuryHandle())
|| CommonConstants.TWO_STRING.equals(socialInfo.getBirthHandle())
|| CommonConstants.TWO_STRING.equals(socialInfo.getUnemployHandle())
|| (CommonConstants.TWO_STRING.equals(socialInfo.getBigailmentHandle())
&& CommonConstants.ZERO_STRING.equals(socialInfo.getIsIllness())))
&& (CommonConstants.ZERO_STRING.equals(socialInfo.getPensionHandle())
|| CommonConstants.ZERO_STRING.equals(socialInfo.getMedicalHandle())
|| CommonConstants.ZERO_STRING.equals(socialInfo.getWorkInjuryHandle())
|| CommonConstants.ZERO_STRING.equals(socialInfo.getBirthHandle())
|| CommonConstants.ZERO_STRING.equals(socialInfo.getUnemployHandle())
|| (CommonConstants.ZERO_STRING.equals(socialInfo.getBigailmentHandle())
&& CommonConstants.ZERO_STRING.equals(socialInfo.getIsIllness())))
){
socialInfo.setHandleStatus(CommonConstants.FOUR_STRING);
} }
} }
// 派减处理 办理成功才变更为已派减 3 ,办理失败 为4 // 派减处理 办理成功才变更为已派减 3 ,办理失败 为4
...@@ -4944,107 +4974,111 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4944,107 +4974,111 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
handleStatusTemp = CommonConstants.FOUR_STRING; handleStatusTemp = CommonConstants.FOUR_STRING;
} }
boolean flag = CommonConstants.THREE_STRING.equals(handleStatusTemp); boolean flag = CommonConstants.THREE_STRING.equals(handleStatusTemp);
if (socialType.contains(CommonConstants.ONE_STRING)) { if (CommonConstants.ONE_STRING.equals(dis.getAutoFlag()) || CommonConstants.FIVE_STRING.equals(socialInfo.getYgsHandleStatus())) {
if (CommonConstants.FIVE_STRING.equals(sf.getPensionHandle())){ if (socialType.contains(CommonConstants.ONE_STRING)) {
if (CommonConstants.FIVE_STRING.equals(socialInfo.getPensionHandle())){ if (CommonConstants.FIVE_STRING.equals(sf.getPensionHandle())) {
socialInfo.setPensionHandle(handleStatusTemp); if (CommonConstants.FIVE_STRING.equals(socialInfo.getPensionHandle())) {
if (flag){ socialInfo.setPensionHandle(handleStatusTemp);
socialInfo.setPensionReduceStart(dis.getSocialReduceDate()); if (flag) {
socialInfo.setPensionReduceStart(dis.getSocialReduceDate());
}
}
sf.setPensionHandle(handleStatusTemp);
if (flag) {
sf.setPensionReduceStart(dis.getSocialReduceDate());
} }
} }
sf.setPensionHandle(handleStatusTemp);
if (flag){
sf.setPensionReduceStart(dis.getSocialReduceDate());
}
}
/*if (CommonConstants.FOUR_STRING.equals(sf.getPensionHandle())){ /*if (CommonConstants.FOUR_STRING.equals(sf.getPensionHandle())){
sf.setPensionHandle(handleStatusTemp); sf.setPensionHandle(handleStatusTemp);
}*/ }*/
}
if (socialType.contains(CommonConstants.TWO_STRING)) {
if (CommonConstants.FIVE_STRING.equals(sf.getMedicalHandle())){
if (CommonConstants.FIVE_STRING.equals(socialInfo.getMedicalHandle())){
socialInfo.setMedicalHandle(handleStatusTemp);
if (flag){
socialInfo.setMedicalReduceStart(dis.getSocialReduceDate());
}
}
sf.setMedicalHandle(handleStatusTemp);
if (flag){
sf.setMedicalReduceStart(dis.getSocialReduceDate());
}
} }
/*if (CommonConstants.FOUR_STRING.equals(sf.getMedicalHandle())){ if (socialType.contains(CommonConstants.THREE_STRING)) {
sf.setMedicalHandle(handleStatusTemp); if (CommonConstants.FIVE_STRING.equals(sf.getUnemployHandle())) {
}*/ if (CommonConstants.FIVE_STRING.equals(socialInfo.getUnemployHandle())) {
} socialInfo.setUnemployHandle(handleStatusTemp);
if (socialType.contains(CommonConstants.THREE_STRING)) { if (flag) {
if (CommonConstants.FIVE_STRING.equals(sf.getUnemployHandle())){ socialInfo.setUnemployReduceStart(dis.getSocialReduceDate());
if (CommonConstants.FIVE_STRING.equals(socialInfo.getUnemployHandle())){ }
socialInfo.setUnemployHandle(handleStatusTemp); }
if (flag){ sf.setUnemployHandle(handleStatusTemp);
socialInfo.setUnemployReduceStart(dis.getSocialReduceDate()); if (flag) {
sf.setUnemployReduceStart(dis.getSocialReduceDate());
} }
} }
sf.setUnemployHandle(handleStatusTemp);
if (flag){
sf.setUnemployReduceStart(dis.getSocialReduceDate());
}
}
/*if (CommonConstants.FOUR_STRING.equals(sf.getUnemployHandle())){ /*if (CommonConstants.FOUR_STRING.equals(sf.getUnemployHandle())){
sf.setUnemployHandle(handleStatusTemp); sf.setUnemployHandle(handleStatusTemp);
}*/ }*/
} }
if (socialType.contains(CommonConstants.FOUR_STRING)) { if (socialType.contains(CommonConstants.FOUR_STRING)) {
if (CommonConstants.FIVE_STRING.equals(sf.getWorkInjuryHandle())){ if (CommonConstants.FIVE_STRING.equals(sf.getWorkInjuryHandle())) {
if (CommonConstants.FIVE_STRING.equals(socialInfo.getWorkInjuryHandle())){ if (CommonConstants.FIVE_STRING.equals(socialInfo.getWorkInjuryHandle())) {
socialInfo.setWorkInjuryHandle(handleStatusTemp); socialInfo.setWorkInjuryHandle(handleStatusTemp);
if (flag){ if (flag) {
socialInfo.setWorkInjuryReduceStart(dis.getSocialReduceDate()); socialInfo.setWorkInjuryReduceStart(dis.getSocialReduceDate());
}
}
sf.setWorkInjuryHandle(handleStatusTemp);
if (flag) {
sf.setWorkInjuryReduceStart(dis.getSocialReduceDate());
} }
} }
sf.setWorkInjuryHandle(handleStatusTemp);
if (flag){
sf.setWorkInjuryReduceStart(dis.getSocialReduceDate());
}
}
/*if (CommonConstants.FOUR_STRING.equals(sf.getWorkInjuryHandle())){ /*if (CommonConstants.FOUR_STRING.equals(sf.getWorkInjuryHandle())){
sf.setWorkInjuryHandle(handleStatusTemp); sf.setWorkInjuryHandle(handleStatusTemp);
}*/ }*/
}
} }
if (socialType.contains(CommonConstants.FIVE_STRING)) { if (CommonConstants.ONE_STRING.equals(dis.getAutoFlag()) || CommonConstants.FIVE_STRING.equals(socialInfo.getYsdHandleStatus())) {
if (CommonConstants.FIVE_STRING.equals(sf.getBirthHandle())){ if (socialType.contains(CommonConstants.TWO_STRING)) {
if (CommonConstants.FIVE_STRING.equals(socialInfo.getBirthHandle())){ if (CommonConstants.FIVE_STRING.equals(sf.getMedicalHandle())) {
socialInfo.setBirthHandle(handleStatusTemp); if (CommonConstants.FIVE_STRING.equals(socialInfo.getMedicalHandle())) {
if (flag){ socialInfo.setMedicalHandle(handleStatusTemp);
socialInfo.setBirthReduceStart(dis.getSocialReduceDate()); if (flag) {
socialInfo.setMedicalReduceStart(dis.getSocialReduceDate());
}
}
sf.setMedicalHandle(handleStatusTemp);
if (flag) {
sf.setMedicalReduceStart(dis.getSocialReduceDate());
} }
} }
sf.setBirthHandle(handleStatusTemp); /*if (CommonConstants.FOUR_STRING.equals(sf.getMedicalHandle())){
if (flag){ sf.setMedicalHandle(handleStatusTemp);
sf.setBirthReduceStart(dis.getSocialReduceDate()); }*/
}
} }
if (socialType.contains(CommonConstants.FIVE_STRING)) {
if (CommonConstants.FIVE_STRING.equals(sf.getBirthHandle())) {
if (CommonConstants.FIVE_STRING.equals(socialInfo.getBirthHandle())) {
socialInfo.setBirthHandle(handleStatusTemp);
if (flag) {
socialInfo.setBirthReduceStart(dis.getSocialReduceDate());
}
}
sf.setBirthHandle(handleStatusTemp);
if (flag) {
sf.setBirthReduceStart(dis.getSocialReduceDate());
}
}
/*if (CommonConstants.FOUR_STRING.equals(sf.getBirthHandle())){ /*if (CommonConstants.FOUR_STRING.equals(sf.getBirthHandle())){
sf.setBirthHandle(handleStatusTemp); sf.setBirthHandle(handleStatusTemp);
}*/ }*/
} }
if (socialType.contains(CommonConstants.SIX_STRING)) { if (socialType.contains(CommonConstants.SIX_STRING)) {
if (CommonConstants.FIVE_STRING.equals(sf.getBigailmentHandle())){ if (CommonConstants.FIVE_STRING.equals(sf.getBigailmentHandle())) {
if (CommonConstants.FIVE_STRING.equals(socialInfo.getBigailmentHandle())){ if (CommonConstants.FIVE_STRING.equals(socialInfo.getBigailmentHandle())) {
socialInfo.setBigailmentHandle(handleStatusTemp); socialInfo.setBigailmentHandle(handleStatusTemp);
if (flag){ if (flag) {
socialInfo.setBigailmentReduceStart(dis.getSocialReduceDate()); socialInfo.setBigailmentReduceStart(dis.getSocialReduceDate());
}
}
sf.setBigailmentHandle(handleStatusTemp);
if (flag) {
sf.setBigailmentReduceStart(dis.getSocialReduceDate());
} }
} }
sf.setBigailmentHandle(handleStatusTemp);
if (flag){
sf.setBigailmentReduceStart(dis.getSocialReduceDate());
}
}
/*if (CommonConstants.FOUR_STRING.equals(sf.getBigailmentHandle())){ /*if (CommonConstants.FOUR_STRING.equals(sf.getBigailmentHandle())){
sf.setBigailmentHandle(handleStatusTemp); sf.setBigailmentHandle(handleStatusTemp);
}*/ }*/
}
} }
} }
} }
......
...@@ -25,12 +25,11 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R; ...@@ -25,12 +25,11 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.social.config.SocialConfig; import com.yifu.cloud.plus.v1.yifu.social.config.SocialConfig;
import com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig; import com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAuditInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo; import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialSoldierMapper; import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialSoldierMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.FailReasonConfigService; import com.yifu.cloud.plus.v1.yifu.social.service.*;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService; import com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialInfoService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialSoldierService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialSoldierReturnErrorVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialSoldierReturnErrorVo;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
...@@ -69,6 +68,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -69,6 +68,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
private final TDispatchInfoService tDispatchInfoService; private final TDispatchInfoService tDispatchInfoService;
private final TSocialInfoService tSocialInfoService; private final TSocialInfoService tSocialInfoService;
private final FailReasonConfigService failReasonConfigService; private final FailReasonConfigService failReasonConfigService;
private final TAuditInfoService tAuditInfoService;
/** /**
...@@ -403,6 +403,24 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -403,6 +403,24 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
// 医生大办理失败的单子 // 医生大办理失败的单子
List<String> ysdFailList = new ArrayList<>(); List<String> ysdFailList = new ArrayList<>();
Map<String, TSocialInfo> socialMap = new HashMap<>(); Map<String, TSocialInfo> socialMap = new HashMap<>();
// 处理社保办理成功后的状态同步-成功
String typeSub = CommonConstants.ZERO_STRING;
String handleStatus;
String title = null;
String handleRemark = null;
String remark = null;
String socialType ;
Set<String> dbAuthsSet = new HashSet<>();
Collection<? extends GrantedAuthority> authorities = AuthorityUtils
.createAuthorityList(dbAuthsSet.toArray(new String[0]));
YifuUser user = new YifuUser("1", 1L, "社保士兵部门", "社保士兵",
"社保士兵", "0", SecurityConstants.BCRYPT + "123456",
"12345678911", true, true, true,
true,
"1", authorities, "1",
null, null,
null);
for (int i = 0; i < excelVOList.size(); i++) { for (int i = 0; i < excelVOList.size(); i++) {
excel = excelVOList.get(i); excel = excelVOList.get(i);
if ("是".equals(excel.getIsDoCompleted())) { if ("是".equals(excel.getIsDoCompleted())) {
...@@ -417,6 +435,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -417,6 +435,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
// 初始化继续办理 // 初始化继续办理
ygsHandleStatus = CommonConstants.THREE_STRING; ygsHandleStatus = CommonConstants.THREE_STRING;
ysdHandleStatus = CommonConstants.THREE_STRING; ysdHandleStatus = CommonConstants.THREE_STRING;
title = "社保";
socialInfo = idCardMap.get(doAddId + CommonConstants.DOWN_LINE_STRING + empIdCard); socialInfo = idCardMap.get(doAddId + CommonConstants.DOWN_LINE_STRING + empIdCard);
if (socialInfo != null) { if (socialInfo != null) {
...@@ -431,15 +450,22 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -431,15 +450,22 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} }
if ("是".equals(excel.getIsSuccess())) { if ("是".equals(excel.getIsSuccess())) {
ygsHandleStatus = CommonConstants.SIX_STRING; ygsHandleStatus = CommonConstants.SIX_STRING;
ygsList = new ArrayList<>();
ygsList.add(socialInfo.getDispatchId()); ygsList.add(socialInfo.getDispatchId());
handleRemark = "社保士兵自动办理成功!";
remark = "社保士兵自动办理成功!!";
} else { } else {
updateSocial.setYgsRemark(excel.getMsg()); updateSocial.setYgsRemark(excel.getMsg());
updateSocial.setYgsRemarkOld(excel.getMsg()); updateSocial.setYgsRemarkOld(excel.getMsg());
// 过期自动变为终止 // 过期自动变为终止
if (CommonConstants.ONE_STRING.equals(socialInfo.getYgsOverDueFlag())) { if (CommonConstants.ONE_STRING.equals(socialInfo.getYgsOverDueFlag())) {
updateSocial.setYgsRemarkOld("已过期,自动中止办理!"); updateSocial.setYgsRemarkOld("已过期,自动中止办理!");
ygsHandleStatus = CommonConstants.FOUR_STRING; ygsHandleStatus = CommonConstants.FOUR_STRING;
ygsFailList = new ArrayList<>();
ygsFailList.add(socialInfo.getDispatchId()); ygsFailList.add(socialInfo.getDispatchId());
handleRemark = "社保士兵自动办理失败:已过期,自动中止办理!";
remark = "社保士兵自动办理失败!!:已过期,自动中止办理!";
} else if (Common.isNotNull(excel.getMsg())) { } else if (Common.isNotNull(excel.getMsg())) {
// 如果找到了失败原因配置: // 如果找到了失败原因配置:
failConfig = getConfig(excel.getMsg(),errorMap); failConfig = getConfig(excel.getMsg(),errorMap);
...@@ -449,11 +475,31 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -449,11 +475,31 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
// setYgsHandleStatus 3继续办理、4终止办理、5人工处理 // setYgsHandleStatus 3继续办理、4终止办理、5人工处理
if (CommonConstants.ONE_STRING.equals(failConfig.getReplay())) { if (CommonConstants.ONE_STRING.equals(failConfig.getReplay())) {
ygsHandleStatus = CommonConstants.THREE_STRING; ygsHandleStatus = CommonConstants.THREE_STRING;
// 新增流程进展明细
if (CommonConstants.ZERO_STRING.equals(socialInfo.getDispatchType())) {
title +="派增";
} else {
title +="派减";
}
title +="派减养老、工伤、失业办理失败!继续办理";
this.doSocialTAuditInfo(socialInfo, title, "养老、工伤、失业办理失败!继续办理:"+excel.getMsg(), excel.getMsg(),user);
} else if (CommonConstants.TWO_STRING.equals(failConfig.getReplay())) { } else if (CommonConstants.TWO_STRING.equals(failConfig.getReplay())) {
ygsHandleStatus = CommonConstants.FOUR_STRING; ygsHandleStatus = CommonConstants.FOUR_STRING;
ygsFailList = new ArrayList<>();
ygsFailList.add(socialInfo.getDispatchId()); ygsFailList.add(socialInfo.getDispatchId());
handleRemark = "社保士兵自动办理失败!中止办理:"+failConfig.getSimpleReason();
remark = "社保士兵自动办理失败!!中止办理:" + failConfig.getSimpleReason();
} else if (CommonConstants.THREE_STRING.equals(failConfig.getReplay())) { } else if (CommonConstants.THREE_STRING.equals(failConfig.getReplay())) {
ygsHandleStatus = CommonConstants.FIVE_STRING; ygsHandleStatus = CommonConstants.FIVE_STRING;
// 新增流程进展明细
if (CommonConstants.ZERO_STRING.equals(socialInfo.getDispatchType())) {
title +="派增";
} else {
title +="派减";
}
title +="派减养老、工伤、失业办理失败!人工处理";
this.doSocialTAuditInfo(socialInfo, title, "养老、工伤、失业办理失败!人工处理:"+excel.getMsg(), excel.getMsg(),user);
} }
} else { } else {
ygsHandleStatus = CommonConstants.FIVE_STRING; ygsHandleStatus = CommonConstants.FIVE_STRING;
...@@ -474,7 +520,10 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -474,7 +520,10 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} }
if ("是".equals(excel.getIsSuccess())) { if ("是".equals(excel.getIsSuccess())) {
ysdHandleStatus = CommonConstants.SIX_STRING; ysdHandleStatus = CommonConstants.SIX_STRING;
ysdList = new ArrayList<>();
ysdList.add(socialInfo.getDispatchId()); ysdList.add(socialInfo.getDispatchId());
handleRemark = "社保士兵自动办理成功!";
remark = "社保士兵自动办理成功!!";
} else { } else {
updateSocial.setYsdRemark(excel.getMsg()); updateSocial.setYsdRemark(excel.getMsg());
updateSocial.setYsdRemarkOld(excel.getMsg()); updateSocial.setYsdRemarkOld(excel.getMsg());
...@@ -482,7 +531,10 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -482,7 +531,10 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
if (CommonConstants.ONE_STRING.equals(socialInfo.getYsdOverDueFlag())) { if (CommonConstants.ONE_STRING.equals(socialInfo.getYsdOverDueFlag())) {
updateSocial.setYsdRemarkOld("已过期,自动中止办理!"); updateSocial.setYsdRemarkOld("已过期,自动中止办理!");
ysdHandleStatus = CommonConstants.FOUR_STRING; ysdHandleStatus = CommonConstants.FOUR_STRING;
ysdFailList = new ArrayList<>();
ysdFailList.add(socialInfo.getDispatchId()); ysdFailList.add(socialInfo.getDispatchId());
handleRemark = "社保士兵自动办理失败:已过期,自动中止办理!";
remark = "社保士兵自动办理失败!!:已过期,自动中止办理!";
} else if (Common.isNotNull(excel.getMsg())) { } else if (Common.isNotNull(excel.getMsg())) {
// 如果找到了失败原因配置: // 如果找到了失败原因配置:
failConfig = getConfig(excel.getMsg(),errorMap); failConfig = getConfig(excel.getMsg(),errorMap);
...@@ -492,11 +544,31 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -492,11 +544,31 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
// ysdHandleStatus 3继续办理、4终止办理、5人工处理 // ysdHandleStatus 3继续办理、4终止办理、5人工处理
if (CommonConstants.ONE_STRING.equals(failConfig.getReplay())) { if (CommonConstants.ONE_STRING.equals(failConfig.getReplay())) {
ysdHandleStatus = CommonConstants.THREE_STRING; ysdHandleStatus = CommonConstants.THREE_STRING;
// 新增流程进展明细
if (CommonConstants.ZERO_STRING.equals(socialInfo.getDispatchType())) {
title +="派增";
} else {
title +="派减";
}
title +="派减医疗、生育、大病办理失败!继续办理";
this.doSocialTAuditInfo(socialInfo, title, "医疗、生育、大病办理失败!继续办理:"+excel.getMsg(), excel.getMsg(),user);
} else if (CommonConstants.TWO_STRING.equals(failConfig.getReplay())) { } else if (CommonConstants.TWO_STRING.equals(failConfig.getReplay())) {
ysdHandleStatus = CommonConstants.FOUR_STRING; ysdHandleStatus = CommonConstants.FOUR_STRING;
ysdFailList = new ArrayList<>();
ysdFailList.add(socialInfo.getDispatchId()); ysdFailList.add(socialInfo.getDispatchId());
handleRemark = "社保士兵自动办理失败:"+failConfig.getSimpleReason();
remark = "社保士兵自动办理失败!!" + failConfig.getSimpleReason();
} else if (CommonConstants.THREE_STRING.equals(failConfig.getReplay())) { } else if (CommonConstants.THREE_STRING.equals(failConfig.getReplay())) {
ysdHandleStatus = CommonConstants.FIVE_STRING; ysdHandleStatus = CommonConstants.FIVE_STRING;
// 新增流程进展明细
if (CommonConstants.ZERO_STRING.equals(socialInfo.getDispatchType())) {
title +="派增";
} else {
title +="派减";
}
title +="派减医疗、生育、大病办理失败!人工处理";
this.doSocialTAuditInfo(socialInfo, title, "医疗、生育、大病办理失败!人工处理:"+excel.getMsg(), excel.getMsg(),user);
} }
} else { } else {
ysdHandleStatus = CommonConstants.FIVE_STRING; ysdHandleStatus = CommonConstants.FIVE_STRING;
...@@ -507,11 +579,38 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -507,11 +579,38 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
updateSocialList.add(updateSocial); updateSocialList.add(updateSocial);
socialMap.put(updateSocial.getId(), updateSocial); socialMap.put(updateSocial.getId(), updateSocial);
} }
// 处理社保办理成功或失败,
if (!updateSocialList.isEmpty()) {
tSocialInfoService.updateBatchById(updateSocialList);
updateSocialList = new ArrayList<>();
}
handleStatus = CommonConstants.ONE_STRING;
// 处理社保办理成功后的状态同步-成功
if (!ygsList.isEmpty()) {
socialType = "1,4,3";
this.doSocialAndDispatch(ygsList, typeSub, handleStatus, handleRemark, socialType, remark, user);
}
if (!ysdList.isEmpty()) {
socialType = "2,5,6";
this.doSocialAndDispatch(ysdList, typeSub, handleStatus, handleRemark, socialType, remark, user);
}
// 处理社保办理成功后的状态同步-失败
handleStatus = CommonConstants.TWO_STRING;
if (!ygsFailList.isEmpty()) {
socialType = "1,4,3";
this.doSocialAndDispatch(ygsFailList, typeSub, handleStatus, handleRemark, socialType, remark, user);
}
if (!ysdFailList.isEmpty()) {
socialType = "2,5,6";
this.doSocialAndDispatch(ysdFailList, typeSub, handleStatus, handleRemark, socialType, remark, user);
}
} }
} }
} }
} }
/*
// 处理社保办理成功或失败, // 处理社保办理成功或失败,
if (!updateSocialList.isEmpty()) { if (!updateSocialList.isEmpty()) {
tSocialInfoService.updateBatchById(updateSocialList); tSocialInfoService.updateBatchById(updateSocialList);
...@@ -522,7 +621,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -522,7 +621,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
String handleStatus = CommonConstants.ONE_STRING; String handleStatus = CommonConstants.ONE_STRING;
String handleRemark = "社保士兵自动办理成功!"; String handleRemark = "社保士兵自动办理成功!";
String remark = "社保士兵自动办理成功!!"; String remark = "社保士兵自动办理成功!!";
String socialType = "1,2,3"; String socialType = "1,4,3";
Set<String> dbAuthsSet = new HashSet<>(); Set<String> dbAuthsSet = new HashSet<>();
Collection<? extends GrantedAuthority> authorities = AuthorityUtils Collection<? extends GrantedAuthority> authorities = AuthorityUtils
.createAuthorityList(dbAuthsSet.toArray(new String[0])); .createAuthorityList(dbAuthsSet.toArray(new String[0]));
...@@ -537,7 +636,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -537,7 +636,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
this.doSocialAndDispatch(ygsList, typeSub, handleStatus, handleRemark, socialType, remark, user); this.doSocialAndDispatch(ygsList, typeSub, handleStatus, handleRemark, socialType, remark, user);
} }
if (!ysdList.isEmpty()) { if (!ysdList.isEmpty()) {
socialType = "4,5,6"; socialType = "2,5,6";
this.doSocialAndDispatch(ysdList, typeSub, handleStatus, handleRemark, socialType, remark, user); this.doSocialAndDispatch(ysdList, typeSub, handleStatus, handleRemark, socialType, remark, user);
} }
...@@ -546,13 +645,13 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -546,13 +645,13 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
handleRemark = "社保士兵自动办理失败!"; handleRemark = "社保士兵自动办理失败!";
remark = "社保士兵自动办理失败!!"; remark = "社保士兵自动办理失败!!";
if (!ygsFailList.isEmpty()) { if (!ygsFailList.isEmpty()) {
socialType = "1,2,3"; socialType = "1,4,3";
this.doSocialAndDispatch(ygsFailList, typeSub, handleStatus, handleRemark, socialType, remark, user); this.doSocialAndDispatch(ygsFailList, typeSub, handleStatus, handleRemark, socialType, remark, user);
} }
if (!ysdFailList.isEmpty()) { if (!ysdFailList.isEmpty()) {
socialType = "4,5,6"; socialType = "2,5,6";
this.doSocialAndDispatch(ysdFailList, typeSub, handleStatus, handleRemark, socialType, remark, user); this.doSocialAndDispatch(ysdFailList, typeSub, handleStatus, handleRemark, socialType, remark, user);
} }*/
} }
/** /**
...@@ -586,4 +685,28 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -586,4 +685,28 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
return tDispatchInfoService.addApplyHandle(idList, typeSub, handleStatus, handleRemark, socialType, remark, user); return tDispatchInfoService.addApplyHandle(idList, typeSub, handleStatus, handleRemark, socialType, remark, user);
} }
/**
* 加办理记录
* @param handleRemark
* @Author hgw
* @Date 2024-5-16 11:43:33
**/
public void doSocialTAuditInfo(TSocialInfo social, String title, String handleRemark, String remark, YifuUser user) {
TAuditInfo auditInfo = new TAuditInfo();
auditInfo.setType(CommonConstants.ONE_STRING);
auditInfo.setId(null);
auditInfo.setAuditStatus(CommonConstants.TWO_STRING);
auditInfo.setAuditRemark(handleRemark);
auditInfo.setTitle(title);
auditInfo.setOrganName(user.getDeptName());
auditInfo.setAuditUser(user.getNickname());
auditInfo.setAuditTime(new Date());
auditInfo.setRemark(remark);
auditInfo.setIsCommision(CommonConstants.ONE_STRING);
auditInfo.setDispatchInfoId(social.getDispatchId());
auditInfo.setEmpIdcard(social.getEmpIdcard());
auditInfo.setSocialId(social.getId());
tAuditInfoService.save(auditInfo);
}
} }
...@@ -147,6 +147,7 @@ ...@@ -147,6 +147,7 @@
<result property="ygsAddId" column="YGS_ADD_ID"/> <result property="ygsAddId" column="YGS_ADD_ID"/>
<result property="ysdAddId" column="YSD_ADD_ID"/> <result property="ysdAddId" column="YSD_ADD_ID"/>
<result property="dispatchId" column="DISPATCH_ID"/> <result property="dispatchId" column="DISPATCH_ID"/>
<result property="dispatchType" column="DISPATCH_TYPE"/>
<result property="ygsOverDueFlag" column="YGS_OVER_DUE_FLAG"/> <result property="ygsOverDueFlag" column="YGS_OVER_DUE_FLAG"/>
<result property="ysdOverDueFlag" column="YSD_OVER_DUE_FLAG"/> <result property="ysdOverDueFlag" column="YSD_OVER_DUE_FLAG"/>
</resultMap> </resultMap>
...@@ -593,6 +594,7 @@ ...@@ -593,6 +594,7 @@
a.HANDLE_STATUS, a.HANDLE_STATUS,
a.YGS_HANDLE_STATUS, a.YGS_HANDLE_STATUS,
d.id as DISPATCH_ID, d.id as DISPATCH_ID,
d.type as DISPATCH_TYPE,
if((sd.id is not null and NOW() <![CDATA[ <= ]]> sd.SOCIAL_END_DATE) or ( sd.id is null and DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m')),0 ,1) YGS_OVER_DUE_FLAG if((sd.id is not null and NOW() <![CDATA[ <= ]]> sd.SOCIAL_END_DATE) or ( sd.id is null and DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m')),0 ,1) YGS_OVER_DUE_FLAG
FROM t_social_info a FROM t_social_info a
left join t_dispatch_info d on d.SOCIAL_ID = a.id left join t_dispatch_info d on d.SOCIAL_ID = a.id
...@@ -613,6 +615,7 @@ if((sd.id is not null and NOW() <![CDATA[ <= ]]> sd.SOCIAL_END_DATE) or ( sd.id ...@@ -613,6 +615,7 @@ if((sd.id is not null and NOW() <![CDATA[ <= ]]> sd.SOCIAL_END_DATE) or ( sd.id
a.HANDLE_STATUS, a.HANDLE_STATUS,
a.YSD_HANDLE_STATUS, a.YSD_HANDLE_STATUS,
d.id as DISPATCH_ID, d.id as DISPATCH_ID,
d.type as DISPATCH_TYPE,
if((sd.id is not null and NOW() <![CDATA[ <= ]]> sd.MEDICAL_END_DATE) or ( sd.id is null and DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m')),0 ,1) YSD_OVER_DUE_FLAG if((sd.id is not null and NOW() <![CDATA[ <= ]]> sd.MEDICAL_END_DATE) or ( sd.id is null and DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m')),0 ,1) YSD_OVER_DUE_FLAG
FROM t_social_info a FROM t_social_info a
left join t_dispatch_info d on d.SOCIAL_ID = a.id left join t_dispatch_info d on d.SOCIAL_ID = a.id
......
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