public Mine_rockUtil GetRockUtilModel(int rockUtilID) { var rockUtil = _cdbService.FindEquipmentById <RockUtil>(rockUtilID); if (rockUtil == null) { return(new Mine_rockUtil("Unknown")); } var model = new Mine_rockUtil(rockUtil.LocationID); model.MineName = GetLocationNameOnCurrentLanguate(rockUtil.LocationID); model.RockUtilName = GetEquipNameOnCurrentLanguate(rockUtil); var rockTransfers = _cdbService.GetTransfers <RockUtilTransfer>(rockUtilID, fromDate, toDate); model.RocksPerPeriod = rockTransfers.Sum(v => v.LotQuantity) ?? 0; var fromShiftDate = _cdbService.GetStartShiftTime(rockUtil.LocationID); var toShiftDate = _cdbService.GetEndShiftTime(rockUtil.LocationID, fromShiftDate); var shiftTransfers = _cdbService.GetTransfers <RockUtilTransfer>(rockUtilID, fromShiftDate, toShiftDate); model.RocksPerShift = shiftTransfers.Sum(s => s.LotQuantity).GetValueOrDefault(); model.HasManualValues = rockTransfers .Any(v => v.OperatorName != ProjectConstants.SystemPlarformOperatorName) || shiftTransfers .Any(v => v.OperatorName != ProjectConstants.SystemPlarformOperatorName); return(model); }
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); }
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); }
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); }