Ver código fonte

立刷费率批量查询

lcl 3 semanas atrás
pai
commit
9b566079a2
3 arquivos alterados com 43 adições e 35 exclusões
  1. BIN
      .DS_Store
  2. BIN
      AppStart/.DS_Store
  3. 43 35
      AppStart/Helper/TmpService.cs

BIN
.DS_Store


BIN
AppStart/.DS_Store


+ 43 - 35
AppStart/Helper/TmpService.cs

@@ -229,14 +229,14 @@ namespace MySystem
                 // }
 
                 //立刷微智能
-                // poslist = function.ReadInstance("tmpdata/liwzn.txt").Replace("\r", "").Split('\n').ToList();
-                // foreach(string pos in poslist)
-                // {
-                //     string[] parts = pos.Split('|');
-                //     string result = PublicImportDataService.Instance.SetLiSWeFee(parts[0], parts[1], "0.63", "0");
-                //     function.WriteLog(parts[0] + "\n" + parts[1] + "\n" + result + "\n\n", "tmp立刷微智能临时费率");
-                //     Thread.Sleep(1500);
-                // }
+                poslist = function.ReadInstance("tmpdata/liwzn.txt").Replace("\r", "").Split('\n').ToList();
+                foreach(string pos in poslist)
+                {
+                    string[] parts = pos.Split('|');
+                    string result = PublicImportDataService.Instance.SetLiSWeFee(parts[0], parts[1], "0.63", "0");
+                    function.WriteLog(parts[0] + "\n" + parts[1] + "\n" + result + "\n\n", "tmp立刷微智能临时费率");
+                    Thread.Sleep(1500);
+                }
 
                 //联动力POS
                 // mernos = function.ReadInstance("tmpdata/zzb.txt").Replace("\r", "").Split('\n').ToList();
@@ -262,33 +262,41 @@ namespace MySystem
                 // }
 
                 //批量查询立刷费率
-                poslist = function.ReadInstance("tmpdata/lishua.txt").Split('\n').ToList();
-            foreach(var pos in poslist)
-            {
-                string rateNum = "0";
-                string feeNum = "0";
-                string[] data = pos.Split('|');
-                string content = PublicImportDataService.Instance.QueryLiSDeposit(data[1], "");
-                JsonData jsonObj = JsonMapper.ToObject(content);
-                JsonData feeList = jsonObj["feeList"];
-                foreach (JsonData fee in feeList)
-                {
-                    string feeCalcType = fee["feeCalcType"].ToString();
-                    if(feeCalcType == "M5" || feeCalcType == "T0")
-                    {
-                        string rate = fee["rate"].ToString();
-                        if(feeCalcType == "M5")
-                        {
-                            rateNum = rate;
-                        }
-                        else if(feeCalcType == "T0")
-                        {
-                            feeNum = rate;
-                        }
-                    }
-                }
-                function.WriteLog("" + data[0] + "|" + data[1] + "|" + rateNum + "|" + feeNum, "tmp立刷费率批量查询");
-            }
+                // poslist = function.ReadInstance("tmpdata/lishua.txt").Split('\n').ToList();
+                // foreach(var pos in poslist)
+                // {
+                //     string rateNum = "0";
+                //     string feeNum = "0";
+                //     string[] data = pos.Split('|');
+                //     string content = PublicImportDataService.Instance.QueryLiSDeposit(data[1], "");
+                //     JsonData jsonObj = JsonMapper.ToObject(content);
+                //     if(jsonObj["ret_code"].ToString() == "00")
+                //     {
+                //         JsonData feeList = jsonObj["feeList"];
+                //         foreach (JsonData fee in feeList)
+                //         {
+                //             string feeCalcType = fee["feeCalcType"].ToString();
+                //             if(feeCalcType == "M5" || feeCalcType == "T0")
+                //             {
+                //                 string rate = fee["rate"].ToString();
+                //                 if(feeCalcType == "M5")
+                //                 {
+                //                     rateNum = rate;
+                //                 }
+                //                 else if(feeCalcType == "T0")
+                //                 {
+                //                     feeNum = rate;
+                //                 }
+                //             }
+                //         }
+                //         function.WriteLog("" + data[0] + "|" + data[1] + "|" + rateNum + "|" + feeNum, "tmp立刷费率批量查询");
+                //     }
+                //     else
+                //     {
+
+                //         function.WriteLog("" + data[0] + "|" + data[1] + "|" + content, "tmp立刷费率批量查询");
+                //     }
+                // }
             }
             catch(Exception ex)
             {