Browse Source

行程上报拉取调整

master
zxc 3 years ago
parent
commit
13731fedcc
  1. 40
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncConfigServiceImpl.java

40
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncConfigServiceImpl.java

@ -1126,26 +1126,26 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl<DataSyncConfigDao
} }
} }
}); });
if (CollectionUtils.isNotEmpty(entities)){ }
entities.forEach(e -> resiInfos.stream().filter(r ->r.getIdCard().equals(e.getIdCard())).forEach(r -> { if (CollectionUtils.isNotEmpty(entities)){
e.setGridId(r.getGridId()); entities.forEach(e -> resiInfos.stream().filter(r ->r.getIdCard().equals(e.getIdCard())).forEach(r -> {
e.setCustomerId(r.getCustomerId()); e.setGridId(r.getGridId());
e.setAgencyId(r.getAgencyId()); e.setCustomerId(r.getCustomerId());
e.setPids(r.getPids()); e.setAgencyId(r.getAgencyId());
e.setName(r.getName()); e.setPids(r.getPids());
e.setMobile(r.getMobile()); e.setName(r.getName());
e.setUserId(r.getUserId()); e.setMobile(r.getMobile());
e.setUserType("ytPull"); e.setUserId(r.getUserId());
})); e.setUserType("ytPull");
icTripReportRecordService.insertBatch(entities); }));
} icTripReportRecordService.insertBatch(entities);
if (CollectionUtils.isNotEmpty(needUpdate)){ }
// 因为更新字段较多,所以分批操作 if (CollectionUtils.isNotEmpty(needUpdate)){
List<List<IcTripReportRecordEntity>> needs = ListUtils.partition(needUpdate, NumConstant.TWENTY); // 因为更新字段较多,所以分批操作
needs.forEach(n -> { List<List<IcTripReportRecordEntity>> needs = ListUtils.partition(needUpdate, NumConstant.TWENTY);
updateTripReportList(n); needs.forEach(n -> {
}); updateTripReportList(n);
} });
} }
}); });
}else { }else {

Loading…
Cancel
Save