public ProcessAdvertShipJob( IIocResolver iocResolver, IShipmentManager shipmentManager) { this._advertAccountSyncor = iocResolver.Resolve <TenantAdvertAccountSyncor>(); this._shipmentManager = shipmentManager; }
public OrderImportor(IOrderManager orderManager, IStoreManager storeManager, IProductManager productManager, IShipmentManager shipmentManager, IProductAttributeFormatter productAttributeFormatter, IProductAttributeManager productAttributeManager, ILogisticsManager logisticsManager, ILogger logger, IPriceCalculator priceCalculator, IStateManager stateManager, IAddressManager addressManager, IStateCache stateCache) { this._orderManager = orderManager; this._storeManager = storeManager; this._productManager = productManager; this._shipmentManager = shipmentManager; this._productAttributeFormatter = productAttributeFormatter; this._productAttributeManager = productAttributeManager; this._logisticsManager = logisticsManager; this._logger = logger; this._stateManager = stateManager; this._addressManager = addressManager; this._stateCache = stateCache; this._priceCalculator = priceCalculator; }
public ShipmentSubscriber(IUnitOfWorkManager unitOfWorkManager, IShipmentManager shipmentManager, IBackgroundJobManager backgroundJobManager) { this._unitOfWorkManager = unitOfWorkManager; this._shipmentManager = shipmentManager; this._backgroundJobManager = backgroundJobManager; }
public OrderProcessingManager(IShipmentManager shipmentManager, IOrderManager orderManager, IEventBus eventBus) { this._shipmentManager = shipmentManager; this._orderManager = orderManager; this._eventBus = eventBus; }
public SingleShipmentTrackSyncJob( IShipmentManager shipmentManager, IUnitOfWorkManager unitOfWorkManager, IShipmentTracker shipmentTracker, ILogger logger) { this._shipmentManager = shipmentManager; this._unitOfWorkManager = unitOfWorkManager; this._shipmentTracker = shipmentTracker; this._logger = logger; }
public ProcessShipJob( IStoreManager storeManager, IShipmentManager shipmentManager, IShipmentTracker shipmentTracker, IOrderProcessingManager orderProcessingManager) { this._storeManager = storeManager; this._shipmentManager = shipmentManager; this._shipmentTracker = shipmentTracker; this._orderProcessingManager = orderProcessingManager; }
public ShippingTrackerAppService(IOrderManager orderManager, ILocalizationManager localizationManager, ICacheManager cacheManager, IShipmentManager shipmentManager, IShipmentTracker shipmentTracker) { this._orderManager = orderManager; this._localizationManager = localizationManager; this._cacheManager = cacheManager; this._shipmentManager = shipmentManager; this._shipmentTracker = shipmentTracker; }
public OrderController(IOrderManager orderManager, ICustomerManager customerManager, IItemManager itemManager, IIsotopeOrderingAuthorizationService authorizationService, IShipmentManager shipmentManager) { _orderManager = orderManager; _customerManager = customerManager; _itemManager = itemManager; _authorizationService = authorizationService; _shipmentManager = shipmentManager; }
public ShipmentTracker(IOrderManager orderManager, IShipmentManager shipmentManager, ILogisticsManager logisticsManager, IDateTimeHelper dateTimeHelper, IAppConfigurationAccessor configurationAccessor) { this._orderManager = orderManager; this._shipmentManager = shipmentManager; this._dateTimeHelper = dateTimeHelper; this._logisticsManager = logisticsManager; this._appConfiguration = configurationAccessor.Configuration; }
public ShipmentAppService(IShipmentManager shipmentManager, IOrderManager orderManager, ILocalizationManager localizationManager, ICacheManager cacheManager, IShipmentTracker shipmentTracker, ILogisticsManager logisticsManager, IOrderProcessingManager orderProcessingManager) { this._shipmentManager = shipmentManager; this._orderManager = orderManager; this._cacheManager = cacheManager; this._localizationManager = localizationManager; this._shipmentTracker = shipmentTracker; this._logisticsManager = logisticsManager; this._orderProcessingManager = orderProcessingManager; }
/// <summary> /// 是否有可发货子订单 /// </summary> /// <param name="order"></param> /// <param name="shipmentManager">Order</param> /// <returns></returns> public static bool HasItemsToAddToShipment(this Order order, IShipmentManager shipmentManager) { if (order == null) { throw new ArgumentNullException("order"); } foreach (var orderItem in order.Items) { var totalNumberOfItemsCanBeAddedToShipment = orderItem.GetTotalNumberOfItemsCanBeAddedToShipment(shipmentManager); if (totalNumberOfItemsCanBeAddedToShipment <= 0) { continue; } //是,可以发货 return(true); } return(false); }
public ShipmentController(IShipmentManager shipmentManager) { _shipmentManager = shipmentManager; }
/// <summary> /// 获取订单发货商品数量 /// </summary> /// <param name="orderItem">Order item</param> /// <param name="shipmentManager"></param> /// <returns>Total number of items in all shipmentss</returns> public static int GetTotalNumberOfItemsInAllShipment(this OrderItem orderItem, IShipmentManager shipmentManager) { if (orderItem == null) { throw new ArgumentNullException("orderItem"); } var totalInShipments = 0; var shipments = orderItem.Order.Shipments.ToList(); for (int i = 0; i < shipments.Count; i++) { var shipment = shipments[i]; shipmentManager.ShipmentRepository.EnsureCollectionLoaded(shipment, s => s.Items); var si = shipment.Items .FirstOrDefault(x => x.OrderItemId == orderItem.Id); if (si != null) { totalInShipments += si.Quantity; } } return(totalInShipments); }
/// <summary> /// 或者子订单最大可发货数量 /// </summary> /// <param name="orderItem">Order item</param> /// <param name="shipmentManager"></param> /// <returns>未发货总数</returns> public static int GetTotalNumberOfItemsCanBeAddedToShipment(this OrderItem orderItem, IShipmentManager shipmentManager) { if (orderItem == null) { throw new ArgumentNullException("orderItem"); } var totalInShipments = orderItem.GetTotalNumberOfItemsInAllShipment(shipmentManager); var qtyOrdered = orderItem.Quantity; var qtyCanBeAddedToShipmentTotal = qtyOrdered - totalInShipments; if (qtyCanBeAddedToShipmentTotal < 0) { qtyCanBeAddedToShipmentTotal = 0; } return(qtyCanBeAddedToShipmentTotal); }