Commit 8e14d09f authored by zhaji's avatar zhaji

"feature-zhaJi:优化EKP交互时的线程问题"

parent ffa2b81b
...@@ -3054,7 +3054,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3054,7 +3054,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override @Override
public R settleMonthChange(List<SettleMonthChangeCheckParam> settleMonthCheckList) { public R settleMonthChange(List<SettleMonthChangeCheckParam> settleMonthCheckList) {
//初始化线程池 //初始化线程池
ThreadPoolExecutor threadPool = new ThreadPoolExecutor(50, 50, 100, TimeUnit.SECONDS, new LinkedBlockingQueue<>(10)); ThreadPoolExecutor threadPool = new ThreadPoolExecutor(10, 10, 100, TimeUnit.SECONDS, new LinkedBlockingQueue<>(10));
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
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);
...@@ -3067,8 +3067,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3067,8 +3067,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if(CollectionUtils.isNotEmpty(successList)){ if(CollectionUtils.isNotEmpty(successList)){
//当前保单结算信息不为空且已推送的情况下,推送EKP进行变更 //当前保单结算信息不为空且已推送的情况下,推送EKP进行变更
List<EKPInteractiveParam> deptDetail = getDeptDetail(successList); List<EKPInteractiveParam> deptDetail = getDeptDetail(successList);
threadPool.execute(() -> {
for (EKPInteractiveParam ekpInteractiveParam : deptDetail) { for (EKPInteractiveParam ekpInteractiveParam : deptDetail) {
threadPool.execute(() -> {
String settleMonth = ekpInteractiveParam.getSettleMonth(); String settleMonth = ekpInteractiveParam.getSettleMonth();
TInsuranceDetail byId = getById(ekpInteractiveParam.getId()); TInsuranceDetail byId = getById(ekpInteractiveParam.getId());
String defaultSettleId = byId.getDefaultSettleId(); String defaultSettleId = byId.getDefaultSettleId();
...@@ -3132,8 +3132,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3132,8 +3132,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceOperate.setOperateDesc(InsurancesConstants.MONTH_CHANGE); insuranceOperate.setOperateDesc(InsurancesConstants.MONTH_CHANGE);
tInsuranceOperateService.save(insuranceOperate); tInsuranceOperateService.save(insuranceOperate);
} }
}); }
} });
} }
return R.ok(errorList,"导入成功"); return R.ok(errorList,"导入成功");
} }
......
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