Browse Source

perf: 异地兼容红谷滩和南昌

zhengjie 1 year ago
parent
commit
c35e197f3e
3 changed files with 20 additions and 12 deletions
  1. 5 0
      Business/HisMainBusiness.cs
  2. 13 12
      Common/Utils.cs
  3. 2 0
      Variables/Struct.cs

+ 5 - 0
Business/HisMainBusiness.cs

@@ -120,11 +120,16 @@ namespace PTMedicalInsurance.Business
             inf.cardURL = "http://10.77.211.236/1.0.0/agent-card-init";   
             inf.ecURL = JsonHelper.getDestValue(joInpar, "CenterURL2");
 
+            IniFile ini = new IniFile(Global.curEvt.path + @"\INSUConfigure.ini");
+            inf.fixedPointType = ini.ReadValue("FixedPointInfo", "TYPE"); //1.省本级 2.市本级 3.区本级
+
             //获取AK,SK
             IniFile urlIni = new IniFile(Global.curEvt.path + @"\EncrypInfo.ini");
             inf.AK = urlIni.ReadValue("KEY", "AK");
             inf.SK = urlIni.ReadValue("KEY", "SK");
 
+
+
             inf.cainfo = "";
         }
 

+ 13 - 12
Common/Utils.cs

@@ -210,22 +210,23 @@ namespace PTMedicalInsurance.Common
             }
             Global.writeLog("参保地判断:"+ Global.pat.insuplc_admdvs);
 
-            if (Global.pat.insuplc_admdvs.Substring(0, 4) == "3699") //省医保
+            if (!string.IsNullOrEmpty(Global.pat.insuplc_admdvs))
             {
-                Global.pat.insuplc_admdvs = "369900";
-                Global.inf.areaCode = "369900";
-
-            }
-            else
-            {
-                //异地判断
-                if (Global.pat.insuplc_admdvs.Substring(0, 2) != "36")
+                if (Global.inf.fixedPointType == "1") //省本级
                 {
-                    //全国异地不变
+                    //适用于南昌
+                    if (Global.pat.insuplc_admdvs.Substring(0, 4) != Global.inf.areaCode.Substring(0, 4))
+                    {
+                        Global.inf.areaCode = "369900";
+                    }
                 }
-                else if (Global.pat.insuplc_admdvs.Substring(0, 4) != Global.inf.areaCode.Substring(0, 4))
+                else
                 {
-                    Global.inf.areaCode = "369900";
+                    //适用于红谷滩
+                    if (Global.pat.insuplc_admdvs.Substring(0, 4) == "3699") //有且只有在患者为省直的情况下传369900
+                    {
+                        Global.inf.areaCode = "369900";
+                    }
                 }
             }
 

+ 2 - 0
Variables/Struct.cs

@@ -64,6 +64,8 @@ namespace PTMedicalInsurance.Variables
         public string CreditID;
         public string operatoType;
         public string fileName;
+        //定点类型
+        public string fixedPointType;
 
     }