@things-factory/operato-hub 4.3.628 → 4.3.629
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/routers/api/restful-apis/v1/utils/params.js +35 -3
- package/dist-server/routers/api/restful-apis/v1/utils/params.js.map +1 -1
- package/dist-server/routers/api/restful-apis/v1/warehouse/add-return-order.js +325 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/add-return-order.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/get-return-order-details.js +94 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/get-return-order-details.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/get-return-order-list.js +63 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/get-return-order-list.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/index.js +13 -10
- package/dist-server/routers/api/restful-apis/v1/warehouse/index.js.map +1 -1
- package/openapi/v1/return-order.yaml +486 -0
- package/package.json +4 -4
- package/server/routers/api/restful-apis/v1/utils/params.ts +35 -3
- package/server/routers/api/restful-apis/v1/warehouse/add-return-order.ts +360 -0
- package/server/routers/api/restful-apis/v1/warehouse/get-return-order-details.ts +99 -0
- package/server/routers/api/restful-apis/v1/warehouse/get-return-order-list.ts +68 -0
- package/server/routers/api/restful-apis/v1/warehouse/index.ts +13 -10
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const typeorm_1 = require("typeorm");
|
|
4
|
+
const api_1 = require("@things-factory/api");
|
|
5
|
+
const sales_base_1 = require("@things-factory/sales-base");
|
|
6
|
+
const middlewares_1 = require("../middlewares");
|
|
7
|
+
const error_util_1 = require("../utils/error-util");
|
|
8
|
+
api_1.restfulApiRouter.get('/v1/warehouse/get-return-order-list', middlewares_1.businessMiddleware, middlewares_1.validationMiddleware, middlewares_1.loggingMiddleware, async (context, next) => {
|
|
9
|
+
try {
|
|
10
|
+
let filter = Object.assign({}, context.query);
|
|
11
|
+
const { fromDate, toDate, offset, limit } = filter;
|
|
12
|
+
if (filter.bizplaceId) {
|
|
13
|
+
filter['bizplace'] = filter['bizplaceId'];
|
|
14
|
+
delete filter['bizplaceId'];
|
|
15
|
+
}
|
|
16
|
+
if (filter.name) {
|
|
17
|
+
filter['name'] = filter['name'];
|
|
18
|
+
}
|
|
19
|
+
if (fromDate && toDate) {
|
|
20
|
+
filter['createdAt'] = (0, typeorm_1.Between)(fromDate, toDate);
|
|
21
|
+
}
|
|
22
|
+
delete filter['fromDate'];
|
|
23
|
+
delete filter['toDate'];
|
|
24
|
+
delete filter['limit'];
|
|
25
|
+
delete filter['offset'];
|
|
26
|
+
const [returnOrders, totalCount] = await (0, typeorm_1.getRepository)(sales_base_1.ReturnOrder).findAndCount({
|
|
27
|
+
where: filter,
|
|
28
|
+
relations: ['bizplace', 'creator', 'updater', 'acceptedBy'],
|
|
29
|
+
skip: offset ? Number(offset) : 0,
|
|
30
|
+
take: limit ? Number(limit) : 100,
|
|
31
|
+
order: { createdAt: 'DESC' }
|
|
32
|
+
});
|
|
33
|
+
const data = returnOrders.map(ro => ({
|
|
34
|
+
id: ro.id,
|
|
35
|
+
name: ro.name,
|
|
36
|
+
status: ro.status,
|
|
37
|
+
ownTransport: ro.ownTransport,
|
|
38
|
+
eta: ro.eta,
|
|
39
|
+
etaDate: ro.etaDate,
|
|
40
|
+
remark: ro.remark,
|
|
41
|
+
refNo: ro.refNo,
|
|
42
|
+
bizplace: ro.bizplace ? { id: ro.bizplace.id, name: ro.bizplace.name } : null,
|
|
43
|
+
creator: ro.creator ? { id: ro.creator.id, name: ro.creator.name } : null,
|
|
44
|
+
updater: ro.updater ? { id: ro.updater.id, name: ro.updater.name } : null,
|
|
45
|
+
acceptedBy: ro.acceptedBy ? { id: ro.acceptedBy.id, name: ro.acceptedBy.name } : null,
|
|
46
|
+
createdAt: ro.createdAt,
|
|
47
|
+
updatedAt: ro.updatedAt
|
|
48
|
+
}));
|
|
49
|
+
context.body = {
|
|
50
|
+
data,
|
|
51
|
+
totalCount,
|
|
52
|
+
limit: limit ? Number(limit) : 100,
|
|
53
|
+
offset: offset ? Number(offset) : 0
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
catch (e) {
|
|
57
|
+
if (e instanceof error_util_1.ApiError)
|
|
58
|
+
(0, error_util_1.ApiErrorHandler)(context, e);
|
|
59
|
+
else
|
|
60
|
+
(0, error_util_1.throwInternalServerError)(context, e);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
//# sourceMappingURL=get-return-order-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-return-order-list.js","sourceRoot":"","sources":["../../../../../../server/routers/api/restful-apis/v1/warehouse/get-return-order-list.ts"],"names":[],"mappings":"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"}
|
|
@@ -2,28 +2,31 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
require("./add-inbound-order");
|
|
4
4
|
require("./add-release-order");
|
|
5
|
+
require("./add-return-order");
|
|
6
|
+
require("./add-sales-invoice");
|
|
5
7
|
require("./cancel-inbound-order");
|
|
6
8
|
require("./cancel-release-order");
|
|
9
|
+
require("./complete-delivery-order");
|
|
10
|
+
require("./dispatch-delivery-order");
|
|
7
11
|
require("./get-delivery-order-list");
|
|
12
|
+
require("./get-do-document");
|
|
13
|
+
require("./get-draft-order-details");
|
|
8
14
|
require("./get-draft-order-list");
|
|
9
15
|
require("./get-goods-received-note-list");
|
|
16
|
+
require("./get-grn-document");
|
|
10
17
|
require("./get-inbound-order-details");
|
|
11
18
|
require("./get-inbound-order-list");
|
|
19
|
+
require("./get-inventory-adjustment-details");
|
|
20
|
+
require("./get-inventory-adjustment-list");
|
|
12
21
|
require("./get-inventory-product-group-list");
|
|
22
|
+
require("./get-manifest-details");
|
|
13
23
|
require("./get-onhand-inventory-list");
|
|
14
|
-
require("./get-draft-order-details");
|
|
15
24
|
require("./get-release-order-details");
|
|
16
25
|
require("./get-release-order-list");
|
|
26
|
+
require("./get-return-order-details");
|
|
27
|
+
require("./get-return-order-list");
|
|
17
28
|
require("./get-warehouse-bizplace-onhand-inventories");
|
|
18
|
-
require("./update-release-order-details");
|
|
19
|
-
require("./get-grn-document");
|
|
20
|
-
require("./get-do-document");
|
|
21
|
-
require("./dispatch-delivery-order");
|
|
22
29
|
require("./update-gan-to-arrived");
|
|
23
|
-
require("./complete-delivery-order");
|
|
24
|
-
require("./get-inventory-adjustment-list");
|
|
25
|
-
require("./get-inventory-adjustment-details");
|
|
26
|
-
require("./get-manifest-details");
|
|
27
30
|
require("./update-order-package-details");
|
|
28
|
-
require("./
|
|
31
|
+
require("./update-release-order-details");
|
|
29
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../server/routers/api/restful-apis/v1/warehouse/index.ts"],"names":[],"mappings":";;AAAA,+BAA4B;AAC5B,+BAA4B;AAC5B,kCAA+B;AAC/B,kCAA+B;AAC/B,qCAAkC;AAClC,kCAA+B;AAC/B,0CAAuC;AACvC,uCAAoC;AACpC,oCAAiC;AACjC,8CAA2C;AAC3C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../server/routers/api/restful-apis/v1/warehouse/index.ts"],"names":[],"mappings":";;AAAA,+BAA4B;AAC5B,+BAA4B;AAC5B,8BAA2B;AAC3B,+BAA4B;AAC5B,kCAA+B;AAC/B,kCAA+B;AAC/B,qCAAkC;AAClC,qCAAkC;AAClC,qCAAkC;AAClC,6BAA0B;AAC1B,qCAAkC;AAClC,kCAA+B;AAC/B,0CAAuC;AACvC,8BAA2B;AAC3B,uCAAoC;AACpC,oCAAiC;AACjC,8CAA2C;AAC3C,2CAAwC;AACxC,8CAA2C;AAC3C,kCAA+B;AAC/B,uCAAoC;AACpC,uCAAoC;AACpC,oCAAiC;AACjC,sCAAmC;AACnC,mCAAgC;AAChC,uDAAoD;AACpD,mCAAgC;AAChC,0CAAuC;AACvC,0CAAuC"}
|
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
definitions:
|
|
2
|
+
# AddReturnOrder
|
|
3
|
+
AddReturnOrder:
|
|
4
|
+
type: 'object'
|
|
5
|
+
properties:
|
|
6
|
+
data:
|
|
7
|
+
type: 'object'
|
|
8
|
+
required:
|
|
9
|
+
- 'bizplaceId'
|
|
10
|
+
- 'orderInventories'
|
|
11
|
+
- 'releaseGoodName'
|
|
12
|
+
properties:
|
|
13
|
+
bizplaceId:
|
|
14
|
+
type: 'string'
|
|
15
|
+
description: 'ID of the customer bizplace'
|
|
16
|
+
example: '123e4567-e89b-12d3-a456-426614174000'
|
|
17
|
+
releaseGoodName:
|
|
18
|
+
type: 'string'
|
|
19
|
+
description: 'Name of the release good order that this return order is associated with'
|
|
20
|
+
example: 'RG-20240315-001'
|
|
21
|
+
orderInventories:
|
|
22
|
+
type: 'array'
|
|
23
|
+
description: 'List of items to be returned'
|
|
24
|
+
items:
|
|
25
|
+
type: 'object'
|
|
26
|
+
required:
|
|
27
|
+
- 'productDetail'
|
|
28
|
+
- 'returnQty'
|
|
29
|
+
properties:
|
|
30
|
+
productDetail:
|
|
31
|
+
type: 'object'
|
|
32
|
+
required:
|
|
33
|
+
- 'id'
|
|
34
|
+
properties:
|
|
35
|
+
id:
|
|
36
|
+
type: 'string'
|
|
37
|
+
description: 'Product Detail ID'
|
|
38
|
+
example: '987e6543-e21b-12d3-a456-426614174999'
|
|
39
|
+
returnQty:
|
|
40
|
+
type: 'integer'
|
|
41
|
+
description: 'Quantity to be returned (must be > 0 and not exceed original order quantity)'
|
|
42
|
+
minimum: 1
|
|
43
|
+
example: 10
|
|
44
|
+
batchId:
|
|
45
|
+
type: 'string'
|
|
46
|
+
description: 'Batch ID of the product'
|
|
47
|
+
example: 'batch-001'
|
|
48
|
+
packingType:
|
|
49
|
+
type: 'string'
|
|
50
|
+
description: 'Type of packing'
|
|
51
|
+
example: 'box'
|
|
52
|
+
packingSize:
|
|
53
|
+
type: 'integer'
|
|
54
|
+
description: 'Size of packing'
|
|
55
|
+
example: 24
|
|
56
|
+
remark:
|
|
57
|
+
type: 'string'
|
|
58
|
+
description: 'Additional remarks for the return order'
|
|
59
|
+
example: 'Customer returned items due to defect'
|
|
60
|
+
ownTransport:
|
|
61
|
+
type: 'boolean'
|
|
62
|
+
description: 'Whether customer will handle transportation. Must not be set together with warehouseTransport.'
|
|
63
|
+
example: true
|
|
64
|
+
warehouseTransport:
|
|
65
|
+
type: 'boolean'
|
|
66
|
+
description: 'Whether warehouse will handle transportation. Must not be set together with ownTransport.'
|
|
67
|
+
example: false
|
|
68
|
+
collectionOrderNo:
|
|
69
|
+
type: 'string'
|
|
70
|
+
description: 'Collection order number'
|
|
71
|
+
example: 'COL-123456'
|
|
72
|
+
xml:
|
|
73
|
+
name: 'AddReturnOrder'
|
|
74
|
+
ReturnOrderListResponse:
|
|
75
|
+
type: object
|
|
76
|
+
properties:
|
|
77
|
+
data:
|
|
78
|
+
type: array
|
|
79
|
+
items:
|
|
80
|
+
$ref: '#/definitions/ReturnOrderListItem'
|
|
81
|
+
totalCount:
|
|
82
|
+
type: integer
|
|
83
|
+
example: 35
|
|
84
|
+
limit:
|
|
85
|
+
type: integer
|
|
86
|
+
example: 100
|
|
87
|
+
offset:
|
|
88
|
+
type: integer
|
|
89
|
+
example: 0
|
|
90
|
+
xml:
|
|
91
|
+
name: 'ReturnOrderListResponse'
|
|
92
|
+
ReturnOrderListItem:
|
|
93
|
+
type: object
|
|
94
|
+
properties:
|
|
95
|
+
id:
|
|
96
|
+
type: string
|
|
97
|
+
example: '1d61cd39-f9de-4a28-8d24-981e6ea5c626'
|
|
98
|
+
name:
|
|
99
|
+
type: string
|
|
100
|
+
example: 'RO-20240315-001'
|
|
101
|
+
status:
|
|
102
|
+
type: string
|
|
103
|
+
example: 'PENDING'
|
|
104
|
+
ownTransport:
|
|
105
|
+
type: boolean
|
|
106
|
+
example: true
|
|
107
|
+
eta:
|
|
108
|
+
type: string
|
|
109
|
+
example: '2025-05-05T10:00:00Z'
|
|
110
|
+
etaDate:
|
|
111
|
+
type: string
|
|
112
|
+
example: '2025-05-05'
|
|
113
|
+
remark:
|
|
114
|
+
type: string
|
|
115
|
+
example: 'Customer returned items due to defect'
|
|
116
|
+
refNo:
|
|
117
|
+
type: string
|
|
118
|
+
example: 'REF-001'
|
|
119
|
+
bizplace:
|
|
120
|
+
type: object
|
|
121
|
+
properties:
|
|
122
|
+
id:
|
|
123
|
+
type: string
|
|
124
|
+
example: 'bizplace-uuid'
|
|
125
|
+
name:
|
|
126
|
+
type: string
|
|
127
|
+
example: 'Customer A'
|
|
128
|
+
creator:
|
|
129
|
+
type: object
|
|
130
|
+
properties:
|
|
131
|
+
id:
|
|
132
|
+
type: string
|
|
133
|
+
example: 'user-uuid'
|
|
134
|
+
name:
|
|
135
|
+
type: string
|
|
136
|
+
example: 'Admin'
|
|
137
|
+
updater:
|
|
138
|
+
type: object
|
|
139
|
+
properties:
|
|
140
|
+
id:
|
|
141
|
+
type: string
|
|
142
|
+
example: 'user-uuid'
|
|
143
|
+
name:
|
|
144
|
+
type: string
|
|
145
|
+
example: 'Admin'
|
|
146
|
+
acceptedBy:
|
|
147
|
+
type: object
|
|
148
|
+
properties:
|
|
149
|
+
id:
|
|
150
|
+
type: string
|
|
151
|
+
example: 'user-uuid'
|
|
152
|
+
name:
|
|
153
|
+
type: string
|
|
154
|
+
example: 'Receiver'
|
|
155
|
+
createdAt:
|
|
156
|
+
type: string
|
|
157
|
+
example: '2025-05-05T10:00:00Z'
|
|
158
|
+
updatedAt:
|
|
159
|
+
type: string
|
|
160
|
+
example: '2025-05-05T12:00:00Z'
|
|
161
|
+
xml:
|
|
162
|
+
name: 'ReturnOrderListItem'
|
|
163
|
+
ReturnOrderDetailResponse:
|
|
164
|
+
type: object
|
|
165
|
+
properties:
|
|
166
|
+
data:
|
|
167
|
+
$ref: '#/definitions/ReturnOrderDetail'
|
|
168
|
+
xml:
|
|
169
|
+
name: 'ReturnOrderDetailResponse'
|
|
170
|
+
ReturnOrderDetail:
|
|
171
|
+
type: object
|
|
172
|
+
properties:
|
|
173
|
+
id:
|
|
174
|
+
type: string
|
|
175
|
+
example: '1d61cd39-f9de-4a28-8d24-981e6ea5c626'
|
|
176
|
+
name:
|
|
177
|
+
type: string
|
|
178
|
+
example: 'RO-20240315-001'
|
|
179
|
+
status:
|
|
180
|
+
type: string
|
|
181
|
+
example: 'PENDING'
|
|
182
|
+
ownTransport:
|
|
183
|
+
type: boolean
|
|
184
|
+
example: true
|
|
185
|
+
eta:
|
|
186
|
+
type: string
|
|
187
|
+
example: '2025-05-05T10:00:00Z'
|
|
188
|
+
etaDate:
|
|
189
|
+
type: string
|
|
190
|
+
example: '2025-05-05'
|
|
191
|
+
remark:
|
|
192
|
+
type: string
|
|
193
|
+
example: 'Customer returned items due to defect'
|
|
194
|
+
refNo:
|
|
195
|
+
type: string
|
|
196
|
+
example: 'REF-001'
|
|
197
|
+
bizplace:
|
|
198
|
+
type: object
|
|
199
|
+
properties:
|
|
200
|
+
id:
|
|
201
|
+
type: string
|
|
202
|
+
example: 'bizplace-uuid'
|
|
203
|
+
name:
|
|
204
|
+
type: string
|
|
205
|
+
example: 'Customer A'
|
|
206
|
+
creator:
|
|
207
|
+
type: object
|
|
208
|
+
properties:
|
|
209
|
+
id:
|
|
210
|
+
type: string
|
|
211
|
+
example: 'user-uuid'
|
|
212
|
+
name:
|
|
213
|
+
type: string
|
|
214
|
+
example: 'Admin'
|
|
215
|
+
updater:
|
|
216
|
+
type: object
|
|
217
|
+
properties:
|
|
218
|
+
id:
|
|
219
|
+
type: string
|
|
220
|
+
example: 'user-uuid'
|
|
221
|
+
name:
|
|
222
|
+
type: string
|
|
223
|
+
example: 'Admin'
|
|
224
|
+
acceptedBy:
|
|
225
|
+
type: object
|
|
226
|
+
properties:
|
|
227
|
+
id:
|
|
228
|
+
type: string
|
|
229
|
+
example: 'user-uuid'
|
|
230
|
+
name:
|
|
231
|
+
type: string
|
|
232
|
+
example: 'Receiver'
|
|
233
|
+
createdAt:
|
|
234
|
+
type: string
|
|
235
|
+
example: '2025-05-05T10:00:00Z'
|
|
236
|
+
updatedAt:
|
|
237
|
+
type: string
|
|
238
|
+
example: '2025-05-05T12:00:00Z'
|
|
239
|
+
inventoryInfos:
|
|
240
|
+
type: array
|
|
241
|
+
items:
|
|
242
|
+
type: object
|
|
243
|
+
properties:
|
|
244
|
+
id:
|
|
245
|
+
type: string
|
|
246
|
+
example: 'inventory-uuid'
|
|
247
|
+
name:
|
|
248
|
+
type: string
|
|
249
|
+
example: 'Product A'
|
|
250
|
+
batchId:
|
|
251
|
+
type: string
|
|
252
|
+
example: 'batch-001'
|
|
253
|
+
palletId:
|
|
254
|
+
type: string
|
|
255
|
+
example: 'pallet-001'
|
|
256
|
+
product:
|
|
257
|
+
type: object
|
|
258
|
+
properties:
|
|
259
|
+
id:
|
|
260
|
+
type: string
|
|
261
|
+
example: 'product-uuid'
|
|
262
|
+
name:
|
|
263
|
+
type: string
|
|
264
|
+
example: 'Product A'
|
|
265
|
+
productName:
|
|
266
|
+
type: string
|
|
267
|
+
example: 'Product A'
|
|
268
|
+
packingType:
|
|
269
|
+
type: string
|
|
270
|
+
example: 'box'
|
|
271
|
+
packingSize:
|
|
272
|
+
type: integer
|
|
273
|
+
example: 24
|
|
274
|
+
returnQty:
|
|
275
|
+
type: integer
|
|
276
|
+
example: 10
|
|
277
|
+
returnUomValue:
|
|
278
|
+
type: number
|
|
279
|
+
example: 10.0
|
|
280
|
+
remark:
|
|
281
|
+
type: string
|
|
282
|
+
example: 'Defective'
|
|
283
|
+
status:
|
|
284
|
+
type: string
|
|
285
|
+
example: 'PENDING'
|
|
286
|
+
xml:
|
|
287
|
+
name: 'ReturnOrderDetail'
|
|
288
|
+
|
|
289
|
+
paths:
|
|
290
|
+
# add-return-order
|
|
291
|
+
api/v1/warehouse/add-return-order:
|
|
292
|
+
post:
|
|
293
|
+
tags:
|
|
294
|
+
- 'Return'
|
|
295
|
+
summary: 'Add return order(s).'
|
|
296
|
+
description: |
|
|
297
|
+
Create a new return order for customer returns. The request body must be wrapped in a `data` property. Either `ownTransport` or `warehouseTransport` must be set, but not both. Each item in `orderInventories` must have a valid `productDetail.id` and a positive `returnQty` not exceeding the original order quantity.
|
|
298
|
+
operationId: 'addReturnOrder'
|
|
299
|
+
produces:
|
|
300
|
+
- 'application/json'
|
|
301
|
+
parameters:
|
|
302
|
+
- in: 'body'
|
|
303
|
+
name: 'body'
|
|
304
|
+
required: true
|
|
305
|
+
schema:
|
|
306
|
+
$ref: '#/definitions/AddReturnOrder'
|
|
307
|
+
responses:
|
|
308
|
+
'200':
|
|
309
|
+
description: 'success'
|
|
310
|
+
content:
|
|
311
|
+
application/json:
|
|
312
|
+
schema:
|
|
313
|
+
type: 'object'
|
|
314
|
+
properties:
|
|
315
|
+
responseCode:
|
|
316
|
+
type: 'string'
|
|
317
|
+
example: '200'
|
|
318
|
+
message:
|
|
319
|
+
type: 'string'
|
|
320
|
+
example: 'success'
|
|
321
|
+
data:
|
|
322
|
+
type: 'object'
|
|
323
|
+
properties:
|
|
324
|
+
id:
|
|
325
|
+
type: 'string'
|
|
326
|
+
example: '1d61cd39-f9de-4a28-8d24-981e6ea5c626'
|
|
327
|
+
name:
|
|
328
|
+
type: 'string'
|
|
329
|
+
example: 'RO-20240315-001'
|
|
330
|
+
status:
|
|
331
|
+
type: 'string'
|
|
332
|
+
example: 'PENDING'
|
|
333
|
+
remark:
|
|
334
|
+
type: 'string'
|
|
335
|
+
example: 'Customer returned items due to defect'
|
|
336
|
+
ownTransport:
|
|
337
|
+
type: 'boolean'
|
|
338
|
+
example: true
|
|
339
|
+
collectionOrderNo:
|
|
340
|
+
type: 'string'
|
|
341
|
+
example: 'COL-123456'
|
|
342
|
+
bizplace:
|
|
343
|
+
type: 'object'
|
|
344
|
+
properties:
|
|
345
|
+
name:
|
|
346
|
+
type: 'string'
|
|
347
|
+
example: 'Customer A'
|
|
348
|
+
domain:
|
|
349
|
+
type: 'object'
|
|
350
|
+
properties:
|
|
351
|
+
name:
|
|
352
|
+
type: 'string'
|
|
353
|
+
example: 'Domain A'
|
|
354
|
+
orderInventories:
|
|
355
|
+
type: 'array'
|
|
356
|
+
items:
|
|
357
|
+
type: 'object'
|
|
358
|
+
properties:
|
|
359
|
+
productDetail:
|
|
360
|
+
type: 'object'
|
|
361
|
+
properties:
|
|
362
|
+
id:
|
|
363
|
+
type: 'string'
|
|
364
|
+
example: '987e6543-e21b-12d3-a456-426614174999'
|
|
365
|
+
returnQty:
|
|
366
|
+
type: 'integer'
|
|
367
|
+
example: 10
|
|
368
|
+
batchId:
|
|
369
|
+
type: 'string'
|
|
370
|
+
example: 'batch-001'
|
|
371
|
+
packingType:
|
|
372
|
+
type: 'string'
|
|
373
|
+
example: 'box'
|
|
374
|
+
packingSize:
|
|
375
|
+
type: 'integer'
|
|
376
|
+
example: 24
|
|
377
|
+
'400':
|
|
378
|
+
description: 'Bad Request - Invalid input parameters'
|
|
379
|
+
content:
|
|
380
|
+
application/json:
|
|
381
|
+
schema:
|
|
382
|
+
type: 'object'
|
|
383
|
+
properties:
|
|
384
|
+
responseCode:
|
|
385
|
+
type: 'string'
|
|
386
|
+
example: 'E01'
|
|
387
|
+
message:
|
|
388
|
+
type: 'string'
|
|
389
|
+
example: 'releaseGoodName is required'
|
|
390
|
+
'404':
|
|
391
|
+
description: 'Not Found - Resource not found'
|
|
392
|
+
content:
|
|
393
|
+
application/json:
|
|
394
|
+
schema:
|
|
395
|
+
type: 'object'
|
|
396
|
+
properties:
|
|
397
|
+
responseCode:
|
|
398
|
+
type: 'string'
|
|
399
|
+
example: 'E04'
|
|
400
|
+
message:
|
|
401
|
+
type: 'string'
|
|
402
|
+
example: 'customer bizplace not found'
|
|
403
|
+
'500':
|
|
404
|
+
description: 'Internal Server Error'
|
|
405
|
+
content:
|
|
406
|
+
application/json:
|
|
407
|
+
schema:
|
|
408
|
+
type: 'object'
|
|
409
|
+
properties:
|
|
410
|
+
responseCode:
|
|
411
|
+
type: 'string'
|
|
412
|
+
example: 'E99'
|
|
413
|
+
message:
|
|
414
|
+
type: 'string'
|
|
415
|
+
example: 'Internal server error'
|
|
416
|
+
api/v1/warehouse/get-return-order-list:
|
|
417
|
+
get:
|
|
418
|
+
tags:
|
|
419
|
+
- 'Return'
|
|
420
|
+
summary: 'Get list of return orders.'
|
|
421
|
+
description: 'Get list of Return Orders.'
|
|
422
|
+
operationId: 'getReturnOrderList'
|
|
423
|
+
produces:
|
|
424
|
+
- 'application/json'
|
|
425
|
+
parameters:
|
|
426
|
+
- in: 'query'
|
|
427
|
+
name: 'bizplaceId'
|
|
428
|
+
type: 'string'
|
|
429
|
+
required: true
|
|
430
|
+
- in: 'query'
|
|
431
|
+
name: 'name'
|
|
432
|
+
type: 'string'
|
|
433
|
+
- in: 'query'
|
|
434
|
+
name: 'status'
|
|
435
|
+
type: 'string'
|
|
436
|
+
- in: 'query'
|
|
437
|
+
name: 'fromDate'
|
|
438
|
+
type: 'string'
|
|
439
|
+
description: '(Must use in conjunction with “toDate”) ISO 8601 format in UTC time eg: 2022-07-25T03:40:04Z'
|
|
440
|
+
default: '7 days before current datetime.'
|
|
441
|
+
- in: 'query'
|
|
442
|
+
name: 'toDate'
|
|
443
|
+
type: 'string'
|
|
444
|
+
description: '(Must use in conjunction with “fromDate”) ISO 8601 format in UTC time eg: 2022-07-25T03:40:04Z'
|
|
445
|
+
default: 'Current datetime.'
|
|
446
|
+
- in: 'query'
|
|
447
|
+
name: 'limit'
|
|
448
|
+
type: 'integer'
|
|
449
|
+
default: 100
|
|
450
|
+
max: 100
|
|
451
|
+
- in: 'query'
|
|
452
|
+
name: 'offset'
|
|
453
|
+
type: 'integer'
|
|
454
|
+
default: 0
|
|
455
|
+
responses:
|
|
456
|
+
'200':
|
|
457
|
+
description: 'successful operation'
|
|
458
|
+
content:
|
|
459
|
+
application/json:
|
|
460
|
+
schema:
|
|
461
|
+
$ref: '#/definitions/ReturnOrderListResponse'
|
|
462
|
+
api/v1/warehouse/get-return-order-details:
|
|
463
|
+
get:
|
|
464
|
+
tags:
|
|
465
|
+
- 'Return'
|
|
466
|
+
summary: 'Get return order details.'
|
|
467
|
+
description: 'Get Return Order Details.'
|
|
468
|
+
operationId: 'getReturnOrderDetails'
|
|
469
|
+
produces:
|
|
470
|
+
- 'application/json'
|
|
471
|
+
parameters:
|
|
472
|
+
- in: 'query'
|
|
473
|
+
name: 'bizplaceId'
|
|
474
|
+
type: 'string'
|
|
475
|
+
required: false
|
|
476
|
+
- in: 'query'
|
|
477
|
+
name: 'name'
|
|
478
|
+
type: 'string'
|
|
479
|
+
required: true
|
|
480
|
+
responses:
|
|
481
|
+
'200':
|
|
482
|
+
description: 'successful operation'
|
|
483
|
+
content:
|
|
484
|
+
application/json:
|
|
485
|
+
schema:
|
|
486
|
+
$ref: '#/definitions/ReturnOrderDetailResponse'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/operato-hub",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.629",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"@things-factory/pdf": "^4.3.591",
|
|
93
93
|
"@things-factory/product-ui": "^4.3.607",
|
|
94
94
|
"@things-factory/resource-ui": "^4.3.591",
|
|
95
|
-
"@things-factory/sales-base": "^4.3.
|
|
95
|
+
"@things-factory/sales-base": "^4.3.629",
|
|
96
96
|
"@things-factory/scene-data-transform": "^4.3.591",
|
|
97
97
|
"@things-factory/scene-excel": "^4.3.591",
|
|
98
98
|
"@things-factory/scene-firebase": "^4.3.591",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"@things-factory/system-ui": "^4.3.591",
|
|
110
110
|
"@things-factory/transport-base": "^4.3.595",
|
|
111
111
|
"@things-factory/warehouse-base": "^4.3.626",
|
|
112
|
-
"@things-factory/worksheet-base": "^4.3.
|
|
112
|
+
"@things-factory/worksheet-base": "^4.3.629",
|
|
113
113
|
"cron-parser": "^4.7.0",
|
|
114
114
|
"koa2-swagger-ui": "^5.0.2",
|
|
115
115
|
"swagger-jsdoc": "^5.0.0",
|
|
@@ -122,5 +122,5 @@
|
|
|
122
122
|
"resolutions": {
|
|
123
123
|
"core-js": "^3.16.0"
|
|
124
124
|
},
|
|
125
|
-
"gitHead": "
|
|
125
|
+
"gitHead": "4ddcb5a24ebd10c7729dbd3bb67907872cb2cefb"
|
|
126
126
|
}
|