| 
						
						
							
								
							
						
						
					 | 
					@ -411,7 +411,7 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl<DataSyncConfigDao | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     */ | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    public void natInfoSyncButton(DataSyncTaskParam formDTO) { | 
					 | 
					 | 
					    public void submitSyncJob(DataSyncTaskParam formDTO) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(formDTO.getAgencyId()); | 
					 | 
					 | 
					        AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(formDTO.getAgencyId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if (null == agencyInfo){ | 
					 | 
					 | 
					        if (null == agencyInfo){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            throw new EpmetException("未查询到组织信息:"+formDTO.getAgencyId()); | 
					 | 
					 | 
					            throw new EpmetException("未查询到组织信息:"+formDTO.getAgencyId()); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -1072,30 +1072,58 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl<DataSyncConfigDao | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        args.put("idcards", idCards); | 
					 | 
					 | 
					        args.put("idcards", idCards); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        // todo 疫苗接种视图
 | 
					 | 
					 | 
					        // todo 疫苗接种视图
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        String json = "[\n" + | 
					 | 
					 | 
					        String json = "[\n" + | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                "{\n" + | 
					 | 
					 | 
					                "    {\n" + | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                "\t\"idCard\":\"370785195001012558\",\n" + | 
					 | 
					 | 
					                "        \"id\": \"751956862490071040\",\n" + | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                "\t\"inoculateDate\":\"2023-01-01 10:01\",\n" + | 
					 | 
					 | 
					                "        \"cardno\": \"370785195001012558\",\n" + | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                "\t\"lastStationName\":\"北京\"\n" + | 
					 | 
					 | 
					                "        \"name\": \"李国玺\",\n" + | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                "},\n" + | 
					 | 
					 | 
					                "        \"data\":\n" + | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                "{\n" + | 
					 | 
					 | 
					                "        {\n" + | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                "\t\"idCard\":\"370785195001012558\",\n" + | 
					 | 
					 | 
					                "            \"vaccineList\":\n" + | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                "\t\"inoculateDate\":\"2022-01-01 10:01\",\n" + | 
					 | 
					 | 
					                "            [\n" + | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                "\t\"lastStationName\":\"南京\"\n" + | 
					 | 
					 | 
					                "                {\n" + | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                "}\n" + | 
					 | 
					 | 
					                "                    \"vaccineCount\": \"1\",\n" + | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                "                    \"inoculateDate\": \"2021-04-24 16:02:46\",\n" + | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                "                    \"lastStationName\": \"烟台市只楚医院临时接种点\"\n" + | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                "                },\n" + | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                "                {\n" + | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                "                    \"vaccineCount\": \"2\",\n" + | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                "                    \"inoculateDate\": \"2021-06-10 16:20:30\",\n" + | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                "                    \"lastStationName\": \"烟台市芝罘岛医院临时接种点\"\n" + | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                "                },\n" + | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                "                {\n" + | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                "                    \"vaccineCount\": \"3\",\n" + | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                "                    \"inoculateDate\": \"2021-12-10 15:12:24\",\n" + | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                "                    \"lastStationName\": \"烟台市芝罘岛医院临时接种点\"\n" + | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                "                }\n" + | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                "            ],\n" + | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                "            \"flag\": 1\n" + | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                "        },\n" + | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                "        \"vaccineCount\": 3\n" + | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                "    }\n" + | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                "]"; | 
					 | 
					 | 
					                "]"; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        List<Map<String, Object>> vaccineList = new ArrayList<>();/*yantaiNamedParamLantuJdbcTemplate.queryForList( | 
					 | 
					 | 
					//        List<Map> vaccineList = JSON.parseArray(json,Map.class);
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                "select id, name,card_no, create_time from hscyxxb where card_no in (:idcards)", args);*/ | 
					 | 
					 | 
					        List<Map<String,Object>> vaccineList = yantaiNamedParamLantuJdbcTemplate.queryForList( | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Map<String, Object> m = new HashMap<>(); | 
					 | 
					 | 
					                "select data, name, card_no, vaccineCount from t_ymjz_info where card_no in (:idcards)", args); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        vaccineList.add(m); | 
					 | 
					 | 
					        List<YTVaccineListDTO> ytVaccineListDTOS = new ArrayList<>(); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        if (CollectionUtils.isNotEmpty(vaccineList)) { | 
					 | 
					 | 
					        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); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        vaccineList1.forEach(v1 -> { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                            v1.setCardno(v.get("cardno").toString()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        }); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        ytVaccineListDTOS.addAll(vaccineList1); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            }); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            List<IcVaccineEntity> entities = new ArrayList<>(); | 
					 | 
					 | 
					            List<IcVaccineEntity> entities = new ArrayList<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					//            List<YTVaccineListDTO> ytVaccineListDTOS = ConvertUtils.sourceToTarget(vaccineList, YTVaccineListDTO.class);
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            List<YTVaccineListDTO> ytVaccineListDTOS = JSON.parseArray(json,YTVaccineListDTO.class); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            List<YTVaccineListDTO> existVaccine = icVaccineDao.getExistVaccine(ytVaccineListDTOS); | 
					 | 
					 | 
					            List<YTVaccineListDTO> existVaccine = icVaccineDao.getExistVaccine(ytVaccineListDTOS); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            if (CollectionUtils.isNotEmpty(existVaccine)){ | 
					 | 
					 | 
					            if (CollectionUtils.isNotEmpty(existVaccine)){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                for (YTVaccineListDTO e : existVaccine) { | 
					 | 
					 | 
					                for (YTVaccineListDTO e : existVaccine) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    for (int i = 0; i < ytVaccineListDTOS.size(); i++) { | 
					 | 
					 | 
					                    for (int i = 0; i < ytVaccineListDTOS.size(); i++) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                        if (ytVaccineListDTOS.get(i).getIdCard().equals(e.getIdCard()) && ytVaccineListDTOS.get(i).getInoculateDate().equals(e.getInoculateDate())){ | 
					 | 
					 | 
					                        if (ytVaccineListDTOS.get(i).getCardno().equals(e.getCardno()) && ytVaccineListDTOS.get(i).getInoculateDate().equals(e.getInoculateDate())){ | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                            ytVaccineListDTOS.remove(i); | 
					 | 
					 | 
					                            ytVaccineListDTOS.remove(i); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        } | 
					 | 
					 | 
					                        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    } | 
					 | 
					 | 
					                    } | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -1104,7 +1132,7 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl<DataSyncConfigDao | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            if (CollectionUtils.isNotEmpty(ytVaccineListDTOS)){ | 
					 | 
					 | 
					            if (CollectionUtils.isNotEmpty(ytVaccineListDTOS)){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                ytVaccineListDTOS.forEach(v -> { | 
					 | 
					 | 
					                ytVaccineListDTOS.forEach(v -> { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    resiInfos.forEach(u -> { | 
					 | 
					 | 
					                    resiInfos.forEach(u -> { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                        if (v.getIdCard().equals(u.getIdCard())){ | 
					 | 
					 | 
					                        if (v.getCardno().equals(u.getIdCard())){ | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                            IcVaccineEntity e = new IcVaccineEntity(); | 
					 | 
					 | 
					                            IcVaccineEntity e = new IcVaccineEntity(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                            e.setCustomerId(customerId); | 
					 | 
					 | 
					                            e.setCustomerId(customerId); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                            e.setName(u.getName()); | 
					 | 
					 | 
					                            e.setName(u.getName()); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |