Pārlūkot izejas kodu

费率设置调整,调升0.63+3,调降0.6

lcl 1 gadu atpakaļ
vecāks
revīzija
e7080ec56a

+ 16 - 4
AppStart/Helper/SetDepositPostService.cs

@@ -61,6 +61,18 @@ namespace MySystem
                                 if(merchant != null)
                                 if(merchant != null)
                                 {
                                 {
                                     decimal Fee = Kind == 1 ? 0.63M : 0.6M;
                                     decimal Fee = Kind == 1 ? 0.63M : 0.6M;
+                                    int addRate = 0;
+                                    if(pos.BrandId < 12)
+                                    {
+                                        if(Fee == 0.63M) 
+                                        {
+                                            addRate = 3;
+                                        }
+                                        else if(Fee == 0.6M)
+                                        {
+                                            Fee = 0.63M;
+                                        }
+                                    }
                                     if(pos.BrandId == 1 || pos.BrandId == 3) //金控
                                     if(pos.BrandId == 1 || pos.BrandId == 3) //金控
                                     {
                                     {
                                         string content = function.GetWebRequest("http://connect.kexiaoshuang.com/home/setfee?merNo=" + merchant.KqMerNo + "&sn=" + pos.PosSn + "&fee=" + Fee);
                                         string content = function.GetWebRequest("http://connect.kexiaoshuang.com/home/setfee?merNo=" + merchant.KqMerNo + "&sn=" + pos.PosSn + "&fee=" + Fee);
@@ -94,7 +106,7 @@ namespace MySystem
                                     else if(pos.BrandId == 2) //开店宝
                                     else if(pos.BrandId == 2) //开店宝
                                     {
                                     {
                                         Fee = Fee / 100;
                                         Fee = Fee / 100;
-                                        string content = ModifyFee(pos.PosSn, Fee);
+                                        string content = ModifyFee(pos.PosSn, Fee, addRate.ToString());
                                         JsonData obj = JsonMapper.ToObject(content);
                                         JsonData obj = JsonMapper.ToObject(content);
                                         if(content.Contains("orderNo"))
                                         if(content.Contains("orderNo"))
                                         {
                                         {
@@ -179,7 +191,7 @@ namespace MySystem
                                     }
                                     }
                                     else if(pos.BrandId == 7) //盛付通
                                     else if(pos.BrandId == 7) //盛付通
                                     {
                                     {
-                                        string content = SetFeeForSft(merchant.KqMerNo, Fee.ToString("f4"));
+                                        string content = SetFeeForSft(merchant.KqMerNo, Fee.ToString("f4"), addRate.ToString());
                                         JsonData obj = JsonMapper.ToObject(content);
                                         JsonData obj = JsonMapper.ToObject(content);
                                         if(obj["respCode"].ToString() == "00")
                                         if(obj["respCode"].ToString() == "00")
                                         {
                                         {
@@ -293,7 +305,7 @@ namespace MySystem
                                     else if(pos.BrandId == 10 || pos.BrandId == 11) //联动
                                     else if(pos.BrandId == 10 || pos.BrandId == 11) //联动
                                     {
                                     {
                                         decimal LastFee = Fee / 100;
                                         decimal LastFee = Fee / 100;
-                                        string content = LDFeeRate(pos.PosSn, LastFee.ToString("f4"), pos.BrandId);
+                                        string content = LDFeeRate(pos.PosSn, LastFee.ToString("f4"), pos.BrandId, addRate);
                                         JsonData obj = JsonMapper.ToObject(content);
                                         JsonData obj = JsonMapper.ToObject(content);
                                         if(obj["code"].ToString() == "000000")
                                         if(obj["code"].ToString() == "000000")
                                         {
                                         {
@@ -309,7 +321,7 @@ namespace MySystem
                                             db.SaveChanges();
                                             db.SaveChanges();
                                         }
                                         }
                                     }
                                     }
-                                    else if(pos.BrandId == 12) //盒易付
+                                    else if(pos.BrandId == 12 || pos.BrandId == 13) //盒易付
                                     {
                                     {
                                         string content = BoxFee(merchant.KqMerNo, Fee.ToString("f2"));
                                         string content = BoxFee(merchant.KqMerNo, Fee.ToString("f2"));
                                         JsonData obj = JsonMapper.ToObject(content);
                                         JsonData obj = JsonMapper.ToObject(content);

+ 4 - 4
AppStart/Helper/SetFeeFlagService.cs

@@ -38,21 +38,21 @@ namespace MySystem
                             function.WritePage("/Fee/", "check" + DateTime.Now.ToString("yyyy-MM-dd") + ".txt", DateTime.Now.ToString("HH:mm:ss"));
                             function.WritePage("/Fee/", "check" + DateTime.Now.ToString("yyyy-MM-dd") + ".txt", DateTime.Now.ToString("HH:mm:ss"));
                             WebCMSEntities db = new WebCMSEntities();
                             WebCMSEntities db = new WebCMSEntities();
                             List<int> BrandIds = db.KqProducts.Where(m => m.Status > 0).ToList().Select(m => m.Id).ToList();
                             List<int> BrandIds = db.KqProducts.Where(m => m.Status > 0).ToList().Select(m => m.Id).ToList();
-                            var date = DateTime.Now.AddDays(-118);
+                            var date = DateTime.Now.AddDays(-88);
                             bool op = true;
                             bool op = true;
                             int StartId = 0;
                             int StartId = 0;
                             while(op)
                             while(op)
                             {
                             {
                                 var posList = db.PosMachinesTwo.Select(m => new { m.Id, m.Status, m.BindingState, m.BindingTime, m.UpFeeFlag, m.BrandId }).Where(m => m.Id > StartId && m.Status > -1 && m.BindingTime <= date && m.BindingState == 1 && m.UpFeeFlag == 0 && BrandIds.Contains(m.BrandId)).OrderBy(m => m.Id).Take(100).ToList();
                                 var posList = db.PosMachinesTwo.Select(m => new { m.Id, m.Status, m.BindingState, m.BindingTime, m.UpFeeFlag, m.BrandId }).Where(m => m.Id > StartId && m.Status > -1 && m.BindingTime <= date && m.BindingState == 1 && m.UpFeeFlag == 0 && BrandIds.Contains(m.BrandId)).OrderBy(m => m.Id).Take(100).ToList();
-                                function.WriteLog(DateTime.Now.ToString(), "118天提前通知创客费率调升");
-                                function.WriteLog(posList.Count.ToString(), "118天提前通知创客费率调升");
+                                function.WriteLog(DateTime.Now.ToString(), "88天提前通知创客费率调升");
+                                function.WriteLog(posList.Count.ToString(), "88天提前通知创客费率调升");
                                 if(posList.Count > 0)
                                 if(posList.Count > 0)
                                 {
                                 {
                                     //循环修改机具费率调升标记
                                     //循环修改机具费率调升标记
                                     //统计需要推送消息的用户Id
                                     //统计需要推送消息的用户Id
                                     foreach (var item in posList)
                                     foreach (var item in posList)
                                     {
                                     {
-                                        function.WriteLog(item.Id.ToString(), "118天提前通知创客费率调升");
+                                        function.WriteLog(item.Id.ToString(), "88天提前通知创客费率调升");
                                         string info = "{\"RecordId\":\"\",\"PosId\":\"" + item.Id + "\",\"Fee\": \"" + 0.63 + "\",\"Kind\": \"0\",\"OpMan\": \""+"系统"+"\"}";
                                         string info = "{\"RecordId\":\"\",\"PosId\":\"" + item.Id + "\",\"Fee\": \"" + 0.63 + "\",\"Kind\": \"0\",\"OpMan\": \""+"系统"+"\"}";
                                         RedisDbconn.Instance.AddList("SetDepositQueue", info);
                                         RedisDbconn.Instance.AddList("SetDepositQueue", info);
                                         StartId = item.Id;
                                         StartId = item.Id;