Commit 129a6fc5 authored by hongguangwu's avatar hongguangwu

MVP1.6.4-优化社保士兵, 提示语等

parent be3687d0
...@@ -44,6 +44,7 @@ import org.springframework.web.multipart.commons.CommonsMultipartFile; ...@@ -44,6 +44,7 @@ import org.springframework.web.multipart.commons.CommonsMultipartFile;
import java.io.*; import java.io.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -102,7 +103,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap ...@@ -102,7 +103,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
public MultipartFile getFile(List<SocialSoldierYgsAddVo> list, int type) { public MultipartFile getFile(List<SocialSoldierYgsAddVo> list, int type) {
if (list != null) { if (list != null) {
String fileName = "socialSoldierFile" + DateUtil.getThisTime() + CommonConstants.XLSX; String fileName = "soldierFile" + DateUtil.getThisTime() + new Date().getTime() + CommonConstants.XLSX;
ExcelWriter excelWriter = EasyExcelFactory.write(fileName).build(); ExcelWriter excelWriter = EasyExcelFactory.write(fileName).build();
WriteSheet writeSheet = EasyExcelFactory.writerSheet("社保明细").head(SocialSoldierYgsAddVo.class).build(); WriteSheet writeSheet = EasyExcelFactory.writerSheet("社保明细").head(SocialSoldierYgsAddVo.class).build();
...@@ -166,7 +167,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap ...@@ -166,7 +167,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
} }
MultipartFile file = this.getFile(ygsAddlist, 1); MultipartFile file = this.getFile(ygsAddlist, 1);
if (Common.isNotNull(file)) { if (Common.isNotNull(file)) {
log.error("社保增员"); log.error("社保增员"+file.getOriginalFilename());
this.getOneAppGetModuleDetail(socialIdList, file, "社保增员"); this.getOneAppGetModuleDetail(socialIdList, file, "社保增员");
} }
} }
...@@ -182,7 +183,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap ...@@ -182,7 +183,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
} }
MultipartFile file = this.getFile(ygsReducelist, 2); MultipartFile file = this.getFile(ygsReducelist, 2);
if (Common.isNotNull(file)) { if (Common.isNotNull(file)) {
log.error("社保减员"); log.error("社保减员"+file.getOriginalFilename());
this.getOneAppGetModuleDetail(socialIdList, file, "社保减员"); this.getOneAppGetModuleDetail(socialIdList, file, "社保减员");
} }
} }
...@@ -198,7 +199,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap ...@@ -198,7 +199,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
} }
MultipartFile file = this.getFile(ysdAddlist, 3); MultipartFile file = this.getFile(ysdAddlist, 3);
if (Common.isNotNull(file)) { if (Common.isNotNull(file)) {
log.error("医保增员"); log.error("医保增员"+file.getOriginalFilename());
this.getOneAppGetModuleDetail(socialIdList, file, "医保增员"); this.getOneAppGetModuleDetail(socialIdList, file, "医保增员");
} }
} }
...@@ -214,7 +215,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap ...@@ -214,7 +215,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
} }
MultipartFile file = this.getFile(ysdReducelist, 4); MultipartFile file = this.getFile(ysdReducelist, 4);
if (Common.isNotNull(file)) { if (Common.isNotNull(file)) {
log.error("医保减员"); log.error("医保减员"+file.getOriginalFilename());
this.getOneAppGetModuleDetail(socialIdList, file, "医保减员"); this.getOneAppGetModuleDetail(socialIdList, file, "医保减员");
} }
} }
......
...@@ -397,8 +397,16 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -397,8 +397,16 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
ygsList.add(socialInfo.getDispatchId()); ygsList.add(socialInfo.getDispatchId());
handleRemark = "社保士兵自动办理成功!"; handleRemark = "社保士兵自动办理成功!";
remark = "社保士兵自动办理成功!!"; remark = "社保士兵自动办理成功!!";
updateSocial.setYgsRemark(handleRemark); if (Common.isNotNull(excel.getMsg())) {
updateSocial.setYgsRemarkOld(handleRemark); failConfig = getConfig(excel.getMsg(),errorMap);
if (failConfig != null) {
updateSocial.setYgsRemark(failConfig.getSimpleReason());
}
updateSocial.setYgsRemarkOld(handleRemark);
} else {
updateSocial.setYgsRemark(handleRemark);
updateSocial.setYgsRemarkOld(handleRemark);
}
} else { } else {
updateSocial.setYgsRemark(excel.getMsg()); updateSocial.setYgsRemark(excel.getMsg());
updateSocial.setYgsRemarkOld(excel.getMsg()); updateSocial.setYgsRemarkOld(excel.getMsg());
...@@ -477,8 +485,16 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -477,8 +485,16 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
ysdList.add(socialInfo.getDispatchId()); ysdList.add(socialInfo.getDispatchId());
handleRemark = "社保士兵自动办理成功!"; handleRemark = "社保士兵自动办理成功!";
remark = "社保士兵自动办理成功!!"; remark = "社保士兵自动办理成功!!";
updateSocial.setYsdRemark(handleRemark); if (Common.isNotNull(excel.getMsg())) {
updateSocial.setYsdRemarkOld(handleRemark); failConfig = getConfig(excel.getMsg(),errorMap);
if (failConfig != null) {
updateSocial.setYsdRemark(failConfig.getSimpleReason());
}
updateSocial.setYsdRemarkOld(handleRemark);
} else {
updateSocial.setYsdRemark(handleRemark);
updateSocial.setYsdRemarkOld(handleRemark);
}
} else { } else {
updateSocial.setYsdRemark(excel.getMsg()); updateSocial.setYsdRemark(excel.getMsg());
updateSocial.setYsdRemarkOld(excel.getMsg()); updateSocial.setYsdRemarkOld(excel.getMsg());
...@@ -582,9 +598,11 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -582,9 +598,11 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
* @return: com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig * @return: com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig
**/ **/
private FailReasonConfig getConfig(String msg, Map<String, FailReasonConfig> errorMap) { private FailReasonConfig getConfig(String msg, Map<String, FailReasonConfig> errorMap) {
for (Map.Entry<String, FailReasonConfig> config : errorMap.entrySet()) { if (errorMap != null) {
if (msg.contains(config.getKey())) { for (Map.Entry<String, FailReasonConfig> config : errorMap.entrySet()) {
return config.getValue(); if (msg.contains(config.getKey())) {
return config.getValue();
}
} }
} }
return null; return null;
......
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