Commit 63354f37 authored by fangxinjiang's avatar fangxinjiang

社保办理无对应办理项是 不生成办理记录。 主要是针对批量办理的场景

parent ccb00d91
......@@ -3079,7 +3079,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
StringBuilder temp = new StringBuilder();
// 预估库同步社保还是公积金的标志,0:全部;1仅社保;2仅公积金
int forecastFlag = CommonConstants.ZERO_INT;
// auditFlag 表示社保办理无办理项是不保存
boolean auditFlag = true;
for (TDispatchInfo dis : disList) {
auditFlag = true;
if (CommonConstants.ZERO_STRING.equals(typeSub)) {
forecastFlag = CommonConstants.ONE_INT;
} else if (CommonConstants.ONE_STRING.equals(typeSub)) {
......@@ -3129,6 +3132,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialMapper.updateById(socialInfo);
dis.setSocialHandleRemark(ServiceUtil.ifNullToEmpty(handleRemark));
auditFlag = Common.isNotNull(Common.isNullToString(socialTypeRemark));
if (auditFlag){
auditInfo.setType(CommonConstants.ONE_STRING);
if (CommonConstants.ZERO_INT == flag) {
temp.setLength(CommonConstants.ZERO_INT);
......@@ -3144,6 +3149,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
initAuditInfo(auditInfo, ( temp + ServiceUtil.ifNullToEmpty(handleRemark)), CommonConstants.FOUR_STRING, user, temp.toString(), remark);
}
auditInfo.setSocialId(dis.getId());
}
} else {
errorList.add(new ErrorMessage(-1, "找不到对应员工社保派增派单数据:" + dis.getEmpName()));
continue;
......@@ -3362,7 +3368,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//新增办理记录信息
auditInfo.setDispatchInfoId(dis.getId());
auditInfo.setEmpIdcard(dis.getEmpIdcard());
if (auditFlag){
auditInfoMapper.insert(auditInfo);
}
baseMapper.updateById(dis);
socialFundMapper.updateById(sf);
//1.派增办理失败 刷新预估数据
......
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