@things-factory/operato-hub 4.3.435 → 4.3.436
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/warehouse/get-goods-received-note-list.js +13 -10
- package/dist-server/routers/api/restful-apis/v1/warehouse/get-goods-received-note-list.js.map +1 -1
- package/openapi/v1/inbound.yaml +12 -4
- package/package.json +2 -2
- package/server/routers/api/restful-apis/v1/warehouse/get-goods-received-note-list.ts +14 -10
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const typeorm_1 = require("typeorm");
|
|
4
4
|
const api_1 = require("@things-factory/api");
|
|
5
5
|
const sales_base_1 = require("@things-factory/sales-base");
|
|
6
|
-
const error_util_1 = require("../utils/error-util");
|
|
7
6
|
const middlewares_1 = require("../middlewares");
|
|
7
|
+
const error_util_1 = require("../utils/error-util");
|
|
8
8
|
api_1.restfulApiRouter.get('/v1/warehouse/get-goods-received-note-list', middlewares_1.businessMiddleware, middlewares_1.validationMiddleware, middlewares_1.loggingMiddleware, async (context, next) => {
|
|
9
9
|
try {
|
|
10
10
|
// get contact points for that bizplace
|
|
@@ -24,8 +24,9 @@ api_1.restfulApiRouter.get('/v1/warehouse/get-goods-received-note-list', middlew
|
|
|
24
24
|
'bizplace',
|
|
25
25
|
'domain',
|
|
26
26
|
'arrivalNotice',
|
|
27
|
-
'arrivalNotice.
|
|
28
|
-
'arrivalNotice.
|
|
27
|
+
'arrivalNotice.orderInventories',
|
|
28
|
+
'arrivalNotice.orderInventories.product',
|
|
29
|
+
'arrivalNotice.orderInventories.inventory'
|
|
29
30
|
],
|
|
30
31
|
skip: offset,
|
|
31
32
|
take: limit,
|
|
@@ -35,9 +36,10 @@ api_1.restfulApiRouter.get('/v1/warehouse/get-goods-received-note-list', middlew
|
|
|
35
36
|
let data = [];
|
|
36
37
|
for (const goodsReceivedNote of goodsReceivedNotes) {
|
|
37
38
|
let orderProducts = [];
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
orderProducts = goodsReceivedNote.arrivalNotice.orderInventories.map(orderProduct => {
|
|
40
|
+
return {
|
|
40
41
|
product: {
|
|
42
|
+
id: orderProduct.product.id,
|
|
41
43
|
sku: orderProduct.product.sku,
|
|
42
44
|
brandSku: orderProduct.product.brandSku,
|
|
43
45
|
name: orderProduct.product.name,
|
|
@@ -47,12 +49,13 @@ api_1.restfulApiRouter.get('/v1/warehouse/get-goods-received-note-list', middlew
|
|
|
47
49
|
batchId: orderProduct.batchId,
|
|
48
50
|
packingType: orderProduct.packingType,
|
|
49
51
|
packingSize: orderProduct.packingSize,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
status: orderProduct.status,
|
|
53
|
+
qty: orderProduct.actualPackQty,
|
|
54
|
+
uom: orderProduct.uom,
|
|
55
|
+
uomValue: orderProduct.uomValue,
|
|
56
|
+
expirationDate: orderProduct.inventory.expirationDate
|
|
53
57
|
};
|
|
54
|
-
|
|
55
|
-
}
|
|
58
|
+
});
|
|
56
59
|
const datapoint = {
|
|
57
60
|
id: goodsReceivedNote.id,
|
|
58
61
|
grnNo: goodsReceivedNote.grnNo,
|
package/dist-server/routers/api/restful-apis/v1/warehouse/get-goods-received-note-list.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-goods-received-note-list.js","sourceRoot":"","sources":["../../../../../../server/routers/api/restful-apis/v1/warehouse/get-goods-received-note-list.ts"],"names":[],"mappings":";;AAAA,qCAAgD;AAEhD,6CAAgE;AAChE,2DAA8D;AAE9D,
|
|
1
|
+
{"version":3,"file":"get-goods-received-note-list.js","sourceRoot":"","sources":["../../../../../../server/routers/api/restful-apis/v1/warehouse/get-goods-received-note-list.ts"],"names":[],"mappings":";;AAAA,qCAAgD;AAEhD,6CAAgE;AAChE,2DAA8D;AAE9D,gDAA4F;AAC5F,oDAAyF;AAEzF,sBAAM,CAAC,GAAG,CACR,4CA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EAAE,EAAE,iBAAiB,CAAC,aAAa,CAAC,EAAE;oBACtC,KAAK,EAAE,iBAAiB,CAAC,aAAa,CAAC,KAAK;oBAC5C,MAAM,EAAE,iBAAiB,CAAC,aAAa,CAAC,MAAM;oBAC9C,KAAK,EAAE,iBAAiB,CAAC,aAAa,CAAC,KAAK;oBAC5C,MAAM,EAAE,iBAAiB,CAAC,aAAa,CAAC,MAAM;oBAC9C,MAAM,EAAE,iBAAiB,CAAC,aAAa,CAAC,MAAM;oBAC9C,aAAa;iBACd;aACF,CAAA;YACD,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;SACrB;QAED,OAAO,CAAC,IAAI,GAAG;YACb,IAAI;YACJ,UAAU;YACV,KAAK;YACL,MAAM;SACP,CAAA;KACF;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,YAAY,qBAAQ;YAAE,IAAA,4BAAe,EAAC,OAAO,EAAE,CAAC,CAAC,CAAA;;YACjD,IAAA,qCAAwB,EAAC,OAAO,EAAE,CAAC,CAAC,CAAA;KAC1C;AACH,CAAC,CACF,CAAA"}
|
package/openapi/v1/inbound.yaml
CHANGED
|
@@ -414,6 +414,9 @@ definitions:
|
|
|
414
414
|
product:
|
|
415
415
|
type: 'object'
|
|
416
416
|
properties:
|
|
417
|
+
id:
|
|
418
|
+
type: 'string'
|
|
419
|
+
example: '89317220-b5f5-4e63-a748-6ac599ff288e'
|
|
417
420
|
sku:
|
|
418
421
|
type: 'string'
|
|
419
422
|
example: 'string'
|
|
@@ -438,16 +441,21 @@ definitions:
|
|
|
438
441
|
packingSize:
|
|
439
442
|
type: 'integer'
|
|
440
443
|
example: 24
|
|
441
|
-
|
|
444
|
+
status:
|
|
445
|
+
type: 'string'
|
|
446
|
+
example: 'ACTIVE'
|
|
447
|
+
qty:
|
|
442
448
|
type: 'integer'
|
|
443
449
|
example: 1
|
|
444
|
-
|
|
450
|
+
uom:
|
|
451
|
+
type: 'string'
|
|
452
|
+
example: 'UN'
|
|
453
|
+
uomValue:
|
|
445
454
|
type: 'integer'
|
|
446
455
|
format: 'double'
|
|
447
456
|
example: 1
|
|
448
|
-
|
|
457
|
+
expirationDate:
|
|
449
458
|
type: 'string'
|
|
450
|
-
example: 'ACTIVE'
|
|
451
459
|
attachments:
|
|
452
460
|
type: 'string'
|
|
453
461
|
example: 'string'
|
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.436",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -121,5 +121,5 @@
|
|
|
121
121
|
"resolutions": {
|
|
122
122
|
"core-js": "^3.16.0"
|
|
123
123
|
},
|
|
124
|
-
"gitHead": "
|
|
124
|
+
"gitHead": "4a6c0aff2637a045ff3ef5d701a5ea189c4103eb"
|
|
125
125
|
}
|
|
@@ -3,8 +3,8 @@ import { Between, getRepository } from 'typeorm'
|
|
|
3
3
|
import { restfulApiRouter as router } from '@things-factory/api'
|
|
4
4
|
import { GoodsReceivalNote } from '@things-factory/sales-base'
|
|
5
5
|
|
|
6
|
+
import { businessMiddleware, loggingMiddleware, validationMiddleware } from '../middlewares'
|
|
6
7
|
import { ApiError, ApiErrorHandler, throwInternalServerError } from '../utils/error-util'
|
|
7
|
-
import { businessMiddleware, validationMiddleware, loggingMiddleware } from '../middlewares'
|
|
8
8
|
|
|
9
9
|
router.get(
|
|
10
10
|
'/v1/warehouse/get-goods-received-note-list',
|
|
@@ -32,8 +32,9 @@ router.get(
|
|
|
32
32
|
'bizplace',
|
|
33
33
|
'domain',
|
|
34
34
|
'arrivalNotice',
|
|
35
|
-
'arrivalNotice.
|
|
36
|
-
'arrivalNotice.
|
|
35
|
+
'arrivalNotice.orderInventories',
|
|
36
|
+
'arrivalNotice.orderInventories.product',
|
|
37
|
+
'arrivalNotice.orderInventories.inventory'
|
|
37
38
|
],
|
|
38
39
|
skip: offset,
|
|
39
40
|
take: limit,
|
|
@@ -45,9 +46,10 @@ router.get(
|
|
|
45
46
|
let data = []
|
|
46
47
|
for (const goodsReceivedNote of goodsReceivedNotes) {
|
|
47
48
|
let orderProducts = []
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
orderProducts = goodsReceivedNote.arrivalNotice.orderInventories.map(orderProduct => {
|
|
50
|
+
return {
|
|
50
51
|
product: {
|
|
52
|
+
id: orderProduct.product.id,
|
|
51
53
|
sku: orderProduct.product.sku,
|
|
52
54
|
brandSku: orderProduct.product.brandSku,
|
|
53
55
|
name: orderProduct.product.name,
|
|
@@ -57,12 +59,14 @@ router.get(
|
|
|
57
59
|
batchId: orderProduct.batchId,
|
|
58
60
|
packingType: orderProduct.packingType,
|
|
59
61
|
packingSize: orderProduct.packingSize,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
status: orderProduct.status,
|
|
63
|
+
qty: orderProduct.actualPackQty,
|
|
64
|
+
uom: orderProduct.uom,
|
|
65
|
+
uomValue: orderProduct.uomValue,
|
|
66
|
+
expirationDate: orderProduct.inventory.expirationDate
|
|
63
67
|
}
|
|
64
|
-
|
|
65
|
-
|
|
68
|
+
})
|
|
69
|
+
|
|
66
70
|
const datapoint = {
|
|
67
71
|
id: goodsReceivedNote.id,
|
|
68
72
|
grnNo: goodsReceivedNote.grnNo,
|