|
@ -596,10 +596,10 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
|
|
|
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 sqlDevice = "SELECT category_code deviceFlag, IFNULL(online_status,0) status from wlyy_patient_device ";
|
|
|
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){
|
|
|
String paientId = map.get("id").toString();
|
|
|
String filterDevice = " WHERE user = '"+paientId+"' ORDER BY deviceFlag,status desc";
|
|
|
String filterDevice = " WHERE pd.device_sn = d.device_code and pd.user = '"+paientId+"' ORDER BY deviceFlag,status desc";
|
|
|
String idcardNo = map.get("idcard") + "";
|
|
|
Date birthday = DateUtil.strToDate(map.get("birthday").toString());
|
|
|
Integer age = IdCardUtil.getAgeByIdcardOrBirthday(idcardNo,birthday);
|