lihong 1 year ago
parent
commit
51f08c1fb9

+ 5 - 2
src/main/java/cn/hnthyy/thmz/controller/mz/MzChargeDetailController.java

@@ -135,6 +135,8 @@ public class MzChargeDetailController {
     private ZdChequeTypeService zdChequeTypeService;
     @Value("${healthEducationUrl}")
     private String healthEducationUrl;
+    @Value("${wxPayQrUrl}")
+    private String wxPayQrUrl;
 
 
     /**
@@ -2037,15 +2039,16 @@ public class MzChargeDetailController {
         Map<String, Object> results = null;
         try {
             results = getChargeDetailFee(patientId, times, 1, null, httpServletRequest);
-            BigDecimal selfAmount = (BigDecimal) results.get("selfAmount");
+            BigDecimal selfAmount = (BigDecimal) results.get("totalAmount");
             if (selfAmount != null) {
                 String payQrcode = haiCiAdapterService.genMzPayQrcode(selfAmount.multiply(BigDecimal.valueOf(100)).intValue(), patientId, patientId + "_" + times + "_1");
                 if (payQrcode != null) {
                     results.put("payQrcode", payQrcode);
                 }
                 results.put("healthEducationUrl", healthEducationUrl);
+                String wxPayUrl = wxPayQrUrl.replace("patientId", patientId);
+                results.put("wxPayQrUrl", wxPayUrl);
             }
-            //String payQrcode = wxPayQrUrl.replace("patientId", patientId);
             return results;
         } catch (Exception e) {
             if (results == null) {

+ 1 - 7
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzChargeDetailServiceImpl.java

@@ -1414,13 +1414,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                 medType = "14";
             }
             if(StrUtil.isNotBlank(mzPrescriptionVo.getReadCardResult())){
-                PayInfo payInfo =  tsmzService.directRegistration(opId, mzPatientMi.getPatientId(), times, mzPrescriptionVo.getReadCardResult(), mzPrescriptionVo.getGrzhzf(), mzPrescriptionVo.getReadCardType(), mzPrescriptionVo.getExpContent(),medType,mzPrescriptionVo.getOpspDisecode(),mzPrescriptionVo.getOpspDiseName());
-                if(payInfo == null) {
-                    log.error("保存处方,patientId={},times={},医保试算失败,没有获取到结算信息",mzPatientMi.getPatientId(),times);
-                }
-                else if(!Integer.valueOf(0).equals(payInfo.getCode())){
-                    log.error("保存处方,patientId={},times={},医保试算失败,错误信息={}",mzPatientMi.getPatientId(),times,payInfo.getErrorMessage());
-                }
+                tsmzService.directRegistrationAsync(opId, mzPatientMi.getPatientId(), times, mzPrescriptionVo.getReadCardResult(), mzPrescriptionVo.getGrzhzf(), mzPrescriptionVo.getReadCardType(), mzPrescriptionVo.getExpContent(),medType,mzPrescriptionVo.getOpspDisecode(),mzPrescriptionVo.getOpspDiseName());
             }
         }
         //发送处方待缴费MQ

+ 1 - 1
src/main/resources/application-dev.yml

@@ -218,7 +218,7 @@ pacsUrl: http://172.16.32.122:8099
 #健康宣教
 healthEducationUrl: https://staticweb.hnthyy.cn/healthEducation
 #微信支付链接
-wxPayQrUrl: https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxbde6b16acad84204&redirect_uri=https://staticweb.hnthyy.cn/wxserver/redirect/page2?to=fromGuideBillQrScan_patientId&response_type=code&scope=snsapi_base&state=1#wechat_redirect
+wxPayQrUrl: https://staticweb.hnthyy.cn/wxserver/redirect/guideBillScan?patNo=patientId
 
 #调用医保药品更新最新报销比例测试地址
 hiDrugPostUrl: "http://172.16.30.26:8706/nationalMatch/queryPsnPayProp?hiListCode="

+ 1 - 1
src/main/resources/application-prod.yml

@@ -210,7 +210,7 @@ healthEducationUrl: https://staticweb.hnthyy.cn/healthEducation
 #pacs检查地址
 pacsUrl: http://172.16.32.122:8099
 #微信支付链接
-wxPayQrUrl: https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxbde6b16acad84204&redirect_uri=https://staticweb.hnthyy.cn/wxserver/redirect/page2?to=fromGuideBillQrScan_patientId&response_type=code&scope=snsapi_base&state=1#wechat_redirect
+wxPayQrUrl: https://staticweb.hnthyy.cn/wxserver/redirect/guideBillScan?patNo=patientId
 
 #调用医保药品更新最新报销比例地址
 hiDrugPostUrl: "http://webhis.thyy.cn:8077/nationalMatch/queryPsnPayProp?hiListCode="

+ 18 - 11
src/main/resources/static/js/mz/clinic.js

@@ -11200,9 +11200,9 @@ function printPrescription(patientId, times, clnicId, payMark, printType) {
                             index++;
                         }
                     }
-                    $("#selfAmountGuideCard").html(0.00);
-                    $("#fundPayGuideCard").html(0.00);
-                    $("#acctPayGuideCard").html(0.00);
+                    // $("#selfAmountGuideCard").html(0.00);
+                    // $("#fundPayGuideCard").html(0.00);
+                    // $("#acctPayGuideCard").html(0.00);
                     $("#payQrcodeGuideCard").empty();
                     $("#selfPayDetail").empty();
                     $.ajax({
@@ -11264,7 +11264,7 @@ function printPrescription(patientId, times, clnicId, payMark, printType) {
                                     var canvas = document.getElementById('erw');
                                     var src = canvas.toDataURL("image/png");
                                     //var strDataURI =canvas.toDataURL("image/png");
-                                    $("#payQrcodeGuideCard").html("<img src='" + src + "' style='width:100px;height:100px;'/><div style='width: 100px;margin-top: 10px;text-align: center;'>微信支付</div>");
+                                    $("#payQrcodeGuideCard").html("<img src='" + src + "' style='width:100px;height:100px;'/><div style='width: 300px;margin-top: 10px;text-align: center;'>微信支付(全自费请扫此码)</div>");
                                 }
                                 if(!stringIsBlank(res.healthEducationUrl)){
                                     new QRCode(document.getElementById("healthEducationCard"), res.healthEducationUrl);  // 设置要生成二维码的链接
@@ -11273,14 +11273,21 @@ function printPrescription(patientId, times, clnicId, payMark, printType) {
                                     let src = canvas.toDataURL("image/png");
                                     $("#healthEducationCard").html("<img src='" + src + "' style='width:100px;height:100px;'/><div style='width: 100px;margin-top: 10px;text-align: center;'>健康宣教</div>");
                                 }
-
-                                if (res.fundPay != undefined && res.fundPay != null) {
-                                    $("#fundPayGuideCard").text("¥" + res.fundPay);
-                                }
-                                if (res.acctPay != undefined && res.acctPay != null) {
-                                    $("#acctPayGuideCard").text("¥" + res.acctPay);
+                                if(!stringIsBlank(res.wxPayQrUrl)){
+                                    new QRCode(document.getElementById("wxPayQrCard"), res.wxPayQrUrl);  // 设置要生成二维码的链接
+                                    $("canvas").attr("id", "erw");
+                                    let canvas = document.getElementById('erw');
+                                    let src = canvas.toDataURL("image/png");
+                                    $("#wxPayQrCard").html("<img src='" + src + "' style='width:100px;height:100px;'/><div style='width: 500px;margin-top: 5px'>微信支付(含医保统筹请扫此码)</div>");
                                 }
-                                $("#selfAmountGuideCard").text("¥" + res.selfAmount);
+
+                                // if (res.fundPay != undefined && res.fundPay != null) {
+                                //     $("#fundPayGuideCard").text("¥" + res.fundPay);
+                                // }
+                                // if (res.acctPay != undefined && res.acctPay != null) {
+                                //     $("#acctPayGuideCard").text("¥" + res.acctPay);
+                                // }
+                                // $("#selfAmountGuideCard").text("¥" + res.selfAmount);
                                 $("#totalAmountGuideCard").text("¥" + res.totalAmount);
                                 // $("#imgcode").JsBarcode(patientId);
                                 console.log(patientId);

+ 10 - 10
src/main/resources/templates/mz/clinic.html

@@ -2706,13 +2706,13 @@
         </table>
         <table class="table table-striped table-bordered" style="font-size: 13px;margin-top: 10px;">
             <tbody>
+<!--            <tr>-->
+<!--                <td style="font-weight: 700">自付金额:<span id="selfAmountGuideCard"></span><span>元</span></td>-->
+<!--                <td style="font-weight: 700">门诊统筹:<span id="fundPayGuideCard"></span><span>元</span></td>-->
+<!--            </tr>-->
             <tr>
-                <td style="font-weight: 700">自付金额:<span id="selfAmountGuideCard"></span><span>元</span></td>
-                <td style="font-weight: 700">门诊统筹:<span id="fundPayGuideCard"></span><span>元</span></td>
-            </tr>
-            <tr>
-                <td style="font-weight: 700">个账支付:<span id="acctPayGuideCard"></span><span>元</span></td>
-                <td style="font-weight: 700">合计金额:<span id="totalAmountGuideCard"></span><span>元</span></td>
+<!--                <td style="font-weight: 700">个账支付:<span id="acctPayGuideCard"></span><span>元</span></td>-->
+                <td colspan="2" style="font-weight: 700">合计金额:<span id="totalAmountGuideCard"></span><span>元</span></td>
             </tr>
             <tr>
                 <td colspan="2">医保门诊统筹报销跨月不可以退费,退费必须在就诊当月完成,请悉知。</td>
@@ -2731,11 +2731,11 @@
             </tr>
             </tbody>
         </table>
-        <div id="payQrcodeGuideCard" style="width: 100px;height: 100px;margin-top:10px;float: left"></div>
-
-        <div id="healthEducationCard" style="width: 100px;height: 100px;margin-top:10px;float: left;margin-left: 100px;">
-
+        <div>
+        <div id="payQrcodeGuideCard" style="width: 300px;height: 100px;margin-top:10px;float: left;text-align: center"></div>
+        <div id="healthEducationCard" style="width: 100px;height: 100px;margin-top:10px;float: right;margin-right: 100px;"></div>
         </div>
+        <div id="wxPayQrCard" style="text-align: center;margin-top: 150px;"></div>
     </div>
 </div>
 <!--打印门诊指引单结束-->