Explorar el Código

处方待缴费消息推送

hurugang hace 2 años
padre
commit
91e6c9e8ed

+ 2 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzChargeDetailServiceImpl.java

@@ -1194,6 +1194,8 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
         if (mzPrescriptionVo.getZgmztczf() != null && YesNoEnum.YES.code.equals(mzPrescriptionVo.getZgmztczf())) {
             tsmzService.directRegistrationAsync(opId, mzPatientMi.getPatientId(), times, mzPrescriptionVo.getReadCardResult(), mzPrescriptionVo.getGrzhzf(), mzPrescriptionVo.getReadCardType(), mzPrescriptionVo.getExpContent());
         }
+        //发送处方待缴费MQ
+        orderStatusChangeService.orderStatusChange(mzPatientMi.getPatientId() + "_" + times + "_" + newMzVisitTable.getReceiptNo() + "," + OrderStatusEnum.PRESCRIPTION_TO_BE_PAID.code);
         return clinic;
     }
 

+ 6 - 0
src/main/java/cn/hnthyy/thmz/service/impl/thmz/OrderStatusChangeServiceImpl.java

@@ -104,6 +104,12 @@ public class OrderStatusChangeServiceImpl implements OrderStatusChangeService {
                 haiCiAdapterService.commonMessageNotice(mzPatientMi.getIcCardNo(), "{\"data\":{\"first\":{\"color\":\"#FF0000\",\"value\":\"您好,您已经挂号成功,请您及时前往医生诊室就诊,详情如下:\"},\"deptname\":{\"color\":\"#173177\",\"value\":\"" + zdUnitCode.getName() + "\"},\"doctorname\":{\"color\":\"#173177\",\"value\":\"" + doctorName + "\"},\"remark\":{\"color\":\"#FF0000\",\"value\":\"就诊地点 : " + zdUnitCode.getOfficePos() + "。\"}},\"miniprogram\":{\"appid\":\"\",\"pagepath\":\"\"},\"template_id\":\"ctMSV4jb3aHYJS0hOjTl8h9Nyrj-46XTLMnUFn6eWh8\",\"touser\":\"\",\"url\":\"\"}", new Date());
                 return;
             }
+
+            if (OrderStatusEnum.PRESCRIPTION_TO_BE_PAID.code.equals(status)) {
+                String url="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxbde6b16acad84204&redirect_uri=http://staticweb.hnthyy.cn/wxserver/redirect/page2?to=unPaidList_"+patientInfo[0]+"&response_type=code&scope=snsapi_base&state=1#wechat_redirect";
+                haiCiAdapterService.commonMessageNotice(mzPatientMi.getIcCardNo(), "{\"data\":{\"first\":{\"color\":\"#FF0000\",\"value\":\"您好,您有一笔门诊费用待缴。\"},\"keyword1\":{\"color\":\"#173177\",\"value\":\"长沙泰和医院\"},\"keyword2\":{\"color\":\"#173177\",\"value\":\"" + mzPatientMi.getName() + "\"},\"remark\":{\"color\":\"#FF0000\",\"value\":\" 您的处方已生成,可以点击查看详情并缴费!\"}},\"miniprogram\":{\"appid\":\"\",\"pagepath\":\"\"},\"template_id\":\"utgzvafhKaWx3F6-6G26tb72zZ0eT_kJ6DzQeTwmwi4\",\"touser\":\"\",\"url\":\""+url+"\"}", new Date());
+                return;
+            }
             if (OrderStatusEnum.SUCCESSFUL_PRESCRIPTION_PAYMENT.code.equals(status)) {
                 MzChargeDetailPageDto mzChargeDetailPageDto = new MzChargeDetailPageDto();
                 MzChargeDetail mzChargeDetailParams = new MzChargeDetail(patientInfo[0], Integer.valueOf(patientInfo[1]));