Пример #1
0
 //2020/06/01 空箱&實箱總和數量是否高於高水位
 private bool CheckIfTooMuchBox(ZoneDef zoneData)
 {
     try
     {
         //被占用shelf的數量(2020/06/01 先定義預約出、預約入、禁用中都不算)
         int emptyBoxNum = shelfDefBLL.LoadEnableShelf().Where(data => data.ZoneID == zoneData.ZoneID && data.ShelfState == "S").Count();
         return(emptyBoxNum > zoneData.HighWaterMark);
     }
     catch (Exception ex)
     {
         logger.Error(ex, "Exception:");
         emptyBoxLogger.Error(ex, DateTime.Now.ToString("HH:mm:ss.fff ") + "[CheckIfTooMuchBox]");
         return(false);
     }
 }
 //2020/06/01 空箱&實箱總和數量是否高於高水位
 private bool CheckIfTooMuchBox(ZoneDef zoneData, out int boxCount)
 {
     boxCount = 0;
     try
     {
         //被占用shelf的數量(2020/06/01 先定義預約出、預約入、禁用中都不算)
         boxCount = shelfDefBLL.LoadEnableShelf().Where(data => data.ZoneID == zoneData.ZoneID && data.ShelfState == "S").Count();
         return(boxCount > zoneData.HighWaterMark);
     }
     catch (Exception ex)
     {
         logger.Error(ex, "Exception:");
         emptyBoxLogger.Error(ex, "[CheckIfTooMuchBox]");
         return(false);
     }
 }