|  | @ -45,7 +45,7 @@ public class PatientSosContactsJob implements Job {
 | 
												
													
														
															|  |         String sql = " select pd.device_sn,pd.category_code,wd.sim,sc.* from  wlyy_patient_device pd inner join wlyy_devices wd " +
 |  |         String sql = " select pd.device_sn,pd.category_code,wd.sim,sc.* from  wlyy_patient_device pd inner join wlyy_devices wd " +
 | 
												
													
														
															|  |                 " on pd.device_sn = wd.device_code and pd.del=0 " +
 |  |                 " on pd.device_sn = wd.device_code and pd.del=0 " +
 | 
												
													
														
															|  |                 "INNER JOIN base_patient_sos_contacts sc on sc.patient = pd.user and sc.del=1 " +
 |  |                 "INNER JOIN base_patient_sos_contacts sc on sc.patient = pd.user and sc.del=1 " +
 | 
												
													
														
															|  |                 "where  sc.success_flag=0  group by wd.device_code ";
 |  | 
 | 
												
													
														
															|  | 
 |  |                 "where  sc.success_flag=0 and pd.category_code in('7','4','16')  group by wd.device_code ";
 | 
												
													
														
															|  |         List<Map<String,Object>> sims = jdbcTemplate.queryForList(sql);
 |  |         List<Map<String,Object>> sims = jdbcTemplate.queryForList(sql);
 | 
												
													
														
															|  |         List<PatientSosContactsDO> modify = new ArrayList<>();
 |  |         List<PatientSosContactsDO> modify = new ArrayList<>();
 | 
												
													
														
															|  |         for(Map<String,Object> tmp:sims){//添加白名单,添加设备联系人
 |  |         for(Map<String,Object> tmp:sims){//添加白名单,添加设备联系人
 | 
												
											
												
													
														
															|  | @ -59,7 +59,9 @@ public class PatientSosContactsJob implements Job {
 | 
												
													
														
															|  |             String phone_seqid = tmp.get("phone_seqid").toString() ;
 |  |             String phone_seqid = tmp.get("phone_seqid").toString() ;
 | 
												
													
														
															|  |             try {
 |  |             try {
 | 
												
													
														
															|  |                 PatientSosContactsDO sosContactsDO = sosContactsDao.findOne(Long.parseLong(id));
 |  |                 PatientSosContactsDO sosContactsDO = sosContactsDao.findOne(Long.parseLong(id));
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |                 if (StringUtils.isBlank(sosContactsDO.getUpdateInfo())){
 | 
												
													
														
															|  | 
 |  |                     sosContactsDO.setUpdateInfo(" ");
 | 
												
													
														
															|  | 
 |  |                 }
 | 
												
													
														
															|  |                 if(null!=sosContactsDO){
 |  |                 if(null!=sosContactsDO){
 | 
												
													
														
															|  |                     if (StringUtils.isNotBlank(sim)){
 |  |                     if (StringUtils.isNotBlank(sim)){
 | 
												
													
														
															|  |                         JSONObject response = cardService.setPatientContacts(sim, null, null, "1", sos_phone, null);//移动白名单
 |  |                         JSONObject response = cardService.setPatientContacts(sim, null, null, "1", sos_phone, null);//移动白名单
 | 
												
											
												
													
														
															|  | @ -102,15 +104,14 @@ public class PatientSosContactsJob implements Job {
 | 
												
													
														
															|  |                         yunXunDeviceService.setSos(device_sn,phone1,phone2,phone3);
 |  |                         yunXunDeviceService.setSos(device_sn,phone1,phone2,phone3);
 | 
												
													
														
															|  |                         sosContactsDO.setUpdateInfo(sosContactsDO.getUpdateInfo()+",{deviceSn:"+device_sn+":unknow}");
 |  |                         sosContactsDO.setUpdateInfo(sosContactsDO.getUpdateInfo()+",{deviceSn:"+device_sn+":unknow}");
 | 
												
													
														
															|  |                     }
 |  |                     }
 | 
												
													
														
															|  |                     modify.add(sosContactsDO);
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |                     sosContactsDao.save(sosContactsDO);
 | 
												
													
														
															|  |                 }
 |  |                 }
 | 
												
													
														
															|  |             }catch (Exception e){
 |  |             }catch (Exception e){
 | 
												
													
														
															|  |                 logger.info(sim+"--同步失败--"+sos_phone);
 |  |                 logger.info(sim+"--同步失败--"+sos_phone);
 | 
												
													
														
															|  |                 e.printStackTrace();
 |  |                 e.printStackTrace();
 | 
												
													
														
															|  |             }
 |  |             }
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |         sosContactsDao.save(modify);
 |  | 
 | 
												
													
														
															|  | 
 |  | //        sosContactsDao.save(modify);
 | 
												
													
														
															|  |         logger.info("PATIENT_SOS_CONTACTS_JOB end");
 |  |         logger.info("PATIENT_SOS_CONTACTS_JOB end");
 | 
												
													
														
															|  |     }
 |  |     }
 | 
												
													
														
															|  | }
 |  | }
 |