|
@ -1,18 +1,6 @@
|
|
|
package com.yihu.jw.hospital.prescription.service;
|
|
|
|
|
|
import cn.jiguang.common.ClientConfig;
|
|
|
import cn.jiguang.common.resp.APIConnectionException;
|
|
|
import cn.jiguang.common.resp.APIRequestException;
|
|
|
import cn.jpush.api.JPushClient;
|
|
|
import cn.jpush.api.push.PushResult;
|
|
|
import cn.jpush.api.push.model.Message;
|
|
|
import cn.jpush.api.push.model.Platform;
|
|
|
import cn.jpush.api.push.model.PushPayload;
|
|
|
import cn.jpush.api.push.model.audience.Audience;
|
|
|
import cn.jpush.api.push.model.audience.AudienceTarget;
|
|
|
import cn.jpush.api.push.model.notification.AndroidNotification;
|
|
|
import cn.jpush.api.push.model.notification.IosNotification;
|
|
|
import cn.jpush.api.push.model.notification.Notification;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.yihu.jw.dict.dao.*;
|
|
@ -4417,7 +4405,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
|
|
|
logger.info("眼科微信消息模板推送 医生拒诊开始");
|
|
|
logger.info("极光消息推送 医生拒诊开始");
|
|
|
//wxTempalteJPush("cancel_remind",outpatientDO,null,"","","","");
|
|
|
wxTempalteJPush("cancel_remind",outpatientDO,null,"","","","");
|
|
|
/*String res = wxTempalteJPush(outpatientDO.getConsumer(),newConfig.getFirst(),"医生拒绝了你的问诊",type,outpatientDO.getId());
|
|
|
logger.info("JPUSH res==="+res);*/
|
|
|
}else if("outPatientTimeOutRemind".equals(titelType)){
|
|
@ -4454,7 +4442,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
|
|
|
logger.info("眼科微信消息模板推送 就诊支付提醒开始");
|
|
|
logger.info("极光消息推送 就诊支付提醒开始");
|
|
|
//wxTempalteJPush("outpatient_pay",outpatientDO,null,"","","","");
|
|
|
wxTempalteJPush("outpatient_pay",outpatientDO,null,"","","","");
|
|
|
} else if ("prescriptionPayRemind".equalsIgnoreCase(titelType)) {
|
|
|
//处方开具支付提醒
|
|
|
scene = "cfzfts";
|
|
@ -4468,7 +4456,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
|
|
|
logger.info("眼科微信消息模板推送 处方支付提醒开始");
|
|
|
logger.info("极光消息推送 医生拒诊开始");
|
|
|
//wxTempalteJPush("prescription_pay",outpatientDO,null,"","","","");
|
|
|
wxTempalteJPush("prescription_pay",outpatientDO,null,"","","","");
|
|
|
}else if ("videoOrderRemind".equalsIgnoreCase(titelType)) {
|
|
|
//视频问诊预约提醒
|
|
|
scene = "spwzyytx";
|
|
@ -4499,7 +4487,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
//发起微信消息模板推送
|
|
|
newConfig.setUrl(newConfig.getUrl() + "" + consultTeam.getConsult());
|
|
|
logger.info("极光消息推送 医生拒诊开始");
|
|
|
//wxTempalteJPush("give_score",outpatientDO,consultTeam,"","","","");
|
|
|
wxTempalteJPush("give_score",outpatientDO,consultTeam,"","","","");
|
|
|
logger.info("眼科微信消息模板推送 服务评价提醒开始");
|
|
|
} else if ("systemCancelRemind".equalsIgnoreCase(titelType)) {
|
|
|
//系统24小时取消复诊提醒
|
|
@ -4696,7 +4684,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
wxPushLogDao.save(wxPushLogDO);
|
|
|
}
|
|
|
//发送极光消息推送
|
|
|
// wxTempalteJPush("logistics_remind",wlyyOutpatientDO,null,drugName,mailNo,remindMsg,prescriptionId);
|
|
|
wxTempalteJPush("logistics_remind",wlyyOutpatientDO,null,drugName,mailNo,remindMsg,prescriptionId);
|
|
|
}else {
|
|
|
first = "您好,您的处方订单物流"+remindMsg;
|
|
|
contentMsg = "患者"+patienName+"的处方药品订单,"+drugName+"等,当前"+remindMsg+"。物流方:「顺丰快递」,物流单号:"+mailNo+"。";
|
|
@ -8523,7 +8511,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
List<WlyyPrescriptionInfoDO> list = prescriptionInfoDao.findByPrescriptionId(wlyyPrescriptionDO.getId(),1);
|
|
|
List<WlyyInspectionDO> inspectionDOS = wlyyInspectionDao.findByPrescriptionId(wlyyPrescriptionDO.getId(),1);
|
|
|
if (list!=null&&list.size()>0){
|
|
|
wlyyPrescriptionDO.setStatus(10);
|
|
|
}else {
|
|
|
if(inspectionDOS!=null&&inspectionDOS.size()>0){
|
|
|
wlyyPrescriptionDO.setStatus(20);
|
|
|
}
|
|
@ -11481,7 +11469,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
* @return
|
|
|
*/
|
|
|
public String jPushMessage(String userId, String alert, String title, com.alibaba.fastjson.JSONObject extras){
|
|
|
List<WlyyHospitalSysDictDO> hospitalSysDictDOList = hospitalSysDictDao.findByDictName("JPUSH");
|
|
|
/* List<WlyyHospitalSysDictDO> hospitalSysDictDOList = hospitalSysDictDao.findByDictName("JPUSH");
|
|
|
String appKey = null;
|
|
|
String masterSecret =null;
|
|
|
for (WlyyHospitalSysDictDO hospitalSysDictDO:hospitalSysDictDOList){
|
|
@ -11529,7 +11517,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
logger.info("HTTP Status: " + e.getStatus());
|
|
|
logger.info("Error Code: " + e.getErrorCode());
|
|
|
logger.info("Error Message: " + e.getErrorMessage());
|
|
|
}
|
|
|
}*/
|
|
|
/*logger.info("极光推送返回日志==="+response);*/
|
|
|
/* WlyyHttpLogDO httpLogDO = new WlyyHttpLogDO();
|
|
|
httpLogDO.setCode("JPUSH");
|