zhengjie 1 年間 前
コミット
f5d8463e33
4 ファイル変更18 行追加13 行削除
  1. 3 0
      Common/Common.cs
  2. 3 2
      HeFeiMI.csproj
  3. 6 8
      Helper/InvokeHelper.cs
  4. 6 3
      InsuBusiness.cs

+ 3 - 0
Common/Common.cs

@@ -709,7 +709,10 @@ namespace PTMedicalInsurance.Common
     {
         public static string getDestPosStrBySpliter(string source, int pos, string spliter = "|")
         {
+            if (string.IsNullOrEmpty(source)) return source;
+
             string[] strArr = source.Split(new string[1] {spliter },StringSplitOptions.None);//根据逗号分隔字符串str
+            if (strArr.Length < pos) return source;
 
             return strArr[pos - 1];
         }

+ 3 - 2
HeFeiMI.csproj

@@ -46,8 +46,9 @@
       <HintPath>packages\Microsoft.Office.Interop.Excel.15.0.4795.1001\lib\net20\Microsoft.Office.Interop.Excel.dll</HintPath>
       <EmbedInteropTypes>True</EmbedInteropTypes>
     </Reference>
-    <Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
-      <HintPath>packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
+    <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\Demo\bin\Debug-ChongQing\Newtonsoft.Json.dll</HintPath>
     </Reference>
     <Reference Include="Office, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
       <HintPath>packages\Microsoft.Office.Excel.14.0.4760.1000\lib\net20\Office.dll</HintPath>

+ 6 - 8
Helper/InvokeHelper.cs

@@ -432,12 +432,8 @@ namespace PTMedicalInsurance.Helper
         private void setCenterURL(string funNo)
         {
             string prefix = Global.inf.centerURL;
-            if (Global.curEvt.testMode)
-            {
-                // 医保测试环境
-                LoadCenterURL(true);
-            }
-
+            // 环境
+            LoadCenterURL(true);
 
             switch (funNo)
             {
@@ -450,10 +446,10 @@ namespace PTMedicalInsurance.Helper
                     prefix = Global.inf.centerURL;
                     break;
             }
-            //移动支付使用医保测试环境【测试】,正式使用时须去掉
+            //移动支付
             if (funNo.StartsWith("62") || funNo.StartsWith("63") || funNo.StartsWith("64"))
             {
-                prefix = "http://10.67.248.214:8086/1.0.0/hsa-fsi-";  //测试
+                prefix = Global.inf.mobilePayURL;  //测试
             }
 
             Global.curEvt.URL = prefix + funNo;
@@ -519,6 +515,8 @@ namespace PTMedicalInsurance.Helper
             String outPar = "";
             try
             {
+                LoadCenterURL(true);
+
                 string url = "";
                 switch (funNO)
                 {

+ 6 - 3
InsuBusiness.cs

@@ -74,10 +74,13 @@ namespace PTMedicalInsurance
                     joInsuAdmObj = JObject.Parse(JsonHelper.getDestValue(joInParam, "insuAdmObj"));
                 joInterface = JObject.Parse(JsonHelper.getDestValue(joInParam, "interfaceinfo"));
 
-                
-                if ((businessType == "M6") || (businessType == "M6C") || (businessType == "M6Confirm"))
+                if (businessType.Substring(0, 2) == "M6")
                 {
-                    Environment.CurrentDirectory = @"D:\HttpServerAPI\bin";
+                    string onlineYBFalg = JsonHelper.getDestValue(joInParam, "insuAdmObj.onlineYBFalg");
+                    if (onlineYBFalg == "Y")
+                    {
+                        Environment.CurrentDirectory = "D:\\HttpServerAPI\\bin";
+                    }
                 }
                 return 0;
             }