Browse Source

修改导入

dev
曲树通 6 years ago
parent
commit
74ea9417c0
  1. 8
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java

8
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/epidemic/service/impl/EpidemicSentryPostServiceImpl.java

@ -131,7 +131,8 @@ public class EpidemicSentryPostServiceImpl extends BaseServiceImpl<EpidemicSentr
} }
private List<EpidemicSentryPostDTO> updataOrSaveExcel(List<EpidemicSentryPostExcel> epidemicExcelList, List<EpidemicSentryPostEntity> oldEntityList) { private List<EpidemicSentryPostDTO> updataOrSaveExcel(List<EpidemicSentryPostExcel> epidemicExcelList, List<EpidemicSentryPostEntity> oldEntityList) {
List<EpidemicSentryPostDTO> newEpidemicList = new ArrayList<>(); List<EpidemicSentryPostExcel> newEpidemicList = new ArrayList<>();
newEpidemicList.addAll(epidemicExcelList);
QueryWrapper<EpidemicSentryPostEntity> wrapper; QueryWrapper<EpidemicSentryPostEntity> wrapper;
for (EpidemicSentryPostExcel item : epidemicExcelList) { for (EpidemicSentryPostExcel item : epidemicExcelList) {
if (StringUtils.isNotBlank(item.getThirdSentryPostId())) { if (StringUtils.isNotBlank(item.getThirdSentryPostId())) {
@ -144,12 +145,11 @@ public class EpidemicSentryPostServiceImpl extends BaseServiceImpl<EpidemicSentr
wrapper = new QueryWrapper<>(); wrapper = new QueryWrapper<>();
wrapper.eq("third_sentry_post_id", epidemicSentryPostEntity.getThirdSentryPostId()); wrapper.eq("third_sentry_post_id", epidemicSentryPostEntity.getThirdSentryPostId());
update(epidemicSentryPostEntity, wrapper); update(epidemicSentryPostEntity, wrapper);
epidemicExcelList.remove(item); newEpidemicList.remove(item);
} }
} }
} }
newEpidemicList = ConvertUtils.sourceToTarget(epidemicExcelList, EpidemicSentryPostDTO.class); return ConvertUtils.sourceToTarget(newEpidemicList, EpidemicSentryPostDTO.class);
return newEpidemicList;
} }
} }
Loading…
Cancel
Save