|
@ -847,9 +847,12 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
|
|
|
String sql = "SELECT DISTINCT p.id,p.name,p.photo,p.idcard,p.mobile,p.openid,p.sex,p.pad_imei padImei " +
|
|
|
"from base_patient p INNER JOIN base_patient_wechat wc on p.id = wc.patient_id where p.del=1 and p.id='"+patient+"' and " +
|
|
|
" wc.wechat_id = '"+wxId+"' GROUP BY p.id ORDER BY wc.create_time desc";
|
|
|
Map<String,Object> result = jdbcTemplate.queryForMap(sql);
|
|
|
result.put("deviceType",deviceService.getPatientDeviceCategoryCode(result.get("id").toString()));
|
|
|
|
|
|
List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
Map<String,Object> result =null;
|
|
|
if (list.size()>0){
|
|
|
result = list.get(0);
|
|
|
result.put("deviceType",deviceService.getPatientDeviceCategoryCode(result.get("id").toString()));
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
}
|