|
@ -3,6 +3,7 @@ package com.yihu.wlyy.service.app.sign;
|
|
|
import com.yihu.wlyy.entity.doctor.profile.Doctor;
|
|
|
import com.yihu.wlyy.entity.organization.Hospital;
|
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
|
import com.yihu.wlyy.entity.patient.SignFamily;
|
|
|
import com.yihu.wlyy.repository.doctor.DoctorDao;
|
|
|
import com.yihu.wlyy.repository.organization.HospitalDao;
|
|
|
import com.yihu.wlyy.repository.patient.PatientDao;
|
|
@ -202,6 +203,15 @@ public class PatientRemindService extends BaseService {
|
|
|
boolean isMobileExist = false;
|
|
|
boolean isOpenIdExist = false;
|
|
|
|
|
|
//过滤只提醒已签约未扣费居民 by wujunjie 2017.11.29
|
|
|
SignFamily signFamily = signFamilyDao.findUnpay(p.getCode());
|
|
|
if (signFamily == null){
|
|
|
JSONObject response = new JSONObject();
|
|
|
response.put("status", -1);
|
|
|
response.put("msg", "未找到该居民已签约未缴费信息!");
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotEmpty(p.getMobile())) {
|
|
|
isMobileExist = true;
|
|
|
JSONObject result = smsService.sendMsg(p.getMobile(), doc.getName() + "医生提醒您:为完成家庭医生签约," +
|
|
@ -213,7 +223,6 @@ public class PatientRemindService extends BaseService {
|
|
|
mDesc = result.getString("description");
|
|
|
}
|
|
|
}
|
|
|
// if (StringUtils.isNotEmpty(p.getOpenid())) {
|
|
|
|
|
|
// 微信提醒
|
|
|
JSONObject json = new JSONObject();
|
|
@ -234,17 +243,6 @@ public class PatientRemindService extends BaseService {
|
|
|
pushMsgTask.putWxMsg(tokenUtils.getAccessToken(), 8, p.getOpenid(), p.getName(), json);
|
|
|
wFlag = true;
|
|
|
}
|
|
|
// else{
|
|
|
// JSONObject j = weiXinOpenIdUtils.getFamilyOpenId(p.getCode());
|
|
|
// Patient member = (Patient) j.get("member");
|
|
|
// if(StringUtils.isNotBlank(member.getOpenid())){
|
|
|
// isOpenIdExist = true;
|
|
|
// String first = (String) json.get("doctorName");
|
|
|
// json.remove("doctorName");
|
|
|
// json.put("doctorName",weiXinOpenIdUtils.getTitleMes(p,j.getInt("relation"),member.getName())+"\n"+first);
|
|
|
// PushMsgTask.getInstance().putWxMsg(tokenUtils.getAccessToken(), 8, member.getOpenid(), member.getName(), json);
|
|
|
// }
|
|
|
// }
|
|
|
//发送代理人
|
|
|
JSONArray jsonArray = weiXinOpenIdUtils.getAgentOpenId(p.getCode(),p.getOpenid());
|
|
|
if(jsonArray!=null&&jsonArray.length()>0){
|
|
@ -264,7 +262,6 @@ public class PatientRemindService extends BaseService {
|
|
|
}
|
|
|
|
|
|
|
|
|
// }
|
|
|
//发送IM
|
|
|
consultService.sendMucMessageBySingnType(doc.getCode(), doc.getName(), p.getCode(), doc.getName() + "医生提醒您:为完成家庭医生签约," +
|
|
|
"尽早为您提供家庭医生服务,请尽快到" + hos.getName() + "(地址:" + hos.getAddress() + ")缴费", "1",p.getName());
|