Explorar o código

修改医生端专家咨询搜索无记录的BUG

huangwenjie %!s(int64=5) %!d(string=hai) anos
pai
achega
f4d5621c52

+ 48 - 23
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -1581,29 +1581,54 @@ public class ImService {
			pagesize = 10;
		}
		
		String  sql = "SELECT " +
				"a.id AS id," +
				"a.type AS type," +
				"a.title AS title," +
				"a.symptoms AS symptoms," +
				"a.czrq AS czrq," +
				"b.status AS status," +
				"b.evaluate AS evaluate," +
				"d.name AS patientName," +
				"d.id as patientId," +
				"d.idcard as patientIdcard," +
				"d.sex as patientsex," +
				"op.id as outpatientid," +
				"op.type as consultType," +
				"op.general_doctor as generalDoctor," +
				"op.icd10_name as icd10Name," +
				"d.photo AS patientphoto " +
				"FROM wlyy_consult a," +
				"wlyy_consult_team b," +
				"base_patient d, " +
				"wlyy_outpatient op " +
				"WHERE a.id=b.consult " +
				"AND b.patient=d.id AND b.doctor='"+doctor+"' AND a.relation_code = op.id ";
		String  sql = "";
		if(1 == type || 15 ==type){
			sql = "SELECT " +
					"a.id AS id," +
					"a.type AS type," +
					"a.title AS title," +
					"a.symptoms AS symptoms," +
					"a.czrq AS czrq," +
					"b.status AS status," +
					"b.evaluate AS evaluate," +
					"d.name AS patientName," +
					"d.id as patientId," +
					"d.idcard as patientIdcard," +
					"d.sex as patientsex," +
					"op.id as outpatientid," +
					"op.type as consultType," +
					"op.general_doctor as generalDoctor," +
					"op.icd10_name as icd10Name," +
					"d.photo AS patientphoto " +
					"FROM wlyy_consult a," +
					"wlyy_consult_team b," +
					"base_patient d, " +
					"wlyy_outpatient op " +
					"WHERE a.id=b.consult " +
					"AND b.patient=d.id AND b.doctor='"+doctor+"' AND a.relation_code = op.id ";
		}else{
			sql = "SELECT " +
					"a.id AS id," +
					"a.type AS type," +
					"a.title AS title," +
					"a.symptoms AS symptoms," +
					"a.czrq AS czrq," +
					"b.status AS status," +
					"b.evaluate AS evaluate," +
					"d.name AS patientName," +
					"d.id as patientId," +
					"d.idcard as patientIdcard," +
					"d.sex as patientsex," +
					"d.photo AS patientphoto " +
					"FROM wlyy_consult a," +
					"wlyy_consult_team b," +
					"base_patient d " +
					"WHERE a.id=b.consult " +
					"AND b.patient=d.id AND b.doctor='"+doctor+"'";
		}
		
		
		
		List<ConsultVO> result = new ArrayList<>();
		
		if(!StringUtils.isEmpty(title)){