Selaa lähdekoodia

优化门诊统筹支付发票打印功能,增加是医保和省医保个账支付方式

hurugang 3 vuotta sitten
vanhempi
commit
2ef07eb480

+ 11 - 0
src/main/java/cn/hnthyy/thmz/common/Constants.java

@@ -189,6 +189,17 @@ public class Constants {
      * 省医保卡缴费
      */
     public static final String SHENYBK="7";
+
+    /**
+     * 市医保卡个账
+     */
+    public static final String SSHIYBGZ="T";
+
+    /**
+     * 省医保卡个账
+     */
+    public static final String SHENYGZ="P";
+
     /**
      * 医技分组编号
      */

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

@@ -782,7 +782,7 @@ public class MedicalViewApiController {
                 if (payInfo.getAcctPay().compareTo(BigDecimal.ZERO) == 1) {
                     MzDepositFile grzhmzDepositFile = CloneUtil.clone(mzDepositFile);
                     grzhmzDepositFile.setAmount(payInfo.getAcctPay());
-                    grzhmzDepositFile.setChequeType(Integer.valueOf(2).equals(payInfo.getCardType()) ? Constants.SHENYBK : Constants.SSHIYBK);
+                    grzhmzDepositFile.setChequeType(Integer.valueOf(2).equals(payInfo.getCardType()) ? Constants.SHENYGZ : Constants.SSHIYBGZ);
                     grzhmzDepositFile.setPsordnum(null);
                     grzhmzDepositFile.setAgtordnum(null);
                     mzDepositFiles.add(grzhmzDepositFile);

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

@@ -1340,6 +1340,7 @@ public class MzChargeDetailController {
                     resultMap.put("message", payInfo.getErrorMessage());
                     return resultMap;
                 }
+                payInfo.setYbkType(Integer.valueOf(2).equals(payInfo.getCardType())?Constants.SHENYGZ:Constants.SSHIYBGZ);
                 resultMap.put("data", payInfo);
             }
             resultMap.put("code", 0);
@@ -1944,7 +1945,7 @@ public class MzChargeDetailController {
                     }
                     if (Constants.YBJZ.equals(mf.getChequeType())) {
                         fundPay = fundPay.add(mf.getAmount());
-                    } else if (Constants.SSHIYBK.equals(mf.getChequeType()) || Constants.SHENYBK.equals(mf.getChequeType())) {
+                    } else if (Constants.SSHIYBGZ.equals(mf.getChequeType()) || Constants.SHENYGZ.equals(mf.getChequeType())) {
                         acctPay = acctPay.add(mf.getAmount());
                     } else {
                         selfAmount = selfAmount.add(mf.getAmount());

+ 3 - 1
src/main/java/cn/hnthyy/thmz/entity/thmz/PayInfo.java

@@ -17,11 +17,13 @@ public class PayInfo {
     private BigDecimal totalCost;
     //个人账户支付金额 (医保卡支付金额)
     private BigDecimal acctPay;
-    //1-市医保,2-省医保,3-异地
+    //1-市医保,2-省医保,3-异地 医保返回
     private Integer cardType;
     //结算状态
     private Integer code;
     //错误信息,如果结算失败,会有异常信息
     private String errorMessage;
+    //HIS医保卡类型
+    private String ybkType;
 
 }

+ 1 - 1
src/main/java/cn/hnthyy/thmz/mapper/his/mz/MzReceiptSerialMapper.java

@@ -150,7 +150,7 @@ public interface MzReceiptSerialMapper {
             "charge10,charge11,charge12,charge13,charge14,charge15,charge16,charge17,charge18,charge19,charge20,rtrim(pay_mark) pay_mark,total_charge,charge_date,rtrim(receipt_bill) receipt_bill,",
             "receipt_sn,dcount_date,rtrim(windows_no) windows_no,dcount_no,serial_yb,rtrim(fp_flag) fp_flag,rtrim(responce_type) responce_type,rtrim(cheque_type) cheque_type,cheque_no,rtrim(tf_flag) tf_flag," +
                     "dept_no,rtrim(pay_id) pay_id,charge_dcount_date,charge_dcount_no,obsolete_id,obsolete_date,obsolete_dcount_date,obsolete_dcount_no",
-            "from ${tableName} WITH(NOLOCK) where patient_id=#{patientId,jdbcType=CHAR} and times = #{times,jdbcType=INTEGER} and (cheque_type <![CDATA[<>]]>  'Y' or cheque_type is null or operator_id ='99999' ) ",
+            "from ${tableName} WITH(NOLOCK) where patient_id=#{patientId,jdbcType=CHAR} and times = #{times,jdbcType=INTEGER} and (cheque_type  not in('Y','2') or cheque_type is null or operator_id ='99999' ) ",
             "<when test='receiptBill!=null'>",
             " and receipt_bill =#{receiptBill}",
             "</when>",

+ 6 - 6
src/main/resources/static/js/mz/toll_administration.js

@@ -904,11 +904,11 @@ function confirmFeeModal(times, totalCharge, receiptNo) {
     if (acctPay > 0) {
         var payTypeId = "payType_" + payTypeIndex++;
         addPayType(payTypeId);
-        var ybkType = 6;
-        if (cardType != null && (cardType == 2 || cardType == "2")) {
-            ybkType = 7;
-        }
-        $('#' + payTypeId).selectpicker('val', ybkType);
+        // var ybkType = 'T';
+        // if (cardType != null && (cardType == 2 || cardType == "2")) {
+        //     ybkType = 'P';
+        // }
+        $('#' + payTypeId).selectpicker('val', cardType);
         $('#' + payTypeId).selectpicker('refresh');
         $('#' + payTypeId).parent().parent().next().children(':first').val(acctPay);
         $('#' + payTypeId).parent().parent().next().next().children(':first').remove();
@@ -1168,7 +1168,7 @@ function tipHaveTally(data, patientId, times, name, receiptNo) {
                 if (res.data != undefined && res.data != null) {
                     $("#fundPay").val(res.data.fundPay);
                     $("#acctPay").val(res.data.acctPay);
-                    $("#cardType").val(res.data.cardType);
+                    $("#cardType").val(res.data.ybkType);
                     //$("#realMoney").val(res.data.selfPay);
                 } else {
                     $("#fundPay").val(0.0);