Commit 0a9d2c8a authored by 查济's avatar 查济

Merge branch 'feature-zhaji' into 'develop'

Feature zhaji

See merge request fangxinjiang/yifu!240
parents 065e5ebd d5491491
...@@ -91,7 +91,10 @@ public interface CommonConstants { ...@@ -91,7 +91,10 @@ public interface CommonConstants {
*/ */
Integer SUCCESS = 200; Integer SUCCESS = 200;
/**
* 商险导出最大值
*/
Integer TWENTY_THOUSAND = 20000;
/** /**
* 失败标记 * 失败标记
......
...@@ -1066,6 +1066,17 @@ public class InsurancesConstants { ...@@ -1066,6 +1066,17 @@ public class InsurancesConstants {
public static final String SYSTEM_TRIGGER = "系统触发"; public static final String SYSTEM_TRIGGER = "系统触发";
/**
* 一次性导出不可超过20000条,请分批导出
*/
public static final String EXPORT_TOO_LONG = "一次性导出不可超过20000条,请分批导出";
/**
* 一次性导入不可超过20000条,请分批导入
*/
public static final String IMPORT_TOO_LONG = "一次性导入不可超过20000条,请分批导入";
......
...@@ -355,8 +355,8 @@ public class TInsuranceDetailController { ...@@ -355,8 +355,8 @@ public class TInsuranceDetailController {
@Operation(summary = "已投保列表不分页查询", description = "已投保列表不分页查询") @Operation(summary = "已投保列表不分页查询", description = "已投保列表不分页查询")
@PostMapping("/getInsuredList") @PostMapping("/getInsuredList")
@PreAuthorize("@pms.hasPermission('insurance_custserve_insured_export')") @PreAuthorize("@pms.hasPermission('insurance_custserve_insured_export')")
public R<List<InsuredListVo>> getInsuredList(@RequestBody InsuredParam param) { public R getInsuredList(@RequestBody InsuredParam param) {
return R.ok(tInsuranceDetailService.getInsuredList(param),"查询成功"); return tInsuranceDetailService.getInsuredList(param);
} }
/** /**
...@@ -382,8 +382,8 @@ public class TInsuranceDetailController { ...@@ -382,8 +382,8 @@ public class TInsuranceDetailController {
@Operation(summary = "已减员列表导出", description = "已减员列表导出") @Operation(summary = "已减员列表导出", description = "已减员列表导出")
@PostMapping("/getInsuranceRefundList") @PostMapping("/getInsuranceRefundList")
@PreAuthorize("@pms.hasPermission('insurance_custserve_reduction_export')") @PreAuthorize("@pms.hasPermission('insurance_custserve_reduction_export')")
public R<List<InsuranceRefundListVo>> getInsuranceRefundList(@RequestBody InsuranceRefundParam param) { public R getInsuranceRefundList(@RequestBody InsuranceRefundParam param) {
return R.ok(tInsuranceDetailService.getInsuranceRefundList(param)); return tInsuranceDetailService.getInsuranceRefundList(param);
} }
...@@ -410,7 +410,7 @@ public class TInsuranceDetailController { ...@@ -410,7 +410,7 @@ public class TInsuranceDetailController {
@Operation(summary = "导出减员列表", description = "导出减员列表") @Operation(summary = "导出减员列表", description = "导出减员列表")
@PostMapping("/getInsuranceRefundHandlingList") @PostMapping("/getInsuranceRefundHandlingList")
@PreAuthorize("@pms.hasPermission('handle_down_export')") @PreAuthorize("@pms.hasPermission('handle_down_export')")
public R<List<RefundExportListVo>> getInsuranceRefundHandlingList(@RequestBody RefundExportListParam param) { public R getInsuranceRefundHandlingList(@RequestBody RefundExportListParam param) {
return tInsuranceDetailService.getInsuranceRefundHandlingList(param); return tInsuranceDetailService.getInsuranceRefundHandlingList(param);
} }
......
...@@ -206,7 +206,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -206,7 +206,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @param param 查询参数 * @param param 查询参数
* @return {@link List< InsuredListVo>} * @return {@link List< InsuredListVo>}
*/ */
List<InsuredListVo> getInsuredList(InsuredParam param); R getInsuredList(InsuredParam param);
/** /**
* 已减员列表分页查询 * 已减员列表分页查询
...@@ -225,7 +225,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -225,7 +225,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @param param 查询参数 * @param param 查询参数
* @return {@link List< InsuranceRefundListVo >} * @return {@link List< InsuranceRefundListVo >}
*/ */
List<InsuranceRefundListVo> getInsuranceRefundList(InsuranceRefundParam param); R getInsuranceRefundList(InsuranceRefundParam param);
/** /**
* 减员办理列表分页查询 * 减员办理列表分页查询
......
...@@ -3110,6 +3110,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3110,6 +3110,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if(!Common.isNotEmpty(insuranceRefundCheckList)){ if(!Common.isNotEmpty(insuranceRefundCheckList)){
return R.failed("当前导入的减员信息为空"); return R.failed("当前导入的减员信息为空");
} }
if(insuranceRefundCheckList.size() > CommonConstants.TWENTY_THOUSAND){
return R.failed(InsurancesConstants.IMPORT_TOO_LONG);
}
Map<String, List<InsuranceRefundCheck>> refundMap = checkInsuranceRefundList(insuranceRefundCheckList,user); Map<String, List<InsuranceRefundCheck>> refundMap = checkInsuranceRefundList(insuranceRefundCheckList,user);
List<InsuranceRefundCheck> successList = refundMap.get("successList"); List<InsuranceRefundCheck> successList = refundMap.get("successList");
List<TInsuranceOperate> operateList = new ArrayList<>(); List<TInsuranceOperate> operateList = new ArrayList<>();
...@@ -3198,17 +3201,20 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3198,17 +3201,20 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link List< InsuredListVo>} * @return {@link List< InsuredListVo>}
*/ */
@Override @Override
public List<InsuredListVo> getInsuredList(InsuredParam param) { public R getInsuredList(InsuredParam param) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
List<String> deptList = getDeptNoList(user); List<String> deptList = getDeptNoList(user);
List<InsuredListVo> insuredList = new ArrayList<>(); List<InsuredListVo> insuredList = new ArrayList<>();
if (CollectionUtils.isEmpty(deptList)){ if (CollectionUtils.isEmpty(deptList)){
return insuredList; return R.ok(insuredList);
} }
param.setDeptNoList(deptList); param.setDeptNoList(deptList);
param.setDeptNoList(deptList); param.setDeptNoList(deptList);
insuredList = this.baseMapper.getInsuredList(param); insuredList = this.baseMapper.getInsuredList(param);
if (CollectionUtils.isNotEmpty(insuredList)){ if (CollectionUtils.isNotEmpty(insuredList)){
if(insuredList.size() > CommonConstants.TWENTY_THOUSAND){
return R.failed(InsurancesConstants.IMPORT_TOO_LONG);
}
//根据项目编码获取项目名称 //根据项目编码获取项目名称
List<String> collect = insuredList.stream().map(InsuredListVo::getDeptNo).distinct().collect(Collectors.toList()); List<String> collect = insuredList.stream().map(InsuredListVo::getDeptNo).distinct().collect(Collectors.toList());
R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect); R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
...@@ -3224,7 +3230,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3224,7 +3230,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
} }
} }
return insuredList; return R.ok(insuredList);
} }
/** /**
...@@ -3271,16 +3277,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3271,16 +3277,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link List< InsuranceRefundListVo >} * @return {@link List< InsuranceRefundListVo >}
*/ */
@Override @Override
public List<InsuranceRefundListVo> getInsuranceRefundList(InsuranceRefundParam param) { public R getInsuranceRefundList(InsuranceRefundParam param) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
List<String> deptNoList = getDeptNoList(user); List<String> deptNoList = getDeptNoList(user);
List<InsuranceRefundListVo> pageList = new ArrayList<>(); List<InsuranceRefundListVo> pageList = new ArrayList<>();
if(CollectionUtils.isEmpty(deptNoList)){ if(CollectionUtils.isEmpty(deptNoList)){
return pageList; return R.ok(pageList);
} }
param.setDeptNoList(deptNoList); param.setDeptNoList(deptNoList);
List<InsuranceRefundListVo> insuranceRefundList = this.baseMapper.getInsuranceRefundList(param); List<InsuranceRefundListVo> insuranceRefundList = this.baseMapper.getInsuranceRefundList(param);
if (CollectionUtils.isNotEmpty(insuranceRefundList)){ if (CollectionUtils.isNotEmpty(insuranceRefundList)){
if(insuranceRefundList.size() > CommonConstants.TWENTY_THOUSAND){
return R.failed(InsurancesConstants.EXPORT_TOO_LONG);
}
//根据项目编码获取项目名称 //根据项目编码获取项目名称
List<String> collect = insuranceRefundList.stream().map(InsuranceRefundListVo::getDeptNo).distinct().collect(Collectors.toList()); List<String> collect = insuranceRefundList.stream().map(InsuranceRefundListVo::getDeptNo).distinct().collect(Collectors.toList());
R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect); R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
...@@ -3297,7 +3306,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3297,7 +3306,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
} }
} }
return insuranceRefundList; return R.ok(insuranceRefundList);
} }
/** /**
...@@ -3348,7 +3357,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3348,7 +3357,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/ */
@Override @Override
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class}) @Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R<List<RefundExportListVo>> getInsuranceRefundHandlingList(RefundExportListParam param){ public R getInsuranceRefundHandlingList(RefundExportListParam param){
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
List<RefundExportListVo> refundExportList; List<RefundExportListVo> refundExportList;
String regionSQL = getRegionSQL(user); String regionSQL = getRegionSQL(user);
...@@ -3360,6 +3369,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3360,6 +3369,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
refundExportList = baseMapper.getRefundExportList(param); refundExportList = baseMapper.getRefundExportList(param);
} }
if (CollectionUtils.isNotEmpty(refundExportList)){ if (CollectionUtils.isNotEmpty(refundExportList)){
if(refundExportList.size() > CommonConstants.TWENTY_THOUSAND){
return R.failed(InsurancesConstants.EXPORT_TOO_LONG);
}
List<TInsuranceDetail> detailList = new ArrayList<>(); List<TInsuranceDetail> detailList = new ArrayList<>();
List<TInsuranceRefund> refundList = new ArrayList<>(); List<TInsuranceRefund> refundList = new ArrayList<>();
//根据项目编码获取项目名称 //根据项目编码获取项目名称
...@@ -3502,9 +3514,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3502,9 +3514,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override @Override
public R insuranceRefundImport(List<InsuranceHandleImportParam> insuranceRefundImportList) { public R insuranceRefundImport(List<InsuranceHandleImportParam> insuranceRefundImportList) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
if (!Common.isNotEmpty(insuranceRefundImportList)) { if (CollectionUtils.isEmpty(insuranceRefundImportList)) {
return R.failed(InsurancesConstants.INSURANCE_REFUND_IMPORT_LIST_IS_EMPTY); return R.failed(InsurancesConstants.INSURANCE_REFUND_IMPORT_LIST_IS_EMPTY);
} }
if(insuranceRefundImportList.size() > CommonConstants.TWENTY_THOUSAND){
return R.failed(InsurancesConstants.IMPORT_TOO_LONG);
}
Map<String, List<InsuranceHandleImportParam>> map = insuranceChangeCheck(insuranceRefundImportList, user,true); Map<String, List<InsuranceHandleImportParam>> map = insuranceChangeCheck(insuranceRefundImportList, user,true);
List<InsuranceHandleImportParam> successList = map.get("successList"); List<InsuranceHandleImportParam> successList = map.get("successList");
List<InsuranceHandleImportParam> errorList = map.get("errorList"); List<InsuranceHandleImportParam> errorList = map.get("errorList");
...@@ -3567,6 +3582,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3567,6 +3582,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (!Common.isNotEmpty(settleMonthCheckList)) { if (!Common.isNotEmpty(settleMonthCheckList)) {
return R.failed(InsurancesConstants.SETTLE_MONTH_CHANGE_LIST_IS_EMPTY); return R.failed(InsurancesConstants.SETTLE_MONTH_CHANGE_LIST_IS_EMPTY);
} }
if(settleMonthCheckList.size() > CommonConstants.TWENTY_THOUSAND){
return R.failed(InsurancesConstants.IMPORT_TOO_LONG);
}
Map<String, List<SettleMonthChangeCheckParam>> map = settleMonthChangeCheck(settleMonthCheckList, user); Map<String, List<SettleMonthChangeCheckParam>> map = settleMonthChangeCheck(settleMonthCheckList, user);
List<SettleMonthChangeCheckParam> successList = map.get("successList"); List<SettleMonthChangeCheckParam> successList = map.get("successList");
List<SettleMonthChangeCheckParam> errorList = map.get("errorList"); List<SettleMonthChangeCheckParam> errorList = map.get("errorList");
...@@ -3651,6 +3669,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3651,6 +3669,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if(!Common.isNotEmpty(deptChangeCheckList)){ if(!Common.isNotEmpty(deptChangeCheckList)){
return R.failed(InsurancesConstants.OPERATION_LIST_IS_EMPTY); return R.failed(InsurancesConstants.OPERATION_LIST_IS_EMPTY);
} }
if(deptChangeCheckList.size() > CommonConstants.TWENTY_THOUSAND){
return R.failed(InsurancesConstants.IMPORT_TOO_LONG);
}
Map<String, List<DeptChangeCheckParam>> stringListMap = deptChangeCheck(deptChangeCheckList,user); Map<String, List<DeptChangeCheckParam>> stringListMap = deptChangeCheck(deptChangeCheckList,user);
List<DeptChangeCheckParam> successList = stringListMap.get("successList"); List<DeptChangeCheckParam> successList = stringListMap.get("successList");
List<TInsuranceOperate> operateList = new ArrayList<>(16); List<TInsuranceOperate> operateList = new ArrayList<>(16);
......
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