lcl 2 долоо хоног өмнө
parent
commit
b1be2a4284
2 өөрчлөгдсөн 78 нэмэгдсэн , 78 устгасан
  1. BIN
      .DS_Store
  2. 78 78
      AppStart/Helper/TmpService.cs

BIN
.DS_Store


+ 78 - 78
AppStart/Helper/TmpService.cs

@@ -212,94 +212,94 @@ namespace MySystem
                 // }
 
                 //立刷微电签
-                // poslist = function.ReadInstance("tmpdata/lswdq.txt").Split('\n').ToList();
-                // var poses = db.KxsMachine.Where(m => poslist.Contains(m.PosSn) && m.BrandId == 22 && m.MerchantId > 0).ToList();
-                // merids = poses.Select(m => m.MerchantId).ToList();
-                // var mers = db.KxsMerchant.Where(m => merids.Contains(m.Id)).ToList();
-                // foreach(var pos in poses)
-                // {
-                //     var mer = mers.FirstOrDefault(m => m.Id == pos.MerchantId);
-                //     if(mer != null)
-                //     {
-                //         // string result = PublicImportDataService.Instance.SetLiSWeFee(pos.PosSn, mer.MerchantNo, "0.63", "300");
-                //         string result = PublicImportDataService.Instance.SetLiSWeFee(pos.PosSn, mer.MerchantNo, "0.63", "0");
-                //         function.WriteLog(pos.PosSn + "\n" + mer.MerchantNo + "\n" + result + "\n\n", "tmp立刷微电签临时费率");
-                //         Thread.Sleep(500);
-                //     }
-                // }
-
-                //立刷微智能
-                // 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();
-                foreach(string merno in mernos)
+                poslist = function.ReadInstance("tmpdata/lswdq.txt").Split('\n').ToList();
+                var poses = db.KxsMachine.Where(m => poslist.Contains(m.PosSn) && m.BrandId == 22 && m.MerchantId > 0).ToList();
+                merids = poses.Select(m => m.MerchantId).ToList();
+                var mers = db.KxsMerchant.Where(m => merids.Contains(m.Id)).ToList();
+                foreach(var pos in poses)
                 {
-                    // string content = SetDepositPostService.Instance.LDZZBFeeRate(merno, 0.68M, 3);
-                    string content = SetDepositPostService.Instance.LDZZBFeeRate(merno, 0.68M, 0);
-                    if(content.Contains("encryptKey"))
+                    var mer = mers.FirstOrDefault(m => m.Id == pos.MerchantId);
+                    if(mer != null)
                     {
-                        JsonData jsonObj = JsonMapper.ToObject(content);
-                        string aesKey = jsonObj["encryptKey"].ToString();
-                        aesKey = SetDepositPostService.Instance.LDZZBDecrypt(aesKey);
-                        content += SetDepositPostService.Instance.AesDecrypt(jsonObj["data"].ToString(), aesKey);
+                        // string result = PublicImportDataService.Instance.SetLiSWeFee(pos.PosSn, mer.MerchantNo, "0.63", "300");
+                        string result = PublicImportDataService.Instance.SetLiSWeFee(pos.PosSn, mer.MerchantNo, "0.63", "0");
+                        function.WriteLog(pos.PosSn + "\n" + mer.MerchantNo + "\n" + result + "\n\n", "tmp立刷微电签临时费率");
+                        Thread.Sleep(500);
                     }
-                    function.WriteLog(merno + "\n" + content + "\n\n", "tmp联动力POS临时费率");
-                    Thread.Sleep(1000);
                 }
 
-                //盒易付
-                mernos = function.ReadInstance("tmpdata/hyf.txt").Replace("\r", "").Split('\n').ToList();
-                foreach(string merno in mernos)
+                //立刷微智能
+                poslist = function.ReadInstance("tmpdata/liwzn.txt").Replace("\r", "").Split('\n').ToList();
+                foreach(string pos in poslist)
                 {
-                    string content = SetDepositPostService.Instance.BoxFee(merno, "0.65");
-                    function.WriteLog(merno + "\n" + content + "\n\n", "tmp盒易付临时费率");
-                    Thread.Sleep(1000);
+                    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();
+                // foreach(string merno in mernos)
+                // {
+                //     // string content = SetDepositPostService.Instance.LDZZBFeeRate(merno, 0.68M, 3);
+                //     string content = SetDepositPostService.Instance.LDZZBFeeRate(merno, 0.68M, 0);
+                //     if(content.Contains("encryptKey"))
+                //     {
+                //         JsonData jsonObj = JsonMapper.ToObject(content);
+                //         string aesKey = jsonObj["encryptKey"].ToString();
+                //         aesKey = SetDepositPostService.Instance.LDZZBDecrypt(aesKey);
+                //         content += SetDepositPostService.Instance.AesDecrypt(jsonObj["data"].ToString(), aesKey);
+                //     }
+                //     function.WriteLog(merno + "\n" + content + "\n\n", "tmp联动力POS临时费率");
+                //     Thread.Sleep(1000);
+                // }
+
+                //盒易付
+                // mernos = function.ReadInstance("tmpdata/hyf.txt").Replace("\r", "").Split('\n').ToList();
+                // foreach(string merno in mernos)
+                // {
+                //     string content = SetDepositPostService.Instance.BoxFee(merno, "0.65");
+                //     function.WriteLog(merno + "\n" + content + "\n\n", "tmp盒易付临时费率");
+                //     Thread.Sleep(1000);
+                // }
+
                 //批量查询立刷费率
-                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
-                    {
+                // 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立刷费率批量查询");
-                    }
-                }
+                //         function.WriteLog("" + data[0] + "|" + data[1] + "|" + content, "tmp立刷费率批量查询");
+                //     }
+                // }
             }
             catch(Exception ex)
             {