@things-factory/warehouse-base 4.3.671 → 4.3.673
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 +321 -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 +10 -10
|
@@ -0,0 +1,321 @@
|
|
|
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, _b, _c, _d, _e;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.LocationQuery = void 0;
|
|
17
|
+
const type_graphql_1 = require("type-graphql");
|
|
18
|
+
const typeorm_1 = require("typeorm");
|
|
19
|
+
const biz_base_1 = require("@things-factory/biz-base");
|
|
20
|
+
const shell_1 = require("@things-factory/shell");
|
|
21
|
+
const inventory_1 = require("../../constants/inventory");
|
|
22
|
+
const warehouse_1 = require("../warehouse/warehouse");
|
|
23
|
+
const location_1 = require("./location");
|
|
24
|
+
const location_types_1 = require("./location-types");
|
|
25
|
+
let LocationQuery = class LocationQuery {
|
|
26
|
+
async locations(params, context) {
|
|
27
|
+
const queryBuilder = (0, typeorm_1.getRepository)(location_1.Location).createQueryBuilder();
|
|
28
|
+
queryBuilder.leftJoinAndSelect('Location.warehouse', 'Warehouse');
|
|
29
|
+
(0, shell_1.buildQuery)(queryBuilder, params, context);
|
|
30
|
+
const [items, total] = await queryBuilder.getManyAndCount();
|
|
31
|
+
return { items, total };
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @description this resolver was specially made to return huge locations data
|
|
35
|
+
* without dropping off performance due to typegraphql limitations
|
|
36
|
+
* @returns pure location data only. there will be no other table joined to avoid
|
|
37
|
+
* ORM lagging issue (converting to object extremely withdraws the performance)
|
|
38
|
+
* */
|
|
39
|
+
async pureLocations(params, context) {
|
|
40
|
+
const queryBuilder = (0, typeorm_1.getRepository)(location_1.Location).createQueryBuilder('location');
|
|
41
|
+
(0, shell_1.buildQuery)(queryBuilder, params, context);
|
|
42
|
+
const items = await queryBuilder.getRawMany();
|
|
43
|
+
const total = await queryBuilder.getCount();
|
|
44
|
+
return { items: items.map(item => new location_1.Location(item)), total };
|
|
45
|
+
}
|
|
46
|
+
async locationOccupancies(warehouse, types, context) {
|
|
47
|
+
var _a, _b;
|
|
48
|
+
const { domain } = context.state;
|
|
49
|
+
const foundWarehouse = await (0, typeorm_1.getRepository)(warehouse_1.Warehouse).findOne({
|
|
50
|
+
where: {
|
|
51
|
+
domain,
|
|
52
|
+
name: warehouse
|
|
53
|
+
},
|
|
54
|
+
relations: ['locations']
|
|
55
|
+
});
|
|
56
|
+
if (!foundWarehouse)
|
|
57
|
+
throw new Error(`${warehouse} was not found!`);
|
|
58
|
+
const locations = types && types.length
|
|
59
|
+
? (_a = foundWarehouse === null || foundWarehouse === void 0 ? void 0 : foundWarehouse.locations) === null || _a === void 0 ? void 0 : _a.filter((location) => types.indexOf(location.type) !== -1)
|
|
60
|
+
: foundWarehouse === null || foundWarehouse === void 0 ? void 0 : foundWarehouse.locations;
|
|
61
|
+
const total = locations.length;
|
|
62
|
+
const occupied = ((_b = locations.filter((location) => location.status === 'OCCUPIED')) === null || _b === void 0 ? void 0 : _b.length) || 0;
|
|
63
|
+
const empty = total - occupied;
|
|
64
|
+
const percentage = occupied > 0 ? Math.round((occupied / total) * 100) : 0;
|
|
65
|
+
return { total, occupied, empty, percentage };
|
|
66
|
+
}
|
|
67
|
+
async location(name, context) {
|
|
68
|
+
const { domain } = context.state;
|
|
69
|
+
const foundLocation = await (0, typeorm_1.getRepository)(location_1.Location).findOne({
|
|
70
|
+
where: { domain: domain, name },
|
|
71
|
+
relations: ['domain', 'warehouse', 'creator', 'updater']
|
|
72
|
+
});
|
|
73
|
+
if (!foundLocation)
|
|
74
|
+
throw new Error(context.t('error.no_location_found'));
|
|
75
|
+
return foundLocation;
|
|
76
|
+
}
|
|
77
|
+
async binLocation(name, context) {
|
|
78
|
+
const { domain } = context.state;
|
|
79
|
+
const foundBin = await (0, typeorm_1.getRepository)(location_1.Location).findOne({
|
|
80
|
+
where: { domain: domain, type: 'BIN', name },
|
|
81
|
+
});
|
|
82
|
+
if (!foundBin)
|
|
83
|
+
throw new Error(context.t('error.no_bin_found'));
|
|
84
|
+
return foundBin;
|
|
85
|
+
}
|
|
86
|
+
async locationByName(name, context) {
|
|
87
|
+
const { domain } = context.state;
|
|
88
|
+
return await (0, typeorm_1.getRepository)(location_1.Location).findOne({
|
|
89
|
+
where: {
|
|
90
|
+
domain: domain,
|
|
91
|
+
name
|
|
92
|
+
},
|
|
93
|
+
relations: ['domain', 'warehouse', 'creator', 'updater']
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
async locationsByGroup(params, context) {
|
|
97
|
+
const { domain } = context.state;
|
|
98
|
+
const warehouseIdParam = params.filters.find(param => (param.name = 'warehouse_id'));
|
|
99
|
+
if (!warehouseIdParam.value)
|
|
100
|
+
throw new Error(`invalid warehouse ID`);
|
|
101
|
+
const items = await (0, typeorm_1.getRepository)(location_1.Location).query(`
|
|
102
|
+
SELECT CONCAT("zone",'-',"row",'-',"column") as name, "zone", "row", "column"
|
|
103
|
+
FROM locations WHERE domain_id = '${domain.id}'
|
|
104
|
+
AND warehouse_id = '${warehouseIdParam.value}'
|
|
105
|
+
GROUP BY "zone", "row", "column"
|
|
106
|
+
`);
|
|
107
|
+
let [{ total }] = await (0, typeorm_1.getRepository)(location_1.Location).query(`
|
|
108
|
+
SELECT COUNT(DISTINCT("zone", "row", "column")) as total
|
|
109
|
+
FROM locations WHERE domain_id = '${domain.id}'
|
|
110
|
+
AND warehouse_id = '${warehouseIdParam.value}'
|
|
111
|
+
`);
|
|
112
|
+
total = parseInt(total);
|
|
113
|
+
return { items, total };
|
|
114
|
+
}
|
|
115
|
+
async locationWithInventories(params, context) {
|
|
116
|
+
var _a, _b;
|
|
117
|
+
const { domain, user } = context.state;
|
|
118
|
+
const bizplaceIds = await (0, biz_base_1.getPermittedBizplaceIds)(domain, user);
|
|
119
|
+
const queryBuilder = (0, typeorm_1.getRepository)(location_1.Location).createQueryBuilder();
|
|
120
|
+
const warehouseNames = (_a = params.filters.find(x => x.name === 'warehouseNames' && x.operator.toLowerCase() === 'in')) === null || _a === void 0 ? void 0 : _a.value;
|
|
121
|
+
const locationTypes = (_b = params.filters.find(x => x.name === 'locationTypes' && x.operator.toLowerCase() === 'in')) === null || _b === void 0 ? void 0 : _b.value;
|
|
122
|
+
params.filters = [];
|
|
123
|
+
(0, shell_1.buildQuery)(queryBuilder, params, context);
|
|
124
|
+
queryBuilder
|
|
125
|
+
.leftJoinAndSelect('Location.warehouse', 'Warehouse')
|
|
126
|
+
.leftJoinAndSelect('inventories', 'Inventory', 'Location.id = Inventory.location_id AND Inventory.status = :InvStatus', {
|
|
127
|
+
InvStatus: inventory_1.INVENTORY_STATUS.STORED
|
|
128
|
+
})
|
|
129
|
+
.leftJoinAndSelect('Inventory.product', 'Product')
|
|
130
|
+
.leftJoinAndSelect('Inventory.bizplace', 'Bizplace', 'Bizplace.id IN (:...bizplaceIds)', {
|
|
131
|
+
bizplaceIds: [...new Set(bizplaceIds)]
|
|
132
|
+
})
|
|
133
|
+
.leftJoinAndSelect('Inventory.creator', 'Creator')
|
|
134
|
+
.leftJoinAndSelect('Inventory.updater', 'Updater')
|
|
135
|
+
.addSelect('SUM("Inventory"."qty") OVER(PARTITION BY "Location"."id")', 'accumulate_qty')
|
|
136
|
+
.where('Location.domain_id = :domainId', { domainId: domain.id });
|
|
137
|
+
if (warehouseNames) {
|
|
138
|
+
queryBuilder.andWhere('Warehouse.name IN (:...warehouseNames)', { warehouseNames: [...new Set(warehouseNames)] });
|
|
139
|
+
}
|
|
140
|
+
if (locationTypes) {
|
|
141
|
+
queryBuilder.andWhere('Location.type ILIKE ANY (ARRAY[:...locationTypes])', {
|
|
142
|
+
locationTypes: [...new Set(locationTypes)]
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
let items = await queryBuilder.getRawMany();
|
|
146
|
+
const total = await queryBuilder.getCount();
|
|
147
|
+
items = items.map(item => {
|
|
148
|
+
return {
|
|
149
|
+
id: item.Location_id,
|
|
150
|
+
name: item.Location_name,
|
|
151
|
+
bizplace: {
|
|
152
|
+
name: item.Bizplace_name || '',
|
|
153
|
+
description: item.Bizplace_description || ''
|
|
154
|
+
},
|
|
155
|
+
product: {
|
|
156
|
+
name: item.Product_name || '',
|
|
157
|
+
sku: item.Product_sku || '',
|
|
158
|
+
description: item.Product_description || ''
|
|
159
|
+
},
|
|
160
|
+
palletId: item.Inventory_pallet_id || '',
|
|
161
|
+
batchId: item.Inventory_batch_id || '',
|
|
162
|
+
qty: item.Inventory_qty || 0,
|
|
163
|
+
accumulatedQty: item.accumulate_qty || 0,
|
|
164
|
+
uomValue: item.Inventory_uom_value || 0.0,
|
|
165
|
+
uom: item.Inventory_uom || '',
|
|
166
|
+
packingType: item.Inventory_packing_type || '',
|
|
167
|
+
packingSize: item.Inventory_packing_size || 0.0,
|
|
168
|
+
expirationDate: item.Inventory_expiration_date
|
|
169
|
+
? new Date(item.Inventory_expiration_date).toISOString().split('T')[0].split('-').reverse().join('-')
|
|
170
|
+
: '',
|
|
171
|
+
warehouse: {
|
|
172
|
+
name: item.Warehouse_name,
|
|
173
|
+
description: item.Warehouse_description,
|
|
174
|
+
type: item.Warehouse_type
|
|
175
|
+
},
|
|
176
|
+
zone: item.Location_zone
|
|
177
|
+
};
|
|
178
|
+
});
|
|
179
|
+
return { items, total };
|
|
180
|
+
}
|
|
181
|
+
async locationByInventories(params, bizplaceId, context) {
|
|
182
|
+
const { domain, user } = context.state;
|
|
183
|
+
const queryBuilder = (0, typeorm_1.getRepository)(location_1.Location).createQueryBuilder();
|
|
184
|
+
queryBuilder
|
|
185
|
+
.innerJoin('inventories', 'Inventory', 'Location.id = Inventory.location_id AND Inventory.status = :InvStatus', {
|
|
186
|
+
InvStatus: inventory_1.INVENTORY_STATUS.STORED
|
|
187
|
+
})
|
|
188
|
+
.where('Location.domain_id = :domainId', { domainId: domain.id })
|
|
189
|
+
.andWhere('Inventory.bizplace_id = :bizplaceId', { bizplaceId: bizplaceId })
|
|
190
|
+
.andWhere(query => {
|
|
191
|
+
const subQuery = query.subQuery()
|
|
192
|
+
.select('DISTINCT ici.inventory_id', 'inventory_id')
|
|
193
|
+
.from('worksheets', 'w')
|
|
194
|
+
.innerJoin('worksheet_details', 'wd', 'wd.worksheet_id = w.id')
|
|
195
|
+
.innerJoin('inventory_check_items', 'ici', 'wd.target_inventory_check_item_id = ici.id')
|
|
196
|
+
.where('w.type IN (:...types)', { types: ['CYCLE_COUNT', 'CYCLE_COUNT_RECHECK'] })
|
|
197
|
+
.andWhere('w.status != :status', { status: 'DONE' })
|
|
198
|
+
.andWhere('w.bizplace_id = :bizplaceId', { bizplaceId: bizplaceId }) // assuming array
|
|
199
|
+
.andWhere('w.domain_id = :domainId', { domainId: domain.id })
|
|
200
|
+
.getQuery();
|
|
201
|
+
return `Inventory.id NOT IN ${subQuery}`;
|
|
202
|
+
});
|
|
203
|
+
if (params.filters) {
|
|
204
|
+
params.filters.forEach(filter => {
|
|
205
|
+
const value = filter.value;
|
|
206
|
+
if (!value)
|
|
207
|
+
return;
|
|
208
|
+
if (filter.name === 'name' && filter.operator.toLowerCase() === 'i_like') {
|
|
209
|
+
queryBuilder.andWhere('Location.name ILIKE :name', { name: `%${value}%` });
|
|
210
|
+
}
|
|
211
|
+
else if (filter.name === 'type' && filter.operator.toLowerCase() === 'eq') {
|
|
212
|
+
queryBuilder.andWhere('Location.type = :type', { type: value });
|
|
213
|
+
}
|
|
214
|
+
else if (filter.name === 'locationId' && filter.operator.toLowerCase() === 'notin') {
|
|
215
|
+
const locationIds = Array.isArray(value) ? value : [value];
|
|
216
|
+
queryBuilder.andWhere('Location.id NOT IN (:...locationIds)', { locationIds });
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
queryBuilder.select('DISTINCT "Location"."id","Location"."name", "Location"."type"');
|
|
221
|
+
queryBuilder.orderBy('Location.name', 'ASC');
|
|
222
|
+
let rawItems = await queryBuilder.getRawMany();
|
|
223
|
+
const total = await queryBuilder.getCount();
|
|
224
|
+
let items = rawItems.map(item => {
|
|
225
|
+
return {
|
|
226
|
+
id: item.id,
|
|
227
|
+
name: item.name,
|
|
228
|
+
type: item.type
|
|
229
|
+
};
|
|
230
|
+
});
|
|
231
|
+
return { items, total };
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
__decorate([
|
|
235
|
+
(0, type_graphql_1.Directive)('@privilege(category: "warehouse", privilege: "query")'),
|
|
236
|
+
(0, type_graphql_1.Query)(returns => location_types_1.LocationList),
|
|
237
|
+
__param(0, (0, type_graphql_1.Args)()),
|
|
238
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
239
|
+
__metadata("design:type", Function),
|
|
240
|
+
__metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
|
|
241
|
+
__metadata("design:returntype", Promise)
|
|
242
|
+
], LocationQuery.prototype, "locations", null);
|
|
243
|
+
__decorate([
|
|
244
|
+
(0, type_graphql_1.Directive)('@privilege(category: "warehouse", privilege: "query")'),
|
|
245
|
+
(0, type_graphql_1.Query)(returns => location_types_1.LocationList),
|
|
246
|
+
__param(0, (0, type_graphql_1.Args)()),
|
|
247
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
248
|
+
__metadata("design:type", Function),
|
|
249
|
+
__metadata("design:paramtypes", [typeof (_b = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _b : Object, Object]),
|
|
250
|
+
__metadata("design:returntype", Promise)
|
|
251
|
+
], LocationQuery.prototype, "pureLocations", null);
|
|
252
|
+
__decorate([
|
|
253
|
+
(0, type_graphql_1.Directive)('@privilege(category: "warehouse", privilege: "query")'),
|
|
254
|
+
(0, type_graphql_1.Query)(returns => location_types_1.LocationOccupancy),
|
|
255
|
+
__param(0, (0, type_graphql_1.Arg)('warehouse')),
|
|
256
|
+
__param(1, (0, type_graphql_1.Arg)('types', type => [String], { nullable: true })),
|
|
257
|
+
__param(2, (0, type_graphql_1.Ctx)()),
|
|
258
|
+
__metadata("design:type", Function),
|
|
259
|
+
__metadata("design:paramtypes", [String, Array, Object]),
|
|
260
|
+
__metadata("design:returntype", Promise)
|
|
261
|
+
], LocationQuery.prototype, "locationOccupancies", null);
|
|
262
|
+
__decorate([
|
|
263
|
+
(0, type_graphql_1.Directive)('@privilege(category: "warehouse", privilege: "query")'),
|
|
264
|
+
(0, type_graphql_1.Query)(returns => location_1.Location),
|
|
265
|
+
__param(0, (0, type_graphql_1.Arg)('name')),
|
|
266
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
267
|
+
__metadata("design:type", Function),
|
|
268
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
269
|
+
__metadata("design:returntype", Promise)
|
|
270
|
+
], LocationQuery.prototype, "location", null);
|
|
271
|
+
__decorate([
|
|
272
|
+
(0, type_graphql_1.Directive)('@privilege(category: "warehouse", privilege: "query")'),
|
|
273
|
+
(0, type_graphql_1.Query)(returns => location_1.Location),
|
|
274
|
+
__param(0, (0, type_graphql_1.Arg)('name')),
|
|
275
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
276
|
+
__metadata("design:type", Function),
|
|
277
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
278
|
+
__metadata("design:returntype", Promise)
|
|
279
|
+
], LocationQuery.prototype, "binLocation", null);
|
|
280
|
+
__decorate([
|
|
281
|
+
(0, type_graphql_1.Directive)('@privilege(category: "warehouse", privilege: "query")'),
|
|
282
|
+
(0, type_graphql_1.Query)(returns => location_1.Location),
|
|
283
|
+
__param(0, (0, type_graphql_1.Arg)('name')),
|
|
284
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
285
|
+
__metadata("design:type", Function),
|
|
286
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
287
|
+
__metadata("design:returntype", Promise)
|
|
288
|
+
], LocationQuery.prototype, "locationByName", null);
|
|
289
|
+
__decorate([
|
|
290
|
+
(0, type_graphql_1.Directive)('@privilege(category: "warehouse", privilege: "query")'),
|
|
291
|
+
(0, type_graphql_1.Query)(returns => location_types_1.LocationList),
|
|
292
|
+
__param(0, (0, type_graphql_1.Args)()),
|
|
293
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
294
|
+
__metadata("design:type", Function),
|
|
295
|
+
__metadata("design:paramtypes", [typeof (_c = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _c : Object, Object]),
|
|
296
|
+
__metadata("design:returntype", Promise)
|
|
297
|
+
], LocationQuery.prototype, "locationsByGroup", null);
|
|
298
|
+
__decorate([
|
|
299
|
+
(0, type_graphql_1.Directive)('@privilege(category: "warehouse", privilege: "query")'),
|
|
300
|
+
(0, type_graphql_1.Query)(returns => location_types_1.LocationInventories),
|
|
301
|
+
__param(0, (0, type_graphql_1.Args)()),
|
|
302
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
303
|
+
__metadata("design:type", Function),
|
|
304
|
+
__metadata("design:paramtypes", [typeof (_d = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _d : Object, Object]),
|
|
305
|
+
__metadata("design:returntype", Promise)
|
|
306
|
+
], LocationQuery.prototype, "locationWithInventories", null);
|
|
307
|
+
__decorate([
|
|
308
|
+
(0, type_graphql_1.Directive)('@privilege(category: "warehouse", privilege: "query")'),
|
|
309
|
+
(0, type_graphql_1.Query)(returns => location_types_1.LocationInventories),
|
|
310
|
+
__param(0, (0, type_graphql_1.Args)()),
|
|
311
|
+
__param(1, (0, type_graphql_1.Arg)('bizplaceId')),
|
|
312
|
+
__param(2, (0, type_graphql_1.Ctx)()),
|
|
313
|
+
__metadata("design:type", Function),
|
|
314
|
+
__metadata("design:paramtypes", [typeof (_e = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _e : Object, String, Object]),
|
|
315
|
+
__metadata("design:returntype", Promise)
|
|
316
|
+
], LocationQuery.prototype, "locationByInventories", null);
|
|
317
|
+
LocationQuery = __decorate([
|
|
318
|
+
(0, type_graphql_1.Resolver)(location_1.Location)
|
|
319
|
+
], LocationQuery);
|
|
320
|
+
exports.LocationQuery = LocationQuery;
|
|
321
|
+
//# sourceMappingURL=location-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"location-query.js","sourceRoot":"","sources":["../../../server/service/location/location-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAA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CAAC,EAAE,CAAC,oCAAmB,CAAC;IAEnC,WAAA,IAAA,mBAAI,GAAE,CAAA;IACN,WAAA,IAAA,kBAAG,EAAC,YAAY,CAAC,CAAA;IACjB,WAAA,IAAA,kBAAG,GAAE,CAAA;;yDAFU,iBAAS,oBAAT,iBAAS;;0DA4D1B;AApRU,aAAa;IADzB,IAAA,uBAAQ,EAAC,mBAAQ,CAAC;GACN,aAAa,CAqRzB;AArRY,sCAAa"}
|
|
@@ -0,0 +1,296 @@
|
|
|
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, _c, _d;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.ObjectRefLocation = exports.NewLocation = exports.LocationPatch = exports.LocationOccupancy = exports.LocationList = exports.LocationInfo = exports.LocationInventories = exports.LocationInventory = void 0;
|
|
14
|
+
const type_graphql_1 = require("type-graphql");
|
|
15
|
+
const biz_base_1 = require("@things-factory/biz-base");
|
|
16
|
+
const product_base_1 = require("@things-factory/product-base");
|
|
17
|
+
const shell_1 = require("@things-factory/shell");
|
|
18
|
+
const warehouse_1 = require("../warehouse/warehouse");
|
|
19
|
+
const location_1 = require("./location");
|
|
20
|
+
let LocationInventory = class LocationInventory {
|
|
21
|
+
};
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], LocationInventory.prototype, "id", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], LocationInventory.prototype, "name", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], LocationInventory.prototype, "type", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, type_graphql_1.Field)(type => biz_base_1.Bizplace, { nullable: true }),
|
|
36
|
+
__metadata("design:type", typeof (_a = typeof biz_base_1.Bizplace !== "undefined" && biz_base_1.Bizplace) === "function" ? _a : Object)
|
|
37
|
+
], LocationInventory.prototype, "bizplace", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], LocationInventory.prototype, "palletId", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], LocationInventory.prototype, "batchId", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
48
|
+
__metadata("design:type", Number)
|
|
49
|
+
], LocationInventory.prototype, "qty", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], LocationInventory.prototype, "accumulatedQty", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true }),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], LocationInventory.prototype, "uomValue", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], LocationInventory.prototype, "uom", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], LocationInventory.prototype, "packingType", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true }),
|
|
68
|
+
__metadata("design:type", Number)
|
|
69
|
+
], LocationInventory.prototype, "packingSize", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], LocationInventory.prototype, "expirationDate", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, type_graphql_1.Field)(type => warehouse_1.Warehouse, { nullable: true }),
|
|
76
|
+
__metadata("design:type", warehouse_1.Warehouse)
|
|
77
|
+
], LocationInventory.prototype, "warehouse", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, type_graphql_1.Field)(type => product_base_1.Product, { nullable: true }),
|
|
80
|
+
__metadata("design:type", typeof (_b = typeof product_base_1.Product !== "undefined" && product_base_1.Product) === "function" ? _b : Object)
|
|
81
|
+
], LocationInventory.prototype, "product", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
84
|
+
__metadata("design:type", String)
|
|
85
|
+
], LocationInventory.prototype, "zone", void 0);
|
|
86
|
+
LocationInventory = __decorate([
|
|
87
|
+
(0, type_graphql_1.ObjectType)()
|
|
88
|
+
], LocationInventory);
|
|
89
|
+
exports.LocationInventory = LocationInventory;
|
|
90
|
+
let LocationInventories = class LocationInventories {
|
|
91
|
+
};
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, type_graphql_1.Field)(type => [LocationInventory], { nullable: true }),
|
|
94
|
+
__metadata("design:type", Array)
|
|
95
|
+
], LocationInventories.prototype, "items", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
98
|
+
__metadata("design:type", Number)
|
|
99
|
+
], LocationInventories.prototype, "total", void 0);
|
|
100
|
+
LocationInventories = __decorate([
|
|
101
|
+
(0, type_graphql_1.ObjectType)()
|
|
102
|
+
], LocationInventories);
|
|
103
|
+
exports.LocationInventories = LocationInventories;
|
|
104
|
+
let LocationInfo = class LocationInfo {
|
|
105
|
+
};
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
108
|
+
__metadata("design:type", String)
|
|
109
|
+
], LocationInfo.prototype, "zone", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
112
|
+
__metadata("design:type", String)
|
|
113
|
+
], LocationInfo.prototype, "shelf", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
116
|
+
__metadata("design:type", String)
|
|
117
|
+
], LocationInfo.prototype, "row", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
120
|
+
__metadata("design:type", String)
|
|
121
|
+
], LocationInfo.prototype, "column", void 0);
|
|
122
|
+
LocationInfo = __decorate([
|
|
123
|
+
(0, type_graphql_1.ObjectType)()
|
|
124
|
+
], LocationInfo);
|
|
125
|
+
exports.LocationInfo = LocationInfo;
|
|
126
|
+
let LocationList = class LocationList {
|
|
127
|
+
};
|
|
128
|
+
__decorate([
|
|
129
|
+
(0, type_graphql_1.Field)(type => [location_1.Location], { nullable: true }),
|
|
130
|
+
__metadata("design:type", Array)
|
|
131
|
+
], LocationList.prototype, "items", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
134
|
+
__metadata("design:type", Number)
|
|
135
|
+
], LocationList.prototype, "total", void 0);
|
|
136
|
+
LocationList = __decorate([
|
|
137
|
+
(0, type_graphql_1.ObjectType)()
|
|
138
|
+
], LocationList);
|
|
139
|
+
exports.LocationList = LocationList;
|
|
140
|
+
let LocationOccupancy = class LocationOccupancy {
|
|
141
|
+
};
|
|
142
|
+
__decorate([
|
|
143
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
144
|
+
__metadata("design:type", Number)
|
|
145
|
+
], LocationOccupancy.prototype, "total", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
148
|
+
__metadata("design:type", Number)
|
|
149
|
+
], LocationOccupancy.prototype, "occupied", void 0);
|
|
150
|
+
__decorate([
|
|
151
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
152
|
+
__metadata("design:type", Number)
|
|
153
|
+
], LocationOccupancy.prototype, "empty", void 0);
|
|
154
|
+
__decorate([
|
|
155
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
156
|
+
__metadata("design:type", Number)
|
|
157
|
+
], LocationOccupancy.prototype, "percentage", void 0);
|
|
158
|
+
LocationOccupancy = __decorate([
|
|
159
|
+
(0, type_graphql_1.ObjectType)()
|
|
160
|
+
], LocationOccupancy);
|
|
161
|
+
exports.LocationOccupancy = LocationOccupancy;
|
|
162
|
+
let LocationPatch = class LocationPatch {
|
|
163
|
+
};
|
|
164
|
+
__decorate([
|
|
165
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
166
|
+
__metadata("design:type", String)
|
|
167
|
+
], LocationPatch.prototype, "id", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
(0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true }),
|
|
170
|
+
__metadata("design:type", typeof (_c = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _c : Object)
|
|
171
|
+
], LocationPatch.prototype, "warehouse", void 0);
|
|
172
|
+
__decorate([
|
|
173
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
174
|
+
__metadata("design:type", String)
|
|
175
|
+
], LocationPatch.prototype, "name", void 0);
|
|
176
|
+
__decorate([
|
|
177
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
178
|
+
__metadata("design:type", String)
|
|
179
|
+
], LocationPatch.prototype, "description", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
182
|
+
__metadata("design:type", String)
|
|
183
|
+
], LocationPatch.prototype, "type", void 0);
|
|
184
|
+
__decorate([
|
|
185
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
186
|
+
__metadata("design:type", String)
|
|
187
|
+
], LocationPatch.prototype, "zone", void 0);
|
|
188
|
+
__decorate([
|
|
189
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
190
|
+
__metadata("design:type", String)
|
|
191
|
+
], LocationPatch.prototype, "firstDelimiter", void 0);
|
|
192
|
+
__decorate([
|
|
193
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
194
|
+
__metadata("design:type", String)
|
|
195
|
+
], LocationPatch.prototype, "secondDelimiter", void 0);
|
|
196
|
+
__decorate([
|
|
197
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
198
|
+
__metadata("design:type", String)
|
|
199
|
+
], LocationPatch.prototype, "thirdDelimiter", void 0);
|
|
200
|
+
__decorate([
|
|
201
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
202
|
+
__metadata("design:type", String)
|
|
203
|
+
], LocationPatch.prototype, "row", void 0);
|
|
204
|
+
__decorate([
|
|
205
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
206
|
+
__metadata("design:type", String)
|
|
207
|
+
], LocationPatch.prototype, "column", void 0);
|
|
208
|
+
__decorate([
|
|
209
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
210
|
+
__metadata("design:type", String)
|
|
211
|
+
], LocationPatch.prototype, "shelf", void 0);
|
|
212
|
+
__decorate([
|
|
213
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
214
|
+
__metadata("design:type", String)
|
|
215
|
+
], LocationPatch.prototype, "status", void 0);
|
|
216
|
+
__decorate([
|
|
217
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
218
|
+
__metadata("design:type", String)
|
|
219
|
+
], LocationPatch.prototype, "cuFlag", void 0);
|
|
220
|
+
LocationPatch = __decorate([
|
|
221
|
+
(0, type_graphql_1.InputType)()
|
|
222
|
+
], LocationPatch);
|
|
223
|
+
exports.LocationPatch = LocationPatch;
|
|
224
|
+
let NewLocation = class NewLocation {
|
|
225
|
+
};
|
|
226
|
+
__decorate([
|
|
227
|
+
(0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true }),
|
|
228
|
+
__metadata("design:type", typeof (_d = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _d : Object)
|
|
229
|
+
], NewLocation.prototype, "warehouse", void 0);
|
|
230
|
+
__decorate([
|
|
231
|
+
(0, type_graphql_1.Field)(),
|
|
232
|
+
__metadata("design:type", String)
|
|
233
|
+
], NewLocation.prototype, "name", void 0);
|
|
234
|
+
__decorate([
|
|
235
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
236
|
+
__metadata("design:type", String)
|
|
237
|
+
], NewLocation.prototype, "description", void 0);
|
|
238
|
+
__decorate([
|
|
239
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
240
|
+
__metadata("design:type", String)
|
|
241
|
+
], NewLocation.prototype, "type", void 0);
|
|
242
|
+
__decorate([
|
|
243
|
+
(0, type_graphql_1.Field)(),
|
|
244
|
+
__metadata("design:type", String)
|
|
245
|
+
], NewLocation.prototype, "zone", void 0);
|
|
246
|
+
__decorate([
|
|
247
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
248
|
+
__metadata("design:type", String)
|
|
249
|
+
], NewLocation.prototype, "firstDelimiter", void 0);
|
|
250
|
+
__decorate([
|
|
251
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
252
|
+
__metadata("design:type", String)
|
|
253
|
+
], NewLocation.prototype, "secondDelimiter", void 0);
|
|
254
|
+
__decorate([
|
|
255
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
256
|
+
__metadata("design:type", String)
|
|
257
|
+
], NewLocation.prototype, "thirdDelimiter", void 0);
|
|
258
|
+
__decorate([
|
|
259
|
+
(0, type_graphql_1.Field)(),
|
|
260
|
+
__metadata("design:type", String)
|
|
261
|
+
], NewLocation.prototype, "row", void 0);
|
|
262
|
+
__decorate([
|
|
263
|
+
(0, type_graphql_1.Field)(),
|
|
264
|
+
__metadata("design:type", String)
|
|
265
|
+
], NewLocation.prototype, "column", void 0);
|
|
266
|
+
__decorate([
|
|
267
|
+
(0, type_graphql_1.Field)(),
|
|
268
|
+
__metadata("design:type", String)
|
|
269
|
+
], NewLocation.prototype, "shelf", void 0);
|
|
270
|
+
__decorate([
|
|
271
|
+
(0, type_graphql_1.Field)(),
|
|
272
|
+
__metadata("design:type", String)
|
|
273
|
+
], NewLocation.prototype, "status", void 0);
|
|
274
|
+
NewLocation = __decorate([
|
|
275
|
+
(0, type_graphql_1.InputType)()
|
|
276
|
+
], NewLocation);
|
|
277
|
+
exports.NewLocation = NewLocation;
|
|
278
|
+
let ObjectRefLocation = class ObjectRefLocation {
|
|
279
|
+
};
|
|
280
|
+
__decorate([
|
|
281
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
282
|
+
__metadata("design:type", String)
|
|
283
|
+
], ObjectRefLocation.prototype, "id", void 0);
|
|
284
|
+
__decorate([
|
|
285
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
286
|
+
__metadata("design:type", String)
|
|
287
|
+
], ObjectRefLocation.prototype, "name", void 0);
|
|
288
|
+
__decorate([
|
|
289
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
290
|
+
__metadata("design:type", String)
|
|
291
|
+
], ObjectRefLocation.prototype, "description", void 0);
|
|
292
|
+
ObjectRefLocation = __decorate([
|
|
293
|
+
(0, type_graphql_1.InputType)()
|
|
294
|
+
], ObjectRefLocation);
|
|
295
|
+
exports.ObjectRefLocation = ObjectRefLocation;
|
|
296
|
+
//# sourceMappingURL=location-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"location-types.js","sourceRoot":"","sources":["../../../server/service/location/location-types.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,+CAAuE;AAEvE,uDAAmD;AACnD,+DAAsD;AACtD,iDAAiD;AAEjD,sDAAkD;AAClD,yCAAqC;AAG9B,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAgD7B,CAAA;AA/CC;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACf;AAEX;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACb;AAEb;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACb;AAEb;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,mBAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDACjC,mBAAQ,oBAAR,mBAAQ;mDAAA;AAEnB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACT;AAEjB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACV;AAEhB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CAC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