|
@ -231,8 +231,12 @@ public class ImService {
|
|
|
sql = sql + "b.status AS \"status\"," +
|
|
|
"b.evaluate AS \"evaluate\"," +
|
|
|
"d.name AS \"doctorName\"," +
|
|
|
"p.name AS \"patientName\"," +
|
|
|
"p.photo AS \"patientphoto\"," +
|
|
|
"d.photo AS \"doctorphoto\"," +
|
|
|
"d.id AS \"doctorCode\"," +
|
|
|
"p.idcard AS \"patientIdcard\"," +
|
|
|
"d.idcard AS \"doctorIdcard\"," +
|
|
|
"d.job_title_name AS \"jobTitleName\", " +
|
|
|
"h.dept_name AS \"deptName\", " +
|
|
|
"h.org_name AS \"hospitalName\", " +
|
|
@ -241,9 +245,10 @@ public class ImService {
|
|
|
"FROM wlyy_consult a," +
|
|
|
"wlyy_consult_team b," +
|
|
|
"base_doctor d, " +
|
|
|
"base_patient p, " +
|
|
|
"base_doctor_hospital h " +
|
|
|
"WHERE a.id=b.consult and d.id = h.doctor_code " +
|
|
|
"AND b.doctor=d.id AND a.patient='" + patient + "' AND a.type in (" + type + ")";
|
|
|
"AND b.doctor=d.id and p.id=a.patient AND a.patient='" + patient + "' AND a.type in (" + type + ")";
|
|
|
/*List<ConsultVO> result = new ArrayList<>();*/
|
|
|
|
|
|
if (!StringUtils.isEmpty(title)) {
|
|
@ -278,6 +283,10 @@ public class ImService {
|
|
|
sql += " ORDER BY a.czrq desc ";
|
|
|
logger.info("sql=" + sql);
|
|
|
List<Map<String, Object>> result = hibenateUtils.createSQLQuery(sql, page, pagesize);
|
|
|
for (Map<String, Object> map:result){
|
|
|
map.put("patientAge",IdCardUtil.getAgeForIdcard(map.get("patientIdcard")+""));
|
|
|
map.put("doctorAge",IdCardUtil.getAgeForIdcard(map.get("doctorIdcard")+""));
|
|
|
}
|
|
|
/*result = jdbcTemplate.query(sql, new BeanPropertyRowMapper(ConsultVO.class));*/
|
|
|
return result;
|
|
|
}
|