Commit 589b7c84 authored by fangxinjiang's avatar fangxinjiang

商险自动化限制:新增、批增、替换-fxj

parent 7cb40eb0
......@@ -291,6 +291,7 @@ public class TInsurancePolicyServiceImpl extends ServiceImpl<TInsurancePolicyMap
TInsuranceType type = null;
TBusinessOperate operate = null;
TInsurancePolicy policy = null;
List<TInsurancePolicy> saveList = new ArrayList<>();
// 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) {
......@@ -337,17 +338,31 @@ public class TInsurancePolicyServiceImpl extends ServiceImpl<TInsurancePolicyMap
policy.setEnableFlag(CommonConstants.ZERO_INT);
policy.setDeleteFlag(CommonConstants.ZERO_INT);
//插入保单维护信息
baseMapper.insert(policy);
saveList.add(policy);
//baseMapper.insert(policy);
//插入保单维护操作日志
//第一次新增插入变更记录表为insert,前端会将insert渲染为批量导入
operate = new TBusinessOperate();
operate.setBusinessId(policy.getId());
operate.setDifferenceInfo("insert");
tBusinessOperateService.save(operate);
policyNoMap.put(excel.getPolicyNo(), excel.getRowIndex().toString());
}
List<TBusinessOperate> operateList = new ArrayList<>();
if (Common.isNotNull(saveList)) {
this.saveBatch(saveList);
for (TInsurancePolicy py : saveList){
operate = new TBusinessOperate();
operate.setBusinessId(policy.getId());
operate.setDifferenceInfo("insert");
operateList.add( operate);
//tBusinessOperateService.save(operate);
}
if (Common.isNotNull(operateList)){
tBusinessOperateService.saveBatch(operateList);
}
}
// 清理map list 等数据
Common.clear(saveList);
Common.clear(operateList);
Common.clear(excelVOList);
}
......
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