Commit 7bb1a613 authored by hongguangwu's avatar hongguangwu

MVP1.7.14-商险相关

parent 7b10b7d8
...@@ -160,7 +160,7 @@ public class TEmployeeInsurancePreController { ...@@ -160,7 +160,7 @@ public class TEmployeeInsurancePreController {
@Operation(description = "商险派单信息单个/批量派单") @Operation(description = "商险派单信息单个/批量派单")
@PostMapping("/batchDispatcherInsurance") @PostMapping("/batchDispatcherInsurance")
public R batchDispatcherInsurance(@RequestBody List<String> idList) { public R batchDispatcherInsurance(@RequestBody List<String> idList) {
return tEmployeeInsurancePreService.batchDispatcherInsurance(idList, null); return tEmployeeInsurancePreService.batchDispatcherInsurance(idList, null, false);
} }
/** /**
......
...@@ -59,7 +59,7 @@ public interface TEmployeeInsurancePreService extends IService<TEmployeeInsuranc ...@@ -59,7 +59,7 @@ public interface TEmployeeInsurancePreService extends IService<TEmployeeInsuranc
* @param sameFlag 是否要做重复人员明细校验的标识 1 不需要 空需要 * @param sameFlag 是否要做重复人员明细校验的标识 1 不需要 空需要
* @return * @return
*/ */
R batchDispatcherInsurance(List<String> idList,String sameFlag); R batchDispatcherInsurance(List<String> idList,String sameFlag, boolean pushQiWeiFlag);
/** /**
* 新增商险待购买信息 * 新增商险待购买信息
......
...@@ -53,7 +53,7 @@ public class ScheduleServiceImpl implements ScheduleService { ...@@ -53,7 +53,7 @@ public class ScheduleServiceImpl implements ScheduleService {
transactionTemplate.execute(status -> { transactionTemplate.execute(status -> {
List<String> idList = new ArrayList<>(); List<String> idList = new ArrayList<>();
idList.add(aId); idList.add(aId);
insurancePreService.batchDispatcherInsurance(idList,CommonConstants.ONE_STRING); insurancePreService.batchDispatcherInsurance(idList,CommonConstants.ONE_STRING, false);
return null; return null;
}); });
} }
......
...@@ -187,8 +187,9 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -187,8 +187,9 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
return R.ok(); return R.ok();
} }
// pushQiWeiFlag : 是否推送企微 true:推送(当前仅下午3点与3点20的定时任务,需要推送企微),false:不推送
@Override @Override
public R batchDispatcherInsurance(List<String> idList, String sameFlag) { public R batchDispatcherInsurance(List<String> idList, String sameFlag, boolean pushQiWeiFlag) {
List<TEmployeeInsurancePre> insurancePreList = baseMapper.selectList(Wrappers.<TEmployeeInsurancePre>query() List<TEmployeeInsurancePre> insurancePreList = baseMapper.selectList(Wrappers.<TEmployeeInsurancePre>query()
.lambda().in(TEmployeeInsurancePre::getId, idList) .lambda().in(TEmployeeInsurancePre::getId, idList)
.in(TEmployeeInsurancePre::getProcessStatus, CommonConstants.processInsurancesStatus)); .in(TEmployeeInsurancePre::getProcessStatus, CommonConstants.processInsurancesStatus));
...@@ -409,7 +410,11 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -409,7 +410,11 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
updateList.add(updatePre); updateList.add(updatePre);
} }
} }
if (!preQwMap.isEmpty()) { if (!updateList.isEmpty()) {
this.updateBatchById(updateList);
}
// pushQiWeiFlag 推送企微的flag,true表示推送企微
if (pushQiWeiFlag && !preQwMap.isEmpty()) {
List<TEmployeeInsurancePreQw> qwList = new ArrayList<>(); List<TEmployeeInsurancePreQw> qwList = new ArrayList<>();
int deptNum; int deptNum;
int allNum; int allNum;
...@@ -442,11 +447,8 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -442,11 +447,8 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
qw.setDescription(description.toString()); qw.setDescription(description.toString());
qwList.add(qw); qwList.add(qw);
} }
if(!qwDetalList.isEmpty()) { if(!qwDetalList.isEmpty() && !qwList.isEmpty()) {
tEmployeeInsurancePreQwDetailService.saveBatch(qwDetalList); tEmployeeInsurancePreQwDetailService.saveBatch(qwDetalList);
}
// TODO-加一个定时任务再推送企微的flag
if (!qwList.isEmpty()) {
tEmployeeInsurancePreQwService.saveBatch(qwList); tEmployeeInsurancePreQwService.saveBatch(qwList);
if (Common.isNotNull(userLoginNames)) { if (Common.isNotNull(userLoginNames)) {
Map<String, String> sysUserMap = getUserQiWeiInfo(userLoginNames); Map<String, String> sysUserMap = getUserQiWeiInfo(userLoginNames);
...@@ -463,9 +465,6 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -463,9 +465,6 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
} }
} }
if (!updateList.isEmpty()) {
this.updateBatchById(updateList);
}
// 找出 insurancePreList 中在 autoAddParamList 中存在的数据 // 找出 insurancePreList 中在 autoAddParamList 中存在的数据
...@@ -705,7 +704,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -705,7 +704,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
.set(TEmployeeInsurancePre::getProcessStatus, CommonConstants.ONE_STRING); .set(TEmployeeInsurancePre::getProcessStatus, CommonConstants.ONE_STRING);
this.update(updateWrapper); this.update(updateWrapper);
try { try {
this.batchDispatcherInsurance(unConfirmList,CommonConstants.ONE_STRING); this.batchDispatcherInsurance(unConfirmList,CommonConstants.ONE_STRING, true);
} catch (Exception e) { } catch (Exception e) {
log.error("执行异常", e); log.error("执行异常", e);
} }
......
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