huangwenjie před 5 roky
rodič
revize
74ecb5a47d

+ 3 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -2342,9 +2342,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @param doctor
     * @param type 1:图文诊室,2:视频诊室(视频复诊、协同门诊)
     * @query_status 0:图文复诊候诊 1:图文复诊抢单列表
     * @dept 部门
     * @return
     */
    public List<Map<String,Object>> findWaitingRoomOutpatientByDoctor(String doctor, Integer type,Integer query_status) {
    public List<Map<String,Object>> findWaitingRoomOutpatientByDoctor(String doctor, Integer type,Integer query_status,String dept) {
        
        String sql ="SELECT " +
                "room.outpatient_id AS id," +
@ -2367,6 +2368,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "WHERE " +
                "room.patient_id=patient.id " +
                "AND room.outpatient_id=outpatient.id " +
                "AND outpatient.dept='"+dept+"' "+
                "AND outpatient.status = 0 ";
        //视频复诊,协同门诊 医生抢单
        if(type == 2 ){

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

@ -276,10 +276,10 @@ public class ImService {
	 * @param general_doctor  全科医生
	 * @return
	 */
	public String  getUnfinishedConsultByActualSender(String patient, String general_doctor) {
		
	public JSONObject  getUnfinishedConsultByActualSender(String patient, String general_doctor) {
		JSONObject result = new JSONObject();
		
		String totalSql = "SELECT a.consult as consultCode " +
		String totalSql = "SELECT a.consult as consultCode,a.doctor as specialDoctor " +
				"FROM wlyy_consult_team a,wlyy_consult_team_doctor b " +
				"WHERE a.consult=b.consult " +
				"AND a.patient= '" +patient+"' "+
@ -291,10 +291,15 @@ public class ImService {
		List<Map<String, Object>> rstotal = jdbcTemplate.queryForList(totalSql);
		
		String consultCode = "";
		String special_doctor = "";
		if (rstotal != null && rstotal.size() > 0) {
			consultCode = rstotal.get(0).get("consultCode").toString();
			special_doctor = rstotal.get(0).get("specialDoctor").toString();
			result.put("consultCode",consultCode);
			result.put("special_doctor",special_doctor);
			
		}
		return consultCode;
		return result;
	}
	
	
@ -1817,7 +1822,7 @@ public class ImService {
		String sessionId = "";
		messages = imUtil.getCreateTopicMessage(generalDoctor.getId(),generalDoctor.getName(), consult.getTitle(), content, consult.getImages(), special_doctor);
		//5、(im创建咨询) 续方咨询的sessionid为居民code+就诊code+12(图文,视频,图文+视频)
		sessionId = patient_code+"_"+general_doctor + "_" + ct.getType();
		sessionId = patient_code+"_"+general_doctor + "_" +special_doctor + "_"+ct.getType();
		obj = imUtil.createTopics(sessionId, consult.getId(), p.getName(), users, messages, imUtil.SESSION_TYPE_GENERAL_EXPERT);
		
		if (obj == null) {

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

@ -75,8 +75,10 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
			@ApiParam(name = "type", value = "图文诊室:1、视频:2")
			@RequestParam(value = "type",required = true) Integer type,
			@ApiParam(name = "query_status", value = "0:图文复诊候诊 1:图文复诊抢单列表")
			@RequestParam(value = "",required = false) Integer query_status){
		return success("请求成功",prescriptionService.findWaitingRoomOutpatientByDoctor(doctor,type,query_status));
			@RequestParam(value = "",required = false) Integer query_status,
			@ApiParam(name = "dept", value = "部门")
			@RequestParam(value = "",required = true) String dept){
		return success("请求成功",prescriptionService.findWaitingRoomOutpatientByDoctor(doctor,type,query_status,dept));
	}
	
	@GetMapping(value = BaseHospitalRequestMapping.DodtorIM.findWaitingRoomPatient)
@ -535,9 +537,7 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
		if(org.apache.axis.utils.StringUtils.isEmpty(patient_code)){
			patient_code= getUID();
		}
		
		String consultCode = imService.getUnfinishedConsultByActualSender(patient_code,general_doctor);
		return success("请求成功",consultCode);
		return success("请求成功",imService.getUnfinishedConsultByActualSender(patient_code,general_doctor));
	}
	
	@GetMapping(value = BaseHospitalRequestMapping.DodtorIM.expertConsultRecords)