|
@ -127,6 +127,17 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
|
|
return res;
|
|
return res;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 更新在线状态
|
|
|
|
* @param patientId
|
|
|
|
* @param online
|
|
|
|
*/
|
|
|
|
public void updOnline(String patientId,String online){
|
|
|
|
BasePatientDO patientDO = patientDao.findById(patientId);
|
|
|
|
patientDO.setOnline(online);
|
|
|
|
patientDao.save(patientDO);
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 居民id
|
|
* 居民id
|
|
* @param agent 代理人id
|
|
* @param agent 代理人id
|
|
@ -522,7 +533,7 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
|
|
*/
|
|
*/
|
|
public List<Map<String,Object>> findChild(String name,String residentialArea,String limit,String filter1){
|
|
public List<Map<String,Object>> findChild(String name,String residentialArea,String limit,String filter1){
|
|
String sql = "SELECT id,name,photo,idcard,CAST(IFNULL(birthday,'') AS char ) birthday,residential_area residentialArea" +
|
|
String sql = "SELECT id,name,photo,idcard,CAST(IFNULL(birthday,'') AS char ) birthday,residential_area residentialArea" +
|
|
",sex,IFNULL(on_line,0) online from base_patient WHERE archive_type = 2 and del = '1' ";
|
|
|
|
|
|
",sex,if(openid is null,0,1) online from base_patient WHERE archive_type = 2 and del = '1' ";
|
|
if(!StringUtil.isBlank(name)){
|
|
if(!StringUtil.isBlank(name)){
|
|
sql+= " and name like '%"+name+"%' ";
|
|
sql+= " and name like '%"+name+"%' ";
|
|
}
|
|
}
|
|
@ -570,7 +581,8 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
|
|
*/
|
|
*/
|
|
public List<Map<String,Object>> findOld(String name,String residentialArea,String limit,JSONObject json,String filter1){
|
|
public List<Map<String,Object>> findOld(String name,String residentialArea,String limit,JSONObject json,String filter1){
|
|
String sql = "SELECT a.id,a.name,a.photo,a.idcard,CAST(IFNULL(a.birthday,'') AS char ) birthday,a.residential_area residentialArea,a.sex " +
|
|
String sql = "SELECT a.id,a.name,a.photo,a.idcard,CAST(IFNULL(a.birthday,'') AS char ) birthday,a.residential_area residentialArea,a.sex " +
|
|
", GROUP_CONCAT(DISTINCT d.category_code) deviceFlag,IFNULL(on_line,0) online,IFNULL(sign_status,0) signStatus from base_patient a " +
|
|
|
|
|
|
", GROUP_CONCAT(DISTINCT d.category_code) deviceFlag,case 1 WHEN openid is not null then 1 " +
|
|
|
|
" WHEN a.on_line = '1' then 1 ELSE 0 end as online,IFNULL(sign_status,0) signStatus from base_patient a " +
|
|
" LEFT JOIN wlyy_patient_device d on d.`user`=a.id WHERE a.archive_type = 1 and a.del = '1' ";
|
|
" LEFT JOIN wlyy_patient_device d on d.`user`=a.id WHERE a.archive_type = 1 and a.del = '1' ";
|
|
if(!StringUtil.isBlank(name)){
|
|
if(!StringUtil.isBlank(name)){
|
|
sql+= " and name like '%"+name+"%' ";
|
|
sql+= " and name like '%"+name+"%' ";
|
|
@ -624,7 +636,7 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public List<Map<String,Object>> findHelper(String name,String limit,String fileter){
|
|
public List<Map<String,Object>> findHelper(String name,String limit,String fileter){
|
|
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,if(openid is null,0,1) 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+= " a.and name like '%"+name+"%' ";
|