zhengjie 1 anno fa
parent
commit
869bdbdcbe
4 ha cambiato i file con 116 aggiunte e 47 eliminazioni
  1. 55 0
      Business/HisMainBusiness.cs
  2. 47 46
      Business/MobilePay.cs
  3. 13 0
      Helper/InvokeHelper.cs
  4. 1 1
      InsuBusiness.cs

+ 55 - 0
Business/HisMainBusiness.cs

@@ -1746,6 +1746,61 @@ namespace PTMedicalInsurance.Business
                         pat.billID = JsonHelper.getDestValue(joInparam, "params[0].billID");
                         break;
                     }
+                case "M6"://门诊结算
+                    {
+                        pat.adm_Dr = int.Parse(JsonHelper.getDestValue(joInparam, "params[0].admID"));
+                        pat.recordID = JsonHelper.getDestValue(joInparam, "params[0].recordID");
+                        pat.billID = JsonHelper.getDestValue(joInparam, "params[0].billID");
+                        Global.pat.insuplc_admdvs = "";
+
+                        if (string.IsNullOrEmpty(JsonHelper.getDestValue(joInparam, "insuAdmObj.inDays")))
+                        {
+                            Global.Set.hospitalizationsDays = 0;
+                        }
+                        else
+                        {
+                            Global.Set.hospitalizationsDays = int.Parse(JsonHelper.getDestValue(joInparam, "insuAdmObj.inDays"));
+                        }
+
+                        if (string.IsNullOrEmpty(JsonHelper.getDestValue(joInparam, "insuAdmObj.inTimes")))
+                        {
+                            Global.Set.hospitalizationsTimes = 0;
+                        }
+                        else
+                        {
+                            Global.Set.hospitalizationsTimes = int.Parse(JsonHelper.getDestValue(joInparam, "insuAdmObj.inTimes"));
+                        }
+
+                        if (string.IsNullOrEmpty(JsonHelper.getDestValue(joInparam, "insuAdmObj.admDateTime")))
+                        {
+                            Global.Set.hisAdmTime = "";
+                        }
+                        else
+                        {
+                            Global.Set.hisAdmTime = Convert.ToDateTime(JsonHelper.getDestValue(joInparam, "insuAdmObj.admDateTime")).ToString("yyyy-MM-dd HH:mm:ss");
+                        }
+
+                        if (string.IsNullOrEmpty(JsonHelper.getDestValue(joInparam, "insuAdmObj.disDateTime")))
+                        {
+                            Global.Set.hisDischargeTime = "";
+                        }
+                        else
+                        {
+                            Global.Set.hisDischargeTime = Convert.ToDateTime(JsonHelper.getDestValue(joInparam, "insuAdmObj.disDateTime")).ToString("yyyy-MM-dd HH:mm:ss");
+                        }
+                        break;
+                    }
+                case "M6C"://移动支付取消
+                    {
+                        pat.psn_no = JsonHelper.getDestValue(joInparam, "insuAdmObj.psn_no");
+                        pat.mdtrtID = JsonHelper.getDestValue(joInparam, "insuAdmObj.mdtrt_id");
+                        pat.settlID = JsonHelper.getDestValue(joInparam, "insuAdmObj.setl_id");
+                        pat.insuplc_admdvs = JsonHelper.getDestValue(joInparam, "insuAdmObj.insuplc_admdvs");
+                        pat.adm_Dr = int.Parse(JsonHelper.getDestValue(joInparam, "params[0].admID"));
+                        pat.recordID = JsonHelper.getDestValue(joInparam, "params[0].recordID");
+                        pat.billID = JsonHelper.getDestValue(joInparam, "params[0].billID");
+                        break;
+                    }
                 case "Z4"://住院预结算
                     {
                         pat.adm_Dr = int.Parse(JsonHelper.getDestValue(joInparam, "insuAdmObj.admID"));

+ 47 - 46
Business/MobilePay.cs

@@ -232,10 +232,9 @@ namespace PTMedicalInsurance.Business
                     return -1;
                 }
                 JObject joEncData = JObject.Parse((errMsg));
-                JObject joSettlInfo = JObject.Parse(JsonHelper.getDestValue(joEncData, "output.data"));
                 Global.writeLog(JsonHelper.Compress(joEncData));
                 //设置
-                setSettlementsBy6301Rtn(joSettlInfo);
+                setSettlementsBy6301Rtn(joEncData);
                 MSettl.confirmFlag = 1;
                 //存入MI 结算表
                 if (updateSettlement(out errMsg) != 0)
@@ -286,7 +285,7 @@ namespace PTMedicalInsurance.Business
                     **/
                 //处理撤销数据
 
-                if (cancleSettlement(MPat.settlID, out errMsg) != 0)
+                if (cancleSettlement(MSettl.settlID, out errMsg) != 0)
                 {
                     outPar = errMsg;
                     return -1;
@@ -316,8 +315,7 @@ namespace PTMedicalInsurance.Business
             MPat.payAuthNo = JsonHelper.getDestValue(joInsuAdmObj, "payAuthNo");
             MPat.uldLatlnt = JsonHelper.getDestValue(joInsuAdmObj, "uldLatlnt");
             MPat.payOrdId = JsonHelper.getDestValue(joInsuAdmObj, "payOrdId");
-            MPat.settlID = MPat.payOrdId;
-            MPat.mdtrtID = JsonHelper.getDestValue(joInsuAdmObj, "mdtrtId");
+            MPat.mdtrtID = JsonHelper.getDestValue(joInsuAdmObj, "mdtrt_id");
             Global.pat.mdtrtID = MPat.mdtrtID;
         }
         public void setPatientBy6201Rtn(JObject jo)
@@ -403,50 +401,53 @@ namespace PTMedicalInsurance.Business
             MSettl.accountMutualAidAmount = getDecimalFee(jo, "extData.preSetl.acct_mulaid_pay");
         }
 
-        public void setSettlementsBy6301Rtn(JObject jo)
+        public void setSettlementsBy6301Rtn(JObject joRtn)
         {
-            //MPat.settlID = JsonHelper.getDestValue(jo, "setl_id");
-            //MPat.psn_no = JsonHelper.getDestValue(jo, "psn_no");
-            //MPat.naty = JsonHelper.getDestValue(jo, "naty");
-            //MPat.name = JsonHelper.getDestValue(jo, "name");
-            //MPat.age = JsonHelper.getDestValue(jo, "age");
-            //MPat.gend = JsonHelper.getDestValue(jo, "gend");
-            //MPat.certNO = JsonHelper.getDestValue(jo, "certno");
-            //MPat.brdy = JsonHelper.getDestValue(jo, "brdy");
-            //MPat.insuType = JsonHelper.getDestValue(jo, "insutype");
-            //MPat.psn_type = JsonHelper.getDestValue(jo, "psn_type");
-            //MPat.mdtrtcertType = JsonHelper.getDestValue(jo, "mdtrt_cert_type");
-            //MPat.medType = JsonHelper.getDestValue(jo, "med_type");
-            //MPat.insuplc_admdvs = JsonHelper.getDestValue(jo, "insuplc_admdvs");
-
-            MPat.payOrdId = JsonHelper.getDestValue(jo, "payOrdId");
-            MSettl.ordStas = JsonHelper.getDestValue(jo, "ordStas");
-            MSettl.sumamt = getDecimalFee(jo, "feeSumamt");
-            MSettl.personCashPay = getDecimalFee(jo, "ownPayAmt");
-            MSettl.accountPaySumamt = getDecimalFee(jo, "psnAcctPay");
-            MSettl.fundPaySumamt = getDecimalFee(jo, "fundPay");
+            JObject jo = JObject.Parse(JsonHelper.getDestValue(joRtn, "extData.setlinfo"));
+
+            MPat.settlID = JsonHelper.getDestValue(jo, "setlId");
+            MPat.psn_no = JsonHelper.getDestValue(jo, "psnNo");
+            MPat.naty = JsonHelper.getDestValue(jo, "naty");
+            MPat.name = JsonHelper.getDestValue(jo, "psnName");
+            MPat.age = JsonHelper.getDestValue(jo, "age");
+            MPat.gend = JsonHelper.getDestValue(jo, "gend");
+            MPat.certNO = JsonHelper.getDestValue(jo, "certno");
+            MPat.brdy = JsonHelper.getDestValue(jo, "brdy");
+            MPat.insuType = JsonHelper.getDestValue(jo, "insutype");
+            MPat.psn_type = JsonHelper.getDestValue(jo, "psnType");
+            MPat.mdtrtcertType = JsonHelper.getDestValue(jo, "mdtrtCertType");
+            MPat.medType = JsonHelper.getDestValue(jo, "medType");
+            MPat.insuplc_admdvs = JsonHelper.getDestValue(joRtn, "extData.insuplcAdmdvs");
+
+            MPat.payOrdId = JsonHelper.getDestValue(joRtn, "payOrdId");
+            MSettl.ordStas = JsonHelper.getDestValue(joRtn, "ordStas");
+            MSettl.sumamt = getDecimalFee(joRtn, "feeSumamt");
+
+            MSettl.personCashPay = getDecimalFee(jo, "psnCashPay");
+            MSettl.accountPaySumamt = getDecimalFee(jo, "acctPay");
+            MSettl.fundPaySumamt = getDecimalFee(jo, "fundPaySumamt");
 
             //MSettl.deposit = getDecimalFee(jo, "deposit");
-            //MSettl.clearingOrgan = JsonHelper.getDestValue(jo, "clr_optins");
-            //MSettl.clearingType = JsonHelper.getDestValue(jo, "clr_type");
-            //MSettl.clearingWay = JsonHelper.getDestValue(jo, "clr_way");
-            //MSettl.civilserviceAllowancePay = getDecimalFee(jo, "cvlserv_pay");
-            //MSettl.ownPayAmount = getDecimalFee(jo, "fulamt_ownpay_amt");
-            //MSettl.overLimitAmountmt = getDecimalFee(jo, "overlmt_selfpay");
-            //MSettl.preSelfPayAmount = getDecimalFee(jo, "preselfpay_amt");
-            //MSettl.inPolicyRangeAmount = getDecimalFee(jo, "inscp_scp_amt");
-            //MSettl.actualPayDeductible = getDecimalFee(jo, "act_pay_dedc");
-            //MSettl.healthInsurancePay = getDecimalFee(jo, "hifp_pay");
-            //MSettl.healthInsuranceRatio = getDecimalFee(jo, "pool_prop_selfpay");
-            //MSettl.enterpriseSupplementPay = getDecimalFee(jo, "hifes_pay");
-            //MSettl.seriousIllnessPay = getDecimalFee(jo, "hifmi_pay");
-            //MSettl.largeExpensesSupplementPay = getDecimalFee(jo, "hifob_pay");
-            //MSettl.medicalAssistPay = getDecimalFee(jo, "maf_pay");
-            //MSettl.hospitalPartAmount = getDecimalFee(jo, "hosp_part_amt");
-            //MSettl.otherPay = getDecimalFee(jo, "oth_pay");
-            //MSettl.personPaySumamt = getDecimalFee(jo, "psn_part_amt");
-            //MSettl.balance = getDecimalFee(jo, "balc");
-            //MSettl.accountMutualAidAmount = getDecimalFee(jo, "acct_mulaid_pay");
+            MSettl.clearingOrgan = JsonHelper.getDestValue(jo, "clrOptins");
+            MSettl.clearingType = JsonHelper.getDestValue(jo, "clrType");
+            MSettl.clearingWay = JsonHelper.getDestValue(jo, "clrWay");
+            MSettl.civilserviceAllowancePay = getDecimalFee(jo, "cvlservPay");
+            MSettl.ownPayAmount = getDecimalFee(jo, "fulamtOwnpayAmt");
+            MSettl.overLimitAmountmt = getDecimalFee(jo, "overlmtSelfpay");
+            MSettl.preSelfPayAmount = getDecimalFee(jo, "preselfpayAmt");
+            MSettl.inPolicyRangeAmount = getDecimalFee(jo, "inscpScpAmt");
+            MSettl.actualPayDeductible = getDecimalFee(jo, "actPayDedc");
+            MSettl.healthInsurancePay = getDecimalFee(jo, "hifpPay");
+            MSettl.healthInsuranceRatio = getDecimalFee(jo, "poolPropSelfpay");
+            MSettl.enterpriseSupplementPay = getDecimalFee(jo, "hifesPay");
+            MSettl.seriousIllnessPay = getDecimalFee(jo, "hifmiPay");
+            MSettl.largeExpensesSupplementPay = getDecimalFee(jo, "hifobPay");
+            MSettl.medicalAssistPay = getDecimalFee(jo, "mafPay");
+            MSettl.hospitalPartAmount = getDecimalFee(jo, "hospPartAmt");
+            MSettl.otherPay = getDecimalFee(jo, "othPay");
+            MSettl.personPaySumamt = getDecimalFee(jo, "psnPartAmt");
+            MSettl.balance = getDecimalFee(jo, "balc");
+            MSettl.accountMutualAidAmount = getDecimalFee(jo, "acctMulaidPay");
         }
 
         public void setSettlementsByInPar()

+ 13 - 0
Helper/InvokeHelper.cs

@@ -338,6 +338,19 @@ namespace PTMedicalInsurance.Helper
                 Global.curEvt.URL = Global.inf.mobilePayURL + url;
 
                 string outputData = "", errMsg = "";
+
+                // 动态调试模式
+                if (Global.curEvt.enabledDebug)
+                {
+                    CenterResult center = new CenterResult();
+                    center.setTradeNo(funNO);
+                    if (center.ShowDialog() == DialogResult.OK)
+                    {
+                        outPar = center.returnData;
+                        return JObject.Parse(outPar);
+                    }
+                }
+
                 InvokeRestCenter mobileCenter = new InvokeRestCenter();
                 int iInt = mobileCenter.Business(data, ref outputData, ref errMsg);
                 joRtn = JObject.Parse(outputData);

+ 1 - 1
InsuBusiness.cs

@@ -716,7 +716,7 @@ namespace PTMedicalInsurance
                 if (init(InParam, out outParam) != 0)
                 {
                     rtnResult = outParam;
-                    return rtnResult; 
+                    return rtnResult;
                 }
                 //获取pat
                 hBus.GetSettlementHisInfo(businessType, joInParam, out Global.pat);