yeguodong 2 mesiacov pred
rodič
commit
002209e7c1

+ 4 - 4
src/main/java/cn/hnthyy/thmz/controller/api/MedicalViewApiController.java

@@ -938,7 +938,7 @@ public class MedicalViewApiController {
         mzDepositFiles.add(mzDepositFile);
     }
 
-    private void setYbDepositFile(WhiteList whiteList, MzDepositFileVo mzDepositFileVo, MzDepositFile mzDepositFile, List<MzDepositFile> mzDepositFiles) {
+    /*private void setYbDepositFile(WhiteList whiteList, MzDepositFileVo mzDepositFileVo, MzDepositFile mzDepositFile, List<MzDepositFile> mzDepositFiles) {
         PayInfo payInfo = tsmzService.calculateCost(whiteList.getOpId(), mzDepositFileVo.getPatientId(), mzDepositFileVo.getTimes(), mzDepositFileVo.getReceiptNo(), null);
         if (payInfo != null && payInfo.getCode() == 0) {
             //如果门诊统筹支付有值,添加收费方式
@@ -960,9 +960,9 @@ public class MedicalViewApiController {
                 mzDepositFiles.add(grzhmzDepositFile);
             }
         }
-    }
+    }*/
 
-    @PostMapping("/mzChargeFee")
+    /*@PostMapping("/mzChargeFee")
     public R mzChargeFee(@RequestBody Map<String, Object> query, HttpServletRequest httpServletRequest) {
         String patientId = Convert.toStr(query.get("patientId"));
         AssertUtil.isNotBlank(patientId, "门诊号不能为空");
@@ -1044,7 +1044,7 @@ public class MedicalViewApiController {
             throw new BizException(e.getMessage());
         }
         return R.ok("收费成功");
-    }
+    }*/
 
     /**
      * 门诊缴费订单支付状态查询

+ 11 - 3
src/main/java/cn/hnthyy/thmz/controller/mz/MzChargeDetailController.java

@@ -1663,7 +1663,9 @@ public class MzChargeDetailController {
                 }
                 DecodedJWT decodedJWT = TokenUtil.parseJWT(token);
                 User tokenUser = (User) JsonUtil.jsontoObject(decodedJWT.getSubject(), User.class);
-                PayInfo payInfo = tsmzService.calculateCost(tokenUser.getUserIdCode(), mzChargeDetailYb.getPatientId(), mzChargeDetailYb.getTimes(), mzChargeDetailYb.getReceiptNo(),null);
+                PayInfo payInfo = tsmzService.calculateCost(tokenUser.getUserIdCode(), mzChargeDetailYb.getPatientId(),
+                        mzChargeDetailYb.getTimes(), mzChargeDetailYb.getReceiptNo(),null,
+                        mzChargeDetailYb.getReadCardType(), mzChargeDetailYb.getReadCardResult(), mzChargeDetailYb.getBusCardInfo());
                 if (payInfo == null) {
                     resultMap.put("code", -1);
                     resultMap.put("message", "获取门诊统筹/特门费用失败");
@@ -2924,7 +2926,13 @@ public class MzChargeDetailController {
      */
     @UserLoginToken
     @RequestMapping(value = "/chargeFeeForMztcbl", method = {RequestMethod.GET})
-    public Map<String, Object> chargeFeeForMztcbl(@RequestParam("patientId") String patientId, @RequestParam("times") Integer times, @RequestParam("receiptNo") Integer receiptNo, HttpServletRequest httpServletRequest) {
+    public Map<String, Object> chargeFeeForMztcbl(@RequestParam("patientId") String patientId,
+                                                  @RequestParam("times") Integer times,
+                                                  @RequestParam("receiptNo") Integer receiptNo,
+                                                  @RequestParam("readCardType") String readCardType,
+                                                  @RequestParam("readCardResult") String readCardResult,
+                                                  @RequestParam("busCardInfo") String busCardInfo,
+                                                  HttpServletRequest httpServletRequest) {
         Map<String, Object> results = new HashMap<>();
         try {
             if (StringUtils.isBlank(patientId)) {
@@ -2949,7 +2957,7 @@ public class MzChargeDetailController {
                 return results;
             }
             results.put("code", 0);
-            results.put("receiptNo", mzChargeDetailService.chargeFeeForMztcbl(patientId, times, receiptNo, tokenUser));
+            results.put("receiptNo", mzChargeDetailService.chargeFeeForMztcbl(patientId, times, receiptNo, tokenUser, readCardType, readCardResult, busCardInfo));
             results.put("message", "门诊统筹补录费用成功");
             return results;
         } catch (MzException e) {

+ 6 - 0
src/main/java/cn/hnthyy/thmz/entity/his/mz/MzChargeDetailYb.java

@@ -27,6 +27,12 @@ public class MzChargeDetailYb implements Serializable,Comparable<MzChargeDetailY
     private String ybType;
     private Integer acctUsedFlag;
 
+    // 读卡类型:01-电子凭证,02-身份证,03-社保卡
+    private String readCardType;
+    private String readCardResult;
+    private String busCardInfo;
+
+
 
    //根据处方号升序排列,降序修改相减顺序即可
     @Override

+ 1 - 1
src/main/java/cn/hnthyy/thmz/service/his/mz/MzChargeDetailService.java

@@ -541,7 +541,7 @@ public interface MzChargeDetailService {
      * @return
      * @throws MzException
      */
-    int chargeFeeForMztcbl(String patientId, Integer times, Integer receiptNo, User user) throws MzException;
+    int chargeFeeForMztcbl(String patientId, Integer times, Integer receiptNo, User user, String readCardType, String readCardResult, String busCardInfo) throws MzException;
 
 
     /**

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

@@ -3286,7 +3286,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
 
     @Override
     @Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, timeout = 36000, rollbackFor = Exception.class)
-    public int chargeFeeForMztcbl(String patientId, Integer times, Integer receiptNo, User user) throws MzException {
+    public int chargeFeeForMztcbl(String patientId, Integer times, Integer receiptNo, User user, String readCardType, String readCardResult, String busCardInfo) throws MzException {
         BigDecimal byjzAmount = mzDepositFileMapper.selectByjzASmount(patientId, times, receiptNo);
         if (byjzAmount != null && byjzAmount.compareTo(BigDecimal.ZERO) > 0) {
             throw new MzException("该患者本次门诊处方仍有本院记账未收,请先将本院记账欠款补交!");
@@ -3294,7 +3294,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
         if (mzDepositFileMapper.selectMzTcZfInfo(patientId, times, receiptNo) > 0) {
             throw new MzException("该患者本次门诊处方已经进行了门诊统筹补录,请勿重复操作!");
         }
-        PayInfo payInfo = tsmzService.calculateCost(user.getUserIdCode(), patientId, times, receiptNo,null);
+        PayInfo payInfo = tsmzService.calculateCost(user.getUserIdCode(), patientId, times, receiptNo,null, readCardType, readCardResult, busCardInfo);
         if (payInfo == null) {
             throw new MzException("获取门诊统筹/特门费用失败!");
         }

+ 5 - 1
src/main/java/cn/hnthyy/thmz/service/impl/thmz/TsmzServiceImpl.java

@@ -151,7 +151,8 @@ public class TsmzServiceImpl implements TsmzService {
     }
 
     @Override
-    public PayInfo calculateCost(String staffId, String patientId, Integer times, Integer receiptNo, Integer acctUsedFlag) {
+    public PayInfo calculateCost(String staffId, String patientId, Integer times, Integer receiptNo, Integer acctUsedFlag,
+                                 String readCardType,String readCardResult, String busCardInfo) {
         String realUrl = tsmzServiceUrl + "/calculateCost";
         log.info("调用医保结算接口,操作人={},病人={},就诊次数={},缴费次数={},使用个账={}", staffId, patientId, times, receiptNo, acctUsedFlag);
         Map<String, Object> map = new HashMap<>();
@@ -161,6 +162,9 @@ public class TsmzServiceImpl implements TsmzService {
         map.put("times", times);
         map.put("receiptNo", receiptNo);
         map.put("acctUsedFlag", acctUsedFlag);
+        map.put("readCardType", readCardType);
+        map.put("readCardResult", readCardResult);
+        map.put("busCardInfo", busCardInfo);
         //Map 转成  JSONObject 字符串
         JSONObject jsonObj = new JSONObject(map);
         try {

+ 2 - 1
src/main/java/cn/hnthyy/thmz/service/thmz/TsmzService.java

@@ -57,7 +57,8 @@ public interface TsmzService {
      * @param receiptNo
      * @return
      */
-    PayInfo calculateCost(String staffId, String patientId, Integer times, Integer receiptNo, Integer acctUsedFlag);
+    PayInfo calculateCost(String staffId, String patientId, Integer times, Integer receiptNo, Integer acctUsedFlag,
+                          String readCardType,String readCardResult, String busCardInfo);
     /**
      * @description: 打印门诊指引单时获取试算报销
      * @author: lihong 

+ 20 - 71
src/main/resources/static/js/mz/toll_administration.js

@@ -1565,7 +1565,7 @@ function initClinicForException(patientId, times, payMark, receiptNo) {
 /**
  * 提示有记账记录
  */
-function tipHaveTally(data, patientId, times, name, receiptNo,doctorName) {
+function tipHaveTally(data, patientId, times, name, receiptNo) {
     addOrderLock(patientId,times,null)
     closeConfirmFeeModal();
     if (patientId == null || patientId == "") {
@@ -1576,7 +1576,6 @@ function tipHaveTally(data, patientId, times, name, receiptNo,doctorName) {
     $("#dataIdHaveTally").val(data);
     $("#timesHaveTally").val(times);
     $("#receiptNoHaveTally").val(receiptNo);
-    $("#doctorNameHaveTally").val(doctorName);
     saveFeeGzzf()
     // postAjaxJsonHttpRequst("/thmz/queryCountYbZf",{"patientId": patientId, "times": times},true,function (rs) {
     //     if (rs == '401' || rs == 401) {
@@ -1598,12 +1597,20 @@ function tipHaveTally(data, patientId, times, name, receiptNo,doctorName) {
 
 //收费时保存个账支付选择
 function saveFeeGzzf() {
+    var param = {
+        "patientId": $("#patientIdHaveTally").val(),
+        "times": $("#timesHaveTally").val(),
+        "receiptNo": $("#receiptNoHaveTally").val(),
+        "readCardType": $('input[name="mztczfSiReadCardType"]:checked').val(),
+        "readCardResult": $("#readCardResult").val(),
+        "busCardInfo": $("#pBusiCardInfo").val()
+    }
     $.ajax({
         type: "POST",
         url: '/thmz/getTmFee',
         contentType: "application/json;charset=UTF-8",
         dataType: "json",
-        data: JSON.stringify({"patientId": $("#patientIdHaveTally").val(), "times": $("#timesHaveTally").val(), "receiptNo": $("#receiptNoHaveTally").val()}),
+        data: JSON.stringify(param),
         headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
         async: false,
         success: function (res) {
@@ -1845,7 +1852,6 @@ function saveConfirmFee() {
     var name = $("#nameHaveTally").val();
     var times = $("#timesHaveTally").val();
     var receiptNo = $("#receiptNoHaveTally").val();
-    var doctorName = $("#doctorNameHaveTally").val();
     var realMoney = $("#realMoney").val();
     jsonData.patientId = patientId;
     jsonData.times = times;
@@ -1898,7 +1904,7 @@ function saveConfirmFee() {
 //                    printDzfp(patientId, times,res.receiptNo,0)
 //                }
                 //进入电子发票开票
-                printDzfp(patientId, times,res.receiptNo,0,name,realMoney,doctorName)
+                printDzfp(patientId, times,res.receiptNo,0,name,realMoney)
                 successMesage(res);
                 closeConfirmFeeModal();
                 //缴费成功后清空全局参数
@@ -1962,13 +1968,10 @@ function saveProject() {
 }
 
 //上传电子发票
-//function printDzfp(patientId,times,receiptNo,loadingFlag,name,amount,doctorName,chargeDate) {
-function printDzfp(patientId,times,receiptNo,loadingFlag,name,amount,doctorName) {
+function printDzfp(patientId,times,receiptNo,loadingFlag,name,amount) {
     if(loadingFlag == 1){
         $("#dzfpLoadingModal").modal('show');
     }
-
-
     postAjaxJsonHttpRequst("/thmz/getNewAllSerialForThisTime",{patientId:patientId,times:times,receiptNo:receiptNo},true,function (res) {
         if(res.code == 0){
         var typeFlag = "1";
@@ -1979,7 +1982,7 @@ function printDzfp(patientId,times,receiptNo,loadingFlag,name,amount,doctorName)
                 if(rs.code ==0){
                     successMesageSimaple("电子发票上传成功,即将打印!")
                     setTimeout(function(){
-                        prn1PrintAndQRCode(patientId, times,rs.data.serialNo,name,amount,doctorName);
+                        prn1PrintAndQRCode(patientId, times,rs.data.serialNo,name,amount);
                     },3000)
                     if(typeFlag == 1){
                         initFeeTable();
@@ -2008,20 +2011,6 @@ function uploadMzInvoice(patientId,times,receiptNo,typeFlag) {
         if(typeFlag == 1){
             $("#dzfpLoadingModal").modal('hide');
         }
-//        if(rs.code ==0){
-//            successMesageSimaple("电子发票上传成功,即将打印!")
-//            setTimeout(function(){
-//                prn1PrintAndQRCode(patientId, times,rs.data.serialNo,name,amount,doctorName);
-//            },3000)
-//            if(typeFlag == 1){
-//                            initFeeTable();
-//                        }
-//            if(typeFlag == 1){
-//                initFeeTable();
-//            }
-//        }else {
-//            errorMesage(rs);
-//        }
         if(rs.code ==0){
             successMesageSimaple("电子发票上传成功!")
             if(typeFlag == 1){
@@ -2338,23 +2327,6 @@ function printCommon(url, patientId, times, chargeFeeFlag) {
     });
 }
 
-//下载电子发票
-function downloadDzfp() {
-    postAjaxJsonHttpRequst("/thmz/selectDzfpUploadAboutSerialNo",{patientId:dzfp_patientId,times:dzfp_times,serialNo:dzfp_serialNo},true,function (res) {
-        if(res.code == 0){
-            $("#dzfpDownModal").modal("hide");
-            if(res.data.resUrl){
-                window.open(res.data.resUrl)
-            } else {
-                errorMesage("未获取到电子发票,请重新上传发票!");
-            }
-
-        }else {
-            errorMesage(res)
-        }
-    })
-}
-
 /**
  * 打印发票通用方法
  * @param patientId
@@ -2365,7 +2337,7 @@ function downloadDzfp() {
  * 直接打印发票
  * @param patientId
  */
-function prn1PrintAndQRCode(patientId, times,serialNo,name,fee,doctorName) {
+function prn1PrintAndQRCode(patientId, times,serialNo,name,fee) {
 //    getInvoiceBase64(patientId,times,serialNo)
 //    setPrint();
 //    var height = "93.15mm";
@@ -2387,30 +2359,6 @@ function prn1PrintAndQRCode(patientId, times,serialNo,name,fee,doctorName) {
 //    LODOP.SET_PRINT_MODE("CREATE_CUSTOM_PAGE_NAME", "门诊发票");//对新建的纸张重命名
 //    LODOP.SET_PRINT_STYLE("FontSize", 11); //字体大小
 //    LODOP.ADD_PRINT_TEXT("6mm", "0mm", "55mm", "3mm", hospitalName);
-    //获取项目集合
-    var params = {
-        billItemCode:'012',
-        patientId:patientId,
-        times:times,
-        payMark:0,
-        receiptNo:'1',
-    }
-//    initChargeDetailTablePublic('/thmz/getMzChargeDetailByBillItem', $('#charge_detail_table'), queryParamsForDetail);
-//    var projectList = [];
-    $("#printProjectName").empty();
-    postAjaxJsonHttpRequst("/thmz/getMzChargeDetailByBillItem",params,true,function (res) {
-        if(res.code == 0){
-        res.data.forEach((item,index)=>{
-//            projectList.add({
-//                name:item.name,
-//                fee:item.chargeAmount
-//            })
-            var html = '<div style="font-size:15px;line-height:15px;float:left;width:150px;"><span style="width:105px;display:inline-block;overflow:hidden;white-space: nowrap;" id="printProjectName'+(index+1)+'">'+item.tcName+'</span><span style="margin-left: 5px;line-height:15px;" id="printProjectFee1">'+item.amount+'</span><br /></div>'
-            $('#printProjectName').append(html);
-        })
-
-        }
-    })
     postAjaxJsonHttpRequst("/thmz/selectDzfpUploadAboutSerialNo",{patientId:patientId,times:times,serialNo:serialNo},true,function (dzfp) {
         if(dzfp.code == 0){
             if(dzfp.data.resUrl){
@@ -2420,15 +2368,13 @@ function prn1PrintAndQRCode(patientId, times,serialNo,name,fee,doctorName) {
                     width: 1, //线宽
                     height: 30, //条码高度
                     displayValue: true, //是否显示文字信息
-                    fontSize: 14,
                 });
                 $("#printDate1").text(name);
                 $("#printDate2").text(fee);
                 $("#printDate3").text(dzfp.data.fpNo);
                 $("#printDate4").text(dzfp.data.opCode);
                 $("#printDate5").text(dzfp.data.blueIssueDate);
-                console.log("doctorName",doctorName)
-                $("#printDate6").text(doctorName);
+                $("#printDate5").text(dzfp.data.blueIssueDate);
                 let src = createInMemoryQR(dzfp.data.resUrl);
                 let wxPayQrCardHtml =`<img src="${src}" style="width: 100px;height: 100px"/><div style="width: 140px;margin-top: 2px;"></div>`;
                 $("#dzfpImg").html(wxPayQrCardHtml);
@@ -3201,7 +3147,7 @@ function saveRefundFee(refundType) {
                         if(fpVsesionNo == 0){
                             prn1Print(res.patientId, res.times, false, 1);
                         }else {
-//                            printDzfp(res.patientId, res.times,1,0)
+                            printDzfp(res.patientId, res.times,1,0)
                         }
                     }
                 } else {
@@ -3964,9 +3910,12 @@ function chargeFeeForMztcbl() {
     var receiptNo = $("#mzblReceiptNo").val();
     var doctorName = $("#doctorNameHaveTally").val();
     var realMoney = $("#realMoney").val();
+    var readCardType = $('input[name="mztczfSiReadCardType"]:checked').val();
+    var readCardResult = $("#readCardResult").val();
+    var busCardInfo = $("#pBusiCardInfo").val()
     $.ajax({
         type: "GET",
-        url: '/thmz/chargeFeeForMztcbl?patientId=' + patientId + "&times=" + times + "&receiptNo=" + receiptNo,
+        url: '/thmz/chargeFeeForMztcbl?patientId=' + patientId + "&times=" + times + "&receiptNo=" + receiptNo + "&readCardType=" + readCardType + "&readCardResult=" + readCardResult + "&busCardInfo=" + busCardInfo,
         contentType: "application/json;charset=UTF-8",
         dataType: "json",
         headers: {