|  | @ -622,12 +622,12 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |         sql += filter1;
 |  |         sql += filter1;
 | 
												
													
														
															|  |         sql += " GROUP BY a.id,a.name,a.photo,a.idcard,a.birthday,a.residential_area,a.sex,online,signStatus ";
 |  |         sql += " GROUP BY a.id,a.name,a.photo,a.idcard,a.birthday,a.residential_area,a.sex,online,signStatus ";
 | 
												
													
														
															|  |         sql += " ORDER BY online desc,signStatus desc";
 |  | 
 | 
												
													
														
															|  | 
 |  |         sql += " ORDER BY online desc,a.ykt_id desc,signStatus desc";
 | 
												
													
														
															|  |         sql += limit;
 |  |         sql += limit;
 | 
												
													
														
															|  |         List<Map<String,Object>>  list = jdbcTemplate.queryForList(sql);
 |  |         List<Map<String,Object>>  list = jdbcTemplate.queryForList(sql);
 | 
												
													
														
															|  |         String sqlLife= "SELECT COUNT(*) from base_life_care_order where `status` = 2";
 |  | 
 | 
												
													
														
															|  |         String sqlEmergency= "SELECT COUNT(*) from base_emergency_assistance_order where `status` = 0";
 |  | 
 | 
												
													
														
															|  |         String sqlSecurity= "SELECT COUNT(*) from base_security_monitoring_order where `status` = 7 ";
 |  | 
 | 
												
													
														
															|  | 
 |  |         String sqlLife= "SELECT COUNT(*) from base_life_care_order ";
 | 
												
													
														
															|  | 
 |  |         String sqlEmergency= "SELECT COUNT(*) from base_emergency_assistance_order ";
 | 
												
													
														
															|  | 
 |  |         String sqlSecurity= "SELECT COUNT(*) from base_security_monitoring_order  ";
 | 
												
													
														
															|  |         String sqlDevice = "SELECT pd.category_code deviceFlag, IFNULL(d.contact_status,0) status from wlyy_patient_device pd,wlyy_devices d";
 |  |         String sqlDevice = "SELECT pd.category_code deviceFlag, IFNULL(d.contact_status,0) status from wlyy_patient_device pd,wlyy_devices d";
 | 
												
													
														
															|  |         for (Map<String,Object> map:list){
 |  |         for (Map<String,Object> map:list){
 | 
												
													
														
															|  |             String paientId = map.get("id").toString();
 |  |             String paientId = map.get("id").toString();
 | 
												
											
												
													
														
															|  | @ -636,7 +636,7 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
 | 
												
													
														
															|  |             Date birthday = DateUtil.strToDate(map.get("birthday").toString());
 |  |             Date birthday = DateUtil.strToDate(map.get("birthday").toString());
 | 
												
													
														
															|  |             Integer age = IdCardUtil.getAgeByIdcardOrBirthday(idcardNo,birthday);
 |  |             Integer age = IdCardUtil.getAgeByIdcardOrBirthday(idcardNo,birthday);
 | 
												
													
														
															|  |             map.put("age",age);
 |  |             map.put("age",age);
 | 
												
													
														
															|  |             String filter = " and patient = '"+paientId+"'";
 |  | 
 | 
												
													
														
															|  | 
 |  |             String filter = " where patient = '"+paientId+"'";
 | 
												
													
														
															|  |             Integer lifeCare = jdbcTemplate.queryForObject(sqlLife+filter,Integer.class);
 |  |             Integer lifeCare = jdbcTemplate.queryForObject(sqlLife+filter,Integer.class);
 | 
												
													
														
															|  |             Integer emergency = jdbcTemplate.queryForObject(sqlEmergency+filter,Integer.class);
 |  |             Integer emergency = jdbcTemplate.queryForObject(sqlEmergency+filter,Integer.class);
 | 
												
													
														
															|  |             Integer security = jdbcTemplate.queryForObject(sqlSecurity+filter,Integer.class);
 |  |             Integer security = jdbcTemplate.queryForObject(sqlSecurity+filter,Integer.class);
 | 
												
											
												
													
														
															|  | @ -681,7 +681,7 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
 | 
												
													
														
															|  |         String sql = "SELECT a.id,a.name,a.photo,a.sex,IFNULL(a.on_line,0) online from base_doctor a,base_doctor_hospital h" +
 |  |         String sql = "SELECT a.id,a.name,a.photo,a.sex,IFNULL(a.on_line,0) online from base_doctor a,base_doctor_hospital h" +
 | 
												
													
														
															|  |                 "  WHERE a.id=h.doctor_code and a.doctor_level = 2 and a.del = '1' and h.del = '1' ";
 |  |                 "  WHERE a.id=h.doctor_code and a.doctor_level = 2 and a.del = '1' and h.del = '1' ";
 | 
												
													
														
															|  |         if(!StringUtil.isBlank(name)){
 |  |         if(!StringUtil.isBlank(name)){
 | 
												
													
														
															|  |             sql+= " a.and name like '%"+name+"%' ";
 |  | 
 | 
												
													
														
															|  | 
 |  |             sql+= " and a.name like '%"+name+"%' ";
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |         sql += fileter;
 |  |         sql += fileter;
 | 
												
													
														
															|  |         sql += " ORDER BY online desc";
 |  |         sql += " ORDER BY online desc";
 |