|
@ -1120,6 +1120,12 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl<DataSyncConfigDao |
|
|
List<YTVaccineListDTO> vaccineList1 = vaccineListJA.toJavaList(YTVaccineListDTO.class); |
|
|
List<YTVaccineListDTO> vaccineList1 = vaccineListJA.toJavaList(YTVaccineListDTO.class); |
|
|
vaccineList1.forEach(v1 -> { |
|
|
vaccineList1.forEach(v1 -> { |
|
|
v1.setCardno(v.get("cardno").toString()); |
|
|
v1.setCardno(v.get("cardno").toString()); |
|
|
|
|
|
|
|
|
|
|
|
// 秒转换成:00
|
|
|
|
|
|
Matcher matcher = VACCINE_DATE_OF_API_PATTERN.matcher(v1.getInoculateDate()); |
|
|
|
|
|
if (matcher.matches()) { |
|
|
|
|
|
v1.setInoculateDate(matcher.group(1).concat(":00")); |
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
ytVaccineListFromApi.addAll(vaccineList1); |
|
|
ytVaccineListFromApi.addAll(vaccineList1); |
|
|
} |
|
|
} |
|
@ -1143,11 +1149,11 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl<DataSyncConfigDao |
|
|
Iterator<YTVaccineListDTO> iterator = ytVaccineListFromApi.iterator(); |
|
|
Iterator<YTVaccineListDTO> iterator = ytVaccineListFromApi.iterator(); |
|
|
while (iterator.hasNext()) { |
|
|
while (iterator.hasNext()) { |
|
|
YTVaccineListDTO vaccineFromApi = iterator.next(); |
|
|
YTVaccineListDTO vaccineFromApi = iterator.next(); |
|
|
Matcher matcher = VACCINE_DATE_OF_API_PATTERN.matcher(vaccineFromApi.getInoculateDate()); |
|
|
|
|
|
|
|
|
// 身份证号和接种时间都一致,移除
|
|
|
if (vaccineFromApi.getCardno().equals(existVaccineItem.getCardno()) |
|
|
if (vaccineFromApi.getCardno().equals(existVaccineItem.getCardno()) |
|
|
&& matcher.matches() |
|
|
&& vaccineFromApi.getInoculateDate().equals(existVaccineItem.getInoculateDate())) { |
|
|
&& matcher.group(1).equals(existVaccineItem.getInoculateDate()) |
|
|
|
|
|
) { |
|
|
|
|
|
iterator.remove(); |
|
|
iterator.remove(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|