|
@ -516,6 +516,41 @@ public class ConsultTeamService extends ConsultService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 查询居民咨询记录
|
|
|
*
|
|
|
* @param patient
|
|
|
* @param teamCode
|
|
|
* @param page
|
|
|
* @param pageSize
|
|
|
* @return
|
|
|
*/
|
|
|
public JSONArray findByPatientAndTeam(String patient, Long teamCode, int page, int pageSize) {
|
|
|
PageRequest pageRequest = new PageRequest(page, pageSize);
|
|
|
Patient p = patientDao.findByCode(patient);
|
|
|
Page<Object> result = consultDao.findByPatientAndTeam(patient, teamCode, pageRequest);
|
|
|
JSONArray array = new JSONArray();
|
|
|
|
|
|
for (Object obj : result) {
|
|
|
JSONObject consult = new JSONObject();
|
|
|
Object[] objArr = (Object[]) obj;
|
|
|
consult.put("id", objArr[0]);
|
|
|
consult.put("code", objArr[2]);
|
|
|
consult.put("type", objArr[1]);
|
|
|
consult.put("title", objArr[3]);
|
|
|
consult.put("symptoms", objArr[4]);
|
|
|
consult.put("czrq", objArr[5]);
|
|
|
consult.put("status", objArr[6]);
|
|
|
consult.put("adminTeamCode", objArr[7]);
|
|
|
consult.put("patient", patient);
|
|
|
consult.put("patientName", p.getName());
|
|
|
consult.put("patientPhoto", p.getPhoto());
|
|
|
array.put(consult);
|
|
|
}
|
|
|
|
|
|
return array;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 网络咨询咨询日志查询
|
|
|
*
|