Commit 1bcf05c9 authored by hongguangwu's avatar hongguangwu

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

parents 6be9e8ac 7948c4a0
...@@ -6,6 +6,8 @@ import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationCustomerUserUpdateVo; ...@@ -6,6 +6,8 @@ import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationCustomerUserUpdateVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre; import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPre; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPre;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseSearchVO; import com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseSearchVO;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
...@@ -23,6 +25,7 @@ import org.springframework.security.access.prepost.PreAuthorize; ...@@ -23,6 +25,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -53,6 +56,15 @@ public class TEmployeeInsurancePreController { ...@@ -53,6 +56,15 @@ public class TEmployeeInsurancePreController {
public R<IPage<TEmployeeInsurancePre>> getTEmployeeInsurancePrePage(Page<TEmployeeInsurancePre> page, @RequestBody TEmployeeInsurancePreSearchVo tEmployeeInsurancePre) { public R<IPage<TEmployeeInsurancePre>> getTEmployeeInsurancePrePage(Page<TEmployeeInsurancePre> page, @RequestBody TEmployeeInsurancePreSearchVo tEmployeeInsurancePre) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tEmployeeInsurancePre); menuUtil.setAuthSql(user, tEmployeeInsurancePre);
//无查询条件的时候直接 默认传非 已完成的数据
if (Common.isEmpty(tEmployeeInsurancePre.getProcessStatus())){
tEmployeeInsurancePre.setStatusList(CommonConstants.processListPreArchivesStatus);
}else {
//有查询条件的时候 按查询条件查询 后面有判断statusList 为空默认的情况
List<String> statusList = new ArrayList<>();
statusList.add(tEmployeeInsurancePre.getProcessStatus());
tEmployeeInsurancePre.setStatusList(statusList);
}
return new R<>(tEmployeeInsurancePreService.getTEmployeeInsurancePrePage(page,tEmployeeInsurancePre)); return new R<>(tEmployeeInsurancePreService.getTEmployeeInsurancePrePage(page,tEmployeeInsurancePre));
} }
......
...@@ -24,7 +24,7 @@ import org.springframework.security.access.prepost.PreAuthorize; ...@@ -24,7 +24,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.*;
/** /**
* 社保待购买表 * 社保待购买表
...@@ -41,6 +41,36 @@ public class TDispatchInfoPreController { ...@@ -41,6 +41,36 @@ public class TDispatchInfoPreController {
private final TDispatchInfoPreService tDispatchInfoPreService; private final TDispatchInfoPreService tDispatchInfoPreService;
private final MenuUtil menuUtil; private final MenuUtil menuUtil;
// 提取公共方法用于构建状态列表
private static final Map<String, List<String>> STATUS_MAP = new HashMap<>();
static {
// 社保购买状态列表:社保购买状态,0待确认,1待派单,2派单失败,3待审核,4审核不通过,5待办理,6办理中,7办理成功,8办理失败,9部分办理失败
STATUS_MAP.put(CommonConstants.ZERO_STRING, Arrays.asList(
CommonConstants.ZERO_STRING,
CommonConstants.ONE_STRING,
CommonConstants.TWO_STRING,
CommonConstants.THREE_STRING,
CommonConstants.FOUR_STRING,
CommonConstants.FIVE_STRING,
CommonConstants.SIX_STRING,
CommonConstants.EIGHT_STRING,
CommonConstants.NINE_STRING
));
// 公积金购买状态列表:公积金购买状态,0待确认,1待派单,2派单失败,3待审核,4审核不通过,5待办理,7办理成功,8办理失败
STATUS_MAP.put(CommonConstants.ONE_STRING, Arrays.asList(
CommonConstants.ZERO_STRING,
CommonConstants.ONE_STRING,
CommonConstants.TWO_STRING,
CommonConstants.THREE_STRING,
CommonConstants.FOUR_STRING,
CommonConstants.FIVE_STRING,
CommonConstants.EIGHT_STRING
));
}
/** /**
* 简单分页查询 * 简单分页查询
...@@ -60,6 +90,15 @@ public class TDispatchInfoPreController { ...@@ -60,6 +90,15 @@ public class TDispatchInfoPreController {
}else if (!Common.isEmpty(tDispatchInfoPre.getTypeSub())){ }else if (!Common.isEmpty(tDispatchInfoPre.getTypeSub())){
tDispatchInfoPre.setTypeSub(tDispatchInfoPre.getTypeSub()); tDispatchInfoPre.setTypeSub(tDispatchInfoPre.getTypeSub());
} }
// 主逻辑优化
if (Common.isEmpty(tDispatchInfoPre.getProcessStatus())) {
String typeSub = null==tDispatchInfoPre.getTypeSub()?CommonConstants.EMPTY_STRING:tDispatchInfoPre.getTypeSub();
List<String> statusList = STATUS_MAP.get(typeSub);
if (statusList != null) {
tDispatchInfoPre.setStatusList(new ArrayList<>(statusList)); // 拷贝以防止外部修改
}
}
return new R<>(tDispatchInfoPreService.getTDispatchInfoPrePage(page, tDispatchInfoPre)); return new R<>(tDispatchInfoPreService.getTDispatchInfoPrePage(page, tDispatchInfoPre));
} }
...@@ -228,6 +267,11 @@ public class TDispatchInfoPreController { ...@@ -228,6 +267,11 @@ public class TDispatchInfoPreController {
public R getListCount(@RequestBody TDispatchInfoPreSearchVo searchVo) { public R getListCount(@RequestBody TDispatchInfoPreSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo); menuUtil.setAuthSql(user, searchVo);
//社保购买状态,0待确认,1待派单,2派单失败,3待审核,4审核不通过,5待办理,6办理中,7办理成功,8办理失败,9部分办理失败
List<String> statusList = STATUS_MAP.get(CommonConstants.ZERO_STRING);
if (statusList != null) {
searchVo.setStatusList(new ArrayList<>(statusList)); // 拷贝以防止外部修改
}
return R.ok(tDispatchInfoPreService.getDispatchInfoCount(searchVo)); return R.ok(tDispatchInfoPreService.getDispatchInfoCount(searchVo));
} }
...@@ -241,6 +285,11 @@ public class TDispatchInfoPreController { ...@@ -241,6 +285,11 @@ public class TDispatchInfoPreController {
public R getListCountFund(@RequestBody TDispatchInfoPreSearchVo searchVo) { public R getListCountFund(@RequestBody TDispatchInfoPreSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo); menuUtil.setAuthSql(user, searchVo);
// 公积金购买状态,0待确认,1待派单,2派单失败,3待审核,4审核不通过,5待办理,7办理成功,8办理失败
List<String> statusList = STATUS_MAP.get(CommonConstants.ONE_STRING);
if (statusList != null) {
searchVo.setStatusList(new ArrayList<>(statusList)); // 拷贝以防止外部修改
}
return R.ok(tDispatchInfoPreService.getDispatchInfoFundCount(searchVo)); return R.ok(tDispatchInfoPreService.getDispatchInfoFundCount(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