Forráskód Böngészése

自动匹配品牌

DuGuYang 3 éve
szülő
commit
15c7c5267a

+ 4 - 2
Areas/Admin/Controllers/MainServer/StoreMachineApplyController.cs

@@ -468,11 +468,13 @@ namespace MySystem.Areas.Admin.Controllers
             {
                 int num = Convert.ToInt32(ApplyList[i]["ApplyNum"].ToString());
                 int BrandIds = Convert.ToInt32(ApplyList[i]["BrandId"].ToString());
-                if (BrandIds == 1 || BrandIds == 2 || BrandIds == 4 || BrandIds == 6 || BrandIds == 7 || BrandIds == 8)
+                //自动匹配品牌
+                var brandInfo = db.KqProducts.FirstOrDefault(m => m.Id == BrandIds);
+                if (brandInfo.Name.Contains("电签"))
                 {
                     ApplyAmount += num * 200;
                 }
-                if (BrandIds == 3 || BrandIds == 5 || BrandIds == 9)
+                if (brandInfo.Name.Contains("大POS"))
                 {
                     ApplyAmount += num * 300;
                 }