Commit 770b6306 authored by 李灿灿's avatar 李灿灿

EKP2INSURANCES 更新结算状态 接口优化

parent 8c108f67
......@@ -138,15 +138,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<UpdateInsuranceSettleParam.SettleData> settleData = param.getSettleData();
List<TInsuranceSettle> list = new ArrayList<>();
for (UpdateInsuranceSettleParam.SettleData settleDatum : settleData) {
TInsuranceSettle settle = new TInsuranceSettle();
String settleId = settleDatum.getSn().split("_")[1];
settle.setId(settleId);
settle.setUpdateTime(pushTime);
settle.setSettleHandleStatus(settleDatum.getSettleStatus());
if (CommonConstants.THREE_STRING.equals(settleDatum.getSettleStatus())){
settle.setSettleDoneTime(pushTime);
if (StringUtils.isNotBlank(settleId)){
TInsuranceSettle byId = tInsuranceSettleService.getById(settleId);
if (!Optional.ofNullable(byId).isPresent()){
continue;
}
byId.setUpdateTime(pushTime);
byId.setSettleHandleStatus(settleDatum.getSettleStatus());
if (CommonConstants.THREE_STRING.equals(settleDatum.getSettleStatus())){
byId.setSettleDoneTime(pushTime);
}
list.add(byId);
}
list.add(settle);
}
if (CollectionUtils.isNotEmpty(list)){
tInsuranceSettleService.saveOrUpdateBatch(list);
......
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