示例#1
0
        /// <summary>
        /// Котельная,конв.весы
        /// </summary>
        /// <param name="beltID"></param>
        /// <returns></returns>
        public Mine_konv GetBeltScaleModel(int beltID)
        {
            var belt  = _cdbService.FindEquipmentById <BeltScale>(beltID);
            var model = new Mine_konv(belt.LocationID);

            try
            {
                model.BeltID   = beltID;
                model.KonvName = GetEquipNameOnCurrentLanguate(belt);
                model.MineName = GetLocationNameOnCurrentLanguate(belt.LocationID);

                model.BeltTransfers = _cdbService.GetTransfers <BeltTransfer>(beltID, fromDate, toDate);

                model.ProductionPerTimeInterval = model.BeltTransfers.Sum(t => t.LotQuantity).GetValueOrDefault();

                var fromShiftDate = _cdbService.GetStartShiftTime(belt.LocationID);
                var toShiftDate   = _cdbService.GetEndShiftTime(belt.LocationID, fromShiftDate);
                var shiftransfers = _cdbService.GetTransfers <BeltTransfer>(beltID, fromShiftDate, toShiftDate);

                model.ProductionPerShift = shiftransfers.Sum(t => t.LotQuantity).GetValueOrDefault();

                model.HasManualValues = model
                                        .BeltTransfers
                                        .Any(v => v.OperatorName != ProjectConstants.SystemPlarformOperatorName)
                                        ||
                                        shiftransfers
                                        .Any(v => v.OperatorName != ProjectConstants.SystemPlarformOperatorName);
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.Message);
            }
            return(model);
        }
示例#2
0
 public abayModel(string locationID = "abay") : base(locationID)
 {
     Skip1      = new Mine_skip(locationID);
     Skip2      = new Mine_skip(locationID);
     BeltPos1   = new Mine_konv(locationID);
     BeltPos9   = new Mine_konv(locationID);
     BeltBoiler = new Mine_konv(locationID);
     Sklad      = new Mine_sklad(locationID);
     Vagon      = new Mine_vagon(locationID);
     Crusher    = new Mine_crusher(locationID);
     RockUtil   = new Mine_rockUtil(locationID);
     Kotel      = new Mine_Kotel(locationID);
 }
示例#3
0
 public sar1Model(string locationID = "sar1") : base(locationID)
 {
     Skip1        = new Mine_skip(locationID);
     Skip2        = new Mine_skip(locationID);
     BeltToVagon1 = new Mine_konv(locationID);
     BeltToVagon2 = new Mine_konv(locationID);
     BeltToBoiler = new Mine_konv(locationID);
     Sklad        = new Mine_sklad(locationID);
     Vagon        = new Mine_vagon(locationID);
     Crusher      = new Mine_crusher(locationID);
     RockUtil     = new Mine_rockUtil(locationID);
     Kotel        = new Mine_Kotel(locationID);
 }
示例#4
0
 public sar3Model(string locationID = "sar3") : base(locationID)
 {
     Skip            = new Mine_skip(locationID);
     BeltToTech1     = new Mine_konv(locationID);
     BeltToTech2     = new Mine_konv(locationID);
     BeltToBoiler    = new Mine_konv(locationID);
     Sklad           = new Mine_sklad(locationID);
     VagonObogatitel = new Mine_vagon(locationID);
     VagonSaburkhan  = new Mine_vagon(locationID);
     Crusher         = new Mine_crusher(locationID);
     RockUtil        = new Mine_rockUtil(locationID);
     Kotel           = new Mine_Kotel(locationID);
 }