@rytass/wms-module-core 0.3.1 → 0.5.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 +48 -1
- package/docs/README.md +2 -0
- package/docs/api-reference.md +38 -1
- package/docs/custom-entities.md +229 -0
- package/index.cjs.js +325 -98
- package/index.js +3 -0
- package/lib/core.module.js +88 -1
- package/lib/models/extensions/allocate-inventory-order/allocate-inventory-order-item.entity.js +1 -0
- package/lib/models/extensions/hold-inventory-order/hold-inventory-order-item.entity.js +1 -0
- package/lib/models/extensions/merge-batch-order/merge-batch-order-item.entity.js +1 -0
- package/lib/models/extensions/quality-inspection-order/quality-inspection-order-item.entity.js +1 -0
- package/lib/models/extensions/reclassify-inventory-order/reclassify-inventory-order-item.entity.js +1 -0
- package/lib/models/extensions/scrape-order/scrape-order-item.entity.js +1 -0
- package/lib/models/extensions/split-batch-order/split-batch-order-item.entity.js +1 -0
- package/lib/models/extensions/transfer-customer-order/transfer-customer-order-item.entity.js +1 -0
- package/lib/models/extensions/transfer-order/transfer-order-item.entity.js +1 -0
- package/lib/models/extensions/transfer-vendor-order/transfer-vendor-order-item.entity.js +1 -0
- package/lib/models/index.d.ts +1 -0
- package/lib/models/metadata/index.d.ts +1 -0
- package/lib/models/metadata/order.entity.d.ts +9 -0
- package/lib/models/metadata/order.entity.js +5 -0
- package/lib/models/models.module.js +21 -1
- package/lib/models/wms-entities.d.ts +45 -0
- package/lib/models/wms-entities.js +82 -0
- package/lib/services/allocate-inventory-order.service.d.ts +3 -1
- package/lib/services/allocate-inventory-order.service.js +10 -6
- package/lib/services/batch.service.js +5 -3
- package/lib/services/hold-inventory-order.service.d.ts +3 -1
- package/lib/services/hold-inventory-order.service.js +10 -6
- package/lib/services/loader.service.js +2 -0
- package/lib/services/location.service.js +2 -0
- package/lib/services/material.service.js +2 -0
- package/lib/services/merge-batch-order.service.d.ts +3 -1
- package/lib/services/merge-batch-order.service.js +13 -9
- package/lib/services/quality-inspection-order.service.d.ts +3 -1
- package/lib/services/quality-inspection-order.service.js +12 -8
- package/lib/services/receive-inventory-order.service.d.ts +3 -1
- package/lib/services/receive-inventory-order.service.js +17 -13
- package/lib/services/reclassify-inventory-order.service.d.ts +3 -1
- package/lib/services/reclassify-inventory-order.service.js +15 -11
- package/lib/services/scrape.service.d.ts +3 -1
- package/lib/services/scrape.service.js +9 -5
- package/lib/services/ship-inventory-order.service.d.ts +3 -1
- package/lib/services/ship-inventory-order.service.js +21 -17
- package/lib/services/split-batch-order.service.d.ts +3 -1
- package/lib/services/split-batch-order.service.js +13 -9
- package/lib/services/stock.service.d.ts +3 -1
- package/lib/services/stock.service.js +23 -12
- package/lib/services/transfer-customer-order.service.d.ts +3 -1
- package/lib/services/transfer-customer-order.service.js +12 -8
- package/lib/services/transfer-order.service.d.ts +3 -1
- package/lib/services/transfer-order.service.js +11 -7
- package/lib/services/transfer-vendor-order.service.d.ts +3 -1
- package/lib/services/transfer-vendor-order.service.js +12 -8
- package/lib/services/unit.service.js +2 -0
- package/lib/services/warehouse-map.service.d.ts +3 -1
- package/lib/services/warehouse-map.service.js +9 -6
- package/lib/typings/entity-overrides.d.ts +34 -0
- package/lib/typings/entity-overrides.js +7 -0
- package/package.json +2 -2
package/index.cjs.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
var tslib = require('tslib');
|
|
4
4
|
var common = require('@nestjs/common');
|
|
5
5
|
var wmsBaseNestjsModule = require('@rytass/wms-base-nestjs-module');
|
|
6
|
+
var warehouseMap_entity = require('@rytass/wms-base-nestjs-module/models/warehouse-map.entity');
|
|
6
7
|
var typeorm$1 = require('@nestjs/typeorm');
|
|
7
8
|
var node_async_hooks = require('node:async_hooks');
|
|
8
|
-
var warehouseMap_entity = require('@rytass/wms-base-nestjs-module/models/warehouse-map.entity');
|
|
9
9
|
var typeorm = require('typeorm');
|
|
10
10
|
var luxon = require('luxon');
|
|
11
11
|
|
|
@@ -387,6 +387,8 @@ exports.MaterialUnitEntityClass = tslib.__decorate([
|
|
|
387
387
|
typeorm.TableInheritance({ column: { type: 'varchar', name: 'entityName' } })
|
|
388
388
|
], exports.MaterialUnitEntityClass);
|
|
389
389
|
|
|
390
|
+
const OrderEntity = Symbol('OrderEntity');
|
|
391
|
+
|
|
390
392
|
const SaleOrderEntity = Symbol('SaleOrderEntity');
|
|
391
393
|
exports.SaleOrderEntityClass = class SaleOrderEntityClass {
|
|
392
394
|
id;
|
|
@@ -2395,7 +2397,26 @@ const entities = [
|
|
|
2395
2397
|
[ScrapeOrderItemEntity, exports.ScrapeOrderItemEntityClass],
|
|
2396
2398
|
[ScrapeOrderChangeEntity, exports.ScrapeOrderChangeEntityClass],
|
|
2397
2399
|
];
|
|
2398
|
-
|
|
2400
|
+
/**
|
|
2401
|
+
* The overridable entities are deliberately absent: `WmsModuleCoreModule` binds
|
|
2402
|
+
* each of them to whatever the matching `WMSBaseModuleOptions` entity resolved
|
|
2403
|
+
* to, which only a module importing `WMSBaseModule` can read. Binding them here
|
|
2404
|
+
* as well would leave two live bindings for one token, and the loser would be
|
|
2405
|
+
* whichever module the injector happened to reach first.
|
|
2406
|
+
*
|
|
2407
|
+
* Their classes stay in `entities` above so TypeORM still registers them — each
|
|
2408
|
+
* is the root of the single-table hierarchy a consumer's override extends.
|
|
2409
|
+
*/
|
|
2410
|
+
const EXTERNALLY_BOUND_ENTITIES = new Set([
|
|
2411
|
+
MaterialEntity,
|
|
2412
|
+
BatchEntity,
|
|
2413
|
+
LocationEntity,
|
|
2414
|
+
StockEntity,
|
|
2415
|
+
WarehouseMapEntity,
|
|
2416
|
+
]);
|
|
2417
|
+
const ResolvedEntitiesProviders = entities
|
|
2418
|
+
.filter(([token]) => !EXTERNALLY_BOUND_ENTITIES.has(token))
|
|
2419
|
+
.map(([token, entity]) => ({
|
|
2399
2420
|
provide: token,
|
|
2400
2421
|
useValue: entity,
|
|
2401
2422
|
}));
|
|
@@ -2409,8 +2430,81 @@ ModelsModule = tslib.__decorate([
|
|
|
2409
2430
|
})
|
|
2410
2431
|
], ModelsModule);
|
|
2411
2432
|
|
|
2433
|
+
/**
|
|
2434
|
+
* The entity classes this package actually reads and writes, after applying the
|
|
2435
|
+
* consumer's `WMSBaseModuleOptions` entity overrides.
|
|
2436
|
+
*
|
|
2437
|
+
* Every overridable entity is bound to a `Symbol` that `WmsModuleCoreModule`
|
|
2438
|
+
* resolves from the base module's `PROVIDE_*_ENTITY` tokens. Injecting them one
|
|
2439
|
+
* by one works, but most services and resolvers need three or four at once, so
|
|
2440
|
+
* this collects them behind a single dependency.
|
|
2441
|
+
*
|
|
2442
|
+
* Only entities the base module lets a consumer replace are here. Entities this
|
|
2443
|
+
* package owns outright — batch groups, loaders, units, every order extension —
|
|
2444
|
+
* have no override to follow and are referenced by class directly.
|
|
2445
|
+
*/
|
|
2446
|
+
exports.WmsEntities = class WmsEntities {
|
|
2447
|
+
material;
|
|
2448
|
+
batch;
|
|
2449
|
+
location;
|
|
2450
|
+
stock;
|
|
2451
|
+
order;
|
|
2452
|
+
warehouseMap;
|
|
2453
|
+
constructor(dataSource, material, batch, location, stock, order, warehouseMap) {
|
|
2454
|
+
this.material = material;
|
|
2455
|
+
this.batch = batch;
|
|
2456
|
+
this.location = location;
|
|
2457
|
+
this.stock = stock;
|
|
2458
|
+
this.order = order;
|
|
2459
|
+
this.warehouseMap = warehouseMap;
|
|
2460
|
+
this.assertRegistered(dataSource);
|
|
2461
|
+
}
|
|
2462
|
+
/**
|
|
2463
|
+
* Fail during instantiation if an override was never registered with TypeORM.
|
|
2464
|
+
*
|
|
2465
|
+
* The module cannot register it: `TypeOrmModule.forFeature()` runs while the
|
|
2466
|
+
* module graph is assembled, and an override is only known once the options
|
|
2467
|
+
* resolve. Registering the built-in class does bring the override's *columns*
|
|
2468
|
+
* into the table (TypeORM copies a single-table child's columns into its
|
|
2469
|
+
* parent), which makes the omission easy to miss — everything looks right
|
|
2470
|
+
* until the first query fails with a bare `EntityMetadataNotFoundError` from
|
|
2471
|
+
* somewhere deep in a resolver.
|
|
2472
|
+
*
|
|
2473
|
+
* This runs in the constructor rather than `onModuleInit` so it lands before
|
|
2474
|
+
* any service's own startup work touches the database.
|
|
2475
|
+
*/
|
|
2476
|
+
assertRegistered(dataSource) {
|
|
2477
|
+
const missing = [
|
|
2478
|
+
['materialEntity', this.material],
|
|
2479
|
+
['batchEntity', this.batch],
|
|
2480
|
+
['locationEntity', this.location],
|
|
2481
|
+
['stockEntity', this.stock],
|
|
2482
|
+
['orderEntity', this.order],
|
|
2483
|
+
['warehouseMapEntity', this.warehouseMap],
|
|
2484
|
+
].filter(([, entity]) => !dataSource.hasMetadata(entity));
|
|
2485
|
+
if (!missing.length)
|
|
2486
|
+
return;
|
|
2487
|
+
const details = missing
|
|
2488
|
+
.map(([option, entity]) => `${option}: ${entity.name}`)
|
|
2489
|
+
.join(', ');
|
|
2490
|
+
const names = missing.map(([, entity]) => entity.name).join(', ');
|
|
2491
|
+
throw new Error(`WmsModuleCoreModule: configured entities are not registered with TypeORM (${details}). Add them to your DataSource "entities", or import TypeOrmModule.forFeature([${names}]) somewhere in your app when using autoLoadEntities.`);
|
|
2492
|
+
}
|
|
2493
|
+
};
|
|
2494
|
+
exports.WmsEntities = tslib.__decorate([
|
|
2495
|
+
common.Injectable(),
|
|
2496
|
+
tslib.__param(1, common.Inject(MaterialEntity)),
|
|
2497
|
+
tslib.__param(2, common.Inject(BatchEntity)),
|
|
2498
|
+
tslib.__param(3, common.Inject(LocationEntity)),
|
|
2499
|
+
tslib.__param(4, common.Inject(StockEntity)),
|
|
2500
|
+
tslib.__param(5, common.Inject(OrderEntity)),
|
|
2501
|
+
tslib.__param(6, common.Inject(WarehouseMapEntity)),
|
|
2502
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource, Object, Object, Object, Object, Object, Object])
|
|
2503
|
+
], exports.WmsEntities);
|
|
2504
|
+
|
|
2412
2505
|
exports.StockService = class StockService {
|
|
2413
2506
|
dataSource;
|
|
2507
|
+
entities;
|
|
2414
2508
|
stockEntity;
|
|
2415
2509
|
materialEntity;
|
|
2416
2510
|
coreOptions;
|
|
@@ -2432,8 +2526,9 @@ exports.StockService = class StockService {
|
|
|
2432
2526
|
status: status,
|
|
2433
2527
|
};
|
|
2434
2528
|
};
|
|
2435
|
-
constructor(dataSource, stockEntity, materialEntity, coreOptions) {
|
|
2529
|
+
constructor(dataSource, entities, stockEntity, materialEntity, coreOptions) {
|
|
2436
2530
|
this.dataSource = dataSource;
|
|
2531
|
+
this.entities = entities;
|
|
2437
2532
|
this.stockEntity = stockEntity;
|
|
2438
2533
|
this.materialEntity = materialEntity;
|
|
2439
2534
|
this.coreOptions = coreOptions;
|
|
@@ -2473,7 +2568,7 @@ exports.StockService = class StockService {
|
|
|
2473
2568
|
}
|
|
2474
2569
|
async onModuleInit() {
|
|
2475
2570
|
const loaderTypeRepo = this.dataSource.getRepository(exports.LoaderTypeEntityClass);
|
|
2476
|
-
const locationRepo = this.dataSource.getRepository(
|
|
2571
|
+
const locationRepo = this.dataSource.getRepository(this.entities.location);
|
|
2477
2572
|
const loaderRepo = this.dataSource.getRepository(exports.LoadersEntityClass);
|
|
2478
2573
|
// Ensure default loader type exists
|
|
2479
2574
|
let loaderType = await loaderTypeRepo.findOneBy({
|
|
@@ -2591,15 +2686,22 @@ exports.StockService = class StockService {
|
|
|
2591
2686
|
}
|
|
2592
2687
|
}
|
|
2593
2688
|
if (options.materialKey)
|
|
2594
|
-
queryBuilder.innerJoin(
|
|
2689
|
+
queryBuilder.innerJoin(
|
|
2690
|
+
// The configured entity, not the built-in class: this follows whatever
|
|
2691
|
+
// table that entity is mapped to. (TypeORM resolves an entity in a
|
|
2692
|
+
// hand-written join to its table name and does not append the
|
|
2693
|
+
// single-table discriminator, so for a child of `MaterialEntityClass` the
|
|
2694
|
+
// emitted SQL is unchanged — this keeps the service from reaching past
|
|
2695
|
+
// its own configuration, it is not a behaviour fix on its own.)
|
|
2696
|
+
this.materialEntity, 'mk', 'mk.id = stock."materialId" AND mk.key ILIKE :materialKey', {
|
|
2595
2697
|
materialKey: `%${options.materialKey}%`,
|
|
2596
2698
|
});
|
|
2597
2699
|
if (options.batchKey)
|
|
2598
|
-
queryBuilder.innerJoin(
|
|
2700
|
+
queryBuilder.innerJoin(this.entities.batch, 'bk', 'bk.id = stock."batchId" AND bk.key ILIKE :batchKey', {
|
|
2599
2701
|
batchKey: `%${options.batchKey}%`,
|
|
2600
2702
|
});
|
|
2601
2703
|
if (options.locationKey)
|
|
2602
|
-
queryBuilder.innerJoin(
|
|
2704
|
+
queryBuilder.innerJoin(this.entities.location, 'lk', 'lk.id = stock."locationId" AND lk.key ILIKE :locationKey', {
|
|
2603
2705
|
locationKey: `%${options.locationKey}%`,
|
|
2604
2706
|
});
|
|
2605
2707
|
if (options.loaderKey)
|
|
@@ -2824,10 +2926,11 @@ exports.StockService = class StockService {
|
|
|
2824
2926
|
};
|
|
2825
2927
|
exports.StockService = tslib.__decorate([
|
|
2826
2928
|
common.Injectable(),
|
|
2827
|
-
tslib.__param(
|
|
2828
|
-
tslib.__param(
|
|
2829
|
-
tslib.__param(
|
|
2830
|
-
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
2929
|
+
tslib.__param(2, common.Inject(StockEntity)),
|
|
2930
|
+
tslib.__param(3, common.Inject(MaterialEntity)),
|
|
2931
|
+
tslib.__param(4, common.Inject(WMS_CORE_MODULE_OPTIONS)),
|
|
2932
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
2933
|
+
exports.WmsEntities, Object, Function, Object])
|
|
2831
2934
|
], exports.StockService);
|
|
2832
2935
|
|
|
2833
2936
|
/**
|
|
@@ -3248,7 +3351,7 @@ exports.BatchService = class BatchService {
|
|
|
3248
3351
|
}
|
|
3249
3352
|
}
|
|
3250
3353
|
async getBatch({ manager = this.dataSource.manager, ...options }) {
|
|
3251
|
-
const batchRepository = manager.getRepository(
|
|
3354
|
+
const batchRepository = manager.getRepository(this.batchEntity);
|
|
3252
3355
|
const batchGroupRepository = manager.getRepository(this.batchGroupEntity);
|
|
3253
3356
|
const unsplittedCondition = {
|
|
3254
3357
|
saleId: typeorm.IsNull(),
|
|
@@ -3278,7 +3381,7 @@ exports.BatchService = class BatchService {
|
|
|
3278
3381
|
return batch;
|
|
3279
3382
|
}
|
|
3280
3383
|
async splitBatch({ manager = this.dataSource.manager, ...options }) {
|
|
3281
|
-
const batchRepository = manager.getRepository(
|
|
3384
|
+
const batchRepository = manager.getRepository(this.batchEntity);
|
|
3282
3385
|
const batch = await batchRepository.findOneOrFail({
|
|
3283
3386
|
where: { id: options.id },
|
|
3284
3387
|
relations: ['batchGroup'],
|
|
@@ -3373,6 +3476,7 @@ exports.HelperService = tslib.__decorate([
|
|
|
3373
3476
|
*/
|
|
3374
3477
|
exports.ReceiveInventoryOrderService = class ReceiveInventoryOrderService {
|
|
3375
3478
|
dataSource;
|
|
3479
|
+
entities;
|
|
3376
3480
|
materialService;
|
|
3377
3481
|
batchService;
|
|
3378
3482
|
helperService;
|
|
@@ -3380,8 +3484,9 @@ exports.ReceiveInventoryOrderService = class ReceiveInventoryOrderService {
|
|
|
3380
3484
|
receiveInventoryOrderEntity;
|
|
3381
3485
|
receiveInventoryOrderItemEntity;
|
|
3382
3486
|
selectQueryBuilder;
|
|
3383
|
-
constructor(dataSource, materialService, batchService, helperService, stockService, receiveInventoryOrderEntity, receiveInventoryOrderItemEntity) {
|
|
3487
|
+
constructor(dataSource, entities, materialService, batchService, helperService, stockService, receiveInventoryOrderEntity, receiveInventoryOrderItemEntity) {
|
|
3384
3488
|
this.dataSource = dataSource;
|
|
3489
|
+
this.entities = entities;
|
|
3385
3490
|
this.materialService = materialService;
|
|
3386
3491
|
this.batchService = batchService;
|
|
3387
3492
|
this.helperService = helperService;
|
|
@@ -3431,8 +3536,8 @@ exports.ReceiveInventoryOrderService = class ReceiveInventoryOrderService {
|
|
|
3431
3536
|
};
|
|
3432
3537
|
}
|
|
3433
3538
|
processReceiveInventoryOrderItems(items, orderId, manager) {
|
|
3434
|
-
const materialRepository = manager.getRepository(
|
|
3435
|
-
const locationRepository = manager.getRepository(
|
|
3539
|
+
const materialRepository = manager.getRepository(this.materialService.materialEntity);
|
|
3540
|
+
const locationRepository = manager.getRepository(this.entities.location);
|
|
3436
3541
|
const loaderRepository = manager.getRepository(exports.LoadersEntityClass);
|
|
3437
3542
|
return items.reduce(async (accPromise, item) => {
|
|
3438
3543
|
const acc = await accPromise;
|
|
@@ -3477,7 +3582,7 @@ exports.ReceiveInventoryOrderService = class ReceiveInventoryOrderService {
|
|
|
3477
3582
|
}, Promise.resolve([]));
|
|
3478
3583
|
}
|
|
3479
3584
|
async createReceiveInventoryOrder({ manager = this.dataSource.manager, ...options }) {
|
|
3480
|
-
const orderRepository = manager.getRepository(
|
|
3585
|
+
const orderRepository = manager.getRepository(this.entities.order);
|
|
3481
3586
|
const receiveInventoryOrderRepository = manager.getRepository(this.receiveInventoryOrderEntity);
|
|
3482
3587
|
const receiveInventoryOrderItemRepository = manager.getRepository(this.receiveInventoryOrderItemEntity);
|
|
3483
3588
|
// create base order
|
|
@@ -3611,10 +3716,10 @@ exports.ReceiveInventoryOrderService = class ReceiveInventoryOrderService {
|
|
|
3611
3716
|
return this.dataSource.transaction(async (manager) => {
|
|
3612
3717
|
const changeRepository = manager.getRepository(exports.ReceiveInventoryOrderChangeEntityClass);
|
|
3613
3718
|
const itemRepository = manager.getRepository(this.receiveInventoryOrderItemEntity);
|
|
3614
|
-
const orderRepository = manager.getRepository(
|
|
3615
|
-
const locationRepository = manager.getRepository(
|
|
3719
|
+
const orderRepository = manager.getRepository(this.entities.order);
|
|
3720
|
+
const locationRepository = manager.getRepository(this.entities.location);
|
|
3616
3721
|
const loaderRepository = manager.getRepository(exports.LoadersEntityClass);
|
|
3617
|
-
const stockRepository = manager.getRepository(
|
|
3722
|
+
const stockRepository = manager.getRepository(this.entities.stock);
|
|
3618
3723
|
const items = await itemRepository.find({
|
|
3619
3724
|
where: { id: typeorm.In(options.map((o) => o.itemId)) },
|
|
3620
3725
|
relations: ['changes'],
|
|
@@ -3704,9 +3809,10 @@ exports.ReceiveInventoryOrderService = class ReceiveInventoryOrderService {
|
|
|
3704
3809
|
};
|
|
3705
3810
|
exports.ReceiveInventoryOrderService = tslib.__decorate([
|
|
3706
3811
|
common.Injectable(),
|
|
3707
|
-
tslib.__param(
|
|
3708
|
-
tslib.__param(
|
|
3812
|
+
tslib.__param(6, common.Inject(ReceiveInventoryOrderEntity)),
|
|
3813
|
+
tslib.__param(7, common.Inject(ReceiveInventoryOrderItemEntity)),
|
|
3709
3814
|
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
3815
|
+
exports.WmsEntities,
|
|
3710
3816
|
exports.MaterialService,
|
|
3711
3817
|
exports.BatchService,
|
|
3712
3818
|
exports.HelperService,
|
|
@@ -3721,6 +3827,7 @@ exports.ReceiveInventoryOrderService = tslib.__decorate([
|
|
|
3721
3827
|
*/
|
|
3722
3828
|
exports.ShipInventoryOrderService = class ShipInventoryOrderService {
|
|
3723
3829
|
dataSource;
|
|
3830
|
+
entities;
|
|
3724
3831
|
materialService;
|
|
3725
3832
|
batchService;
|
|
3726
3833
|
stockService;
|
|
@@ -3729,8 +3836,9 @@ exports.ShipInventoryOrderService = class ShipInventoryOrderService {
|
|
|
3729
3836
|
shipInventoryOrderReferenceEntity;
|
|
3730
3837
|
saleOrderEntity;
|
|
3731
3838
|
selectQueryBuilder;
|
|
3732
|
-
constructor(dataSource, materialService, batchService, stockService, shipInventoryOrderEntity, shipInventoryOrderItemEntity, shipInventoryOrderReferenceEntity, saleOrderEntity) {
|
|
3839
|
+
constructor(dataSource, entities, materialService, batchService, stockService, shipInventoryOrderEntity, shipInventoryOrderItemEntity, shipInventoryOrderReferenceEntity, saleOrderEntity) {
|
|
3733
3840
|
this.dataSource = dataSource;
|
|
3841
|
+
this.entities = entities;
|
|
3734
3842
|
this.materialService = materialService;
|
|
3735
3843
|
this.batchService = batchService;
|
|
3736
3844
|
this.stockService = stockService;
|
|
@@ -3772,7 +3880,7 @@ exports.ShipInventoryOrderService = class ShipInventoryOrderService {
|
|
|
3772
3880
|
};
|
|
3773
3881
|
}
|
|
3774
3882
|
processShipInventoryOrderReferences(references, manager) {
|
|
3775
|
-
const materialRepository = manager.getRepository(
|
|
3883
|
+
const materialRepository = manager.getRepository(this.materialService.materialEntity);
|
|
3776
3884
|
const saleOrderRepository = manager.getRepository(this.saleOrderEntity);
|
|
3777
3885
|
return references.reduce(async (accPromise, reference) => {
|
|
3778
3886
|
const acc = await accPromise;
|
|
@@ -3803,8 +3911,8 @@ exports.ShipInventoryOrderService = class ShipInventoryOrderService {
|
|
|
3803
3911
|
async processShipInventoryOrderItems(items, manager) {
|
|
3804
3912
|
const shipInventoryOrderItemRepository = manager.getRepository(this.shipInventoryOrderItemEntity);
|
|
3805
3913
|
const shipInventoryOrderChangeRepository = manager.getRepository(exports.ShipInventoryOrderChangeEntityClass);
|
|
3806
|
-
const orderRepository = manager.getRepository(
|
|
3807
|
-
const stockRepository = manager.getRepository(
|
|
3914
|
+
const orderRepository = manager.getRepository(this.entities.order);
|
|
3915
|
+
const stockRepository = manager.getRepository(this.entities.stock);
|
|
3808
3916
|
await Promise.all(items.map(async (data) => {
|
|
3809
3917
|
// Ensure required fields are present
|
|
3810
3918
|
if (!data.batchId || !data.materialId)
|
|
@@ -3855,7 +3963,7 @@ exports.ShipInventoryOrderService = class ShipInventoryOrderService {
|
|
|
3855
3963
|
}));
|
|
3856
3964
|
}
|
|
3857
3965
|
async createShipInventoryOrder({ manager = this.dataSource.manager, ...options }) {
|
|
3858
|
-
const orderRepository = manager.getRepository(
|
|
3966
|
+
const orderRepository = manager.getRepository(this.entities.order);
|
|
3859
3967
|
const shipInventoryOrderRepository = manager.getRepository(this.shipInventoryOrderEntity);
|
|
3860
3968
|
const shipInventoryOrderReferenceRepository = manager.getRepository(this.shipInventoryOrderReferenceEntity);
|
|
3861
3969
|
// create base order
|
|
@@ -3883,7 +3991,7 @@ exports.ShipInventoryOrderService = class ShipInventoryOrderService {
|
|
|
3883
3991
|
const shipInventoryOrderRepository = manager.getRepository(this.shipInventoryOrderEntity);
|
|
3884
3992
|
const shipInventoryOrderReferenceRepository = manager.getRepository(this.shipInventoryOrderReferenceEntity);
|
|
3885
3993
|
const shipInventoryOrderItemRepository = manager.getRepository(this.shipInventoryOrderItemEntity);
|
|
3886
|
-
const materialRepository = manager.getRepository(
|
|
3994
|
+
const materialRepository = manager.getRepository(this.materialService.materialEntity);
|
|
3887
3995
|
const order = await shipInventoryOrderRepository.findOneByOrFail({
|
|
3888
3996
|
id,
|
|
3889
3997
|
removedAt: typeorm.IsNull(),
|
|
@@ -4015,8 +4123,8 @@ exports.ShipInventoryOrderService = class ShipInventoryOrderService {
|
|
|
4015
4123
|
async cancelShipInternal(options, manager) {
|
|
4016
4124
|
const changeRepository = manager.getRepository(exports.ShipInventoryOrderChangeEntityClass);
|
|
4017
4125
|
const itemRepository = manager.getRepository(this.shipInventoryOrderItemEntity);
|
|
4018
|
-
const orderRepository = manager.getRepository(
|
|
4019
|
-
const stockRepository = manager.getRepository(
|
|
4126
|
+
const orderRepository = manager.getRepository(this.entities.order);
|
|
4127
|
+
const stockRepository = manager.getRepository(this.entities.stock);
|
|
4020
4128
|
const items = await itemRepository.find({
|
|
4021
4129
|
where: { id: typeorm.In(options.map((o) => o.itemId)) },
|
|
4022
4130
|
relations: ['changes'],
|
|
@@ -4172,8 +4280,8 @@ exports.ShipInventoryOrderService = class ShipInventoryOrderService {
|
|
|
4172
4280
|
return this.dataSource.transaction(async (manager) => {
|
|
4173
4281
|
const changeRepository = manager.getRepository(exports.ShipInventoryOrderChangeEntityClass);
|
|
4174
4282
|
const itemRepository = manager.getRepository(this.shipInventoryOrderItemEntity);
|
|
4175
|
-
const orderRepository = manager.getRepository(
|
|
4176
|
-
const stockRepository = manager.getRepository(
|
|
4283
|
+
const orderRepository = manager.getRepository(this.entities.order);
|
|
4284
|
+
const stockRepository = manager.getRepository(this.entities.stock);
|
|
4177
4285
|
const items = await itemRepository.find({
|
|
4178
4286
|
where: { id: typeorm.In(options.map((option) => option.itemId)) },
|
|
4179
4287
|
relations: ['changes'],
|
|
@@ -4244,11 +4352,12 @@ exports.ShipInventoryOrderService = class ShipInventoryOrderService {
|
|
|
4244
4352
|
};
|
|
4245
4353
|
exports.ShipInventoryOrderService = tslib.__decorate([
|
|
4246
4354
|
common.Injectable(),
|
|
4247
|
-
tslib.__param(
|
|
4248
|
-
tslib.__param(
|
|
4249
|
-
tslib.__param(
|
|
4250
|
-
tslib.__param(
|
|
4355
|
+
tslib.__param(5, common.Inject(ShipInventoryOrderEntity)),
|
|
4356
|
+
tslib.__param(6, common.Inject(ShipInventoryOrderItemEntity)),
|
|
4357
|
+
tslib.__param(7, common.Inject(ShipInventoryOrderReferenceEntity)),
|
|
4358
|
+
tslib.__param(8, common.Inject(SaleOrderEntity)),
|
|
4251
4359
|
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
4360
|
+
exports.WmsEntities,
|
|
4252
4361
|
exports.MaterialService,
|
|
4253
4362
|
exports.BatchService,
|
|
4254
4363
|
exports.StockService, Object, Object, Object, Object])
|
|
@@ -4347,6 +4456,7 @@ exports.UnitService = tslib.__decorate([
|
|
|
4347
4456
|
|
|
4348
4457
|
exports.TransferOrderService = class TransferOrderService {
|
|
4349
4458
|
dataSource;
|
|
4459
|
+
entities;
|
|
4350
4460
|
helperService;
|
|
4351
4461
|
materialService;
|
|
4352
4462
|
batchService;
|
|
@@ -4356,8 +4466,9 @@ exports.TransferOrderService = class TransferOrderService {
|
|
|
4356
4466
|
stockEntity;
|
|
4357
4467
|
seqPrefix = 'TO';
|
|
4358
4468
|
transferOrderRepository;
|
|
4359
|
-
constructor(dataSource, helperService, materialService, batchService, stockService, transferOrderEntity, transferOrderItemEntity, stockEntity) {
|
|
4469
|
+
constructor(dataSource, entities, helperService, materialService, batchService, stockService, transferOrderEntity, transferOrderItemEntity, stockEntity) {
|
|
4360
4470
|
this.dataSource = dataSource;
|
|
4471
|
+
this.entities = entities;
|
|
4361
4472
|
this.helperService = helperService;
|
|
4362
4473
|
this.materialService = materialService;
|
|
4363
4474
|
this.batchService = batchService;
|
|
@@ -4372,7 +4483,7 @@ exports.TransferOrderService = class TransferOrderService {
|
|
|
4372
4483
|
transferOrder: manager.getRepository(this.transferOrderEntity),
|
|
4373
4484
|
transferOrderItem: manager.getRepository(this.transferOrderItemEntity),
|
|
4374
4485
|
transferOrderChange: manager.getRepository(exports.TransferOrderChangeEntityClass),
|
|
4375
|
-
order: manager.getRepository(
|
|
4486
|
+
order: manager.getRepository(this.entities.order),
|
|
4376
4487
|
stock: manager.getRepository(this.stockEntity),
|
|
4377
4488
|
loader: manager.getRepository(exports.LoadersEntityClass),
|
|
4378
4489
|
};
|
|
@@ -4850,7 +4961,7 @@ exports.TransferOrderService = class TransferOrderService {
|
|
|
4850
4961
|
manager,
|
|
4851
4962
|
});
|
|
4852
4963
|
// Record the transfer change
|
|
4853
|
-
const base = await manager.getRepository(
|
|
4964
|
+
const base = await manager.getRepository(this.entities.order).save({});
|
|
4854
4965
|
// Availability check at the IN_TRANSFER coord — must have ≥ qty to drain
|
|
4855
4966
|
await this.stockService.validateStockAvailability({
|
|
4856
4967
|
materialId: item.materialId,
|
|
@@ -4908,10 +5019,11 @@ exports.TransferOrderService = class TransferOrderService {
|
|
|
4908
5019
|
};
|
|
4909
5020
|
exports.TransferOrderService = tslib.__decorate([
|
|
4910
5021
|
common.Injectable(),
|
|
4911
|
-
tslib.__param(
|
|
4912
|
-
tslib.__param(
|
|
4913
|
-
tslib.__param(
|
|
5022
|
+
tslib.__param(6, common.Inject(TransferOrderEntity)),
|
|
5023
|
+
tslib.__param(7, common.Inject(TransferOrderItemEntity)),
|
|
5024
|
+
tslib.__param(8, common.Inject(StockEntity)),
|
|
4914
5025
|
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
5026
|
+
exports.WmsEntities,
|
|
4915
5027
|
exports.HelperService,
|
|
4916
5028
|
exports.MaterialService,
|
|
4917
5029
|
exports.BatchService,
|
|
@@ -4920,6 +5032,7 @@ exports.TransferOrderService = tslib.__decorate([
|
|
|
4920
5032
|
|
|
4921
5033
|
exports.HoldInventoryOrderService = class HoldInventoryOrderService {
|
|
4922
5034
|
dataSource;
|
|
5035
|
+
entities;
|
|
4923
5036
|
helperService;
|
|
4924
5037
|
materialService;
|
|
4925
5038
|
batchService;
|
|
@@ -4928,8 +5041,9 @@ exports.HoldInventoryOrderService = class HoldInventoryOrderService {
|
|
|
4928
5041
|
holdInventoryOrderItemEntity;
|
|
4929
5042
|
stockEntity;
|
|
4930
5043
|
seqPrefix = 'HIO';
|
|
4931
|
-
constructor(dataSource, helperService, materialService, batchService, stockService, holdInventoryOrderEntity, holdInventoryOrderItemEntity, stockEntity) {
|
|
5044
|
+
constructor(dataSource, entities, helperService, materialService, batchService, stockService, holdInventoryOrderEntity, holdInventoryOrderItemEntity, stockEntity) {
|
|
4932
5045
|
this.dataSource = dataSource;
|
|
5046
|
+
this.entities = entities;
|
|
4933
5047
|
this.helperService = helperService;
|
|
4934
5048
|
this.materialService = materialService;
|
|
4935
5049
|
this.batchService = batchService;
|
|
@@ -4944,7 +5058,7 @@ exports.HoldInventoryOrderService = class HoldInventoryOrderService {
|
|
|
4944
5058
|
holdInventoryOrderItem: manager.getRepository(this.holdInventoryOrderItemEntity),
|
|
4945
5059
|
holdInventoryOrderChange: manager.getRepository(exports.HoldInventoryOrderChangeEntityClass),
|
|
4946
5060
|
stock: manager.getRepository(this.stockEntity),
|
|
4947
|
-
order: manager.getRepository(
|
|
5061
|
+
order: manager.getRepository(this.entities.order),
|
|
4948
5062
|
};
|
|
4949
5063
|
}
|
|
4950
5064
|
async processHoldInventoryOrderItems(items, repos, manager) {
|
|
@@ -5135,10 +5249,11 @@ exports.HoldInventoryOrderService = class HoldInventoryOrderService {
|
|
|
5135
5249
|
};
|
|
5136
5250
|
exports.HoldInventoryOrderService = tslib.__decorate([
|
|
5137
5251
|
common.Injectable(),
|
|
5138
|
-
tslib.__param(
|
|
5139
|
-
tslib.__param(
|
|
5140
|
-
tslib.__param(
|
|
5252
|
+
tslib.__param(6, common.Inject(HoldInventoryOrderEntity)),
|
|
5253
|
+
tslib.__param(7, common.Inject(HoldInventoryOrderItemEntity)),
|
|
5254
|
+
tslib.__param(8, common.Inject(StockEntity)),
|
|
5141
5255
|
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
5256
|
+
exports.WmsEntities,
|
|
5142
5257
|
exports.HelperService,
|
|
5143
5258
|
exports.MaterialService,
|
|
5144
5259
|
exports.BatchService,
|
|
@@ -5147,6 +5262,7 @@ exports.HoldInventoryOrderService = tslib.__decorate([
|
|
|
5147
5262
|
|
|
5148
5263
|
exports.AllocateInventoryOrderService = class AllocateInventoryOrderService {
|
|
5149
5264
|
dataSource;
|
|
5265
|
+
entities;
|
|
5150
5266
|
helperService;
|
|
5151
5267
|
materialService;
|
|
5152
5268
|
batchService;
|
|
@@ -5155,8 +5271,9 @@ exports.AllocateInventoryOrderService = class AllocateInventoryOrderService {
|
|
|
5155
5271
|
allocateInventoryOrderItemEntity;
|
|
5156
5272
|
stockEntity;
|
|
5157
5273
|
seqPrefix = 'AIO';
|
|
5158
|
-
constructor(dataSource, helperService, materialService, batchService, stockService, allocateInventoryOrderEntity, allocateInventoryOrderItemEntity, stockEntity) {
|
|
5274
|
+
constructor(dataSource, entities, helperService, materialService, batchService, stockService, allocateInventoryOrderEntity, allocateInventoryOrderItemEntity, stockEntity) {
|
|
5159
5275
|
this.dataSource = dataSource;
|
|
5276
|
+
this.entities = entities;
|
|
5160
5277
|
this.helperService = helperService;
|
|
5161
5278
|
this.materialService = materialService;
|
|
5162
5279
|
this.batchService = batchService;
|
|
@@ -5170,7 +5287,7 @@ exports.AllocateInventoryOrderService = class AllocateInventoryOrderService {
|
|
|
5170
5287
|
allocateInventoryOrder: manager.getRepository(this.allocateInventoryOrderEntity),
|
|
5171
5288
|
allocateInventoryOrderItem: manager.getRepository(this.allocateInventoryOrderItemEntity),
|
|
5172
5289
|
allocateInventoryOrderChange: manager.getRepository(exports.AllocateInventoryOrderChangeEntityClass),
|
|
5173
|
-
order: manager.getRepository(
|
|
5290
|
+
order: manager.getRepository(this.entities.order),
|
|
5174
5291
|
stock: manager.getRepository(this.stockEntity),
|
|
5175
5292
|
};
|
|
5176
5293
|
}
|
|
@@ -5376,10 +5493,11 @@ exports.AllocateInventoryOrderService = class AllocateInventoryOrderService {
|
|
|
5376
5493
|
};
|
|
5377
5494
|
exports.AllocateInventoryOrderService = tslib.__decorate([
|
|
5378
5495
|
common.Injectable(),
|
|
5379
|
-
tslib.__param(
|
|
5380
|
-
tslib.__param(
|
|
5381
|
-
tslib.__param(
|
|
5496
|
+
tslib.__param(6, common.Inject(AllocateInventoryOrderEntity)),
|
|
5497
|
+
tslib.__param(7, common.Inject(AllocateInventoryOrderItemEntity)),
|
|
5498
|
+
tslib.__param(8, common.Inject(StockEntity)),
|
|
5382
5499
|
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
5500
|
+
exports.WmsEntities,
|
|
5383
5501
|
exports.HelperService,
|
|
5384
5502
|
exports.MaterialService,
|
|
5385
5503
|
exports.BatchService,
|
|
@@ -5388,6 +5506,7 @@ exports.AllocateInventoryOrderService = tslib.__decorate([
|
|
|
5388
5506
|
|
|
5389
5507
|
exports.SplitBatchOrderService = class SplitBatchOrderService {
|
|
5390
5508
|
dataSource;
|
|
5509
|
+
entities;
|
|
5391
5510
|
materialService;
|
|
5392
5511
|
batchService;
|
|
5393
5512
|
helperService;
|
|
@@ -5395,8 +5514,9 @@ exports.SplitBatchOrderService = class SplitBatchOrderService {
|
|
|
5395
5514
|
splitBatchOrderEntity;
|
|
5396
5515
|
splitBatchOrderItemEntity;
|
|
5397
5516
|
seqPrefix = 'SBO';
|
|
5398
|
-
constructor(dataSource, materialService, batchService, helperService, stockService, splitBatchOrderEntity, splitBatchOrderItemEntity) {
|
|
5517
|
+
constructor(dataSource, entities, materialService, batchService, helperService, stockService, splitBatchOrderEntity, splitBatchOrderItemEntity) {
|
|
5399
5518
|
this.dataSource = dataSource;
|
|
5519
|
+
this.entities = entities;
|
|
5400
5520
|
this.materialService = materialService;
|
|
5401
5521
|
this.batchService = batchService;
|
|
5402
5522
|
this.helperService = helperService;
|
|
@@ -5409,9 +5529,9 @@ exports.SplitBatchOrderService = class SplitBatchOrderService {
|
|
|
5409
5529
|
const splitBatchOrderRepository = manager.getRepository(this.splitBatchOrderEntity);
|
|
5410
5530
|
const splitBatchOrderItemRepository = manager.getRepository(this.splitBatchOrderItemEntity);
|
|
5411
5531
|
const splitBatchOrderChangeRepository = manager.getRepository(exports.SplitBatchOrderChangeEntityClass);
|
|
5412
|
-
const orderRepository = manager.getRepository(
|
|
5413
|
-
const stockRepository = manager.getRepository(
|
|
5414
|
-
const batchRepository = manager.getRepository(
|
|
5532
|
+
const orderRepository = manager.getRepository(this.entities.order);
|
|
5533
|
+
const stockRepository = manager.getRepository(this.entities.stock);
|
|
5534
|
+
const batchRepository = manager.getRepository(this.entities.batch);
|
|
5415
5535
|
// Get original batch information
|
|
5416
5536
|
const originalBatch = await batchRepository.findOneOrFail({
|
|
5417
5537
|
where: { id: options.batchId },
|
|
@@ -5480,9 +5600,10 @@ exports.SplitBatchOrderService = class SplitBatchOrderService {
|
|
|
5480
5600
|
};
|
|
5481
5601
|
exports.SplitBatchOrderService = tslib.__decorate([
|
|
5482
5602
|
common.Injectable(),
|
|
5483
|
-
tslib.__param(
|
|
5484
|
-
tslib.__param(
|
|
5603
|
+
tslib.__param(6, common.Inject(SplitBatchOrderEntity)),
|
|
5604
|
+
tslib.__param(7, common.Inject(SplitBatchOrderItemEntity)),
|
|
5485
5605
|
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
5606
|
+
exports.WmsEntities,
|
|
5486
5607
|
exports.MaterialService,
|
|
5487
5608
|
exports.BatchService,
|
|
5488
5609
|
exports.HelperService,
|
|
@@ -5491,6 +5612,7 @@ exports.SplitBatchOrderService = tslib.__decorate([
|
|
|
5491
5612
|
|
|
5492
5613
|
exports.MergeBatchOrderService = class MergeBatchOrderService {
|
|
5493
5614
|
dataSource;
|
|
5615
|
+
entities;
|
|
5494
5616
|
materialService;
|
|
5495
5617
|
batchService;
|
|
5496
5618
|
helperService;
|
|
@@ -5498,8 +5620,9 @@ exports.MergeBatchOrderService = class MergeBatchOrderService {
|
|
|
5498
5620
|
mergeBatchOrderEntity;
|
|
5499
5621
|
mergeBatchOrderItemEntity;
|
|
5500
5622
|
seqPrefix = 'MBO';
|
|
5501
|
-
constructor(dataSource, materialService, batchService, helperService, stockService, mergeBatchOrderEntity, mergeBatchOrderItemEntity) {
|
|
5623
|
+
constructor(dataSource, entities, materialService, batchService, helperService, stockService, mergeBatchOrderEntity, mergeBatchOrderItemEntity) {
|
|
5502
5624
|
this.dataSource = dataSource;
|
|
5625
|
+
this.entities = entities;
|
|
5503
5626
|
this.materialService = materialService;
|
|
5504
5627
|
this.batchService = batchService;
|
|
5505
5628
|
this.helperService = helperService;
|
|
@@ -5512,9 +5635,9 @@ exports.MergeBatchOrderService = class MergeBatchOrderService {
|
|
|
5512
5635
|
const mergeBatchOrderRepository = manager.getRepository(this.mergeBatchOrderEntity);
|
|
5513
5636
|
const mergeBatchOrderItemRepository = manager.getRepository(this.mergeBatchOrderItemEntity);
|
|
5514
5637
|
const mergeBatchOrderChangeRepository = manager.getRepository(exports.MergeBatchOrderChangeEntityClass);
|
|
5515
|
-
const orderRepository = manager.getRepository(
|
|
5516
|
-
const stockRepository = manager.getRepository(
|
|
5517
|
-
const batchRepository = manager.getRepository(
|
|
5638
|
+
const orderRepository = manager.getRepository(this.entities.order);
|
|
5639
|
+
const stockRepository = manager.getRepository(this.entities.stock);
|
|
5640
|
+
const batchRepository = manager.getRepository(this.entities.batch);
|
|
5518
5641
|
// Verify all source batches have identical metadata (except key and groupId)
|
|
5519
5642
|
const sourceBatches = await batchRepository.find({
|
|
5520
5643
|
where: { id: typeorm.In(options.items.map((item) => item.batchId)) },
|
|
@@ -5617,9 +5740,10 @@ exports.MergeBatchOrderService = class MergeBatchOrderService {
|
|
|
5617
5740
|
};
|
|
5618
5741
|
exports.MergeBatchOrderService = tslib.__decorate([
|
|
5619
5742
|
common.Injectable(),
|
|
5620
|
-
tslib.__param(
|
|
5621
|
-
tslib.__param(
|
|
5743
|
+
tslib.__param(6, common.Inject(MergeBatchOrderEntity)),
|
|
5744
|
+
tslib.__param(7, common.Inject(MergeBatchOrderItemEntity)),
|
|
5622
5745
|
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
5746
|
+
exports.WmsEntities,
|
|
5623
5747
|
exports.MaterialService,
|
|
5624
5748
|
exports.BatchService,
|
|
5625
5749
|
exports.HelperService,
|
|
@@ -5628,6 +5752,7 @@ exports.MergeBatchOrderService = tslib.__decorate([
|
|
|
5628
5752
|
|
|
5629
5753
|
exports.ReclassifyInventoryOrderService = class ReclassifyInventoryOrderService {
|
|
5630
5754
|
dataSource;
|
|
5755
|
+
entities;
|
|
5631
5756
|
materialService;
|
|
5632
5757
|
batchService;
|
|
5633
5758
|
helperService;
|
|
@@ -5635,8 +5760,9 @@ exports.ReclassifyInventoryOrderService = class ReclassifyInventoryOrderService
|
|
|
5635
5760
|
reclassifyInventoryOrderEntity;
|
|
5636
5761
|
reclassifyInventoryOrderItemEntity;
|
|
5637
5762
|
seqPrefix = 'RCO';
|
|
5638
|
-
constructor(dataSource, materialService, batchService, helperService, stockService, reclassifyInventoryOrderEntity, reclassifyInventoryOrderItemEntity) {
|
|
5763
|
+
constructor(dataSource, entities, materialService, batchService, helperService, stockService, reclassifyInventoryOrderEntity, reclassifyInventoryOrderItemEntity) {
|
|
5639
5764
|
this.dataSource = dataSource;
|
|
5765
|
+
this.entities = entities;
|
|
5640
5766
|
this.materialService = materialService;
|
|
5641
5767
|
this.batchService = batchService;
|
|
5642
5768
|
this.helperService = helperService;
|
|
@@ -5649,10 +5775,10 @@ exports.ReclassifyInventoryOrderService = class ReclassifyInventoryOrderService
|
|
|
5649
5775
|
const reclassifyOrderRepository = manager.getRepository(this.reclassifyInventoryOrderEntity);
|
|
5650
5776
|
const reclassifyOrderItemRepository = manager.getRepository(this.reclassifyInventoryOrderItemEntity);
|
|
5651
5777
|
const reclassifyOrderChangeRepository = manager.getRepository(exports.ReclassifyInventoryOrderChangeEntityClass);
|
|
5652
|
-
const orderRepository = manager.getRepository(
|
|
5653
|
-
const stockRepository = manager.getRepository(
|
|
5654
|
-
const batchRepository = manager.getRepository(
|
|
5655
|
-
const materialRepository = manager.getRepository(
|
|
5778
|
+
const orderRepository = manager.getRepository(this.entities.order);
|
|
5779
|
+
const stockRepository = manager.getRepository(this.entities.stock);
|
|
5780
|
+
const batchRepository = manager.getRepository(this.entities.batch);
|
|
5781
|
+
const materialRepository = manager.getRepository(this.materialService.materialEntity);
|
|
5656
5782
|
// Ensure new material exists
|
|
5657
5783
|
const material = await materialRepository.findOneOrFail({
|
|
5658
5784
|
where: { key: options.materialKey },
|
|
@@ -5740,9 +5866,10 @@ exports.ReclassifyInventoryOrderService = class ReclassifyInventoryOrderService
|
|
|
5740
5866
|
};
|
|
5741
5867
|
exports.ReclassifyInventoryOrderService = tslib.__decorate([
|
|
5742
5868
|
common.Injectable(),
|
|
5743
|
-
tslib.__param(
|
|
5744
|
-
tslib.__param(
|
|
5869
|
+
tslib.__param(6, common.Inject(ReclassifyInventoryOrderEntity)),
|
|
5870
|
+
tslib.__param(7, common.Inject(ReclassifyInventoryOrderItemEntity)),
|
|
5745
5871
|
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
5872
|
+
exports.WmsEntities,
|
|
5746
5873
|
exports.MaterialService,
|
|
5747
5874
|
exports.BatchService,
|
|
5748
5875
|
exports.HelperService,
|
|
@@ -5751,6 +5878,7 @@ exports.ReclassifyInventoryOrderService = tslib.__decorate([
|
|
|
5751
5878
|
|
|
5752
5879
|
exports.TransferVendorOrderService = class TransferVendorOrderService {
|
|
5753
5880
|
dataSource;
|
|
5881
|
+
entities;
|
|
5754
5882
|
helperService;
|
|
5755
5883
|
materialService;
|
|
5756
5884
|
batchService;
|
|
@@ -5759,8 +5887,9 @@ exports.TransferVendorOrderService = class TransferVendorOrderService {
|
|
|
5759
5887
|
transferVendorOrderItemEntity;
|
|
5760
5888
|
stockEntity;
|
|
5761
5889
|
seqPrefix = 'TVO';
|
|
5762
|
-
constructor(dataSource, helperService, materialService, batchService, stockService, transferVendorOrderEntity, transferVendorOrderItemEntity, stockEntity) {
|
|
5890
|
+
constructor(dataSource, entities, helperService, materialService, batchService, stockService, transferVendorOrderEntity, transferVendorOrderItemEntity, stockEntity) {
|
|
5763
5891
|
this.dataSource = dataSource;
|
|
5892
|
+
this.entities = entities;
|
|
5764
5893
|
this.helperService = helperService;
|
|
5765
5894
|
this.materialService = materialService;
|
|
5766
5895
|
this.batchService = batchService;
|
|
@@ -5774,9 +5903,9 @@ exports.TransferVendorOrderService = class TransferVendorOrderService {
|
|
|
5774
5903
|
transferVendorOrder: manager.getRepository(this.transferVendorOrderEntity),
|
|
5775
5904
|
transferVendorOrderItem: manager.getRepository(this.transferVendorOrderItemEntity),
|
|
5776
5905
|
transferVendorOrderChange: manager.getRepository(exports.TransferVendorOrderChangeEntityClass),
|
|
5777
|
-
order: manager.getRepository(
|
|
5906
|
+
order: manager.getRepository(this.entities.order),
|
|
5778
5907
|
stock: manager.getRepository(this.stockEntity),
|
|
5779
|
-
location: manager.getRepository(
|
|
5908
|
+
location: manager.getRepository(this.entities.location),
|
|
5780
5909
|
loader: manager.getRepository(exports.LoadersEntityClass),
|
|
5781
5910
|
};
|
|
5782
5911
|
}
|
|
@@ -5960,10 +6089,11 @@ exports.TransferVendorOrderService = class TransferVendorOrderService {
|
|
|
5960
6089
|
};
|
|
5961
6090
|
exports.TransferVendorOrderService = tslib.__decorate([
|
|
5962
6091
|
common.Injectable(),
|
|
5963
|
-
tslib.__param(
|
|
5964
|
-
tslib.__param(
|
|
5965
|
-
tslib.__param(
|
|
6092
|
+
tslib.__param(6, common.Inject(TransferVendorOrderEntity)),
|
|
6093
|
+
tslib.__param(7, common.Inject(TransferVendorOrderItemEntity)),
|
|
6094
|
+
tslib.__param(8, common.Inject(StockEntity)),
|
|
5966
6095
|
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
6096
|
+
exports.WmsEntities,
|
|
5967
6097
|
exports.HelperService,
|
|
5968
6098
|
exports.MaterialService,
|
|
5969
6099
|
exports.BatchService,
|
|
@@ -5972,13 +6102,15 @@ exports.TransferVendorOrderService = tslib.__decorate([
|
|
|
5972
6102
|
|
|
5973
6103
|
exports.QualityInspectionOrderService = class QualityInspectionOrderService {
|
|
5974
6104
|
dataSource;
|
|
6105
|
+
entities;
|
|
5975
6106
|
qualityInspectionOrderEntity;
|
|
5976
6107
|
qualityInspectionOrderItemEntity;
|
|
5977
6108
|
batchService;
|
|
5978
6109
|
materialService;
|
|
5979
6110
|
stockService;
|
|
5980
|
-
constructor(dataSource, qualityInspectionOrderEntity, qualityInspectionOrderItemEntity, batchService, materialService, stockService) {
|
|
6111
|
+
constructor(dataSource, entities, qualityInspectionOrderEntity, qualityInspectionOrderItemEntity, batchService, materialService, stockService) {
|
|
5981
6112
|
this.dataSource = dataSource;
|
|
6113
|
+
this.entities = entities;
|
|
5982
6114
|
this.qualityInspectionOrderEntity = qualityInspectionOrderEntity;
|
|
5983
6115
|
this.qualityInspectionOrderItemEntity = qualityInspectionOrderItemEntity;
|
|
5984
6116
|
this.batchService = batchService;
|
|
@@ -5986,11 +6118,11 @@ exports.QualityInspectionOrderService = class QualityInspectionOrderService {
|
|
|
5986
6118
|
this.stockService = stockService;
|
|
5987
6119
|
}
|
|
5988
6120
|
async inspect({ manager = this.dataSource.manager, options, }) {
|
|
5989
|
-
const orderRepository = manager.getRepository(
|
|
6121
|
+
const orderRepository = manager.getRepository(this.entities.order);
|
|
5990
6122
|
const qualityInspectionOrderRepository = manager.getRepository(this.qualityInspectionOrderEntity);
|
|
5991
6123
|
const qualityInspectionOrderItemRepository = manager.getRepository(this.qualityInspectionOrderItemEntity);
|
|
5992
6124
|
const qualityInspectionOrderChangeRepository = manager.getRepository(exports.QualityInspectionOrderChangeEntityClass);
|
|
5993
|
-
const stockRepository = manager.getRepository(
|
|
6125
|
+
const stockRepository = manager.getRepository(this.entities.stock);
|
|
5994
6126
|
const order = await qualityInspectionOrderRepository.save(qualityInspectionOrderRepository.create({
|
|
5995
6127
|
key: options.key,
|
|
5996
6128
|
note: options.note,
|
|
@@ -6041,15 +6173,17 @@ exports.QualityInspectionOrderService = class QualityInspectionOrderService {
|
|
|
6041
6173
|
};
|
|
6042
6174
|
exports.QualityInspectionOrderService = tslib.__decorate([
|
|
6043
6175
|
common.Injectable(),
|
|
6044
|
-
tslib.__param(
|
|
6045
|
-
tslib.__param(
|
|
6046
|
-
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
6176
|
+
tslib.__param(2, common.Inject(QualityInspectionOrderEntity)),
|
|
6177
|
+
tslib.__param(3, common.Inject(QualityInspectionOrderItemEntity)),
|
|
6178
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
6179
|
+
exports.WmsEntities, Object, Object, exports.BatchService,
|
|
6047
6180
|
exports.MaterialService,
|
|
6048
6181
|
exports.StockService])
|
|
6049
6182
|
], exports.QualityInspectionOrderService);
|
|
6050
6183
|
|
|
6051
6184
|
exports.TransferCustomerOrderService = class TransferCustomerOrderService {
|
|
6052
6185
|
dataSource;
|
|
6186
|
+
entities;
|
|
6053
6187
|
helperService;
|
|
6054
6188
|
materialService;
|
|
6055
6189
|
batchService;
|
|
@@ -6058,8 +6192,9 @@ exports.TransferCustomerOrderService = class TransferCustomerOrderService {
|
|
|
6058
6192
|
transferCustomerOrderItemEntity;
|
|
6059
6193
|
stockEntity;
|
|
6060
6194
|
seqPrefix = 'TCO';
|
|
6061
|
-
constructor(dataSource, helperService, materialService, batchService, stockService, transferCustomerOrderEntity, transferCustomerOrderItemEntity, stockEntity) {
|
|
6195
|
+
constructor(dataSource, entities, helperService, materialService, batchService, stockService, transferCustomerOrderEntity, transferCustomerOrderItemEntity, stockEntity) {
|
|
6062
6196
|
this.dataSource = dataSource;
|
|
6197
|
+
this.entities = entities;
|
|
6063
6198
|
this.helperService = helperService;
|
|
6064
6199
|
this.materialService = materialService;
|
|
6065
6200
|
this.batchService = batchService;
|
|
@@ -6073,9 +6208,9 @@ exports.TransferCustomerOrderService = class TransferCustomerOrderService {
|
|
|
6073
6208
|
transferCustomerOrder: manager.getRepository(this.transferCustomerOrderEntity),
|
|
6074
6209
|
transferCustomerOrderItem: manager.getRepository(this.transferCustomerOrderItemEntity),
|
|
6075
6210
|
transferCustomerOrderChange: manager.getRepository(exports.TransferCustomerOrderChangeEntityClass),
|
|
6076
|
-
order: manager.getRepository(
|
|
6211
|
+
order: manager.getRepository(this.entities.order),
|
|
6077
6212
|
stock: manager.getRepository(this.stockEntity),
|
|
6078
|
-
location: manager.getRepository(
|
|
6213
|
+
location: manager.getRepository(this.entities.location),
|
|
6079
6214
|
loader: manager.getRepository(exports.LoadersEntityClass),
|
|
6080
6215
|
};
|
|
6081
6216
|
}
|
|
@@ -6259,10 +6394,11 @@ exports.TransferCustomerOrderService = class TransferCustomerOrderService {
|
|
|
6259
6394
|
};
|
|
6260
6395
|
exports.TransferCustomerOrderService = tslib.__decorate([
|
|
6261
6396
|
common.Injectable(),
|
|
6262
|
-
tslib.__param(
|
|
6263
|
-
tslib.__param(
|
|
6264
|
-
tslib.__param(
|
|
6397
|
+
tslib.__param(6, common.Inject(TransferCustomerOrderEntity)),
|
|
6398
|
+
tslib.__param(7, common.Inject(TransferCustomerOrderItemEntity)),
|
|
6399
|
+
tslib.__param(8, common.Inject(StockEntity)),
|
|
6265
6400
|
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
6401
|
+
exports.WmsEntities,
|
|
6266
6402
|
exports.HelperService,
|
|
6267
6403
|
exports.MaterialService,
|
|
6268
6404
|
exports.BatchService,
|
|
@@ -6285,14 +6421,16 @@ exports.SaleOrderService = tslib.__decorate([
|
|
|
6285
6421
|
|
|
6286
6422
|
exports.ScrapeService = class ScrapeService {
|
|
6287
6423
|
dataSource;
|
|
6424
|
+
entities;
|
|
6288
6425
|
helperService;
|
|
6289
6426
|
materialService;
|
|
6290
6427
|
stockService;
|
|
6291
6428
|
scrapeOrderEntity;
|
|
6292
6429
|
stockEntity;
|
|
6293
6430
|
seqPrefix = 'SCR';
|
|
6294
|
-
constructor(dataSource, helperService, materialService, stockService, scrapeOrderEntity, stockEntity) {
|
|
6431
|
+
constructor(dataSource, entities, helperService, materialService, stockService, scrapeOrderEntity, stockEntity) {
|
|
6295
6432
|
this.dataSource = dataSource;
|
|
6433
|
+
this.entities = entities;
|
|
6296
6434
|
this.helperService = helperService;
|
|
6297
6435
|
this.materialService = materialService;
|
|
6298
6436
|
this.stockService = stockService;
|
|
@@ -6304,7 +6442,7 @@ exports.ScrapeService = class ScrapeService {
|
|
|
6304
6442
|
scrapeOrder: manager.getRepository(this.scrapeOrderEntity),
|
|
6305
6443
|
scrapeOrderItem: manager.getRepository(exports.ScrapeOrderItemEntityClass),
|
|
6306
6444
|
scrapeOrderChange: manager.getRepository(exports.ScrapeOrderChangeEntityClass),
|
|
6307
|
-
order: manager.getRepository(
|
|
6445
|
+
order: manager.getRepository(this.entities.order),
|
|
6308
6446
|
stock: manager.getRepository(this.stockEntity),
|
|
6309
6447
|
};
|
|
6310
6448
|
}
|
|
@@ -6357,9 +6495,10 @@ exports.ScrapeService = class ScrapeService {
|
|
|
6357
6495
|
};
|
|
6358
6496
|
exports.ScrapeService = tslib.__decorate([
|
|
6359
6497
|
common.Injectable(),
|
|
6360
|
-
tslib.__param(
|
|
6361
|
-
tslib.__param(
|
|
6498
|
+
tslib.__param(5, common.Inject(ScrapeOrderEntity)),
|
|
6499
|
+
tslib.__param(6, common.Inject(StockEntity)),
|
|
6362
6500
|
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
6501
|
+
exports.WmsEntities,
|
|
6363
6502
|
exports.HelperService,
|
|
6364
6503
|
exports.MaterialService,
|
|
6365
6504
|
exports.StockService, Object, Object])
|
|
@@ -6367,20 +6506,22 @@ exports.ScrapeService = tslib.__decorate([
|
|
|
6367
6506
|
|
|
6368
6507
|
exports.WarehouseMapDataService = class WarehouseMapDataService {
|
|
6369
6508
|
dataSource;
|
|
6509
|
+
entities;
|
|
6370
6510
|
defaultMapDataKey = 'DEFAULT_MAP_DATA_KEY';
|
|
6371
6511
|
warehouseMapDataRepository;
|
|
6372
|
-
constructor(dataSource) {
|
|
6512
|
+
constructor(dataSource, entities) {
|
|
6373
6513
|
this.dataSource = dataSource;
|
|
6514
|
+
this.entities = entities;
|
|
6374
6515
|
this.warehouseMapDataRepository =
|
|
6375
|
-
this.dataSource.getRepository(
|
|
6516
|
+
this.dataSource.getRepository(this.entities.warehouseMap);
|
|
6376
6517
|
}
|
|
6377
6518
|
onApplicationBootstrap() {
|
|
6378
6519
|
this.dataSource.transaction(async (manager) => {
|
|
6379
6520
|
const defaultMapData = await manager
|
|
6380
|
-
.getRepository(
|
|
6521
|
+
.getRepository(this.entities.warehouseMap)
|
|
6381
6522
|
.findOneBy({ id: this.defaultMapDataKey });
|
|
6382
6523
|
if (!defaultMapData) {
|
|
6383
|
-
await manager.getRepository(
|
|
6524
|
+
await manager.getRepository(this.entities.warehouseMap).save(manager.getRepository(this.entities.warehouseMap).create({
|
|
6384
6525
|
id: this.defaultMapDataKey,
|
|
6385
6526
|
mapData: {
|
|
6386
6527
|
id: this.defaultMapDataKey,
|
|
@@ -6394,7 +6535,8 @@ exports.WarehouseMapDataService = class WarehouseMapDataService {
|
|
|
6394
6535
|
};
|
|
6395
6536
|
exports.WarehouseMapDataService = tslib.__decorate([
|
|
6396
6537
|
common.Injectable(),
|
|
6397
|
-
tslib.__metadata("design:paramtypes", [typeorm.DataSource
|
|
6538
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
6539
|
+
exports.WmsEntities])
|
|
6398
6540
|
], exports.WarehouseMapDataService);
|
|
6399
6541
|
|
|
6400
6542
|
/** DI token holding the resolved {@link WmsEventModuleOptions}. */
|
|
@@ -6561,6 +6703,82 @@ StockChangeSubscriber = tslib.__decorate([
|
|
|
6561
6703
|
], StockChangeSubscriber);
|
|
6562
6704
|
|
|
6563
6705
|
var WmsModuleCoreModule_1;
|
|
6706
|
+
/**
|
|
6707
|
+
* The entity Symbols a consumer can rebind, each paired with the base module's
|
|
6708
|
+
* token carrying their replacement and the class it falls back to.
|
|
6709
|
+
*
|
|
6710
|
+
* These Symbols are how the whole package reaches an entity — no service,
|
|
6711
|
+
* DataLoader or query imports the class directly — so rebinding one here swaps
|
|
6712
|
+
* that entity everywhere at once. Resolution happens at injection time, from
|
|
6713
|
+
* tokens `WMSBaseModule` derives from its own options, which means an override
|
|
6714
|
+
* may arrive from `forRoot` or from an async options factory alike and cannot
|
|
6715
|
+
* drift from the repository the base module resolved: both come from one option.
|
|
6716
|
+
*/
|
|
6717
|
+
const OVERRIDABLE_ENTITIES = [
|
|
6718
|
+
{
|
|
6719
|
+
option: 'materialEntity',
|
|
6720
|
+
token: MaterialEntity,
|
|
6721
|
+
provide: wmsBaseNestjsModule.PROVIDE_MATERIAL_ENTITY,
|
|
6722
|
+
fallback: exports.MaterialEntityClass,
|
|
6723
|
+
requires: 'description / baseUnit / isActive',
|
|
6724
|
+
},
|
|
6725
|
+
{
|
|
6726
|
+
option: 'batchEntity',
|
|
6727
|
+
token: BatchEntity,
|
|
6728
|
+
provide: wmsBaseNestjsModule.PROVIDE_BATCH_ENTITY,
|
|
6729
|
+
fallback: exports.BatchEntityClass,
|
|
6730
|
+
},
|
|
6731
|
+
{
|
|
6732
|
+
option: 'locationEntity',
|
|
6733
|
+
token: LocationEntity,
|
|
6734
|
+
provide: wmsBaseNestjsModule.PROVIDE_LOCATION_ENTITY,
|
|
6735
|
+
fallback: exports.LocationEntityClass,
|
|
6736
|
+
requires: 'description / isActive',
|
|
6737
|
+
},
|
|
6738
|
+
{
|
|
6739
|
+
option: 'stockEntity',
|
|
6740
|
+
token: StockEntity,
|
|
6741
|
+
provide: wmsBaseNestjsModule.PROVIDE_STOCK_ENTITY,
|
|
6742
|
+
fallback: exports.StockEntityClass,
|
|
6743
|
+
requires: 'loaderId / rollbackedAt',
|
|
6744
|
+
},
|
|
6745
|
+
{
|
|
6746
|
+
option: 'orderEntity',
|
|
6747
|
+
token: OrderEntity,
|
|
6748
|
+
provide: wmsBaseNestjsModule.PROVIDE_ORDER_ENTITY,
|
|
6749
|
+
fallback: wmsBaseNestjsModule.OrderEntity,
|
|
6750
|
+
},
|
|
6751
|
+
{
|
|
6752
|
+
option: 'warehouseMapEntity',
|
|
6753
|
+
token: WarehouseMapEntity,
|
|
6754
|
+
provide: wmsBaseNestjsModule.PROVIDE_WAREHOUSE_MAP_ENTITY,
|
|
6755
|
+
fallback: warehouseMap_entity.WarehouseMapEntity,
|
|
6756
|
+
},
|
|
6757
|
+
];
|
|
6758
|
+
const entityProviders = OVERRIDABLE_ENTITIES.map(({ option, token, provide, fallback, requires }) => ({
|
|
6759
|
+
provide: token,
|
|
6760
|
+
useFactory: (configured) => {
|
|
6761
|
+
if (!configured || configured === fallback)
|
|
6762
|
+
return fallback;
|
|
6763
|
+
// `WMSBaseModuleOptions` only asks for a child of the *base* entity, but
|
|
6764
|
+
// this package reads the columns its own subclass adds. TypeScript's
|
|
6765
|
+
// structural typing happily accepts a sibling that never declares them,
|
|
6766
|
+
// which then surfaces as a missing column mid-query — a much worse error
|
|
6767
|
+
// to work backwards from than this one.
|
|
6768
|
+
if (!(configured.prototype instanceof fallback))
|
|
6769
|
+
throw new Error(`WmsModuleCoreModule: ${option} "${configured.name}" must extend ${fallback.name} (a @ChildEntity() of it)${requires
|
|
6770
|
+
? `. @rytass/wms-module-core reads ${requires} from it, which the base entity does not declare`
|
|
6771
|
+
: ''}.`);
|
|
6772
|
+
return configured;
|
|
6773
|
+
},
|
|
6774
|
+
inject: [provide],
|
|
6775
|
+
}));
|
|
6776
|
+
/** Bound after {@link entityProviders}, since it reads every one of them. */
|
|
6777
|
+
const resolvedEntityProviders = [...entityProviders, exports.WmsEntities];
|
|
6778
|
+
const exportedEntityTokens = [
|
|
6779
|
+
...OVERRIDABLE_ENTITIES.map(({ token }) => token),
|
|
6780
|
+
exports.WmsEntities,
|
|
6781
|
+
];
|
|
6564
6782
|
const exportDependencies = [
|
|
6565
6783
|
exports.LoaderService,
|
|
6566
6784
|
exports.MaterialService,
|
|
@@ -6593,6 +6811,7 @@ exports.WmsModuleCoreModule = WmsModuleCoreModule_1 = class WmsModuleCoreModule
|
|
|
6593
6811
|
providers: [
|
|
6594
6812
|
...exportDependencies,
|
|
6595
6813
|
StockChangeSubscriber,
|
|
6814
|
+
...resolvedEntityProviders,
|
|
6596
6815
|
{ provide: WMS_CORE_MODULE_OPTIONS, useValue: coreOptions },
|
|
6597
6816
|
{ provide: WMS_STOCK_ENRICH, useValue: !!coreOptions.enrichStockEvents },
|
|
6598
6817
|
],
|
|
@@ -6600,6 +6819,7 @@ exports.WmsModuleCoreModule = WmsModuleCoreModule_1 = class WmsModuleCoreModule
|
|
|
6600
6819
|
...exportDependencies,
|
|
6601
6820
|
coreModule,
|
|
6602
6821
|
ModelsModule,
|
|
6822
|
+
...exportedEntityTokens,
|
|
6603
6823
|
WMS_CORE_MODULE_OPTIONS,
|
|
6604
6824
|
],
|
|
6605
6825
|
};
|
|
@@ -6613,6 +6833,7 @@ exports.WmsModuleCoreModule = WmsModuleCoreModule_1 = class WmsModuleCoreModule
|
|
|
6613
6833
|
providers: [
|
|
6614
6834
|
...exportDependencies,
|
|
6615
6835
|
StockChangeSubscriber,
|
|
6836
|
+
...resolvedEntityProviders,
|
|
6616
6837
|
{
|
|
6617
6838
|
provide: WMS_CORE_MODULE_OPTIONS,
|
|
6618
6839
|
useValue: {
|
|
@@ -6627,6 +6848,7 @@ exports.WmsModuleCoreModule = WmsModuleCoreModule_1 = class WmsModuleCoreModule
|
|
|
6627
6848
|
...exportDependencies,
|
|
6628
6849
|
coreModule,
|
|
6629
6850
|
ModelsModule,
|
|
6851
|
+
...exportedEntityTokens,
|
|
6630
6852
|
WMS_CORE_MODULE_OPTIONS,
|
|
6631
6853
|
],
|
|
6632
6854
|
};
|
|
@@ -6696,6 +6918,10 @@ exports.WmsEventDispatcher = WmsEventDispatcher_1 = tslib.__decorate([
|
|
|
6696
6918
|
tslib.__metadata("design:paramtypes", [Object, Object])
|
|
6697
6919
|
], exports.WmsEventDispatcher);
|
|
6698
6920
|
|
|
6921
|
+
Object.defineProperty(exports, "OrderEntityClass", {
|
|
6922
|
+
enumerable: true,
|
|
6923
|
+
get: function () { return wmsBaseNestjsModule.OrderEntity; }
|
|
6924
|
+
});
|
|
6699
6925
|
exports.AllocateInventoryOrderChangeEntity = AllocateInventoryOrderChangeEntity;
|
|
6700
6926
|
exports.AllocateInventoryOrderEntity = AllocateInventoryOrderEntity;
|
|
6701
6927
|
exports.AllocateInventoryOrderItemEntity = AllocateInventoryOrderItemEntity;
|
|
@@ -6713,6 +6939,7 @@ exports.MaterialUnitEntity = MaterialUnitEntity;
|
|
|
6713
6939
|
exports.MergeBatchOrderChangeEntity = MergeBatchOrderChangeEntity;
|
|
6714
6940
|
exports.MergeBatchOrderEntity = MergeBatchOrderEntity;
|
|
6715
6941
|
exports.MergeBatchOrderItemEntity = MergeBatchOrderItemEntity;
|
|
6942
|
+
exports.OrderEntity = OrderEntity;
|
|
6716
6943
|
exports.QualityInspectionOrderChangeEntity = QualityInspectionOrderChangeEntity;
|
|
6717
6944
|
exports.QualityInspectionOrderEntity = QualityInspectionOrderEntity;
|
|
6718
6945
|
exports.QualityInspectionOrderItemEntity = QualityInspectionOrderItemEntity;
|