浏览代码

分仓增加额度限制条件,授权预发机生效

lichunlei 2 年之前
父节点
当前提交
3f235300e3
共有 1 个文件被更改,包括 11 次插入7 次删除
  1. 11 7
      AppStart/Timer/StoreApplyHelper.cs

+ 11 - 7
AppStart/Timer/StoreApplyHelper.cs

@@ -267,14 +267,18 @@ public class StoreApplyHelper
                             foreach(string SnIdString in SnIdList)
                             {
                                 int SnId = int.Parse(SnIdString);
-                                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)
+                                PreSendStockDetail prepos = db.PreSendStockDetail.FirstOrDefault(m => m.SnId == SnId) ?? new PreSendStockDetail();
+                                if(prepos.AuthFlag == 0)
                                 {
-                                    Amount += 200;
-                                }
-                                else if(pos.BrandId == 3 || pos.BrandId == 5 || pos.BrandId == 9)
-                                {
-                                    Amount += 300;
+                                    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)
+                                    {
+                                        Amount += 200;
+                                    }
+                                    else if(pos.BrandId == 3 || pos.BrandId == 5 || pos.BrandId == 9)
+                                    {
+                                        Amount += 300;
+                                    }
                                 }
                             }
                             if(Amount > 0)