|
@ -1090,7 +1090,7 @@ public class RehabilitationInfoService {
|
|
|
String limitSql = " LIMIT " + (page - 1) * pagesize + "," + pagesize;
|
|
|
String sql = "SELECT * FROM ( " +
|
|
|
"SELECT DISTINCT " +
|
|
|
" a.idcard,a.id,a.`name`,a.birthday,a.phone,a.sex,a.mobile,TIMESTAMPDIFF(YEAR,a.birthday,NOW()) 'age', " +
|
|
|
" a.idcard,a.photo,a.id,a.`name`,a.birthday,a.phone,a.sex,a.mobile,TIMESTAMPDIFF(YEAR,a.birthday,NOW()) 'age', " +
|
|
|
" ( " +
|
|
|
" SELECT GROUP_CONCAT(q.`name`) FROM base_disease_hospital q " +
|
|
|
" INNER JOIN wlyy_patient_rehabilitation_plan w ON q.id = w.disease " +
|
|
@ -1241,7 +1241,7 @@ public class RehabilitationInfoService {
|
|
|
" a.id,a.`name`,a.birthday,a.phone,a.sex,a.mobile,TIMESTAMPDIFF(YEAR,a.birthday,NOW()) 'age',a.idcard, " +
|
|
|
" b.id 'planId',b.title 'planTitle',b.plan_doctor 'planDoctor',b.plan_doctor_name 'planDoctorName'" +
|
|
|
",d. `name` 'diseaseName',c.dept_name 'deptName', " +
|
|
|
" b.`status` 'planStatus', c.hospital_name 'hospitalName',b.medical_records_code medicalRecordsCode," +
|
|
|
" b.`status` 'planStatus', '厦门市第三医院' 'hospitalName',b.medical_records_code medicalRecordsCode," +
|
|
|
" c.from_source, " +
|
|
|
" CASE " +
|
|
|
" WHEN c.from_source='1' THEN '手动添加' " +
|
|
@ -1271,6 +1271,7 @@ public class RehabilitationInfoService {
|
|
|
if (StringUtils.isNotBlank(diseaseId)) {
|
|
|
sql += " AND d.id='" + diseaseId + "' ";
|
|
|
}
|
|
|
sql += " order by b.create_time desc ";
|
|
|
List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
|
|
|
|