Browse Source

互联网医院优化代码提交

huangwenjie 5 years ago
parent
commit
de67990783

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

@ -2797,6 +2797,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        wlyyOutpatientDO.setDoctor(doctor);
        wlyyOutpatientDO.setDoctorName(baseDoctorDO.getName());
        outpatientDao.save(wlyyOutpatientDO);
    }
    
    /**

+ 13 - 3
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -1064,15 +1064,17 @@ public class ImService {
			
			//发送外层SOCKET消息
			if("1".equals(wlyyOutpatientDO.getOutpatientType()) && "2".equals(wlyyOutpatientDO.getType())){
				System.out.println("发送外层SOCKET消息:1");
				JSONObject object = new JSONObject();
				object.put("socket_sms_type",5);
				object.put("relation_code",wlyyOutpatientDO.getId());
				imUtil.sendMessage(wlyyOutpatientDO.getDoctor(),wlyyOutpatientDO.getPatient(),"1",content);
				imUtil.sendMessage(wlyyOutpatientDO.getDoctor(),wlyyOutpatientDO.getPatient(),"1",object.toString());
			}else if("2".equals(wlyyOutpatientDO.getOutpatientType())){
				System.out.println("发送外层SOCKET消息:2");
				JSONObject object = new JSONObject();
				object.put("socket_sms_type",6);
				object.put("socket_sms_type",5);
				object.put("relation_code",wlyyOutpatientDO.getId());
				imUtil.sendMessage(wlyyOutpatientDO.getDoctor(),wlyyOutpatientDO.getGeneralDoctor(),"1",content);
				imUtil.sendMessage(wlyyOutpatientDO.getDoctor(),wlyyOutpatientDO.getGeneralDoctor(),"1",object.toString());
			}
			
			return result;
@ -1581,4 +1583,12 @@ public class ImService {
		
		return count;
	}
	
	public void testSendWaiSocketMessage(String sender,String reciver){
		imUtil.sendMessage(sender,reciver,"1","111");
	}
	
	public void sendWaiSocketMessage(String sender,String reciver,String content){
		imUtil.sendMessage(sender,reciver,"1",content);
	}
}

+ 3 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java

@ -399,6 +399,9 @@ public class BaseHospitalRequestMapping {
        
        //专科医生拒绝接诊
        public static final String refuseOutpatientByDoctor = "refuseOutpatientByDoctor";
    
        //测试发送外层SOCKET消息
        public static final String testSendWaiSocketMessage = "testSendWaiSocketMessage";
    }
    /**

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

@ -413,4 +413,16 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
	}
	
	
	@GetMapping(value = BaseHospitalRequestMapping.DodtorIM.testSendWaiSocketMessage)
	@ApiOperation(value = "测试发送处方消息", notes = "测试发送处方消息")
	public Envelop testSendWaiSocketMessage(@ApiParam(name = "sender", value = "发送者")
	                                            @RequestParam(value = "sender", required = false)String sender,
	                                        @ApiParam(name = "reviver", value = "接受者")
	                                        @RequestParam(value = "reviver", required = false)String reviver
	                                        )throws Exception{
		imService.testSendWaiSocketMessage(sender,reviver);
		return success("请求成功");
	}
	
	
}