@rytass/wms-module-graphql 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +77 -0
- package/index.cjs.js +6279 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/lib/dto/allocate-inventory-order-item.dto.d.ts +12 -0
- package/lib/dto/allocate-inventory-order-item.dto.js +36 -0
- package/lib/dto/allocate-inventory-order.dto.d.ts +9 -0
- package/lib/dto/allocate-inventory-order.dto.js +31 -0
- package/lib/dto/batch.dto.d.ts +8 -0
- package/lib/dto/batch.dto.js +26 -0
- package/lib/dto/hold-inventory-order-item.dto.d.ts +15 -0
- package/lib/dto/hold-inventory-order-item.dto.js +37 -0
- package/lib/dto/hold-inventory-order.dto.d.ts +13 -0
- package/lib/dto/hold-inventory-order.dto.js +47 -0
- package/lib/dto/index.d.ts +24 -0
- package/lib/dto/loader-type.dto.d.ts +12 -0
- package/lib/dto/loader-type.dto.js +46 -0
- package/lib/dto/loader-unit.dto.d.ts +7 -0
- package/lib/dto/loader-unit.dto.js +21 -0
- package/lib/dto/loader.dto.d.ts +17 -0
- package/lib/dto/loader.dto.js +71 -0
- package/lib/dto/location.dto.d.ts +10 -0
- package/lib/dto/location.dto.js +36 -0
- package/lib/dto/material-unit.dto.d.ts +12 -0
- package/lib/dto/material-unit.dto.js +46 -0
- package/lib/dto/material.dto.d.ts +10 -0
- package/lib/dto/material.dto.js +36 -0
- package/lib/dto/merge-batch-order.dto.d.ts +11 -0
- package/lib/dto/merge-batch-order.dto.js +50 -0
- package/lib/dto/pagination.dto.d.ts +9 -0
- package/lib/dto/pagination.dto.js +51 -0
- package/lib/dto/quality-inspection-order-item.dto.d.ts +10 -0
- package/lib/dto/quality-inspection-order-item.dto.js +50 -0
- package/lib/dto/quality-inspection-order.dto.d.ts +12 -0
- package/lib/dto/quality-inspection-order.dto.js +42 -0
- package/lib/dto/receive-inventory-order-item.dto.d.ts +18 -0
- package/lib/dto/receive-inventory-order-item.dto.js +60 -0
- package/lib/dto/receive-inventory-order.dto.d.ts +16 -0
- package/lib/dto/receive-inventory-order.dto.js +58 -0
- package/lib/dto/reclassify-inventory-order.dto.d.ts +12 -0
- package/lib/dto/reclassify-inventory-order.dto.js +55 -0
- package/lib/dto/sale-order.dto.d.ts +4 -0
- package/lib/dto/sale-order.dto.js +20 -0
- package/lib/dto/scrape-order-item.dto.d.ts +14 -0
- package/lib/dto/scrape-order-item.dto.js +56 -0
- package/lib/dto/scrape-order.dto.d.ts +11 -0
- package/lib/dto/scrape-order.dto.js +37 -0
- package/lib/dto/ship-inventory-order-item.dto.d.ts +14 -0
- package/lib/dto/ship-inventory-order-item.dto.js +56 -0
- package/lib/dto/ship-inventory-order-reference.dto.d.ts +12 -0
- package/lib/dto/ship-inventory-order-reference.dto.js +48 -0
- package/lib/dto/ship-inventory-order.dto.d.ts +16 -0
- package/lib/dto/ship-inventory-order.dto.js +58 -0
- package/lib/dto/split-batch-order.dto.d.ts +11 -0
- package/lib/dto/split-batch-order.dto.js +50 -0
- package/lib/dto/stock.dto.d.ts +42 -0
- package/lib/dto/stock.dto.js +138 -0
- package/lib/dto/transfer-customer-order-item.dto.d.ts +15 -0
- package/lib/dto/transfer-customer-order-item.dto.js +61 -0
- package/lib/dto/transfer-customer-order.dto.d.ts +11 -0
- package/lib/dto/transfer-customer-order.dto.js +37 -0
- package/lib/dto/transfer-order-item.dto.d.ts +15 -0
- package/lib/dto/transfer-order-item.dto.js +41 -0
- package/lib/dto/transfer-order.dto.d.ts +15 -0
- package/lib/dto/transfer-order.dto.js +57 -0
- package/lib/dto/transfer-vendor-order-item.dto.d.ts +15 -0
- package/lib/dto/transfer-vendor-order-item.dto.js +61 -0
- package/lib/dto/transfer-vendor-order.dto.d.ts +11 -0
- package/lib/dto/transfer-vendor-order.dto.js +37 -0
- package/lib/dto/unit.dto.d.ts +4 -0
- package/lib/dto/unit.dto.js +20 -0
- package/lib/dto/warehouse-map.dto.d.ts +39 -0
- package/lib/dto/warehouse-map.dto.js +165 -0
- package/lib/graphql.module.d.ts +6 -0
- package/lib/graphql.module.js +157 -0
- package/lib/helpers/dataloader.type.d.ts +12 -0
- package/lib/helpers/helper.module.d.ts +2 -0
- package/lib/helpers/helper.module.js +15 -0
- package/lib/helpers/index.d.ts +4 -0
- package/lib/helpers/loader.service.d.ts +56 -0
- package/lib/helpers/loader.service.js +168 -0
- package/lib/helpers/query-path.d.ts +1 -0
- package/lib/helpers/query-path.js +19 -0
- package/lib/inputs/cancel-ship-order.args.d.ts +4 -0
- package/lib/inputs/cancel-ship-order.args.js +20 -0
- package/lib/inputs/cancel-transfer-order.args.d.ts +4 -0
- package/lib/inputs/cancel-transfer-order.args.js +23 -0
- package/lib/inputs/create-allocate-inventory-order-item.args.d.ts +13 -0
- package/lib/inputs/create-allocate-inventory-order-item.args.js +50 -0
- package/lib/inputs/create-allocate-inventory-order.args.d.ts +11 -0
- package/lib/inputs/create-allocate-inventory-order.args.js +36 -0
- package/lib/inputs/create-hold-inventory-order-item.args.d.ts +11 -0
- package/lib/inputs/create-hold-inventory-order-item.args.js +40 -0
- package/lib/inputs/create-hold-inventory-order.args.d.ts +12 -0
- package/lib/inputs/create-hold-inventory-order.args.js +41 -0
- package/lib/inputs/create-loader-type.args.d.ts +10 -0
- package/lib/inputs/create-loader-type.args.js +35 -0
- package/lib/inputs/create-loader.args.d.ts +30 -0
- package/lib/inputs/create-loader.args.js +130 -0
- package/lib/inputs/create-location.args.d.ts +11 -0
- package/lib/inputs/create-location.args.js +50 -0
- package/lib/inputs/create-material-unit.args.d.ts +5 -0
- package/lib/inputs/create-material-unit.args.js +25 -0
- package/lib/inputs/create-material.args.d.ts +14 -0
- package/lib/inputs/create-material.args.js +51 -0
- package/lib/inputs/create-quality-inspection-order.args.d.ts +11 -0
- package/lib/inputs/create-quality-inspection-order.args.js +50 -0
- package/lib/inputs/create-receive-inventory-order-item.args.d.ts +17 -0
- package/lib/inputs/create-receive-inventory-order-item.args.js +70 -0
- package/lib/inputs/create-receive-inventory-order.args.d.ts +14 -0
- package/lib/inputs/create-receive-inventory-order.args.js +51 -0
- package/lib/inputs/create-ship-inventory-order-item.args.d.ts +12 -0
- package/lib/inputs/create-ship-inventory-order-item.args.js +45 -0
- package/lib/inputs/create-ship-inventory-order-reference.args.d.ts +16 -0
- package/lib/inputs/create-ship-inventory-order-reference.args.js +65 -0
- package/lib/inputs/create-ship-inventory-order.args.d.ts +16 -0
- package/lib/inputs/create-ship-inventory-order.args.js +57 -0
- package/lib/inputs/create-transfer-customer-order-item.args.d.ts +11 -0
- package/lib/inputs/create-transfer-customer-order-item.args.js +40 -0
- package/lib/inputs/create-transfer-customer-order.args.d.ts +14 -0
- package/lib/inputs/create-transfer-customer-order.args.js +51 -0
- package/lib/inputs/create-transfer-order-item.args.d.ts +11 -0
- package/lib/inputs/create-transfer-order-item.args.js +40 -0
- package/lib/inputs/create-transfer-order.args.d.ts +16 -0
- package/lib/inputs/create-transfer-order.args.js +61 -0
- package/lib/inputs/create-transfer-vendor-order-item.args.d.ts +11 -0
- package/lib/inputs/create-transfer-vendor-order-item.args.js +40 -0
- package/lib/inputs/create-transfer-vendor-order.args.d.ts +14 -0
- package/lib/inputs/create-transfer-vendor-order.args.js +51 -0
- package/lib/inputs/date-range.args.d.ts +4 -0
- package/lib/inputs/date-range.args.js +20 -0
- package/lib/inputs/deallocate-order.args.d.ts +5 -0
- package/lib/inputs/deallocate-order.args.js +25 -0
- package/lib/inputs/find-allocate-inventory-order.args.d.ts +10 -0
- package/lib/inputs/find-allocate-inventory-order.args.js +42 -0
- package/lib/inputs/find-batch.args.d.ts +5 -0
- package/lib/inputs/find-batch.args.js +21 -0
- package/lib/inputs/find-hold-inventory-order.args.d.ts +10 -0
- package/lib/inputs/find-hold-inventory-order.args.js +42 -0
- package/lib/inputs/find-loader-type.args.d.ts +8 -0
- package/lib/inputs/find-loader-type.args.js +32 -0
- package/lib/inputs/find-loader.args.d.ts +16 -0
- package/lib/inputs/find-loader.args.js +72 -0
- package/lib/inputs/find-location.args.d.ts +6 -0
- package/lib/inputs/find-location.args.js +26 -0
- package/lib/inputs/find-material.args.d.ts +5 -0
- package/lib/inputs/find-material.args.js +21 -0
- package/lib/inputs/find-receive-inventory-order.args.d.ts +16 -0
- package/lib/inputs/find-receive-inventory-order.args.js +71 -0
- package/lib/inputs/find-sale-order.args.d.ts +4 -0
- package/lib/inputs/find-sale-order.args.js +16 -0
- package/lib/inputs/find-ship-inventory-order.args.d.ts +16 -0
- package/lib/inputs/find-ship-inventory-order.args.js +71 -0
- package/lib/inputs/find-stock.args.d.ts +15 -0
- package/lib/inputs/find-stock.args.js +67 -0
- package/lib/inputs/find-transfer-order.args.d.ts +18 -0
- package/lib/inputs/find-transfer-order.args.js +82 -0
- package/lib/inputs/index.d.ts +0 -0
- package/lib/inputs/merge-batch.args.d.ts +9 -0
- package/lib/inputs/merge-batch.args.js +40 -0
- package/lib/inputs/pagination.args.d.ts +4 -0
- package/lib/inputs/pagination.args.js +20 -0
- package/lib/inputs/receive-order.args.d.ts +8 -0
- package/lib/inputs/receive-order.args.js +40 -0
- package/lib/inputs/reclassify-inventory-order.args.d.ts +9 -0
- package/lib/inputs/reclassify-inventory-order.args.js +40 -0
- package/lib/inputs/release-order.args.d.ts +5 -0
- package/lib/inputs/release-order.args.js +25 -0
- package/lib/inputs/return-transfer-customer-order.args.d.ts +7 -0
- package/lib/inputs/return-transfer-customer-order.args.js +35 -0
- package/lib/inputs/return-transfer-vendor-order.args.d.ts +7 -0
- package/lib/inputs/return-transfer-vendor-order.args.js +35 -0
- package/lib/inputs/scrape-order.args.d.ts +8 -0
- package/lib/inputs/scrape-order.args.js +35 -0
- package/lib/inputs/ship-order.args.d.ts +4 -0
- package/lib/inputs/ship-order.args.js +20 -0
- package/lib/inputs/split-batch.args.d.ts +9 -0
- package/lib/inputs/split-batch.args.js +40 -0
- package/lib/inputs/transfer-order.args.d.ts +4 -0
- package/lib/inputs/transfer-order.args.js +20 -0
- package/lib/inputs/update-warehouse-map.args.d.ts +28 -0
- package/lib/inputs/update-warehouse-map.args.js +121 -0
- package/lib/mutations/allocate-inventory-order.mutation.d.ts +12 -0
- package/lib/mutations/allocate-inventory-order.mutation.js +81 -0
- package/lib/mutations/hold-inventory-order.mutation.d.ts +12 -0
- package/lib/mutations/hold-inventory-order.mutation.js +81 -0
- package/lib/mutations/loader.mutation.d.ts +13 -0
- package/lib/mutations/loader.mutation.js +105 -0
- package/lib/mutations/location.mutation.d.ts +8 -0
- package/lib/mutations/location.mutation.js +39 -0
- package/lib/mutations/material.mutation.d.ts +9 -0
- package/lib/mutations/material.mutation.js +62 -0
- package/lib/mutations/merge-batch.mutation.d.ts +9 -0
- package/lib/mutations/merge-batch.mutation.js +44 -0
- package/lib/mutations/quality-inspection-order.mutation.d.ts +9 -0
- package/lib/mutations/quality-inspection-order.mutation.js +44 -0
- package/lib/mutations/receive-inventory-order.mutation.d.ts +13 -0
- package/lib/mutations/receive-inventory-order.mutation.js +92 -0
- package/lib/mutations/reclassify-inventory-order.mutation.d.ts +9 -0
- package/lib/mutations/reclassify-inventory-order.mutation.js +45 -0
- package/lib/mutations/scrape-order.mutation.d.ts +9 -0
- package/lib/mutations/scrape-order.mutation.js +38 -0
- package/lib/mutations/ship-inventory-order.mutation.d.ts +14 -0
- package/lib/mutations/ship-inventory-order.mutation.js +107 -0
- package/lib/mutations/split-batch.mutation.d.ts +9 -0
- package/lib/mutations/split-batch.mutation.js +38 -0
- package/lib/mutations/transfer-customer-order.mutation.d.ts +12 -0
- package/lib/mutations/transfer-customer-order.mutation.js +81 -0
- package/lib/mutations/transfer-order.mutation.d.ts +14 -0
- package/lib/mutations/transfer-order.mutation.js +84 -0
- package/lib/mutations/transfer-vendor-order.mutation.d.ts +12 -0
- package/lib/mutations/transfer-vendor-order.mutation.js +81 -0
- package/lib/mutations/warehouse-map.mutation.d.ts +10 -0
- package/lib/mutations/warehouse-map.mutation.js +54 -0
- package/lib/queries/allocate-inventory-order.query.d.ts +8 -0
- package/lib/queries/allocate-inventory-order.query.js +30 -0
- package/lib/queries/batch.query.d.ts +8 -0
- package/lib/queries/batch.query.js +33 -0
- package/lib/queries/hold-inventory-order.query.d.ts +8 -0
- package/lib/queries/hold-inventory-order.query.js +30 -0
- package/lib/queries/loader.query.d.ts +17 -0
- package/lib/queries/loader.query.js +157 -0
- package/lib/queries/location.query.d.ts +9 -0
- package/lib/queries/location.query.js +47 -0
- package/lib/queries/material.query.d.ts +9 -0
- package/lib/queries/material.query.js +71 -0
- package/lib/queries/recieve-inventory-order.query.d.ts +9 -0
- package/lib/queries/recieve-inventory-order.query.js +69 -0
- package/lib/queries/sale-order.query.d.ts +8 -0
- package/lib/queries/sale-order.query.js +53 -0
- package/lib/queries/ship-inventory-order.query.d.ts +9 -0
- package/lib/queries/ship-inventory-order.query.js +69 -0
- package/lib/queries/stock.query.d.ts +12 -0
- package/lib/queries/stock.query.js +109 -0
- package/lib/queries/transfer-order.query.d.ts +9 -0
- package/lib/queries/transfer-order.query.js +42 -0
- package/lib/queries/unit.query.d.ts +7 -0
- package/lib/queries/unit.query.js +27 -0
- package/lib/queries/warehouse-map.query.d.ts +7 -0
- package/lib/queries/warehouse-map.query.js +29 -0
- package/lib/resolvers/aggregated-stock.resolver.d.ts +14 -0
- package/lib/resolvers/aggregated-stock.resolver.js +112 -0
- package/lib/resolvers/allocate-inventory-order.resolver.d.ts +6 -0
- package/lib/resolvers/allocate-inventory-order.resolver.js +27 -0
- package/lib/resolvers/change-log.resolver.d.ts +10 -0
- package/lib/resolvers/change-log.resolver.js +83 -0
- package/lib/resolvers/hold-inventory-order.resolver.d.ts +7 -0
- package/lib/resolvers/hold-inventory-order.resolver.js +27 -0
- package/lib/resolvers/loader-type.resolver.d.ts +5 -0
- package/lib/resolvers/loader-type.resolver.js +50 -0
- package/lib/resolvers/loader.resolver.d.ts +9 -0
- package/lib/resolvers/loader.resolver.js +86 -0
- package/lib/resolvers/location.resolver.d.ts +10 -0
- package/lib/resolvers/location.resolver.js +55 -0
- package/lib/resolvers/material.resolver.d.ts +11 -0
- package/lib/resolvers/material.resolver.js +84 -0
- package/lib/resolvers/merge-batch.resolver.d.ts +6 -0
- package/lib/resolvers/merge-batch.resolver.js +26 -0
- package/lib/resolvers/receive-inventory-order.resolver.d.ts +15 -0
- package/lib/resolvers/receive-inventory-order.resolver.js +140 -0
- package/lib/resolvers/ship-inventory-order.resolver.d.ts +25 -0
- package/lib/resolvers/ship-inventory-order.resolver.js +273 -0
- package/lib/resolvers/split-batch.resolver.d.ts +6 -0
- package/lib/resolvers/split-batch.resolver.js +26 -0
- package/lib/resolvers/stock.resolver.d.ts +10 -0
- package/lib/resolvers/stock.resolver.js +83 -0
- package/lib/resolvers/transfer-customer-order.resolver.d.ts +6 -0
- package/lib/resolvers/transfer-customer-order.resolver.js +27 -0
- package/lib/resolvers/transfer-order.resolver.d.ts +21 -0
- package/lib/resolvers/transfer-order.resolver.js +218 -0
- package/lib/resolvers/transfer-vendor-order.resolver.d.ts +6 -0
- package/lib/resolvers/transfer-vendor-order.resolver.js +27 -0
- package/lib/resolvers/warehouse-map.resolver.d.ts +6 -0
- package/lib/resolvers/warehouse-map.resolver.js +29 -0
- package/package.json +54 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
+
import { Injectable } from '@nestjs/common';
|
|
3
|
+
import { Mutation, Args } from '@nestjs/graphql';
|
|
4
|
+
import { HoldInventoryOrderService, StockService } from '@rytass/wms-module-core';
|
|
5
|
+
import { HoldInventoryOrderDto } from '../dto/hold-inventory-order.dto.js';
|
|
6
|
+
import { CreateHoldInventoryOrderArgs, UpdateHoldInventoryOrderArgs } from '../inputs/create-hold-inventory-order.args.js';
|
|
7
|
+
import { ReleaseOrderArgs } from '../inputs/release-order.args.js';
|
|
8
|
+
|
|
9
|
+
let HoldInventoryOrderMutation = class HoldInventoryOrderMutation {
|
|
10
|
+
holdInventoryOrderService;
|
|
11
|
+
stockService;
|
|
12
|
+
constructor(holdInventoryOrderService, stockService) {
|
|
13
|
+
this.holdInventoryOrderService = holdInventoryOrderService;
|
|
14
|
+
this.stockService = stockService;
|
|
15
|
+
}
|
|
16
|
+
async createHoldInventoryOrder(args) {
|
|
17
|
+
return this.holdInventoryOrderService.createHoldInventoryOrder({
|
|
18
|
+
...args,
|
|
19
|
+
items: args.items.map(({ aggregatedKey, ...item }) => {
|
|
20
|
+
const keys = this.stockService.destructAggregateKey(aggregatedKey);
|
|
21
|
+
return {
|
|
22
|
+
...item,
|
|
23
|
+
...keys,
|
|
24
|
+
};
|
|
25
|
+
}),
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
async updateHoldInventoryOrder(args) {
|
|
29
|
+
return this.holdInventoryOrderService.updateHoldInventoryOrder({
|
|
30
|
+
...args,
|
|
31
|
+
items: args?.items?.map(({ aggregatedKey, ...item }) => {
|
|
32
|
+
const keys = aggregatedKey
|
|
33
|
+
? this.stockService.destructAggregateKey(aggregatedKey)
|
|
34
|
+
: {};
|
|
35
|
+
return {
|
|
36
|
+
...item,
|
|
37
|
+
...keys,
|
|
38
|
+
};
|
|
39
|
+
}),
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
async release(args) {
|
|
43
|
+
return this.holdInventoryOrderService
|
|
44
|
+
.release(args.map(({ aggregatedKey, ...item }) => {
|
|
45
|
+
const keys = this.stockService.destructAggregateKey(aggregatedKey);
|
|
46
|
+
return {
|
|
47
|
+
...item,
|
|
48
|
+
...keys,
|
|
49
|
+
};
|
|
50
|
+
}))
|
|
51
|
+
.then(() => true);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
__decorate([
|
|
55
|
+
Mutation(() => HoldInventoryOrderDto),
|
|
56
|
+
__param(0, Args()),
|
|
57
|
+
__metadata("design:type", Function),
|
|
58
|
+
__metadata("design:paramtypes", [CreateHoldInventoryOrderArgs]),
|
|
59
|
+
__metadata("design:returntype", Promise)
|
|
60
|
+
], HoldInventoryOrderMutation.prototype, "createHoldInventoryOrder", null);
|
|
61
|
+
__decorate([
|
|
62
|
+
Mutation(() => HoldInventoryOrderDto),
|
|
63
|
+
__param(0, Args()),
|
|
64
|
+
__metadata("design:type", Function),
|
|
65
|
+
__metadata("design:paramtypes", [UpdateHoldInventoryOrderArgs]),
|
|
66
|
+
__metadata("design:returntype", Promise)
|
|
67
|
+
], HoldInventoryOrderMutation.prototype, "updateHoldInventoryOrder", null);
|
|
68
|
+
__decorate([
|
|
69
|
+
Mutation(() => Boolean),
|
|
70
|
+
__param(0, Args('items', { type: () => [ReleaseOrderArgs] })),
|
|
71
|
+
__metadata("design:type", Function),
|
|
72
|
+
__metadata("design:paramtypes", [Array]),
|
|
73
|
+
__metadata("design:returntype", Promise)
|
|
74
|
+
], HoldInventoryOrderMutation.prototype, "release", null);
|
|
75
|
+
HoldInventoryOrderMutation = __decorate([
|
|
76
|
+
Injectable(),
|
|
77
|
+
__metadata("design:paramtypes", [HoldInventoryOrderService,
|
|
78
|
+
StockService])
|
|
79
|
+
], HoldInventoryOrderMutation);
|
|
80
|
+
|
|
81
|
+
export { HoldInventoryOrderMutation };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LoaderService } from '@rytass/wms-module-core';
|
|
2
|
+
import { LoaderDto, LoaderTypeDto } from '../dto';
|
|
3
|
+
import { CreateLoaderTypeArgs, UpdateLoaderTypeArgs } from '../inputs/create-loader-type.args';
|
|
4
|
+
import { CreateLoaderArgs, CreateLoadersArgs, UpdateLoaderArgs } from '../inputs/create-loader.args';
|
|
5
|
+
export declare class LoaderMutation {
|
|
6
|
+
private readonly loaderService;
|
|
7
|
+
constructor(loaderService: LoaderService);
|
|
8
|
+
createLoader(args: CreateLoaderArgs): Promise<LoaderDto[]>;
|
|
9
|
+
createBatchLoader(args: CreateLoadersArgs[]): Promise<LoaderDto[]>;
|
|
10
|
+
updateLoader(args: UpdateLoaderArgs): Promise<LoaderDto>;
|
|
11
|
+
createLoaderType(args: CreateLoaderTypeArgs): Promise<LoaderTypeDto>;
|
|
12
|
+
updateLoaderType(args: UpdateLoaderTypeArgs): Promise<LoaderTypeDto>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
+
import { Injectable } from '@nestjs/common';
|
|
3
|
+
import { LoaderService } from '@rytass/wms-module-core';
|
|
4
|
+
import { LoaderTypeDto } from '../dto/loader-type.dto.js';
|
|
5
|
+
import { LoaderDto } from '../dto/loader.dto.js';
|
|
6
|
+
import '../dto/material.dto.js';
|
|
7
|
+
import '../dto/material-unit.dto.js';
|
|
8
|
+
import '../dto/stock.dto.js';
|
|
9
|
+
import '../dto/sale-order.dto.js';
|
|
10
|
+
import '../dto/receive-inventory-order.dto.js';
|
|
11
|
+
import '../dto/receive-inventory-order-item.dto.js';
|
|
12
|
+
import '../dto/ship-inventory-order.dto.js';
|
|
13
|
+
import '../dto/ship-inventory-order-item.dto.js';
|
|
14
|
+
import '../dto/hold-inventory-order.dto.js';
|
|
15
|
+
import '../dto/hold-inventory-order-item.dto.js';
|
|
16
|
+
import '../dto/allocate-inventory-order.dto.js';
|
|
17
|
+
import '../dto/allocate-inventory-order-item.dto.js';
|
|
18
|
+
import '../dto/transfer-order.dto.js';
|
|
19
|
+
import '../dto/transfer-order-item.dto.js';
|
|
20
|
+
import '../dto/transfer-customer-order.dto.js';
|
|
21
|
+
import '../dto/transfer-customer-order-item.dto.js';
|
|
22
|
+
import '../dto/transfer-vendor-order.dto.js';
|
|
23
|
+
import '../dto/transfer-vendor-order-item.dto.js';
|
|
24
|
+
import '../dto/scrape-order.dto.js';
|
|
25
|
+
import '../dto/scrape-order-item.dto.js';
|
|
26
|
+
import '../dto/quality-inspection-order.dto.js';
|
|
27
|
+
import '../dto/quality-inspection-order-item.dto.js';
|
|
28
|
+
import { Mutation, Args } from '@nestjs/graphql';
|
|
29
|
+
import { CreateLoaderTypeArgs, UpdateLoaderTypeArgs } from '../inputs/create-loader-type.args.js';
|
|
30
|
+
import { CreateLoaderArgs, CreateLoadersArgs, UpdateLoaderArgs } from '../inputs/create-loader.args.js';
|
|
31
|
+
import { In } from 'typeorm';
|
|
32
|
+
|
|
33
|
+
let LoaderMutation = class LoaderMutation {
|
|
34
|
+
loaderService;
|
|
35
|
+
constructor(loaderService) {
|
|
36
|
+
this.loaderService = loaderService;
|
|
37
|
+
}
|
|
38
|
+
async createLoader(args) {
|
|
39
|
+
return this.loaderService.createLoader(args);
|
|
40
|
+
}
|
|
41
|
+
async createBatchLoader(args) {
|
|
42
|
+
const types = await this.loaderService.loaderTypeRepository.find({
|
|
43
|
+
where: {
|
|
44
|
+
key: In(args.map((arg) => arg.typeKey)),
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
const typeMap = new Map(types.map((type) => [type.key, type.id]));
|
|
48
|
+
return this.loaderService.createBatchLoaders({
|
|
49
|
+
options: args.map((arg) => ({
|
|
50
|
+
...arg,
|
|
51
|
+
typeId: typeMap.get(arg.typeKey),
|
|
52
|
+
})),
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
async updateLoader(args) {
|
|
56
|
+
return this.loaderService.updateLoader(args);
|
|
57
|
+
}
|
|
58
|
+
createLoaderType(args) {
|
|
59
|
+
return this.loaderService.createLoaderType(args);
|
|
60
|
+
}
|
|
61
|
+
async updateLoaderType(args) {
|
|
62
|
+
return this.loaderService.updateLoaderType(args);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
__decorate([
|
|
66
|
+
Mutation(() => [LoaderDto]),
|
|
67
|
+
__param(0, Args()),
|
|
68
|
+
__metadata("design:type", Function),
|
|
69
|
+
__metadata("design:paramtypes", [CreateLoaderArgs]),
|
|
70
|
+
__metadata("design:returntype", Promise)
|
|
71
|
+
], LoaderMutation.prototype, "createLoader", null);
|
|
72
|
+
__decorate([
|
|
73
|
+
Mutation(() => [LoaderDto]),
|
|
74
|
+
__param(0, Args('items', { type: () => [CreateLoadersArgs] })),
|
|
75
|
+
__metadata("design:type", Function),
|
|
76
|
+
__metadata("design:paramtypes", [Array]),
|
|
77
|
+
__metadata("design:returntype", Promise)
|
|
78
|
+
], LoaderMutation.prototype, "createBatchLoader", null);
|
|
79
|
+
__decorate([
|
|
80
|
+
Mutation(() => LoaderDto),
|
|
81
|
+
__param(0, Args()),
|
|
82
|
+
__metadata("design:type", Function),
|
|
83
|
+
__metadata("design:paramtypes", [UpdateLoaderArgs]),
|
|
84
|
+
__metadata("design:returntype", Promise)
|
|
85
|
+
], LoaderMutation.prototype, "updateLoader", null);
|
|
86
|
+
__decorate([
|
|
87
|
+
Mutation(() => LoaderTypeDto),
|
|
88
|
+
__param(0, Args()),
|
|
89
|
+
__metadata("design:type", Function),
|
|
90
|
+
__metadata("design:paramtypes", [CreateLoaderTypeArgs]),
|
|
91
|
+
__metadata("design:returntype", Promise)
|
|
92
|
+
], LoaderMutation.prototype, "createLoaderType", null);
|
|
93
|
+
__decorate([
|
|
94
|
+
Mutation(() => LoaderTypeDto),
|
|
95
|
+
__param(0, Args()),
|
|
96
|
+
__metadata("design:type", Function),
|
|
97
|
+
__metadata("design:paramtypes", [UpdateLoaderTypeArgs]),
|
|
98
|
+
__metadata("design:returntype", Promise)
|
|
99
|
+
], LoaderMutation.prototype, "updateLoaderType", null);
|
|
100
|
+
LoaderMutation = __decorate([
|
|
101
|
+
Injectable(),
|
|
102
|
+
__metadata("design:paramtypes", [LoaderService])
|
|
103
|
+
], LoaderMutation);
|
|
104
|
+
|
|
105
|
+
export { LoaderMutation };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LocationService } from '@rytass/wms-module-core';
|
|
2
|
+
import { CreateLocationArgs, UpdateLocationArgs } from '../inputs/create-location.args';
|
|
3
|
+
export declare class LocationMutation {
|
|
4
|
+
private readonly locationService;
|
|
5
|
+
constructor(locationService: LocationService);
|
|
6
|
+
createLocation(args: CreateLocationArgs): Promise<import("@rytass/wms-module-core").LocationEntityClass>;
|
|
7
|
+
updateLocation(args: UpdateLocationArgs): Promise<import("@rytass/wms-module-core").LocationEntityClass>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
+
import { Injectable } from '@nestjs/common';
|
|
3
|
+
import { Mutation, Args } from '@nestjs/graphql';
|
|
4
|
+
import { LocationService } from '@rytass/wms-module-core';
|
|
5
|
+
import { LocationDto } from '../dto/location.dto.js';
|
|
6
|
+
import { CreateLocationArgs, UpdateLocationArgs } from '../inputs/create-location.args.js';
|
|
7
|
+
|
|
8
|
+
let LocationMutation = class LocationMutation {
|
|
9
|
+
locationService;
|
|
10
|
+
constructor(locationService) {
|
|
11
|
+
this.locationService = locationService;
|
|
12
|
+
}
|
|
13
|
+
async createLocation(args) {
|
|
14
|
+
return this.locationService.createLocation(args);
|
|
15
|
+
}
|
|
16
|
+
async updateLocation(args) {
|
|
17
|
+
return this.locationService.updateLocation(args);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
__decorate([
|
|
21
|
+
Mutation(() => LocationDto),
|
|
22
|
+
__param(0, Args()),
|
|
23
|
+
__metadata("design:type", Function),
|
|
24
|
+
__metadata("design:paramtypes", [CreateLocationArgs]),
|
|
25
|
+
__metadata("design:returntype", Promise)
|
|
26
|
+
], LocationMutation.prototype, "createLocation", null);
|
|
27
|
+
__decorate([
|
|
28
|
+
Mutation(() => LocationDto),
|
|
29
|
+
__param(0, Args()),
|
|
30
|
+
__metadata("design:type", Function),
|
|
31
|
+
__metadata("design:paramtypes", [UpdateLocationArgs]),
|
|
32
|
+
__metadata("design:returntype", Promise)
|
|
33
|
+
], LocationMutation.prototype, "updateLocation", null);
|
|
34
|
+
LocationMutation = __decorate([
|
|
35
|
+
Injectable(),
|
|
36
|
+
__metadata("design:paramtypes", [LocationService])
|
|
37
|
+
], LocationMutation);
|
|
38
|
+
|
|
39
|
+
export { LocationMutation };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MaterialDto } from '../dto';
|
|
2
|
+
import { CreateMaterialArgs, UpdateMaterialArgs } from '../inputs/create-material.args';
|
|
3
|
+
import { MaterialService } from '@rytass/wms-module-core';
|
|
4
|
+
export declare class MaterialMutation {
|
|
5
|
+
private readonly materialService;
|
|
6
|
+
constructor(materialService: MaterialService);
|
|
7
|
+
createMaterial(args: CreateMaterialArgs): Promise<MaterialDto>;
|
|
8
|
+
updateMaterial(args: UpdateMaterialArgs): Promise<MaterialDto>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
+
import { Injectable } from '@nestjs/common';
|
|
3
|
+
import { Mutation, Args } from '@nestjs/graphql';
|
|
4
|
+
import '../dto/loader-type.dto.js';
|
|
5
|
+
import '../dto/loader.dto.js';
|
|
6
|
+
import { MaterialDto } from '../dto/material.dto.js';
|
|
7
|
+
import '../dto/material-unit.dto.js';
|
|
8
|
+
import '../dto/stock.dto.js';
|
|
9
|
+
import '../dto/sale-order.dto.js';
|
|
10
|
+
import '../dto/receive-inventory-order.dto.js';
|
|
11
|
+
import '../dto/receive-inventory-order-item.dto.js';
|
|
12
|
+
import '../dto/ship-inventory-order.dto.js';
|
|
13
|
+
import '../dto/ship-inventory-order-item.dto.js';
|
|
14
|
+
import '../dto/hold-inventory-order.dto.js';
|
|
15
|
+
import '../dto/hold-inventory-order-item.dto.js';
|
|
16
|
+
import '../dto/allocate-inventory-order.dto.js';
|
|
17
|
+
import '../dto/allocate-inventory-order-item.dto.js';
|
|
18
|
+
import '../dto/transfer-order.dto.js';
|
|
19
|
+
import '../dto/transfer-order-item.dto.js';
|
|
20
|
+
import '../dto/transfer-customer-order.dto.js';
|
|
21
|
+
import '../dto/transfer-customer-order-item.dto.js';
|
|
22
|
+
import '../dto/transfer-vendor-order.dto.js';
|
|
23
|
+
import '../dto/transfer-vendor-order-item.dto.js';
|
|
24
|
+
import '../dto/scrape-order.dto.js';
|
|
25
|
+
import '../dto/scrape-order-item.dto.js';
|
|
26
|
+
import '../dto/quality-inspection-order.dto.js';
|
|
27
|
+
import '../dto/quality-inspection-order-item.dto.js';
|
|
28
|
+
import { CreateMaterialArgs, UpdateMaterialArgs } from '../inputs/create-material.args.js';
|
|
29
|
+
import { MaterialService } from '@rytass/wms-module-core';
|
|
30
|
+
|
|
31
|
+
let MaterialMutation = class MaterialMutation {
|
|
32
|
+
materialService;
|
|
33
|
+
constructor(materialService) {
|
|
34
|
+
this.materialService = materialService;
|
|
35
|
+
}
|
|
36
|
+
async createMaterial(args) {
|
|
37
|
+
return this.materialService.createMaterial(args);
|
|
38
|
+
}
|
|
39
|
+
async updateMaterial(args) {
|
|
40
|
+
return this.materialService.updateMaterial(args);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
__decorate([
|
|
44
|
+
Mutation(() => MaterialDto),
|
|
45
|
+
__param(0, Args()),
|
|
46
|
+
__metadata("design:type", Function),
|
|
47
|
+
__metadata("design:paramtypes", [CreateMaterialArgs]),
|
|
48
|
+
__metadata("design:returntype", Promise)
|
|
49
|
+
], MaterialMutation.prototype, "createMaterial", null);
|
|
50
|
+
__decorate([
|
|
51
|
+
Mutation(() => MaterialDto),
|
|
52
|
+
__param(0, Args()),
|
|
53
|
+
__metadata("design:type", Function),
|
|
54
|
+
__metadata("design:paramtypes", [UpdateMaterialArgs]),
|
|
55
|
+
__metadata("design:returntype", Promise)
|
|
56
|
+
], MaterialMutation.prototype, "updateMaterial", null);
|
|
57
|
+
MaterialMutation = __decorate([
|
|
58
|
+
Injectable(),
|
|
59
|
+
__metadata("design:paramtypes", [MaterialService])
|
|
60
|
+
], MaterialMutation);
|
|
61
|
+
|
|
62
|
+
export { MaterialMutation };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MergeBatchOrderService, StockService } from '@rytass/wms-module-core';
|
|
2
|
+
import { MergeBatchArgs } from '../inputs/merge-batch.args';
|
|
3
|
+
import { MergeBatchOrderDto } from '../dto/merge-batch-order.dto';
|
|
4
|
+
export declare class MergeBatchMutation {
|
|
5
|
+
private readonly stockService;
|
|
6
|
+
private readonly mergeBatchOrderService;
|
|
7
|
+
constructor(stockService: StockService, mergeBatchOrderService: MergeBatchOrderService);
|
|
8
|
+
mergeBatch(args: MergeBatchArgs): Promise<MergeBatchOrderDto>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
+
import { Injectable } from '@nestjs/common';
|
|
3
|
+
import { Mutation, Args, Resolver } from '@nestjs/graphql';
|
|
4
|
+
import { StockService, MergeBatchOrderService } from '@rytass/wms-module-core';
|
|
5
|
+
import { MergeBatchArgs } from '../inputs/merge-batch.args.js';
|
|
6
|
+
import { MergeBatchOrderDto } from '../dto/merge-batch-order.dto.js';
|
|
7
|
+
|
|
8
|
+
let MergeBatchMutation = class MergeBatchMutation {
|
|
9
|
+
stockService;
|
|
10
|
+
mergeBatchOrderService;
|
|
11
|
+
constructor(stockService, mergeBatchOrderService) {
|
|
12
|
+
this.stockService = stockService;
|
|
13
|
+
this.mergeBatchOrderService = mergeBatchOrderService;
|
|
14
|
+
}
|
|
15
|
+
async mergeBatch(args) {
|
|
16
|
+
return this.mergeBatchOrderService.merge({
|
|
17
|
+
...args,
|
|
18
|
+
items: args.items.map((item) => {
|
|
19
|
+
const { batchId, locationId, loaderId } = this.stockService.destructAggregateKey(item.aggregatedKey);
|
|
20
|
+
return {
|
|
21
|
+
...item,
|
|
22
|
+
batchId,
|
|
23
|
+
locationId,
|
|
24
|
+
loaderId,
|
|
25
|
+
};
|
|
26
|
+
}),
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
__decorate([
|
|
31
|
+
Mutation(() => MergeBatchOrderDto),
|
|
32
|
+
__param(0, Args()),
|
|
33
|
+
__metadata("design:type", Function),
|
|
34
|
+
__metadata("design:paramtypes", [MergeBatchArgs]),
|
|
35
|
+
__metadata("design:returntype", Promise)
|
|
36
|
+
], MergeBatchMutation.prototype, "mergeBatch", null);
|
|
37
|
+
MergeBatchMutation = __decorate([
|
|
38
|
+
Injectable(),
|
|
39
|
+
Resolver(),
|
|
40
|
+
__metadata("design:paramtypes", [StockService,
|
|
41
|
+
MergeBatchOrderService])
|
|
42
|
+
], MergeBatchMutation);
|
|
43
|
+
|
|
44
|
+
export { MergeBatchMutation };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { QualityInspectionOrderService, StockService } from '@rytass/wms-module-core';
|
|
2
|
+
import { QualityInspectionOrderDto } from '../dto/quality-inspection-order.dto';
|
|
3
|
+
import { CreateQualityInspectionOrderArgs } from '../inputs/create-quality-inspection-order.args';
|
|
4
|
+
export declare class QualityInspectionOrderMutation {
|
|
5
|
+
private readonly qualityInspectionOrderService;
|
|
6
|
+
private readonly stockService;
|
|
7
|
+
constructor(qualityInspectionOrderService: QualityInspectionOrderService, stockService: StockService);
|
|
8
|
+
inspectMaterials(args: CreateQualityInspectionOrderArgs): Promise<QualityInspectionOrderDto>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
+
import { Injectable } from '@nestjs/common';
|
|
3
|
+
import { Mutation, Args } from '@nestjs/graphql';
|
|
4
|
+
import { QualityInspectionOrderService, StockService } from '@rytass/wms-module-core';
|
|
5
|
+
import { QualityInspectionOrderDto } from '../dto/quality-inspection-order.dto.js';
|
|
6
|
+
import { CreateQualityInspectionOrderArgs } from '../inputs/create-quality-inspection-order.args.js';
|
|
7
|
+
|
|
8
|
+
let QualityInspectionOrderMutation = class QualityInspectionOrderMutation {
|
|
9
|
+
qualityInspectionOrderService;
|
|
10
|
+
stockService;
|
|
11
|
+
constructor(qualityInspectionOrderService, stockService) {
|
|
12
|
+
this.qualityInspectionOrderService = qualityInspectionOrderService;
|
|
13
|
+
this.stockService = stockService;
|
|
14
|
+
}
|
|
15
|
+
async inspectMaterials(args) {
|
|
16
|
+
return this.qualityInspectionOrderService.inspect({
|
|
17
|
+
options: {
|
|
18
|
+
key: args.key,
|
|
19
|
+
note: args.note,
|
|
20
|
+
items: args.items.map(({ aggregateKey, ...item }) => {
|
|
21
|
+
const keys = this.stockService.destructAggregateKey(aggregateKey);
|
|
22
|
+
return {
|
|
23
|
+
...item,
|
|
24
|
+
...keys,
|
|
25
|
+
};
|
|
26
|
+
}),
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
__decorate([
|
|
32
|
+
Mutation(() => QualityInspectionOrderDto),
|
|
33
|
+
__param(0, Args()),
|
|
34
|
+
__metadata("design:type", Function),
|
|
35
|
+
__metadata("design:paramtypes", [CreateQualityInspectionOrderArgs]),
|
|
36
|
+
__metadata("design:returntype", Promise)
|
|
37
|
+
], QualityInspectionOrderMutation.prototype, "inspectMaterials", null);
|
|
38
|
+
QualityInspectionOrderMutation = __decorate([
|
|
39
|
+
Injectable(),
|
|
40
|
+
__metadata("design:paramtypes", [QualityInspectionOrderService,
|
|
41
|
+
StockService])
|
|
42
|
+
], QualityInspectionOrderMutation);
|
|
43
|
+
|
|
44
|
+
export { QualityInspectionOrderMutation };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReceiveInventoryOrderService } from '@rytass/wms-module-core';
|
|
2
|
+
import { ReceiveInventoryOrderDto } from '../dto';
|
|
3
|
+
import { CreateReceiveInventoryOrderArgs, UpdateReceiveInventoryOrderArgs } from '../inputs/create-receive-inventory-order.args';
|
|
4
|
+
import { DataSource } from 'typeorm';
|
|
5
|
+
import { ReceiveOrderArgs } from '../inputs/receive-order.args';
|
|
6
|
+
export declare class ReceiveInventoryOrderMutation {
|
|
7
|
+
private readonly dataSource;
|
|
8
|
+
private readonly receiveInventoryOrderService;
|
|
9
|
+
constructor(dataSource: DataSource, receiveInventoryOrderService: ReceiveInventoryOrderService);
|
|
10
|
+
createReceiveInventoryOrder(args: CreateReceiveInventoryOrderArgs): Promise<ReceiveInventoryOrderDto>;
|
|
11
|
+
updateReceiveInventoryOrder(args: UpdateReceiveInventoryOrderArgs): Promise<ReceiveInventoryOrderDto>;
|
|
12
|
+
receive(items: ReceiveOrderArgs[]): Promise<boolean>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
+
import { Injectable } from '@nestjs/common';
|
|
3
|
+
import { Mutation, Args } from '@nestjs/graphql';
|
|
4
|
+
import { ReceiveInventoryOrderService } from '@rytass/wms-module-core';
|
|
5
|
+
import '../dto/loader-type.dto.js';
|
|
6
|
+
import '../dto/loader.dto.js';
|
|
7
|
+
import '../dto/material.dto.js';
|
|
8
|
+
import '../dto/material-unit.dto.js';
|
|
9
|
+
import '../dto/stock.dto.js';
|
|
10
|
+
import '../dto/sale-order.dto.js';
|
|
11
|
+
import { ReceiveInventoryOrderDto } from '../dto/receive-inventory-order.dto.js';
|
|
12
|
+
import '../dto/receive-inventory-order-item.dto.js';
|
|
13
|
+
import '../dto/ship-inventory-order.dto.js';
|
|
14
|
+
import '../dto/ship-inventory-order-item.dto.js';
|
|
15
|
+
import '../dto/hold-inventory-order.dto.js';
|
|
16
|
+
import '../dto/hold-inventory-order-item.dto.js';
|
|
17
|
+
import '../dto/allocate-inventory-order.dto.js';
|
|
18
|
+
import '../dto/allocate-inventory-order-item.dto.js';
|
|
19
|
+
import '../dto/transfer-order.dto.js';
|
|
20
|
+
import '../dto/transfer-order-item.dto.js';
|
|
21
|
+
import '../dto/transfer-customer-order.dto.js';
|
|
22
|
+
import '../dto/transfer-customer-order-item.dto.js';
|
|
23
|
+
import '../dto/transfer-vendor-order.dto.js';
|
|
24
|
+
import '../dto/transfer-vendor-order-item.dto.js';
|
|
25
|
+
import '../dto/scrape-order.dto.js';
|
|
26
|
+
import '../dto/scrape-order-item.dto.js';
|
|
27
|
+
import '../dto/quality-inspection-order.dto.js';
|
|
28
|
+
import '../dto/quality-inspection-order-item.dto.js';
|
|
29
|
+
import { CreateReceiveInventoryOrderArgs, UpdateReceiveInventoryOrderArgs } from '../inputs/create-receive-inventory-order.args.js';
|
|
30
|
+
import { DataSource } from 'typeorm';
|
|
31
|
+
import { ReceiveOrderArgs } from '../inputs/receive-order.args.js';
|
|
32
|
+
|
|
33
|
+
let ReceiveInventoryOrderMutation = class ReceiveInventoryOrderMutation {
|
|
34
|
+
dataSource;
|
|
35
|
+
receiveInventoryOrderService;
|
|
36
|
+
constructor(dataSource, receiveInventoryOrderService) {
|
|
37
|
+
this.dataSource = dataSource;
|
|
38
|
+
this.receiveInventoryOrderService = receiveInventoryOrderService;
|
|
39
|
+
}
|
|
40
|
+
async createReceiveInventoryOrder(args) {
|
|
41
|
+
const { id } = await this.dataSource.transaction(async (manager) => this.receiveInventoryOrderService.createReceiveInventoryOrder({
|
|
42
|
+
...args,
|
|
43
|
+
manager,
|
|
44
|
+
}));
|
|
45
|
+
return this.receiveInventoryOrderService
|
|
46
|
+
.selectQueryBuilder('orders')
|
|
47
|
+
.where('orders.id = :id', { id })
|
|
48
|
+
.getRawOne();
|
|
49
|
+
}
|
|
50
|
+
async updateReceiveInventoryOrder(args) {
|
|
51
|
+
const { id } = await this.dataSource.transaction(async (manager) => this.receiveInventoryOrderService.updateReceiveInventoryOrder({
|
|
52
|
+
...args,
|
|
53
|
+
manager,
|
|
54
|
+
}));
|
|
55
|
+
return this.receiveInventoryOrderService
|
|
56
|
+
.selectQueryBuilder('orders')
|
|
57
|
+
.where('orders.id = :id', { id })
|
|
58
|
+
.getRawOne();
|
|
59
|
+
}
|
|
60
|
+
async receive(items) {
|
|
61
|
+
await this.receiveInventoryOrderService.receive(items);
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
__decorate([
|
|
66
|
+
Mutation(() => ReceiveInventoryOrderDto),
|
|
67
|
+
__param(0, Args()),
|
|
68
|
+
__metadata("design:type", Function),
|
|
69
|
+
__metadata("design:paramtypes", [CreateReceiveInventoryOrderArgs]),
|
|
70
|
+
__metadata("design:returntype", Promise)
|
|
71
|
+
], ReceiveInventoryOrderMutation.prototype, "createReceiveInventoryOrder", null);
|
|
72
|
+
__decorate([
|
|
73
|
+
Mutation(() => ReceiveInventoryOrderDto),
|
|
74
|
+
__param(0, Args()),
|
|
75
|
+
__metadata("design:type", Function),
|
|
76
|
+
__metadata("design:paramtypes", [UpdateReceiveInventoryOrderArgs]),
|
|
77
|
+
__metadata("design:returntype", Promise)
|
|
78
|
+
], ReceiveInventoryOrderMutation.prototype, "updateReceiveInventoryOrder", null);
|
|
79
|
+
__decorate([
|
|
80
|
+
Mutation(() => Boolean),
|
|
81
|
+
__param(0, Args('items', { type: () => [ReceiveOrderArgs] })),
|
|
82
|
+
__metadata("design:type", Function),
|
|
83
|
+
__metadata("design:paramtypes", [Array]),
|
|
84
|
+
__metadata("design:returntype", Promise)
|
|
85
|
+
], ReceiveInventoryOrderMutation.prototype, "receive", null);
|
|
86
|
+
ReceiveInventoryOrderMutation = __decorate([
|
|
87
|
+
Injectable(),
|
|
88
|
+
__metadata("design:paramtypes", [DataSource,
|
|
89
|
+
ReceiveInventoryOrderService])
|
|
90
|
+
], ReceiveInventoryOrderMutation);
|
|
91
|
+
|
|
92
|
+
export { ReceiveInventoryOrderMutation };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReclassifyInventoryOrderService, StockService } from '@rytass/wms-module-core';
|
|
2
|
+
import { ReclassifyInventoryOrderArgs } from '../inputs/reclassify-inventory-order.args';
|
|
3
|
+
import { ReclassifyInventoryOrderDto } from '../dto/reclassify-inventory-order.dto';
|
|
4
|
+
export declare class ReclassifyInventoryOrderMutation {
|
|
5
|
+
private readonly stockService;
|
|
6
|
+
private readonly reclassifyInventoryOrderService;
|
|
7
|
+
constructor(stockService: StockService, reclassifyInventoryOrderService: ReclassifyInventoryOrderService);
|
|
8
|
+
reclassifyInventoryOrder(args: ReclassifyInventoryOrderArgs): Promise<ReclassifyInventoryOrderDto>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
+
import { Injectable } from '@nestjs/common';
|
|
3
|
+
import { Mutation, Args, Resolver } from '@nestjs/graphql';
|
|
4
|
+
import { StockService, ReclassifyInventoryOrderService } from '@rytass/wms-module-core';
|
|
5
|
+
import { ReclassifyInventoryOrderArgs } from '../inputs/reclassify-inventory-order.args.js';
|
|
6
|
+
import { ReclassifyInventoryOrderDto } from '../dto/reclassify-inventory-order.dto.js';
|
|
7
|
+
|
|
8
|
+
let ReclassifyInventoryOrderMutation = class ReclassifyInventoryOrderMutation {
|
|
9
|
+
stockService;
|
|
10
|
+
reclassifyInventoryOrderService;
|
|
11
|
+
constructor(stockService, reclassifyInventoryOrderService) {
|
|
12
|
+
this.stockService = stockService;
|
|
13
|
+
this.reclassifyInventoryOrderService = reclassifyInventoryOrderService;
|
|
14
|
+
}
|
|
15
|
+
async reclassifyInventoryOrder(args) {
|
|
16
|
+
return this.reclassifyInventoryOrderService.reclassify({
|
|
17
|
+
materialKey: args.materialKey,
|
|
18
|
+
items: args.items.map((item) => {
|
|
19
|
+
const { materialId, batchId, locationId, loaderId } = this.stockService.destructAggregateKey(item.aggregatedKey);
|
|
20
|
+
return {
|
|
21
|
+
...item,
|
|
22
|
+
materialId,
|
|
23
|
+
batchId,
|
|
24
|
+
locationId,
|
|
25
|
+
loaderId,
|
|
26
|
+
};
|
|
27
|
+
}),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
__decorate([
|
|
32
|
+
Mutation(() => ReclassifyInventoryOrderDto),
|
|
33
|
+
__param(0, Args()),
|
|
34
|
+
__metadata("design:type", Function),
|
|
35
|
+
__metadata("design:paramtypes", [ReclassifyInventoryOrderArgs]),
|
|
36
|
+
__metadata("design:returntype", Promise)
|
|
37
|
+
], ReclassifyInventoryOrderMutation.prototype, "reclassifyInventoryOrder", null);
|
|
38
|
+
ReclassifyInventoryOrderMutation = __decorate([
|
|
39
|
+
Injectable(),
|
|
40
|
+
Resolver(),
|
|
41
|
+
__metadata("design:paramtypes", [StockService,
|
|
42
|
+
ReclassifyInventoryOrderService])
|
|
43
|
+
], ReclassifyInventoryOrderMutation);
|
|
44
|
+
|
|
45
|
+
export { ReclassifyInventoryOrderMutation };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ScrapeService, StockService } from '@rytass/wms-module-core';
|
|
2
|
+
import { ScrapeOrderDto } from '../dto/scrape-order.dto';
|
|
3
|
+
import { ScrapeOrderArgs } from '../inputs/scrape-order.args';
|
|
4
|
+
export declare class ScrapeMutation {
|
|
5
|
+
private readonly scrapeService;
|
|
6
|
+
private readonly stockService;
|
|
7
|
+
constructor(scrapeService: ScrapeService, stockService: StockService);
|
|
8
|
+
scrapeMaterials(args: ScrapeOrderArgs): Promise<ScrapeOrderDto>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
+
import { Injectable } from '@nestjs/common';
|
|
3
|
+
import { Mutation, Args } from '@nestjs/graphql';
|
|
4
|
+
import { ScrapeService, StockService } from '@rytass/wms-module-core';
|
|
5
|
+
import { ScrapeOrderDto } from '../dto/scrape-order.dto.js';
|
|
6
|
+
import { ScrapeOrderArgs } from '../inputs/scrape-order.args.js';
|
|
7
|
+
|
|
8
|
+
let ScrapeMutation = class ScrapeMutation {
|
|
9
|
+
scrapeService;
|
|
10
|
+
stockService;
|
|
11
|
+
constructor(scrapeService, stockService) {
|
|
12
|
+
this.scrapeService = scrapeService;
|
|
13
|
+
this.stockService = stockService;
|
|
14
|
+
}
|
|
15
|
+
async scrapeMaterials(args) {
|
|
16
|
+
return this.scrapeService.scrape(args.items.map(({ aggregateKey, ...item }) => {
|
|
17
|
+
const keys = this.stockService.destructAggregateKey(aggregateKey);
|
|
18
|
+
return {
|
|
19
|
+
...item,
|
|
20
|
+
...keys,
|
|
21
|
+
};
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
__decorate([
|
|
26
|
+
Mutation(() => ScrapeOrderDto),
|
|
27
|
+
__param(0, Args()),
|
|
28
|
+
__metadata("design:type", Function),
|
|
29
|
+
__metadata("design:paramtypes", [ScrapeOrderArgs]),
|
|
30
|
+
__metadata("design:returntype", Promise)
|
|
31
|
+
], ScrapeMutation.prototype, "scrapeMaterials", null);
|
|
32
|
+
ScrapeMutation = __decorate([
|
|
33
|
+
Injectable(),
|
|
34
|
+
__metadata("design:paramtypes", [ScrapeService,
|
|
35
|
+
StockService])
|
|
36
|
+
], ScrapeMutation);
|
|
37
|
+
|
|
38
|
+
export { ScrapeMutation };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ShipInventoryOrderService, StockService } from '@rytass/wms-module-core';
|
|
2
|
+
import { ShipInventoryOrderDto } from '../dto';
|
|
3
|
+
import { CreateShipInventoryOrderArgs, UpdateShipInventoryOrderArgs } from '../inputs/create-ship-inventory-order.args';
|
|
4
|
+
import { ShipOrderArgs } from '../inputs/ship-order.args';
|
|
5
|
+
import { CancelShipOrderArgs } from '../inputs/cancel-ship-order.args';
|
|
6
|
+
export declare class ShipInventoryOrderMutation {
|
|
7
|
+
private readonly shipInventoryOrderService;
|
|
8
|
+
private readonly stockService;
|
|
9
|
+
constructor(shipInventoryOrderService: ShipInventoryOrderService, stockService: StockService);
|
|
10
|
+
createShipInventoryOrder(args: CreateShipInventoryOrderArgs): Promise<ShipInventoryOrderDto>;
|
|
11
|
+
updateShipInventoryOrder(args: UpdateShipInventoryOrderArgs): Promise<ShipInventoryOrderDto>;
|
|
12
|
+
ship(items: ShipOrderArgs[]): Promise<boolean>;
|
|
13
|
+
cancelShip(items: CancelShipOrderArgs[]): Promise<boolean>;
|
|
14
|
+
}
|