Parcourir la source

修改协同服务BUG

huangwenjie il y a 5 ans
Parent
commit
cdbcf7def4

+ 20 - 5
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -956,7 +956,13 @@ public class ImService {
			
			
			//4、创建咨询
			//4、创建咨询
			JSONObject users = new JSONObject();//咨询参与者
			JSONObject users = new JSONObject();//咨询参与者
			users.put(patient, 0);
			
			//协同门诊
			if("2".equals(wlyyOutpatientDO.getOutpatientType())){
				users.put(wlyyOutpatientDO.getGeneralDoctor(),0);
			}else{
				users.put(patient, 0);
			}
			users.put(doctorCode, 0);
			users.put(doctorCode, 0);
			//关联业务code
			//关联业务code
			ct.setRelationCode(outpatientCode);
			ct.setRelationCode(outpatientCode);
@ -1425,12 +1431,20 @@ public class ImService {
				"b.status AS status," +
				"b.status AS status," +
				"b.evaluate AS evaluate," +
				"b.evaluate AS evaluate," +
				"d.name AS patientName," +
				"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 " +
				"d.photo AS patientphoto " +
				"FROM wlyy_consult a," +
				"FROM wlyy_consult a," +
				"wlyy_consult_team b," +
				"wlyy_consult_team b," +
				"base_patient d " +
				"base_patient d, " +
				"wlyy_outpatient op " +
				"WHERE a.id=b.consult " +
				"WHERE a.id=b.consult " +
				"AND b.patient=d.id AND b.doctor='"+doctor+"' ";
				"AND b.patient=d.id AND b.doctor='"+doctor+"' AND a.relation_code = op.id ";
		List<ConsultVO> result = new ArrayList<>();
		List<ConsultVO> result = new ArrayList<>();
		
		
		if(!StringUtils.isEmpty(title)){
		if(!StringUtils.isEmpty(title)){
@ -1481,9 +1495,10 @@ public class ImService {
				" COUNT(1) AS total " +
				" COUNT(1) AS total " +
				"FROM wlyy_consult a," +
				"FROM wlyy_consult a," +
				"wlyy_consult_team b," +
				"wlyy_consult_team b," +
				"base_patient d " +
				"base_patient d," +
				"wlyy_outpatient op " +
				"WHERE a.id=b.consult " +
				"WHERE a.id=b.consult " +
				"AND b.patient=d.id AND b.doctor='"+doctor+"' ";
				"AND b.patient=d.id AND b.doctor='"+doctor+"' AND a.relation_code = op.id  ";
		List<ConsultVO> result = new ArrayList<>();
		List<ConsultVO> result = new ArrayList<>();
		
		
		if(!StringUtils.isEmpty(title)){
		if(!StringUtils.isEmpty(title)){

+ 78 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/im/ConsultVO.java

@ -46,6 +46,28 @@ public class ConsultVO extends UuidIdentityVO {
	@ApiModelProperty(value = "患者名称", example = "模块1")
	@ApiModelProperty(value = "患者名称", example = "模块1")
	private String patientName;
	private String patientName;
	
	
	@ApiModelProperty(value = "患者ID", example = "模块1")
	private String patientId;
	
	
	@ApiModelProperty(value = "患者身份证", example = "模块1")
	private String patientIdcard;
	
	@ApiModelProperty(value = "患者性别", example = "模块1")
	private String patientsex;
	
	@ApiModelProperty(value = "就诊记录ID", example = "模块1")
	private String outpatientid;
	
	@ApiModelProperty(value = "1图文,2视频", example = "模块1")
	private String consultType;
	
	@ApiModelProperty(value = "全科医生", example = "模块1")
	private String generalDoctor;
	
	@ApiModelProperty(value = "诊断", example = "模块1")
	private String icd10Name;
	
	public Integer getType() {
	public Integer getType() {
		return type;
		return type;
	}
	}
@ -133,4 +155,60 @@ public class ConsultVO extends UuidIdentityVO {
	public void setPatientName(String patientName) {
	public void setPatientName(String patientName) {
		this.patientName = patientName;
		this.patientName = patientName;
	}
	}
	
	public String getPatientId() {
		return patientId;
	}
	
	public void setPatientId(String patientId) {
		this.patientId = patientId;
	}
	
	public String getPatientIdcard() {
		return patientIdcard;
	}
	
	public void setPatientIdcard(String patientIdcard) {
		this.patientIdcard = patientIdcard;
	}
	
	public String getPatientsex() {
		return patientsex;
	}
	
	public void setPatientsex(String patientsex) {
		this.patientsex = patientsex;
	}
	
	public String getOutpatientid() {
		return outpatientid;
	}
	
	public void setOutpatientid(String outpatientid) {
		this.outpatientid = outpatientid;
	}
	
	public String getConsultType() {
		return consultType;
	}
	
	public void setConsultType(String consultType) {
		this.consultType = consultType;
	}
	
	public String getGeneralDoctor() {
		return generalDoctor;
	}
	
	public void setGeneralDoctor(String generalDoctor) {
		this.generalDoctor = generalDoctor;
	}
	
	public String getIcd10Name() {
		return icd10Name;
	}
	
	public void setIcd10Name(String icd10Name) {
		this.icd10Name = icd10Name;
	}
}
}

+ 29 - 4
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/DoctorConsultEndpoint.java

@ -2,6 +2,9 @@ package com.yihu.jw.hospital.endpoint.consult;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
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.entity.base.im.ConsultTeamDo;
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
import com.yihu.jw.im.service.ImService;
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.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
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.rm.hospital.BaseHospitalRequestMapping;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.date.DateUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
@ -38,6 +43,9 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
	@Autowired
	@Autowired
	private PrescriptionService prescriptionService;
	private PrescriptionService prescriptionService;
	
	
	@Autowired
	private BaseDoctorDao baseDoctorDao;
	
	
	
	@GetMapping (value = BaseHospitalRequestMapping.DodtorIM.findWaitingRoomOutpatientByDoctor)
	@GetMapping (value = BaseHospitalRequestMapping.DodtorIM.findWaitingRoomOutpatientByDoctor)
	@ApiOperation(value = "医生可接单列表(图文)", notes = "医生可接单列表(图文)")
	@ApiOperation(value = "医生可接单列表(图文)", notes = "医生可接单列表(图文)")
@ -270,6 +278,7 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
		result.put("zjCount",zjCount);//专家咨询数量
		result.put("zjCount",zjCount);//专家咨询数量
		result.put("imgCount",imgCount);//图文复诊数量
		result.put("imgCount",imgCount);//图文复诊数量
		result.put("videoCount",waitVideoCount+_videoOnlineCount);//视频复诊数量
		result.put("videoCount",waitVideoCount+_videoOnlineCount);//视频复诊数量
		result.put("xtCount",0);//协同门诊候诊数量
		
		
		
		
		return success("请求成功",result);
		return success("请求成功",result);
@ -305,6 +314,13 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
				json.put("id", consult.getId());
				json.put("id", consult.getId());
				// 设置咨询类型:1专家咨询,9在线复诊,待扩展,13协同门诊
				// 设置咨询类型:1专家咨询,9在线复诊,待扩展,13协同门诊
				json.put("type", consult.getType());
				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());
				json.put("title", consult.getTitle());
				// 设置主诉
				// 设置主诉
@ -315,10 +331,19 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
				json.put("czrq", DateUtil.dateToStrLong(consult.getCzrq()));
				json.put("czrq", DateUtil.dateToStrLong(consult.getCzrq()));
				//是否评价
				//是否评价
				json.put("evaluate", consult.getEvaluate());
				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);
				array.add(json);
			}
			}