@things-factory/warehouse-base 4.3.651 → 4.3.653
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/dist-server/constants/adjustment-code.js +13 -0
- package/dist-server/constants/adjustment-code.js.map +1 -0
- package/dist-server/constants/index.js +23 -0
- package/dist-server/constants/index.js.map +1 -0
- package/dist-server/constants/inventory.js +74 -0
- package/dist-server/constants/inventory.js.map +1 -0
- package/dist-server/constants/location.js +19 -0
- package/dist-server/constants/location.js.map +1 -0
- package/dist-server/constants/pallet.js +13 -0
- package/dist-server/constants/pallet.js.map +1 -0
- package/dist-server/constants/rule-type.js +8 -0
- package/dist-server/constants/rule-type.js.map +1 -0
- package/dist-server/constants/tote.js +9 -0
- package/dist-server/constants/tote.js.map +1 -0
- package/dist-server/controllers/ecommerce/ecommerce-controller.js +125 -0
- package/dist-server/controllers/ecommerce/ecommerce-controller.js.map +1 -0
- package/dist-server/controllers/ecommerce/index.js +22 -0
- package/dist-server/controllers/ecommerce/index.js.map +1 -0
- package/dist-server/controllers/ecommerce/pos-controller.js +65 -0
- package/dist-server/controllers/ecommerce/pos-controller.js.map +1 -0
- package/dist-server/controllers/ecommerce/powrup-controller.js +87 -0
- package/dist-server/controllers/ecommerce/powrup-controller.js.map +1 -0
- package/dist-server/controllers/ecommerce/sellercraft-controller.js +85 -0
- package/dist-server/controllers/ecommerce/sellercraft-controller.js.map +1 -0
- package/dist-server/controllers/ecommerce/webspert-controller.js +131 -0
- package/dist-server/controllers/ecommerce/webspert-controller.js.map +1 -0
- package/dist-server/controllers/index.js +19 -0
- package/dist-server/controllers/index.js.map +1 -0
- package/dist-server/controllers/warehouse-controller.js +143 -0
- package/dist-server/controllers/warehouse-controller.js.map +1 -0
- package/dist-server/index.js +35 -0
- package/dist-server/index.js.map +1 -0
- package/dist-server/middlewares/index.js +1 -0
- package/dist-server/middlewares/index.js.map +1 -0
- package/dist-server/migrations/index.js +12 -0
- package/dist-server/migrations/index.js.map +1 -0
- package/dist-server/service/index.js +96 -0
- package/dist-server/service/index.js.map +1 -0
- package/dist-server/service/inventory/index.js +9 -0
- package/dist-server/service/inventory/index.js.map +1 -0
- package/dist-server/service/inventory/inventory-mutation.js +414 -0
- package/dist-server/service/inventory/inventory-mutation.js.map +1 -0
- package/dist-server/service/inventory/inventory-query.js +1211 -0
- package/dist-server/service/inventory/inventory-query.js.map +1 -0
- package/dist-server/service/inventory/inventory-types.js +478 -0
- package/dist-server/service/inventory/inventory-types.js.map +1 -0
- package/dist-server/service/inventory/inventory.js +569 -0
- package/dist-server/service/inventory/inventory.js.map +1 -0
- package/dist-server/service/inventory-change/index.js +9 -0
- package/dist-server/service/inventory-change/index.js.map +1 -0
- package/dist-server/service/inventory-change/inventory-change-mutation.js +1188 -0
- package/dist-server/service/inventory-change/inventory-change-mutation.js.map +1 -0
- package/dist-server/service/inventory-change/inventory-change-query.js +150 -0
- package/dist-server/service/inventory-change/inventory-change-query.js.map +1 -0
- package/dist-server/service/inventory-change/inventory-change-types.js +73 -0
- package/dist-server/service/inventory-change/inventory-change-types.js.map +1 -0
- package/dist-server/service/inventory-change/inventory-change.js +225 -0
- package/dist-server/service/inventory-change/inventory-change.js.map +1 -0
- package/dist-server/service/inventory-history/index.js +9 -0
- package/dist-server/service/inventory-history/index.js.map +1 -0
- package/dist-server/service/inventory-history/inventory-history-mutation.js +121 -0
- package/dist-server/service/inventory-history/inventory-history-mutation.js.map +1 -0
- package/dist-server/service/inventory-history/inventory-history-query.js +1694 -0
- package/dist-server/service/inventory-history/inventory-history-query.js.map +1 -0
- package/dist-server/service/inventory-history/inventory-history-types.js +626 -0
- package/dist-server/service/inventory-history/inventory-history-types.js.map +1 -0
- package/dist-server/service/inventory-history/inventory-history.js +238 -0
- package/dist-server/service/inventory-history/inventory-history.js.map +1 -0
- package/dist-server/service/inventory-item/index.js +9 -0
- package/dist-server/service/inventory-item/index.js.map +1 -0
- package/dist-server/service/inventory-item/inventory-item-mutation.js +274 -0
- package/dist-server/service/inventory-item/inventory-item-mutation.js.map +1 -0
- package/dist-server/service/inventory-item/inventory-item-query.js +265 -0
- package/dist-server/service/inventory-item/inventory-item-query.js.map +1 -0
- package/dist-server/service/inventory-item/inventory-item-type.js +127 -0
- package/dist-server/service/inventory-item/inventory-item-type.js.map +1 -0
- package/dist-server/service/inventory-item/inventory-item.js +146 -0
- package/dist-server/service/inventory-item/inventory-item.js.map +1 -0
- package/dist-server/service/inventory-item-change/index.js +9 -0
- package/dist-server/service/inventory-item-change/index.js.map +1 -0
- package/dist-server/service/inventory-item-change/inventory-item-change-mutation.js +121 -0
- package/dist-server/service/inventory-item-change/inventory-item-change-mutation.js.map +1 -0
- package/dist-server/service/inventory-item-change/inventory-item-change-query.js +87 -0
- package/dist-server/service/inventory-item-change/inventory-item-change-query.js.map +1 -0
- package/dist-server/service/inventory-item-change/inventory-item-change-type.js +107 -0
- package/dist-server/service/inventory-item-change/inventory-item-change-type.js.map +1 -0
- package/dist-server/service/inventory-item-change/inventory-item-change.js +110 -0
- package/dist-server/service/inventory-item-change/inventory-item-change.js.map +1 -0
- package/dist-server/service/inventory-product/index.js +9 -0
- package/dist-server/service/inventory-product/index.js.map +1 -0
- package/dist-server/service/inventory-product/inventory-product-mutation.js +120 -0
- package/dist-server/service/inventory-product/inventory-product-mutation.js.map +1 -0
- package/dist-server/service/inventory-product/inventory-product-query.js +87 -0
- package/dist-server/service/inventory-product/inventory-product-query.js.map +1 -0
- package/dist-server/service/inventory-product/inventory-product-type.js +95 -0
- package/dist-server/service/inventory-product/inventory-product-type.js.map +1 -0
- package/dist-server/service/inventory-product/inventory-product.js +112 -0
- package/dist-server/service/inventory-product/inventory-product.js.map +1 -0
- package/dist-server/service/location/index.js +9 -0
- package/dist-server/service/location/index.js.map +1 -0
- package/dist-server/service/location/location-mutation.js +279 -0
- package/dist-server/service/location/location-mutation.js.map +1 -0
- package/dist-server/service/location/location-query.js +320 -0
- package/dist-server/service/location/location-query.js.map +1 -0
- package/dist-server/service/location/location-types.js +296 -0
- package/dist-server/service/location/location-types.js.map +1 -0
- package/dist-server/service/location/location.js +146 -0
- package/dist-server/service/location/location.js.map +1 -0
- package/dist-server/service/movement/index.js +9 -0
- package/dist-server/service/movement/index.js.map +1 -0
- package/dist-server/service/movement/movement-mutation.js +80 -0
- package/dist-server/service/movement/movement-mutation.js.map +1 -0
- package/dist-server/service/movement/movement-query.js +286 -0
- package/dist-server/service/movement/movement-query.js.map +1 -0
- package/dist-server/service/movement/movement-types.js +117 -0
- package/dist-server/service/movement/movement-types.js.map +1 -0
- package/dist-server/service/movement/movement.js +101 -0
- package/dist-server/service/movement/movement.js.map +1 -0
- package/dist-server/service/pallet/index.js +9 -0
- package/dist-server/service/pallet/index.js.map +1 -0
- package/dist-server/service/pallet/pallet-mutation.js +194 -0
- package/dist-server/service/pallet/pallet-mutation.js.map +1 -0
- package/dist-server/service/pallet/pallet-query.js +164 -0
- package/dist-server/service/pallet/pallet-query.js.map +1 -0
- package/dist-server/service/pallet/pallet-types.js +109 -0
- package/dist-server/service/pallet/pallet-types.js.map +1 -0
- package/dist-server/service/pallet/pallet.js +112 -0
- package/dist-server/service/pallet/pallet.js.map +1 -0
- package/dist-server/service/pallet-count/index.js +9 -0
- package/dist-server/service/pallet-count/index.js.map +1 -0
- package/dist-server/service/pallet-count/pallet-count-mutation.js +153 -0
- package/dist-server/service/pallet-count/pallet-count-mutation.js.map +1 -0
- package/dist-server/service/pallet-count/pallet-count-query.js +86 -0
- package/dist-server/service/pallet-count/pallet-count-query.js.map +1 -0
- package/dist-server/service/pallet-count/pallet-count-types.js +65 -0
- package/dist-server/service/pallet-count/pallet-count-types.js.map +1 -0
- package/dist-server/service/pallet-count/pallet-count.js +89 -0
- package/dist-server/service/pallet-count/pallet-count.js.map +1 -0
- package/dist-server/service/pallet-history/index.js +9 -0
- package/dist-server/service/pallet-history/index.js.map +1 -0
- package/dist-server/service/pallet-history/pallet-history-mutation.js +120 -0
- package/dist-server/service/pallet-history/pallet-history-mutation.js.map +1 -0
- package/dist-server/service/pallet-history/pallet-history-query.js +87 -0
- package/dist-server/service/pallet-history/pallet-history-query.js.map +1 -0
- package/dist-server/service/pallet-history/pallet-history-types.js +65 -0
- package/dist-server/service/pallet-history/pallet-history-types.js.map +1 -0
- package/dist-server/service/pallet-history/pallet-history.js +107 -0
- package/dist-server/service/pallet-history/pallet-history.js.map +1 -0
- package/dist-server/service/product-detail-stock/index.js +9 -0
- package/dist-server/service/product-detail-stock/index.js.map +1 -0
- package/dist-server/service/product-detail-stock/product-detail-stock-mutation.js +120 -0
- package/dist-server/service/product-detail-stock/product-detail-stock-mutation.js.map +1 -0
- package/dist-server/service/product-detail-stock/product-detail-stock-query.js +66 -0
- package/dist-server/service/product-detail-stock/product-detail-stock-query.js.map +1 -0
- package/dist-server/service/product-detail-stock/product-detail-stock-types.js +57 -0
- package/dist-server/service/product-detail-stock/product-detail-stock-types.js.map +1 -0
- package/dist-server/service/product-detail-stock/product-detail-stock.js +90 -0
- package/dist-server/service/product-detail-stock/product-detail-stock.js.map +1 -0
- package/dist-server/service/reduced-inventory-history/index.js +6 -0
- package/dist-server/service/reduced-inventory-history/index.js.map +1 -0
- package/dist-server/service/reduced-inventory-history/reduced-inventory-history.js +133 -0
- package/dist-server/service/reduced-inventory-history/reduced-inventory-history.js.map +1 -0
- package/dist-server/service/tote/index.js +9 -0
- package/dist-server/service/tote/index.js.map +1 -0
- package/dist-server/service/tote/tote-mutation.js +192 -0
- package/dist-server/service/tote/tote-mutation.js.map +1 -0
- package/dist-server/service/tote/tote-query.js +162 -0
- package/dist-server/service/tote/tote-query.js.map +1 -0
- package/dist-server/service/tote/tote-types.js +75 -0
- package/dist-server/service/tote/tote-types.js.map +1 -0
- package/dist-server/service/tote/tote.js +98 -0
- package/dist-server/service/tote/tote.js.map +1 -0
- package/dist-server/service/warehouse/index.js +9 -0
- package/dist-server/service/warehouse/index.js.map +1 -0
- package/dist-server/service/warehouse/warehouse-mutation.js +148 -0
- package/dist-server/service/warehouse/warehouse-mutation.js.map +1 -0
- package/dist-server/service/warehouse/warehouse-query.js +91 -0
- package/dist-server/service/warehouse/warehouse-query.js.map +1 -0
- package/dist-server/service/warehouse/warehouse-types.js +82 -0
- package/dist-server/service/warehouse/warehouse-types.js.map +1 -0
- package/dist-server/service/warehouse/warehouse.js +114 -0
- package/dist-server/service/warehouse/warehouse.js.map +1 -0
- package/dist-server/utils/datetime-util.js +61 -0
- package/dist-server/utils/datetime-util.js.map +1 -0
- package/dist-server/utils/index.js +20 -0
- package/dist-server/utils/index.js.map +1 -0
- package/dist-server/utils/inventory-no-generator.js +17 -0
- package/dist-server/utils/inventory-no-generator.js.map +1 -0
- package/dist-server/utils/inventory-util.js +413 -0
- package/dist-server/utils/inventory-util.js.map +1 -0
- package/package.json +6 -6
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ProductDetailStockMutation = void 0;
|
|
16
|
+
const type_graphql_1 = require("type-graphql");
|
|
17
|
+
const typeorm_1 = require("typeorm");
|
|
18
|
+
const product_detail_stock_1 = require("./product-detail-stock");
|
|
19
|
+
const product_detail_stock_types_1 = require("./product-detail-stock-types");
|
|
20
|
+
let ProductDetailStockMutation = class ProductDetailStockMutation {
|
|
21
|
+
async createProductDetailStock(productDetailStock, context) {
|
|
22
|
+
const { domain, user, tx } = context.state;
|
|
23
|
+
return await tx.getRepository(product_detail_stock_1.ProductDetailStock).save(Object.assign(Object.assign({}, productDetailStock), { domain, creator: user, updater: user }));
|
|
24
|
+
}
|
|
25
|
+
async updateProductDetailStock(id, patch, context) {
|
|
26
|
+
const { domain, user, tx } = context.state;
|
|
27
|
+
const repository = tx.getRepository(product_detail_stock_1.ProductDetailStock);
|
|
28
|
+
const productDetailStock = await repository.findOne({
|
|
29
|
+
where: { domain, id }
|
|
30
|
+
});
|
|
31
|
+
return await repository.save(Object.assign(Object.assign(Object.assign({}, productDetailStock), patch), { updater: user }));
|
|
32
|
+
}
|
|
33
|
+
async updateMultipleProductDetailStock(patches, context) {
|
|
34
|
+
const { domain, user, tx } = context.state;
|
|
35
|
+
let results = [];
|
|
36
|
+
const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
|
|
37
|
+
const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
|
|
38
|
+
const productDetailStockRepo = tx.getRepository(product_detail_stock_1.ProductDetailStock);
|
|
39
|
+
if (_createRecords.length > 0) {
|
|
40
|
+
for (let i = 0; i < _createRecords.length; i++) {
|
|
41
|
+
const newRecord = _createRecords[i];
|
|
42
|
+
const result = await productDetailStockRepo.save(Object.assign(Object.assign({}, newRecord), { domain, creator: user, updater: user }));
|
|
43
|
+
results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (_updateRecords.length > 0) {
|
|
47
|
+
for (let i = 0; i < _updateRecords.length; i++) {
|
|
48
|
+
const newRecord = _updateRecords[i];
|
|
49
|
+
const productDetailStock = await productDetailStockRepo.findOne(newRecord.id);
|
|
50
|
+
const result = await productDetailStockRepo.save(Object.assign(Object.assign(Object.assign({}, productDetailStock), newRecord), { updater: user }));
|
|
51
|
+
results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return results;
|
|
55
|
+
}
|
|
56
|
+
async deleteProductDetailStock(id, context) {
|
|
57
|
+
const { domain, tx } = context.state;
|
|
58
|
+
await tx.getRepository(product_detail_stock_1.ProductDetailStock).delete({ domain, id });
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
async deleteProductDetailStocks(ids, context) {
|
|
62
|
+
const { domain, tx } = context.state;
|
|
63
|
+
await tx.getRepository(product_detail_stock_1.ProductDetailStock).delete({
|
|
64
|
+
domain,
|
|
65
|
+
id: (0, typeorm_1.In)(ids)
|
|
66
|
+
});
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
72
|
+
(0, type_graphql_1.Mutation)(returns => product_detail_stock_1.ProductDetailStock, { description: 'To create new ProductDetailStock' }),
|
|
73
|
+
__param(0, (0, type_graphql_1.Arg)('productDetailStock')),
|
|
74
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
75
|
+
__metadata("design:type", Function),
|
|
76
|
+
__metadata("design:paramtypes", [product_detail_stock_types_1.NewProductDetailStock, Object]),
|
|
77
|
+
__metadata("design:returntype", Promise)
|
|
78
|
+
], ProductDetailStockMutation.prototype, "createProductDetailStock", null);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
81
|
+
(0, type_graphql_1.Mutation)(returns => product_detail_stock_1.ProductDetailStock, { description: 'To modify ProductDetailStock information' }),
|
|
82
|
+
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
83
|
+
__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
84
|
+
__param(2, (0, type_graphql_1.Ctx)()),
|
|
85
|
+
__metadata("design:type", Function),
|
|
86
|
+
__metadata("design:paramtypes", [String, product_detail_stock_types_1.ProductDetailStockPatch, Object]),
|
|
87
|
+
__metadata("design:returntype", Promise)
|
|
88
|
+
], ProductDetailStockMutation.prototype, "updateProductDetailStock", null);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
91
|
+
(0, type_graphql_1.Mutation)(returns => [product_detail_stock_1.ProductDetailStock], { description: "To modify multiple ProductDetailStocks' information" }),
|
|
92
|
+
__param(0, (0, type_graphql_1.Arg)('patches', type => [product_detail_stock_types_1.ProductDetailStockPatch])),
|
|
93
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
94
|
+
__metadata("design:type", Function),
|
|
95
|
+
__metadata("design:paramtypes", [Array, Object]),
|
|
96
|
+
__metadata("design:returntype", Promise)
|
|
97
|
+
], ProductDetailStockMutation.prototype, "updateMultipleProductDetailStock", null);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
100
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete ProductDetailStock' }),
|
|
101
|
+
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
102
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
103
|
+
__metadata("design:type", Function),
|
|
104
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
105
|
+
__metadata("design:returntype", Promise)
|
|
106
|
+
], ProductDetailStockMutation.prototype, "deleteProductDetailStock", null);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
109
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple productDetailStocks' }),
|
|
110
|
+
__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
111
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
112
|
+
__metadata("design:type", Function),
|
|
113
|
+
__metadata("design:paramtypes", [Array, Object]),
|
|
114
|
+
__metadata("design:returntype", Promise)
|
|
115
|
+
], ProductDetailStockMutation.prototype, "deleteProductDetailStocks", null);
|
|
116
|
+
ProductDetailStockMutation = __decorate([
|
|
117
|
+
(0, type_graphql_1.Resolver)(product_detail_stock_1.ProductDetailStock)
|
|
118
|
+
], ProductDetailStockMutation);
|
|
119
|
+
exports.ProductDetailStockMutation = ProductDetailStockMutation;
|
|
120
|
+
//# sourceMappingURL=product-detail-stock-mutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-detail-stock-mutation.js","sourceRoot":"","sources":["../../../server/service/product-detail-stock/product-detail-stock-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAsE;AACtE,qCAA2C;AAC3C,iEAA2D;AAC3D,6EAA6F;AAGtF,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IAG/B,AAAN,KAAK,CAAC,wBAAwB,CACD,kBAAyC,EAC7D,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,yCAAkB,CAAC,CAAC,IAAI,iCACjD,kBAAkB,KACrB,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,wBAAwB,CACjB,EAAU,EACP,KAA8B,EACrC,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,yCAAkB,CAAC,CAAA;QACvD,MAAM,kBAAkB,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YAClD,KAAK,EAAE,EAAE,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B,CAAC;GAChB,0BAA0B,CAyGtC;AAzGY,gEAA0B"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var _a;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ProductDetailStockQuery = void 0;
|
|
17
|
+
const type_graphql_1 = require("type-graphql");
|
|
18
|
+
const typeorm_1 = require("typeorm");
|
|
19
|
+
const shell_1 = require("@things-factory/shell");
|
|
20
|
+
const product_detail_stock_1 = require("./product-detail-stock");
|
|
21
|
+
const product_detail_stock_types_1 = require("./product-detail-stock-types");
|
|
22
|
+
let ProductDetailStockQuery = class ProductDetailStockQuery {
|
|
23
|
+
async productDetailStock(id, context) {
|
|
24
|
+
const { domain } = context.state;
|
|
25
|
+
return await (0, typeorm_1.getRepository)(product_detail_stock_1.ProductDetailStock).findOne({
|
|
26
|
+
where: { domain, id }
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
async productDetailStocks(params, context) {
|
|
30
|
+
const { domain } = context.state;
|
|
31
|
+
const convertedParams = (0, shell_1.convertListParams)(params, domain.id);
|
|
32
|
+
const [items, total] = await (0, typeorm_1.getRepository)(product_detail_stock_1.ProductDetailStock).findAndCount(convertedParams);
|
|
33
|
+
return { items, total };
|
|
34
|
+
}
|
|
35
|
+
async domain(productDetailStock) {
|
|
36
|
+
return await (0, typeorm_1.getRepository)(shell_1.Domain).findOne(productDetailStock.domainId);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, type_graphql_1.Query)(returns => product_detail_stock_1.ProductDetailStock, { description: 'To fetch a ProductDetailStock' }),
|
|
41
|
+
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
42
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
43
|
+
__metadata("design:type", Function),
|
|
44
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
45
|
+
__metadata("design:returntype", Promise)
|
|
46
|
+
], ProductDetailStockQuery.prototype, "productDetailStock", null);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, type_graphql_1.Query)(returns => product_detail_stock_types_1.ProductDetailStockList, { description: 'To fetch multiple ProductDetailStocks' }),
|
|
49
|
+
__param(0, (0, type_graphql_1.Args)()),
|
|
50
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
51
|
+
__metadata("design:type", Function),
|
|
52
|
+
__metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
|
|
53
|
+
__metadata("design:returntype", Promise)
|
|
54
|
+
], ProductDetailStockQuery.prototype, "productDetailStocks", null);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
|
|
57
|
+
__param(0, (0, type_graphql_1.Root)()),
|
|
58
|
+
__metadata("design:type", Function),
|
|
59
|
+
__metadata("design:paramtypes", [product_detail_stock_1.ProductDetailStock]),
|
|
60
|
+
__metadata("design:returntype", Promise)
|
|
61
|
+
], ProductDetailStockQuery.prototype, "domain", null);
|
|
62
|
+
ProductDetailStockQuery = __decorate([
|
|
63
|
+
(0, type_graphql_1.Resolver)(product_detail_stock_1.ProductDetailStock)
|
|
64
|
+
], ProductDetailStockQuery);
|
|
65
|
+
exports.ProductDetailStockQuery = ProductDetailStockQuery;
|
|
66
|
+
//# sourceMappingURL=product-detail-stock-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-detail-stock-query.js","sourceRoot":"","sources":["../../../server/service/product-detail-stock/product-detail-stock-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA8F;AAC9F,qCAAuC;AACvC,iDAA4E;AAE5E,iEAA2D;AAC3D,6EAAqE;AAG9D,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAE5B,AAAN,KAAK,CAAC,kBAAkB,CAAY,EAAU,EAAS,OAAY;QACjE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,uBAAa,EAAC,yCAAkB,CAAC,CAAC,OAAO,CAAC;YACrD,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;SACtB,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,mBAAmB,CAAS,MAAiB,EAAS,OAAY;QACtE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,eAAe,GAAG,IAAA,yBAAiB,EAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,CAAA;QAC5D,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,IAAA,uBAAa,EAAC,yCAAkB,CAAC,CAAC,YAAY,CAAC,eAAe,CAAC,CAAA;QAE5F,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,kBAAsC;QACzD,OAAO,MAAM,IAAA,uBAAa,EAAC,cAAM,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAA;IACzE,CAAC;CACF,CAAA;AAtBO;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,yCAAkB,EAAE,EAAE,WAAW,EAAE,+BAA+B,EAAE,CAAC;IAC7D,WAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;iEAMrD;AAGK;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,mDAAsB,EAAE,EAAE,WAAW,EAAE,uCAAuC,EAAE,CAAC;IACxE,WAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,WAAA,IAAA,kBAAG,GAAE,CAAA;;yDAAjB,iBAAS,oBAAT,iBAAS;;kEAOlD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAqB,yCAAkB;;qDAE1D;AAvBU,uBAAuB;IADnC,IAAA,uBAAQ,EAAC,yCAAkB,CAAC;GAChB,uBAAuB,CAwBnC;AAxBY,0DAAuB"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ProductDetailStockList = exports.ProductDetailStockPatch = exports.NewProductDetailStock = void 0;
|
|
13
|
+
const type_graphql_1 = require("type-graphql");
|
|
14
|
+
const product_detail_stock_1 = require("./product-detail-stock");
|
|
15
|
+
let NewProductDetailStock = class NewProductDetailStock {
|
|
16
|
+
};
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, type_graphql_1.Field)(),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], NewProductDetailStock.prototype, "name", void 0);
|
|
21
|
+
NewProductDetailStock = __decorate([
|
|
22
|
+
(0, type_graphql_1.InputType)()
|
|
23
|
+
], NewProductDetailStock);
|
|
24
|
+
exports.NewProductDetailStock = NewProductDetailStock;
|
|
25
|
+
let ProductDetailStockPatch = class ProductDetailStockPatch {
|
|
26
|
+
};
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], ProductDetailStockPatch.prototype, "id", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], ProductDetailStockPatch.prototype, "name", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, type_graphql_1.Field)(),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], ProductDetailStockPatch.prototype, "cuFlag", void 0);
|
|
39
|
+
ProductDetailStockPatch = __decorate([
|
|
40
|
+
(0, type_graphql_1.InputType)()
|
|
41
|
+
], ProductDetailStockPatch);
|
|
42
|
+
exports.ProductDetailStockPatch = ProductDetailStockPatch;
|
|
43
|
+
let ProductDetailStockList = class ProductDetailStockList {
|
|
44
|
+
};
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, type_graphql_1.Field)(type => [product_detail_stock_1.ProductDetailStock]),
|
|
47
|
+
__metadata("design:type", Array)
|
|
48
|
+
], ProductDetailStockList.prototype, "items", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
51
|
+
__metadata("design:type", Number)
|
|
52
|
+
], ProductDetailStockList.prototype, "total", void 0);
|
|
53
|
+
ProductDetailStockList = __decorate([
|
|
54
|
+
(0, type_graphql_1.ObjectType)()
|
|
55
|
+
], ProductDetailStockList);
|
|
56
|
+
exports.ProductDetailStockList = ProductDetailStockList;
|
|
57
|
+
//# sourceMappingURL=product-detail-stock-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-detail-stock-types.js","sourceRoot":"","sources":["../../../server/service/product-detail-stock/product-detail-stock-types.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAsF;AAEtF,iEAAqF;AAG9E,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;CAGjC,CAAA;AAFC;IAAC,IAAA,oBAAK,GAAE;;mDACI;AAFD,qBAAqB;IADjC,IAAA,wBAAS,GAAE;GACC,qBAAqB,CAGjC;AAHY,sDAAqB;AAM3B,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;CASnC,CAAA;AARC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDAC3B;AAEX;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACb;AAEb;IAAC,IAAA,oBAAK,GAAE;;uDACM;AARH,uBAAuB;IADnC,IAAA,wBAAS,GAAE;GACC,uBAAuB,CASnC;AATY,0DAAuB;AAY7B,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;CAMlC,CAAA;AALC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,yCAAkB,CAAC,CAAC;;qDACT;AAE3B;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;qDACN;AALF,sBAAsB;IADlC,IAAA,yBAAU,GAAE;GACA,sBAAsB,CAMlC;AANY,wDAAsB"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var _a, _b;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.ProductDetailStock = exports.ProductDetailStockStatus = void 0;
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const type_graphql_1 = require("type-graphql");
|
|
16
|
+
const product_base_1 = require("@things-factory/product-base");
|
|
17
|
+
const shell_1 = require("@things-factory/shell");
|
|
18
|
+
var ProductDetailStockStatus;
|
|
19
|
+
(function (ProductDetailStockStatus) {
|
|
20
|
+
ProductDetailStockStatus["STATUS_A"] = "STATUS_A";
|
|
21
|
+
ProductDetailStockStatus["STATUS_B"] = "STATUS_B";
|
|
22
|
+
})(ProductDetailStockStatus = exports.ProductDetailStockStatus || (exports.ProductDetailStockStatus = {}));
|
|
23
|
+
(0, type_graphql_1.registerEnumType)(ProductDetailStockStatus, {
|
|
24
|
+
name: 'ProductDetailStockStatus',
|
|
25
|
+
description: 'state enumeration of a productDetailStock'
|
|
26
|
+
});
|
|
27
|
+
let ProductDetailStock = class ProductDetailStock {
|
|
28
|
+
};
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
31
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], ProductDetailStock.prototype, "id", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.OneToOne)(type => product_base_1.ProductDetail, { nullable: true }),
|
|
36
|
+
(0, typeorm_1.JoinColumn)(),
|
|
37
|
+
(0, type_graphql_1.Field)(type => product_base_1.ProductDetail, { nullable: true }),
|
|
38
|
+
__metadata("design:type", typeof (_a = typeof product_base_1.ProductDetail !== "undefined" && product_base_1.ProductDetail) === "function" ? _a : Object)
|
|
39
|
+
], ProductDetailStock.prototype, "productDetail", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)('float'),
|
|
42
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
43
|
+
__metadata("design:type", Number)
|
|
44
|
+
], ProductDetailStock.prototype, "qty", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
47
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
48
|
+
__metadata("design:type", Number)
|
|
49
|
+
], ProductDetailStock.prototype, "lockedQty", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
52
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
53
|
+
__metadata("design:type", Number)
|
|
54
|
+
], ProductDetailStock.prototype, "unassignedQty", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
57
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
58
|
+
__metadata("design:type", Number)
|
|
59
|
+
], ProductDetailStock.prototype, "uomValue", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
62
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
63
|
+
__metadata("design:type", Number)
|
|
64
|
+
], ProductDetailStock.prototype, "lockedUomValue", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)('float', { nullable: true }),
|
|
67
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
68
|
+
__metadata("design:type", Number)
|
|
69
|
+
], ProductDetailStock.prototype, "unassignedUomValue", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
72
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
73
|
+
__metadata("design:type", typeof (_b = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _b : Object)
|
|
74
|
+
], ProductDetailStock.prototype, "domain", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.RelationId)((productDetailStock) => productDetailStock.domain),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], ProductDetailStock.prototype, "domainId", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
81
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
82
|
+
__metadata("design:type", Date)
|
|
83
|
+
], ProductDetailStock.prototype, "updatedAt", void 0);
|
|
84
|
+
ProductDetailStock = __decorate([
|
|
85
|
+
(0, typeorm_1.Entity)(),
|
|
86
|
+
(0, typeorm_1.Index)('ix_product_detail_stock_0', (productDetailStock) => [productDetailStock.domain, productDetailStock.id], { unique: true }),
|
|
87
|
+
(0, type_graphql_1.ObjectType)({ description: 'Entity for ProductDetailStock' })
|
|
88
|
+
], ProductDetailStock);
|
|
89
|
+
exports.ProductDetailStock = ProductDetailStock;
|
|
90
|
+
//# sourceMappingURL=product-detail-stock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-detail-stock.js","sourceRoot":"","sources":["../../../server/service/product-detail-stock/product-detail-stock.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAWgB;AAChB,+CAA2E;AAE3E,+DAA4D;AAC5D,iDAA8C;AAE9C,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IAClC,iDAAqB,CAAA;IACrB,iDAAqB,CAAA;AACvB,CAAC,EAHW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAGnC;AAED,IAAA,+BAAgB,EAAC,wBAAwB,EAAE;IACzC,IAAI,EAAE,0BAA0B;IAChC,WAAW,EAAE,2CAA2C;CACzD,CAAC,CAAA;AASK,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CA4C9B,CAAA;AA3CC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;8CACC;AAEnB;IAAC,IAAA,kBAAQ,EAAC,IAAI,CAAC,EAAE,CAAC,4BAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACnD,IAAA,oBAAU,GAAE;IACZ,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,4BAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDAClC,4BAAa,oBAAb,4BAAa;yDAAA;AAE5B;IAAC,IAAA,gBAAM,EAAC,OAAO,CAAC;IACf,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACf;AAEX;IAAC,IAAA,gBAAM,EAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACnC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACT;AAEjB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AAE,+BAA+B,EAAE,CAAC;GAChD,kBAAkB,CA4C9B;AA5CY,gDAAkB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.entities = void 0;
|
|
4
|
+
const reduced_inventory_history_1 = require("./reduced-inventory-history");
|
|
5
|
+
exports.entities = [reduced_inventory_history_1.ReducedInventoryHistory];
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/reduced-inventory-history/index.ts"],"names":[],"mappings":";;;AAAA,2EAAqE;AAExD,QAAA,QAAQ,GAAG,CAAC,mDAAuB,CAAC,CAAA"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ReducedInventoryHistory = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
let ReducedInventoryHistory = class ReducedInventoryHistory {
|
|
15
|
+
};
|
|
16
|
+
__decorate([
|
|
17
|
+
(0, typeorm_1.ViewColumn)(),
|
|
18
|
+
__metadata("design:type", String)
|
|
19
|
+
], ReducedInventoryHistory.prototype, "id", void 0);
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.ViewColumn)(),
|
|
22
|
+
__metadata("design:type", Number)
|
|
23
|
+
], ReducedInventoryHistory.prototype, "seq", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.ViewColumn)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], ReducedInventoryHistory.prototype, "domainId", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.ViewColumn)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], ReducedInventoryHistory.prototype, "bizplaceId", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.ViewColumn)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], ReducedInventoryHistory.prototype, "inventoryId", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.ViewColumn)(),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], ReducedInventoryHistory.prototype, "refOrderId", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.ViewColumn)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], ReducedInventoryHistory.prototype, "orderNo", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.ViewColumn)(),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], ReducedInventoryHistory.prototype, "name", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.ViewColumn)(),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], ReducedInventoryHistory.prototype, "palletId", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.ViewColumn)(),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], ReducedInventoryHistory.prototype, "cartonId", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.ViewColumn)(),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], ReducedInventoryHistory.prototype, "batchId", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.ViewColumn)(),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], ReducedInventoryHistory.prototype, "batchIdRef", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.ViewColumn)(),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], ReducedInventoryHistory.prototype, "productId", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.ViewColumn)(),
|
|
70
|
+
__metadata("design:type", String)
|
|
71
|
+
], ReducedInventoryHistory.prototype, "warehouseId", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.ViewColumn)(),
|
|
74
|
+
__metadata("design:type", String)
|
|
75
|
+
], ReducedInventoryHistory.prototype, "locationId", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typeorm_1.ViewColumn)(),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], ReducedInventoryHistory.prototype, "zone", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.ViewColumn)(),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], ReducedInventoryHistory.prototype, "orderRefNo", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, typeorm_1.ViewColumn)(),
|
|
86
|
+
__metadata("design:type", String)
|
|
87
|
+
], ReducedInventoryHistory.prototype, "packingType", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typeorm_1.ViewColumn)(),
|
|
90
|
+
__metadata("design:type", String)
|
|
91
|
+
], ReducedInventoryHistory.prototype, "uom", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, typeorm_1.ViewColumn)(),
|
|
94
|
+
__metadata("design:type", Number)
|
|
95
|
+
], ReducedInventoryHistory.prototype, "uomValue", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, typeorm_1.ViewColumn)(),
|
|
98
|
+
__metadata("design:type", Number)
|
|
99
|
+
], ReducedInventoryHistory.prototype, "openingUomValue", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, typeorm_1.ViewColumn)(),
|
|
102
|
+
__metadata("design:type", Number)
|
|
103
|
+
], ReducedInventoryHistory.prototype, "qty", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, typeorm_1.ViewColumn)(),
|
|
106
|
+
__metadata("design:type", Number)
|
|
107
|
+
], ReducedInventoryHistory.prototype, "openingQty", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, typeorm_1.ViewColumn)(),
|
|
110
|
+
__metadata("design:type", String)
|
|
111
|
+
], ReducedInventoryHistory.prototype, "status", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, typeorm_1.ViewColumn)(),
|
|
114
|
+
__metadata("design:type", String)
|
|
115
|
+
], ReducedInventoryHistory.prototype, "transactionType", void 0);
|
|
116
|
+
ReducedInventoryHistory = __decorate([
|
|
117
|
+
(0, typeorm_1.ViewEntity)({
|
|
118
|
+
expression: `
|
|
119
|
+
SELECT ih.* FROM inventory_histories ih
|
|
120
|
+
WHERE NOT EXISTS (
|
|
121
|
+
SELECT ih2.id FROM inventory_histories ih2
|
|
122
|
+
WHERE ih2.domain_id = ih.domain_id AND ih2.pallet_id::text = ih.pallet_id::TEXT
|
|
123
|
+
AND (
|
|
124
|
+
((ih2.seq = (ih.seq + 1) OR ih2.seq = ih.seq) AND (ih2.transaction_type::text = 'UNDO_UNLOADING'::TEXT))
|
|
125
|
+
OR
|
|
126
|
+
((ih2.seq = (ih.seq + 1) OR ih2.seq = ih.seq) AND (ih2.transaction_type::text = 'UNDO_PUTAWAY'::TEXT))
|
|
127
|
+
)
|
|
128
|
+
)
|
|
129
|
+
`
|
|
130
|
+
})
|
|
131
|
+
], ReducedInventoryHistory);
|
|
132
|
+
exports.ReducedInventoryHistory = ReducedInventoryHistory;
|
|
133
|
+
//# sourceMappingURL=reduced-inventory-history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reduced-inventory-history.js","sourceRoot":"","sources":["../../../server/service/reduced-inventory-history/reduced-inventory-history.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgD;AAgBzC,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;CA2EnC,CAAA;AA1EC;IAAC,IAAA,oBAAU,GAAE;;mDACH;AAEV;IAAC,IAAA,oBAAU,GAAE;;oDACF;AAEX;IAAC,IAAA,oBAAU,GAAE;;yDACG;AAEhB;IAAC,IAAA,oBAAU,GAAE;;2DACK;AAElB;IAAC,IAAA,oBAAU,GAAE;;4DACM;AAEnB;IAAC,IAAA,oBAAU,GAAE;;2DACK;AAElB;IAAC,IAAA,oBAAU,GAAE;;wDACE;AAEf;IAAC,IAAA,oBAAU,GAAE;;qDACD;AAEZ;IAAC,IAAA,oBAAU,GAAE;;yDACG;AAEhB;IAAC,IAAA,oBAAU,GAAE;;yDACG;AAEhB;IAAC,IAAA,oBAAU,GAAE;;wDACE;AAEf;IAAC,IAAA,oBAAU,GAAE;;2DACK;AAElB;IAAC,IAAA,oBAAU,GAAE;;0DACI;AAEjB;IAAC,IAAA,oBAAU,GAAE;;4DACM;AAEnB;IAAC,IAAA,oBAAU,GAAE;;2DACK;AAElB;IAAC,IAAA,oBAAU,GAAE;;qDACD;AAEZ;IAAC,IAAA,oBAAU,GAAE;;2DACK;AAElB;IAAC,IAAA,oBAAU,GAAE;;4DACM;AAEnB;IAAC,IAAA,oBAAU,GAAE;;oDACF;AAEX;IAAC,IAAA,oBAAU,GAAE;;yDACG;AAEhB;IAAC,IAAA,oBAAU,GAAE;;gEACU;AAEvB;IAAC,IAAA,oBAAU,GAAE;;oDACF;AAEX;IAAC,IAAA,oBAAU,GAAE;;2DACK;AAElB;IAAC,IAAA,oBAAU,GAAE;;uDACC;AAEd;IAAC,IAAA,oBAAU,GAAE;;gEACU;AA1EZ,uBAAuB;IAdnC,IAAA,oBAAU,EAAC;QACV,UAAU,EAAE;;;;;;;;;;;GAWX;KACF,CAAC;GACW,uBAAuB,CA2EnC;AA3EY,0DAAuB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolvers = exports.entities = void 0;
|
|
4
|
+
const tote_1 = require("./tote");
|
|
5
|
+
const tote_mutation_1 = require("./tote-mutation");
|
|
6
|
+
const tote_query_1 = require("./tote-query");
|
|
7
|
+
exports.entities = [tote_1.Tote];
|
|
8
|
+
exports.resolvers = [tote_query_1.ToteQuery, tote_mutation_1.ToteMutation];
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/tote/index.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,mDAA8C;AAC9C,6CAAwC;AAE3B,QAAA,QAAQ,GAAG,CAAC,WAAI,CAAC,CAAA;AACjB,QAAA,SAAS,GAAG,CAAC,sBAAS,EAAE,4BAAY,CAAC,CAAA"}
|