Beispiel #1
0
 public ParcelsModule(IFacadeFilterService <Parcel, int, ParcelResource, ParcelResource, ParcelSearchRequestResource> parcelsFacadeService)
 {
     this.parcelsFacadeService = parcelsFacadeService;
     this.Get("/logistics/parcels/create", _ => this.Negotiate.WithModel(ApplicationSettings.Get()).WithView("Index"));
     this.Get("/logistics/parcels/{id}", parameters => this.GetParcel(parameters.id));
     this.Put("/logistics/parcels/{id}", parameters => this.UpdateParcel(parameters.id));
     this.Get("/logistics/parcels", _ => this.GetParcels());
     this.Post("/logistics/parcels", _ => this.AddParcel());
 }
Beispiel #2
0
 public GoodsInModule(
     IGoodsInFacadeService service,
     IFacadeFilterService <StorageLocation, int, StorageLocationResource, StorageLocationResource, StorageLocationResource> storageLocationService,
     ISalesArticleService salesArticleService)
 {
     this.service = service;
     this.storageLocationService = storageLocationService;
     this.salesArticleService    = salesArticleService;
     this.Post("/logistics/book-in", _ => this.DoBookIn());
     this.Get("/logistics/loan-details", _ => this.GetLoanDetails());
     this.Get("/logistics/goods-in/dem-locations", _ => this.GetDemLocations());
     this.Get("/inventory/sales-articles", _ => this.SearchSalesArticles());
     this.Get("/logistics/purchase-orders/validate/{id}", parameters => this.ValidatePurchaseOrder(parameters.id));
 }
Beispiel #3
0
        public void EstablishContext()
        {
            this.AllocationFacadeService       = Substitute.For <IAllocationFacadeService>();
            this.DespatchLocationFacadeService = Substitute.For <IFacadeService <DespatchLocation, int, DespatchLocationResource, DespatchLocationResource> >();
            this.SosAllocHeadFacadeService     = Substitute.For <ISosAllocHeadFacadeService>();
            this.SosAllocDetailFacadeService   = Substitute.For <IFacadeFilterService <SosAllocDetail, int, SosAllocDetailResource, SosAllocDetailResource, JobIdRequestResource> >();

            var bootstrapper = new ConfigurableBootstrapper(
                with =>
            {
                with.Dependency(this.AllocationFacadeService);
                with.Dependency(this.DespatchLocationFacadeService);
                with.Dependency(this.SosAllocHeadFacadeService);
                with.Dependency(this.SosAllocDetailFacadeService);
                with.Dependency <IResourceBuilder <AllocationResult> >(new AllocationResultResourceBuilder());
                with.Dependency <IResourceBuilder <IEnumerable <DespatchLocation> > >(new DespatchLocationsResourceBuilder());
                with.Dependency <IResourceBuilder <SosAllocHead> >(new SosAllocHeadResourceBuilder());
                with.Dependency <IResourceBuilder <IEnumerable <SosAllocHead> > >(new SosAllocHeadsResourceBuilder());
                with.Dependency <IResourceBuilder <SosAllocDetail> >(new SosAllocDetailResourceBuilder());
                with.Dependency <IResourceBuilder <ResultsModel> >(new ResultsModelResourceBuilder());
                with.Dependency <IResourceBuilder <IEnumerable <SosAllocDetail> > >(new SosAllocDetailsResourceBuilder());
                with.Dependency <IResourceBuilder <DespatchPalletQueueResult> >(
                    new DespatchPalletQueueResultResourceBuilder());
                with.Module <AllocationModule>();
                with.ResponseProcessor <AllocationStartResponseProcessor>();
                with.ResponseProcessor <DespatchLocationsResponseProcessor>();
                with.ResponseProcessor <SosAllocHeadsResponseProcessor>();
                with.ResponseProcessor <SosAllocDetailResponseProcessor>();
                with.ResponseProcessor <SosAllocDetailsResponseProcessor>();
                with.ResponseProcessor <ResultsModelJsonResponseProcessor>();
                with.ResponseProcessor <DespatchPalletQueueResultProcessor>();
                with.RequestStartup(
                    (container, pipelines, context) =>
                {
                    var claims = new List <Claim>
                    {
                        new Claim(ClaimTypes.Role, "employee"),
                        new Claim(ClaimTypes.NameIdentifier, "test-user")
                    };

                    var user = new ClaimsIdentity(claims, "jwt");

                    context.CurrentUser = new ClaimsPrincipal(user);
                });
            });

            this.Browser = new Browser(bootstrapper);
        }
Beispiel #4
0
 public AllocationModule(
     IAllocationFacadeService allocationFacadeService,
     IFacadeService <DespatchLocation, int, DespatchLocationResource, DespatchLocationResource> despatchLocationFacadeService,
     ISosAllocHeadFacadeService sosAllocHeadFacadeService,
     IFacadeFilterService <SosAllocDetail, int, SosAllocDetailResource, SosAllocDetailResource, JobIdRequestResource> sosAllocDetailFacadeService)
 {
     this.allocationFacadeService       = allocationFacadeService;
     this.despatchLocationFacadeService = despatchLocationFacadeService;
     this.sosAllocHeadFacadeService     = sosAllocHeadFacadeService;
     this.sosAllocDetailFacadeService   = sosAllocDetailFacadeService;
     this.Get("/logistics/allocations", _ => this.GetApp());
     this.Post("/logistics/allocations", _ => this.StartAllocation());
     this.Post("/logistics/allocations/finish", p => this.FinishAllocation());
     this.Post("/logistics/allocations/pick", _ => this.PickItems());
     this.Post("/logistics/allocations/unpick", _ => this.UnpickItems());
     this.Get("/logistics/despatch-locations", _ => this.GetDespatchLocations());
     this.Get("/logistics/sos-alloc-heads", _ => this.GetAllocHeads());
     this.Get("/logistics/sos-alloc-heads/{jobId:int}", p => this.GetAllocHeads(p.jobId));
     this.Get("/logistics/sos-alloc-details", _ => this.GetAllocDetails());
     this.Put("/logistics/sos-alloc-details/{id:int}", p => this.UpdateAllocDetail(p.id));
     this.Get("/logistics/allocations/despatch-picking-summary", _ => this.GetPickingSummaryReport());
     this.Get("/logistics/allocations/despatch-pallet-queue", _ => this.GetPalletQueueReport());
 }
Beispiel #5
0
        public StockLocatorsModule(
            IStockLocatorFacadeService service,
            IFacadeFilterService <StorageLocation, int, StorageLocationResource, StorageLocationResource, StorageLocationResource> storageLocationService,
            IFacadeService <InspectedState, string, InspectedStateResource, InspectedStateResource> inspectedStateService,
            IStockQuantitiesService stockQuantitiesService,
            IStockLocatorPricesService pricesService)
        {
            this.service = service;
            this.storageLocationService = storageLocationService;
            this.inspectedStateService  = inspectedStateService;
            this.stockQuantitiesService = stockQuantitiesService;
            this.pricesService          = pricesService;

            this.Get("/inventory/stock-locators", _ => this.GetStockLocators());
            this.Get("/inventory/stock-locators/batches", _ => this.GetBatches());
            this.Delete("/inventory/stock-locators/{id}", parameters => this.DeleteStockLocator(parameters.id));
            this.Put("/inventory/stock-locators/{id}", parameters => this.UpdateStockLocator(parameters.id));
            this.Get("/inventory/storage-locations", _ => this.GetStorageLocations());
            this.Post("/inventory/stock-locators", _ => this.AddStockLocator());
            this.Get("/inventory/stock-locators/states", _ => this.GetStates());
            this.Get("/inventory/stock-locators-by-location/", _ => this.GetStockLocatorsByLocation());
            this.Get("/inventory/stock-quantities/", _ => this.GetStockQuantities());
            this.Get("/inventory/stock-locators/prices", _ => this.GetPrices());
        }