|
@ -5185,6 +5185,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
remark = "点击完成支付,如您已支付请忽略本条信息";
|
|
|
msgUrl="/ims-wx/index.html#/returnVisit/prescriptionDetail?outpatientId="+outpatientId+"&id="+remindMsg;
|
|
|
logger.info("处方支付微信消息模板推送开始");
|
|
|
}else if ("diagnoPayRemind".equalsIgnoreCase(titelType)) {
|
|
|
//开具处方后向患者发送支付提醒
|
|
|
first = outpatientDO.getConsumerName() + ",您好! 您的问诊已结束,请及时结算费用。";
|
|
|
contentMsg = "您好! 您的问诊已结束,请及时结算费用。";
|
|
|
remark = "点击完成支付,如您已支付请忽略本条信息";
|
|
|
msgUrl="/ims-wx/index.html#/returnVisit/record?outpatientId="+outpatientId;
|
|
|
logger.info("诊查费微信消息模板推送开始");
|
|
|
} else if ("videoOrderRemind".equalsIgnoreCase(titelType)) {
|
|
|
//视频复诊预约提醒
|
|
|
if ("16".equals(type)) {
|
|
@ -5856,7 +5863,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
sql += " outpatient.disease_img AS \"disease_img\"," +
|
|
|
"outpatient.description AS \"description\"," +
|
|
|
"room.reservation_type AS \"reservation_type\"," +
|
|
|
"outpatient.origin_con_no AS \"origin_con_no\" " +
|
|
|
"outpatient.origin_con_no AS \"origin_con_no\", " +
|
|
|
"outpatient.medical_state AS \"medicalState\" " +
|
|
|
"FROM " +
|
|
|
"wlyy_hospital_waiting_room room," +
|
|
|
"base_patient patient," +
|
|
@ -7629,6 +7637,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
"outpatient.disease_img AS \"disease_img\"," +
|
|
|
"outpatient.description AS \"description\"," +
|
|
|
"outpatient.origin_con_no AS \"origin_con_no\", " +
|
|
|
"outpatient.medical_state AS \"medicalState\", " +
|
|
|
"consult.consult AS \"consult\" " +
|
|
|
"FROM " +
|
|
|
"wlyy_hospital_waiting_room room," +
|
|
@ -7780,6 +7789,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
"outpatient.consumer as \"consumer\"," +
|
|
|
"outpatient.consumer_name as \"consumer_name\"," +
|
|
|
"outpatient.consumer_mobile as \"consumerMobile\"," +
|
|
|
"outpatient.medical_state as \"medicalState\"," +
|
|
|
"room.reservation_type AS \"reservation_type\" " +
|
|
|
"FROM " +
|
|
|
"wlyy_hospital_waiting_room room," +
|
|
@ -9823,7 +9833,12 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
if ("0".equals(rsCode)) {
|
|
|
free = res.getString("@total_charge");
|
|
|
}
|
|
|
ylzPayService.msgPush("01", cardNo, "01", patientDO.getMobile(), "00", userNo, userName, idcard, voucherNo, applyDepaName, applyDoctorName, recipeTime, free, "1","WX_PUB");
|
|
|
WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("isSendYlzMes");
|
|
|
if (hospitalSysDictDO==null){
|
|
|
ylzPayService.msgPush("01", cardNo, "01", patientDO.getMobile(), "00", userNo, userName, idcard, voucherNo, applyDepaName, applyDoctorName, recipeTime, free, "1","WX_PUB");
|
|
|
}else if (hospitalSysDictDO.getDictValue().equalsIgnoreCase("0")){
|
|
|
ylzPayService.msgPush("01", cardNo, "01", patientDO.getMobile(), "00", userNo, userName, idcard, voucherNo, applyDepaName, applyDoctorName, recipeTime, free, "1","WX_PUB");
|
|
|
}
|
|
|
if ("xm_zsyy_wx".equalsIgnoreCase(wechatId)){
|
|
|
String msgUrl="https://hlwyy.xmzsh.com/ims-wx/index.html#/returnVisit/prescriptionDetail?outpatientId="+outpatientDO.getId()+"&id="+prescriptionId;
|
|
|
sendZsMsgFlow("OL_JSTX",outpatientDO.getId(),prescriptionId,msgUrl,"结算提醒");
|
|
@ -14379,8 +14394,19 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
logger.info("变更医保结算状态成功");
|
|
|
String realOrder = msgInfoJson.getString("xtgzh0");
|
|
|
List<WlyyPrescriptionDO> wlyyPrescriptionDOS = prescriptionDao.findByRealOrderAndStatusList(realOrder);
|
|
|
WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(ylzMedicalRelationDO.getRelationCode());
|
|
|
String title = "";
|
|
|
if (wlyyOutpatientDO.getHisStatus()==null){
|
|
|
title="您在厦门大学附属中山医院有一笔诊察/处方费用已支付完成!结算费用包含本次在线问诊的复诊诊查费:"+wlyyOutpatientDO.getFee()+"元。";
|
|
|
}else {
|
|
|
title="您在厦门大学附属中山医院有一笔诊察/处方费用已支付完成!";
|
|
|
}
|
|
|
if (hisState){
|
|
|
wlyyOutpatientDO.setHisStatus(1);
|
|
|
outpatientDao.save(wlyyOutpatientDO);
|
|
|
}
|
|
|
for (WlyyPrescriptionDO prescriptionDO:wlyyPrescriptionDOS){
|
|
|
WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId());
|
|
|
/* WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId());
|
|
|
String title = "";
|
|
|
if (wlyyOutpatientDO.getHisStatus()==null){
|
|
|
title="您在厦门大学附属中山医院有一笔诊察/处方费用已支付完成!结算费用包含本次在线问诊的复诊诊查费:"+wlyyOutpatientDO.getFee()+"元。";
|
|
@ -14390,7 +14416,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
if (hisState){
|
|
|
wlyyOutpatientDO.setHisStatus(1);
|
|
|
outpatientDao.save(wlyyOutpatientDO);
|
|
|
}
|
|
|
}*/
|
|
|
WlyyPrescriptionLogDO prescriptionLogDO = new WlyyPrescriptionLogDO();
|
|
|
prescriptionLogDO.setCreateTime(new Date());
|
|
|
prescriptionLogDO.setStatus(30);
|
|
@ -14406,7 +14432,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
prescriptionDao.save(prescriptionDO);
|
|
|
logger.info("变更处方结算状态成功");
|
|
|
String fee = ylzMedicalRelationDO.getTotalAmount();
|
|
|
String pushPayLog = payInfoNoticeService.pushPrescriptionPayMedicare(wlyyOutpatientDO.getConsumer(),prescriptionDO.getDoctorName(),prescriptionDO.getVoucherNo(),prescriptionDO.getOutpatientId(),prescriptionDO.getId(),fee,ylzMedicalRelationDO.getMedicalPrice(),ylzMedicalRelationDO.getPersonCash(),title,null);
|
|
|
Double medicarePrice = Double.parseDouble(ylzMedicalRelationDO.getMedicalPrice())+Double.parseDouble(ylzMedicalRelationDO.getPersonAccount());
|
|
|
String pushPayLog = payInfoNoticeService.pushPrescriptionPayMedicare(wlyyOutpatientDO.getConsumer(),prescriptionDO.getDoctorName(),prescriptionDO.getVoucherNo(),prescriptionDO.getOutpatientId(),prescriptionDO.getId(),fee,medicarePrice+"",ylzMedicalRelationDO.getPersonCash(),title,null);
|
|
|
logger.info("处方结算成功"+pushPayLog+"====="+realOrder);
|
|
|
//2.6.1 电子处方订单接收
|
|
|
logger.info("医保电子处方订单");
|