@rytass/wms-module-core 0.4.0 → 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 +26 -6
- package/docs/api-reference.md +26 -9
- package/docs/custom-entities.md +105 -68
- package/index.cjs.js +301 -147
- package/index.js +3 -0
- package/lib/core.module.js +82 -29
- 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 +15 -8
- 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.d.ts +1 -15
- package/lib/services/material.service.js +2 -20
- 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 +15 -11
- package/lib/services/reclassify-inventory-order.service.d.ts +3 -1
- package/lib/services/reclassify-inventory-order.service.js +13 -9
- 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 +18 -14
- 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 +14 -10
- 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/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;
|
|
@@ -2396,16 +2398,22 @@ const entities = [
|
|
|
2396
2398
|
[ScrapeOrderChangeEntity, exports.ScrapeOrderChangeEntityClass],
|
|
2397
2399
|
];
|
|
2398
2400
|
/**
|
|
2399
|
-
*
|
|
2400
|
-
*
|
|
2401
|
-
* importing `WMSBaseModule` can read. Binding
|
|
2402
|
-
* live bindings for one token, and the loser would be
|
|
2403
|
-
* injector happened to reach first.
|
|
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.
|
|
2404
2406
|
*
|
|
2405
|
-
*
|
|
2406
|
-
* root of the single-table hierarchy a consumer's override extends.
|
|
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.
|
|
2407
2409
|
*/
|
|
2408
|
-
const EXTERNALLY_BOUND_ENTITIES = new Set([
|
|
2410
|
+
const EXTERNALLY_BOUND_ENTITIES = new Set([
|
|
2411
|
+
MaterialEntity,
|
|
2412
|
+
BatchEntity,
|
|
2413
|
+
LocationEntity,
|
|
2414
|
+
StockEntity,
|
|
2415
|
+
WarehouseMapEntity,
|
|
2416
|
+
]);
|
|
2409
2417
|
const ResolvedEntitiesProviders = entities
|
|
2410
2418
|
.filter(([token]) => !EXTERNALLY_BOUND_ENTITIES.has(token))
|
|
2411
2419
|
.map(([token, entity]) => ({
|
|
@@ -2422,8 +2430,81 @@ ModelsModule = tslib.__decorate([
|
|
|
2422
2430
|
})
|
|
2423
2431
|
], ModelsModule);
|
|
2424
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
|
+
|
|
2425
2505
|
exports.StockService = class StockService {
|
|
2426
2506
|
dataSource;
|
|
2507
|
+
entities;
|
|
2427
2508
|
stockEntity;
|
|
2428
2509
|
materialEntity;
|
|
2429
2510
|
coreOptions;
|
|
@@ -2445,8 +2526,9 @@ exports.StockService = class StockService {
|
|
|
2445
2526
|
status: status,
|
|
2446
2527
|
};
|
|
2447
2528
|
};
|
|
2448
|
-
constructor(dataSource, stockEntity, materialEntity, coreOptions) {
|
|
2529
|
+
constructor(dataSource, entities, stockEntity, materialEntity, coreOptions) {
|
|
2449
2530
|
this.dataSource = dataSource;
|
|
2531
|
+
this.entities = entities;
|
|
2450
2532
|
this.stockEntity = stockEntity;
|
|
2451
2533
|
this.materialEntity = materialEntity;
|
|
2452
2534
|
this.coreOptions = coreOptions;
|
|
@@ -2486,7 +2568,7 @@ exports.StockService = class StockService {
|
|
|
2486
2568
|
}
|
|
2487
2569
|
async onModuleInit() {
|
|
2488
2570
|
const loaderTypeRepo = this.dataSource.getRepository(exports.LoaderTypeEntityClass);
|
|
2489
|
-
const locationRepo = this.dataSource.getRepository(
|
|
2571
|
+
const locationRepo = this.dataSource.getRepository(this.entities.location);
|
|
2490
2572
|
const loaderRepo = this.dataSource.getRepository(exports.LoadersEntityClass);
|
|
2491
2573
|
// Ensure default loader type exists
|
|
2492
2574
|
let loaderType = await loaderTypeRepo.findOneBy({
|
|
@@ -2615,11 +2697,11 @@ exports.StockService = class StockService {
|
|
|
2615
2697
|
materialKey: `%${options.materialKey}%`,
|
|
2616
2698
|
});
|
|
2617
2699
|
if (options.batchKey)
|
|
2618
|
-
queryBuilder.innerJoin(
|
|
2700
|
+
queryBuilder.innerJoin(this.entities.batch, 'bk', 'bk.id = stock."batchId" AND bk.key ILIKE :batchKey', {
|
|
2619
2701
|
batchKey: `%${options.batchKey}%`,
|
|
2620
2702
|
});
|
|
2621
2703
|
if (options.locationKey)
|
|
2622
|
-
queryBuilder.innerJoin(
|
|
2704
|
+
queryBuilder.innerJoin(this.entities.location, 'lk', 'lk.id = stock."locationId" AND lk.key ILIKE :locationKey', {
|
|
2623
2705
|
locationKey: `%${options.locationKey}%`,
|
|
2624
2706
|
});
|
|
2625
2707
|
if (options.loaderKey)
|
|
@@ -2844,10 +2926,11 @@ exports.StockService = class StockService {
|
|
|
2844
2926
|
};
|
|
2845
2927
|
exports.StockService = tslib.__decorate([
|
|
2846
2928
|
common.Injectable(),
|
|
2847
|
-
tslib.__param(
|
|
2848
|
-
tslib.__param(
|
|
2849
|
-
tslib.__param(
|
|
2850
|
-
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])
|
|
2851
2934
|
], exports.StockService);
|
|
2852
2935
|
|
|
2853
2936
|
/**
|
|
@@ -3098,26 +3181,6 @@ exports.MaterialService = class MaterialService {
|
|
|
3098
3181
|
this.materialRepository = this.dataSource.getRepository(this.materialEntity);
|
|
3099
3182
|
this.materialUnitRepository = this.dataSource.getRepository(this.materialUnitEntity);
|
|
3100
3183
|
}
|
|
3101
|
-
/**
|
|
3102
|
-
* Fail at boot if the configured `materialEntity` was never registered with
|
|
3103
|
-
* TypeORM.
|
|
3104
|
-
*
|
|
3105
|
-
* The module cannot register it: `TypeOrmModule.forFeature()` runs while the
|
|
3106
|
-
* module graph is assembled, and the entity is only known once the options
|
|
3107
|
-
* resolve. Registering the base class does bring the override's *columns* into
|
|
3108
|
-
* the `materials` schema (TypeORM copies a single-table child's columns into
|
|
3109
|
-
* its parent), which makes the omission easy to miss — everything looks right
|
|
3110
|
-
* until the first query fails with a bare `EntityMetadataNotFoundError` from
|
|
3111
|
-
* somewhere deep in a resolver.
|
|
3112
|
-
*/
|
|
3113
|
-
onModuleInit() {
|
|
3114
|
-
if (this.dataSource.hasMetadata(this.materialEntity))
|
|
3115
|
-
return;
|
|
3116
|
-
const name = typeof this.materialEntity === 'function'
|
|
3117
|
-
? this.materialEntity.name
|
|
3118
|
-
: String(this.materialEntity);
|
|
3119
|
-
throw new Error(`WmsModuleCoreModule: the configured materialEntity "${name}" is not registered with TypeORM. Add it to your DataSource "entities", or import TypeOrmModule.forFeature([${name}]) somewhere in your app when using autoLoadEntities.`);
|
|
3120
|
-
}
|
|
3121
3184
|
async getConversionFactor(materialId, unitId) {
|
|
3122
3185
|
const materialUnitRepository = this.dataSource.getRepository(this.materialUnitEntity);
|
|
3123
3186
|
if (!unitId)
|
|
@@ -3288,7 +3351,7 @@ exports.BatchService = class BatchService {
|
|
|
3288
3351
|
}
|
|
3289
3352
|
}
|
|
3290
3353
|
async getBatch({ manager = this.dataSource.manager, ...options }) {
|
|
3291
|
-
const batchRepository = manager.getRepository(
|
|
3354
|
+
const batchRepository = manager.getRepository(this.batchEntity);
|
|
3292
3355
|
const batchGroupRepository = manager.getRepository(this.batchGroupEntity);
|
|
3293
3356
|
const unsplittedCondition = {
|
|
3294
3357
|
saleId: typeorm.IsNull(),
|
|
@@ -3318,7 +3381,7 @@ exports.BatchService = class BatchService {
|
|
|
3318
3381
|
return batch;
|
|
3319
3382
|
}
|
|
3320
3383
|
async splitBatch({ manager = this.dataSource.manager, ...options }) {
|
|
3321
|
-
const batchRepository = manager.getRepository(
|
|
3384
|
+
const batchRepository = manager.getRepository(this.batchEntity);
|
|
3322
3385
|
const batch = await batchRepository.findOneOrFail({
|
|
3323
3386
|
where: { id: options.id },
|
|
3324
3387
|
relations: ['batchGroup'],
|
|
@@ -3413,6 +3476,7 @@ exports.HelperService = tslib.__decorate([
|
|
|
3413
3476
|
*/
|
|
3414
3477
|
exports.ReceiveInventoryOrderService = class ReceiveInventoryOrderService {
|
|
3415
3478
|
dataSource;
|
|
3479
|
+
entities;
|
|
3416
3480
|
materialService;
|
|
3417
3481
|
batchService;
|
|
3418
3482
|
helperService;
|
|
@@ -3420,8 +3484,9 @@ exports.ReceiveInventoryOrderService = class ReceiveInventoryOrderService {
|
|
|
3420
3484
|
receiveInventoryOrderEntity;
|
|
3421
3485
|
receiveInventoryOrderItemEntity;
|
|
3422
3486
|
selectQueryBuilder;
|
|
3423
|
-
constructor(dataSource, materialService, batchService, helperService, stockService, receiveInventoryOrderEntity, receiveInventoryOrderItemEntity) {
|
|
3487
|
+
constructor(dataSource, entities, materialService, batchService, helperService, stockService, receiveInventoryOrderEntity, receiveInventoryOrderItemEntity) {
|
|
3424
3488
|
this.dataSource = dataSource;
|
|
3489
|
+
this.entities = entities;
|
|
3425
3490
|
this.materialService = materialService;
|
|
3426
3491
|
this.batchService = batchService;
|
|
3427
3492
|
this.helperService = helperService;
|
|
@@ -3472,7 +3537,7 @@ exports.ReceiveInventoryOrderService = class ReceiveInventoryOrderService {
|
|
|
3472
3537
|
}
|
|
3473
3538
|
processReceiveInventoryOrderItems(items, orderId, manager) {
|
|
3474
3539
|
const materialRepository = manager.getRepository(this.materialService.materialEntity);
|
|
3475
|
-
const locationRepository = manager.getRepository(
|
|
3540
|
+
const locationRepository = manager.getRepository(this.entities.location);
|
|
3476
3541
|
const loaderRepository = manager.getRepository(exports.LoadersEntityClass);
|
|
3477
3542
|
return items.reduce(async (accPromise, item) => {
|
|
3478
3543
|
const acc = await accPromise;
|
|
@@ -3517,7 +3582,7 @@ exports.ReceiveInventoryOrderService = class ReceiveInventoryOrderService {
|
|
|
3517
3582
|
}, Promise.resolve([]));
|
|
3518
3583
|
}
|
|
3519
3584
|
async createReceiveInventoryOrder({ manager = this.dataSource.manager, ...options }) {
|
|
3520
|
-
const orderRepository = manager.getRepository(
|
|
3585
|
+
const orderRepository = manager.getRepository(this.entities.order);
|
|
3521
3586
|
const receiveInventoryOrderRepository = manager.getRepository(this.receiveInventoryOrderEntity);
|
|
3522
3587
|
const receiveInventoryOrderItemRepository = manager.getRepository(this.receiveInventoryOrderItemEntity);
|
|
3523
3588
|
// create base order
|
|
@@ -3651,10 +3716,10 @@ exports.ReceiveInventoryOrderService = class ReceiveInventoryOrderService {
|
|
|
3651
3716
|
return this.dataSource.transaction(async (manager) => {
|
|
3652
3717
|
const changeRepository = manager.getRepository(exports.ReceiveInventoryOrderChangeEntityClass);
|
|
3653
3718
|
const itemRepository = manager.getRepository(this.receiveInventoryOrderItemEntity);
|
|
3654
|
-
const orderRepository = manager.getRepository(
|
|
3655
|
-
const locationRepository = manager.getRepository(
|
|
3719
|
+
const orderRepository = manager.getRepository(this.entities.order);
|
|
3720
|
+
const locationRepository = manager.getRepository(this.entities.location);
|
|
3656
3721
|
const loaderRepository = manager.getRepository(exports.LoadersEntityClass);
|
|
3657
|
-
const stockRepository = manager.getRepository(
|
|
3722
|
+
const stockRepository = manager.getRepository(this.entities.stock);
|
|
3658
3723
|
const items = await itemRepository.find({
|
|
3659
3724
|
where: { id: typeorm.In(options.map((o) => o.itemId)) },
|
|
3660
3725
|
relations: ['changes'],
|
|
@@ -3744,9 +3809,10 @@ exports.ReceiveInventoryOrderService = class ReceiveInventoryOrderService {
|
|
|
3744
3809
|
};
|
|
3745
3810
|
exports.ReceiveInventoryOrderService = tslib.__decorate([
|
|
3746
3811
|
common.Injectable(),
|
|
3747
|
-
tslib.__param(
|
|
3748
|
-
tslib.__param(
|
|
3812
|
+
tslib.__param(6, common.Inject(ReceiveInventoryOrderEntity)),
|
|
3813
|
+
tslib.__param(7, common.Inject(ReceiveInventoryOrderItemEntity)),
|
|
3749
3814
|
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
3815
|
+
exports.WmsEntities,
|
|
3750
3816
|
exports.MaterialService,
|
|
3751
3817
|
exports.BatchService,
|
|
3752
3818
|
exports.HelperService,
|
|
@@ -3761,6 +3827,7 @@ exports.ReceiveInventoryOrderService = tslib.__decorate([
|
|
|
3761
3827
|
*/
|
|
3762
3828
|
exports.ShipInventoryOrderService = class ShipInventoryOrderService {
|
|
3763
3829
|
dataSource;
|
|
3830
|
+
entities;
|
|
3764
3831
|
materialService;
|
|
3765
3832
|
batchService;
|
|
3766
3833
|
stockService;
|
|
@@ -3769,8 +3836,9 @@ exports.ShipInventoryOrderService = class ShipInventoryOrderService {
|
|
|
3769
3836
|
shipInventoryOrderReferenceEntity;
|
|
3770
3837
|
saleOrderEntity;
|
|
3771
3838
|
selectQueryBuilder;
|
|
3772
|
-
constructor(dataSource, materialService, batchService, stockService, shipInventoryOrderEntity, shipInventoryOrderItemEntity, shipInventoryOrderReferenceEntity, saleOrderEntity) {
|
|
3839
|
+
constructor(dataSource, entities, materialService, batchService, stockService, shipInventoryOrderEntity, shipInventoryOrderItemEntity, shipInventoryOrderReferenceEntity, saleOrderEntity) {
|
|
3773
3840
|
this.dataSource = dataSource;
|
|
3841
|
+
this.entities = entities;
|
|
3774
3842
|
this.materialService = materialService;
|
|
3775
3843
|
this.batchService = batchService;
|
|
3776
3844
|
this.stockService = stockService;
|
|
@@ -3843,8 +3911,8 @@ exports.ShipInventoryOrderService = class ShipInventoryOrderService {
|
|
|
3843
3911
|
async processShipInventoryOrderItems(items, manager) {
|
|
3844
3912
|
const shipInventoryOrderItemRepository = manager.getRepository(this.shipInventoryOrderItemEntity);
|
|
3845
3913
|
const shipInventoryOrderChangeRepository = manager.getRepository(exports.ShipInventoryOrderChangeEntityClass);
|
|
3846
|
-
const orderRepository = manager.getRepository(
|
|
3847
|
-
const stockRepository = manager.getRepository(
|
|
3914
|
+
const orderRepository = manager.getRepository(this.entities.order);
|
|
3915
|
+
const stockRepository = manager.getRepository(this.entities.stock);
|
|
3848
3916
|
await Promise.all(items.map(async (data) => {
|
|
3849
3917
|
// Ensure required fields are present
|
|
3850
3918
|
if (!data.batchId || !data.materialId)
|
|
@@ -3895,7 +3963,7 @@ exports.ShipInventoryOrderService = class ShipInventoryOrderService {
|
|
|
3895
3963
|
}));
|
|
3896
3964
|
}
|
|
3897
3965
|
async createShipInventoryOrder({ manager = this.dataSource.manager, ...options }) {
|
|
3898
|
-
const orderRepository = manager.getRepository(
|
|
3966
|
+
const orderRepository = manager.getRepository(this.entities.order);
|
|
3899
3967
|
const shipInventoryOrderRepository = manager.getRepository(this.shipInventoryOrderEntity);
|
|
3900
3968
|
const shipInventoryOrderReferenceRepository = manager.getRepository(this.shipInventoryOrderReferenceEntity);
|
|
3901
3969
|
// create base order
|
|
@@ -4055,8 +4123,8 @@ exports.ShipInventoryOrderService = class ShipInventoryOrderService {
|
|
|
4055
4123
|
async cancelShipInternal(options, manager) {
|
|
4056
4124
|
const changeRepository = manager.getRepository(exports.ShipInventoryOrderChangeEntityClass);
|
|
4057
4125
|
const itemRepository = manager.getRepository(this.shipInventoryOrderItemEntity);
|
|
4058
|
-
const orderRepository = manager.getRepository(
|
|
4059
|
-
const stockRepository = manager.getRepository(
|
|
4126
|
+
const orderRepository = manager.getRepository(this.entities.order);
|
|
4127
|
+
const stockRepository = manager.getRepository(this.entities.stock);
|
|
4060
4128
|
const items = await itemRepository.find({
|
|
4061
4129
|
where: { id: typeorm.In(options.map((o) => o.itemId)) },
|
|
4062
4130
|
relations: ['changes'],
|
|
@@ -4212,8 +4280,8 @@ exports.ShipInventoryOrderService = class ShipInventoryOrderService {
|
|
|
4212
4280
|
return this.dataSource.transaction(async (manager) => {
|
|
4213
4281
|
const changeRepository = manager.getRepository(exports.ShipInventoryOrderChangeEntityClass);
|
|
4214
4282
|
const itemRepository = manager.getRepository(this.shipInventoryOrderItemEntity);
|
|
4215
|
-
const orderRepository = manager.getRepository(
|
|
4216
|
-
const stockRepository = manager.getRepository(
|
|
4283
|
+
const orderRepository = manager.getRepository(this.entities.order);
|
|
4284
|
+
const stockRepository = manager.getRepository(this.entities.stock);
|
|
4217
4285
|
const items = await itemRepository.find({
|
|
4218
4286
|
where: { id: typeorm.In(options.map((option) => option.itemId)) },
|
|
4219
4287
|
relations: ['changes'],
|
|
@@ -4284,11 +4352,12 @@ exports.ShipInventoryOrderService = class ShipInventoryOrderService {
|
|
|
4284
4352
|
};
|
|
4285
4353
|
exports.ShipInventoryOrderService = tslib.__decorate([
|
|
4286
4354
|
common.Injectable(),
|
|
4287
|
-
tslib.__param(
|
|
4288
|
-
tslib.__param(
|
|
4289
|
-
tslib.__param(
|
|
4290
|
-
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)),
|
|
4291
4359
|
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
4360
|
+
exports.WmsEntities,
|
|
4292
4361
|
exports.MaterialService,
|
|
4293
4362
|
exports.BatchService,
|
|
4294
4363
|
exports.StockService, Object, Object, Object, Object])
|
|
@@ -4387,6 +4456,7 @@ exports.UnitService = tslib.__decorate([
|
|
|
4387
4456
|
|
|
4388
4457
|
exports.TransferOrderService = class TransferOrderService {
|
|
4389
4458
|
dataSource;
|
|
4459
|
+
entities;
|
|
4390
4460
|
helperService;
|
|
4391
4461
|
materialService;
|
|
4392
4462
|
batchService;
|
|
@@ -4396,8 +4466,9 @@ exports.TransferOrderService = class TransferOrderService {
|
|
|
4396
4466
|
stockEntity;
|
|
4397
4467
|
seqPrefix = 'TO';
|
|
4398
4468
|
transferOrderRepository;
|
|
4399
|
-
constructor(dataSource, helperService, materialService, batchService, stockService, transferOrderEntity, transferOrderItemEntity, stockEntity) {
|
|
4469
|
+
constructor(dataSource, entities, helperService, materialService, batchService, stockService, transferOrderEntity, transferOrderItemEntity, stockEntity) {
|
|
4400
4470
|
this.dataSource = dataSource;
|
|
4471
|
+
this.entities = entities;
|
|
4401
4472
|
this.helperService = helperService;
|
|
4402
4473
|
this.materialService = materialService;
|
|
4403
4474
|
this.batchService = batchService;
|
|
@@ -4412,7 +4483,7 @@ exports.TransferOrderService = class TransferOrderService {
|
|
|
4412
4483
|
transferOrder: manager.getRepository(this.transferOrderEntity),
|
|
4413
4484
|
transferOrderItem: manager.getRepository(this.transferOrderItemEntity),
|
|
4414
4485
|
transferOrderChange: manager.getRepository(exports.TransferOrderChangeEntityClass),
|
|
4415
|
-
order: manager.getRepository(
|
|
4486
|
+
order: manager.getRepository(this.entities.order),
|
|
4416
4487
|
stock: manager.getRepository(this.stockEntity),
|
|
4417
4488
|
loader: manager.getRepository(exports.LoadersEntityClass),
|
|
4418
4489
|
};
|
|
@@ -4890,7 +4961,7 @@ exports.TransferOrderService = class TransferOrderService {
|
|
|
4890
4961
|
manager,
|
|
4891
4962
|
});
|
|
4892
4963
|
// Record the transfer change
|
|
4893
|
-
const base = await manager.getRepository(
|
|
4964
|
+
const base = await manager.getRepository(this.entities.order).save({});
|
|
4894
4965
|
// Availability check at the IN_TRANSFER coord — must have ≥ qty to drain
|
|
4895
4966
|
await this.stockService.validateStockAvailability({
|
|
4896
4967
|
materialId: item.materialId,
|
|
@@ -4948,10 +5019,11 @@ exports.TransferOrderService = class TransferOrderService {
|
|
|
4948
5019
|
};
|
|
4949
5020
|
exports.TransferOrderService = tslib.__decorate([
|
|
4950
5021
|
common.Injectable(),
|
|
4951
|
-
tslib.__param(
|
|
4952
|
-
tslib.__param(
|
|
4953
|
-
tslib.__param(
|
|
5022
|
+
tslib.__param(6, common.Inject(TransferOrderEntity)),
|
|
5023
|
+
tslib.__param(7, common.Inject(TransferOrderItemEntity)),
|
|
5024
|
+
tslib.__param(8, common.Inject(StockEntity)),
|
|
4954
5025
|
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
5026
|
+
exports.WmsEntities,
|
|
4955
5027
|
exports.HelperService,
|
|
4956
5028
|
exports.MaterialService,
|
|
4957
5029
|
exports.BatchService,
|
|
@@ -4960,6 +5032,7 @@ exports.TransferOrderService = tslib.__decorate([
|
|
|
4960
5032
|
|
|
4961
5033
|
exports.HoldInventoryOrderService = class HoldInventoryOrderService {
|
|
4962
5034
|
dataSource;
|
|
5035
|
+
entities;
|
|
4963
5036
|
helperService;
|
|
4964
5037
|
materialService;
|
|
4965
5038
|
batchService;
|
|
@@ -4968,8 +5041,9 @@ exports.HoldInventoryOrderService = class HoldInventoryOrderService {
|
|
|
4968
5041
|
holdInventoryOrderItemEntity;
|
|
4969
5042
|
stockEntity;
|
|
4970
5043
|
seqPrefix = 'HIO';
|
|
4971
|
-
constructor(dataSource, helperService, materialService, batchService, stockService, holdInventoryOrderEntity, holdInventoryOrderItemEntity, stockEntity) {
|
|
5044
|
+
constructor(dataSource, entities, helperService, materialService, batchService, stockService, holdInventoryOrderEntity, holdInventoryOrderItemEntity, stockEntity) {
|
|
4972
5045
|
this.dataSource = dataSource;
|
|
5046
|
+
this.entities = entities;
|
|
4973
5047
|
this.helperService = helperService;
|
|
4974
5048
|
this.materialService = materialService;
|
|
4975
5049
|
this.batchService = batchService;
|
|
@@ -4984,7 +5058,7 @@ exports.HoldInventoryOrderService = class HoldInventoryOrderService {
|
|
|
4984
5058
|
holdInventoryOrderItem: manager.getRepository(this.holdInventoryOrderItemEntity),
|
|
4985
5059
|
holdInventoryOrderChange: manager.getRepository(exports.HoldInventoryOrderChangeEntityClass),
|
|
4986
5060
|
stock: manager.getRepository(this.stockEntity),
|
|
4987
|
-
order: manager.getRepository(
|
|
5061
|
+
order: manager.getRepository(this.entities.order),
|
|
4988
5062
|
};
|
|
4989
5063
|
}
|
|
4990
5064
|
async processHoldInventoryOrderItems(items, repos, manager) {
|
|
@@ -5175,10 +5249,11 @@ exports.HoldInventoryOrderService = class HoldInventoryOrderService {
|
|
|
5175
5249
|
};
|
|
5176
5250
|
exports.HoldInventoryOrderService = tslib.__decorate([
|
|
5177
5251
|
common.Injectable(),
|
|
5178
|
-
tslib.__param(
|
|
5179
|
-
tslib.__param(
|
|
5180
|
-
tslib.__param(
|
|
5252
|
+
tslib.__param(6, common.Inject(HoldInventoryOrderEntity)),
|
|
5253
|
+
tslib.__param(7, common.Inject(HoldInventoryOrderItemEntity)),
|
|
5254
|
+
tslib.__param(8, common.Inject(StockEntity)),
|
|
5181
5255
|
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
5256
|
+
exports.WmsEntities,
|
|
5182
5257
|
exports.HelperService,
|
|
5183
5258
|
exports.MaterialService,
|
|
5184
5259
|
exports.BatchService,
|
|
@@ -5187,6 +5262,7 @@ exports.HoldInventoryOrderService = tslib.__decorate([
|
|
|
5187
5262
|
|
|
5188
5263
|
exports.AllocateInventoryOrderService = class AllocateInventoryOrderService {
|
|
5189
5264
|
dataSource;
|
|
5265
|
+
entities;
|
|
5190
5266
|
helperService;
|
|
5191
5267
|
materialService;
|
|
5192
5268
|
batchService;
|
|
@@ -5195,8 +5271,9 @@ exports.AllocateInventoryOrderService = class AllocateInventoryOrderService {
|
|
|
5195
5271
|
allocateInventoryOrderItemEntity;
|
|
5196
5272
|
stockEntity;
|
|
5197
5273
|
seqPrefix = 'AIO';
|
|
5198
|
-
constructor(dataSource, helperService, materialService, batchService, stockService, allocateInventoryOrderEntity, allocateInventoryOrderItemEntity, stockEntity) {
|
|
5274
|
+
constructor(dataSource, entities, helperService, materialService, batchService, stockService, allocateInventoryOrderEntity, allocateInventoryOrderItemEntity, stockEntity) {
|
|
5199
5275
|
this.dataSource = dataSource;
|
|
5276
|
+
this.entities = entities;
|
|
5200
5277
|
this.helperService = helperService;
|
|
5201
5278
|
this.materialService = materialService;
|
|
5202
5279
|
this.batchService = batchService;
|
|
@@ -5210,7 +5287,7 @@ exports.AllocateInventoryOrderService = class AllocateInventoryOrderService {
|
|
|
5210
5287
|
allocateInventoryOrder: manager.getRepository(this.allocateInventoryOrderEntity),
|
|
5211
5288
|
allocateInventoryOrderItem: manager.getRepository(this.allocateInventoryOrderItemEntity),
|
|
5212
5289
|
allocateInventoryOrderChange: manager.getRepository(exports.AllocateInventoryOrderChangeEntityClass),
|
|
5213
|
-
order: manager.getRepository(
|
|
5290
|
+
order: manager.getRepository(this.entities.order),
|
|
5214
5291
|
stock: manager.getRepository(this.stockEntity),
|
|
5215
5292
|
};
|
|
5216
5293
|
}
|
|
@@ -5416,10 +5493,11 @@ exports.AllocateInventoryOrderService = class AllocateInventoryOrderService {
|
|
|
5416
5493
|
};
|
|
5417
5494
|
exports.AllocateInventoryOrderService = tslib.__decorate([
|
|
5418
5495
|
common.Injectable(),
|
|
5419
|
-
tslib.__param(
|
|
5420
|
-
tslib.__param(
|
|
5421
|
-
tslib.__param(
|
|
5496
|
+
tslib.__param(6, common.Inject(AllocateInventoryOrderEntity)),
|
|
5497
|
+
tslib.__param(7, common.Inject(AllocateInventoryOrderItemEntity)),
|
|
5498
|
+
tslib.__param(8, common.Inject(StockEntity)),
|
|
5422
5499
|
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
5500
|
+
exports.WmsEntities,
|
|
5423
5501
|
exports.HelperService,
|
|
5424
5502
|
exports.MaterialService,
|
|
5425
5503
|
exports.BatchService,
|
|
@@ -5428,6 +5506,7 @@ exports.AllocateInventoryOrderService = tslib.__decorate([
|
|
|
5428
5506
|
|
|
5429
5507
|
exports.SplitBatchOrderService = class SplitBatchOrderService {
|
|
5430
5508
|
dataSource;
|
|
5509
|
+
entities;
|
|
5431
5510
|
materialService;
|
|
5432
5511
|
batchService;
|
|
5433
5512
|
helperService;
|
|
@@ -5435,8 +5514,9 @@ exports.SplitBatchOrderService = class SplitBatchOrderService {
|
|
|
5435
5514
|
splitBatchOrderEntity;
|
|
5436
5515
|
splitBatchOrderItemEntity;
|
|
5437
5516
|
seqPrefix = 'SBO';
|
|
5438
|
-
constructor(dataSource, materialService, batchService, helperService, stockService, splitBatchOrderEntity, splitBatchOrderItemEntity) {
|
|
5517
|
+
constructor(dataSource, entities, materialService, batchService, helperService, stockService, splitBatchOrderEntity, splitBatchOrderItemEntity) {
|
|
5439
5518
|
this.dataSource = dataSource;
|
|
5519
|
+
this.entities = entities;
|
|
5440
5520
|
this.materialService = materialService;
|
|
5441
5521
|
this.batchService = batchService;
|
|
5442
5522
|
this.helperService = helperService;
|
|
@@ -5449,9 +5529,9 @@ exports.SplitBatchOrderService = class SplitBatchOrderService {
|
|
|
5449
5529
|
const splitBatchOrderRepository = manager.getRepository(this.splitBatchOrderEntity);
|
|
5450
5530
|
const splitBatchOrderItemRepository = manager.getRepository(this.splitBatchOrderItemEntity);
|
|
5451
5531
|
const splitBatchOrderChangeRepository = manager.getRepository(exports.SplitBatchOrderChangeEntityClass);
|
|
5452
|
-
const orderRepository = manager.getRepository(
|
|
5453
|
-
const stockRepository = manager.getRepository(
|
|
5454
|
-
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);
|
|
5455
5535
|
// Get original batch information
|
|
5456
5536
|
const originalBatch = await batchRepository.findOneOrFail({
|
|
5457
5537
|
where: { id: options.batchId },
|
|
@@ -5520,9 +5600,10 @@ exports.SplitBatchOrderService = class SplitBatchOrderService {
|
|
|
5520
5600
|
};
|
|
5521
5601
|
exports.SplitBatchOrderService = tslib.__decorate([
|
|
5522
5602
|
common.Injectable(),
|
|
5523
|
-
tslib.__param(
|
|
5524
|
-
tslib.__param(
|
|
5603
|
+
tslib.__param(6, common.Inject(SplitBatchOrderEntity)),
|
|
5604
|
+
tslib.__param(7, common.Inject(SplitBatchOrderItemEntity)),
|
|
5525
5605
|
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
5606
|
+
exports.WmsEntities,
|
|
5526
5607
|
exports.MaterialService,
|
|
5527
5608
|
exports.BatchService,
|
|
5528
5609
|
exports.HelperService,
|
|
@@ -5531,6 +5612,7 @@ exports.SplitBatchOrderService = tslib.__decorate([
|
|
|
5531
5612
|
|
|
5532
5613
|
exports.MergeBatchOrderService = class MergeBatchOrderService {
|
|
5533
5614
|
dataSource;
|
|
5615
|
+
entities;
|
|
5534
5616
|
materialService;
|
|
5535
5617
|
batchService;
|
|
5536
5618
|
helperService;
|
|
@@ -5538,8 +5620,9 @@ exports.MergeBatchOrderService = class MergeBatchOrderService {
|
|
|
5538
5620
|
mergeBatchOrderEntity;
|
|
5539
5621
|
mergeBatchOrderItemEntity;
|
|
5540
5622
|
seqPrefix = 'MBO';
|
|
5541
|
-
constructor(dataSource, materialService, batchService, helperService, stockService, mergeBatchOrderEntity, mergeBatchOrderItemEntity) {
|
|
5623
|
+
constructor(dataSource, entities, materialService, batchService, helperService, stockService, mergeBatchOrderEntity, mergeBatchOrderItemEntity) {
|
|
5542
5624
|
this.dataSource = dataSource;
|
|
5625
|
+
this.entities = entities;
|
|
5543
5626
|
this.materialService = materialService;
|
|
5544
5627
|
this.batchService = batchService;
|
|
5545
5628
|
this.helperService = helperService;
|
|
@@ -5552,9 +5635,9 @@ exports.MergeBatchOrderService = class MergeBatchOrderService {
|
|
|
5552
5635
|
const mergeBatchOrderRepository = manager.getRepository(this.mergeBatchOrderEntity);
|
|
5553
5636
|
const mergeBatchOrderItemRepository = manager.getRepository(this.mergeBatchOrderItemEntity);
|
|
5554
5637
|
const mergeBatchOrderChangeRepository = manager.getRepository(exports.MergeBatchOrderChangeEntityClass);
|
|
5555
|
-
const orderRepository = manager.getRepository(
|
|
5556
|
-
const stockRepository = manager.getRepository(
|
|
5557
|
-
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);
|
|
5558
5641
|
// Verify all source batches have identical metadata (except key and groupId)
|
|
5559
5642
|
const sourceBatches = await batchRepository.find({
|
|
5560
5643
|
where: { id: typeorm.In(options.items.map((item) => item.batchId)) },
|
|
@@ -5657,9 +5740,10 @@ exports.MergeBatchOrderService = class MergeBatchOrderService {
|
|
|
5657
5740
|
};
|
|
5658
5741
|
exports.MergeBatchOrderService = tslib.__decorate([
|
|
5659
5742
|
common.Injectable(),
|
|
5660
|
-
tslib.__param(
|
|
5661
|
-
tslib.__param(
|
|
5743
|
+
tslib.__param(6, common.Inject(MergeBatchOrderEntity)),
|
|
5744
|
+
tslib.__param(7, common.Inject(MergeBatchOrderItemEntity)),
|
|
5662
5745
|
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
5746
|
+
exports.WmsEntities,
|
|
5663
5747
|
exports.MaterialService,
|
|
5664
5748
|
exports.BatchService,
|
|
5665
5749
|
exports.HelperService,
|
|
@@ -5668,6 +5752,7 @@ exports.MergeBatchOrderService = tslib.__decorate([
|
|
|
5668
5752
|
|
|
5669
5753
|
exports.ReclassifyInventoryOrderService = class ReclassifyInventoryOrderService {
|
|
5670
5754
|
dataSource;
|
|
5755
|
+
entities;
|
|
5671
5756
|
materialService;
|
|
5672
5757
|
batchService;
|
|
5673
5758
|
helperService;
|
|
@@ -5675,8 +5760,9 @@ exports.ReclassifyInventoryOrderService = class ReclassifyInventoryOrderService
|
|
|
5675
5760
|
reclassifyInventoryOrderEntity;
|
|
5676
5761
|
reclassifyInventoryOrderItemEntity;
|
|
5677
5762
|
seqPrefix = 'RCO';
|
|
5678
|
-
constructor(dataSource, materialService, batchService, helperService, stockService, reclassifyInventoryOrderEntity, reclassifyInventoryOrderItemEntity) {
|
|
5763
|
+
constructor(dataSource, entities, materialService, batchService, helperService, stockService, reclassifyInventoryOrderEntity, reclassifyInventoryOrderItemEntity) {
|
|
5679
5764
|
this.dataSource = dataSource;
|
|
5765
|
+
this.entities = entities;
|
|
5680
5766
|
this.materialService = materialService;
|
|
5681
5767
|
this.batchService = batchService;
|
|
5682
5768
|
this.helperService = helperService;
|
|
@@ -5689,9 +5775,9 @@ exports.ReclassifyInventoryOrderService = class ReclassifyInventoryOrderService
|
|
|
5689
5775
|
const reclassifyOrderRepository = manager.getRepository(this.reclassifyInventoryOrderEntity);
|
|
5690
5776
|
const reclassifyOrderItemRepository = manager.getRepository(this.reclassifyInventoryOrderItemEntity);
|
|
5691
5777
|
const reclassifyOrderChangeRepository = manager.getRepository(exports.ReclassifyInventoryOrderChangeEntityClass);
|
|
5692
|
-
const orderRepository = manager.getRepository(
|
|
5693
|
-
const stockRepository = manager.getRepository(
|
|
5694
|
-
const batchRepository = 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);
|
|
5695
5781
|
const materialRepository = manager.getRepository(this.materialService.materialEntity);
|
|
5696
5782
|
// Ensure new material exists
|
|
5697
5783
|
const material = await materialRepository.findOneOrFail({
|
|
@@ -5780,9 +5866,10 @@ exports.ReclassifyInventoryOrderService = class ReclassifyInventoryOrderService
|
|
|
5780
5866
|
};
|
|
5781
5867
|
exports.ReclassifyInventoryOrderService = tslib.__decorate([
|
|
5782
5868
|
common.Injectable(),
|
|
5783
|
-
tslib.__param(
|
|
5784
|
-
tslib.__param(
|
|
5869
|
+
tslib.__param(6, common.Inject(ReclassifyInventoryOrderEntity)),
|
|
5870
|
+
tslib.__param(7, common.Inject(ReclassifyInventoryOrderItemEntity)),
|
|
5785
5871
|
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
5872
|
+
exports.WmsEntities,
|
|
5786
5873
|
exports.MaterialService,
|
|
5787
5874
|
exports.BatchService,
|
|
5788
5875
|
exports.HelperService,
|
|
@@ -5791,6 +5878,7 @@ exports.ReclassifyInventoryOrderService = tslib.__decorate([
|
|
|
5791
5878
|
|
|
5792
5879
|
exports.TransferVendorOrderService = class TransferVendorOrderService {
|
|
5793
5880
|
dataSource;
|
|
5881
|
+
entities;
|
|
5794
5882
|
helperService;
|
|
5795
5883
|
materialService;
|
|
5796
5884
|
batchService;
|
|
@@ -5799,8 +5887,9 @@ exports.TransferVendorOrderService = class TransferVendorOrderService {
|
|
|
5799
5887
|
transferVendorOrderItemEntity;
|
|
5800
5888
|
stockEntity;
|
|
5801
5889
|
seqPrefix = 'TVO';
|
|
5802
|
-
constructor(dataSource, helperService, materialService, batchService, stockService, transferVendorOrderEntity, transferVendorOrderItemEntity, stockEntity) {
|
|
5890
|
+
constructor(dataSource, entities, helperService, materialService, batchService, stockService, transferVendorOrderEntity, transferVendorOrderItemEntity, stockEntity) {
|
|
5803
5891
|
this.dataSource = dataSource;
|
|
5892
|
+
this.entities = entities;
|
|
5804
5893
|
this.helperService = helperService;
|
|
5805
5894
|
this.materialService = materialService;
|
|
5806
5895
|
this.batchService = batchService;
|
|
@@ -5814,9 +5903,9 @@ exports.TransferVendorOrderService = class TransferVendorOrderService {
|
|
|
5814
5903
|
transferVendorOrder: manager.getRepository(this.transferVendorOrderEntity),
|
|
5815
5904
|
transferVendorOrderItem: manager.getRepository(this.transferVendorOrderItemEntity),
|
|
5816
5905
|
transferVendorOrderChange: manager.getRepository(exports.TransferVendorOrderChangeEntityClass),
|
|
5817
|
-
order: manager.getRepository(
|
|
5906
|
+
order: manager.getRepository(this.entities.order),
|
|
5818
5907
|
stock: manager.getRepository(this.stockEntity),
|
|
5819
|
-
location: manager.getRepository(
|
|
5908
|
+
location: manager.getRepository(this.entities.location),
|
|
5820
5909
|
loader: manager.getRepository(exports.LoadersEntityClass),
|
|
5821
5910
|
};
|
|
5822
5911
|
}
|
|
@@ -6000,10 +6089,11 @@ exports.TransferVendorOrderService = class TransferVendorOrderService {
|
|
|
6000
6089
|
};
|
|
6001
6090
|
exports.TransferVendorOrderService = tslib.__decorate([
|
|
6002
6091
|
common.Injectable(),
|
|
6003
|
-
tslib.__param(
|
|
6004
|
-
tslib.__param(
|
|
6005
|
-
tslib.__param(
|
|
6092
|
+
tslib.__param(6, common.Inject(TransferVendorOrderEntity)),
|
|
6093
|
+
tslib.__param(7, common.Inject(TransferVendorOrderItemEntity)),
|
|
6094
|
+
tslib.__param(8, common.Inject(StockEntity)),
|
|
6006
6095
|
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
6096
|
+
exports.WmsEntities,
|
|
6007
6097
|
exports.HelperService,
|
|
6008
6098
|
exports.MaterialService,
|
|
6009
6099
|
exports.BatchService,
|
|
@@ -6012,13 +6102,15 @@ exports.TransferVendorOrderService = tslib.__decorate([
|
|
|
6012
6102
|
|
|
6013
6103
|
exports.QualityInspectionOrderService = class QualityInspectionOrderService {
|
|
6014
6104
|
dataSource;
|
|
6105
|
+
entities;
|
|
6015
6106
|
qualityInspectionOrderEntity;
|
|
6016
6107
|
qualityInspectionOrderItemEntity;
|
|
6017
6108
|
batchService;
|
|
6018
6109
|
materialService;
|
|
6019
6110
|
stockService;
|
|
6020
|
-
constructor(dataSource, qualityInspectionOrderEntity, qualityInspectionOrderItemEntity, batchService, materialService, stockService) {
|
|
6111
|
+
constructor(dataSource, entities, qualityInspectionOrderEntity, qualityInspectionOrderItemEntity, batchService, materialService, stockService) {
|
|
6021
6112
|
this.dataSource = dataSource;
|
|
6113
|
+
this.entities = entities;
|
|
6022
6114
|
this.qualityInspectionOrderEntity = qualityInspectionOrderEntity;
|
|
6023
6115
|
this.qualityInspectionOrderItemEntity = qualityInspectionOrderItemEntity;
|
|
6024
6116
|
this.batchService = batchService;
|
|
@@ -6026,11 +6118,11 @@ exports.QualityInspectionOrderService = class QualityInspectionOrderService {
|
|
|
6026
6118
|
this.stockService = stockService;
|
|
6027
6119
|
}
|
|
6028
6120
|
async inspect({ manager = this.dataSource.manager, options, }) {
|
|
6029
|
-
const orderRepository = manager.getRepository(
|
|
6121
|
+
const orderRepository = manager.getRepository(this.entities.order);
|
|
6030
6122
|
const qualityInspectionOrderRepository = manager.getRepository(this.qualityInspectionOrderEntity);
|
|
6031
6123
|
const qualityInspectionOrderItemRepository = manager.getRepository(this.qualityInspectionOrderItemEntity);
|
|
6032
6124
|
const qualityInspectionOrderChangeRepository = manager.getRepository(exports.QualityInspectionOrderChangeEntityClass);
|
|
6033
|
-
const stockRepository = manager.getRepository(
|
|
6125
|
+
const stockRepository = manager.getRepository(this.entities.stock);
|
|
6034
6126
|
const order = await qualityInspectionOrderRepository.save(qualityInspectionOrderRepository.create({
|
|
6035
6127
|
key: options.key,
|
|
6036
6128
|
note: options.note,
|
|
@@ -6081,15 +6173,17 @@ exports.QualityInspectionOrderService = class QualityInspectionOrderService {
|
|
|
6081
6173
|
};
|
|
6082
6174
|
exports.QualityInspectionOrderService = tslib.__decorate([
|
|
6083
6175
|
common.Injectable(),
|
|
6084
|
-
tslib.__param(
|
|
6085
|
-
tslib.__param(
|
|
6086
|
-
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,
|
|
6087
6180
|
exports.MaterialService,
|
|
6088
6181
|
exports.StockService])
|
|
6089
6182
|
], exports.QualityInspectionOrderService);
|
|
6090
6183
|
|
|
6091
6184
|
exports.TransferCustomerOrderService = class TransferCustomerOrderService {
|
|
6092
6185
|
dataSource;
|
|
6186
|
+
entities;
|
|
6093
6187
|
helperService;
|
|
6094
6188
|
materialService;
|
|
6095
6189
|
batchService;
|
|
@@ -6098,8 +6192,9 @@ exports.TransferCustomerOrderService = class TransferCustomerOrderService {
|
|
|
6098
6192
|
transferCustomerOrderItemEntity;
|
|
6099
6193
|
stockEntity;
|
|
6100
6194
|
seqPrefix = 'TCO';
|
|
6101
|
-
constructor(dataSource, helperService, materialService, batchService, stockService, transferCustomerOrderEntity, transferCustomerOrderItemEntity, stockEntity) {
|
|
6195
|
+
constructor(dataSource, entities, helperService, materialService, batchService, stockService, transferCustomerOrderEntity, transferCustomerOrderItemEntity, stockEntity) {
|
|
6102
6196
|
this.dataSource = dataSource;
|
|
6197
|
+
this.entities = entities;
|
|
6103
6198
|
this.helperService = helperService;
|
|
6104
6199
|
this.materialService = materialService;
|
|
6105
6200
|
this.batchService = batchService;
|
|
@@ -6113,9 +6208,9 @@ exports.TransferCustomerOrderService = class TransferCustomerOrderService {
|
|
|
6113
6208
|
transferCustomerOrder: manager.getRepository(this.transferCustomerOrderEntity),
|
|
6114
6209
|
transferCustomerOrderItem: manager.getRepository(this.transferCustomerOrderItemEntity),
|
|
6115
6210
|
transferCustomerOrderChange: manager.getRepository(exports.TransferCustomerOrderChangeEntityClass),
|
|
6116
|
-
order: manager.getRepository(
|
|
6211
|
+
order: manager.getRepository(this.entities.order),
|
|
6117
6212
|
stock: manager.getRepository(this.stockEntity),
|
|
6118
|
-
location: manager.getRepository(
|
|
6213
|
+
location: manager.getRepository(this.entities.location),
|
|
6119
6214
|
loader: manager.getRepository(exports.LoadersEntityClass),
|
|
6120
6215
|
};
|
|
6121
6216
|
}
|
|
@@ -6299,10 +6394,11 @@ exports.TransferCustomerOrderService = class TransferCustomerOrderService {
|
|
|
6299
6394
|
};
|
|
6300
6395
|
exports.TransferCustomerOrderService = tslib.__decorate([
|
|
6301
6396
|
common.Injectable(),
|
|
6302
|
-
tslib.__param(
|
|
6303
|
-
tslib.__param(
|
|
6304
|
-
tslib.__param(
|
|
6397
|
+
tslib.__param(6, common.Inject(TransferCustomerOrderEntity)),
|
|
6398
|
+
tslib.__param(7, common.Inject(TransferCustomerOrderItemEntity)),
|
|
6399
|
+
tslib.__param(8, common.Inject(StockEntity)),
|
|
6305
6400
|
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
6401
|
+
exports.WmsEntities,
|
|
6306
6402
|
exports.HelperService,
|
|
6307
6403
|
exports.MaterialService,
|
|
6308
6404
|
exports.BatchService,
|
|
@@ -6325,14 +6421,16 @@ exports.SaleOrderService = tslib.__decorate([
|
|
|
6325
6421
|
|
|
6326
6422
|
exports.ScrapeService = class ScrapeService {
|
|
6327
6423
|
dataSource;
|
|
6424
|
+
entities;
|
|
6328
6425
|
helperService;
|
|
6329
6426
|
materialService;
|
|
6330
6427
|
stockService;
|
|
6331
6428
|
scrapeOrderEntity;
|
|
6332
6429
|
stockEntity;
|
|
6333
6430
|
seqPrefix = 'SCR';
|
|
6334
|
-
constructor(dataSource, helperService, materialService, stockService, scrapeOrderEntity, stockEntity) {
|
|
6431
|
+
constructor(dataSource, entities, helperService, materialService, stockService, scrapeOrderEntity, stockEntity) {
|
|
6335
6432
|
this.dataSource = dataSource;
|
|
6433
|
+
this.entities = entities;
|
|
6336
6434
|
this.helperService = helperService;
|
|
6337
6435
|
this.materialService = materialService;
|
|
6338
6436
|
this.stockService = stockService;
|
|
@@ -6344,7 +6442,7 @@ exports.ScrapeService = class ScrapeService {
|
|
|
6344
6442
|
scrapeOrder: manager.getRepository(this.scrapeOrderEntity),
|
|
6345
6443
|
scrapeOrderItem: manager.getRepository(exports.ScrapeOrderItemEntityClass),
|
|
6346
6444
|
scrapeOrderChange: manager.getRepository(exports.ScrapeOrderChangeEntityClass),
|
|
6347
|
-
order: manager.getRepository(
|
|
6445
|
+
order: manager.getRepository(this.entities.order),
|
|
6348
6446
|
stock: manager.getRepository(this.stockEntity),
|
|
6349
6447
|
};
|
|
6350
6448
|
}
|
|
@@ -6397,9 +6495,10 @@ exports.ScrapeService = class ScrapeService {
|
|
|
6397
6495
|
};
|
|
6398
6496
|
exports.ScrapeService = tslib.__decorate([
|
|
6399
6497
|
common.Injectable(),
|
|
6400
|
-
tslib.__param(
|
|
6401
|
-
tslib.__param(
|
|
6498
|
+
tslib.__param(5, common.Inject(ScrapeOrderEntity)),
|
|
6499
|
+
tslib.__param(6, common.Inject(StockEntity)),
|
|
6402
6500
|
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
6501
|
+
exports.WmsEntities,
|
|
6403
6502
|
exports.HelperService,
|
|
6404
6503
|
exports.MaterialService,
|
|
6405
6504
|
exports.StockService, Object, Object])
|
|
@@ -6407,20 +6506,22 @@ exports.ScrapeService = tslib.__decorate([
|
|
|
6407
6506
|
|
|
6408
6507
|
exports.WarehouseMapDataService = class WarehouseMapDataService {
|
|
6409
6508
|
dataSource;
|
|
6509
|
+
entities;
|
|
6410
6510
|
defaultMapDataKey = 'DEFAULT_MAP_DATA_KEY';
|
|
6411
6511
|
warehouseMapDataRepository;
|
|
6412
|
-
constructor(dataSource) {
|
|
6512
|
+
constructor(dataSource, entities) {
|
|
6413
6513
|
this.dataSource = dataSource;
|
|
6514
|
+
this.entities = entities;
|
|
6414
6515
|
this.warehouseMapDataRepository =
|
|
6415
|
-
this.dataSource.getRepository(
|
|
6516
|
+
this.dataSource.getRepository(this.entities.warehouseMap);
|
|
6416
6517
|
}
|
|
6417
6518
|
onApplicationBootstrap() {
|
|
6418
6519
|
this.dataSource.transaction(async (manager) => {
|
|
6419
6520
|
const defaultMapData = await manager
|
|
6420
|
-
.getRepository(
|
|
6521
|
+
.getRepository(this.entities.warehouseMap)
|
|
6421
6522
|
.findOneBy({ id: this.defaultMapDataKey });
|
|
6422
6523
|
if (!defaultMapData) {
|
|
6423
|
-
await manager.getRepository(
|
|
6524
|
+
await manager.getRepository(this.entities.warehouseMap).save(manager.getRepository(this.entities.warehouseMap).create({
|
|
6424
6525
|
id: this.defaultMapDataKey,
|
|
6425
6526
|
mapData: {
|
|
6426
6527
|
id: this.defaultMapDataKey,
|
|
@@ -6434,7 +6535,8 @@ exports.WarehouseMapDataService = class WarehouseMapDataService {
|
|
|
6434
6535
|
};
|
|
6435
6536
|
exports.WarehouseMapDataService = tslib.__decorate([
|
|
6436
6537
|
common.Injectable(),
|
|
6437
|
-
tslib.__metadata("design:paramtypes", [typeorm.DataSource
|
|
6538
|
+
tslib.__metadata("design:paramtypes", [typeorm.DataSource,
|
|
6539
|
+
exports.WmsEntities])
|
|
6438
6540
|
], exports.WarehouseMapDataService);
|
|
6439
6541
|
|
|
6440
6542
|
/** DI token holding the resolved {@link WmsEventModuleOptions}. */
|
|
@@ -6602,34 +6704,81 @@ StockChangeSubscriber = tslib.__decorate([
|
|
|
6602
6704
|
|
|
6603
6705
|
var WmsModuleCoreModule_1;
|
|
6604
6706
|
/**
|
|
6605
|
-
*
|
|
6606
|
-
*
|
|
6607
|
-
* `MaterialEntityClass`.
|
|
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.
|
|
6608
6709
|
*
|
|
6609
|
-
*
|
|
6610
|
-
*
|
|
6611
|
-
*
|
|
6612
|
-
*
|
|
6613
|
-
*
|
|
6614
|
-
*
|
|
6615
|
-
* base module resolved: both are derived from the same option.
|
|
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.
|
|
6616
6716
|
*/
|
|
6617
|
-
const
|
|
6618
|
-
|
|
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,
|
|
6619
6760
|
useFactory: (configured) => {
|
|
6620
|
-
if (!configured)
|
|
6621
|
-
return
|
|
6622
|
-
// `WMSBaseModuleOptions` only asks for a child of the base
|
|
6623
|
-
//
|
|
6624
|
-
//
|
|
6625
|
-
//
|
|
6626
|
-
//
|
|
6627
|
-
if (!(configured.prototype instanceof
|
|
6628
|
-
throw new Error(`WmsModuleCoreModule:
|
|
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
|
+
: ''}.`);
|
|
6629
6772
|
return configured;
|
|
6630
6773
|
},
|
|
6631
|
-
inject: [
|
|
6632
|
-
};
|
|
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
|
+
];
|
|
6633
6782
|
const exportDependencies = [
|
|
6634
6783
|
exports.LoaderService,
|
|
6635
6784
|
exports.MaterialService,
|
|
@@ -6662,7 +6811,7 @@ exports.WmsModuleCoreModule = WmsModuleCoreModule_1 = class WmsModuleCoreModule
|
|
|
6662
6811
|
providers: [
|
|
6663
6812
|
...exportDependencies,
|
|
6664
6813
|
StockChangeSubscriber,
|
|
6665
|
-
|
|
6814
|
+
...resolvedEntityProviders,
|
|
6666
6815
|
{ provide: WMS_CORE_MODULE_OPTIONS, useValue: coreOptions },
|
|
6667
6816
|
{ provide: WMS_STOCK_ENRICH, useValue: !!coreOptions.enrichStockEvents },
|
|
6668
6817
|
],
|
|
@@ -6670,7 +6819,7 @@ exports.WmsModuleCoreModule = WmsModuleCoreModule_1 = class WmsModuleCoreModule
|
|
|
6670
6819
|
...exportDependencies,
|
|
6671
6820
|
coreModule,
|
|
6672
6821
|
ModelsModule,
|
|
6673
|
-
|
|
6822
|
+
...exportedEntityTokens,
|
|
6674
6823
|
WMS_CORE_MODULE_OPTIONS,
|
|
6675
6824
|
],
|
|
6676
6825
|
};
|
|
@@ -6684,7 +6833,7 @@ exports.WmsModuleCoreModule = WmsModuleCoreModule_1 = class WmsModuleCoreModule
|
|
|
6684
6833
|
providers: [
|
|
6685
6834
|
...exportDependencies,
|
|
6686
6835
|
StockChangeSubscriber,
|
|
6687
|
-
|
|
6836
|
+
...resolvedEntityProviders,
|
|
6688
6837
|
{
|
|
6689
6838
|
provide: WMS_CORE_MODULE_OPTIONS,
|
|
6690
6839
|
useValue: {
|
|
@@ -6699,7 +6848,7 @@ exports.WmsModuleCoreModule = WmsModuleCoreModule_1 = class WmsModuleCoreModule
|
|
|
6699
6848
|
...exportDependencies,
|
|
6700
6849
|
coreModule,
|
|
6701
6850
|
ModelsModule,
|
|
6702
|
-
|
|
6851
|
+
...exportedEntityTokens,
|
|
6703
6852
|
WMS_CORE_MODULE_OPTIONS,
|
|
6704
6853
|
],
|
|
6705
6854
|
};
|
|
@@ -6769,6 +6918,10 @@ exports.WmsEventDispatcher = WmsEventDispatcher_1 = tslib.__decorate([
|
|
|
6769
6918
|
tslib.__metadata("design:paramtypes", [Object, Object])
|
|
6770
6919
|
], exports.WmsEventDispatcher);
|
|
6771
6920
|
|
|
6921
|
+
Object.defineProperty(exports, "OrderEntityClass", {
|
|
6922
|
+
enumerable: true,
|
|
6923
|
+
get: function () { return wmsBaseNestjsModule.OrderEntity; }
|
|
6924
|
+
});
|
|
6772
6925
|
exports.AllocateInventoryOrderChangeEntity = AllocateInventoryOrderChangeEntity;
|
|
6773
6926
|
exports.AllocateInventoryOrderEntity = AllocateInventoryOrderEntity;
|
|
6774
6927
|
exports.AllocateInventoryOrderItemEntity = AllocateInventoryOrderItemEntity;
|
|
@@ -6786,6 +6939,7 @@ exports.MaterialUnitEntity = MaterialUnitEntity;
|
|
|
6786
6939
|
exports.MergeBatchOrderChangeEntity = MergeBatchOrderChangeEntity;
|
|
6787
6940
|
exports.MergeBatchOrderEntity = MergeBatchOrderEntity;
|
|
6788
6941
|
exports.MergeBatchOrderItemEntity = MergeBatchOrderItemEntity;
|
|
6942
|
+
exports.OrderEntity = OrderEntity;
|
|
6789
6943
|
exports.QualityInspectionOrderChangeEntity = QualityInspectionOrderChangeEntity;
|
|
6790
6944
|
exports.QualityInspectionOrderEntity = QualityInspectionOrderEntity;
|
|
6791
6945
|
exports.QualityInspectionOrderItemEntity = QualityInspectionOrderItemEntity;
|