Explorar o código

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

lichunlei %!s(int64=2) %!d(string=hai) anos
pai
achega
3f235300e3
Modificáronse 1 ficheiros con 11 adicións e 7 borrados
  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)