Преглед изворни кода

联动品牌判断检查
增加联动设置费率逻辑

lcl пре 2 година
родитељ
комит
547510151f

+ 19 - 0
AppStart/Helper/SetDepositPostService.cs

@@ -301,6 +301,25 @@ namespace MySystem
                                             db.SaveChanges();
                                             db.SaveChanges();
                                         }
                                         }
                                     }
                                     }
+                                    else if(pos.BrandId == 10 || pos.BrandId == 11) //联动
+                                    {
+                                        decimal LastFee = Fee / 100;
+                                        string content = LDFeeRate(pos.PosSn, LastFee.ToString("f4"), pos.BrandId);
+                                        JsonData obj = JsonMapper.ToObject(content);
+                                        if(obj["code"].ToString() == "000000")
+                                        {
+                                            pos.SeoDescription = "设置成功";
+                                            SetRecordResult(db, RecordId, 1, "设置成功");
+                                            db.SaveChanges();
+                                        }
+                                        else
+                                        {
+                                            string msg = obj["msg"].ToString();
+                                            pos.SeoDescription = msg;
+                                            SetRecordResult(db, RecordId, -1, msg);
+                                            db.SaveChanges();
+                                        }
+                                    }
                                 }
                                 }
                             }
                             }
                         }
                         }

+ 2 - 2
AppStart/Timer/ResetSmallStoreHelper.cs

@@ -118,7 +118,7 @@ public class ResetSmallStoreHelper
             var prelist = db.PreSendStockDetail.Select(m => new { m.Id, m.BrandId, m.ToUserId, m.Status, m.ApplyFlag, m.AuthFlag }).Where(m => m.ToUserId == UserId && m.Status == 1 && m.ApplyFlag == 0 && m.AuthFlag == 1).ToList();
             var prelist = db.PreSendStockDetail.Select(m => new { m.Id, m.BrandId, m.ToUserId, m.Status, m.ApplyFlag, m.AuthFlag }).Where(m => m.ToUserId == UserId && m.Status == 1 && m.ApplyFlag == 0 && m.AuthFlag == 1).ToList();
             foreach (var prepos in prelist)
             foreach (var prepos in prelist)
             {
             {
-                if (prepos.BrandId == 1 || prepos.BrandId == 2 || prepos.BrandId == 4 || prepos.BrandId == 6 || prepos.BrandId == 7 || prepos.BrandId == 8)
+                if (prepos.BrandId == 1 || prepos.BrandId == 2 || prepos.BrandId == 4 || prepos.BrandId == 6 || prepos.BrandId == 7 || prepos.BrandId == 8 || prepos.BrandId == 10)
                 {
                 {
                     if (ProfitAmount > 200)
                     if (ProfitAmount > 200)
                     {
                     {
@@ -130,7 +130,7 @@ public class ResetSmallStoreHelper
                         }
                         }
                     }
                     }
                 }
                 }
-                else if (prepos.BrandId == 3 || prepos.BrandId == 5 || prepos.BrandId == 9)
+                else if (prepos.BrandId == 3 || prepos.BrandId == 5 || prepos.BrandId == 9 || prepos.BrandId == 11)
                 {
                 {
                     if (ProfitAmount > 300)
                     if (ProfitAmount > 300)
                     {
                     {

+ 4 - 4
AppStart/Timer/StoreApplyHelper.cs

@@ -304,11 +304,11 @@ public class StoreApplyHelper
                                 if(prepos.AuthFlag == 0)
                                 if(prepos.AuthFlag == 0)
                                 {
                                 {
                                     PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == SnId) ?? new PosMachinesTwo();
                                     PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == SnId) ?? new PosMachinesTwo();
-                                    if(pos.BrandId == 1 || pos.BrandId == 2 || pos.BrandId == 4 || pos.BrandId == 6 || pos.BrandId == 7 || pos.BrandId == 8)
+                                    if(pos.BrandId == 1 || pos.BrandId == 2 || pos.BrandId == 4 || pos.BrandId == 6 || pos.BrandId == 7 || pos.BrandId == 8 || pos.BrandId == 10)
                                     {
                                     {
                                         Amount += 200;
                                         Amount += 200;
                                     }
                                     }
-                                    else if(pos.BrandId == 3 || pos.BrandId == 5 || pos.BrandId == 9)
+                                    else if(pos.BrandId == 3 || pos.BrandId == 5 || pos.BrandId == 9 || pos.BrandId == 11)
                                     {
                                     {
                                         Amount += 300;
                                         Amount += 300;
                                     }
                                     }
@@ -331,11 +331,11 @@ public class StoreApplyHelper
                         if(store != null)
                         if(store != null)
                         {
                         {
                             decimal Amount = 0;
                             decimal Amount = 0;
-                            if(BrandId == 1 || BrandId == 2 || BrandId == 4 || BrandId == 6 || BrandId == 7 || BrandId == 8)
+                            if(BrandId == 1 || BrandId == 2 || BrandId == 4 || BrandId == 6 || BrandId == 7 || BrandId == 8 || BrandId == 10)
                             {
                             {
                                 Amount += 200 * OpStoreNum;
                                 Amount += 200 * OpStoreNum;
                             }
                             }
-                            else if(BrandId == 3 || BrandId == 5 || BrandId == 9)
+                            else if(BrandId == 3 || BrandId == 5 || BrandId == 9 || BrandId == 11)
                             {
                             {
                                 Amount += 300 * OpStoreNum;
                                 Amount += 300 * OpStoreNum;
                             }
                             }