@things-factory/operato-hub 4.0.22 → 4.0.23
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/client/bootstrap.js +4 -0
- package/package.json +54 -54
- package/dist-server/routers/api/restful-apis/unstable/add-product.js +0 -85
- package/dist-server/routers/api/restful-apis/unstable/add-product.js.map +0 -1
- package/dist-server/routers/api/restful-apis/unstable/add-replenishment-order.js +0 -98
- package/dist-server/routers/api/restful-apis/unstable/add-replenishment-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/unstable/add-transfer-order.js +0 -77
- package/dist-server/routers/api/restful-apis/unstable/add-transfer-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/unstable/application.js +0 -28
- package/dist-server/routers/api/restful-apis/unstable/application.js.map +0 -1
- package/dist-server/routers/api/restful-apis/unstable/cancel-replenishment-order.js +0 -67
- package/dist-server/routers/api/restful-apis/unstable/cancel-replenishment-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/unstable/cancel-transfer-order.js +0 -70
- package/dist-server/routers/api/restful-apis/unstable/cancel-transfer-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/unstable/confirm-inbound-order.js +0 -98
- package/dist-server/routers/api/restful-apis/unstable/confirm-inbound-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/unstable/delete-inbound-order.js +0 -37
- package/dist-server/routers/api/restful-apis/unstable/delete-inbound-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/unstable/generate-inbound-order.js +0 -206
- package/dist-server/routers/api/restful-apis/unstable/generate-inbound-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/unstable/get-product-detail.js +0 -78
- package/dist-server/routers/api/restful-apis/unstable/get-product-detail.js.map +0 -1
- package/dist-server/routers/api/restful-apis/unstable/get-product-list.js +0 -114
- package/dist-server/routers/api/restful-apis/unstable/get-product-list.js.map +0 -1
- package/dist-server/routers/api/restful-apis/unstable/get-transfer-order-detail.js +0 -58
- package/dist-server/routers/api/restful-apis/unstable/get-transfer-order-detail.js.map +0 -1
- package/dist-server/routers/api/restful-apis/unstable/get-transfer-order-list.js +0 -124
- package/dist-server/routers/api/restful-apis/unstable/get-transfer-order-list.js.map +0 -1
- package/dist-server/routers/api/restful-apis/unstable/update-replenishment-order-product.js +0 -76
- package/dist-server/routers/api/restful-apis/unstable/update-replenishment-order-product.js.map +0 -1
- package/dist-server/routers/api/restful-apis/unstable/update-replenishment-order-status.js +0 -73
- package/dist-server/routers/api/restful-apis/unstable/update-replenishment-order-status.js.map +0 -1
- package/dist-server/routers/api/restful-apis/unstable/update-transfer-order-status.js +0 -76
- package/dist-server/routers/api/restful-apis/unstable/update-transfer-order-status.js.map +0 -1
- package/dist-server/routers/api/restful-apis/unstable/utils/api-error-message.js +0 -13
- package/dist-server/routers/api/restful-apis/unstable/utils/api-error-message.js.map +0 -1
- package/dist-server/routers/api/restful-apis/unstable/utils/index.js +0 -14
- package/dist-server/routers/api/restful-apis/unstable/utils/index.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/application.js +0 -28
- package/dist-server/routers/api/restful-apis/v1/application.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/order.js +0 -28
- package/dist-server/routers/api/restful-apis/v1/order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/application.js +0 -28
- package/dist-server/routers/api/restful-apis/v2/application.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/order.js +0 -28
- package/dist-server/routers/api/restful-apis/v2/order.js.map +0 -1
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.validatePagination = exports.validateFilters = void 0;
|
|
7
|
-
const utils_1 = require("./utils");
|
|
8
|
-
const api_1 = require("@things-factory/api");
|
|
9
|
-
const warehouse_middleware_1 = require("../../../../middlewares/warehouse-middleware");
|
|
10
|
-
const business_middleware_1 = require("../../../../middlewares/business-middleware");
|
|
11
|
-
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
12
|
-
const debug = require('debug')('things-factory:operato-hub:restful-api:unstable:get-transfer-order-list');
|
|
13
|
-
api_1.restfulApiRouter.get('/unstable/warehouse/:warehouseId/get-transfer-order-list', business_middleware_1.businessMiddleware, warehouse_middleware_1.warehouseMiddleware, async (context, next) => {
|
|
14
|
-
const { client, warehouse: bizplace, domain } = context.state;
|
|
15
|
-
const { warehouseId } = context.params;
|
|
16
|
-
let { fromDate, toDate, paginationEntriesPerPage, paginationOffset } = context.query;
|
|
17
|
-
if (!warehouseId)
|
|
18
|
-
throw new Error(utils_1.ERROR_MSG.REQUEST.BAD_REQUEST('warehouseId'));
|
|
19
|
-
let filters = [{ name: 'bizplace', operator: 'in', value: [warehouseId], relation: true }];
|
|
20
|
-
let pagination = { page: 1, limit: 20 };
|
|
21
|
-
filters = await validateFilters(context, filters, fromDate, toDate);
|
|
22
|
-
pagination = await validatePagination(context, pagination, paginationEntriesPerPage, paginationOffset);
|
|
23
|
-
context.body = {
|
|
24
|
-
result: (await client.query({
|
|
25
|
-
query: graphql_tag_1.default `
|
|
26
|
-
query($filters: [Filter], $pagination: Pagination, $sortings: [Sorting]) {
|
|
27
|
-
transferOrders(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
28
|
-
items {
|
|
29
|
-
name
|
|
30
|
-
issuedDate
|
|
31
|
-
status
|
|
32
|
-
refNo
|
|
33
|
-
remark
|
|
34
|
-
ownTransport
|
|
35
|
-
# orderInventories {
|
|
36
|
-
# name
|
|
37
|
-
# inventory {
|
|
38
|
-
# palletId
|
|
39
|
-
# # batchExp
|
|
40
|
-
# }
|
|
41
|
-
# releaseQty
|
|
42
|
-
# releaseUomValue
|
|
43
|
-
# batchId
|
|
44
|
-
# status
|
|
45
|
-
# remark
|
|
46
|
-
# }
|
|
47
|
-
createdAt
|
|
48
|
-
updatedAt
|
|
49
|
-
updater {
|
|
50
|
-
name
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
total
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
`,
|
|
57
|
-
variables: {
|
|
58
|
-
filters,
|
|
59
|
-
pagination,
|
|
60
|
-
sortings: [{ name: 'createdAt', desc: true }]
|
|
61
|
-
},
|
|
62
|
-
context: Object.assign(Object.assign({}, context), { state: Object.assign(Object.assign({}, context.state), { bizplace,
|
|
63
|
-
domain }) })
|
|
64
|
-
})).data
|
|
65
|
-
};
|
|
66
|
-
});
|
|
67
|
-
async function validateFilters(context, filters, fromDate, toDate) {
|
|
68
|
-
if (fromDate && fromDate !== '') {
|
|
69
|
-
fromDate = new Date(`${fromDate.split(' ').join('')} 00:00:00`);
|
|
70
|
-
if (fromDate instanceof Date && !isNaN(fromDate.getTime()))
|
|
71
|
-
fromDate = fromDate.toLocaleString();
|
|
72
|
-
else
|
|
73
|
-
context.throw(400, context.t('fromDate is invalid'));
|
|
74
|
-
}
|
|
75
|
-
else
|
|
76
|
-
fromDate = '';
|
|
77
|
-
if (toDate && toDate !== '') {
|
|
78
|
-
toDate = new Date(`${toDate.split(' ').join('')} 23:59:59`);
|
|
79
|
-
if (toDate instanceof Date && !isNaN(toDate.getTime()))
|
|
80
|
-
toDate = toDate.toLocaleString();
|
|
81
|
-
else
|
|
82
|
-
context.throw(400, context.t('toDate is invalid'));
|
|
83
|
-
}
|
|
84
|
-
else
|
|
85
|
-
toDate = '';
|
|
86
|
-
if (fromDate !== '' && toDate !== '')
|
|
87
|
-
filters = [...filters, { name: 'createdAt', operator: 'between', value: [fromDate, toDate] }];
|
|
88
|
-
else if (fromDate !== '' && toDate === '')
|
|
89
|
-
filters = [...filters, { name: 'createdAt', operator: 'gte', value: fromDate }];
|
|
90
|
-
else if (fromDate === '' && toDate !== '')
|
|
91
|
-
filters = [...filters, { name: 'createdAt', operator: 'lte', value: toDate }];
|
|
92
|
-
return filters;
|
|
93
|
-
}
|
|
94
|
-
exports.validateFilters = validateFilters;
|
|
95
|
-
async function validatePagination(context, pagination, entries, offset) {
|
|
96
|
-
if (!entries)
|
|
97
|
-
entries = '';
|
|
98
|
-
if (!offset)
|
|
99
|
-
offset = '';
|
|
100
|
-
if (entries !== '' && offset !== '' && !isNaN(parseInt(entries)) && !isNaN(parseInt(offset))) {
|
|
101
|
-
entries = parseInt(entries);
|
|
102
|
-
offset = parseInt(offset);
|
|
103
|
-
if (offset < 1)
|
|
104
|
-
context.throw(400, context.t('paginationOffset cannot be less than 1'));
|
|
105
|
-
else if (entries < 1)
|
|
106
|
-
context.throw(400, context.t('paginationEntriesPerPage cannot be less than 1'));
|
|
107
|
-
else if (entries > 100)
|
|
108
|
-
context.throw(400, context.t('paginationEntriesPerPage cannot be more than 100'));
|
|
109
|
-
else
|
|
110
|
-
pagination = Object.assign(Object.assign({}, pagination), { page: offset, limit: entries });
|
|
111
|
-
}
|
|
112
|
-
else if (entries !== '' && offset === '' && !isNaN(parseInt(entries))) {
|
|
113
|
-
entries = parseInt(entries);
|
|
114
|
-
if (entries < 1)
|
|
115
|
-
context.throw(400, context.t('paginationEntriesPerPage cannot be less than 1'));
|
|
116
|
-
else if (entries > 100)
|
|
117
|
-
context.throw(400, context.t('paginationEntriesPerPage cannot be more than 100'));
|
|
118
|
-
else
|
|
119
|
-
pagination = Object.assign(Object.assign({}, pagination), { limit: entries });
|
|
120
|
-
}
|
|
121
|
-
return pagination;
|
|
122
|
-
}
|
|
123
|
-
exports.validatePagination = validatePagination;
|
|
124
|
-
//# sourceMappingURL=get-transfer-order-list.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-transfer-order-list.js","sourceRoot":"","sources":["../../../../../server/routers/api/restful-apis/unstable/get-transfer-order-list.ts"],"names":[],"mappings":";;;;;;AAAA,mCAAmC;AACnC,6CAAgE;AAChE,uFAAkF;AAClF,qFAAgF;AAChF,8D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AAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,gDAAgD,CAAC,CAAC,CAAA;aAChG,IAAI,OAAO,GAAG,GAAG;YAAE,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,kDAAkD,CAAC,CAAC,CAAA;;YACpG,UAAU,mCAAQ,UAAU,KAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAE,CAAA;KAClE;SAAM,IAAI,OAAO,KAAK,EAAE,IAAI,MAAM,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE;QACvE,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAA;QAE3B,IAAI,OAAO,GAAG,CAAC;YAAE,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,gDAAgD,CAAC,CAAC,CAAA;aAC3F,IAAI,OAAO,GAAG,GAAG;YAAE,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,kDAAkD,CAAC,CAAC,CAAA;;YACpG,UAAU,mCAAQ,UAAU,KAAE,KAAK,EAAE,OAAO,GAAE,CAAA;KACpD;IAED,OAAO,UAAU,CAAA;AACnB,CAAC;AArBD,gDAqBC"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.checkMandatoryKey = void 0;
|
|
7
|
-
const utils_1 = require("./utils");
|
|
8
|
-
const utils_2 = require("@things-factory/utils");
|
|
9
|
-
const api_1 = require("@things-factory/api");
|
|
10
|
-
const warehouse_middleware_1 = require("../../../../middlewares/warehouse-middleware");
|
|
11
|
-
const business_middleware_1 = require("../../../../middlewares/business-middleware");
|
|
12
|
-
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
13
|
-
const debug = require('debug')('things-factory:operato-hub:restful-api:unstable:update-replenishment-order-product');
|
|
14
|
-
api_1.restfulApiRouter.post('/unstable/warehouse/:warehouseId/update-replenishment-order-product', business_middleware_1.businessMiddleware, warehouse_middleware_1.warehouseMiddleware, async (context, next) => {
|
|
15
|
-
const { client, warehouse: bizplace, domain } = context.state;
|
|
16
|
-
const { warehouseId } = context.params;
|
|
17
|
-
const attachments = undefined;
|
|
18
|
-
let bodyReq = context.request.body;
|
|
19
|
-
if (!warehouseId)
|
|
20
|
-
throw new Error(utils_1.ERROR_MSG.REQUEST.BAD_REQUEST('warehouseId'));
|
|
21
|
-
if (typeof bodyReq === undefined || bodyReq.body === '') {
|
|
22
|
-
throw new Error(utils_1.ERROR_MSG.REQUEST.BAD_REQUEST('bodyReq'));
|
|
23
|
-
}
|
|
24
|
-
checkMandatoryKey(context, bodyReq);
|
|
25
|
-
debug('post:/update-replenishment-order-product request.body', context.request.body);
|
|
26
|
-
const args = {
|
|
27
|
-
name: bodyReq.name,
|
|
28
|
-
patch: {
|
|
29
|
-
orderProducts: bodyReq.orderProducts,
|
|
30
|
-
warehouseId
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
context.body = {
|
|
34
|
-
result: (await client.query({
|
|
35
|
-
query: graphql_tag_1.default `
|
|
36
|
-
mutation {
|
|
37
|
-
updateRetailReplenishmentOrder(${utils_2.gqlBuilder.buildArgs(args)}) {
|
|
38
|
-
name
|
|
39
|
-
bizplace {
|
|
40
|
-
name
|
|
41
|
-
}
|
|
42
|
-
issuedDate
|
|
43
|
-
refNo
|
|
44
|
-
remark
|
|
45
|
-
orderProducts {
|
|
46
|
-
product {
|
|
47
|
-
sku
|
|
48
|
-
name
|
|
49
|
-
}
|
|
50
|
-
batchId
|
|
51
|
-
packQty
|
|
52
|
-
status
|
|
53
|
-
remark
|
|
54
|
-
}
|
|
55
|
-
status
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
`,
|
|
59
|
-
variables: {},
|
|
60
|
-
context: Object.assign(Object.assign({}, context), { state: Object.assign(Object.assign({}, context.state), { bizplace,
|
|
61
|
-
domain }) })
|
|
62
|
-
})).data
|
|
63
|
-
};
|
|
64
|
-
});
|
|
65
|
-
function checkMandatoryKey(context, params) {
|
|
66
|
-
var noparams = ['name', 'orderProducts'].filter(param => !(param in params));
|
|
67
|
-
if ('orderProducts' in params) {
|
|
68
|
-
if (params.orderProducts.filter(record => !record.product || !record.packQty).length)
|
|
69
|
-
noparams.push('orderProducts');
|
|
70
|
-
}
|
|
71
|
-
if (noparams.length > 0) {
|
|
72
|
-
context.throw(400, context.t('text.required parameters not found', { parameters: noparams.join(',') }));
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
exports.checkMandatoryKey = checkMandatoryKey;
|
|
76
|
-
//# sourceMappingURL=update-replenishment-order-product.js.map
|
package/dist-server/routers/api/restful-apis/unstable/update-replenishment-order-product.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-replenishment-order-product.js","sourceRoot":"","sources":["../../../../../server/routers/api/restful-apis/unstable/update-replenishment-order-product.ts"],"names":[],"mappings":";;;;;;AAAA,mCAAmC;AACnC,iDAAkD;AAClD,6CAAgE;AAChE,uFAAkF;AAClF,qFAAgF;AAChF,8DAA6B;AAE7B,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,oFAAoF,CAAC,CAAA;AAEpH,sBAAM,CAAC,IAAI,CACT,qEAAqE,EACrE,wCAAkB,EAClB,0CAAmB,EACnB,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACtB,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAC7D,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,MAAM,CAAA;IAC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,MAAM,EAAE;QAC7B,IAAI,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM;YAAE,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;KACrH;IAED,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;QACvB,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,oCAAoC,EAAE,EAAE,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAA;KACxG;AACH,CAAC;AAVD,8CAUC"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.checkMandatoryKey = void 0;
|
|
7
|
-
const utils_1 = require("./utils");
|
|
8
|
-
const utils_2 = require("@things-factory/utils");
|
|
9
|
-
const api_1 = require("@things-factory/api");
|
|
10
|
-
const warehouse_middleware_1 = require("../../../../middlewares/warehouse-middleware");
|
|
11
|
-
const business_middleware_1 = require("../../../../middlewares/business-middleware");
|
|
12
|
-
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
13
|
-
const debug = require('debug')('things-factory:operato-hub:restful-api:unstable:update-replenishment-order-status');
|
|
14
|
-
api_1.restfulApiRouter.post('/unstable/warehouse/:warehouseId/update-replenishment-order-status', business_middleware_1.businessMiddleware, warehouse_middleware_1.warehouseMiddleware, async (context, next) => {
|
|
15
|
-
const { client, warehouse: bizplace, domain } = context.state;
|
|
16
|
-
const { warehouseId } = context.params;
|
|
17
|
-
const attachments = undefined;
|
|
18
|
-
let bodyReq = context.request.body;
|
|
19
|
-
if (!warehouseId)
|
|
20
|
-
throw new Error(utils_1.ERROR_MSG.REQUEST.BAD_REQUEST('warehouseId'));
|
|
21
|
-
if (typeof bodyReq === undefined || bodyReq.body === '') {
|
|
22
|
-
throw new Error(utils_1.ERROR_MSG.REQUEST.BAD_REQUEST('bodyReq'));
|
|
23
|
-
}
|
|
24
|
-
checkMandatoryKey(context, bodyReq);
|
|
25
|
-
debug('post:/update-replenishment-order-status request.body', context.request.body);
|
|
26
|
-
const args = {
|
|
27
|
-
patch: Object.assign(Object.assign({}, bodyReq), { warehouseId })
|
|
28
|
-
};
|
|
29
|
-
context.body = {
|
|
30
|
-
result: (await client.query({
|
|
31
|
-
query: graphql_tag_1.default `
|
|
32
|
-
mutation {
|
|
33
|
-
completeRetailReplenishmentOrder(${utils_2.gqlBuilder.buildArgs(args)}) {
|
|
34
|
-
name
|
|
35
|
-
bizplace {
|
|
36
|
-
id
|
|
37
|
-
name
|
|
38
|
-
}
|
|
39
|
-
issuedDate
|
|
40
|
-
refNo
|
|
41
|
-
remark
|
|
42
|
-
orderProducts {
|
|
43
|
-
product {
|
|
44
|
-
sku
|
|
45
|
-
name
|
|
46
|
-
}
|
|
47
|
-
batchId
|
|
48
|
-
packQty
|
|
49
|
-
status
|
|
50
|
-
remark
|
|
51
|
-
}
|
|
52
|
-
status
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
`,
|
|
56
|
-
variables: {},
|
|
57
|
-
context: Object.assign(Object.assign({}, context), { state: Object.assign(Object.assign({}, context.state), { bizplace,
|
|
58
|
-
domain }) })
|
|
59
|
-
})).data
|
|
60
|
-
};
|
|
61
|
-
});
|
|
62
|
-
function checkMandatoryKey(context, params) {
|
|
63
|
-
var noparams = ['name', 'orderProducts'].filter(param => !(param in params));
|
|
64
|
-
if ('orderProducts' in params) {
|
|
65
|
-
if (params.orderProducts.filter(record => !record.batchId || !record.status || !record.remark).length)
|
|
66
|
-
noparams.push('orderProducts');
|
|
67
|
-
}
|
|
68
|
-
if (noparams.length > 0) {
|
|
69
|
-
context.throw(400, context.t('text.required parameters not found', { parameters: noparams.join(',') }));
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
exports.checkMandatoryKey = checkMandatoryKey;
|
|
73
|
-
//# sourceMappingURL=update-replenishment-order-status.js.map
|
package/dist-server/routers/api/restful-apis/unstable/update-replenishment-order-status.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-replenishment-order-status.js","sourceRoot":"","sources":["../../../../../server/routers/api/restful-apis/unstable/update-replenishment-order-status.ts"],"names":[],"mappings":";;;;;;AAAA,mCAAmC;AACnC,iDAAkD;AAClD,6CAAgE;AAChE,uFAAkF;AAClF,qFAAgF;AAChF,8DAA6B;AAE7B,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,mFAAmF,CAAC,CAAA;AAEnH,sBAAM,CAAC,IAAI,CACT,oEAAoE,EACpE,wCAAkB,EAClB,0CAAmB,EACnB,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACtB,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAC7D,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,MAAM,CAAA;IACtC,MAAM,WAAW,GAAG,SAAS,CAAA;IAC7B,IAAI,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAA;IAElC,IAAI,CAAC,WAAW;QAAE,MAAM,IAAI,KAAK,CAAC,iBAAS,CAAC,OAAO,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAA;IAE/E,IAAI,OAAO,OAAO,KAAK,SAAS,IAAI,OAAO,CAAC,IAAI,KAAK,EAAE,EAAE;QACvD,MAAM,IAAI,KAAK,CAAC,iBAAS,CAAC,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAA;KAC1D;IAED,iBAAiB,CAAC,OAAO,EA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"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.checkMandatoryKey = void 0;
|
|
7
|
-
const utils_1 = require("./utils");
|
|
8
|
-
const utils_2 = require("@things-factory/utils");
|
|
9
|
-
const api_1 = require("@things-factory/api");
|
|
10
|
-
const warehouse_middleware_1 = require("../../../../middlewares/warehouse-middleware");
|
|
11
|
-
const business_middleware_1 = require("../../../../middlewares/business-middleware");
|
|
12
|
-
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
13
|
-
const debug = require('debug')('things-factory:operato-hub:restful-api:unstable:update-transfer-order-status');
|
|
14
|
-
api_1.restfulApiRouter.post('/unstable/warehouse/:warehouseId/update-transfer-order-status', business_middleware_1.businessMiddleware, warehouse_middleware_1.warehouseMiddleware, async (context, next) => {
|
|
15
|
-
const { client, warehouse: bizplace, domain } = context.state;
|
|
16
|
-
const { warehouseId } = context.params;
|
|
17
|
-
const attachments = undefined;
|
|
18
|
-
let bodyReq = context.request.body;
|
|
19
|
-
if (!warehouseId)
|
|
20
|
-
throw new Error(utils_1.ERROR_MSG.REQUEST.BAD_REQUEST('warehouseId'));
|
|
21
|
-
if (typeof bodyReq === undefined || bodyReq.body === '') {
|
|
22
|
-
throw new Error(utils_1.ERROR_MSG.REQUEST.BAD_REQUEST('bodyReq'));
|
|
23
|
-
}
|
|
24
|
-
checkMandatoryKey(context, bodyReq);
|
|
25
|
-
debug('post:/update-transfer-order-status request.body', context.request.body);
|
|
26
|
-
const args = {
|
|
27
|
-
patch: Object.assign(Object.assign({}, bodyReq), { warehouseId })
|
|
28
|
-
};
|
|
29
|
-
context.body = {
|
|
30
|
-
result: (await client.query({
|
|
31
|
-
query: graphql_tag_1.default `
|
|
32
|
-
mutation {
|
|
33
|
-
completeTransferOrder(${utils_2.gqlBuilder.buildArgs(args)}) {
|
|
34
|
-
name
|
|
35
|
-
bizplace {
|
|
36
|
-
id
|
|
37
|
-
name
|
|
38
|
-
}
|
|
39
|
-
issuedDate
|
|
40
|
-
refNo
|
|
41
|
-
remark
|
|
42
|
-
orderInventories {
|
|
43
|
-
inventory {
|
|
44
|
-
palletId
|
|
45
|
-
}
|
|
46
|
-
product {
|
|
47
|
-
sku
|
|
48
|
-
name
|
|
49
|
-
}
|
|
50
|
-
batchId
|
|
51
|
-
releaseQty
|
|
52
|
-
remark
|
|
53
|
-
status
|
|
54
|
-
}
|
|
55
|
-
status
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
`,
|
|
59
|
-
variables: {},
|
|
60
|
-
context: Object.assign(Object.assign({}, context), { state: Object.assign(Object.assign({}, context.state), { bizplace,
|
|
61
|
-
domain }) })
|
|
62
|
-
})).data
|
|
63
|
-
};
|
|
64
|
-
});
|
|
65
|
-
function checkMandatoryKey(context, params) {
|
|
66
|
-
var noparams = ['name', 'orderInventories'].filter(param => !(param in params));
|
|
67
|
-
if ('orderInventories' in params) {
|
|
68
|
-
if (params.orderInventories.filter(record => !record.batchId || !record.status || !record.remark).length)
|
|
69
|
-
noparams.push('orderInventories');
|
|
70
|
-
}
|
|
71
|
-
if (noparams.length > 0) {
|
|
72
|
-
context.throw(400, context.t('text.required parameters not found', { parameters: noparams.join(',') }));
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
exports.checkMandatoryKey = checkMandatoryKey;
|
|
76
|
-
//# sourceMappingURL=update-transfer-order-status.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-transfer-order-status.js","sourceRoot":"","sources":["../../../../../server/routers/api/restful-apis/unstable/update-transfer-order-status.ts"],"names":[],"mappings":";;;;;;AAAA,mCAAmC;AACnC,iDAAkD;AAClD,6CAAgE;AAChE,uFAAkF;AAClF,qFAAgF;AAChF,8DAA6B;AA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oBACR,MAAM,MAET;SACK,CAAC,CACV,CAAC,IAAI;KACP,CAAA;AACH,CAAC,CACF,CAAA;AAED,SAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM;IAC/C,IAAI,QAAQ,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,MAAM,CAAC,CAAC,CAAA;IAE/E,IAAI,kBAAkB,IAAI,MAAM,EAAE;QAChC,IAAI,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM;YACtG,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;KACpC;IAED,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;QACvB,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,oCAAoC,EAAE,EAAE,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAA;KACxG;AACH,CAAC;AAXD,8CAWC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ERROR_MSG = void 0;
|
|
4
|
-
exports.ERROR_MSG = {
|
|
5
|
-
REQUEST: {
|
|
6
|
-
BAD_REQUEST: (field) => `E400: Invalid Request Format / Bad Request, missing ${field}`,
|
|
7
|
-
REQUIRED_PARAMS: (field) => `E400: Required parameters not found, missing ${field}`
|
|
8
|
-
},
|
|
9
|
-
RESPONSE: {
|
|
10
|
-
NOT_FOUND: (field) => `E:401 ${field} is not found.`
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=api-error-message.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api-error-message.js","sourceRoot":"","sources":["../../../../../../server/routers/api/restful-apis/unstable/utils/api-error-message.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG;IACvB,OAAO,EAAE;QACP,WAAW,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,uDAAuD,KAAK,EAAE;QAC9F,eAAe,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,gDAAgD,KAAK,EAAE;KAC5F;IACD,QAAQ,EAAE;QACR,SAAS,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,SAAS,KAAK,gBAAgB;KAC7D;CACF,CAAA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./api-error-message"), exports);
|
|
14
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../server/routers/api/restful-apis/unstable/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sDAAmC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
7
|
-
const api_1 = require("@things-factory/api");
|
|
8
|
-
api_1.restfulApiRouter.get('/v1/appBindings', async (context, next) => {
|
|
9
|
-
const { client } = context.state;
|
|
10
|
-
context.body = {
|
|
11
|
-
result: (await client.query({
|
|
12
|
-
query: graphql_tag_1.default `
|
|
13
|
-
query {
|
|
14
|
-
appBindings {
|
|
15
|
-
items {
|
|
16
|
-
name
|
|
17
|
-
status
|
|
18
|
-
}
|
|
19
|
-
total
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
`,
|
|
23
|
-
variables: {},
|
|
24
|
-
context
|
|
25
|
-
})).data
|
|
26
|
-
};
|
|
27
|
-
});
|
|
28
|
-
//# sourceMappingURL=application.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"application.js","sourceRoot":"","sources":["../../../../../server/routers/api/restful-apis/v1/application.ts"],"names":[],"mappings":";;;;;AAAA,8DAA6B;AAC7B,6CAAgE;AAEhE,sBAAM,CAAC,GAAG,CAAC,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACpD,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAEhC,OAAO,CAAC,IAAI,GAAG;QACb,MAAM,EAAE,CACN,MAAM,MAAM,CAAC,KAAK,CAAC;YACjB,KAAK,EAAE,qBAAG,CAAA;;;;;;;;;;SAUT;YACD,SAAS,EAAE,EAAE;YACb,OAAO;SACD,CAAC,CACV,CAAC,IAAI;KACP,CAAA;AACH,CAAC,CAAC,CAAA"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
7
|
-
const api_1 = require("@things-factory/api");
|
|
8
|
-
api_1.restfulApiRouter.get('/v1/orders', async (context, next) => {
|
|
9
|
-
const { client } = context.state;
|
|
10
|
-
context.body = {
|
|
11
|
-
result: (await client.query({
|
|
12
|
-
query: graphql_tag_1.default `
|
|
13
|
-
query {
|
|
14
|
-
users {
|
|
15
|
-
items {
|
|
16
|
-
name
|
|
17
|
-
status
|
|
18
|
-
}
|
|
19
|
-
total
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
`,
|
|
23
|
-
variables: {},
|
|
24
|
-
context
|
|
25
|
-
})).data
|
|
26
|
-
};
|
|
27
|
-
});
|
|
28
|
-
//# sourceMappingURL=order.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"order.js","sourceRoot":"","sources":["../../../../../server/routers/api/restful-apis/v1/order.ts"],"names":[],"mappings":";;;;;AAAA,8DAA6B;AAC7B,6CAAgE;AAEhE,sBAAM,CAAC,GAAG,CAAC,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IAC/C,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAEhC,OAAO,CAAC,IAAI,GAAG;QACb,MAAM,EAAE,CACN,MAAM,MAAM,CAAC,KAAK,CAAC;YACjB,KAAK,EAAE,qBAAG,CAAA;;;;;;;;;;SAUT;YACD,SAAS,EAAE,EAAE;YACb,OAAO;SACD,CAAC,CACV,CAAC,IAAI;KACP,CAAA;AACH,CAAC,CAAC,CAAA"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
7
|
-
const api_1 = require("@things-factory/api");
|
|
8
|
-
api_1.restfulApiRouter.get('/v2/appBindings', async (context, next) => {
|
|
9
|
-
const { client } = context.state;
|
|
10
|
-
context.body = {
|
|
11
|
-
result: (await client.query({
|
|
12
|
-
query: graphql_tag_1.default `
|
|
13
|
-
query {
|
|
14
|
-
appBindings {
|
|
15
|
-
items {
|
|
16
|
-
name
|
|
17
|
-
status
|
|
18
|
-
}
|
|
19
|
-
total
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
`,
|
|
23
|
-
variables: {},
|
|
24
|
-
context
|
|
25
|
-
})).data
|
|
26
|
-
};
|
|
27
|
-
});
|
|
28
|
-
//# sourceMappingURL=application.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"application.js","sourceRoot":"","sources":["../../../../../server/routers/api/restful-apis/v2/application.ts"],"names":[],"mappings":";;;;;AAAA,8DAA6B;AAC7B,6CAAgE;AAEhE,sBAAM,CAAC,GAAG,CAAC,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACpD,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAEhC,OAAO,CAAC,IAAI,GAAG;QACb,MAAM,EAAE,CACN,MAAM,MAAM,CAAC,KAAK,CAAC;YACjB,KAAK,EAAE,qBAAG,CAAA;;;;;;;;;;SAUT;YACD,SAAS,EAAE,EAAE;YACb,OAAO;SACD,CAAC,CACV,CAAC,IAAI;KACP,CAAA;AACH,CAAC,CAAC,CAAA"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
7
|
-
const api_1 = require("@things-factory/api");
|
|
8
|
-
api_1.restfulApiRouter.get('/v2/orders', async (context, next) => {
|
|
9
|
-
const { client } = context.state;
|
|
10
|
-
context.body = {
|
|
11
|
-
result: (await client.query({
|
|
12
|
-
query: graphql_tag_1.default `
|
|
13
|
-
query {
|
|
14
|
-
users {
|
|
15
|
-
items {
|
|
16
|
-
name
|
|
17
|
-
status
|
|
18
|
-
}
|
|
19
|
-
total
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
`,
|
|
23
|
-
variables: {},
|
|
24
|
-
context
|
|
25
|
-
})).data
|
|
26
|
-
};
|
|
27
|
-
});
|
|
28
|
-
//# sourceMappingURL=order.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"order.js","sourceRoot":"","sources":["../../../../../server/routers/api/restful-apis/v2/order.ts"],"names":[],"mappings":";;;;;AAAA,8DAA6B;AAC7B,6CAAgE;AAEhE,sBAAM,CAAC,GAAG,CAAC,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IAC/C,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAEhC,OAAO,CAAC,IAAI,GAAG;QACb,MAAM,EAAE,CACN,MAAM,MAAM,CAAC,KAAK,CAAC;YACjB,KAAK,EAAE,qBAAG,CAAA;;;;;;;;;;SAUT;YACD,SAAS,EAAE,EAAE;YACb,OAAO;SACD,CAAC,CACV,CAAC,IAAI;KACP,CAAA;AACH,CAAC,CAAC,CAAA"}
|