|
|
@ -2,6 +2,7 @@ package com.epmet.service.impl; |
|
|
|
import java.util.Date; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|
|
@ -1103,19 +1104,29 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl<DataSyncConfigDao |
|
|
|
"]"; |
|
|
|
// List<Map> vaccineList = JSON.parseArray(json,Map.class);
|
|
|
|
List<Map<String,Object>> vaccineList = yantaiNamedParamLantuJdbcTemplate.queryForList( |
|
|
|
"select data, name, card_no, vaccineCount from t_ymjz_info where card_no in (:idcards)", args); |
|
|
|
"select data, name, cardno, vaccineCount from t_ymjz_info where cardno in (:idcards)", args); |
|
|
|
List<YTVaccineListDTO> ytVaccineListDTOS = new ArrayList<>(); |
|
|
|
if (CollectionUtils.isNotEmpty(vaccineList)) { |
|
|
|
vaccineList.forEach(v -> { |
|
|
|
if (v.containsKey("data")){ |
|
|
|
Map<String, Object> data = (Map<String, Object>) v.get("data"); |
|
|
|
if (data.containsKey("vaccineList")){ |
|
|
|
List<YTVaccineListDTO> vaccineList1 = JSON.parseArray(data.get("vaccineList").toString(), YTVaccineListDTO.class); |
|
|
|
JSONObject jo = JSON.parseObject((String) v.get("data")); |
|
|
|
if (jo.containsKey("vaccineList")) { |
|
|
|
JSONArray vaccineListJA = jo.getJSONArray("vaccineList"); |
|
|
|
List<YTVaccineListDTO> vaccineList1 = vaccineListJA.toJavaList(YTVaccineListDTO.class); |
|
|
|
vaccineList1.forEach(v1 -> { |
|
|
|
v1.setCardno(v.get("cardno").toString()); |
|
|
|
}); |
|
|
|
ytVaccineListDTOS.addAll(vaccineList1); |
|
|
|
} |
|
|
|
|
|
|
|
//Map<String, Object> data = (Map<String, Object>) v.get("data");
|
|
|
|
//if (data.containsKey("vaccineList")){
|
|
|
|
// List<YTVaccineListDTO> vaccineList1 = JSON.parseArray(data.get("vaccineList").toString(), YTVaccineListDTO.class);
|
|
|
|
// vaccineList1.forEach(v1 -> {
|
|
|
|
// v1.setCardno(v.get("cardno").toString());
|
|
|
|
// });
|
|
|
|
// ytVaccineListDTOS.addAll(vaccineList1);
|
|
|
|
//}
|
|
|
|
} |
|
|
|
}); |
|
|
|
List<IcVaccineEntity> entities = new ArrayList<>(); |
|
|
@ -1153,7 +1164,7 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl<DataSyncConfigDao |
|
|
|
List<IcVaccineRelationEntity> relationEntities = new ArrayList<>(); |
|
|
|
entities.forEach(e -> { |
|
|
|
IcVaccineRelationEntity re = new IcVaccineRelationEntity(); |
|
|
|
re.setIcVaccineId(e.getAgencyId()); |
|
|
|
re.setIcVaccineId(e.getId()); |
|
|
|
re.setPids(e.getPids()); |
|
|
|
re.setCustomerId(customerId); |
|
|
|
re.setUserType("ytPull"); |
|
|
|