Commit 8852e440 authored by hongguangwu's avatar hongguangwu

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

parent a3ab7bc5
......@@ -1048,6 +1048,9 @@ public class TSocialInfo extends BaseEntity {
// 派单id,社保士兵使用
@TableField(exist = false)
private String dispatchId;
// 派单类型0派增1派减,社保士兵使用
@TableField(exist = false)
private String dispatchType;
// 过期Flag,0未过期,1过期,社保士兵使用(过期的自动变为中止办理)
@TableField(exist = false)
private String ygsOverDueFlag;
......
......@@ -4848,91 +4848,121 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(socialType)){
//派增处理
if (CommonConstants.ZERO_STRING.equals(dis.getType())){
if (socialType.contains(CommonConstants.ONE_STRING)
&& Common.isNotNull(socialInfo.getPensionHandle())
&& CommonConstants.ZERO_STRING.equals(socialInfo.getPensionHandle())
&& !CommonConstants.ONE_STRING.equals(sf.getPensionHandle())) {
socialInfo.setPensionHandle(handleStatus);
sf.setPensionHandle(handleStatus);
if (CommonConstants.ONE_STRING.equals(handleStatus)){
sf.setPensionReduceStart(null);
if (CommonConstants.ONE_STRING.equals(dis.getAutoFlag()) || CommonConstants.FIVE_STRING.equals(socialInfo.getYgsHandleStatus())) {
if (socialType.contains(CommonConstants.ONE_STRING)
&& Common.isNotNull(socialInfo.getPensionHandle())
&& CommonConstants.ZERO_STRING.equals(socialInfo.getPensionHandle())
&& !CommonConstants.ONE_STRING.equals(sf.getPensionHandle())) {
socialInfo.setPensionHandle(handleStatus);
sf.setPensionHandle(handleStatus);
if (CommonConstants.ONE_STRING.equals(handleStatus)) {
sf.setPensionReduceStart(null);
}
}
}
if (socialType.contains(CommonConstants.TWO_STRING)
&& Common.isNotNull(socialInfo.getMedicalHandle())
&& CommonConstants.ZERO_STRING.equals(socialInfo.getMedicalHandle())
&& !CommonConstants.ONE_STRING.equals(sf.getMedicalHandle())) {
socialInfo.setMedicalHandle(handleStatus);
sf.setMedicalHandle(handleStatus);
if (CommonConstants.ONE_STRING.equals(handleStatus)){
sf.setMedicalReduceStart(null);
if (socialType.contains(CommonConstants.THREE_STRING)
&& Common.isNotNull(socialInfo.getUnemployHandle())
&& CommonConstants.ZERO_STRING.equals(socialInfo.getUnemployHandle())
&& !CommonConstants.ONE_STRING.equals(sf.getUnemployHandle())) {
socialInfo.setUnemployHandle(handleStatus);
sf.setUnemployHandle(handleStatus);
if (CommonConstants.ONE_STRING.equals(handleStatus)) {
sf.setUnemployReduceStart(null);
}
}
}
if (socialType.contains(CommonConstants.THREE_STRING)
&& Common.isNotNull(socialInfo.getUnemployHandle())
&& CommonConstants.ZERO_STRING.equals(socialInfo.getUnemployHandle())
&& !CommonConstants.ONE_STRING.equals(sf.getUnemployHandle())) {
socialInfo.setUnemployHandle(handleStatus);
sf.setUnemployHandle(handleStatus);
if (CommonConstants.ONE_STRING.equals(handleStatus)){
sf.setUnemployReduceStart(null);
if (socialType.contains(CommonConstants.FOUR_STRING)
&& Common.isNotNull(socialInfo.getWorkInjuryHandle())
&& CommonConstants.ZERO_STRING.equals(socialInfo.getWorkInjuryHandle())
&& !CommonConstants.ONE_STRING.equals(sf.getWorkInjuryHandle())) {
socialInfo.setWorkInjuryHandle(handleStatus);
sf.setWorkInjuryHandle(handleStatus);
if (CommonConstants.ONE_STRING.equals(handleStatus)) {
sf.setWorkInjuryReduceStart(null);
}
}
}
if (socialType.contains(CommonConstants.FOUR_STRING)
&& Common.isNotNull(socialInfo.getWorkInjuryHandle())
&& CommonConstants.ZERO_STRING.equals(socialInfo.getWorkInjuryHandle())
&& !CommonConstants.ONE_STRING.equals(sf.getWorkInjuryHandle())) {
socialInfo.setWorkInjuryHandle(handleStatus);
sf.setWorkInjuryHandle(handleStatus);
if (CommonConstants.ONE_STRING.equals(handleStatus)){
sf.setWorkInjuryReduceStart(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 (socialType.contains(CommonConstants.FIVE_STRING)
&& Common.isNotNull(socialInfo.getBirthHandle())
&& CommonConstants.ZERO_STRING.equals(socialInfo.getBirthHandle())
&& !CommonConstants.ONE_STRING.equals(sf.getBirthHandle())) {
socialInfo.setBirthHandle(handleStatus);
sf.setBirthHandle(handleStatus);
if (CommonConstants.ONE_STRING.equals(handleStatus)){
sf.setBirthReduceStart(null);
if (CommonConstants.ONE_STRING.equals(dis.getAutoFlag()) || CommonConstants.FIVE_STRING.equals(socialInfo.getYsdHandleStatus())) {
if (socialType.contains(CommonConstants.TWO_STRING)
&& Common.isNotNull(socialInfo.getMedicalHandle())
&& CommonConstants.ZERO_STRING.equals(socialInfo.getMedicalHandle())
&& !CommonConstants.ONE_STRING.equals(sf.getMedicalHandle())) {
socialInfo.setMedicalHandle(handleStatus);
sf.setMedicalHandle(handleStatus);
if (CommonConstants.ONE_STRING.equals(handleStatus)) {
sf.setMedicalReduceStart(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 (socialType.contains(CommonConstants.FIVE_STRING)
&& Common.isNotNull(socialInfo.getBirthHandle())
&& CommonConstants.ZERO_STRING.equals(socialInfo.getBirthHandle())
&& !CommonConstants.ONE_STRING.equals(sf.getBirthHandle())) {
socialInfo.setBirthHandle(handleStatus);
sf.setBirthHandle(handleStatus);
if (CommonConstants.ONE_STRING.equals(handleStatus)) {
sf.setBirthReduceStart(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
......@@ -4944,107 +4974,111 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
handleStatusTemp = CommonConstants.FOUR_STRING;
}
boolean flag = CommonConstants.THREE_STRING.equals(handleStatusTemp);
if (socialType.contains(CommonConstants.ONE_STRING)) {
if (CommonConstants.FIVE_STRING.equals(sf.getPensionHandle())){
if (CommonConstants.FIVE_STRING.equals(socialInfo.getPensionHandle())){
socialInfo.setPensionHandle(handleStatusTemp);
if (flag){
socialInfo.setPensionReduceStart(dis.getSocialReduceDate());
if (CommonConstants.ONE_STRING.equals(dis.getAutoFlag()) || CommonConstants.FIVE_STRING.equals(socialInfo.getYgsHandleStatus())) {
if (socialType.contains(CommonConstants.ONE_STRING)) {
if (CommonConstants.FIVE_STRING.equals(sf.getPensionHandle())) {
if (CommonConstants.FIVE_STRING.equals(socialInfo.getPensionHandle())) {
socialInfo.setPensionHandle(handleStatusTemp);
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())){
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())){
sf.setMedicalHandle(handleStatusTemp);
}*/
}
if (socialType.contains(CommonConstants.THREE_STRING)) {
if (CommonConstants.FIVE_STRING.equals(sf.getUnemployHandle())){
if (CommonConstants.FIVE_STRING.equals(socialInfo.getUnemployHandle())){
socialInfo.setUnemployHandle(handleStatusTemp);
if (flag){
socialInfo.setUnemployReduceStart(dis.getSocialReduceDate());
if (socialType.contains(CommonConstants.THREE_STRING)) {
if (CommonConstants.FIVE_STRING.equals(sf.getUnemployHandle())) {
if (CommonConstants.FIVE_STRING.equals(socialInfo.getUnemployHandle())) {
socialInfo.setUnemployHandle(handleStatusTemp);
if (flag) {
socialInfo.setUnemployReduceStart(dis.getSocialReduceDate());
}
}
sf.setUnemployHandle(handleStatusTemp);
if (flag) {
sf.setUnemployReduceStart(dis.getSocialReduceDate());
}
}
sf.setUnemployHandle(handleStatusTemp);
if (flag){
sf.setUnemployReduceStart(dis.getSocialReduceDate());
}
}
/*if (CommonConstants.FOUR_STRING.equals(sf.getUnemployHandle())){
sf.setUnemployHandle(handleStatusTemp);
}*/
}
if (socialType.contains(CommonConstants.FOUR_STRING)) {
if (CommonConstants.FIVE_STRING.equals(sf.getWorkInjuryHandle())){
if (CommonConstants.FIVE_STRING.equals(socialInfo.getWorkInjuryHandle())){
socialInfo.setWorkInjuryHandle(handleStatusTemp);
if (flag){
socialInfo.setWorkInjuryReduceStart(dis.getSocialReduceDate());
}
if (socialType.contains(CommonConstants.FOUR_STRING)) {
if (CommonConstants.FIVE_STRING.equals(sf.getWorkInjuryHandle())) {
if (CommonConstants.FIVE_STRING.equals(socialInfo.getWorkInjuryHandle())) {
socialInfo.setWorkInjuryHandle(handleStatusTemp);
if (flag) {
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())){
sf.setWorkInjuryHandle(handleStatusTemp);
}*/
}
}
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());
if (CommonConstants.ONE_STRING.equals(dis.getAutoFlag()) || CommonConstants.FIVE_STRING.equals(socialInfo.getYsdHandleStatus())) {
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());
}
}
sf.setBirthHandle(handleStatusTemp);
if (flag){
sf.setBirthReduceStart(dis.getSocialReduceDate());
}
/*if (CommonConstants.FOUR_STRING.equals(sf.getMedicalHandle())){
sf.setMedicalHandle(handleStatusTemp);
}*/
}
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())){
sf.setBirthHandle(handleStatusTemp);
}*/
}
if (socialType.contains(CommonConstants.SIX_STRING)) {
if (CommonConstants.FIVE_STRING.equals(sf.getBigailmentHandle())){
if (CommonConstants.FIVE_STRING.equals(socialInfo.getBigailmentHandle())){
socialInfo.setBigailmentHandle(handleStatusTemp);
if (flag){
socialInfo.setBigailmentReduceStart(dis.getSocialReduceDate());
}
if (socialType.contains(CommonConstants.SIX_STRING)) {
if (CommonConstants.FIVE_STRING.equals(sf.getBigailmentHandle())) {
if (CommonConstants.FIVE_STRING.equals(socialInfo.getBigailmentHandle())) {
socialInfo.setBigailmentHandle(handleStatusTemp);
if (flag) {
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())){
sf.setBigailmentHandle(handleStatusTemp);
}*/
}
}
}
}
......
......@@ -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.social.config.SocialConfig;
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.mapper.TSocialSoldierMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.FailReasonConfigService;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService;
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.service.*;
import com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialSoldierReturnErrorVo;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
......@@ -69,6 +68,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
private final TDispatchInfoService tDispatchInfoService;
private final TSocialInfoService tSocialInfoService;
private final FailReasonConfigService failReasonConfigService;
private final TAuditInfoService tAuditInfoService;
/**
......@@ -403,6 +403,24 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
// 医生大办理失败的单子
List<String> ysdFailList = new ArrayList<>();
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++) {
excel = excelVOList.get(i);
if ("是".equals(excel.getIsDoCompleted())) {
......@@ -417,6 +435,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
// 初始化继续办理
ygsHandleStatus = CommonConstants.THREE_STRING;
ysdHandleStatus = CommonConstants.THREE_STRING;
title = "社保";
socialInfo = idCardMap.get(doAddId + CommonConstants.DOWN_LINE_STRING + empIdCard);
if (socialInfo != null) {
......@@ -431,15 +450,22 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
}
if ("是".equals(excel.getIsSuccess())) {
ygsHandleStatus = CommonConstants.SIX_STRING;
ygsList = new ArrayList<>();
ygsList.add(socialInfo.getDispatchId());
handleRemark = "社保士兵自动办理成功!";
remark = "社保士兵自动办理成功!!";
} else {
updateSocial.setYgsRemark(excel.getMsg());
updateSocial.setYgsRemarkOld(excel.getMsg());
// 过期自动变为终止
if (CommonConstants.ONE_STRING.equals(socialInfo.getYgsOverDueFlag())) {
updateSocial.setYgsRemarkOld("已过期,自动中止办理!");
ygsHandleStatus = CommonConstants.FOUR_STRING;
ygsFailList = new ArrayList<>();
ygsFailList.add(socialInfo.getDispatchId());
handleRemark = "社保士兵自动办理失败:已过期,自动中止办理!";
remark = "社保士兵自动办理失败!!:已过期,自动中止办理!";
} else if (Common.isNotNull(excel.getMsg())) {
// 如果找到了失败原因配置:
failConfig = getConfig(excel.getMsg(),errorMap);
......@@ -449,11 +475,31 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
// setYgsHandleStatus 3继续办理、4终止办理、5人工处理
if (CommonConstants.ONE_STRING.equals(failConfig.getReplay())) {
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())) {
ygsHandleStatus = CommonConstants.FOUR_STRING;
ygsFailList = new ArrayList<>();
ygsFailList.add(socialInfo.getDispatchId());
handleRemark = "社保士兵自动办理失败!中止办理:"+failConfig.getSimpleReason();
remark = "社保士兵自动办理失败!!中止办理:" + failConfig.getSimpleReason();
} else if (CommonConstants.THREE_STRING.equals(failConfig.getReplay())) {
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 {
ygsHandleStatus = CommonConstants.FIVE_STRING;
......@@ -474,7 +520,10 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
}
if ("是".equals(excel.getIsSuccess())) {
ysdHandleStatus = CommonConstants.SIX_STRING;
ysdList = new ArrayList<>();
ysdList.add(socialInfo.getDispatchId());
handleRemark = "社保士兵自动办理成功!";
remark = "社保士兵自动办理成功!!";
} else {
updateSocial.setYsdRemark(excel.getMsg());
updateSocial.setYsdRemarkOld(excel.getMsg());
......@@ -482,7 +531,10 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
if (CommonConstants.ONE_STRING.equals(socialInfo.getYsdOverDueFlag())) {
updateSocial.setYsdRemarkOld("已过期,自动中止办理!");
ysdHandleStatus = CommonConstants.FOUR_STRING;
ysdFailList = new ArrayList<>();
ysdFailList.add(socialInfo.getDispatchId());
handleRemark = "社保士兵自动办理失败:已过期,自动中止办理!";
remark = "社保士兵自动办理失败!!:已过期,自动中止办理!";
} else if (Common.isNotNull(excel.getMsg())) {
// 如果找到了失败原因配置:
failConfig = getConfig(excel.getMsg(),errorMap);
......@@ -492,11 +544,31 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
// ysdHandleStatus 3继续办理、4终止办理、5人工处理
if (CommonConstants.ONE_STRING.equals(failConfig.getReplay())) {
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())) {
ysdHandleStatus = CommonConstants.FOUR_STRING;
ysdFailList = new ArrayList<>();
ysdFailList.add(socialInfo.getDispatchId());
handleRemark = "社保士兵自动办理失败:"+failConfig.getSimpleReason();
remark = "社保士兵自动办理失败!!" + failConfig.getSimpleReason();
} else if (CommonConstants.THREE_STRING.equals(failConfig.getReplay())) {
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 {
ysdHandleStatus = CommonConstants.FIVE_STRING;
......@@ -507,11 +579,38 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
updateSocialList.add(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()) {
tSocialInfoService.updateBatchById(updateSocialList);
......@@ -522,7 +621,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
String handleStatus = CommonConstants.ONE_STRING;
String handleRemark = "社保士兵自动办理成功!";
String remark = "社保士兵自动办理成功!!";
String socialType = "1,2,3";
String socialType = "1,4,3";
Set<String> dbAuthsSet = new HashSet<>();
Collection<? extends GrantedAuthority> authorities = AuthorityUtils
.createAuthorityList(dbAuthsSet.toArray(new String[0]));
......@@ -537,7 +636,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
this.doSocialAndDispatch(ygsList, typeSub, handleStatus, handleRemark, socialType, remark, user);
}
if (!ysdList.isEmpty()) {
socialType = "4,5,6";
socialType = "2,5,6";
this.doSocialAndDispatch(ysdList, typeSub, handleStatus, handleRemark, socialType, remark, user);
}
......@@ -546,13 +645,13 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
handleRemark = "社保士兵自动办理失败!";
remark = "社保士兵自动办理失败!!";
if (!ygsFailList.isEmpty()) {
socialType = "1,2,3";
socialType = "1,4,3";
this.doSocialAndDispatch(ygsFailList, typeSub, handleStatus, handleRemark, socialType, remark, user);
}
if (!ysdFailList.isEmpty()) {
socialType = "4,5,6";
socialType = "2,5,6";
this.doSocialAndDispatch(ysdFailList, typeSub, handleStatus, handleRemark, socialType, remark, user);
}
}*/
}
/**
......@@ -586,4 +685,28 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
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 @@
<result property="ygsAddId" column="YGS_ADD_ID"/>
<result property="ysdAddId" column="YSD_ADD_ID"/>
<result property="dispatchId" column="DISPATCH_ID"/>
<result property="dispatchType" column="DISPATCH_TYPE"/>
<result property="ygsOverDueFlag" column="YGS_OVER_DUE_FLAG"/>
<result property="ysdOverDueFlag" column="YSD_OVER_DUE_FLAG"/>
</resultMap>
......@@ -593,6 +594,7 @@
a.HANDLE_STATUS,
a.YGS_HANDLE_STATUS,
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
FROM t_social_info a
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
a.HANDLE_STATUS,
a.YSD_HANDLE_STATUS,
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
FROM t_social_info a
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