Commit b761d6ee authored by fangxinjiang's avatar fangxinjiang

代码优化-fxj

parent 4304a362
......@@ -152,6 +152,15 @@ public class TEmployeeInsurancePreController {
public void export(HttpServletResponse response, @RequestBody TEmployeeInsurancePreSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
//无查询条件的时候直接 默认传非 已完成的数据
if (Common.isEmpty(searchVo.getProcessStatus())){
searchVo.setStatusList(CommonConstants.processListPreArchivesStatus);
}else {
//有查询条件的时候 按查询条件查询 后面有判断statusList 为空默认的情况
List<String> statusList = new ArrayList<>();
statusList.add(searchVo.getProcessStatus());
searchVo.setStatusList(statusList);
}
tEmployeeInsurancePreService.listExport(response,searchVo);
}
......
......@@ -192,6 +192,16 @@ public class TDispatchInfoPreController {
public void export(HttpServletResponse response, @RequestBody TDispatchInfoPreSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
//typeSuB 0 社保 1 公积金
searchVo.setTypeSub(CommonConstants.ZERO_STRING);
// 主逻辑优化
if (Common.isEmpty(searchVo.getProcessStatus())) {
String typeSub = null==searchVo.getTypeSub()?CommonConstants.EMPTY_STRING:searchVo.getTypeSub();
List<String> statusList = STATUS_MAP.get(typeSub);
if (statusList != null) {
searchVo.setStatusList(new ArrayList<>(statusList)); // 拷贝以防止外部修改
}
}
tDispatchInfoPreService.listExport(response, searchVo);
}
......@@ -207,6 +217,16 @@ public class TDispatchInfoPreController {
public void exportFund(HttpServletResponse response, @RequestBody TDispatchInfoPreSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
//typeSuB 0 社保 1 公积金
searchVo.setTypeSub(CommonConstants.ONE_STRING);
// 主逻辑优化
if (Common.isEmpty(searchVo.getProcessStatus())) {
String typeSub = null==searchVo.getTypeSub()?CommonConstants.EMPTY_STRING:searchVo.getTypeSub();
List<String> statusList = STATUS_MAP.get(typeSub);
if (statusList != null) {
searchVo.setStatusList(new ArrayList<>(statusList)); // 拷贝以防止外部修改
}
}
tDispatchInfoPreService.listExportFund(response, searchVo);
}
......
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