@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,42 @@
|
|
|
1
|
+
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
+
import { Injectable } from '@nestjs/common';
|
|
3
|
+
import { Query, Args, ID } from '@nestjs/graphql';
|
|
4
|
+
import { TransferOrderService } from '@rytass/wms-module-core';
|
|
5
|
+
import { TransferOrders, TransferOrderDto } from '../dto/transfer-order.dto.js';
|
|
6
|
+
import { FindTransferOrderArgs } from '../inputs/find-transfer-order.args.js';
|
|
7
|
+
|
|
8
|
+
let TransferOrderQuery = class TransferOrderQuery {
|
|
9
|
+
transferOrderService;
|
|
10
|
+
constructor(transferOrderService) {
|
|
11
|
+
this.transferOrderService = transferOrderService;
|
|
12
|
+
}
|
|
13
|
+
async transferOrders(args) {
|
|
14
|
+
const [items, total] = await this.transferOrderService.findMany(args);
|
|
15
|
+
return { items, total };
|
|
16
|
+
}
|
|
17
|
+
async transferOrder(id) {
|
|
18
|
+
return this.transferOrderService.transferOrderRepository.findOneByOrFail({
|
|
19
|
+
id,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
__decorate([
|
|
24
|
+
Query(() => TransferOrders),
|
|
25
|
+
__param(0, Args()),
|
|
26
|
+
__metadata("design:type", Function),
|
|
27
|
+
__metadata("design:paramtypes", [FindTransferOrderArgs]),
|
|
28
|
+
__metadata("design:returntype", Promise)
|
|
29
|
+
], TransferOrderQuery.prototype, "transferOrders", null);
|
|
30
|
+
__decorate([
|
|
31
|
+
Query(() => TransferOrderDto),
|
|
32
|
+
__param(0, Args('id', { type: () => ID })),
|
|
33
|
+
__metadata("design:type", Function),
|
|
34
|
+
__metadata("design:paramtypes", [String]),
|
|
35
|
+
__metadata("design:returntype", Promise)
|
|
36
|
+
], TransferOrderQuery.prototype, "transferOrder", null);
|
|
37
|
+
TransferOrderQuery = __decorate([
|
|
38
|
+
Injectable(),
|
|
39
|
+
__metadata("design:paramtypes", [TransferOrderService])
|
|
40
|
+
], TransferOrderQuery);
|
|
41
|
+
|
|
42
|
+
export { TransferOrderQuery };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { __decorate, __metadata } from 'tslib';
|
|
2
|
+
import { Injectable } from '@nestjs/common';
|
|
3
|
+
import { UnitDto } from '../dto/unit.dto.js';
|
|
4
|
+
import { Query } from '@nestjs/graphql';
|
|
5
|
+
import { UnitService } from '@rytass/wms-module-core';
|
|
6
|
+
|
|
7
|
+
let UnitQuery = class UnitQuery {
|
|
8
|
+
unitService;
|
|
9
|
+
constructor(unitService) {
|
|
10
|
+
this.unitService = unitService;
|
|
11
|
+
}
|
|
12
|
+
units() {
|
|
13
|
+
return this.unitService.unitRepository.findBy({});
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
__decorate([
|
|
17
|
+
Query(() => [UnitDto]),
|
|
18
|
+
__metadata("design:type", Function),
|
|
19
|
+
__metadata("design:paramtypes", []),
|
|
20
|
+
__metadata("design:returntype", Promise)
|
|
21
|
+
], UnitQuery.prototype, "units", null);
|
|
22
|
+
UnitQuery = __decorate([
|
|
23
|
+
Injectable(),
|
|
24
|
+
__metadata("design:paramtypes", [UnitService])
|
|
25
|
+
], UnitQuery);
|
|
26
|
+
|
|
27
|
+
export { UnitQuery };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MapDataDto } from '../dto/warehouse-map.dto';
|
|
2
|
+
import { WarehouseMapDataService } from '@rytass/wms-module-core';
|
|
3
|
+
export declare class WarehouseMapDataQuery {
|
|
4
|
+
private readonly warehouseMapDataService;
|
|
5
|
+
constructor(warehouseMapDataService: WarehouseMapDataService);
|
|
6
|
+
mapData(key: string): Promise<MapDataDto>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
+
import { Injectable } from '@nestjs/common';
|
|
3
|
+
import { Query, Args } from '@nestjs/graphql';
|
|
4
|
+
import { MapDataDto } from '../dto/warehouse-map.dto.js';
|
|
5
|
+
import { WarehouseMapDataService } from '@rytass/wms-module-core';
|
|
6
|
+
|
|
7
|
+
let WarehouseMapDataQuery = class WarehouseMapDataQuery {
|
|
8
|
+
warehouseMapDataService;
|
|
9
|
+
constructor(warehouseMapDataService) {
|
|
10
|
+
this.warehouseMapDataService = warehouseMapDataService;
|
|
11
|
+
}
|
|
12
|
+
async mapData(key) {
|
|
13
|
+
const { mapData } = await this.warehouseMapDataService.warehouseMapDataRepository.findOneByOrFail({ id: key });
|
|
14
|
+
return mapData;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
__decorate([
|
|
18
|
+
Query(() => MapDataDto),
|
|
19
|
+
__param(0, Args('key')),
|
|
20
|
+
__metadata("design:type", Function),
|
|
21
|
+
__metadata("design:paramtypes", [String]),
|
|
22
|
+
__metadata("design:returntype", Promise)
|
|
23
|
+
], WarehouseMapDataQuery.prototype, "mapData", null);
|
|
24
|
+
WarehouseMapDataQuery = __decorate([
|
|
25
|
+
Injectable(),
|
|
26
|
+
__metadata("design:paramtypes", [WarehouseMapDataService])
|
|
27
|
+
], WarehouseMapDataQuery);
|
|
28
|
+
|
|
29
|
+
export { WarehouseMapDataQuery };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AggregatedStockDto, LoaderDto, MaterialDto } from '../dto';
|
|
2
|
+
import { type LoaderType } from '../helpers';
|
|
3
|
+
import { BatchEntityClass, LoadersEntityClass, LocationEntityClass, MaterialEntityClass, StockService } from '@rytass/wms-module-core';
|
|
4
|
+
import { BatchDto } from '../dto/batch.dto';
|
|
5
|
+
import { LocationDto } from '../dto/location.dto';
|
|
6
|
+
export declare class AggregatedStockResolver {
|
|
7
|
+
private readonly stockService;
|
|
8
|
+
constructor(stockService: StockService);
|
|
9
|
+
id(stock: AggregatedStockDto): Promise<string>;
|
|
10
|
+
material({ materialId }: AggregatedStockDto, { loaders }: LoaderType<MaterialEntityClass>): Promise<MaterialDto>;
|
|
11
|
+
batch({ batchId }: AggregatedStockDto, { loaders }: LoaderType<BatchEntityClass>): Promise<BatchDto>;
|
|
12
|
+
location({ locationId }: AggregatedStockDto, { loaders }: LoaderType<LocationEntityClass>): Promise<LocationDto>;
|
|
13
|
+
loader({ loaderId }: AggregatedStockDto, { loaders }: LoaderType<LoadersEntityClass>): Promise<LoaderDto>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
+
import { ResolveField, ID, Parent, Context, Resolver } from '@nestjs/graphql';
|
|
3
|
+
import '../dto/loader-type.dto.js';
|
|
4
|
+
import { LoaderDto } from '../dto/loader.dto.js';
|
|
5
|
+
import { MaterialDto } from '../dto/material.dto.js';
|
|
6
|
+
import '../dto/material-unit.dto.js';
|
|
7
|
+
import { AggregatedStockDto } from '../dto/stock.dto.js';
|
|
8
|
+
import '../dto/sale-order.dto.js';
|
|
9
|
+
import '../dto/receive-inventory-order.dto.js';
|
|
10
|
+
import '../dto/receive-inventory-order-item.dto.js';
|
|
11
|
+
import '../dto/ship-inventory-order.dto.js';
|
|
12
|
+
import '../dto/ship-inventory-order-item.dto.js';
|
|
13
|
+
import '../dto/hold-inventory-order.dto.js';
|
|
14
|
+
import '../dto/hold-inventory-order-item.dto.js';
|
|
15
|
+
import '../dto/allocate-inventory-order.dto.js';
|
|
16
|
+
import '../dto/allocate-inventory-order-item.dto.js';
|
|
17
|
+
import '../dto/transfer-order.dto.js';
|
|
18
|
+
import '../dto/transfer-order-item.dto.js';
|
|
19
|
+
import '../dto/transfer-customer-order.dto.js';
|
|
20
|
+
import '../dto/transfer-customer-order-item.dto.js';
|
|
21
|
+
import '../dto/transfer-vendor-order.dto.js';
|
|
22
|
+
import '../dto/transfer-vendor-order-item.dto.js';
|
|
23
|
+
import '../dto/scrape-order.dto.js';
|
|
24
|
+
import '../dto/scrape-order-item.dto.js';
|
|
25
|
+
import '../dto/quality-inspection-order.dto.js';
|
|
26
|
+
import '../dto/quality-inspection-order-item.dto.js';
|
|
27
|
+
import { StockService, MaterialEntityClass, BatchEntityClass, BatchGroupEntityClass, LocationEntityClass, LoadersEntityClass } from '@rytass/wms-module-core';
|
|
28
|
+
import { BatchDto } from '../dto/batch.dto.js';
|
|
29
|
+
import { LocationDto } from '../dto/location.dto.js';
|
|
30
|
+
|
|
31
|
+
let AggregatedStockResolver = class AggregatedStockResolver {
|
|
32
|
+
stockService;
|
|
33
|
+
constructor(stockService) {
|
|
34
|
+
this.stockService = stockService;
|
|
35
|
+
}
|
|
36
|
+
async id(stock) {
|
|
37
|
+
return this.stockService.generatedAggregateKey(stock);
|
|
38
|
+
}
|
|
39
|
+
async material({ materialId }, { loaders }) {
|
|
40
|
+
return loaders.batchSingle.load({
|
|
41
|
+
__entity: MaterialEntityClass,
|
|
42
|
+
__from: { id: materialId },
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
async batch({ batchId }, { loaders }) {
|
|
46
|
+
const { groupId } = await loaders.batchSingle.load({
|
|
47
|
+
__entity: BatchEntityClass,
|
|
48
|
+
__from: { id: batchId },
|
|
49
|
+
});
|
|
50
|
+
return loaders.batchSingle.load({
|
|
51
|
+
__entity: BatchGroupEntityClass,
|
|
52
|
+
__from: { id: groupId },
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
async location({ locationId }, { loaders }) {
|
|
56
|
+
return loaders.batchSingle.load({
|
|
57
|
+
__entity: LocationEntityClass,
|
|
58
|
+
__from: { id: locationId },
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
async loader({ loaderId }, { loaders }) {
|
|
62
|
+
return loaders.batchSingle.load({
|
|
63
|
+
__entity: LoadersEntityClass,
|
|
64
|
+
__from: { id: loaderId },
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
__decorate([
|
|
69
|
+
ResolveField(() => ID),
|
|
70
|
+
__param(0, Parent()),
|
|
71
|
+
__metadata("design:type", Function),
|
|
72
|
+
__metadata("design:paramtypes", [AggregatedStockDto]),
|
|
73
|
+
__metadata("design:returntype", Promise)
|
|
74
|
+
], AggregatedStockResolver.prototype, "id", null);
|
|
75
|
+
__decorate([
|
|
76
|
+
ResolveField(() => MaterialDto),
|
|
77
|
+
__param(0, Parent()),
|
|
78
|
+
__param(1, Context()),
|
|
79
|
+
__metadata("design:type", Function),
|
|
80
|
+
__metadata("design:paramtypes", [AggregatedStockDto, Object]),
|
|
81
|
+
__metadata("design:returntype", Promise)
|
|
82
|
+
], AggregatedStockResolver.prototype, "material", null);
|
|
83
|
+
__decorate([
|
|
84
|
+
ResolveField(() => BatchDto),
|
|
85
|
+
__param(0, Parent()),
|
|
86
|
+
__param(1, Context()),
|
|
87
|
+
__metadata("design:type", Function),
|
|
88
|
+
__metadata("design:paramtypes", [AggregatedStockDto, Object]),
|
|
89
|
+
__metadata("design:returntype", Promise)
|
|
90
|
+
], AggregatedStockResolver.prototype, "batch", null);
|
|
91
|
+
__decorate([
|
|
92
|
+
ResolveField(() => LocationDto),
|
|
93
|
+
__param(0, Parent()),
|
|
94
|
+
__param(1, Context()),
|
|
95
|
+
__metadata("design:type", Function),
|
|
96
|
+
__metadata("design:paramtypes", [AggregatedStockDto, Object]),
|
|
97
|
+
__metadata("design:returntype", Promise)
|
|
98
|
+
], AggregatedStockResolver.prototype, "location", null);
|
|
99
|
+
__decorate([
|
|
100
|
+
ResolveField(() => LoaderDto),
|
|
101
|
+
__param(0, Parent()),
|
|
102
|
+
__param(1, Context()),
|
|
103
|
+
__metadata("design:type", Function),
|
|
104
|
+
__metadata("design:paramtypes", [AggregatedStockDto, Object]),
|
|
105
|
+
__metadata("design:returntype", Promise)
|
|
106
|
+
], AggregatedStockResolver.prototype, "loader", null);
|
|
107
|
+
AggregatedStockResolver = __decorate([
|
|
108
|
+
Resolver(() => AggregatedStockDto),
|
|
109
|
+
__metadata("design:paramtypes", [StockService])
|
|
110
|
+
], AggregatedStockResolver);
|
|
111
|
+
|
|
112
|
+
export { AggregatedStockResolver };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AllocateInventoryOrderItemDto } from '../dto/allocate-inventory-order-item.dto';
|
|
2
|
+
import { AllocateInventoryOrderEntityClass, AllocateInventoryOrderItemEntityClass } from '@rytass/wms-module-core';
|
|
3
|
+
import { type LoaderType } from '../helpers';
|
|
4
|
+
export declare class AllocateInventoryOrderResolver {
|
|
5
|
+
items({ id }: AllocateInventoryOrderEntityClass, { loaders }: LoaderType<AllocateInventoryOrderItemEntityClass>): Promise<AllocateInventoryOrderItemDto[]>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
+
import { ResolveField, Parent, Context, Resolver } from '@nestjs/graphql';
|
|
3
|
+
import { AllocateInventoryOrderDto } from '../dto/allocate-inventory-order.dto.js';
|
|
4
|
+
import { AllocateInventoryOrderItemDto } from '../dto/allocate-inventory-order-item.dto.js';
|
|
5
|
+
import { AllocateInventoryOrderEntityClass, AllocateInventoryOrderItemEntityClass } from '@rytass/wms-module-core';
|
|
6
|
+
|
|
7
|
+
let AllocateInventoryOrderResolver = class AllocateInventoryOrderResolver {
|
|
8
|
+
items({ id }, { loaders }) {
|
|
9
|
+
return loaders.batchMany.load({
|
|
10
|
+
__entity: AllocateInventoryOrderItemEntityClass,
|
|
11
|
+
__from: { orderId: id },
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
__decorate([
|
|
16
|
+
ResolveField(() => [AllocateInventoryOrderItemDto]),
|
|
17
|
+
__param(0, Parent()),
|
|
18
|
+
__param(1, Context()),
|
|
19
|
+
__metadata("design:type", Function),
|
|
20
|
+
__metadata("design:paramtypes", [AllocateInventoryOrderEntityClass, Object]),
|
|
21
|
+
__metadata("design:returntype", Promise)
|
|
22
|
+
], AllocateInventoryOrderResolver.prototype, "items", null);
|
|
23
|
+
AllocateInventoryOrderResolver = __decorate([
|
|
24
|
+
Resolver(() => AllocateInventoryOrderDto)
|
|
25
|
+
], AllocateInventoryOrderResolver);
|
|
26
|
+
|
|
27
|
+
export { AllocateInventoryOrderResolver };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MaterialDto } from '../dto';
|
|
2
|
+
import { BatchEntityClass, LocationEntityClass, MaterialEntityClass, StockEntityClass } from '@rytass/wms-module-core';
|
|
3
|
+
import { type LoaderType } from '../helpers';
|
|
4
|
+
import { LocationDto } from '../dto/location.dto';
|
|
5
|
+
import { BatchDto } from '../dto/batch.dto';
|
|
6
|
+
export declare class ChangeLogResolver {
|
|
7
|
+
material({ materialId }: StockEntityClass, { loaders }: LoaderType<MaterialEntityClass>): Promise<MaterialDto>;
|
|
8
|
+
location({ locationId }: StockEntityClass, { loaders }: LoaderType<LocationEntityClass>): Promise<LocationDto>;
|
|
9
|
+
batch({ batchId }: StockEntityClass, { loaders }: LoaderType<BatchEntityClass>): Promise<BatchDto>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
+
import { ResolveField, Parent, Context, Resolver } from '@nestjs/graphql';
|
|
3
|
+
import '../dto/loader-type.dto.js';
|
|
4
|
+
import '../dto/loader.dto.js';
|
|
5
|
+
import { MaterialDto } from '../dto/material.dto.js';
|
|
6
|
+
import '../dto/material-unit.dto.js';
|
|
7
|
+
import { ChangeLogDto } from '../dto/stock.dto.js';
|
|
8
|
+
import '../dto/sale-order.dto.js';
|
|
9
|
+
import '../dto/receive-inventory-order.dto.js';
|
|
10
|
+
import '../dto/receive-inventory-order-item.dto.js';
|
|
11
|
+
import '../dto/ship-inventory-order.dto.js';
|
|
12
|
+
import '../dto/ship-inventory-order-item.dto.js';
|
|
13
|
+
import '../dto/hold-inventory-order.dto.js';
|
|
14
|
+
import '../dto/hold-inventory-order-item.dto.js';
|
|
15
|
+
import '../dto/allocate-inventory-order.dto.js';
|
|
16
|
+
import '../dto/allocate-inventory-order-item.dto.js';
|
|
17
|
+
import '../dto/transfer-order.dto.js';
|
|
18
|
+
import '../dto/transfer-order-item.dto.js';
|
|
19
|
+
import '../dto/transfer-customer-order.dto.js';
|
|
20
|
+
import '../dto/transfer-customer-order-item.dto.js';
|
|
21
|
+
import '../dto/transfer-vendor-order.dto.js';
|
|
22
|
+
import '../dto/transfer-vendor-order-item.dto.js';
|
|
23
|
+
import '../dto/scrape-order.dto.js';
|
|
24
|
+
import '../dto/scrape-order-item.dto.js';
|
|
25
|
+
import '../dto/quality-inspection-order.dto.js';
|
|
26
|
+
import '../dto/quality-inspection-order-item.dto.js';
|
|
27
|
+
import { StockEntityClass, MaterialEntityClass, LocationEntityClass, BatchEntityClass, BatchGroupEntityClass } from '@rytass/wms-module-core';
|
|
28
|
+
import { LocationDto } from '../dto/location.dto.js';
|
|
29
|
+
import { BatchDto } from '../dto/batch.dto.js';
|
|
30
|
+
|
|
31
|
+
let ChangeLogResolver = class ChangeLogResolver {
|
|
32
|
+
material({ materialId }, { loaders }) {
|
|
33
|
+
return loaders.batchSingle.load({
|
|
34
|
+
__entity: MaterialEntityClass,
|
|
35
|
+
__from: { id: materialId },
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
location({ locationId }, { loaders }) {
|
|
39
|
+
return loaders.batchSingle.load({
|
|
40
|
+
__entity: LocationEntityClass,
|
|
41
|
+
__from: { id: locationId },
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
async batch({ batchId }, { loaders }) {
|
|
45
|
+
const { groupId } = await loaders.batchSingle.load({
|
|
46
|
+
__entity: BatchEntityClass,
|
|
47
|
+
__from: { id: batchId },
|
|
48
|
+
});
|
|
49
|
+
return loaders.batchSingle.load({
|
|
50
|
+
__entity: BatchGroupEntityClass,
|
|
51
|
+
__from: { id: groupId },
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
__decorate([
|
|
56
|
+
ResolveField(() => MaterialDto),
|
|
57
|
+
__param(0, Parent()),
|
|
58
|
+
__param(1, Context()),
|
|
59
|
+
__metadata("design:type", Function),
|
|
60
|
+
__metadata("design:paramtypes", [StockEntityClass, Object]),
|
|
61
|
+
__metadata("design:returntype", Promise)
|
|
62
|
+
], ChangeLogResolver.prototype, "material", null);
|
|
63
|
+
__decorate([
|
|
64
|
+
ResolveField(() => LocationDto),
|
|
65
|
+
__param(0, Parent()),
|
|
66
|
+
__param(1, Context()),
|
|
67
|
+
__metadata("design:type", Function),
|
|
68
|
+
__metadata("design:paramtypes", [StockEntityClass, Object]),
|
|
69
|
+
__metadata("design:returntype", Promise)
|
|
70
|
+
], ChangeLogResolver.prototype, "location", null);
|
|
71
|
+
__decorate([
|
|
72
|
+
ResolveField(() => BatchDto),
|
|
73
|
+
__param(0, Parent()),
|
|
74
|
+
__param(1, Context()),
|
|
75
|
+
__metadata("design:type", Function),
|
|
76
|
+
__metadata("design:paramtypes", [StockEntityClass, Object]),
|
|
77
|
+
__metadata("design:returntype", Promise)
|
|
78
|
+
], ChangeLogResolver.prototype, "batch", null);
|
|
79
|
+
ChangeLogResolver = __decorate([
|
|
80
|
+
Resolver(() => ChangeLogDto)
|
|
81
|
+
], ChangeLogResolver);
|
|
82
|
+
|
|
83
|
+
export { ChangeLogResolver };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HoldInventoryOrderDto } from '../dto/hold-inventory-order.dto';
|
|
2
|
+
import { HoldInventoryOrderItemDto } from '../dto/hold-inventory-order-item.dto';
|
|
3
|
+
import { type LoaderType } from '../helpers';
|
|
4
|
+
import { HoldInventoryOrderItemEntityClass } from '@rytass/wms-module-core';
|
|
5
|
+
export declare class HoldInventoryOrderResolver {
|
|
6
|
+
items({ id }: HoldInventoryOrderDto, { loaders }: LoaderType<HoldInventoryOrderItemEntityClass>): Promise<HoldInventoryOrderItemDto[]>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
+
import { ResolveField, Parent, Context, Resolver } from '@nestjs/graphql';
|
|
3
|
+
import { HoldInventoryOrderDto } from '../dto/hold-inventory-order.dto.js';
|
|
4
|
+
import { HoldInventoryOrderItemDto } from '../dto/hold-inventory-order-item.dto.js';
|
|
5
|
+
import { HoldInventoryOrderItemEntityClass } from '@rytass/wms-module-core';
|
|
6
|
+
|
|
7
|
+
let HoldInventoryOrderResolver = class HoldInventoryOrderResolver {
|
|
8
|
+
items({ id }, { loaders }) {
|
|
9
|
+
return loaders.batchMany.load({
|
|
10
|
+
__entity: HoldInventoryOrderItemEntityClass,
|
|
11
|
+
__from: { orderId: id },
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
__decorate([
|
|
16
|
+
ResolveField(() => [HoldInventoryOrderItemDto]),
|
|
17
|
+
__param(0, Parent()),
|
|
18
|
+
__param(1, Context()),
|
|
19
|
+
__metadata("design:type", Function),
|
|
20
|
+
__metadata("design:paramtypes", [HoldInventoryOrderDto, Object]),
|
|
21
|
+
__metadata("design:returntype", Promise)
|
|
22
|
+
], HoldInventoryOrderResolver.prototype, "items", null);
|
|
23
|
+
HoldInventoryOrderResolver = __decorate([
|
|
24
|
+
Resolver(() => HoldInventoryOrderDto)
|
|
25
|
+
], HoldInventoryOrderResolver);
|
|
26
|
+
|
|
27
|
+
export { HoldInventoryOrderResolver };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { LoadersEntityClass, LoaderTypeEntityClass } from '@rytass/wms-module-core';
|
|
2
|
+
import { type LoaderType } from '../helpers';
|
|
3
|
+
export declare class LoaderTypeResolver {
|
|
4
|
+
referencedQuantity({ id }: LoaderTypeEntityClass, { loaders }: LoaderType<LoadersEntityClass>): Promise<number>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
+
import { ResolveField, Int, Parent, Context, Resolver } from '@nestjs/graphql';
|
|
3
|
+
import { LoaderTypeDto } from '../dto/loader-type.dto.js';
|
|
4
|
+
import '../dto/loader.dto.js';
|
|
5
|
+
import '../dto/material.dto.js';
|
|
6
|
+
import '../dto/material-unit.dto.js';
|
|
7
|
+
import '../dto/stock.dto.js';
|
|
8
|
+
import '../dto/sale-order.dto.js';
|
|
9
|
+
import '../dto/receive-inventory-order.dto.js';
|
|
10
|
+
import '../dto/receive-inventory-order-item.dto.js';
|
|
11
|
+
import '../dto/ship-inventory-order.dto.js';
|
|
12
|
+
import '../dto/ship-inventory-order-item.dto.js';
|
|
13
|
+
import '../dto/hold-inventory-order.dto.js';
|
|
14
|
+
import '../dto/hold-inventory-order-item.dto.js';
|
|
15
|
+
import '../dto/allocate-inventory-order.dto.js';
|
|
16
|
+
import '../dto/allocate-inventory-order-item.dto.js';
|
|
17
|
+
import '../dto/transfer-order.dto.js';
|
|
18
|
+
import '../dto/transfer-order-item.dto.js';
|
|
19
|
+
import '../dto/transfer-customer-order.dto.js';
|
|
20
|
+
import '../dto/transfer-customer-order-item.dto.js';
|
|
21
|
+
import '../dto/transfer-vendor-order.dto.js';
|
|
22
|
+
import '../dto/transfer-vendor-order-item.dto.js';
|
|
23
|
+
import '../dto/scrape-order.dto.js';
|
|
24
|
+
import '../dto/scrape-order-item.dto.js';
|
|
25
|
+
import '../dto/quality-inspection-order.dto.js';
|
|
26
|
+
import '../dto/quality-inspection-order-item.dto.js';
|
|
27
|
+
import { LoaderTypeEntityClass, LoadersEntityClass } from '@rytass/wms-module-core';
|
|
28
|
+
|
|
29
|
+
let LoaderTypeResolver = class LoaderTypeResolver {
|
|
30
|
+
async referencedQuantity({ id }, { loaders }) {
|
|
31
|
+
const referenced = await loaders.batchMany.load({
|
|
32
|
+
__entity: LoadersEntityClass,
|
|
33
|
+
__from: { typeId: id },
|
|
34
|
+
});
|
|
35
|
+
return referenced.length;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
__decorate([
|
|
39
|
+
ResolveField(() => Int),
|
|
40
|
+
__param(0, Parent()),
|
|
41
|
+
__param(1, Context()),
|
|
42
|
+
__metadata("design:type", Function),
|
|
43
|
+
__metadata("design:paramtypes", [LoaderTypeEntityClass, Object]),
|
|
44
|
+
__metadata("design:returntype", Promise)
|
|
45
|
+
], LoaderTypeResolver.prototype, "referencedQuantity", null);
|
|
46
|
+
LoaderTypeResolver = __decorate([
|
|
47
|
+
Resolver(() => LoaderTypeDto)
|
|
48
|
+
], LoaderTypeResolver);
|
|
49
|
+
|
|
50
|
+
export { LoaderTypeResolver };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LoadersEntityClass, LoaderTypeEntityClass, LocationEntityClass, StockService } from '@rytass/wms-module-core';
|
|
2
|
+
import { type LoaderType } from '../helpers';
|
|
3
|
+
export declare class LoaderResolver {
|
|
4
|
+
private readonly stockService;
|
|
5
|
+
constructor(stockService: StockService);
|
|
6
|
+
type({ typeId }: LoadersEntityClass, { loaders }: LoaderType<LoaderTypeEntityClass>): Promise<LoaderTypeEntityClass>;
|
|
7
|
+
location({ locationId }: LoadersEntityClass, { loaders }: LoaderType<LocationEntityClass>): Promise<LocationEntityClass>;
|
|
8
|
+
totalQuantity({ id }: LoadersEntityClass): Promise<number>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
+
import { ResolveField, Parent, Context, Int, Resolver } from '@nestjs/graphql';
|
|
3
|
+
import { LoaderTypeDto } from '../dto/loader-type.dto.js';
|
|
4
|
+
import { LoaderDto } from '../dto/loader.dto.js';
|
|
5
|
+
import '../dto/material.dto.js';
|
|
6
|
+
import '../dto/material-unit.dto.js';
|
|
7
|
+
import '../dto/stock.dto.js';
|
|
8
|
+
import '../dto/sale-order.dto.js';
|
|
9
|
+
import '../dto/receive-inventory-order.dto.js';
|
|
10
|
+
import '../dto/receive-inventory-order-item.dto.js';
|
|
11
|
+
import '../dto/ship-inventory-order.dto.js';
|
|
12
|
+
import '../dto/ship-inventory-order-item.dto.js';
|
|
13
|
+
import '../dto/hold-inventory-order.dto.js';
|
|
14
|
+
import '../dto/hold-inventory-order-item.dto.js';
|
|
15
|
+
import '../dto/allocate-inventory-order.dto.js';
|
|
16
|
+
import '../dto/allocate-inventory-order-item.dto.js';
|
|
17
|
+
import '../dto/transfer-order.dto.js';
|
|
18
|
+
import '../dto/transfer-order-item.dto.js';
|
|
19
|
+
import '../dto/transfer-customer-order.dto.js';
|
|
20
|
+
import '../dto/transfer-customer-order-item.dto.js';
|
|
21
|
+
import '../dto/transfer-vendor-order.dto.js';
|
|
22
|
+
import '../dto/transfer-vendor-order-item.dto.js';
|
|
23
|
+
import '../dto/scrape-order.dto.js';
|
|
24
|
+
import '../dto/scrape-order-item.dto.js';
|
|
25
|
+
import '../dto/quality-inspection-order.dto.js';
|
|
26
|
+
import '../dto/quality-inspection-order-item.dto.js';
|
|
27
|
+
import { LoadersEntityClass, StockService, LoaderTypeEntityClass, LocationEntityClass } from '@rytass/wms-module-core';
|
|
28
|
+
import { LocationDto } from '../dto/location.dto.js';
|
|
29
|
+
import _ from 'lodash';
|
|
30
|
+
|
|
31
|
+
let LoaderResolver = class LoaderResolver {
|
|
32
|
+
stockService;
|
|
33
|
+
constructor(stockService) {
|
|
34
|
+
this.stockService = stockService;
|
|
35
|
+
}
|
|
36
|
+
type({ typeId }, { loaders }) {
|
|
37
|
+
return loaders.batchSingle.load({
|
|
38
|
+
__entity: LoaderTypeEntityClass,
|
|
39
|
+
__from: { id: typeId },
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
location({ locationId }, { loaders }) {
|
|
43
|
+
return loaders.batchSingle.load({
|
|
44
|
+
__entity: LocationEntityClass,
|
|
45
|
+
__from: { id: locationId },
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
async totalQuantity({ id }) {
|
|
49
|
+
const [aggregatedStocks] = await this.stockService.findAggregatedStocks({
|
|
50
|
+
loaderId: id,
|
|
51
|
+
aggregated: true,
|
|
52
|
+
});
|
|
53
|
+
if (!aggregatedStocks.length)
|
|
54
|
+
return 0;
|
|
55
|
+
return aggregatedStocks.reduce((total, { quantity }) => total + _.toInteger(quantity), 0);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
__decorate([
|
|
59
|
+
ResolveField(() => LoaderTypeDto),
|
|
60
|
+
__param(0, Parent()),
|
|
61
|
+
__param(1, Context()),
|
|
62
|
+
__metadata("design:type", Function),
|
|
63
|
+
__metadata("design:paramtypes", [LoadersEntityClass, Object]),
|
|
64
|
+
__metadata("design:returntype", void 0)
|
|
65
|
+
], LoaderResolver.prototype, "type", null);
|
|
66
|
+
__decorate([
|
|
67
|
+
ResolveField(() => LocationDto),
|
|
68
|
+
__param(0, Parent()),
|
|
69
|
+
__param(1, Context()),
|
|
70
|
+
__metadata("design:type", Function),
|
|
71
|
+
__metadata("design:paramtypes", [LoadersEntityClass, Object]),
|
|
72
|
+
__metadata("design:returntype", void 0)
|
|
73
|
+
], LoaderResolver.prototype, "location", null);
|
|
74
|
+
__decorate([
|
|
75
|
+
ResolveField(() => Int),
|
|
76
|
+
__param(0, Parent()),
|
|
77
|
+
__metadata("design:type", Function),
|
|
78
|
+
__metadata("design:paramtypes", [LoadersEntityClass]),
|
|
79
|
+
__metadata("design:returntype", Promise)
|
|
80
|
+
], LoaderResolver.prototype, "totalQuantity", null);
|
|
81
|
+
LoaderResolver = __decorate([
|
|
82
|
+
Resolver(() => LoaderDto),
|
|
83
|
+
__metadata("design:paramtypes", [StockService])
|
|
84
|
+
], LoaderResolver);
|
|
85
|
+
|
|
86
|
+
export { LoaderResolver };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LocationDto } from '../dto/location.dto';
|
|
2
|
+
import { MapDataDto } from '../dto/warehouse-map.dto';
|
|
3
|
+
import { type LoaderType } from '../helpers';
|
|
4
|
+
import { WarehouseMapEntity } from '@rytass/wms-base-nestjs-module/models/warehouse-map.entity';
|
|
5
|
+
import { LocationEntityClass } from '@rytass/wms-module-core';
|
|
6
|
+
export declare class LocationResolver {
|
|
7
|
+
mapData({ id }: LocationDto, { loaders }: LoaderType<WarehouseMapEntity>): Promise<MapDataDto | null>;
|
|
8
|
+
parent({ parentId }: LocationEntityClass, { loaders }: LoaderType<LocationEntityClass>): Promise<LocationEntityClass> | null;
|
|
9
|
+
children({ children }: LocationEntityClass): import("@rytass/wms-base-nestjs-module").LocationEntity[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { __decorate, __param, __metadata } from 'tslib';
|
|
2
|
+
import { ResolveField, Parent, Context, Resolver } from '@nestjs/graphql';
|
|
3
|
+
import { LocationDto } from '../dto/location.dto.js';
|
|
4
|
+
import { MapDataDto } from '../dto/warehouse-map.dto.js';
|
|
5
|
+
import { WarehouseMapEntity } from '@rytass/wms-base-nestjs-module/models/warehouse-map.entity';
|
|
6
|
+
import { LocationEntityClass } from '@rytass/wms-module-core';
|
|
7
|
+
|
|
8
|
+
let LocationResolver = class LocationResolver {
|
|
9
|
+
async mapData({ id }, { loaders }) {
|
|
10
|
+
const map = await loaders.batchSingle.load({
|
|
11
|
+
__entity: WarehouseMapEntity,
|
|
12
|
+
__from: { id },
|
|
13
|
+
});
|
|
14
|
+
return map?.mapData || null;
|
|
15
|
+
}
|
|
16
|
+
parent({ parentId }, { loaders }) {
|
|
17
|
+
if (!parentId)
|
|
18
|
+
return null;
|
|
19
|
+
return loaders.batchSingle.load({
|
|
20
|
+
__entity: LocationEntityClass,
|
|
21
|
+
__from: { id: parentId },
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
children({ children }) {
|
|
25
|
+
return children;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
__decorate([
|
|
29
|
+
ResolveField(() => MapDataDto, { nullable: true }),
|
|
30
|
+
__param(0, Parent()),
|
|
31
|
+
__param(1, Context()),
|
|
32
|
+
__metadata("design:type", Function),
|
|
33
|
+
__metadata("design:paramtypes", [LocationDto, Object]),
|
|
34
|
+
__metadata("design:returntype", Promise)
|
|
35
|
+
], LocationResolver.prototype, "mapData", null);
|
|
36
|
+
__decorate([
|
|
37
|
+
ResolveField(() => LocationDto, { nullable: true }),
|
|
38
|
+
__param(0, Parent()),
|
|
39
|
+
__param(1, Context()),
|
|
40
|
+
__metadata("design:type", Function),
|
|
41
|
+
__metadata("design:paramtypes", [LocationEntityClass, Object]),
|
|
42
|
+
__metadata("design:returntype", void 0)
|
|
43
|
+
], LocationResolver.prototype, "parent", null);
|
|
44
|
+
__decorate([
|
|
45
|
+
ResolveField(() => [LocationDto]),
|
|
46
|
+
__param(0, Parent()),
|
|
47
|
+
__metadata("design:type", Function),
|
|
48
|
+
__metadata("design:paramtypes", [LocationEntityClass]),
|
|
49
|
+
__metadata("design:returntype", void 0)
|
|
50
|
+
], LocationResolver.prototype, "children", null);
|
|
51
|
+
LocationResolver = __decorate([
|
|
52
|
+
Resolver(() => LocationDto)
|
|
53
|
+
], LocationResolver);
|
|
54
|
+
|
|
55
|
+
export { LocationResolver };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AggregatedStockDto } from '../dto';
|
|
2
|
+
import { MaterialEntityClass, MaterialUnitEntityClass, StockService, UnitEntityClass } from '@rytass/wms-module-core';
|
|
3
|
+
import { type LoaderType } from '../helpers';
|
|
4
|
+
import { UnitDto } from '../dto/unit.dto';
|
|
5
|
+
export declare class MaterialResolver {
|
|
6
|
+
private readonly stockService;
|
|
7
|
+
constructor(stockService: StockService);
|
|
8
|
+
aggregatedStock({ id }: MaterialEntityClass): Promise<AggregatedStockDto[]>;
|
|
9
|
+
materialUnits({ id }: MaterialEntityClass, { loaders }: LoaderType<MaterialUnitEntityClass>): Promise<MaterialUnitEntityClass[]>;
|
|
10
|
+
baseUnit({ baseUnit }: MaterialEntityClass, { loaders }: LoaderType<UnitEntityClass>): Promise<UnitDto>;
|
|
11
|
+
}
|