|
@ -149,6 +149,7 @@ import java.text.DecimalFormat;
|
|
import java.text.ParseException;
|
|
import java.text.ParseException;
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
|
import java.util.concurrent.TimeUnit;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
/**
|
|
@ -12338,6 +12339,52 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
jsonObject.put("type",32);
|
|
jsonObject.put("type",32);
|
|
jsonObject.put("id",prescriptionId);
|
|
jsonObject.put("id",prescriptionId);
|
|
jsonObject.put("outpatientId",wlyyOutpatientDO.getId());
|
|
jsonObject.put("outpatientId",wlyyOutpatientDO.getId());
|
|
|
|
}else if("remind_doctor_pickup".equalsIgnoreCase(templateCode)){//物流消息提醒
|
|
|
|
BaseJpushTemplateDO baseJpushTemplateDO = baseJpushTemplateDao.findByCode(templateCode);
|
|
|
|
if(baseJpushTemplateDO!=null){
|
|
|
|
if ("1".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(wlyyOutpatientDO.getType())){
|
|
|
|
content = baseJpushTemplateDO.getPushContent().replace("{{咨询类型}}","图文复诊").replace("{{患者姓名}}",wlyyOutpatientDO.getPatientName());
|
|
|
|
title=baseJpushTemplateDO.getPushHeader().replace("{{咨询类型}}","图文复诊接诊提醒");
|
|
|
|
jsonObject.put("type",51);
|
|
|
|
jsonObject.put("patientName",wlyyOutpatientDO.getPatientName());
|
|
|
|
}else if ("1".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(wlyyOutpatientDO.getType())){
|
|
|
|
content = baseJpushTemplateDO.getPushContent().replace("{{咨询类型}}","视频复诊").replace("{{患者姓名}}",wlyyOutpatientDO.getPatientName());
|
|
|
|
content+= "视频复诊预约时间为:"+wlyyOutpatientDO.getRegisterDate();
|
|
|
|
title=baseJpushTemplateDO.getPushHeader().replace("{{咨询类型}}","视频复诊接诊提醒");
|
|
|
|
jsonObject.put("type",52);
|
|
|
|
jsonObject.put("patientName",wlyyOutpatientDO.getPatientName());
|
|
|
|
}else if ("3".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"1".equalsIgnoreCase(wlyyOutpatientDO.getType())){
|
|
|
|
content = baseJpushTemplateDO.getPushContent().replace("{{咨询类型}}","图文咨询").replace("{{患者姓名}}",wlyyOutpatientDO.getPatientName());
|
|
|
|
title=baseJpushTemplateDO.getPushHeader().replace("{{咨询类型}}","图文咨询接诊提醒");
|
|
|
|
jsonObject.put("type",58);
|
|
|
|
jsonObject.put("patientName",wlyyOutpatientDO.getPatientName());
|
|
|
|
}else if ("3".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"2".equalsIgnoreCase(wlyyOutpatientDO.getType())){
|
|
|
|
content = baseJpushTemplateDO.getPushContent().replace("{{咨询类型}}","视频咨询").replace("{{患者姓名}}",wlyyOutpatientDO.getPatientName());
|
|
|
|
title=baseJpushTemplateDO.getPushHeader().replace("{{咨询类型}}","视频咨询接诊提醒");
|
|
|
|
content+= "视频咨询预约时间为:"+wlyyOutpatientDO.getRegisterDate();
|
|
|
|
jsonObject.put("type",57);
|
|
|
|
jsonObject.put("patientName",wlyyOutpatientDO.getPatientName());
|
|
|
|
}else if ("2".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())){
|
|
|
|
content = baseJpushTemplateDO.getPushContent().replace("{{咨询类型}}","协同复诊").replace("{{患者姓名}}",wlyyOutpatientDO.getPatientName());
|
|
|
|
title=baseJpushTemplateDO.getPushHeader().replace("{{咨询类型}}","协同复诊接诊提醒");
|
|
|
|
jsonObject.put("type",53);
|
|
|
|
jsonObject.put("patientName",wlyyOutpatientDO.getPatientName());
|
|
|
|
}else if ("3".equalsIgnoreCase(wlyyOutpatientDO.getOutpatientType())&&"3".equalsIgnoreCase(wlyyOutpatientDO.getType())){
|
|
|
|
content = baseJpushTemplateDO.getPushContent().replace("{{咨询类型}}","家医咨询").replace("{{患者姓名}}",wlyyOutpatientDO.getPatientName());
|
|
|
|
title=baseJpushTemplateDO.getPushHeader().replace("{{咨询类型}}","家医咨询接诊提醒");
|
|
|
|
jsonObject.put("type",55);
|
|
|
|
jsonObject.put("patientName",wlyyOutpatientDO.getPatientName());
|
|
|
|
}
|
|
|
|
String sex = IdCardUtil.getSexNameForIdcard_new(wlyyOutpatientDO.getIdcard());
|
|
|
|
Integer age = IdCardUtil.getAgeForIdcard(wlyyOutpatientDO.getIdcard());
|
|
|
|
Long createTime = wlyyOutpatientDO.getCreateTime().getTime();
|
|
|
|
Long nowTime = new Date().getTime();
|
|
|
|
Long minusts = TimeUnit.MILLISECONDS.toMinutes(nowTime - createTime);
|
|
|
|
content = content.replace("{{性别年龄}}",sex+age+"岁").replace("{{等待时间}}",minusts.toString());
|
|
|
|
}
|
|
|
|
userId = wlyyOutpatientDO.getDoctor();
|
|
|
|
jsonObject.put("id",wlyyOutpatientDO.getId());
|
|
|
|
isDoctor="1";
|
|
}
|
|
}
|
|
|
|
|
|
return jPushMessage(isDoctor,userId,content,title,jsonObject);
|
|
return jPushMessage(isDoctor,userId,content,title,jsonObject);
|