Prechádzať zdrojové kódy

Merge branch 'dev' of chenweida/patient-co-management into dev

chenweida 8 rokov pred
rodič
commit
2b62d2029d

+ 5 - 5
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/PatientHealthGuidanceService.java

@ -114,21 +114,21 @@ public class PatientHealthGuidanceService extends BaseService {
		guidance = patientHealthGuidanceDao.save(guidance);
		String openId = null;
		String name = null;
//		String name = null;
		JSONObject json = new JSONObject();
		//判定openId是否为空空,如果为空,查找他家人的openId
		if(StringUtils.isNotBlank(patient.getOpenid())){
			json.put("first", "健康指导提醒");
			name = patient.getName();
			//name = patient.getName();
			openId = patient.getOpenid();
		}else{
			JSONObject j = weiXinOpenIdUtils.getFamilyOpenId(patient.getCode());
			Patient member = (Patient)j.get("member");
			openId = member.getOpenid();
			name = member.getName();
			//name = member.getName();
			if (StringUtils.isNotEmpty(openId)) {
				json.put("first", weiXinOpenIdUtils.getTitleMes(patient, j.getInt("relation"), member.getName()) + "健康指导提醒");
				json.put("first", weiXinOpenIdUtils.getTitleMes(patient, j.getInt("relation"), patient.getName()) + "健康指导提醒");
			}
		}
		if (guidance != null && StringUtils.isNotEmpty(openId)) {
@ -141,7 +141,7 @@ public class PatientHealthGuidanceService extends BaseService {
			json.put("content", "您好!医生给您发来了一份新的健康指导。");
			json.put("remark", "请点击查看");
			// 推送消息到微信端
			PushMsgTask.getInstance().putWxMsg(accessToken, 4, openId, name, json);
			PushMsgTask.getInstance().putWxMsg(accessToken, 4, openId, patient.getName(), json);
		}
		return guidance;
	}

+ 16 - 17
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/BookingController.java

@ -296,21 +296,20 @@ public class BookingController extends WeixinBaseController {
            if (obj != null) {
                Patient p = patientService.findByCode(obj.getPatient());
                String msg = "您成功预约了 " + obj.getOrgName() + " " + obj.getDoctorName() + " " + obj.getStartTime() + " 的号源!";
                if (StringUtils.isNotEmpty(p.getOpenid())) {
                    // 推送消息给微信端
                    JSONObject json = new JSONObject();
                    json.put("first", "");
                    json.put("toUser", p.getCode());
                    json.put("id", obj.getCode());
                    json.put("date", obj.getStartTime());
                    json.put("orgCode", obj.getOrgCode());
                    json.put("orgName", obj.getOrgName());
                    json.put("doctorName", obj.getDoctorName());
                    json.put("deptName", obj.getDeptName());
                    json.put("remark", p.getName() + ",您好!" + msg);
                    //判断是否判定openId,有没有发则查找家人发送
                    if(StringUtils.isNotBlank(p.getOpenid())){
                // 推送消息给微信端
                JSONObject json = new JSONObject();
                json.put("first", "");
                json.put("toUser", p.getCode());
                json.put("id", obj.getCode());
                json.put("date", obj.getStartTime());
                json.put("orgCode", obj.getOrgCode());
                json.put("orgName", obj.getOrgName());
                json.put("doctorName", obj.getDoctorName());
                json.put("deptName", obj.getDeptName());
                json.put("remark", p.getName() + ",您好!" + msg);
                //判断是否判定openId,有没有发则查找家人发送
                if(StringUtils.isNotBlank(p.getOpenid())){
                        // 添加到发送队列
                        PushMsgTask.getInstance().putWxMsg(getAccessToken(), 6, p.getOpenid(), p.getName(), json);
                    }else{
@ -322,10 +321,10 @@ public class BookingController extends WeixinBaseController {
                            json.put("first",weiXinOpenIdUtils.getTitleMes(p,j.getInt("relation"),member.getName())+first);
                            PushMsgTask.getInstance().putWxMsg(getAccessToken(), 6, member.getOpenid(), member.getName(), json);
                        }
                    }
                }
                }
                //发送短信小时
                // 调用总部发送信息的接口
                //String result = HttpClientUtil.post(SystemConf.getInstance().getSmsUrl(), buildSmsParams(msg, p.getMobile()), "GBK");