Browse Source

9点后不执行补来源机具

lcl 1 year ago
parent
commit
07c60a174b
1 changed files with 5 additions and 1 deletions
  1. 5 1
      AppStart/Helper/AddSourcePosSnHelper.cs

+ 5 - 1
AppStart/Helper/AddSourcePosSnHelper.cs

@@ -26,7 +26,7 @@ namespace MySystem
         {
             while (true)
             {
-                if(DateTime.Now.Hour >= 0 && DateTime.Now.Hour < 23)
+                if(DateTime.Now.Hour >= 0 && DateTime.Now.Hour < 9)
                 {
                     try
                     {
@@ -80,6 +80,10 @@ namespace MySystem
                             }
                         }
                     }
+                    else
+                    {
+                        op = false;
+                    }
                 }
                 PosMachinesTwo edit = db.PosMachinesTwo.FirstOrDefault(m => m.Id == Pos.Id);
                 if(edit != null)