@rytass/wms-module-graphql 0.11.1 → 0.12.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/README.md +19 -0
- package/docs/README.md +5 -2
- package/docs/api-reference.md +10 -8
- package/docs/integration-guide.md +34 -17
- package/docs/inventory-count.md +372 -0
- package/index.cjs.js +10 -0
- package/lib/inputs/index.d.ts +0 -0
- package/lib/inputs/inventory-count-order.args.d.ts +6 -0
- package/package.json +8 -29
- package/adapters/event-emitter.d.mts +0 -6
- package/adapters/event-emitter.mjs +0 -41
- package/adapters/member-base.d.mts +0 -6
- package/adapters/member-base.mjs +0 -63
- package/index.d.mts +0 -6
- package/index.mjs +0 -12
- package/lib/auth/host-skip.constant.mjs +0 -29
- package/lib/auth/wms-auth.guard.mjs +0 -41
- package/lib/auth/wms-auth.types.mjs +0 -6
- package/lib/auth/wms-operation.decorator.mjs +0 -29
- package/lib/dto/allocate-inventory-order-item.dto.mjs +0 -36
- package/lib/dto/allocate-inventory-order.dto.mjs +0 -31
- package/lib/dto/batch.dto.mjs +0 -26
- package/lib/dto/consumption-order-item.dto.mjs +0 -43
- package/lib/dto/consumption-order.dto.mjs +0 -52
- package/lib/dto/hold-inventory-order-item.dto.mjs +0 -37
- package/lib/dto/hold-inventory-order.dto.mjs +0 -47
- package/lib/dto/inventory-count-order.dto.mjs +0 -207
- package/lib/dto/loader-type.dto.mjs +0 -46
- package/lib/dto/loader-unit.dto.mjs +0 -21
- package/lib/dto/loader.dto.mjs +0 -71
- package/lib/dto/location.dto.mjs +0 -36
- package/lib/dto/material-unit.dto.mjs +0 -46
- package/lib/dto/material.dto.mjs +0 -36
- package/lib/dto/merge-batch-order.dto.mjs +0 -50
- package/lib/dto/order-reference.dto.mjs +0 -73
- package/lib/dto/pagination.dto.mjs +0 -51
- package/lib/dto/quality-inspection-order-item.dto.mjs +0 -50
- package/lib/dto/quality-inspection-order.dto.mjs +0 -42
- package/lib/dto/receive-inventory-order-item.dto.mjs +0 -60
- package/lib/dto/receive-inventory-order.dto.mjs +0 -58
- package/lib/dto/reclassify-inventory-order.dto.mjs +0 -55
- package/lib/dto/sale-order.dto.mjs +0 -20
- package/lib/dto/scrape-order-item.dto.mjs +0 -56
- package/lib/dto/scrape-order.dto.mjs +0 -37
- package/lib/dto/ship-inventory-order-item.dto.mjs +0 -56
- package/lib/dto/ship-inventory-order-reference.dto.mjs +0 -48
- package/lib/dto/ship-inventory-order.dto.mjs +0 -58
- package/lib/dto/split-batch-order.dto.mjs +0 -50
- package/lib/dto/stock.dto.mjs +0 -166
- package/lib/dto/transfer-customer-order-item.dto.mjs +0 -61
- package/lib/dto/transfer-customer-order.dto.mjs +0 -37
- package/lib/dto/transfer-order-item.dto.mjs +0 -41
- package/lib/dto/transfer-order.dto.mjs +0 -57
- package/lib/dto/transfer-vendor-order-item.dto.mjs +0 -61
- package/lib/dto/transfer-vendor-order.dto.mjs +0 -37
- package/lib/dto/unit.dto.mjs +0 -20
- package/lib/dto/warehouse-map.dto.mjs +0 -165
- package/lib/events/wms-mutation-event.constants.mjs +0 -4
- package/lib/events/wms-mutation-event.decorator.mjs +0 -20
- package/lib/events/wms-mutation.interceptor.mjs +0 -64
- package/lib/graphql.module.mjs +0 -183
- package/lib/helpers/create-wms-loaders.mjs +0 -11
- package/lib/helpers/helper.module.mjs +0 -15
- package/lib/helpers/loader.service.mjs +0 -230
- package/lib/helpers/query-path.mjs +0 -19
- package/lib/inputs/cancel-ship-order.args.mjs +0 -20
- package/lib/inputs/cancel-transfer-order.args.mjs +0 -23
- package/lib/inputs/consumption-order.args.mjs +0 -182
- package/lib/inputs/create-allocate-inventory-order-item.args.mjs +0 -50
- package/lib/inputs/create-allocate-inventory-order.args.mjs +0 -36
- package/lib/inputs/create-hold-inventory-order-item.args.mjs +0 -40
- package/lib/inputs/create-hold-inventory-order.args.mjs +0 -41
- package/lib/inputs/create-loader-type.args.mjs +0 -35
- package/lib/inputs/create-loader.args.mjs +0 -130
- package/lib/inputs/create-location.args.mjs +0 -50
- package/lib/inputs/create-material-unit.args.mjs +0 -25
- package/lib/inputs/create-material.args.mjs +0 -51
- package/lib/inputs/create-quality-inspection-order.args.mjs +0 -50
- package/lib/inputs/create-receive-inventory-order-item.args.mjs +0 -70
- package/lib/inputs/create-receive-inventory-order.args.mjs +0 -51
- package/lib/inputs/create-ship-inventory-order-item.args.mjs +0 -45
- package/lib/inputs/create-ship-inventory-order-reference.args.mjs +0 -65
- package/lib/inputs/create-ship-inventory-order.args.mjs +0 -57
- package/lib/inputs/create-transfer-customer-order-item.args.mjs +0 -40
- package/lib/inputs/create-transfer-customer-order.args.mjs +0 -51
- package/lib/inputs/create-transfer-order-item.args.mjs +0 -40
- package/lib/inputs/create-transfer-order.args.mjs +0 -61
- package/lib/inputs/create-transfer-vendor-order-item.args.mjs +0 -40
- package/lib/inputs/create-transfer-vendor-order.args.mjs +0 -51
- package/lib/inputs/date-range.args.mjs +0 -20
- package/lib/inputs/deallocate-order.args.mjs +0 -25
- package/lib/inputs/find-allocate-inventory-order.args.mjs +0 -42
- package/lib/inputs/find-batch.args.mjs +0 -21
- package/lib/inputs/find-hold-inventory-order.args.mjs +0 -42
- package/lib/inputs/find-loader-type.args.mjs +0 -32
- package/lib/inputs/find-loader.args.mjs +0 -72
- package/lib/inputs/find-location.args.mjs +0 -26
- package/lib/inputs/find-material.args.mjs +0 -21
- package/lib/inputs/find-receive-inventory-order.args.mjs +0 -71
- package/lib/inputs/find-sale-order.args.mjs +0 -16
- package/lib/inputs/find-ship-inventory-order.args.mjs +0 -71
- package/lib/inputs/find-stock.args.mjs +0 -102
- package/lib/inputs/find-transfer-order.args.mjs +0 -82
- package/lib/inputs/inventory-count-order.args.mjs +0 -257
- package/lib/inputs/merge-batch.args.mjs +0 -40
- package/lib/inputs/order-reference.args.mjs +0 -103
- package/lib/inputs/pagination.args.mjs +0 -20
- package/lib/inputs/receive-order.args.mjs +0 -40
- package/lib/inputs/reclassify-inventory-order.args.mjs +0 -40
- package/lib/inputs/release-order.args.mjs +0 -25
- package/lib/inputs/return-transfer-customer-order.args.mjs +0 -35
- package/lib/inputs/return-transfer-vendor-order.args.mjs +0 -35
- package/lib/inputs/scrape-order.args.mjs +0 -35
- package/lib/inputs/ship-order.args.mjs +0 -20
- package/lib/inputs/split-batch.args.mjs +0 -51
- package/lib/inputs/transfer-order.args.mjs +0 -20
- package/lib/inputs/update-warehouse-map.args.mjs +0 -121
- package/lib/mutations/allocate-inventory-order.mutation.mjs +0 -91
- package/lib/mutations/consumption-order.mutation.mjs +0 -90
- package/lib/mutations/hold-inventory-order.mutation.mjs +0 -91
- package/lib/mutations/inventory-count-order.mutation.mjs +0 -138
- package/lib/mutations/loader.mutation.mjs +0 -123
- package/lib/mutations/location.mutation.mjs +0 -47
- package/lib/mutations/material.mutation.mjs +0 -74
- package/lib/mutations/merge-batch.mutation.mjs +0 -50
- package/lib/mutations/order-reference.mutation.mjs +0 -57
- package/lib/mutations/quality-inspection-order.mutation.mjs +0 -50
- package/lib/mutations/receive-inventory-order.mutation.mjs +0 -106
- package/lib/mutations/reclassify-inventory-order.mutation.mjs +0 -51
- package/lib/mutations/scrape-order.mutation.mjs +0 -44
- package/lib/mutations/ship-inventory-order.mutation.mjs +0 -123
- package/lib/mutations/split-batch.mutation.mjs +0 -44
- package/lib/mutations/transfer-customer-order.mutation.mjs +0 -91
- package/lib/mutations/transfer-order.mutation.mjs +0 -96
- package/lib/mutations/transfer-vendor-order.mutation.mjs +0 -91
- package/lib/mutations/warehouse-map.mutation.mjs +0 -60
- package/lib/queries/allocate-inventory-order.query.mjs +0 -33
- package/lib/queries/batch.query.mjs +0 -36
- package/lib/queries/consumption-order.query.mjs +0 -45
- package/lib/queries/hold-inventory-order.query.mjs +0 -33
- package/lib/queries/inventory-count-order.query.mjs +0 -63
- package/lib/queries/loader.query.mjs +0 -167
- package/lib/queries/location.query.mjs +0 -51
- package/lib/queries/material.query.mjs +0 -79
- package/lib/queries/order-reference.query.mjs +0 -34
- package/lib/queries/recieve-inventory-order.query.mjs +0 -77
- package/lib/queries/sale-order.query.mjs +0 -57
- package/lib/queries/ship-inventory-order.query.mjs +0 -77
- package/lib/queries/stock.query.mjs +0 -116
- package/lib/queries/transfer-order.query.mjs +0 -46
- package/lib/queries/unit.query.mjs +0 -30
- package/lib/queries/warehouse-map.query.mjs +0 -32
- package/lib/registry/operation-registry.mjs +0 -136
- package/lib/resolvers/aggregated-stock.resolver.mjs +0 -119
- package/lib/resolvers/allocate-inventory-order.resolver.mjs +0 -27
- package/lib/resolvers/change-log.resolver.mjs +0 -99
- package/lib/resolvers/consumption-order.resolver.mjs +0 -238
- package/lib/resolvers/hold-inventory-order.resolver.mjs +0 -27
- package/lib/resolvers/inventory-count-order.resolver.mjs +0 -148
- package/lib/resolvers/loader-type.resolver.mjs +0 -54
- package/lib/resolvers/loader.resolver.mjs +0 -99
- package/lib/resolvers/location.resolver.mjs +0 -80
- package/lib/resolvers/material.resolver.mjs +0 -87
- package/lib/resolvers/merge-batch.resolver.mjs +0 -26
- package/lib/resolvers/receive-inventory-order.resolver.mjs +0 -156
- package/lib/resolvers/ship-inventory-order.resolver.mjs +0 -301
- package/lib/resolvers/split-batch.resolver.mjs +0 -26
- package/lib/resolvers/stock.resolver.mjs +0 -99
- package/lib/resolvers/transfer-customer-order.resolver.mjs +0 -27
- package/lib/resolvers/transfer-order.resolver.mjs +0 -246
- package/lib/resolvers/transfer-vendor-order.resolver.mjs +0 -27
- package/lib/resolvers/warehouse-map.resolver.mjs +0 -41
- package/lib/scalars/json-object.scalar.mjs +0 -62
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
-
import { Injectable } from '@nestjs/common';
|
|
3
|
-
import { ShipInventoryOrderService, StockService } from '@rytass/wms-module-core';
|
|
4
|
-
import '../dto/loader-type.dto.mjs';
|
|
5
|
-
import '../dto/loader.dto.mjs';
|
|
6
|
-
import '../dto/material.dto.mjs';
|
|
7
|
-
import '../dto/material-unit.dto.mjs';
|
|
8
|
-
import '../dto/stock.dto.mjs';
|
|
9
|
-
import '../dto/sale-order.dto.mjs';
|
|
10
|
-
import '../dto/receive-inventory-order.dto.mjs';
|
|
11
|
-
import '../dto/receive-inventory-order-item.dto.mjs';
|
|
12
|
-
import { ShipInventoryOrderDto } from '../dto/ship-inventory-order.dto.mjs';
|
|
13
|
-
import '../dto/ship-inventory-order-item.dto.mjs';
|
|
14
|
-
import '../dto/hold-inventory-order.dto.mjs';
|
|
15
|
-
import '../dto/hold-inventory-order-item.dto.mjs';
|
|
16
|
-
import '../dto/allocate-inventory-order.dto.mjs';
|
|
17
|
-
import '../dto/allocate-inventory-order-item.dto.mjs';
|
|
18
|
-
import '../dto/transfer-order.dto.mjs';
|
|
19
|
-
import '../dto/transfer-order-item.dto.mjs';
|
|
20
|
-
import '../dto/transfer-customer-order.dto.mjs';
|
|
21
|
-
import '../dto/transfer-customer-order-item.dto.mjs';
|
|
22
|
-
import '../dto/transfer-vendor-order.dto.mjs';
|
|
23
|
-
import '../dto/transfer-vendor-order-item.dto.mjs';
|
|
24
|
-
import '../dto/scrape-order.dto.mjs';
|
|
25
|
-
import '../dto/scrape-order-item.dto.mjs';
|
|
26
|
-
import '../dto/quality-inspection-order.dto.mjs';
|
|
27
|
-
import '../dto/quality-inspection-order-item.dto.mjs';
|
|
28
|
-
import '../dto/inventory-count-order.dto.mjs';
|
|
29
|
-
import '../dto/consumption-order.dto.mjs';
|
|
30
|
-
import '../dto/consumption-order-item.dto.mjs';
|
|
31
|
-
import '../dto/order-reference.dto.mjs';
|
|
32
|
-
import { Mutation, Args } from '@nestjs/graphql';
|
|
33
|
-
import { CreateShipInventoryOrderArgs, UpdateShipInventoryOrderArgs } from '../inputs/create-ship-inventory-order.args.mjs';
|
|
34
|
-
import { ShipOrderArgs } from '../inputs/ship-order.args.mjs';
|
|
35
|
-
import { CancelShipOrderArgs } from '../inputs/cancel-ship-order.args.mjs';
|
|
36
|
-
import '../auth/wms-auth.guard.mjs';
|
|
37
|
-
import { WmsOperation } from '../auth/wms-operation.decorator.mjs';
|
|
38
|
-
import { WmsMutationEvent } from '../events/wms-mutation-event.decorator.mjs';
|
|
39
|
-
import '../events/wms-mutation.interceptor.mjs';
|
|
40
|
-
|
|
41
|
-
let ShipInventoryOrderMutation = class ShipInventoryOrderMutation {
|
|
42
|
-
shipInventoryOrderService;
|
|
43
|
-
stockService;
|
|
44
|
-
constructor(shipInventoryOrderService, stockService) {
|
|
45
|
-
this.shipInventoryOrderService = shipInventoryOrderService;
|
|
46
|
-
this.stockService = stockService;
|
|
47
|
-
}
|
|
48
|
-
async createShipInventoryOrder(args) {
|
|
49
|
-
const { id } = await this.shipInventoryOrderService.createShipInventoryOrder(args);
|
|
50
|
-
return this.shipInventoryOrderService
|
|
51
|
-
.selectQueryBuilder('orders')
|
|
52
|
-
.where('orders.id = :id', { id })
|
|
53
|
-
.getRawOne();
|
|
54
|
-
}
|
|
55
|
-
async updateShipInventoryOrder(args) {
|
|
56
|
-
const { id } = await this.shipInventoryOrderService.updateShipInventoryOrder({
|
|
57
|
-
...args,
|
|
58
|
-
items: args?.items?.map(({ aggregatedKey, ...item }) => {
|
|
59
|
-
const keys = aggregatedKey
|
|
60
|
-
? this.stockService.destructAggregateKey(aggregatedKey)
|
|
61
|
-
: {};
|
|
62
|
-
return {
|
|
63
|
-
...item,
|
|
64
|
-
...keys,
|
|
65
|
-
};
|
|
66
|
-
}),
|
|
67
|
-
});
|
|
68
|
-
return this.shipInventoryOrderService
|
|
69
|
-
.selectQueryBuilder('orders')
|
|
70
|
-
.where('orders.id = :id', { id })
|
|
71
|
-
.getRawOne();
|
|
72
|
-
}
|
|
73
|
-
async ship(items) {
|
|
74
|
-
await this.shipInventoryOrderService.ship(items);
|
|
75
|
-
return true;
|
|
76
|
-
}
|
|
77
|
-
async cancelShip(items) {
|
|
78
|
-
return this.shipInventoryOrderService.cancelShip(items);
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
__decorate([
|
|
82
|
-
Mutation(() => ShipInventoryOrderDto),
|
|
83
|
-
WmsOperation({ resource: 'ship-inventory-order', action: 'create' }),
|
|
84
|
-
WmsMutationEvent({ event: 'ship-inventory-order.created' }),
|
|
85
|
-
__param(0, Args()),
|
|
86
|
-
__metadata("design:type", Function),
|
|
87
|
-
__metadata("design:paramtypes", [CreateShipInventoryOrderArgs]),
|
|
88
|
-
__metadata("design:returntype", Promise)
|
|
89
|
-
], ShipInventoryOrderMutation.prototype, "createShipInventoryOrder", null);
|
|
90
|
-
__decorate([
|
|
91
|
-
Mutation(() => ShipInventoryOrderDto),
|
|
92
|
-
WmsOperation({ resource: 'ship-inventory-order', action: 'update' }),
|
|
93
|
-
WmsMutationEvent({ event: 'ship-inventory-order.updated' }),
|
|
94
|
-
__param(0, Args()),
|
|
95
|
-
__metadata("design:type", Function),
|
|
96
|
-
__metadata("design:paramtypes", [UpdateShipInventoryOrderArgs]),
|
|
97
|
-
__metadata("design:returntype", Promise)
|
|
98
|
-
], ShipInventoryOrderMutation.prototype, "updateShipInventoryOrder", null);
|
|
99
|
-
__decorate([
|
|
100
|
-
Mutation(() => Boolean),
|
|
101
|
-
WmsOperation({ resource: 'ship-inventory-order', action: 'ship' }),
|
|
102
|
-
WmsMutationEvent({ event: 'ship-inventory-order.shipped' }),
|
|
103
|
-
__param(0, Args('items', { type: () => [ShipOrderArgs] })),
|
|
104
|
-
__metadata("design:type", Function),
|
|
105
|
-
__metadata("design:paramtypes", [Array]),
|
|
106
|
-
__metadata("design:returntype", Promise)
|
|
107
|
-
], ShipInventoryOrderMutation.prototype, "ship", null);
|
|
108
|
-
__decorate([
|
|
109
|
-
Mutation(() => Boolean),
|
|
110
|
-
WmsOperation({ resource: 'ship-inventory-order', action: 'cancel' }),
|
|
111
|
-
WmsMutationEvent({ event: 'ship-inventory-order.ship-cancelled' }),
|
|
112
|
-
__param(0, Args('items', { type: () => [CancelShipOrderArgs] })),
|
|
113
|
-
__metadata("design:type", Function),
|
|
114
|
-
__metadata("design:paramtypes", [Array]),
|
|
115
|
-
__metadata("design:returntype", Promise)
|
|
116
|
-
], ShipInventoryOrderMutation.prototype, "cancelShip", null);
|
|
117
|
-
ShipInventoryOrderMutation = __decorate([
|
|
118
|
-
Injectable(),
|
|
119
|
-
__metadata("design:paramtypes", [ShipInventoryOrderService,
|
|
120
|
-
StockService])
|
|
121
|
-
], ShipInventoryOrderMutation);
|
|
122
|
-
|
|
123
|
-
export { ShipInventoryOrderMutation };
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
-
import { Injectable } from '@nestjs/common';
|
|
3
|
-
import { Mutation, Args, Resolver } from '@nestjs/graphql';
|
|
4
|
-
import { StockService, SplitBatchOrderService } from '@rytass/wms-module-core';
|
|
5
|
-
import { SplitBatchArgs } from '../inputs/split-batch.args.mjs';
|
|
6
|
-
import { SplitBatchOrderDto } from '../dto/split-batch-order.dto.mjs';
|
|
7
|
-
import '../auth/wms-auth.guard.mjs';
|
|
8
|
-
import { WmsOperation } from '../auth/wms-operation.decorator.mjs';
|
|
9
|
-
import { WmsMutationEvent } from '../events/wms-mutation-event.decorator.mjs';
|
|
10
|
-
import '../events/wms-mutation.interceptor.mjs';
|
|
11
|
-
|
|
12
|
-
let SplitBatchMutation = class SplitBatchMutation {
|
|
13
|
-
stockService;
|
|
14
|
-
splitBatchOrderService;
|
|
15
|
-
constructor(stockService, splitBatchOrderService) {
|
|
16
|
-
this.stockService = stockService;
|
|
17
|
-
this.splitBatchOrderService = splitBatchOrderService;
|
|
18
|
-
}
|
|
19
|
-
async splitBatch(args) {
|
|
20
|
-
const { batchId, locationId, loaderId } = this.stockService.destructAggregateKey(args.aggregatedKey);
|
|
21
|
-
return this.splitBatchOrderService.split({
|
|
22
|
-
batchId,
|
|
23
|
-
unitId: args.unitId,
|
|
24
|
-
items: args.items.map((item) => ({ ...item, locationId, loaderId })),
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
__decorate([
|
|
29
|
-
Mutation(() => SplitBatchOrderDto),
|
|
30
|
-
WmsOperation({ resource: 'batch', action: 'split' }),
|
|
31
|
-
WmsMutationEvent({ event: 'batch.splitted' }),
|
|
32
|
-
__param(0, Args()),
|
|
33
|
-
__metadata("design:type", Function),
|
|
34
|
-
__metadata("design:paramtypes", [SplitBatchArgs]),
|
|
35
|
-
__metadata("design:returntype", Promise)
|
|
36
|
-
], SplitBatchMutation.prototype, "splitBatch", null);
|
|
37
|
-
SplitBatchMutation = __decorate([
|
|
38
|
-
Injectable(),
|
|
39
|
-
Resolver(),
|
|
40
|
-
__metadata("design:paramtypes", [StockService,
|
|
41
|
-
SplitBatchOrderService])
|
|
42
|
-
], SplitBatchMutation);
|
|
43
|
-
|
|
44
|
-
export { SplitBatchMutation };
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
-
import { Injectable } from '@nestjs/common';
|
|
3
|
-
import { Mutation, Args } from '@nestjs/graphql';
|
|
4
|
-
import { TransferCustomerOrderService, StockService } from '@rytass/wms-module-core';
|
|
5
|
-
import { TransferCustomerOrderDto } from '../dto/transfer-customer-order.dto.mjs';
|
|
6
|
-
import { CreateTransferCustomerOrderArgs, UpdateTransferCustomerOrderArgs } from '../inputs/create-transfer-customer-order.args.mjs';
|
|
7
|
-
import { ReturnTransferCustomerOrderArgs } from '../inputs/return-transfer-customer-order.args.mjs';
|
|
8
|
-
import '../auth/wms-auth.guard.mjs';
|
|
9
|
-
import { WmsOperation } from '../auth/wms-operation.decorator.mjs';
|
|
10
|
-
import { WmsMutationEvent } from '../events/wms-mutation-event.decorator.mjs';
|
|
11
|
-
import '../events/wms-mutation.interceptor.mjs';
|
|
12
|
-
|
|
13
|
-
let TransferCustomerOrderMutation = class TransferCustomerOrderMutation {
|
|
14
|
-
transferCustomerOrderService;
|
|
15
|
-
stockService;
|
|
16
|
-
constructor(transferCustomerOrderService, stockService) {
|
|
17
|
-
this.transferCustomerOrderService = transferCustomerOrderService;
|
|
18
|
-
this.stockService = stockService;
|
|
19
|
-
}
|
|
20
|
-
async createTransferCustomerOrder(args) {
|
|
21
|
-
return this.transferCustomerOrderService.createTransferCustomerOrder({
|
|
22
|
-
...args,
|
|
23
|
-
items: args.items.map(({ aggregatedKey, ...item }) => {
|
|
24
|
-
const keys = this.stockService.destructAggregateKey(aggregatedKey);
|
|
25
|
-
return {
|
|
26
|
-
...item,
|
|
27
|
-
...keys,
|
|
28
|
-
};
|
|
29
|
-
}),
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
async updateTransferCustomerOrder(args) {
|
|
33
|
-
return this.transferCustomerOrderService.updateTransferCustomerOrder({
|
|
34
|
-
...args,
|
|
35
|
-
items: args?.items?.map(({ aggregatedKey, ...item }) => {
|
|
36
|
-
const keys = aggregatedKey
|
|
37
|
-
? this.stockService.destructAggregateKey(aggregatedKey)
|
|
38
|
-
: {};
|
|
39
|
-
return {
|
|
40
|
-
...item,
|
|
41
|
-
...keys,
|
|
42
|
-
};
|
|
43
|
-
}),
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
async returnTransferCustomerOrder(args) {
|
|
47
|
-
return this.transferCustomerOrderService
|
|
48
|
-
.returnTransferCustomerOrder(args.map(({ aggregatedKey, ...item }) => {
|
|
49
|
-
const keys = this.stockService.destructAggregateKey(aggregatedKey);
|
|
50
|
-
return {
|
|
51
|
-
...item,
|
|
52
|
-
...keys,
|
|
53
|
-
};
|
|
54
|
-
}))
|
|
55
|
-
.then(() => true);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
__decorate([
|
|
59
|
-
Mutation(() => TransferCustomerOrderDto),
|
|
60
|
-
WmsOperation({ resource: 'transfer-customer-order', action: 'create' }),
|
|
61
|
-
WmsMutationEvent({ event: 'transfer-customer-order.created' }),
|
|
62
|
-
__param(0, Args()),
|
|
63
|
-
__metadata("design:type", Function),
|
|
64
|
-
__metadata("design:paramtypes", [CreateTransferCustomerOrderArgs]),
|
|
65
|
-
__metadata("design:returntype", Promise)
|
|
66
|
-
], TransferCustomerOrderMutation.prototype, "createTransferCustomerOrder", null);
|
|
67
|
-
__decorate([
|
|
68
|
-
Mutation(() => TransferCustomerOrderDto),
|
|
69
|
-
WmsOperation({ resource: 'transfer-customer-order', action: 'update' }),
|
|
70
|
-
WmsMutationEvent({ event: 'transfer-customer-order.updated' }),
|
|
71
|
-
__param(0, Args()),
|
|
72
|
-
__metadata("design:type", Function),
|
|
73
|
-
__metadata("design:paramtypes", [UpdateTransferCustomerOrderArgs]),
|
|
74
|
-
__metadata("design:returntype", Promise)
|
|
75
|
-
], TransferCustomerOrderMutation.prototype, "updateTransferCustomerOrder", null);
|
|
76
|
-
__decorate([
|
|
77
|
-
Mutation(() => Boolean),
|
|
78
|
-
WmsOperation({ resource: 'transfer-customer-order', action: 'return' }),
|
|
79
|
-
WmsMutationEvent({ event: 'transfer-customer-order.returned' }),
|
|
80
|
-
__param(0, Args('items', { type: () => [ReturnTransferCustomerOrderArgs] })),
|
|
81
|
-
__metadata("design:type", Function),
|
|
82
|
-
__metadata("design:paramtypes", [Array]),
|
|
83
|
-
__metadata("design:returntype", Promise)
|
|
84
|
-
], TransferCustomerOrderMutation.prototype, "returnTransferCustomerOrder", null);
|
|
85
|
-
TransferCustomerOrderMutation = __decorate([
|
|
86
|
-
Injectable(),
|
|
87
|
-
__metadata("design:paramtypes", [TransferCustomerOrderService,
|
|
88
|
-
StockService])
|
|
89
|
-
], TransferCustomerOrderMutation);
|
|
90
|
-
|
|
91
|
-
export { TransferCustomerOrderMutation };
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
-
import { Injectable } from '@nestjs/common';
|
|
3
|
-
import { Mutation, Args } from '@nestjs/graphql';
|
|
4
|
-
import { TransferOrderService, StockService } from '@rytass/wms-module-core';
|
|
5
|
-
import { TransferOrderDto } from '../dto/transfer-order.dto.mjs';
|
|
6
|
-
import { CreateTransferOrderArgs, UpdateTransferOrderArgs } from '../inputs/create-transfer-order.args.mjs';
|
|
7
|
-
import { TransferOrderArgs } from '../inputs/transfer-order.args.mjs';
|
|
8
|
-
import { CancelTransferOrderArgs } from '../inputs/cancel-transfer-order.args.mjs';
|
|
9
|
-
import '../auth/wms-auth.guard.mjs';
|
|
10
|
-
import { WmsOperation } from '../auth/wms-operation.decorator.mjs';
|
|
11
|
-
import { WmsMutationEvent } from '../events/wms-mutation-event.decorator.mjs';
|
|
12
|
-
import '../events/wms-mutation.interceptor.mjs';
|
|
13
|
-
|
|
14
|
-
let TransferOrderMutation = class TransferOrderMutation {
|
|
15
|
-
transferOrderService;
|
|
16
|
-
stockService;
|
|
17
|
-
constructor(transferOrderService, stockService) {
|
|
18
|
-
this.transferOrderService = transferOrderService;
|
|
19
|
-
this.stockService = stockService;
|
|
20
|
-
}
|
|
21
|
-
async createTransferOrder(args) {
|
|
22
|
-
return this.transferOrderService.createTransferOrder({
|
|
23
|
-
...args,
|
|
24
|
-
items: args.items.map(({ aggregatedKey, ...item }) => {
|
|
25
|
-
const keys = this.stockService.destructAggregateKey(aggregatedKey);
|
|
26
|
-
return {
|
|
27
|
-
...item,
|
|
28
|
-
...keys,
|
|
29
|
-
};
|
|
30
|
-
}),
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
async updateTransferOrder(args) {
|
|
34
|
-
return this.transferOrderService.updateTransferOrder({
|
|
35
|
-
...args,
|
|
36
|
-
items: args?.items?.map(({ aggregatedKey, ...item }) => {
|
|
37
|
-
const keys = aggregatedKey
|
|
38
|
-
? this.stockService.destructAggregateKey(aggregatedKey)
|
|
39
|
-
: {};
|
|
40
|
-
return {
|
|
41
|
-
...item,
|
|
42
|
-
...keys,
|
|
43
|
-
};
|
|
44
|
-
}),
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
async transfer(args) {
|
|
48
|
-
return this.transferOrderService.transfer(args);
|
|
49
|
-
}
|
|
50
|
-
async cancelTransfer(args) {
|
|
51
|
-
return this.transferOrderService.cancelTransfer(args);
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
__decorate([
|
|
55
|
-
Mutation(() => TransferOrderDto),
|
|
56
|
-
WmsOperation({ resource: 'transfer-order', action: 'create' }),
|
|
57
|
-
WmsMutationEvent({ event: 'transfer-order.created' }),
|
|
58
|
-
__param(0, Args()),
|
|
59
|
-
__metadata("design:type", Function),
|
|
60
|
-
__metadata("design:paramtypes", [CreateTransferOrderArgs]),
|
|
61
|
-
__metadata("design:returntype", Promise)
|
|
62
|
-
], TransferOrderMutation.prototype, "createTransferOrder", null);
|
|
63
|
-
__decorate([
|
|
64
|
-
Mutation(() => TransferOrderDto),
|
|
65
|
-
WmsOperation({ resource: 'transfer-order', action: 'update' }),
|
|
66
|
-
WmsMutationEvent({ event: 'transfer-order.updated' }),
|
|
67
|
-
__param(0, Args()),
|
|
68
|
-
__metadata("design:type", Function),
|
|
69
|
-
__metadata("design:paramtypes", [UpdateTransferOrderArgs]),
|
|
70
|
-
__metadata("design:returntype", Promise)
|
|
71
|
-
], TransferOrderMutation.prototype, "updateTransferOrder", null);
|
|
72
|
-
__decorate([
|
|
73
|
-
Mutation(() => Boolean),
|
|
74
|
-
WmsOperation({ resource: 'transfer-order', action: 'transfer' }),
|
|
75
|
-
WmsMutationEvent({ event: 'transfer-order.transferred' }),
|
|
76
|
-
__param(0, Args('items', { type: () => [TransferOrderArgs] })),
|
|
77
|
-
__metadata("design:type", Function),
|
|
78
|
-
__metadata("design:paramtypes", [Array]),
|
|
79
|
-
__metadata("design:returntype", Promise)
|
|
80
|
-
], TransferOrderMutation.prototype, "transfer", null);
|
|
81
|
-
__decorate([
|
|
82
|
-
Mutation(() => Boolean),
|
|
83
|
-
WmsOperation({ resource: 'transfer-order', action: 'cancel' }),
|
|
84
|
-
WmsMutationEvent({ event: 'transfer-order.transfer-cancelled' }),
|
|
85
|
-
__param(0, Args('items', { type: () => [CancelTransferOrderArgs] })),
|
|
86
|
-
__metadata("design:type", Function),
|
|
87
|
-
__metadata("design:paramtypes", [Array]),
|
|
88
|
-
__metadata("design:returntype", Promise)
|
|
89
|
-
], TransferOrderMutation.prototype, "cancelTransfer", null);
|
|
90
|
-
TransferOrderMutation = __decorate([
|
|
91
|
-
Injectable(),
|
|
92
|
-
__metadata("design:paramtypes", [TransferOrderService,
|
|
93
|
-
StockService])
|
|
94
|
-
], TransferOrderMutation);
|
|
95
|
-
|
|
96
|
-
export { TransferOrderMutation };
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
-
import { Injectable } from '@nestjs/common';
|
|
3
|
-
import { Mutation, Args } from '@nestjs/graphql';
|
|
4
|
-
import { TransferVendorOrderService, StockService } from '@rytass/wms-module-core';
|
|
5
|
-
import { TransferVendorOrderDto } from '../dto/transfer-vendor-order.dto.mjs';
|
|
6
|
-
import { CreateTransferVendorOrderArgs, UpdateTransferVendorOrderArgs } from '../inputs/create-transfer-vendor-order.args.mjs';
|
|
7
|
-
import { ReturnTransferVendorOrderArgs } from '../inputs/return-transfer-vendor-order.args.mjs';
|
|
8
|
-
import '../auth/wms-auth.guard.mjs';
|
|
9
|
-
import { WmsOperation } from '../auth/wms-operation.decorator.mjs';
|
|
10
|
-
import { WmsMutationEvent } from '../events/wms-mutation-event.decorator.mjs';
|
|
11
|
-
import '../events/wms-mutation.interceptor.mjs';
|
|
12
|
-
|
|
13
|
-
let TransferVendorOrderMutation = class TransferVendorOrderMutation {
|
|
14
|
-
transferVendorOrderService;
|
|
15
|
-
stockService;
|
|
16
|
-
constructor(transferVendorOrderService, stockService) {
|
|
17
|
-
this.transferVendorOrderService = transferVendorOrderService;
|
|
18
|
-
this.stockService = stockService;
|
|
19
|
-
}
|
|
20
|
-
async createTransferVendorOrder(args) {
|
|
21
|
-
return this.transferVendorOrderService.createTransferVendorOrder({
|
|
22
|
-
...args,
|
|
23
|
-
items: args.items.map(({ aggregatedKey, ...item }) => {
|
|
24
|
-
const keys = this.stockService.destructAggregateKey(aggregatedKey);
|
|
25
|
-
return {
|
|
26
|
-
...item,
|
|
27
|
-
...keys,
|
|
28
|
-
};
|
|
29
|
-
}),
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
async updateTransferVendorOrder(args) {
|
|
33
|
-
return this.transferVendorOrderService.updateTransferVendorOrder({
|
|
34
|
-
...args,
|
|
35
|
-
items: args?.items?.map(({ aggregatedKey, ...item }) => {
|
|
36
|
-
const keys = aggregatedKey
|
|
37
|
-
? this.stockService.destructAggregateKey(aggregatedKey)
|
|
38
|
-
: {};
|
|
39
|
-
return {
|
|
40
|
-
...item,
|
|
41
|
-
...keys,
|
|
42
|
-
};
|
|
43
|
-
}),
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
async returnTransferVendorOrder(args) {
|
|
47
|
-
return this.transferVendorOrderService
|
|
48
|
-
.returnTransferVendorOrder(args.map(({ aggregatedKey, ...item }) => {
|
|
49
|
-
const keys = this.stockService.destructAggregateKey(aggregatedKey);
|
|
50
|
-
return {
|
|
51
|
-
...item,
|
|
52
|
-
...keys,
|
|
53
|
-
};
|
|
54
|
-
}))
|
|
55
|
-
.then(() => true);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
__decorate([
|
|
59
|
-
Mutation(() => TransferVendorOrderDto),
|
|
60
|
-
WmsOperation({ resource: 'transfer-vendor-order', action: 'create' }),
|
|
61
|
-
WmsMutationEvent({ event: 'transfer-vendor-order.created' }),
|
|
62
|
-
__param(0, Args()),
|
|
63
|
-
__metadata("design:type", Function),
|
|
64
|
-
__metadata("design:paramtypes", [CreateTransferVendorOrderArgs]),
|
|
65
|
-
__metadata("design:returntype", Promise)
|
|
66
|
-
], TransferVendorOrderMutation.prototype, "createTransferVendorOrder", null);
|
|
67
|
-
__decorate([
|
|
68
|
-
Mutation(() => TransferVendorOrderDto),
|
|
69
|
-
WmsOperation({ resource: 'transfer-vendor-order', action: 'update' }),
|
|
70
|
-
WmsMutationEvent({ event: 'transfer-vendor-order.updated' }),
|
|
71
|
-
__param(0, Args()),
|
|
72
|
-
__metadata("design:type", Function),
|
|
73
|
-
__metadata("design:paramtypes", [UpdateTransferVendorOrderArgs]),
|
|
74
|
-
__metadata("design:returntype", Promise)
|
|
75
|
-
], TransferVendorOrderMutation.prototype, "updateTransferVendorOrder", null);
|
|
76
|
-
__decorate([
|
|
77
|
-
Mutation(() => Boolean),
|
|
78
|
-
WmsOperation({ resource: 'transfer-vendor-order', action: 'return' }),
|
|
79
|
-
WmsMutationEvent({ event: 'transfer-vendor-order.returned' }),
|
|
80
|
-
__param(0, Args('items', { type: () => [ReturnTransferVendorOrderArgs] })),
|
|
81
|
-
__metadata("design:type", Function),
|
|
82
|
-
__metadata("design:paramtypes", [Array]),
|
|
83
|
-
__metadata("design:returntype", Promise)
|
|
84
|
-
], TransferVendorOrderMutation.prototype, "returnTransferVendorOrder", null);
|
|
85
|
-
TransferVendorOrderMutation = __decorate([
|
|
86
|
-
Injectable(),
|
|
87
|
-
__metadata("design:paramtypes", [TransferVendorOrderService,
|
|
88
|
-
StockService])
|
|
89
|
-
], TransferVendorOrderMutation);
|
|
90
|
-
|
|
91
|
-
export { TransferVendorOrderMutation };
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
-
import { Injectable } from '@nestjs/common';
|
|
3
|
-
import { WarehouseMapService } from '@rytass/wms-base-nestjs-module';
|
|
4
|
-
import { MapDataDto } from '../dto/warehouse-map.dto.mjs';
|
|
5
|
-
import { Mutation, Args } from '@nestjs/graphql';
|
|
6
|
-
import { UpdateWarehouseMapArgs } from '../inputs/update-warehouse-map.args.mjs';
|
|
7
|
-
import { WarehouseMapDataService } from '@rytass/wms-module-core';
|
|
8
|
-
import { In } from 'typeorm';
|
|
9
|
-
import '../auth/wms-auth.guard.mjs';
|
|
10
|
-
import { WmsOperation } from '../auth/wms-operation.decorator.mjs';
|
|
11
|
-
import { WmsMutationEvent } from '../events/wms-mutation-event.decorator.mjs';
|
|
12
|
-
import '../events/wms-mutation.interceptor.mjs';
|
|
13
|
-
|
|
14
|
-
let WarehouseMapMutation = class WarehouseMapMutation {
|
|
15
|
-
warehouseMapBaseService;
|
|
16
|
-
warehouseMapService;
|
|
17
|
-
constructor(warehouseMapBaseService, warehouseMapService) {
|
|
18
|
-
this.warehouseMapBaseService = warehouseMapBaseService;
|
|
19
|
-
this.warehouseMapService = warehouseMapService;
|
|
20
|
-
}
|
|
21
|
-
async updateWarehouseMap(args) {
|
|
22
|
-
const { mapData } = await this.warehouseMapBaseService.updateMap(args.locationKey, args.backgrounds, args.ranges);
|
|
23
|
-
if (mapData.ranges) {
|
|
24
|
-
const rangeIds = mapData.ranges.map(({ id }) => id);
|
|
25
|
-
const existedIds = await this.warehouseMapService.warehouseMapDataRepository
|
|
26
|
-
.findBy({
|
|
27
|
-
id: In(rangeIds),
|
|
28
|
-
})
|
|
29
|
-
.then((entities) => entities.map(({ id }) => id));
|
|
30
|
-
const notExistedIds = rangeIds.filter((id) => !existedIds.includes(id));
|
|
31
|
-
if (notExistedIds.length) {
|
|
32
|
-
await this.warehouseMapService.warehouseMapDataRepository.save(notExistedIds.map((id) => this.warehouseMapService.warehouseMapDataRepository.create({
|
|
33
|
-
id,
|
|
34
|
-
mapData: {
|
|
35
|
-
id,
|
|
36
|
-
backgrounds: [],
|
|
37
|
-
ranges: [],
|
|
38
|
-
},
|
|
39
|
-
})));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return mapData;
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
__decorate([
|
|
46
|
-
Mutation(() => MapDataDto),
|
|
47
|
-
WmsOperation({ resource: 'warehouse-map', action: 'update' }),
|
|
48
|
-
WmsMutationEvent({ event: 'warehouse-map.updated' }),
|
|
49
|
-
__param(0, Args()),
|
|
50
|
-
__metadata("design:type", Function),
|
|
51
|
-
__metadata("design:paramtypes", [UpdateWarehouseMapArgs]),
|
|
52
|
-
__metadata("design:returntype", Promise)
|
|
53
|
-
], WarehouseMapMutation.prototype, "updateWarehouseMap", null);
|
|
54
|
-
WarehouseMapMutation = __decorate([
|
|
55
|
-
Injectable(),
|
|
56
|
-
__metadata("design:paramtypes", [WarehouseMapService,
|
|
57
|
-
WarehouseMapDataService])
|
|
58
|
-
], WarehouseMapMutation);
|
|
59
|
-
|
|
60
|
-
export { WarehouseMapMutation };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
-
import { Injectable } from '@nestjs/common';
|
|
3
|
-
import { Query, Args } from '@nestjs/graphql';
|
|
4
|
-
import { AllocateInventoryOrders } from '../dto/allocate-inventory-order.dto.mjs';
|
|
5
|
-
import { AllocateInventoryOrderService } from '@rytass/wms-module-core';
|
|
6
|
-
import { FindAllocateInventoryOrderArgs } from '../inputs/find-allocate-inventory-order.args.mjs';
|
|
7
|
-
import '../auth/wms-auth.guard.mjs';
|
|
8
|
-
import { WmsOperation } from '../auth/wms-operation.decorator.mjs';
|
|
9
|
-
|
|
10
|
-
let AllocateInventoryOrderQuery = class AllocateInventoryOrderQuery {
|
|
11
|
-
allocateInventoryOrderService;
|
|
12
|
-
constructor(allocateInventoryOrderService) {
|
|
13
|
-
this.allocateInventoryOrderService = allocateInventoryOrderService;
|
|
14
|
-
}
|
|
15
|
-
async allocateInventoryOrders(args) {
|
|
16
|
-
const [items, total] = await this.allocateInventoryOrderService.findMany(args);
|
|
17
|
-
return { items, total };
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
__decorate([
|
|
21
|
-
Query(() => AllocateInventoryOrders),
|
|
22
|
-
WmsOperation({ resource: 'allocate-inventory-order', action: 'read' }),
|
|
23
|
-
__param(0, Args()),
|
|
24
|
-
__metadata("design:type", Function),
|
|
25
|
-
__metadata("design:paramtypes", [FindAllocateInventoryOrderArgs]),
|
|
26
|
-
__metadata("design:returntype", Promise)
|
|
27
|
-
], AllocateInventoryOrderQuery.prototype, "allocateInventoryOrders", null);
|
|
28
|
-
AllocateInventoryOrderQuery = __decorate([
|
|
29
|
-
Injectable(),
|
|
30
|
-
__metadata("design:paramtypes", [AllocateInventoryOrderService])
|
|
31
|
-
], AllocateInventoryOrderQuery);
|
|
32
|
-
|
|
33
|
-
export { AllocateInventoryOrderQuery };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
-
import { Injectable } from '@nestjs/common';
|
|
3
|
-
import { Query, Args } from '@nestjs/graphql';
|
|
4
|
-
import { Batches } from '../dto/batch.dto.mjs';
|
|
5
|
-
import { BatchService } from '@rytass/wms-module-core';
|
|
6
|
-
import { FindBatchArgs } from '../inputs/find-batch.args.mjs';
|
|
7
|
-
import '../auth/wms-auth.guard.mjs';
|
|
8
|
-
import { WmsOperation } from '../auth/wms-operation.decorator.mjs';
|
|
9
|
-
|
|
10
|
-
let BatchQuery = class BatchQuery {
|
|
11
|
-
batchService;
|
|
12
|
-
constructor(batchService) {
|
|
13
|
-
this.batchService = batchService;
|
|
14
|
-
}
|
|
15
|
-
async batches(args) {
|
|
16
|
-
const [items, total] = await this.batchService.findMany({
|
|
17
|
-
...args,
|
|
18
|
-
wildcard: args.key ? { key: 'key', value: args.key } : undefined,
|
|
19
|
-
});
|
|
20
|
-
return { items, total };
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
__decorate([
|
|
24
|
-
Query(() => Batches),
|
|
25
|
-
WmsOperation({ resource: 'batch', action: 'read' }),
|
|
26
|
-
__param(0, Args()),
|
|
27
|
-
__metadata("design:type", Function),
|
|
28
|
-
__metadata("design:paramtypes", [FindBatchArgs]),
|
|
29
|
-
__metadata("design:returntype", Promise)
|
|
30
|
-
], BatchQuery.prototype, "batches", null);
|
|
31
|
-
BatchQuery = __decorate([
|
|
32
|
-
Injectable(),
|
|
33
|
-
__metadata("design:paramtypes", [BatchService])
|
|
34
|
-
], BatchQuery);
|
|
35
|
-
|
|
36
|
-
export { BatchQuery };
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
-
import { Injectable } from '@nestjs/common';
|
|
3
|
-
import { Query, Args, ID, Resolver } from '@nestjs/graphql';
|
|
4
|
-
import { ConsumptionOrderService } from '@rytass/wms-module-core';
|
|
5
|
-
import { ConsumptionOrderDto, ConsumptionOrders } from '../dto/consumption-order.dto.mjs';
|
|
6
|
-
import { FindConsumptionOrderArgs } from '../inputs/consumption-order.args.mjs';
|
|
7
|
-
import '../auth/wms-auth.guard.mjs';
|
|
8
|
-
import { WmsOperation } from '../auth/wms-operation.decorator.mjs';
|
|
9
|
-
|
|
10
|
-
let ConsumptionOrderQuery = class ConsumptionOrderQuery {
|
|
11
|
-
consumptionOrderService;
|
|
12
|
-
constructor(consumptionOrderService) {
|
|
13
|
-
this.consumptionOrderService = consumptionOrderService;
|
|
14
|
-
}
|
|
15
|
-
consumptionOrder(id) {
|
|
16
|
-
return this.consumptionOrderService.findOne(id);
|
|
17
|
-
}
|
|
18
|
-
async consumptionOrders(args) {
|
|
19
|
-
const [items, total] = await this.consumptionOrderService.findMany(args);
|
|
20
|
-
return { items, total };
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
__decorate([
|
|
24
|
-
Query(() => ConsumptionOrderDto),
|
|
25
|
-
WmsOperation({ resource: 'consumption-order', action: 'read' }),
|
|
26
|
-
__param(0, Args('id', { type: () => ID })),
|
|
27
|
-
__metadata("design:type", Function),
|
|
28
|
-
__metadata("design:paramtypes", [String]),
|
|
29
|
-
__metadata("design:returntype", Promise)
|
|
30
|
-
], ConsumptionOrderQuery.prototype, "consumptionOrder", null);
|
|
31
|
-
__decorate([
|
|
32
|
-
Query(() => ConsumptionOrders),
|
|
33
|
-
WmsOperation({ resource: 'consumption-order', action: 'read' }),
|
|
34
|
-
__param(0, Args()),
|
|
35
|
-
__metadata("design:type", Function),
|
|
36
|
-
__metadata("design:paramtypes", [FindConsumptionOrderArgs]),
|
|
37
|
-
__metadata("design:returntype", Promise)
|
|
38
|
-
], ConsumptionOrderQuery.prototype, "consumptionOrders", null);
|
|
39
|
-
ConsumptionOrderQuery = __decorate([
|
|
40
|
-
Injectable(),
|
|
41
|
-
Resolver(),
|
|
42
|
-
__metadata("design:paramtypes", [ConsumptionOrderService])
|
|
43
|
-
], ConsumptionOrderQuery);
|
|
44
|
-
|
|
45
|
-
export { ConsumptionOrderQuery };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
-
import { Injectable } from '@nestjs/common';
|
|
3
|
-
import { Query, Args } from '@nestjs/graphql';
|
|
4
|
-
import { HoldInventoryOrderService } from '@rytass/wms-module-core';
|
|
5
|
-
import { HoldInventoryOrders } from '../dto/hold-inventory-order.dto.mjs';
|
|
6
|
-
import { FindHoldInventoryOrderArgs } from '../inputs/find-hold-inventory-order.args.mjs';
|
|
7
|
-
import '../auth/wms-auth.guard.mjs';
|
|
8
|
-
import { WmsOperation } from '../auth/wms-operation.decorator.mjs';
|
|
9
|
-
|
|
10
|
-
let HoldInventoryOrderQuery = class HoldInventoryOrderQuery {
|
|
11
|
-
holdInventoryOrderService;
|
|
12
|
-
constructor(holdInventoryOrderService) {
|
|
13
|
-
this.holdInventoryOrderService = holdInventoryOrderService;
|
|
14
|
-
}
|
|
15
|
-
async holdInventoryOrders(args) {
|
|
16
|
-
const [items, total] = await this.holdInventoryOrderService.findMany(args);
|
|
17
|
-
return { items, total };
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
__decorate([
|
|
21
|
-
Query(() => HoldInventoryOrders),
|
|
22
|
-
WmsOperation({ resource: 'hold-inventory-order', action: 'read' }),
|
|
23
|
-
__param(0, Args()),
|
|
24
|
-
__metadata("design:type", Function),
|
|
25
|
-
__metadata("design:paramtypes", [FindHoldInventoryOrderArgs]),
|
|
26
|
-
__metadata("design:returntype", Promise)
|
|
27
|
-
], HoldInventoryOrderQuery.prototype, "holdInventoryOrders", null);
|
|
28
|
-
HoldInventoryOrderQuery = __decorate([
|
|
29
|
-
Injectable(),
|
|
30
|
-
__metadata("design:paramtypes", [HoldInventoryOrderService])
|
|
31
|
-
], HoldInventoryOrderQuery);
|
|
32
|
-
|
|
33
|
-
export { HoldInventoryOrderQuery };
|