Commit 4e061369 authored by huyuchen's avatar huyuchen

Merge remote-tracking branch 'origin/MVP1.5' into MVP1.5

parents 31031547 832e28e9
......@@ -472,11 +472,20 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
@Override
public R<Boolean> updateProjectServerTeam(List<TSettleDomainUpServerTeamVo> list) {
TSettleDomain domain;
TSettleDomain tSettleDomainInfo;
for (TSettleDomainUpServerTeamVo vo:list) {
domain = new TSettleDomain();
BeanUtil.copyProperties(vo,domain);
tSettleDomainInfo = baseMapper.selectOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo,domain.getDepartNo())
.orderByDesc(BaseEntity::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(tSettleDomainInfo)){
domain.setDepartName(tSettleDomainInfo.getDepartName());
domain.setId(tSettleDomainInfo.getId());
initServerTeamPermission(domain);
}
}
return R.ok(Boolean.TRUE,CommonConstants.RESULT_DATA_SUCESS);
}
......
......@@ -521,11 +521,17 @@ public interface ErrorCodes {
* 派增异常: 失败项重新派单缴纳方式不可变更
*/
String EMP_DISPATCH_SOCIAL_PAYMENT_TYPE_NOT_SAME = "emp.dispatch.social.payment.type.same";
/**
* 社保户不能为空
**/
String SOCIAL_HOLD_IS_EMPTY = "social.hold.is.empty";
/**
* 公积金户不能为空
**/
String FUND_HOLD_IS_EMPTY = "fund.hold.is.empty";
/**
* 信息校验通过,但其他行存在问题数据,请调整后,统一减档
**/
String ARCHIVES_IMPORT_EMP_TRUE = "archives.import.emp.true";
/**
......
......@@ -461,7 +461,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
if (Common.isNotNull(socialFund)
&& Common.isNotNull(socialFund.getSocialId())
&& CommonConstants.FOUR_STRING.equals(socialFund.getSocialStatus())){
&& (CommonConstants.FOUR_STRING.equals(socialFund.getSocialStatus())
|| CommonConstants.TWELVE_STRING.equals(socialFund.getSocialStatus()))){
// 部分失败
dispatchPart = true;
}
......@@ -1762,7 +1763,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(socialFundMap)) {
socialFund = socialFundMap.get(excel.getEmpIdcard());
if (Common.isNotNull(socialFund)){
if (CommonConstants.ONE_STRING.equals(socialFund.getPensionHandle())){
if (CommonConstants.ONE_STRING.equals(socialFund.getPensionHandle())
|| CommonConstants.FOUR_STRING.equals(socialFund.getPensionHandle())){
social.setPensionHandle(null);
social.setUnitPensionCardinal(null);
social.setUnitPensionPer(null);
......@@ -1779,7 +1781,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialFund.setPersonalPensionPer(social.getPersonalPensionPer());
}
}
if (CommonConstants.ONE_STRING.equals(socialFund.getMedicalHandle())){
if (CommonConstants.ONE_STRING.equals(socialFund.getMedicalHandle())
|| CommonConstants.FOUR_STRING.equals(socialFund.getMedicalHandle())){
social.setMedicalHandle(null);
social.setUnitMedicalCardinal(null);
social.setUnitMedicalPer(null);
......@@ -1796,7 +1799,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialFund.setPersonalMedicalPer(social.getPersonalMedicalPer());
}
}
if (CommonConstants.ONE_STRING.equals(socialFund.getUnemployHandle())){
if (CommonConstants.ONE_STRING.equals(socialFund.getUnemployHandle())
|| CommonConstants.FOUR_STRING.equals(socialFund.getUnemployHandle())){
social.setUnemployHandle(null);
social.setUnitUnemploymentCardinal(null);
social.setUnitUnemploymentPer(null);
......@@ -1813,7 +1817,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialFund.setPersonalUnemploymentPer(social.getPersonalUnemploymentPer());
}
}
if (CommonConstants.ONE_STRING.equals(socialFund.getWorkInjuryHandle())){
if (CommonConstants.ONE_STRING.equals(socialFund.getWorkInjuryHandle())
|| CommonConstants.FOUR_STRING.equals(socialFund.getWorkInjuryHandle())){
social.setWorkInjuryHandle(null);
social.setUnitWorkInjuryCardinal(null);
social.setUnitWorkUnjuryPer(null);
......@@ -1824,7 +1829,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialFund.setUnitWorkInjuryCardinal(social.getUnitWorkInjuryCardinal());
}
}
if (CommonConstants.ONE_STRING.equals(socialFund.getBirthHandle())){
if (CommonConstants.ONE_STRING.equals(socialFund.getBirthHandle())
|| CommonConstants.FOUR_STRING.equals(socialFund.getBirthHandle())){
social.setBirthHandle(null);
social.setUnitBirthCardinal(null);
social.setUnitBirthPer(null);
......@@ -1836,7 +1842,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialFund.setUnitBirthPer(social.getUnitBirthPer());
}
}
if (CommonConstants.ONE_STRING.equals(socialFund.getBigailmentHandle())){
if (CommonConstants.ONE_STRING.equals(socialFund.getBigailmentHandle())
|| CommonConstants.FOUR_STRING.equals(socialFund.getBigailmentHandle())){
social.setBigailmentHandle(null);
social.setUnitBigailmentCardinal(null);
social.setUnitBigailmentPer(null);
......@@ -2027,8 +2034,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (CommonConstants.ZERO_STRING.equals(sf.getSocialAddStatus())
|| CommonConstants.ONE_STRING.equals(sf.getSocialAddStatus())
|| CommonConstants.SIX_STRING.equals(sf.getSocialAddStatus())
|| (CommonConstants.TWO_STRING.equals(sf.getSocialAddStatus())
&& !CommonConstants.TWO_STRING.equals(sf.getSocialReduceStatus()))
|| CommonConstants.ELEVEN_STRING.equals(sf.getSocialStatus())
) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_EXISTING)));
return true;
......@@ -2309,7 +2315,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
if (Common.isNotNull(socialFund)){
// 社保状态:派增(0待审核、1待办理、2办理中 3办理成功、4部分办理失败 5 办理失败)、派减(6待审核 7待办理 8办理成功 9 办理失败 10 审核不通过-增)
// 社保状态:派增(0待审核、1待办理、2办理中 3办理成功、4部分办理失败 5 办理失败)、派减(6待审核 7待办理 8办理成功 9 办理失败 10 审核不通过-增 11.派减办理中 12.派减部分办理失败
if (Common.isNotNull(excel.getSocialHousehold())
&& (CommonConstants.SIX_STRING.equals(socialFund.getSocialStatus())
|| CommonConstants.SEVEN_STRING.equals(socialFund.getSocialStatus())
......@@ -2317,7 +2323,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
|| CommonConstants.ZERO_STRING.equals(socialFund.getSocialStatus())
|| CommonConstants.ONE_STRING.equals(socialFund.getSocialStatus())
|| CommonConstants.THREE_STRING.equals(socialFund.getSocialStatus())
|| CommonConstants.TWO_STRING.equals(socialFund.getSocialStatus()))
|| CommonConstants.TWO_STRING.equals(socialFund.getSocialStatus())
|| CommonConstants.ELEVEN_STRING.equals(socialFund.getSocialStatus())
)
){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_EXISTING)));
return true;
......@@ -2836,7 +2844,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isEmpty(socialFund.getSocialStatus())
|| !(socialFund.getSocialStatus().equals(CommonConstants.THREE_STRING)
|| socialFund.getSocialStatus().equals(CommonConstants.FOUR_STRING)
|| socialFund.getSocialStatus().equals(CommonConstants.NINE_STRING))){
|| socialFund.getSocialStatus().equals(CommonConstants.NINE_STRING)
|| socialFund.getSocialStatus().equals(CommonConstants.TWELVE_STRING))){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_REDUCE_SOCIAL_STATUS_ERROR)));
return true;
}
......@@ -3287,7 +3296,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @param typeSub 0社保办理;1公积金办理
* @param idsList
* @param user
* @param flag 0审核通过; 1审核不通过
* @param flag 0办理成功; 1办理失败
* @param handleStatus 1 办理成功 2 办理失败
* @param handleRemark
* @param socialType 社保拆分的每一项(1养老 2医疗 3失业 4工伤 5生育 6大病)
......@@ -3481,8 +3490,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(socialInfo) && Common.isNotNull(socialInfo.getId())) {
// 社保办理状态补充判断:
this.setSocialHandleStatus(handleStatus, socialType, flag, socialInfo, dis,sf);
socialInfo.setReduceHandleUser(user.getId());
socialInfo.setReduceHandleTime(now);
//社保派减办理成功才变更社保的办理状态
if (CommonConstants.ZERO_INT == flag) {
/*if (CommonConstants.ZERO_INT == flag) {
socialInfo.setHandleStatus(CommonConstants.THREE_STRING);
socialInfo.setReduceHandleUser(user.getId());
socialInfo.setReduceHandleTime(now);
......@@ -3499,7 +3510,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
sf.setSocialReduceStatus(CommonConstants.THREE_STRING);
sf.setSocialStatus(CommonConstants.NINE_STRING);
sf.setSocialReduceDate(null);
}
}*/
socialInfo.setHandleTime(now);
socialInfo.setHandleUser(user.getId());
socialMapper.updateById(socialInfo);
......@@ -3521,7 +3532,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
temp.append(ServiceUtil.ifNullToEmpty(handleRemark));
initAuditInfo(auditInfo,temp.toString(), CommonConstants.FOUR_STRING, user, temp.toString(), remark);
}
dis.setSocialHandleStatus(handleStatus);
auditInfo.setSocialId(dis.getId());
} else {
errorList.add(new ErrorMessage(-1, "找不到对应员工社保数据:" + dis.getEmpName()));
......@@ -3600,7 +3610,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(dis.getSocialId())
&& Common.isNotNull(dis.getFundId())
&& (CommonConstants.ONE_STRING.equals(dis.getSocialHandleStatus())
|| CommonConstants.TWO_STRING.equals(dis.getSocialHandleStatus()))
|| CommonConstants.TWO_STRING.equals(dis.getSocialHandleStatus())
|| CommonConstants.THREE_STRING.equals(dis.getSocialHandleStatus()))
&& (CommonConstants.ONE_STRING.equals(dis.getFundHandleStatus())
|| CommonConstants.TWO_STRING.equals(dis.getFundHandleStatus()))) {
//办理成功
......@@ -3614,7 +3625,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
if (Common.isEmpty(dis.getFundId()) && Common.isNotNull(dis.getSocialId())
&&(CommonConstants.ONE_STRING.equals(dis.getSocialHandleStatus())
|| CommonConstants.TWO_STRING.equals(dis.getSocialHandleStatus()))) {
|| CommonConstants.TWO_STRING.equals(dis.getSocialHandleStatus()))
|| CommonConstants.THREE_STRING.equals(dis.getSocialHandleStatus())) {
//办理成功
dis.setStatus(CommonConstants.FOUR_STRING);
}
......@@ -3655,8 +3667,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 同步预估库数据
socialTask.asynchronousDisPatchHandle(sf, forecastFlag,null,null,CommonConstants.ZERO_INT);
}
// 派减办理失败不同步档案的相关字段信息
if (!(CommonConstants.ONE_STRING.equals(dis.getType()) && CommonConstants.ONE_INT == flag)){
// 派减公积金办理失败不同步档案的相关字段信息
if (!(CommonConstants.ONE_STRING.equals(dis.getType())
&& CommonConstants.ONE_INT == flag
&& CommonConstants.ONE_STRING.equals(typeSub))){
UpProjectSocialFundVo vo = new UpProjectSocialFundVo();
// 社保状态 社保状态(字典): 0 无社保 1 处理中 2.部分购买 3.正常 4.已派减
initSocialFundStatus(socialInfo, providentFund, vo,sf);
......@@ -3736,13 +3750,15 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
){
vo.setSocialStatus(CommonConstants.ZERO_STRING);
}
// 待办理或办理中或部分办理失败或审核不通过部分办理成功 处理中
// 待办理或办理中或部分办理失败或审核不通过部分办理成功或派减办理中为 处理中
if (CommonConstants.ZERO_STRING.equals(sf.getSocialStatus())
|| CommonConstants.TWO_STRING.equals(sf.getSocialStatus())){
|| CommonConstants.TWO_STRING.equals(sf.getSocialStatus())
|| CommonConstants.ELEVEN_STRING.equals(sf.getSocialStatus())){
vo.setSocialStatus(CommonConstants.ONE_STRING);
}
// 部分办理失败或审核不通过部分办理成功
// 部分办理失败或审核不通过部分办理成功或派减部分办理失败 为 部分购买
if (CommonConstants.FOUR_STRING.equals(sf.getSocialStatus())
|| CommonConstants.TWELVE_STRING.equals(sf.getSocialStatus())
|| (CommonConstants.TEN_STRING.equals(sf.getSocialStatus())
&& (CommonConstants.ONE_STRING.equals(sf.getPensionHandle())
|| CommonConstants.ONE_STRING.equals(sf.getMedicalHandle())
......@@ -3821,7 +3837,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
// 派减派单项处理
} else if (CommonConstants.ZERO_STRING.equals(type)){
} else if (CommonConstants.ONE_STRING.equals(type)){
for (String st : stArr) {
// socialType (1养老 2医疗 3失业 4工伤 5生育 6大病)
if (Integer.parseInt(st) == CommonConstants.ONE_INT
......@@ -3989,11 +4005,27 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
&& ( (CommonConstants.THREE_STRING.equals(socialInfo.getBigailmentHandle())
&& CommonConstants.ZERO_STRING.equals(socialInfo.getIsIllness()))
|| Common.isEmpty(socialInfo.getBigailmentHandle()))){
if (CommonConstants.FOUR_STRING.equals(sf.getMedicalHandle())
||CommonConstants.FOUR_STRING.equals(sf.getPensionHandle())
||CommonConstants.FOUR_STRING.equals(sf.getWorkInjuryHandle())
||CommonConstants.FOUR_STRING.equals(sf.getBirthHandle())
||CommonConstants.FOUR_STRING.equals(sf.getUnemployHandle())
||CommonConstants.FOUR_STRING.equals(sf.getBigailmentHandle())){
// 派减部分办理失败
socialInfo.setHandleStatus(CommonConstants.SEVEN_STRING);
sf.setSocialStatus(CommonConstants.TWELVE_STRING);
sf.setSocialReduceStatus(CommonConstants.SIX_STRING);
socialInfo.setReduceCan(CommonConstants.ZERO_STRING);
dis.setSocialHandleStatus(CommonConstants.THREE_STRING);
}else {
socialInfo.setHandleStatus(CommonConstants.THREE_STRING);
sf.setSocialStatus(CommonConstants.EIGHT_STRING);
sf.setSocialReduceStatus(CommonConstants.TWO_STRING);
socialInfo.setSocialReduceDate(dis.getSocialReduceDate());
sf.setSocialReduceDate(dis.getSocialReduceDate());
dis.setSocialHandleStatus(CommonConstants.ONE_STRING);
}
return;
}
// 全部失败
......@@ -4014,6 +4046,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
sf.setSocialStatus(CommonConstants.NINE_STRING);
sf.setSocialReduceStatus(CommonConstants.THREE_STRING);
socialInfo.setReduceCan(CommonConstants.ZERO_STRING);
dis.setSocialHandleStatus(CommonConstants.TWO_STRING);
return;
}
......@@ -4029,6 +4062,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
sf.setSocialStatus(CommonConstants.ELEVEN_STRING);
sf.setSocialReduceStatus(CommonConstants.FIVE_STRING);
socialInfo.setReduceCan(CommonConstants.ONE_STRING);
dis.setSocialHandleStatus(CommonConstants.FOUR_STRING);
return;
}
// 派减部分办理失败
......@@ -4036,6 +4070,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
sf.setSocialStatus(CommonConstants.TWELVE_STRING);
sf.setSocialReduceStatus(CommonConstants.SIX_STRING);
socialInfo.setReduceCan(CommonConstants.ZERO_STRING);
dis.setSocialHandleStatus(CommonConstants.THREE_STRING);
}
private void updateSocialByHandle(int flag, TSocialInfo socialInfo, TDispatchInfo dis, TSocialFundInfo sf) {
......@@ -4205,7 +4240,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 派减处理 办理成功才变更为已派减 3 ,办理失败 为4
if (CommonConstants.ONE_STRING.equals(dis.getType())){
String handleStatusTemp;
if (CommonConstants.ZERO_STRING.equals(handleStatus)){
if (CommonConstants.ONE_STRING.equals(handleStatus)){
handleStatusTemp = CommonConstants.THREE_STRING;
}else {
handleStatusTemp = CommonConstants.FOUR_STRING;
......
......@@ -1049,7 +1049,7 @@
/*社保代办理 1.派单审核通过 2.派增(type=0):待办理(social_handle_status='0') or 派减(type=1):已办理完成或部分办理失败 且已派减*/
AND a.social_id is not null
AND a.STATUS = "2"
and (( a.type = '0' AND (s.HANDLE_STATUS = "0" or s.HANDLE_STATUS = "4") ) or ( a.type ='1' AND s.HANDLE_STATUS in ('1','5') and s.REDUCE_CAN = '1'))
and (( a.type = '0' AND (s.HANDLE_STATUS = "0" or s.HANDLE_STATUS = "4") ) or ( a.type ='1' AND s.HANDLE_STATUS in ('1','5','6','3','7') and s.REDUCE_CAN = '1'))
and a.SOCIAL_HANDLE_STATUS in ('0','4')
<!--<if test="tDispatchInfo.status != null and tDispatchInfo.status.trim() != ''">
......
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