浏览代码

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

wangjun 4 年之前
父节点
当前提交
0a37845396

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/order/pay/ylz/YlzPayService.java

@ -275,7 +275,7 @@ public class YlzPayService {
            jsonObject.put("applyDepaName",applyDepaName);//申请科室名称
            jsonObject.put("applyDoctorName",applyDoctorName);//申请医生姓名
            jsonObject.put("recipeTime",recipeTime);//处方时间yyyyMMddHHmmss
            jsonObject.put("fee",fee);//总费用
            jsonObject.put("fee",Double.parseDouble(fee)+15);//总费用
            jsonObject.put("recipeNum",recipeNum);//处方数
            System.out.println("推送模板消息参数"+jsonObject.toJSONString());
            //jsonObject.put("extra")

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

@ -1996,9 +1996,9 @@ public class ImService {
			WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(wlyyPrescriptionVO.getOutpatientId());
			if (wlyyOutpatientDO.getOutpatientType()!=null){
				if (wlyyOutpatientDO.getOutpatientType().equalsIgnoreCase("1")&&wlyyOutpatientDO.getType().equalsIgnoreCase("1")){
					String response = imUtil.sendImMsg(wlyyPrescriptionVO.getDoctor(), wlyyPrescriptionVO.getDoctorName(), wlyyPrescriptionVO.getPatientCode()+"_"+wlyyPrescriptionVO.getOutpatientId()+"_9", "24", JSON.toJSONString(wlyyPrescriptionDiagnosisVOS),"1");
					String response = imUtil.sendImMsg(wlyyPrescriptionVO.getDoctor(), wlyyPrescriptionVO.getDoctorName(), wlyyPrescriptionVO.getPatientCode()+"_"+wlyyPrescriptionVO.getOutpatientId()+"_9", "24", JSON.toJSONString(wlyyPrescriptionDiagnosisVOS),"1",null);
				}else if (wlyyOutpatientDO.getOutpatientType().equalsIgnoreCase("1")&&wlyyOutpatientDO.getType().equalsIgnoreCase("2")){
					String response = imUtil.sendImMsg(wlyyPrescriptionVO.getDoctor(), wlyyPrescriptionVO.getDoctorName(), wlyyPrescriptionVO.getPatientCode()+"_"+wlyyPrescriptionVO.getOutpatientId()+"_16", "24", JSON.toJSONString(wlyyPrescriptionDiagnosisVOS),"1");
					String response = imUtil.sendImMsg(wlyyPrescriptionVO.getDoctor(), wlyyPrescriptionVO.getDoctorName(), wlyyPrescriptionVO.getPatientCode()+"_"+wlyyPrescriptionVO.getOutpatientId()+"_16", "24", JSON.toJSONString(wlyyPrescriptionDiagnosisVOS),"1",null);
				}
			}
		}
@ -2014,9 +2014,9 @@ public class ImService {
			WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(wlyyPrescriptionVO.getOutpatientId());
			if (wlyyOutpatientDO.getOutpatientType()!=null){
				if (wlyyOutpatientDO.getOutpatientType().equalsIgnoreCase("1")&&wlyyOutpatientDO.getType().equalsIgnoreCase("1")){
					String response = imUtil.sendImMsg(wlyyPrescriptionVO.getDoctor(), wlyyPrescriptionVO.getDoctorName(), wlyyPrescriptionVO.getPatientCode()+"_"+wlyyPrescriptionVO.getOutpatientId()+"_9", "27", JSON.toJSONString(object),"1");
					String response = imUtil.sendImMsg(wlyyPrescriptionVO.getDoctor(), wlyyPrescriptionVO.getDoctorName(), wlyyPrescriptionVO.getPatientCode()+"_"+wlyyPrescriptionVO.getOutpatientId()+"_9", "27", JSON.toJSONString(object),"1",null);
				}else if (wlyyOutpatientDO.getOutpatientType().equalsIgnoreCase("1")&&wlyyOutpatientDO.getType().equalsIgnoreCase("2")){
					String response = imUtil.sendImMsg(wlyyPrescriptionVO.getDoctor(), wlyyPrescriptionVO.getDoctorName(), wlyyPrescriptionVO.getPatientCode()+"_"+wlyyPrescriptionVO.getOutpatientId()+"_16", "27", JSON.toJSONString(object),"1");
					String response = imUtil.sendImMsg(wlyyPrescriptionVO.getDoctor(), wlyyPrescriptionVO.getDoctorName(), wlyyPrescriptionVO.getPatientCode()+"_"+wlyyPrescriptionVO.getOutpatientId()+"_16", "27", JSON.toJSONString(object),"1",null);
				}
			}
		}
@ -2042,7 +2042,7 @@ public class ImService {
//			return imUtil.sendImMsg(doctor, doctorName, patient+"_"+outpatientId+"_9", "31",jsonObject.toString(),"1");
//		}else
		if("2".equals(outpatientType)){
			return imUtil.sendImMsg(doctor, doctorName, patient+"_"+outpatientId+"_12", "31",jsonObject.toString(),"1");
			return imUtil.sendImMsg(doctor, doctorName, patient+"_"+outpatientId+"_12", "31",jsonObject.toString(),"1",null);
		}else{
			return null;
		}
@ -2056,7 +2056,7 @@ public class ImService {
	 * @throws Exception
	 */
	public String sendOutPatientSuggestMsg(String msg,String doctor,String doctorName,String sessionid) throws Exception {
		return imUtil.sendImMsg(doctor, doctorName, sessionid, "34",msg,"1");
		return imUtil.sendImMsg(doctor, doctorName, sessionid, "34",msg,"1",null);
	}
	
	
@ -2072,9 +2072,9 @@ public class ImService {
	 */
	public String pushPrescriptionBackMsg(com.alibaba.fastjson.JSONObject jsonObject,String doctor,String doctorName,String outpatientId,String patient,String outpatientType) throws Exception {
		if("1".equals(outpatientType)){
			return imUtil.sendImMsg(doctor, doctorName, patient+"_"+outpatientId+"_9", "33",jsonObject.toString(),"1");
			return imUtil.sendImMsg(doctor, doctorName, patient+"_"+outpatientId+"_9", "33",jsonObject.toString(),"1",null);
		}else if("2".equals(outpatientType)){
			return imUtil.sendImMsg(doctor, doctorName, patient+"_"+outpatientId+"_12", "33",jsonObject.toString(),"1");
			return imUtil.sendImMsg(doctor, doctorName, patient+"_"+outpatientId+"_12", "33",jsonObject.toString(),"1",null);
		}else{
			return null;
		}
@ -2092,9 +2092,9 @@ public class ImService {
	 */
	public String sendOutPatientPayMsg(com.alibaba.fastjson.JSONObject jsonObject,String doctor,String doctorName,String outpatientId,String patient,String outpatientType) throws Exception {
		if("1".equals(outpatientType)){
			return imUtil.sendImMsg(doctor, doctorName, patient+"_"+outpatientId+"_9", "35",jsonObject.toString(),"1");
			return imUtil.sendImMsg(doctor, doctorName, patient+"_"+outpatientId+"_9", "35",jsonObject.toString(),"1",null);
		}else if("2".equals(outpatientType)){
			return imUtil.sendImMsg(doctor, doctorName, patient+"_"+outpatientId+"_12", "35",jsonObject.toString(),"1");
			return imUtil.sendImMsg(doctor, doctorName, patient+"_"+outpatientId+"_12", "35",jsonObject.toString(),"1",null);
		}else{
			return null;
		}
@ -2408,8 +2408,8 @@ public class ImService {
	 * @param business_type
	 * @return
	 */
	public String patientGuaidenceAppend(String sender_id, String sender_name, String session_id,String content_type, String content, String business_type)throws Exception  {
		return imUtil.sendImMsg(sender_id, sender_name,session_id, content_type, content, "1");
	public String patientGuaidenceAppend(String sender_id, String sender_name, String session_id,String content_type, String content, String business_type,String extend)throws Exception  {
		return imUtil.sendImMsg(sender_id, sender_name,session_id, content_type, content, "1",extend);
	}
	
	/**

+ 2 - 1
business/im-service/src/main/java/com/yihu/jw/im/util/ImUtil.java

@ -254,7 +254,7 @@ public class ImUtil {
	 * @param contentType 1文字 2图片消息
	 * @param content     内容
	 */
	public String sendImMsg(String from, String fromName, String sessionId, String contentType, String content, String businessType) {
	public String sendImMsg(String from, String fromName, String sessionId, String contentType, String content, String businessType,String extend) {
		String imAddr = im_host + "api/v2/sessions/" + sessionId + "/messages";
		System.out.println("im地址"+imAddr);
		JSONObject params = new JSONObject();
@ -264,6 +264,7 @@ public class ImUtil {
		params.put("content", content);
		params.put("session_id", sessionId);
		params.put("business_type", businessType);
		params.put("extend",extend);
		String response = HttpClientUtil.postBody(imAddr, params);
		return response;
	}

+ 3 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/PatientConsultEndpoint.java

@ -775,6 +775,8 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
			@RequestParam(value = "content_type", required = true) String content_type,
			@ApiParam(name = "content", value = "消息内容", defaultValue = "")
			@RequestParam(value = "content", required = true) String content,
			@ApiParam(name = "extend", value = "扩展内容", defaultValue = "")
			@RequestParam(value = "extend", required = false) String extend,
			@ApiParam(name = "type", value = "咨询type", defaultValue = "")
			@RequestParam(value = "type", required = false) String type,
			@ApiParam(name = "times", value = "times", defaultValue = "")
@ -831,7 +833,7 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
			}
		}
		session_id = imService.getPatientGuaidenceConsult(sender_id,session_id,type);
		String result = imService.patientGuaidenceAppend(sender_id,sender_name,session_id,content_type,content,"1");
		String result = imService.patientGuaidenceAppend(sender_id,sender_name,session_id,content_type,content,"1",extend);
		List<BaseDoctorRoleDO> doctorRoleDOS = doctorRoleDao.findByRoleCode("guidance");
		for (BaseDoctorRoleDO doctorRoleDO:doctorRoleDOS){
			System.out.println("发送外层SOCKET消息:通知医生导诊");

+ 2 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/consult/KnowledgeArticleService.java

@ -240,7 +240,7 @@ public class KnowledgeArticleService extends BaseJpaService<KnowledgeArticleDO,
					object.put("title",knowledgeArticleDO.getTitle());
					object.put("content",knowledgeArticleDO.getIntro());
					object.put("img",knowledgeArticleDO.getImage());
					imUtil.sendImMsg(patientBusinessDO.getDoctor(), patientBusinessDO.getDoctorName(), patientBusinessDO.getSessionId(), "4", object.toJSONString(),"1");
					imUtil.sendImMsg(patientBusinessDO.getDoctor(), patientBusinessDO.getDoctorName(), patientBusinessDO.getSessionId(), "4", object.toJSONString(),"1",null);
				}else {
					WlyySurveyUserDO wlyySurveyUserDO = new WlyySurveyUserDO();
					String doctor = patientBusinessDO.getDoctor();
@ -264,7 +264,7 @@ public class KnowledgeArticleService extends BaseJpaService<KnowledgeArticleDO,
						object.put("content",wlyySurveyTemplateDO.getTemplateComment());
						object.put("id",wlyySurveyTemplateDO.getId());
					}
					imUtil.sendImMsg(patientBusinessDO.getDoctor(), patientBusinessDO.getDoctorName(), patientBusinessDO.getSessionId(), "17", object.toJSONString(),"1");
					imUtil.sendImMsg(patientBusinessDO.getDoctor(), patientBusinessDO.getDoctorName(), patientBusinessDO.getSessionId(), "17", object.toJSONString(),"1",null);
				}
			}