lcl преди 8 месеца
родител
ревизия
07398292cc
променени са 4 файла, в които са добавени 74 реда и са изтрити 39 реда
  1. 4 0
      AppStart/Helper/PublicImportDataService.cs
  2. 47 18
      AppStart/Helper/SetDepositPostService.cs
  3. 16 14
      Controllers/HomeController.cs
  4. 7 7
      Startup.cs

+ 4 - 0
AppStart/Helper/PublicImportDataService.cs

@@ -565,10 +565,14 @@ namespace MySystem
             dic.Add("merchNo", merchNo);
             dic.Add("signMethod", "02");
             string content = LiSAgentId + sn + merchNo + "02";
+            // string content = "{\"agentId\":\"" + LiSAgentId + "\",\"deviceSn\":\"" + sn + "\",\"merchNo\":\"" + merchNo + "\",\"signMethod\":\"02\"}";
             string signstr = LiSSign(content);
             dic.Add("signData", signstr);
             string req = Newtonsoft.Json.JsonConvert.SerializeObject(dic);
+            function.WriteLog("请求地址:" + LiSReqUrl + "FEE001", "查询商户费率");
+            function.WriteLog("请求参数:" + req, "查询商户费率");
             string result = PostWebRequest(LiSReqUrl + "FEE001", req, new Dictionary<string, string>());
+            function.WriteLog("返回报文:" + result + "\n\n\n", "查询商户费率");
             return result;
         }
 

+ 47 - 18
AppStart/Helper/SetDepositPostService.cs

@@ -204,24 +204,6 @@ namespace MySystem
                                             db.SaveChanges();
                                         }
                                     }
-                                    else if(pos.BrandId == 7) //盛付通
-                                    {
-                                        string content = SetFeeForSft(merchant.KqMerNo, Fee.ToString("f4"), addRate.ToString());
-                                        JsonData obj = JsonMapper.ToObject(content);
-                                        if(obj["respCode"].ToString() == "00")
-                                        {
-                                            pos.SeoDescription = "设置成功";
-                                            SetRecordResult(db, RecordId, 1, "设置成功");
-                                            db.SaveChanges();
-                                        }
-                                        else
-                                        {
-                                            string msg = obj["errorMsg"].ToString();
-                                            pos.SeoDescription = msg;
-                                            SetRecordResult(db, RecordId, -1, msg);
-                                            db.SaveChanges();
-                                        }
-                                    }
                                     // else if(pos.BrandId == 6) //立刷
                                     // {
                                     //     string content = SetLiSFee(pos.PosSn, Fee);
@@ -251,6 +233,53 @@ namespace MySystem
                                     //         db.SaveChanges();
                                     //     }
                                     // }
+                                    else if(pos.BrandId == 22) //立刷微电签
+                                    {
+                                        string content = PublicImportDataService.Instance.SetLiSWeFee(pos.PosSn, Fee);
+                                        JsonData obj = JsonMapper.ToObject(content);
+                                        if (obj["ret_code"].ToString() == "00")
+                                        {
+                                            if(Kind == 1)
+                                            {
+                                                pos.UpFeeFlag = 1;
+                                                pos.UpFeeMan = OpMan;
+                                                pos.UpFeeDate = DateTime.Now;
+                                            }
+                                            else if(Kind == 2)
+                                            {
+                                                pos.DownFeeFlag = 1;
+                                                pos.DownFeeMan = OpMan;
+                                                pos.DownFeeDate = DateTime.Now;
+                                                SetRecordResult(db, RecordId, 1);
+                                            }
+                                            db.SaveChanges();
+                                        }
+                                        else
+                                        {
+                                            string msg = obj["ret_msg"].ToString();
+                                            pos.SeoDescription = msg;
+                                            SetRecordResult(db, RecordId, -1, msg);
+                                            db.SaveChanges();
+                                        }
+                                    }
+                                    else if(pos.BrandId == 7) //盛付通
+                                    {
+                                        string content = SetFeeForSft(merchant.KqMerNo, Fee.ToString("f4"), addRate.ToString());
+                                        JsonData obj = JsonMapper.ToObject(content);
+                                        if(obj["respCode"].ToString() == "00")
+                                        {
+                                            pos.SeoDescription = "设置成功";
+                                            SetRecordResult(db, RecordId, 1, "设置成功");
+                                            db.SaveChanges();
+                                        }
+                                        else
+                                        {
+                                            string msg = obj["errorMsg"].ToString();
+                                            pos.SeoDescription = msg;
+                                            SetRecordResult(db, RecordId, -1, msg);
+                                            db.SaveChanges();
+                                        }
+                                    }
                                     else if(pos.BrandId == 8 || pos.BrandId == 9) //海科
                                     {
                                         // 【融通金宝大POS】

+ 16 - 14
Controllers/HomeController.cs

@@ -51,20 +51,22 @@ namespace MySystem.Controllers
 
         public string test()
         {
-            WebCMSEntities db = new WebCMSEntities();
-            string content = function.ReadInstance("/txt/lkbsn.txt");
-            string[] list = content.Replace("\r", "").Split('\n');
-            foreach (string sub in list)
-            {
-                PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == sub);
-                if (pos != null)
-                {
-                    string info = "{\"RecordId\":\"\",\"PosId\":\"" + pos.Id + "\",\"Fee\": \"0.63\",\"Kind\": \"1\",\"OpMan\": \"" + "系统" + "\"}";
-                    RedisDbconn.Instance.AddList("SetDepositPostQueue", info);
-                }
-            }
-            db.Dispose();
-            return "ok";
+            // WebCMSEntities db = new WebCMSEntities();
+            // string content = function.ReadInstance("/txt/lkbsn.txt");
+            // string[] list = content.Replace("\r", "").Split('\n');
+            // foreach (string sub in list)
+            // {
+            //     PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == sub);
+            //     if (pos != null)
+            //     {
+            //         string info = "{\"RecordId\":\"\",\"PosId\":\"" + pos.Id + "\",\"Fee\": \"0.63\",\"Kind\": \"1\",\"OpMan\": \"" + "系统" + "\"}";
+            //         RedisDbconn.Instance.AddList("SetDepositPostQueue", info);
+            //     }
+            // }
+            // db.Dispose();
+            // return "ok";
+            // return PublicImportDataService.Instance.QueryLiSDeposit("N00000D0022G499", "N6220Y02008203");
+            return PublicImportDataService.Instance.SetLiSFee("N6220Y02172808", 0.63M);
         }
         
     

+ 7 - 7
Startup.cs

@@ -139,7 +139,7 @@ namespace MySystem
                     pattern: "{controller=Home}/{action=Index}/{Id?}");
             });
 
-            InitMain();
+            // InitMain();
 
             //必须打开的
             if(Library.ConfigurationManager.EnvironmentFlag == 1)
@@ -147,12 +147,12 @@ namespace MySystem
             }
             if(Library.ConfigurationManager.EnvironmentFlag == 2)
             {
-                SetFeeFlagService.Instance.Start(); //85天提前通知创客费率调升消息
-                SetDepositService.Instance.Start(); //调整费率(通知、标记)
-                SetDepositPostService.Instance.Start(); //提交支付公司设置费率接口
-                SetDepositPostService.Instance.StartKdb(); //监控开店宝费率设置结果
-                ChangePosFeeQueue.Instance.StartEverTime(); //设置服务费
-                SetSftFeeService.Instance.Start(); //盛付通420天费率加万2
+                // SetFeeFlagService.Instance.Start(); //85天提前通知创客费率调升消息
+                // SetDepositService.Instance.Start(); //调整费率(通知、标记)
+                // SetDepositPostService.Instance.Start(); //提交支付公司设置费率接口
+                // SetDepositPostService.Instance.StartKdb(); //监控开店宝费率设置结果
+                // ChangePosFeeQueue.Instance.StartEverTime(); //设置服务费
+                // SetSftFeeService.Instance.Start(); //盛付通420天费率加万2
             }
         }