Browse Source

perf: 退费调试通过

zhengjie 1 year ago
parent
commit
6067b0bac1
4 changed files with 18 additions and 6 deletions
  1. 2 2
      Business/Local/ReadCardProcess.cs
  2. 8 2
      Business/MobilePay.cs
  3. 6 1
      Common/Utils.cs
  4. 2 1
      NanChangMI.csproj

+ 2 - 2
Business/Local/ReadCardProcess.cs

@@ -124,7 +124,7 @@ namespace PTMedicalInsurance.Business
             joData.Add("mdtrt_cert_type", Global.pat.mdtrtcertType);
             joData.Add("mdtrt_cert_no", Utils.ConvertMdtrtcertNo());
             joData.Add("card_sn", Global.pat.card.SN);
-            joData.Add("begntime", Utils.GetDateTimeNow());
+            joData.Add("begntime", Utils.GetShortDateTimeNow());
             joData.Add("psn_cert_type", Global.pat.certType);
             joData.Add("certno", Global.pat.certNO); //证件号码
             joData.Add("psn_name", Global.pat.name);
@@ -159,7 +159,7 @@ namespace PTMedicalInsurance.Business
             string errorMsg = "";
 
             JObject joInput = new JObject();
-            joInput.Add("begntime", Utils.GetDateTimeNow());
+            joInput.Add("begntime", Utils.GetShortDateTimeNow());
 
             JObject joRtn = new JObject();
             joRtn = invoker.invokeCenterService(TradeEnum.ReadCardInfo, joInput);

+ 8 - 2
Business/MobilePay.cs

@@ -272,6 +272,7 @@ namespace PTMedicalInsurance.Business
             {
                 if (MSettl.onlineYBFalg != "Y")
                 {
+                    Global.businessType = "01301"; //结算
                     //读电子凭证
                     if (ReadEc(out errMsg) != 0)
                     {
@@ -370,7 +371,6 @@ namespace PTMedicalInsurance.Business
             MPat.gend = JsonHelper.getDestValue(jo, "gender");
             MPat.brdy = JsonHelper.getDestValue(jo, "birthday");
             MPat.naty = JsonHelper.getDestValue(jo, "nationality");
-            MPat.payOrdId = "";
         }
 
         #endregion
@@ -779,12 +779,18 @@ namespace PTMedicalInsurance.Business
                     return -1;
                 }
                 JObject joRtn = JObject.Parse(errMsg);
+
                 JObject joSettl = JObject.Parse(JsonHelper.getDestValue(joRtn, "result.data[0]"));
 
                 //入参
                 joInpar.Add("payOrdId", JsonHelper.getDestValue(joSettl, "SettlementID"));//支付订单号
                 joInpar.Add("appRefdSn", Utils.GetTradeNo());//应用退款流水号
-                joInpar.Add("appRefdTime", JsonHelper.getDestValue(joInsuAdmObj, "appRefdTime"));//应用退费时间
+                string appRefdTime = JsonHelper.getDestValue(joInsuAdmObj, "appRefdTime");
+                if (string.IsNullOrEmpty(appRefdTime))
+                {
+                    appRefdTime = Utils.GetDateTimeNow();
+                }
+                joInpar.Add("appRefdTime", appRefdTime);//应用退费时间
                 joInpar.Add("totlRefdAmt", JsonHelper.getDestValue(joSettl, "Sumamt"));//总退费金额
                 joInpar.Add("psnAcctRefdAmt", JsonHelper.getDestValue(joSettl, "AccountPaySumamt"));//医保个人账户支付
                 joInpar.Add("fundRefdAmt", JsonHelper.getDestValue(joSettl, "FundPaySumamt"));//基金支付

+ 6 - 1
Common/Utils.cs

@@ -21,11 +21,16 @@ namespace PTMedicalInsurance.Common
         /// 返回当前日期
         /// </summary>
         /// <returns></returns>
-        public static string GetDateTimeNow()
+        public static string GetShortDateTimeNow()
         {
             return DateTime.Now.ToString("yyyy-MM-dd");
         }
 
+        public static string GetDateTimeNow()
+        {
+            return DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+        }
+
         /// <summary>
         /// 获取交易号
         /// </summary>

+ 2 - 1
NanChangMI.csproj

@@ -35,7 +35,8 @@
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="BouncyCastle.Crypto, Version=1.9.0.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
-      <HintPath>packages\Portable.BouncyCastle.1.9.0\lib\net40\BouncyCastle.Crypto.dll</HintPath>
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\Demo\bin\Debug-Nanchang\BouncyCastle.Crypto.dll</HintPath>
     </Reference>
     <Reference Include="FastReport, Version=2020.3.7.0, Culture=neutral, PublicKeyToken=db7e5ce63278458c, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>