|
@ -211,7 +211,8 @@ public class ImService {
|
|
|
* @param doctorName 医生名字
|
|
|
* @return
|
|
|
*/
|
|
|
public List<Map<String, Object>> findConsultRecordByPatient(String patient, String id, String type, int page, int pagesize, String title, Integer status, Integer payStatus, String doctorName) {
|
|
|
public List<Map<String, Object>> findConsultRecordByPatient(String patient, String id, String type, int page, int pagesize,
|
|
|
String title, Integer status, Integer payStatus, String doctorName, String doctorId) {
|
|
|
|
|
|
|
|
|
String sql = "SELECT " +
|
|
@ -250,7 +251,9 @@ public class ImService {
|
|
|
"WHERE a.id=b.consult and d.id = h.doctor_code " +
|
|
|
"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(doctorId)) {
|
|
|
sql += " and d.id = '" + doctorId + "'";
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(title)) {
|
|
|
title = "%" + title + "%";
|
|
|
sql += " and a.title like '" + title + "'";
|
|
@ -300,7 +303,7 @@ public class ImService {
|
|
|
* @param title 标题关键字
|
|
|
* @return
|
|
|
*/
|
|
|
public Long countConsultRecordByPatient(String patient, String id, String type, String title) {
|
|
|
public Long countConsultRecordByPatient(String patient, String id, String type, String title, String doctorId) {
|
|
|
|
|
|
String sql = "SELECT " +
|
|
|
" COUNT(1) AS \"total\" " +
|
|
@ -318,7 +321,9 @@ public class ImService {
|
|
|
if (!StringUtils.isEmpty(id)) {
|
|
|
sql += " and a.id = '" + id + "'";
|
|
|
}
|
|
|
|
|
|
if (!StringUtils.isEmpty(doctorId)) {
|
|
|
sql += " and d.id = '" + doctorId + "'";
|
|
|
}
|
|
|
List<Map<String, Object>> rstotal = jdbcTemplate.queryForList(sql);
|
|
|
Long count = 0L;
|
|
|
if (rstotal != null && rstotal.size() > 0) {
|