|
@ -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; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |