|  | @ -2,6 +2,9 @@ package com.yihu.jw.hospital.endpoint.consult;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import com.alibaba.fastjson.JSONArray;
 | 
	
		
			
				|  |  | import com.alibaba.fastjson.JSONObject;
 | 
	
		
			
				|  |  | import com.yihu.jw.doctor.dao.BaseDoctorDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.im.ConsultTeamDo;
 | 
	
		
			
				|  |  | import com.yihu.jw.hospital.prescription.service.PrescriptionService;
 | 
	
		
			
				|  |  | import com.yihu.jw.im.service.ImService;
 | 
	
	
		
			
				|  | @ -9,11 +12,13 @@ import com.yihu.jw.restmodel.im.ConsultVO;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.web.Envelop;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.web.ListEnvelop;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
 | 
	
		
			
				|  |  | import com.yihu.jw.rm.base.BaseRequestMapping;
 | 
	
		
			
				|  |  | import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
 | 
	
		
			
				|  |  | import com.yihu.jw.util.date.DateUtil;
 | 
	
		
			
				|  |  | import io.swagger.annotations.Api;
 | 
	
		
			
				|  |  | import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  | import io.swagger.annotations.ApiParam;
 | 
	
		
			
				|  |  | import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  | import org.slf4j.Logger;
 | 
	
		
			
				|  |  | import org.slf4j.LoggerFactory;
 | 
	
		
			
				|  |  | import org.springframework.beans.factory.annotation.Autowired;
 | 
	
	
		
			
				|  | @ -38,6 +43,9 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
 | 
	
		
			
				|  |  | 	@Autowired
 | 
	
		
			
				|  |  | 	private PrescriptionService prescriptionService;
 | 
	
		
			
				|  |  | 	
 | 
	
		
			
				|  |  | 	@Autowired
 | 
	
		
			
				|  |  | 	private BaseDoctorDao baseDoctorDao;
 | 
	
		
			
				|  |  | 	
 | 
	
		
			
				|  |  | 	
 | 
	
		
			
				|  |  | 	@GetMapping (value = BaseHospitalRequestMapping.DodtorIM.findWaitingRoomOutpatientByDoctor)
 | 
	
		
			
				|  |  | 	@ApiOperation(value = "医生可接单列表(图文)", notes = "医生可接单列表(图文)")
 | 
	
	
		
			
				|  | @ -270,6 +278,7 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
 | 
	
		
			
				|  |  | 		result.put("zjCount",zjCount);//专家咨询数量
 | 
	
		
			
				|  |  | 		result.put("imgCount",imgCount);//图文复诊数量
 | 
	
		
			
				|  |  | 		result.put("videoCount",waitVideoCount+_videoOnlineCount);//视频复诊数量
 | 
	
		
			
				|  |  | 		result.put("xtCount",0);//协同门诊候诊数量
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		return success("请求成功",result);
 | 
	
	
		
			
				|  | @ -305,6 +314,13 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
 | 
	
		
			
				|  |  | 				json.put("id", consult.getId());
 | 
	
		
			
				|  |  | 				// 设置咨询类型:1专家咨询,9在线复诊,待扩展,13协同门诊
 | 
	
		
			
				|  |  | 				json.put("type", consult.getType());
 | 
	
		
			
				|  |  | 				
 | 
	
		
			
				|  |  | 				//如果是协同门诊,多返回全科医生的详细信息
 | 
	
		
			
				|  |  | 				if(13 == consult.getType() && StringUtils.isNoneBlank(consult.getGeneralDoctor())){
 | 
	
		
			
				|  |  | 					BaseDoctorDO baseDoctorDO = baseDoctorDao.findById(consult.getGeneralDoctor());
 | 
	
		
			
				|  |  | 					json.put("generalDoctorName", baseDoctorDO.getName());
 | 
	
		
			
				|  |  | 				}
 | 
	
		
			
				|  |  | 				
 | 
	
		
			
				|  |  | 				// 设置显示标题
 | 
	
		
			
				|  |  | 				json.put("title", consult.getTitle());
 | 
	
		
			
				|  |  | 				// 设置主诉
 | 
	
	
		
			
				|  | @ -315,10 +331,19 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
 | 
	
		
			
				|  |  | 				json.put("czrq", DateUtil.dateToStrLong(consult.getCzrq()));
 | 
	
		
			
				|  |  | 				//是否评价
 | 
	
		
			
				|  |  | 				json.put("evaluate", consult.getEvaluate());
 | 
	
		
			
				|  |  | 				//患者头像
 | 
	
		
			
				|  |  | 				json.put("patientPhoto", consult.getPatientphoto());
 | 
	
		
			
				|  |  | 				//患者名称
 | 
	
		
			
				|  |  | 				json.put("patientName", consult.getPatientName());
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 				//患者ID
 | 
	
		
			
				|  |  | 				json.put("patientId", consult.getPatientId());
 | 
	
		
			
				|  |  | 				//患者性别
 | 
	
		
			
				|  |  | 				json.put("patientsex", consult.getPatientsex());
 | 
	
		
			
				|  |  | 				//患者年龄
 | 
	
		
			
				|  |  | 				json.put("patientAge", DateUtil.getAgeForIdcard(consult.getPatientIdcard()));
 | 
	
		
			
				|  |  | 				//就诊记录ID
 | 
	
		
			
				|  |  | 				json.put("outpatientId", consult.getOutpatientid());
 | 
	
		
			
				|  |  | 				//图文或者视频类型
 | 
	
		
			
				|  |  | 				json.put("consultType", consult.getConsultType());
 | 
	
		
			
				|  |  | 				//诊断
 | 
	
		
			
				|  |  | 				json.put("icd10Name", consult.getIcd10Name());
 | 
	
		
			
				|  |  | 				
 | 
	
		
			
				|  |  | 				array.add(json);
 | 
	
		
			
				|  |  | 			}
 |