Explorar el Código

门诊统筹支付医保结算单打印

hurugang hace 2 años
padre
commit
204d4e86ea

+ 16 - 0
src/main/java/cn/hnthyy/thmz/controller/CommonController.java

@@ -47,6 +47,10 @@ public class CommonController {
     //websocket 地址前半部分
     @Value("${webSocketHost}")
     private String webSocketHost;
+
+    //门诊结算单地址
+    @Value("${mzjsdHost}")
+    private String mzjsdHost;
     /**
      * 查询科室分类
      *
@@ -808,6 +812,18 @@ public class CommonController {
     }
 
 
+    /**
+     * 获取门诊结算单地址
+     */
+    @RequestMapping(value = "/getMzjsdHost", method = {RequestMethod.GET})
+    public Map<String, Object> getMzjsdHost() {
+        Map<String, Object> resultMap = new HashMap<>();
+        resultMap.put("code", 0);
+        resultMap.put("message", "获取门诊结算单地址成功");
+        resultMap.put("data", mzjsdHost);
+        return resultMap;
+    }
+
     /**
      * 根据输入的参数查询诊断列表的前50个诊断
      * @param commonParams 查询参数

+ 2 - 0
src/main/java/cn/hnthyy/thmz/entity/his/mz/MzChargeDetail.java

@@ -217,6 +217,8 @@ public class MzChargeDetail implements Serializable,Comparable<MzChargeDetail> {
     private BigDecimal discountAmount;
     //是否隐藏(发药叫号用)
     private Integer isHide;
+    //患者的处方是否有医保报销支付(门诊统筹) >0 有医保报销
+    private Integer countYbZf;
     public MzChargeDetail(String patientId, Integer times) {
         this.patientId = patientId;
         this.times = times;

+ 9 - 0
src/main/java/cn/hnthyy/thmz/mapper/his/mz/MzDepositFileMapper.java

@@ -269,6 +269,15 @@ public interface MzDepositFileMapper {
 //    @Select(" select sum(amount) from ${tableName} where patient_id =#{patientId} and times=#{times} and pay_mark <> 2 ")
 //    BigDecimal selectAmountForPatientId(@Param(value = "patientId") String patientId, @Param("times") Integer times, @Param("tableName") String tableName);
 
+    /**
+     * 查询患者的处方是否有医保报销支付(门诊统筹)
+     * @param patientId
+     * @param times
+     * @param receiptNo
+     * @return
+     */
+    @Select("select count(1) from mz_deposit_file where patient_id =#{patientId} and times=#{times} and receipt_no=#{receiptNo} and pay_mark =0")
+    int countYbZf(@Param(value = "patientId") String patientId, @Param("times") Integer times, @Param("receiptNo") Integer receiptNo);
 
 
     /**

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

@@ -190,14 +190,6 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
         mzChargeDetailPageDto.setTableName("mz_charge_detail");
         String receiptSerialTableName = "mz_receipt_serial";
         List<MzChargeDetail> mzChargeDetailList = mzChargeDetailMapper.selectMzChargeDetailWithPage(mzChargeDetailPageDto);
-//        if (mzChargeDetailList == null || mzChargeDetailList.size() == 0) {
-//            mzChargeDetailPageDto.setTableName("mz_charge_detail_b");
-//            receiptSerialTableName = "mz_receipt_serial_b";
-//            mzChargeDetailList = mzChargeDetailMapper.selectMzChargeDetailWithPage(mzChargeDetailPageDto);
-//            if (mzChargeDetailList == null || mzChargeDetailList.size() == 0) {
-//                return mzChargeDetailList;
-//            }
-//        }
         for (MzChargeDetail mzChargeDetail : mzChargeDetailList) {
             MzChargeDetail temp = mzChargeDetailMapper.selectWarnDeptAndDoctor(mzChargeDetail.getPatientId(), mzChargeDetail.getTimes(), mzChargeDetailPageDto.getTableName());
             mzChargeDetail.setWarnDept(temp.getWarnDept());
@@ -226,6 +218,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                         }
                     }
                 }
+                mzChargeDetail.setCountYbZf(mzDepositFileMapper.countYbZf(mzChargeDetail.getPatientId(), mzChargeDetail.getTimes(), mzChargeDetail.getReceiptNo()));
             }
         }
         return mzChargeDetailList;

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

@@ -140,4 +140,7 @@ audioServiceUrl: "http://webhis.thyy.cn:8706/voice/textToSpeech"
 soap_url: "http://172.16.32.178:622/pushservice.asmx?wsdl"
 
 #websocket 地址前半部分
-webSocketHost: "ws://172.16.30.33:8089/thmz/"
+webSocketHost: "ws://172.16.30.33:8089/thmz/"
+
+#门诊结算单地址
+mzjsdHost: http://172.16.30.26:3000

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

@@ -138,4 +138,6 @@ audioServiceUrl: "http://webhis.thyy.cn:8706/voice/textToSpeech"
 soap_url: "http://172.16.32.178:622/pushservice.asmx?wsdl"
 
 #websocket 地址前半部分
-webSocketHost: "ws://webhis.thyy.cn:81/thmz/"
+webSocketHost: "ws://webhis.thyy.cn:81/thmz/"
+#门诊结算单地址
+mzjsdHost: http://webhis.thyy.cn:8080

+ 46 - 0
src/main/resources/static/js/mz/toll_administration.js

@@ -4,6 +4,8 @@ var LODOP; //声明为全局变量
 var printIndex = -1;
 //选中的要退的费用收费编码
 var chargeItemCodes = null;
+//门诊结算单地址
+var mzjsdHost=null;
 $(function () {
     //默认光标在卡号输入框
     $("#cardNo").focus();
@@ -55,6 +57,22 @@ $(function () {
     $("#siReadCard").on("click", function (t) {
         siReadCard();
     });
+
+    //获取门诊医保结算单打印服务地址
+    $.ajax({
+        type: "GET",
+        url: '/thmz/getMzjsdHost',
+        dataType: "json",
+        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
+        success: function (res) {
+            if (res == '401' || res == 401) {
+                window.location.href = '/thmz/login/view'
+                return;
+            }
+            mzjsdHost=res.data;
+        }
+    });
+
 });
 
 /**
@@ -395,6 +413,9 @@ function initFeeTable() {
                                 str += '<button type="button" class="registration-no-color-foot-button" title="合作项目维护" onclick="matchProject(\'' + row.realNo + '\');"><i class="fa fa-plug"></i></button>';
                             }
                         }
+                        if(row.countYbZf>0){
+                            str += '<button type="button" class="registration-no-color-foot-button" title="打印医保结算单" onclick="printYbjsd(\'' + row.patientId + '\',' + row.times + ',' + row.receiptNo + ');"><i class="fa fa-file-word-o"></i></button>';
+                        }
                         return str;
                     }
                     if (payMarkGroup == 2) {
@@ -1515,6 +1536,31 @@ function obsoleteAndRepPrint(patientId, times, receiptNo) {
     });
 }
 
+/**
+ * 打印医保结算单
+ * @param patientId
+ * @param times
+ * @param receiptNo
+ */
+function printYbjsd(patientId, times, receiptNo) {
+    if(mzjsdHost==null){
+        errorMesageSimaple("医保结算单域名为空,操作失败!");
+        return;
+    }
+    var url =mzjsdHost+"/siSettleDetailList/"+patientId+"/"+times;
+    $("#ybjsdDiv").attr("src",url);
+    //window.open(url);
+    // $("#ybjsdDiv").load(url,function(data, textStatus,xmlRequest){
+    //     /*function里面包含三个参数:
+    //      * 1、返回请求的内容data
+    //      * 2、请求返回的状态:是否成功:success、error、notmodify、timeout
+    //      * 3、Xml请求对象
+    //      */
+    // });
+    $("#ybjsdModal").modal();
+}
+
+
 /**
  * 匹配合作项目
  * @param realNo

+ 22 - 0
src/main/resources/templates/mz/toll_administration.html

@@ -689,6 +689,28 @@
 </div>
 <!--患者查询弹窗结尾-->
 
+
+<!--医保结算单打印弹窗开始-->
+<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-hidden="true" id="ybjsdModal">
+    <div class="modal-dialog modal-lg">
+        <div class="modal-content" style="width: 800px;margin-left: 200px;height: 550px;">
+            <div class="modal-header">
+                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span>
+                </button>
+                <h4 class="modal-title modal-title-thmz">医保结算单打印</h4>
+            </div>
+            <!--<div class="modal-body" id="ybjsdDiv">-->
+                <!---->
+            <!--</div>-->
+            <iframe id="ybjsdDiv" align="center" width="100%" height="550px"  frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
+            <!--<div class="modal-footer">-->
+                <!--<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>-->
+            <!--</div>-->
+        </div>
+    </div>
+</div>
+<!--医保结算单打印弹窗结尾-->
+
 <object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0>
     <embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0></embed>
 </object>