| 
															
																@ -3,6 +3,7 @@ package com.yihu.jw.care.job.data; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.jw.care.util.DateUtil; 
															 | 
															
															 | 
															
																import com.yihu.jw.care.util.DateUtil; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.jw.care.zhylyjkglxt.dao.*; 
															 | 
															
															 | 
															
																import com.yihu.jw.care.zhylyjkglxt.dao.*; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.jw.care.zhylyjkglxt.entity.*; 
															 | 
															
															 | 
															
																import com.yihu.jw.care.zhylyjkglxt.entity.*; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																import com.yihu.jw.util.common.IdCardUtil; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.quartz.Job; 
															 | 
															
															 | 
															
																import org.quartz.Job; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.quartz.JobExecutionContext; 
															 | 
															
															 | 
															
																import org.quartz.JobExecutionContext; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.quartz.JobExecutionException; 
															 | 
															
															 | 
															
																import org.quartz.JobExecutionException; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -78,7 +79,7 @@ public class SaveDataPushJob implements Job { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        //System.out.println(date); 
															 | 
															
															 | 
															
																        //System.out.println(date); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        date = DateUtil.getNextDay(date, -1); 
															 | 
															
															 | 
															
																        date = DateUtil.getNextDay(date, -1); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        String filterOrg = "";//排除的测试机构 
															 | 
															
															 | 
															
																        String filterOrg = "";//排除的测试机构 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        String sqlOgr = "SELECT dict_code from wlyy_hospital_sys_dict WHERE dict_name = 'jkzl_org' and dict_code is not null "; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        String sqlOgr = "SELECT DISTINCT dict_code from wlyy_hospital_sys_dict WHERE dict_name = 'jkzl_org' and dict_code is not null "; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        List<String> Orglist =  jdbcTemplate.queryForList(sqlOgr,String.class); 
															 | 
															
															 | 
															
																        List<String> Orglist =  jdbcTemplate.queryForList(sqlOgr,String.class); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        Map<String,String> jkzlOrgMap = new HashMap<>(); 
															 | 
															
															 | 
															
																        Map<String,String> jkzlOrgMap = new HashMap<>(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        if(Orglist.size()>0){ 
															 | 
															
															 | 
															
																        if(Orglist.size()>0){ 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -87,7 +88,7 @@ public class SaveDataPushJob implements Job { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        } 
															 | 
															
															 | 
															
																        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        String filterUser = " ";//排除的测试用户 
															 | 
															
															 | 
															
																        String filterUser = " ";//排除的测试用户 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        String sqltmp = "SELECT dict_code from wlyy_hospital_sys_dict WHERE (dict_name = 'jkzl_child' or dict_name = 'jkzl_older' " + 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        String sqltmp = "SELECT DISTINCT dict_code from wlyy_hospital_sys_dict WHERE (dict_name = 'jkzl_child' or dict_name = 'jkzl_older' " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "  or dict_name = 'jkzl_user' or dict_name = 'jkzl_helper'  or dict_name = 'jkzl_teacher' ) and dict_code is not null"; 
															 | 
															
															 | 
															
																                "  or dict_name = 'jkzl_user' or dict_name = 'jkzl_helper'  or dict_name = 'jkzl_teacher' ) and dict_code is not null"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        List<String> listtmp = jdbcTemplate.queryForList(sqltmp,String.class); 
															 | 
															
															 | 
															
																        List<String> listtmp = jdbcTemplate.queryForList(sqltmp,String.class); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        Map<String,String> jkzlUserMap = new HashMap<>(); 
															 | 
															
															 | 
															
																        Map<String,String> jkzlUserMap = new HashMap<>(); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -260,7 +261,7 @@ public class SaveDataPushJob implements Job { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    //幼儿基本信息 
															 | 
															
															 | 
															
																    //幼儿基本信息 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    public void saveInfantInfo(String date){ 
															 | 
															
															 | 
															
																    public void saveInfantInfo(String date){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        String infantInfoSql = "SELECT DISTINCT p.id AS id,o.address AS address,p.name AS `name`,t.status AS `status`,o.name AS `orgName`," + 
															 | 
															
															 | 
															
																        String infantInfoSql = "SELECT DISTINCT p.id AS id,o.address AS address,p.name AS `name`,t.status AS `status`,o.name AS `orgName`," + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " TIMESTAMPDIFF(YEAR, p.birthday, CURDATE()) AS age,p.create_time AS createTime,p.update_time AS updateTime" + 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                " TIMESTAMPDIFF(YEAR, p.birthday, CURDATE()) AS age,p.create_time AS createTime,p.update_time AS updateTime,p.idcard as idcard" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " FROM" + 
															 | 
															
															 | 
															
																                " FROM" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " base_doctor_patient_tmp t," + 
															 | 
															
															 | 
															
																                " base_doctor_patient_tmp t," + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " base_patient p," + 
															 | 
															
															 | 
															
																                " base_patient p," + 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -271,14 +272,15 @@ public class SaveDataPushJob implements Job { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " AND t.del = 1" + 
															 | 
															
															 | 
															
																                " AND t.del = 1" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " AND p.del = 1" + 
															 | 
															
															 | 
															
																                " AND p.del = 1" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " AND t.org_code = o.code" + 
															 | 
															
															 | 
															
																                " AND t.org_code = o.code" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " AND p.update_time >= '2021-05-31'"; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                " AND p.update_time >= '"+date+"'"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        List<Map<String, Object>> infantInfoList = jdbcTemplate.queryForList(infantInfoSql); 
															 | 
															
															 | 
															
																        List<Map<String, Object>> infantInfoList = jdbcTemplate.queryForList(infantInfoSql); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        List list = new ArrayList(); 
															 | 
															
															 | 
															
																        List list = new ArrayList(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        System.out.println(infantInfoList.size()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        for (Map<String, Object> map : infantInfoList) { 
															 | 
															
															 | 
															
																        for (Map<String, Object> map : infantInfoList) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            ZhBaseInfantInfoDO zhBaseInfantInfoDO = new ZhBaseInfantInfoDO(); 
															 | 
															
															 | 
															
																            ZhBaseInfantInfoDO zhBaseInfantInfoDO = new ZhBaseInfantInfoDO(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            zhBaseInfantInfoDO.setPatient(map.get("id").toString()); 
															 | 
															
															 | 
															
																            zhBaseInfantInfoDO.setPatient(map.get("id").toString()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            zhBaseInfantInfoDO.setAddress(map.get("address").toString()); 
															 | 
															
															 | 
															
																            zhBaseInfantInfoDO.setAddress(map.get("address").toString()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            zhBaseInfantInfoDO.setAge(map.get("age").toString()); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            IdCardUtil.getAgeForIdcard(map.get("idcard").toString()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            zhBaseInfantInfoDO.setName(map.get("name").toString()); 
															 | 
															
															 | 
															
																            zhBaseInfantInfoDO.setName(map.get("name").toString()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            zhBaseInfantInfoDO.setCreateTime(DateUtil.strToDate(map.get("createTime").toString())); 
															 | 
															
															 | 
															
																            zhBaseInfantInfoDO.setCreateTime(DateUtil.strToDate(map.get("createTime").toString())); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            zhBaseInfantInfoDO.setEnterSchoolName(map.get("orgName").toString()); 
															 | 
															
															 | 
															
																            zhBaseInfantInfoDO.setEnterSchoolName(map.get("orgName").toString()); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -299,7 +301,7 @@ public class SaveDataPushJob implements Job { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    // 居民设备表 
															 | 
															
															 | 
															
																    // 居民设备表 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    public void savePatientDevice(String date,Map<String,String> signOlderMap){ 
															 | 
															
															 | 
															
																    public void savePatientDevice(String date,Map<String,String> signOlderMap){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        String patientDeviceSql = "SELECT id,device_id,`user`,category_code,device_name,user_idcard,doctor_name,hospital_name,device_type from wlyy_patient_device WHERE czrq >= '"+date+"'"; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        String patientDeviceSql = "SELECT id,device_id,`user`,category_code,device_name,user_idcard,doctor_name,hospital_name,device_type,czrq from wlyy_patient_device WHERE czrq >= '"+date+"'"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        List<ZhDevicePatientDevice> query = jdbcTemplate.query(patientDeviceSql, new BeanPropertyRowMapper<>(ZhDevicePatientDevice.class)); 
															 | 
															
															 | 
															
																        List<ZhDevicePatientDevice> query = jdbcTemplate.query(patientDeviceSql, new BeanPropertyRowMapper<>(ZhDevicePatientDevice.class)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        Iterator<ZhDevicePatientDevice> iterator = query.iterator(); 
															 | 
															
															 | 
															
																        Iterator<ZhDevicePatientDevice> iterator = query.iterator(); 
															 |