コード例 #1
0
 public Shipping(ILocationFunctionsService locationfunctionsService
                 , IInventoryUnitsService inventoryunitsService
                 , IInventoryLocationsSlottingService inventorylocationsslottingService
                 , VolumeAndWeight volumeAndWeight
                 , IInventoryLocationsService inventorylocationsService
                 , CommonLookUps commonLookUps
                 , IOutboundCarrierManifestsService outboundcarriermanifestsService
                 , IOutboundOrdersRepository outboundordersRepository
                 //, IOutboundCarrierManifestPickupsService outboundcarriermanifestpickupsService
                 , IOutboundShipmentsService outboundshipmentsService
                 , IOutboundOrderLinesService outboundorderlinesService
                 , IOutboundOrderLinePackingService outboundorderlinepackingService
                 , IOutboundOrderLinesInventoryAllocationService outboundorderlinesinventoryallocationService
                 , IHandlingUnitsService handlingunitsService
                 )
 {
     _locationfunctionsService          = locationfunctionsService;
     _inventoryunitsService             = inventoryunitsService;
     _inventorylocationsslottingService = inventorylocationsslottingService;
     _volumeAndWeight                 = volumeAndWeight;
     _inventorylocationsService       = inventorylocationsService;
     _commonLookUps                   = commonLookUps;
     _outboundcarriermanifestsService = outboundcarriermanifestsService;
     _outboundordersRepository        = outboundordersRepository;
     //_outboundcarriermanifestpickupsService = outboundcarriermanifestpickupsService;
     _outboundshipmentsService        = outboundshipmentsService;
     _outboundorderlinesService       = outboundorderlinesService;
     _outboundorderlinepackingService = outboundorderlinepackingService;
     _outboundorderlinesinventoryallocationService = outboundorderlinesinventoryallocationService;
     _handlingunitsService = handlingunitsService;
 }
コード例 #2
0
 public Picking(
     IOutboundOrderLinesInventoryAllocationService outboundorderlinesinventoryallocationService
     , IOutboundOrdersService outboundordersService
     , IPickBatchesService pickbatchesService
     , IMoveQueuesService movequeuesService
     , IOutboundOrderLinesService outboundorderlinesService
     , CommonLookUps commonLookUps
     , IInventoryUnitsService inventoryunitsService
     , IInventoryLocationsService inventorylocationsService
     )
 {
     _outboundorderlinesinventoryallocationService = outboundorderlinesinventoryallocationService;
     _outboundordersService     = outboundordersService;
     _pickbatchesService        = pickbatchesService;
     _movequeuesService         = movequeuesService;
     _outboundorderlinesService = outboundorderlinesService;
     _commonLookUps             = commonLookUps;
     _inventoryunitsService     = inventoryunitsService;
     _inventorylocationsService = inventorylocationsService;
 }
コード例 #3
0
 public Inventory(IInventoryUnitsRepository inventoryunitsRepository
                  , IOutboundOrderLinesInventoryAllocationRepository outboundorderlinesinventoryallocationRepository
                  , IOutboundOrderLinesRepository outboundorderlinesRepository
                  , IStatusesRepository statusesRepository
                  , IInventoryStatesRepository inventorystatesRepository
                  , IPickBatchesRepository pickbatchesRepository
                  , IOutboundOrdersRepository outboundordersRepository
                  , IOutboundOrderLinesService outboundorderlinesService
                  , IOutboundOrderLinesInventoryAllocationService outboundorderlinesinventoryallocationService
                  )
 {
     _inventoryunitsRepository = inventoryunitsRepository;
     _outboundorderlinesinventoryallocationRepository = outboundorderlinesinventoryallocationRepository;
     _outboundorderlinesRepository = outboundorderlinesRepository;
     _statusesRepository           = statusesRepository;
     _inventorystatesRepository    = inventorystatesRepository;
     _pickbatchesRepository        = pickbatchesRepository;
     _outboundordersRepository     = outboundordersRepository;
     _outboundorderlinesService    = outboundorderlinesService;
     _outboundorderlinesinventoryallocationService = outboundorderlinesinventoryallocationService;
 }
コード例 #4
0
        //Custom Code Start | Replaced Code Block
        //Replaced Code Block Start
        //public CreatePickBatchPickingDialog(string id, IPickBatchPickingService pickbatchpickingService, PickBatchPickingPost pickbatchpickingPost, BotSpielUserStateAccessors statePropertyAccessor)
        //Replaced Code Block End
        public CreatePickBatchPickingDialog(string id, IPickBatchPickingService pickbatchpickingService, PickBatchPickingPost pickbatchpickingPost, BotSpielUserStateAccessors statePropertyAccessor
                                            , IPickBatchesService pickbatchesService
                                            , CommonLookUps commonLookUps
                                            , Picking picking
                                            , IInventoryUnitsService inventoryunitsService
                                            , IMoveQueuesService movequeuesService
                                            , IHandlingUnitsService handlingunitsService
                                            , IOutboundOrderLinesInventoryAllocationService outboundorderlinesinventoryallocationService
                                            , IOutboundOrderLinePackingService outboundorderlinepackingService
                                            )
        //Custom Code End
            : base(id)
        {
            InitialDialogId             = Id;
            _botSpielUserStateAccessors = statePropertyAccessor ?? throw new System.ArgumentNullException("state accessor can't be null");

            _pickbatchpickingService = pickbatchpickingService;
            _pickbatchpickingPost    = pickbatchpickingPost;

            //Custom Code Start | Added Code Block
            _pickbatchesService    = pickbatchesService;
            _commonLookUps         = commonLookUps;
            _picking               = picking;
            _inventoryunitsService = inventoryunitsService;
            _movequeuesService     = movequeuesService;
            _handlingunitsService  = handlingunitsService;
            _outboundorderlinesinventoryallocationService = outboundorderlinesinventoryallocationService;
            _outboundorderlinepackingService = outboundorderlinepackingService;

            PromptValidator <string> pickBatchPickValidator = async(promptContext, cancellationToken) =>
            {
                var value = promptContext.Recognized.Value.Trim().ToLower();
                if (!_pickbatchesService.IndexDb().Where(x => x.sPickBatch.Trim().ToLower() == value && x.ixStatus != _commonLookUps.getStatuses().Where(s => s.sStatus == "Complete").Select(s => s.ixStatus).FirstOrDefault()).Any())
                {
                    await promptContext.Context.SendActivityAsync(MessageFactory.Text($"The pick batch {value} does not exist or is already complete. Please enter a different value or exit."), cancellationToken);

                    return(false);
                }
                else
                {
                    if (_pickbatchesService.IndexDb().Where(x => x.sPickBatch.Trim().ToLower() == value && x.ixStatus == _commonLookUps.getStatuses().Where(s => s.sStatus == "Started").Select(s => s.ixStatus).FirstOrDefault() && !x.bMultiResource).Any())
                    {
                        await promptContext.Context.SendActivityAsync(MessageFactory.Text($"The pick batch {value} has already been started and is flagged for a single picker. Please enter a different value or exit."), cancellationToken);

                        return(false);
                    }
                    else if (_pickbatchesService.IndexDb().Where(x => x.sPickBatch.Trim().ToLower() == value && x.ixStatus == _commonLookUps.getStatuses().Where(s => s.sStatus == "Inactive").Select(s => s.ixStatus).FirstOrDefault()).Any())
                    {
                        await promptContext.Context.SendActivityAsync(MessageFactory.Text($"The pick batch {value} has not been activated. Please activate or enter a different value or exit."), cancellationToken);

                        return(false);
                    }
                    return(true);
                }
            };

            PromptValidator <float> baseUnitQuantityPickedValidator = async(promptContext, cancellationToken) =>
            {
                var value = promptContext.Recognized.Value;
                var currentBotUserData = await _botSpielUserStateAccessors.BotUserDataAccessor.GetAsync(promptContext.Context, () => _botUserData);

                if (value > currentBotUserData.pickSuggestion.Item2)
                {
                    await promptContext.Context.SendActivityAsync(MessageFactory.Text($"The quantity picked {value.ToString()} must be less than or equal to the quantity suggested {currentBotUserData.pickSuggestion.Item2.ToString()}. Please enter a different value or exit."), cancellationToken);

                    return(false);
                }
                else
                {
                    return(true);
                }
            };

            //Custom Code End



            // Define the prompts used in the Dialog.
            //Custom Code Start | Replaced Code Block
            //Replaced Code Block Start
            //AddDialog(new TextPrompt(PickBatchPickPromptId));
            //Replaced Code Block End
            AddDialog(new TextPrompt(PickBatchPickPromptId, pickBatchPickValidator));
            //Custom Code End
            AddDialog(new ChoicePrompt(InventoryUnitPromptId));
            AddDialog(new NumberPrompt <float>(BaseUnitQuantityPickedPromptId, baseUnitQuantityPickedValidator));
            AddDialog(new TextPrompt(PackToHandlingUnitPromptId));

            // Define the conversation flow for the Dialog.
            WaterfallStep[] steps = new WaterfallStep[]
            {
                //PickBatchPickPrompt,
                //Custom Code Start | Removed Block
                //InventoryUnitPrompt,
                //Custom Code End
                BaseUnitQuantityPickedPrompt,
                PackToHandlingUnitPrompt,
                donePrompt,
            };
            AddDialog(new WaterfallDialog(Id, steps));
        }
 public OutboundOrderLinesInventoryAllocationController(IOutboundOrderLinesInventoryAllocationService outboundorderlinesinventoryallocationService)
 {
     _outboundorderlinesinventoryallocationService = outboundorderlinesinventoryallocationService;
 }
コード例 #6
0
        //Custom Code Start | Replaced Code Block
        //Replaced Code Block Start
        // public BotSpielBot(ILoggerFactory loggerFactory, BotSpielUserStateAccessors statePropertyAccessor, BotUserData botUserData, BotUserEntityContext botUserEntityContext, NavigationEntityData navigationEntityData
        //, PutAwayHandlingUnitsPost putawayhandlingunitsPost
        //    , IPutAwayHandlingUnitsService putawayhandlingunitsService
        // )
        //Replaced Code Block End
        public BotSpielBot(ILoggerFactory loggerFactory, BotSpielUserStateAccessors statePropertyAccessor, BotUserData botUserData, BotUserEntityContext botUserEntityContext, NavigationEntityData navigationEntityData
                           , DropInventoryUnitsPost dropinventoryunitsPost
                           , PickBatchPickingPost pickbatchpickingPost
                           , PutAwayHandlingUnitsPost putawayhandlingunitsPost
                           , SetUpExecutionParametersPost setupexecutionparametersPost
                           , IPutAwayHandlingUnitsService putawayhandlingunitsService
                           , ISetUpExecutionParametersService setupexecutionparametersService
                           , IHandlingUnitsService handlingunitsService
                           , UserManager <ApplicationUser> userManager
                           , IFacilitiesService facilitiesService
                           , PutAway putAway
                           , IInventoryLocationsService inventorylocationsService
                           , ILocationFunctionsService locationfunctionsService
                           , IMoveQueueTypesService movequeuetypesService
                           , IMoveQueueContextsService movequeuecontextsService
                           , IInventoryUnitsService inventoryunitsService
                           , IStatusesService statusesService
                           , IMoveQueuesService movequeuesService
                           , IPickBatchesService pickbatchesService
                           , CommonLookUps commonLookUps
                           , Picking picking
                           , Shipping shipping
                           , IPickBatchPickingService pickbatchpickingService
                           , IOutboundOrderLinesInventoryAllocationService outboundorderlinesinventoryallocationService
                           , IOutboundOrderLinePackingService outboundorderlinepackingService
                           )
        //Custom Code End

        {
            if (loggerFactory == null)
            {
                throw new System.ArgumentNullException(nameof(loggerFactory));
            }

            _logger = loggerFactory.CreateLogger <BotSpielBot>();

            _botUserData          = botUserData;
            _botUserEntityContext = botUserEntityContext;
            _navigationEntityData = navigationEntityData;

            _botSpielUserStateAccessors = statePropertyAccessor ?? throw new System.ArgumentNullException("state accessor can't be null");

            _dropinventoryunitsPost          = dropinventoryunitsPost;
            _pickbatchpickingPost            = pickbatchpickingPost;
            _putawayhandlingunitsPost        = putawayhandlingunitsPost;
            _setupexecutionparametersPost    = setupexecutionparametersPost;
            _putawayhandlingunitsService     = putawayhandlingunitsService;
            _setupexecutionparametersService = setupexecutionparametersService;
            //Custom Code Start | Added Code Block
            _handlingunitsService = handlingunitsService;
            _userManager          = userManager;
            _facilitiesService    = facilitiesService;
            _putAway = putAway;
            _inventorylocationsService = inventorylocationsService;
            _locationfunctionsService  = locationfunctionsService;
            _movequeuetypesService     = movequeuetypesService;
            _movequeuecontextsService  = movequeuecontextsService;
            _inventoryunitsService     = inventoryunitsService;
            _statusesService           = statusesService;
            _movequeuesService         = movequeuesService;
            _pickbatchesService        = pickbatchesService;
            _commonLookUps             = commonLookUps;
            _picking  = picking;
            _shipping = shipping;
            _pickbatchpickingService = pickbatchpickingService;
            _outboundorderlinesinventoryallocationService = outboundorderlinesinventoryallocationService;
            _outboundorderlinepackingService = outboundorderlinepackingService;
            //Custom Code End

            // The DialogSet needs a DialogState accessor, it will call it when it has a turn context.
            _dialogs = new DialogSet(statePropertyAccessor.DialogStateAccessor)
                       .Add(new RootDialog(RootDialogId, _botUserEntityContext, _navigationEntityData))
                       .Add(new CreatePickBatchPickingDialog(CreatePickBatchPickingDialogId, _pickbatchpickingService, _pickbatchpickingPost, _botSpielUserStateAccessors, _pickbatchesService, _commonLookUps, _picking, _inventoryunitsService, _movequeuesService, _handlingunitsService, _outboundorderlinesinventoryallocationService, _outboundorderlinepackingService))
                       //Custom Code Start | Replaced Code Block
                       //Replaced Code Block Start
                       //.Add(new CreatePutAwayHandlingUnitsDialog(CreatePutAwayHandlingUnitsDialogId, _putawayhandlingunitsService, _putawayhandlingunitsPost, _botSpielUserStateAccessors))
                       //Replaced Code Block End
                       .Add(new CreatePutAwayHandlingUnitsDialog(
                                CreatePutAwayHandlingUnitsDialogId
                                , _putawayhandlingunitsService
                                , _putawayhandlingunitsPost
                                , _botSpielUserStateAccessors
                                , _handlingunitsService
                                , _putAway
                                , _botUserData
                                , _inventorylocationsService
                                , _movequeuetypesService
                                , _movequeuecontextsService
                                , _inventoryunitsService
                                , _statusesService
                                , _movequeuesService
                                ))
                       //Custom Code End
                       .Add(new CreateSetUpExecutionParametersDialog(CreateSetUpExecutionParametersDialogId, _setupexecutionparametersService, _setupexecutionparametersPost, _botSpielUserStateAccessors))
                       .Add(new CreateDropInventoryUnitsDialog(CreateDropInventoryUnitsDialogId, _dropinventoryunitsService, _dropinventoryunitsPost, _botSpielUserStateAccessors, _shipping, _inventorylocationsService, _commonLookUps, _movequeuesService))
                       .Add(new ConfirmPrompt(ConfirmPromptId, defaultLocale: Culture.English))
                       //Custom Code Start | Added Code Block
                       .Add(new ChoicePrompt(ChoicesPromptId, defaultLocale: Culture.English))
                       .Add(new CreateGetPickBatchesDialog(CreateGetPickBatchesDialogId, new GetPickBatchesPost(), _botSpielUserStateAccessors, _pickbatchesService, _commonLookUps));
            //Custom Code End
        }