Commit 13441935 authored by fangxinjiang's avatar fangxinjiang

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

parents 10d2782f d8c64055
......@@ -118,7 +118,7 @@ public class SocialSoldierExportVo implements Serializable {
@Schema(description = "离职日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("离职日期")
private Date leaveDate;
private String leaveDate;
//@ExcelAttribute(name = "派单项", maxLength = 50, needExport = true)
......
......@@ -558,7 +558,7 @@ public class TDispatchInfoController {
try {
if (Common.isNotNull(requestId)) {
//主动释放锁
return tDispatchInfoService.addApplyHandle(idList,typeSub,handleStatus,handleRemark,socialType,remark,user);
return tDispatchInfoService.addApplyHandle(idList,typeSub,handleStatus,handleRemark,socialType,remark,user, false);
} else {
return R.failed(ResultConstants.NO_GETLOCK_DATA);
}
......@@ -593,7 +593,7 @@ public class TDispatchInfoController {
try {
if (Common.isNotNull(requestId)) {
//主动释放锁
return tDispatchInfoService.importSocialHandler(file.getInputStream(),mId);
return tDispatchInfoService.importSocialHandler(file.getInputStream(),mId, false);
} else {
return R.failed(ResultConstants.NO_GETLOCK_DATA);
}
......@@ -754,7 +754,7 @@ public class TDispatchInfoController {
tDispatchInfo.setAuthSql(tDispatchInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN"));
}
tDispatchInfo.setCreateBy(user.getId());
return tDispatchInfoService.fundImportHandle(file.getInputStream(),tDispatchInfo);
return tDispatchInfoService.fundImportHandle(file.getInputStream(),tDispatchInfo, false);
} else {
return R.failed(ResultConstants.NO_GETLOCK_DATA);
}
......
......@@ -53,7 +53,7 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
R<List<ErrorMessage>> importDiy(InputStream inputStream, String orderId);
R<List<ErrorMessage>> importSocialHandler(InputStream inputStream,String mId);
R<List<ErrorMessage>> importSocialHandler(InputStream inputStream,String mId, boolean isAutoHandle);
void listExport(HttpServletResponse response, TDispatchInfoSearchVo searchVo);
......@@ -81,7 +81,8 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
R<List<ErrorMessage>> addApplyAudit(List<String> ids, String auditStatus, String auditRemark, String remark);
R<List<ErrorMessage>> addApplyHandle(List<String> ids, String typeSub, String handleStatus, String handleRemark, String socialType, String remark, YifuUser user);
// isAutoFlag:是否社保士兵的自动办理,true :是
R<List<ErrorMessage>> addApplyHandle(List<String> ids, String typeSub, String handleStatus, String handleRemark, String socialType, String remark, YifuUser user, boolean isAutoHandle);
/**
* @Description: 社保士兵导出
......@@ -130,7 +131,7 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
**/
R<List<ErrorMessage>> dispatchAdd(TDispatchImportVo importVo);
R<List<ErrorMessage>> fundImportHandle(InputStream inputStream,TDispatchInfo tDispatchInfo);
R<List<ErrorMessage>> fundImportHandle(InputStream inputStream,TDispatchInfo tDispatchInfo, boolean isAutoFlag);
R<Boolean> updateExportSocialFlagById(String id,String status);
......
......@@ -3766,11 +3766,13 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return R.failed("数据异常,派单审核失败!");
}
}
// isAutoFlag:是否社保士兵的自动办理,true :是
@Transactional(rollbackFor = Exception.class)
@ShardingTransactionType(TransactionType.BASE)
@Override
public R<List<ErrorMessage>> addApplyHandle(List<String> ids, String typeSub, String handleStatus,
String handleRemark, String socialType, String remark, YifuUser userAuto) {
public R<List<ErrorMessage>> addApplyHandle(List<String> ids, String typeSub, String handleStatus
, String handleRemark, String socialType, String remark, YifuUser userAuto, boolean isAutoHandle) {
YifuUser user = SecurityUtils.getUser();
if (userAuto != null) {
user = userAuto;
......@@ -3802,7 +3804,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(requestId)) {
try {
List<ErrorMessage> errorInfo = addBatchApplyHandle(null,null,ids, typeSub, user, flag, handleStatus,
Common.isNullToString(handleRemark), socialType, remark);
Common.isNullToString(handleRemark), socialType, remark, isAutoHandle);
if (errorInfo == null || errorInfo.isEmpty()) {
return R.ok(null, "办理成功!");
} else {
......@@ -3849,7 +3851,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Transactional(rollbackFor = Exception.class)
public List<ErrorMessage> addBatchApplyHandle(ConcurrentHashMap<String, String> socialMap,ConcurrentHashMap<String, String> fundMap,
List<String> idsList, String typeSub, YifuUser user
, int flag, String handleStatus, String handleRemark, String socialType, String remark) {
, int flag, String handleStatus, String handleRemark, String socialType, String remark, boolean isAutoHandle) {
List<ErrorMessage> errorList = new ArrayList<>();
if (!Common.isNotNull(idsList)) {
errorList.add(new ErrorMessage(-1, CommonConstants.PARAM_IS_NOT_ERROR));
......@@ -3954,7 +3956,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialInfo.setHandleUserName(user.getNickname());
// 社保办理状态补充判断:
this.setSocialHandleStatus(handleStatus, socialType, flag, socialInfo, dis,sf);
this.setSocialHandleStatus(handleStatus, socialType, flag, socialInfo, dis,sf, isAutoHandle);
socialMapper.updateById(socialInfo);
dis.setSocialHandleRemark(ServiceUtil.ifNullToEmpty(handleRemark));
......@@ -4048,7 +4050,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (CommonConstants.ZERO_STRING.equals(typeSub)) {
if (Common.isNotNull(socialInfo) && Common.isNotNull(socialInfo.getId())) {
// 社保办理状态补充判断:
this.setSocialHandleStatus(handleStatus, socialType, flag, socialInfo, dis,sf);
this.setSocialHandleStatus(handleStatus, socialType, flag, socialInfo, dis,sf, isAutoHandle);
socialInfo.setReduceHandleUser(user.getId());
socialInfo.setReduceHandleTime(now);
//社保派减办理成功才变更社保的办理状态
......@@ -4493,11 +4495,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @return: void
**/
private void setSocialHandleStatus(String handleStatus, String socialType, int flag, TSocialInfo socialInfo
, TDispatchInfo dis, TSocialFundInfo sf) {
, TDispatchInfo dis, TSocialFundInfo sf, boolean isAutoHandle) {
// 办理成功 处理社保相关数据 (直接排除五险)
updateSocialByHandle(flag, socialInfo, dis, sf);
// 批量办理,或者办理选择对应的类型,修改对应的办理状态 (派增派减都改)
this.setSocialSixStatus(handleStatus, socialType, socialInfo,sf, dis);
this.setSocialSixStatus(handleStatus, socialType, socialInfo,sf, dis, isAutoHandle);
boolean handing = CommonConstants.FOUR_STRING.equals(socialInfo.getHandleStatus());
// HandleStatus办理状态 0 未办理 1 全部办理成功(原-已办理) 2 全部办理失败(原-办理失败) 3已派减 4办理中 5部分办理失败
// 派减,审核不通过,社保状态不变更
......@@ -4843,12 +4845,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @return: void
**/
private void setSocialSixStatus(String handleStatus, String socialType, TSocialInfo socialInfo,
TSocialFundInfo sf,
TDispatchInfo dis) {
TSocialFundInfo sf, TDispatchInfo dis, boolean isAutoHandle) {
if (Common.isNotNull(socialType)){
//派增处理
if (CommonConstants.ZERO_STRING.equals(dis.getType())){
if (CommonConstants.ONE_STRING.equals(dis.getAutoFlag()) || CommonConstants.FIVE_STRING.equals(socialInfo.getYgsHandleStatus())) {
if (isAutoHandle || 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())
......@@ -4879,34 +4880,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
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 (CommonConstants.ONE_STRING.equals(dis.getAutoFlag()) || CommonConstants.FIVE_STRING.equals(socialInfo.getYsdHandleStatus())) {
if (isAutoHandle || 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())
......@@ -4938,6 +4914,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
sf.setBigailmentReduceStart(null);
}
}
}
// 单个办理的时候处理派单和社保的办理状态 有办理成功也有办理失败的 为办理中
if ((CommonConstants.ONE_STRING.equals(socialInfo.getPensionHandle())
|| CommonConstants.TWO_STRING.equals(socialInfo.getPensionHandle())
......@@ -4964,7 +4941,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialInfo.setHandleStatus(CommonConstants.FOUR_STRING);
}
}
}
// 派减处理 办理成功才变更为已派减 3 ,办理失败 为4
if (CommonConstants.ONE_STRING.equals(dis.getType())){
String handleStatusTemp;
......@@ -4974,7 +4950,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
handleStatusTemp = CommonConstants.FOUR_STRING;
}
boolean flag = CommonConstants.THREE_STRING.equals(handleStatusTemp);
if (CommonConstants.ONE_STRING.equals(dis.getAutoFlag()) || CommonConstants.FIVE_STRING.equals(socialInfo.getYgsHandleStatus())) {
if (isAutoHandle || 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())) {
......@@ -5027,7 +5003,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}*/
}
}
if (CommonConstants.ONE_STRING.equals(dis.getAutoFlag()) || CommonConstants.FIVE_STRING.equals(socialInfo.getYsdHandleStatus())) {
if (isAutoHandle || 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())) {
......@@ -5880,7 +5856,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Transactional(rollbackFor = Exception.class)
@ShardingTransactionType(TransactionType.BASE)
@Override
public R<List<ErrorMessage>> fundImportHandle(InputStream inputStream,TDispatchInfo tDispatchInfo) {
public R<List<ErrorMessage>> fundImportHandle(InputStream inputStream,TDispatchInfo tDispatchInfo, boolean isAutoFlag) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(user)){
R.failed(CommonConstants.USER_FAIL);
......@@ -5932,7 +5908,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
*/
private void saveData() {
log.info("{}条数据,开始存储数据库!", cachedDataList.size());
fundImportHandle(cachedDataList, errorMessageList,user,tDispatchInfo,map);
fundImportHandle(cachedDataList, errorMessageList,user,tDispatchInfo,map, isAutoFlag);
log.info("存储数据库成功!");
}
}).sheet().doRead();
......@@ -5951,7 +5927,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @return
**/
public void fundImportHandle(List<FundImportHandleVo> excelVOList, List<ErrorMessage> errorMessageList,
YifuUser user,TDispatchInfo dispatchInfo,ConcurrentHashMap<String, String> map) {
YifuUser user,TDispatchInfo dispatchInfo,ConcurrentHashMap<String, String> map, boolean isAutoFlag) {
if (!Common.isNotNull(excelVOList)) {
return;
}
......@@ -6020,7 +5996,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 执行数据插入操作 组装
messageList = addBatchApplyHandle(null,null,Collections.singletonList(dispatch.getId()), CommonConstants.ONE_STRING, user
, flag, handleStatus, (Common.isEmpty(excel.getReasonType())?"":excel.getReasonType()+CommonConstants.COLON_STRING)
+excel.getRemark(), null, excel.getReasonType());
+excel.getRemark(), null, excel.getReasonType(), isAutoFlag);
if (Common.isNotNull(messageList)){
errorMessage = messageList.get(CommonConstants.ZERO_INT);
errorMessage.setData(excel);
......@@ -6045,7 +6021,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Transactional(rollbackFor = Exception.class)
@ShardingTransactionType(TransactionType.BASE)
@Override
public R<List<ErrorMessage>> importSocialHandler(InputStream inputStream,String mId) {
public R<List<ErrorMessage>> importSocialHandler(InputStream inputStream,String mId, boolean isAutoHandle) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(user)){
R.failed(CommonConstants.USER_FAIL);
......@@ -6097,7 +6073,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
*/
private void saveData() {
log.info("{}条数据,开始存储数据库!", cachedDataList.size());
socialImportHandle(cachedDataList, errorMessageList,user,mId,idcardMap);
socialImportHandle(cachedDataList, errorMessageList,user,mId,idcardMap, isAutoHandle);
log.info("存储数据库成功!");
}
}).sheet().doRead();
......@@ -6116,7 +6092,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @return
**/
public void socialImportHandle(List<SocialImportHandleVo> excelVOList, List<ErrorMessage> errorMessageList,
YifuUser user,String mId,ConcurrentHashMap<String, String> map) {
YifuUser user,String mId,ConcurrentHashMap<String, String> map, boolean isAutoHandle) {
if (!Common.isNotNull(excelVOList)) {
return;
}
......@@ -6224,7 +6200,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
// 执行数据插入操作 组装
messageList = addBatchApplyHandle(socialMap,fundMap,Collections.singletonList(dispatch.getId()), CommonConstants.ZERO_STRING, user
, 0, CommonConstants.ONE_STRING, ServiceUtil.ifNullToEmpty(excel.getRemark()), socialSucessType.substring(0, socialSucessType.length() - 1), ServiceUtil.ifNullToEmpty(excel.getRemark()));
, 0, CommonConstants.ONE_STRING, ServiceUtil.ifNullToEmpty(excel.getRemark()), socialSucessType.substring(0, socialSucessType.length() - 1), ServiceUtil.ifNullToEmpty(excel.getRemark()), isAutoHandle);
if (Common.isNotNull(messageList)) {
errorMessage = messageList.get(CommonConstants.ZERO_INT);
errorMessage.setData(excel);
......@@ -6255,7 +6231,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
vo = dispatchInfo.getExcel();
// 执行数据插入操作 组装
messageList = addBatchApplyHandle(socialMap,fundMap,Collections.singletonList(dispatchInfo.getId()), CommonConstants.ZERO_STRING, user
, 1, CommonConstants.TWO_STRING, dispatchInfo.getHandlerRemaek() + ServiceUtil.ifNullToEmpty(vo.getRemark()), dispatchInfo.getSocialFailureType().substring(0, dispatchInfo.getSocialFailureType().length() - 1), dispatchInfo.getHandlerRemaek() + ServiceUtil.ifNullToEmpty(vo.getRemark()));
, 1, CommonConstants.TWO_STRING, dispatchInfo.getHandlerRemaek() + ServiceUtil.ifNullToEmpty(vo.getRemark()), dispatchInfo.getSocialFailureType().substring(0, dispatchInfo.getSocialFailureType().length() - 1), dispatchInfo.getHandlerRemaek() + ServiceUtil.ifNullToEmpty(vo.getRemark()), isAutoHandle);
if (Common.isNotNull(messageList)) {
errorMessage = messageList.get(CommonConstants.ZERO_INT);
errorMessage.setData(vo);
......
......@@ -323,63 +323,6 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
return cellValue;
}
/*public R<List<ErrorMessage>> importDiy(InputStream inputStream, Map<String, TSocialInfo> idCardMap
, Map<String, FailReasonConfig> errorMap) {
List<ErrorMessage> errorMessageList = new ArrayList<>();
ExcelUtil<TSocialSoldierReturnErrorVo> util1 = new ExcelUtil<>(TSocialSoldierReturnErrorVo.class);
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
try {
EasyExcel.read(inputStream, TSocialSoldierReturnErrorVo.class, new ReadListener<TSocialSoldierReturnErrorVo>() {
*//**
* 单次缓存的数据量
*//*
public static final int BATCH_COUNT = CommonConstants.BATCH_COUNT;
*//**
*临时存储
*//*
private List<TSocialSoldierReturnErrorVo> cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT);
@Override
public void invoke(TSocialSoldierReturnErrorVo data, AnalysisContext context) {
ReadRowHolder readRowHolder = context.readRowHolder();
Integer rowIndex = readRowHolder.getRowIndex();
data.setRowIndex(rowIndex + 1);
ErrorMessage errorMessage = util1.checkEntity(data, data.getRowIndex());
if (Common.isNotNull(errorMessage)) {
errorMessageList.add(errorMessage);
} else {
cachedDataList.add(data);
}
if (cachedDataList.size() >= BATCH_COUNT) {
saveData();
// 存储完成清理 list
cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT);
}
}
@Override
public void doAfterAllAnalysed(AnalysisContext context) {
saveData();
}
*//**
* 加上存储数据库
*//*
private void saveData() {
log.info("{}条数据,开始存储数据库!", cachedDataList.size());
importTSocialInfo(cachedDataList, idCardMap, errorMap);
log.info("存储数据库成功!");
}
}).sheet().doRead();
} catch (Exception e) {
log.error(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR, e);
return R.failed(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR);
}
return R.ok(errorMessageList);
}*/
private void importTSocialInfo(List<TSocialSoldierReturnErrorVo> excelVOList, Map<String, TSocialInfo> idCardMap
, Map<String, FailReasonConfig> errorMap, String doAddId) {
// 个性化校验逻辑
......@@ -460,12 +403,12 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
// 过期自动变为终止
if (CommonConstants.ONE_STRING.equals(socialInfo.getYgsOverDueFlag())) {
updateSocial.setYgsRemarkOld("已过期,自动中止办理!");
handleRemark = "已过期,自动中止办理!";
updateSocial.setYgsRemarkOld(handleRemark);
ygsHandleStatus = CommonConstants.FOUR_STRING;
ygsFailList = new ArrayList<>();
ygsFailList.add(socialInfo.getDispatchId());
handleRemark = "社保士兵自动办理失败:已过期,自动中止办理!";
remark = "社保士兵自动办理失败!!:已过期,自动中止办理!";
remark = handleRemark;
} else if (Common.isNotNull(excel.getMsg())) {
// 如果找到了失败原因配置:
failConfig = getConfig(excel.getMsg(),errorMap);
......@@ -481,14 +424,14 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} else {
title +="派减";
}
title +="派减养老、工伤、失业办理失败!继续办理";
this.doSocialTAuditInfo(socialInfo, title, "养老、工伤、失业办理失败!继续办理:"+excel.getMsg(), excel.getMsg(),user);
title +="养老、工伤、失业办理失败!继续办理:"+failConfig.getSimpleReason();
this.doSocialTAuditInfo(socialInfo, title, title, failConfig.getSimpleReason(),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();
handleRemark = "中止办理:"+failConfig.getSimpleReason();
remark = "中止办理:" + failConfig.getSimpleReason();
} else if (CommonConstants.THREE_STRING.equals(failConfig.getReplay())) {
ygsHandleStatus = CommonConstants.FIVE_STRING;
......@@ -498,11 +441,19 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} else {
title +="派减";
}
title +="派减养老、工伤、失业办理失败!人工处理";
this.doSocialTAuditInfo(socialInfo, title, "养老、工伤、失业办理失败!人工处理:"+excel.getMsg(), excel.getMsg(),user);
title +="养老、工伤、失业办理失败!人工处理:"+failConfig.getSimpleReason();
this.doSocialTAuditInfo(socialInfo, title, title, failConfig.getSimpleReason(),user);
}
} else {
ygsHandleStatus = CommonConstants.FIVE_STRING;
// 新增流程进展明细
if (CommonConstants.ZERO_STRING.equals(socialInfo.getDispatchType())) {
title +="派增";
} else {
title +="派减";
}
title +="养老、工伤、失业办理失败!人工处理:"+excel.getMsg();
this.doSocialTAuditInfo(socialInfo, title, "养老、工伤、失业办理失败!人工处理:"+excel.getMsg(), excel.getMsg(),user);
}
}
}
......@@ -529,12 +480,12 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
updateSocial.setYsdRemarkOld(excel.getMsg());
// 过期自动变为终止
if (CommonConstants.ONE_STRING.equals(socialInfo.getYsdOverDueFlag())) {
updateSocial.setYsdRemarkOld("已过期,自动中止办理!");
handleRemark = "已过期,自动中止办理!";
updateSocial.setYsdRemarkOld(handleRemark);
ysdHandleStatus = CommonConstants.FOUR_STRING;
ysdFailList = new ArrayList<>();
ysdFailList.add(socialInfo.getDispatchId());
handleRemark = "社保士兵自动办理失败:已过期,自动中止办理!";
remark = "社保士兵自动办理失败!!:已过期,自动中止办理!";
remark = handleRemark;
} else if (Common.isNotNull(excel.getMsg())) {
// 如果找到了失败原因配置:
failConfig = getConfig(excel.getMsg(),errorMap);
......@@ -551,14 +502,14 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} else {
title +="派减";
}
title +="派减医疗、生育、大病办理失败!继续办理";
this.doSocialTAuditInfo(socialInfo, title, "医疗、生育、大病办理失败!继续办理:"+excel.getMsg(), excel.getMsg(),user);
title +="医疗、生育、大病办理失败!继续办理:"+failConfig.getSimpleReason();
this.doSocialTAuditInfo(socialInfo, title, title, failConfig.getSimpleReason(),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();
handleRemark = "中止办理:"+failConfig.getSimpleReason();
remark = "中止办理:" + failConfig.getSimpleReason();
} else if (CommonConstants.THREE_STRING.equals(failConfig.getReplay())) {
ysdHandleStatus = CommonConstants.FIVE_STRING;
// 新增流程进展明细
......@@ -567,11 +518,19 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} else {
title +="派减";
}
title +="派减医疗、生育、大病办理失败!人工处理";
this.doSocialTAuditInfo(socialInfo, title, "医疗、生育、大病办理失败!人工处理:"+excel.getMsg(), excel.getMsg(),user);
title +="医疗、生育、大病办理失败!人工处理:"+failConfig.getSimpleReason();
this.doSocialTAuditInfo(socialInfo, title, "医疗、生育、大病办理失败!人工处理:"+failConfig.getSimpleReason(), failConfig.getSimpleReason(),user);
}
} else {
ysdHandleStatus = CommonConstants.FIVE_STRING;
// 新增流程进展明细
if (CommonConstants.ZERO_STRING.equals(socialInfo.getDispatchType())) {
title +="派增";
} else {
title +="派减";
}
title +="医疗、生育、大病办理失败!人工处理:"+excel.getMsg();
this.doSocialTAuditInfo(socialInfo, title, "医疗、生育、大病办理失败!人工处理:"+excel.getMsg(), excel.getMsg(),user);
}
}
}
......@@ -610,48 +569,6 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
}
}
}
/*
// 处理社保办理成功或失败,
if (!updateSocialList.isEmpty()) {
tSocialInfoService.updateBatchById(updateSocialList);
}
// 处理社保办理成功后的状态同步-成功
String typeSub = CommonConstants.ZERO_STRING;
String handleStatus = CommonConstants.ONE_STRING;
String handleRemark = "社保士兵自动办理成功!";
String remark = "社保士兵自动办理成功!!";
String socialType = "1,4,3";
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);
if (!ygsList.isEmpty()) {
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;
handleRemark = "社保士兵自动办理失败!";
remark = "社保士兵自动办理失败!!";
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);
}*/
}
/**
......@@ -682,7 +599,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
**/
public R<List<ErrorMessage>> doSocialAndDispatch(List<String> idList, String typeSub, String handleStatus
, String handleRemark, String socialType, String remark, YifuUser user) {
return tDispatchInfoService.addApplyHandle(idList, typeSub, handleStatus, handleRemark, socialType, remark, user);
return tDispatchInfoService.addApplyHandle(idList, typeSub, handleStatus, handleRemark, socialType, remark, user, true);
}
/**
......
......@@ -54,4 +54,4 @@ spring:
#社保士兵相关属性配置
soldier:
authorizations : Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJmODA2ZjRlYzYzZjY0NjVlOGFlZjRmZmVlOTYwMzcxNiIsInN1YiI6IjIiLCJ1c2VyX3Bob25lIjoiIiwidXNlcl90eXBlIjoiMTAiLCJ1c2VyX25hbWUiOiLmtYvor5UiLCJpc19hcHAiOiIxIiwiVXNlcklkIjoiMiIsIm5iZiI6MTcxMjg5Mjk1OCwiZXhwIjoxNzIzMjYwOTU4LCJpYXQiOjE3MTI4OTI5NTh9.oTmhLfv1tLq8aPOfO3LeqM1IDYT76YGXkqpz3dwBX4M
urlPre : http://172.16.24.66:55555
\ No newline at end of file
urlPre : http://36.7.147.29:55555
\ No newline at end of file
......@@ -1230,7 +1230,7 @@
case s.ygs_Handle_Status when '0' then '无' when '1' then '待办理' when '2' then '自动办理中' when '3' then '继续办理' when '4' then '中止办理' when '5' then '人工处理' when '6' then '成功' else '-' end ygsHandleStatus,
case s.ysd_Handle_Status when '0' then '无' when '1' then '待办理' when '2' then '自动办理中' when '3' then '继续办理' when '4' then '中止办理' when '5' then '人工处理' when '6' then '成功' else '-' end ysdHandleStatus,
s.YGS_REMARK ygsRemark,s.YSD_REMARK ysdRemark,
a.DISPATCH_CODE dispatchCode,
a.APPLY_NO dispatchCode,
a.EMP_NAME empName,
a.EMP_IDCARD empIdcard,
emp_natrue.label empType,
......@@ -1241,7 +1241,7 @@
concat(if(ifnull(h.id,0) != '0',sp1.AREA_NAME,sp2.AREA_NAME),
ifnull(if(ifnull(h.id,0) != '0',sc1.AREA_NAME,sc2.AREA_NAME),''),
ifnull(if(ifnull(h.id,0) != '0',st1.AREA_NAME,st2.AREA_NAME),'')) socialProvince,
a.LEAVE_DATE leaveDate,
DATE_FORMAT(a.LEAVE_DATE,'%Y-%m-%d') leaveDate,
a.DISPATCH_ITEM dispatchItem,
a.CREATE_NAME createUserName,
a.ORGAN_NAME organName,
......@@ -1707,7 +1707,7 @@
AND a.STATUS = "2"
and (( a.type = '0' AND (s.HANDLE_STATUS = "0" or s.HANDLE_STATUS = "4") ) or ( a.type ='1' AND (if(ifnull(h.id,0) != '0',h.HANDLE_STATUS,s.HANDLE_STATUS) in ('1','5','6','3','7') or (s.HANDLE_STATUS in ('1','5','6','3','7') and s.REDUCE_CAN = '1')) ))
and a.SOCIAL_HANDLE_STATUS in ('0','4')
and (s.YGS_HANDLE_STATUS in ('0','5') or s.YSD_HANDLE_STATUS in ('0','5') )
and (a.auto_flag='1' or s.YGS_HANDLE_STATUS ='5' or s.YSD_HANDLE_STATUS = '5' )
<!--<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