Commit b90a9263 authored by 查济's avatar 查济

Merge branch 'feature-zhaji' into 'develop'

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

See merge request fangxinjiang/yifu!161
parents ffa2b81b 8e14d09f
......@@ -3054,7 +3054,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override
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();
if(!Common.isNotEmpty(settleMonthCheckList)){
return R.failed(InsurancesConstants.SETTLE_MONTH_CHANGE_LIST_IS_EMPTY);
......@@ -3067,8 +3067,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if(CollectionUtils.isNotEmpty(successList)){
//当前保单结算信息不为空且已推送的情况下,推送EKP进行变更
List<EKPInteractiveParam> deptDetail = getDeptDetail(successList);
threadPool.execute(() -> {
for (EKPInteractiveParam ekpInteractiveParam : deptDetail) {
threadPool.execute(() -> {
String settleMonth = ekpInteractiveParam.getSettleMonth();
TInsuranceDetail byId = getById(ekpInteractiveParam.getId());
String defaultSettleId = byId.getDefaultSettleId();
......@@ -3132,8 +3132,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceOperate.setOperateDesc(InsurancesConstants.MONTH_CHANGE);
tInsuranceOperateService.save(insuranceOperate);
}
});
}
}
});
}
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