|
@ -1034,31 +1034,35 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
|
|
|
WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode());
|
|
|
wlyyOutpatientDO.setPayStatus(1);
|
|
|
WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
|
|
|
//发送企业模板消息给医生
|
|
|
BasePatientDO patientDO = new BasePatientDO();
|
|
|
String msg = "";
|
|
|
String name=outpatientDO.getPatientName();
|
|
|
String sex = "";
|
|
|
String age="";
|
|
|
String date = "";
|
|
|
String title = "";
|
|
|
String url="https://hlwyy.xmzsh.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
|
|
|
if (patientDO!=null){
|
|
|
sex= IdCardUtil.getSexForIdcard(patientDO.getIdcard());
|
|
|
age = IdCardUtil.getAgeForIdcard(patientDO.getIdcard())+"";
|
|
|
}
|
|
|
if (outpatientDO!=null){
|
|
|
if (outpatientDO.getType().equalsIgnoreCase("1")){
|
|
|
title = "图文复诊";
|
|
|
msg = name+"("+sex+" "+age+"岁)向您发起了图文复诊,点击查看";
|
|
|
}else if (outpatientDO.getType().equalsIgnoreCase("2")){
|
|
|
title = "视频复诊";
|
|
|
date = DateUtil.dateToStrLong(outpatientDO.getRegisterDate());
|
|
|
msg = name+"("+sex+" "+age+"岁)预约了"+date+"的视频复诊,点击查看";
|
|
|
}
|
|
|
}
|
|
|
enterpriseService.sendTWMesByDoctor("zsyy",outpatientDO.getDoctor(),title,msg,url);
|
|
|
System.out.println("发送企业模板消息成功");
|
|
|
if (businessOrderDO.getStatus()!=null&&businessOrderDO.getStatus()!=1){
|
|
|
//发送企业模板消息给医生
|
|
|
BasePatientDO patientDO = new BasePatientDO();
|
|
|
patientDO = patientDao.findById(outpatientDO.getPatient());
|
|
|
String msg = "";
|
|
|
String name=outpatientDO.getPatientName();
|
|
|
String sex = "";
|
|
|
String age="";
|
|
|
String date = "";
|
|
|
String title = "";
|
|
|
String url="https://hlwyy.xmzsh.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
|
|
|
if (patientDO!=null){
|
|
|
sex= IdCardUtil.getSexForIdcard(patientDO.getIdcard());
|
|
|
age = IdCardUtil.getAgeForIdcard(patientDO.getIdcard())+"";
|
|
|
}
|
|
|
if (outpatientDO!=null){
|
|
|
if (outpatientDO.getType().equalsIgnoreCase("1")){
|
|
|
title = "图文复诊";
|
|
|
msg = name+"("+sex+" "+age+"岁)向您发起了图文复诊,点击查看";
|
|
|
}else if (outpatientDO.getType().equalsIgnoreCase("2")){
|
|
|
title = "视频复诊";
|
|
|
date = DateUtil.dateToStrLong(outpatientDO.getRegisterDate());
|
|
|
msg = name+"("+sex+" "+age+"岁)预约了"+date+"的视频复诊,点击查看";
|
|
|
}
|
|
|
}
|
|
|
enterpriseService.sendTWMesByDoctor("zsyy",outpatientDO.getDoctor(),title,msg,url);
|
|
|
System.out.println("发送企业模板消息成功");
|
|
|
}
|
|
|
|
|
|
} else if (businessOrderDO.getOrderCategory().equalsIgnoreCase("4")) {
|
|
|
List<WlyyPrescriptionDO> wlyyPrescriptionDOS = prescriptionDao.findById(businessOrderDO.getRelationCode());
|
|
|
if (wlyyPrescriptionDOS!=null&&wlyyPrescriptionDOS.size()!=0){
|
|
@ -1094,31 +1098,34 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
|
|
|
WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode());
|
|
|
wlyyOutpatientDO.setPayStatus(1);
|
|
|
WlyyOutpatientDO outpatientDO = outpatientDao.save(wlyyOutpatientDO);
|
|
|
//发送企业模板消息给医生
|
|
|
BasePatientDO patientDO = new BasePatientDO();
|
|
|
String msg = "";
|
|
|
String name=outpatientDO.getPatientName();
|
|
|
String sex = "";
|
|
|
String age="";
|
|
|
String date = "";
|
|
|
String title = "";
|
|
|
String url="https://hlwyy.xmzsh.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
|
|
|
if (patientDO!=null){
|
|
|
sex= IdCardUtil.getSexForIdcard(patientDO.getIdcard());
|
|
|
age = IdCardUtil.getAgeForIdcard(patientDO.getIdcard())+"";
|
|
|
}
|
|
|
if (outpatientDO!=null){
|
|
|
if (outpatientDO.getType().equalsIgnoreCase("1")){
|
|
|
title = "图文复诊";
|
|
|
msg = name+"("+sex+" "+age+"岁)向您发起了图文复诊,点击查看";
|
|
|
}else if (outpatientDO.getType().equalsIgnoreCase("2")){
|
|
|
title = "视频复诊";
|
|
|
date = DateUtil.dateToStrLong(outpatientDO.getRegisterDate());
|
|
|
msg = name+"("+sex+" "+age+"岁)预约了"+date+"的视频复诊,点击查看";
|
|
|
if (businessOrderDO.getStatus()!=null&&businessOrderDO.getStatus()!=1){
|
|
|
//发送企业模板消息给医生
|
|
|
BasePatientDO patientDO = new BasePatientDO();
|
|
|
patientDO = patientDao.findById(outpatientDO.getPatient());
|
|
|
String msg = "";
|
|
|
String name=outpatientDO.getPatientName();
|
|
|
String sex = "";
|
|
|
String age="";
|
|
|
String date = "";
|
|
|
String title = "";
|
|
|
String url="https://hlwyy.xmzsh.com/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
|
|
|
if (patientDO!=null){
|
|
|
sex= IdCardUtil.getSexForIdcard(patientDO.getIdcard());
|
|
|
age = IdCardUtil.getAgeForIdcard(patientDO.getIdcard())+"";
|
|
|
}
|
|
|
if (outpatientDO!=null){
|
|
|
if (outpatientDO.getType().equalsIgnoreCase("1")){
|
|
|
title = "图文复诊";
|
|
|
msg = name+"("+sex+" "+age+"岁)向您发起了图文复诊,点击查看";
|
|
|
}else if (outpatientDO.getType().equalsIgnoreCase("2")){
|
|
|
title = "视频复诊";
|
|
|
date = DateUtil.dateToStrLong(outpatientDO.getRegisterDate());
|
|
|
msg = name+"("+sex+" "+age+"岁)预约了"+date+"的视频复诊,点击查看";
|
|
|
}
|
|
|
}
|
|
|
enterpriseService.sendTWMesByDoctor("zsyy",outpatientDO.getDoctor(),title,msg,url);
|
|
|
System.out.println("发送企业模板消息成功");
|
|
|
}
|
|
|
enterpriseService.sendTWMesByDoctor("zsyy",outpatientDO.getDoctor(),title,msg,url);
|
|
|
System.out.println("发送企业模板消息成功");
|
|
|
} else if (businessOrderDO.getOrderCategory().equalsIgnoreCase("4")) {
|
|
|
List<WlyyPrescriptionDO> wlyyPrescriptionDOS = prescriptionDao.findById(businessOrderDO.getRelationCode());
|
|
|
if (wlyyPrescriptionDOS!=null&&wlyyPrescriptionDOS.size()!=0){
|