@things-factory/operato-hub 4.3.486 → 4.3.488
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/validate-util.js +7 -5
- package/dist-server/routers/api/restful-apis/v1/utils/validate-util.js.map +1 -1
- package/dist-server/routers/api/restful-apis/v1/warehouse/get-draft-order-list.js +77 -8
- package/dist-server/routers/api/restful-apis/v1/warehouse/get-draft-order-list.js.map +1 -1
- package/package.json +2 -2
- package/server/routers/api/restful-apis/v1/utils/validate-util.ts +5 -4
- package/server/routers/api/restful-apis/v1/warehouse/get-draft-order-list.ts +141 -71
|
@@ -9,16 +9,18 @@ function validateLimitOffset(limit, offset) {
|
|
|
9
9
|
limit = 100;
|
|
10
10
|
limit = parseInt(limit);
|
|
11
11
|
if (isNaN(limit))
|
|
12
|
-
throw new error_util_1.ApiError('E01', 'limit');
|
|
13
|
-
if (limit >
|
|
14
|
-
throw new error_util_1.ApiError('E01', 'limit');
|
|
12
|
+
throw new error_util_1.ApiError('E01', 'limit is not a number');
|
|
13
|
+
if (limit > 200 || limit < 1)
|
|
14
|
+
throw new error_util_1.ApiError('E01', 'limit cannot exceed 200');
|
|
15
|
+
if (limit < 1)
|
|
16
|
+
throw new error_util_1.ApiError('E01', 'limit cannot less than 0');
|
|
15
17
|
if (!offset)
|
|
16
18
|
offset = 0;
|
|
17
19
|
offset = parseInt(offset);
|
|
18
20
|
if (isNaN(offset))
|
|
19
|
-
throw new error_util_1.ApiError('E01', 'offset');
|
|
21
|
+
throw new error_util_1.ApiError('E01', 'offset is not a number');
|
|
20
22
|
if (offset < 0)
|
|
21
|
-
throw new error_util_1.ApiError('E01', 'offset');
|
|
23
|
+
throw new error_util_1.ApiError('E01', 'offset cannot less than 0');
|
|
22
24
|
return { limit, offset };
|
|
23
25
|
}
|
|
24
26
|
exports.validateLimitOffset = validateLimitOffset;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-util.js","sourceRoot":"","sources":["../../../../../../server/routers/api/restful-apis/v1/utils/validate-util.ts"],"names":[],"mappings":";;;AAEA,6CAAuC;AAEvC,6EAA6E;AAC7E,qBAAqB;AACrB,SAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM;IAC/C,IAAI,CAAC,KAAK;QAAE,KAAK,GAAG,GAAG,CAAA;IACvB,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IACvB,IAAI,KAAK,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,qBAAQ,CAAC,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"validate-util.js","sourceRoot":"","sources":["../../../../../../server/routers/api/restful-apis/v1/utils/validate-util.ts"],"names":[],"mappings":";;;AAEA,6CAAuC;AAEvC,6EAA6E;AAC7E,qBAAqB;AACrB,SAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM;IAC/C,IAAI,CAAC,KAAK;QAAE,KAAK,GAAG,GAAG,CAAA;IACvB,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IACvB,IAAI,KAAK,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,qBAAQ,CAAC,KAAK,EAAE,uBAAuB,CAAC,CAAA;IACpE,IAAI,KAAK,GAAG,GAAG,IAAI,KAAK,GAAG,CAAC;QAAE,MAAM,IAAI,qBAAQ,CAAC,KAAK,EAAE,yBAAyB,CAAC,CAAA;IAClF,IAAI,KAAK,GAAG,CAAC;QAAE,MAAM,IAAI,qBAAQ,CAAC,KAAK,EAAE,0BAA0B,CAAC,CAAA;IAEpE,IAAI,CAAC,MAAM;QAAE,MAAM,GAAG,CAAC,CAAA;IACvB,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAA;IACzB,IAAI,KAAK,CAAC,MAAM,CAAC;QAAE,MAAM,IAAI,qBAAQ,CAAC,KAAK,EAAE,wBAAwB,CAAC,CAAA;IACtE,IAAI,MAAM,GAAG,CAAC;QAAE,MAAM,IA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,EAAE,yCAAyC,CAAC,CAAA;IAE3F,sBAAsB;IACtB,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE,CAAC,CAAA;IACpF,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAA;IAC5D,IAAI,QAAQ,GAAG,EAAE;QAAE,MAAM,IAAI,qBAAQ,CAAC,KAAK,EAAE,iCAAiC,CAAC,CAAA;IAE/E,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAA;AAC7B,CAAC;AA3BD,gDA2BC;AAED,wDAAwD;AACxD,SAAgB,WAAW,CAAC,GAAG;IAC7B,MAAM,QAAQ,GAAG,yFAAyF,CAAA;IAC1G,OAAO,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAC3B,CAAC;AAHD,kCAGC"}
|
|
@@ -11,7 +11,6 @@ const sales_base_1 = require("@things-factory/sales-base");
|
|
|
11
11
|
const middlewares_1 = require("../middlewares");
|
|
12
12
|
const error_util_1 = require("../utils/error-util");
|
|
13
13
|
api_1.restfulApiRouter.get('/v1/warehouse/get-draft-order-list', middlewares_1.businessMiddleware, middlewares_1.validationMiddleware, middlewares_1.loggingMiddleware, async (context, next) => {
|
|
14
|
-
var _a, _b, _c, _d, _e;
|
|
15
14
|
try {
|
|
16
15
|
// get contact points for that bizplace
|
|
17
16
|
// optional query parameter filter
|
|
@@ -48,8 +47,8 @@ api_1.restfulApiRouter.get('/v1/warehouse/get-draft-order-list', middlewares_1.b
|
|
|
48
47
|
.leftJoinAndSelect('op.productDetail', 'pd')
|
|
49
48
|
.leftJoinAndSelect('op.productBundle', 'pb')
|
|
50
49
|
.orderBy('drg.createdAt', 'DESC')
|
|
51
|
-
.
|
|
52
|
-
.
|
|
50
|
+
.skip(offset)
|
|
51
|
+
.take(limit);
|
|
53
52
|
for (const key in filter) {
|
|
54
53
|
if (filter.hasOwnProperty(key)) {
|
|
55
54
|
const value = filter[key];
|
|
@@ -67,11 +66,12 @@ api_1.restfulApiRouter.get('/v1/warehouse/get-draft-order-list', middlewares_1.b
|
|
|
67
66
|
}
|
|
68
67
|
}
|
|
69
68
|
}
|
|
70
|
-
const draftReleaseGoods = await qb.
|
|
71
|
-
const totalCount = draftReleaseGoods.length
|
|
69
|
+
const [draftReleaseGoods, totalCount] = await qb.getManyAndCount();
|
|
70
|
+
// const totalCount = draftReleaseGoods.length
|
|
72
71
|
// create and format data response
|
|
73
72
|
let data = [];
|
|
74
|
-
|
|
73
|
+
data = await Promise.all(draftReleaseGoods.map(async (draftReleaseGood) => {
|
|
74
|
+
var _a, _b, _c, _d, _e;
|
|
75
75
|
let orderProducts = [];
|
|
76
76
|
for (const orderProduct of draftReleaseGood.orderProducts) {
|
|
77
77
|
const orderProductsDataPoint = {
|
|
@@ -138,8 +138,77 @@ api_1.restfulApiRouter.get('/v1/warehouse/get-draft-order-list', middlewares_1.b
|
|
|
138
138
|
},
|
|
139
139
|
orderProducts
|
|
140
140
|
};
|
|
141
|
-
|
|
142
|
-
}
|
|
141
|
+
return datapoint;
|
|
142
|
+
}));
|
|
143
|
+
// for (const draftReleaseGood of draftReleaseGoods) {
|
|
144
|
+
// let orderProducts = []
|
|
145
|
+
// for (const orderProduct of draftReleaseGood.orderProducts) {
|
|
146
|
+
// const orderProductsDataPoint = {
|
|
147
|
+
// product: {
|
|
148
|
+
// sku: orderProduct?.productBundle ? orderProduct.productBundle?.sku : orderProduct?.product?.sku
|
|
149
|
+
// },
|
|
150
|
+
// productDetail: {
|
|
151
|
+
// refCode: orderProduct.productDetail?.refCode
|
|
152
|
+
// },
|
|
153
|
+
// packingType: orderProduct.packingType,
|
|
154
|
+
// releaseQty: orderProduct.releaseQty,
|
|
155
|
+
// packingSize: orderProduct.packingSize,
|
|
156
|
+
// status: await orderProductStatus(orderProduct, draftReleaseGood)
|
|
157
|
+
// }
|
|
158
|
+
// orderProducts.push(orderProductsDataPoint)
|
|
159
|
+
// }
|
|
160
|
+
// const datapoint = {
|
|
161
|
+
// id: draftReleaseGood.id,
|
|
162
|
+
// name: draftReleaseGood.name,
|
|
163
|
+
// draftOrderNo: draftReleaseGood.draftOrderNo,
|
|
164
|
+
// refNo: draftReleaseGood.refNo,
|
|
165
|
+
// refNo2: draftReleaseGood.refNo2,
|
|
166
|
+
// refNo3: draftReleaseGood.refNo3,
|
|
167
|
+
// refOrderId: draftReleaseGood.refOrderId,
|
|
168
|
+
// type: draftReleaseGood.type,
|
|
169
|
+
// releaseDate: draftReleaseGood.releaseDate,
|
|
170
|
+
// collectionOrderNo: draftReleaseGood.collectionOrderNo,
|
|
171
|
+
// ownTransport: draftReleaseGood.ownTransport,
|
|
172
|
+
// exportOption: draftReleaseGood.exportOption,
|
|
173
|
+
// packingOption: draftReleaseGood.packingOption,
|
|
174
|
+
// courierOption: draftReleaseGood.courierOption,
|
|
175
|
+
// codOption: draftReleaseGood.codOption,
|
|
176
|
+
// lmdOption: draftReleaseGood.lmdOption,
|
|
177
|
+
// storeName: draftReleaseGood.storeName,
|
|
178
|
+
// storeId: draftReleaseGood.storeId,
|
|
179
|
+
// routeId: draftReleaseGood.routeId,
|
|
180
|
+
// stopId: draftReleaseGood.stopId,
|
|
181
|
+
// status: await draftReleaseGoodStatus(draftReleaseGood.bizplace.id, draftReleaseGood),
|
|
182
|
+
// releaseGood: draftReleaseGood.releaseGood
|
|
183
|
+
// ? {
|
|
184
|
+
// id: draftReleaseGood.releaseGood[0]?.id,
|
|
185
|
+
// name: draftReleaseGood.releaseGood[0]?.name
|
|
186
|
+
// }
|
|
187
|
+
// : null,
|
|
188
|
+
// billTo: {
|
|
189
|
+
// billingAddress: draftReleaseGood.billingAddress
|
|
190
|
+
// },
|
|
191
|
+
// deliverTo: {
|
|
192
|
+
// deliveryAddress1: draftReleaseGood.deliveryAddress1,
|
|
193
|
+
// deliveryAddress2: draftReleaseGood.deliveryAddress2,
|
|
194
|
+
// deliveryAddress3: draftReleaseGood.deliveryAddress3,
|
|
195
|
+
// deliveryAddress4: draftReleaseGood.deliveryAddress4,
|
|
196
|
+
// deliveryAddress5: draftReleaseGood.deliveryAddress5,
|
|
197
|
+
// attentionTo: draftReleaseGood.attentionTo,
|
|
198
|
+
// attentionCompany: draftReleaseGood.attentionCompany,
|
|
199
|
+
// city: draftReleaseGood.city,
|
|
200
|
+
// district: draftReleaseGood.district,
|
|
201
|
+
// state: draftReleaseGood.state,
|
|
202
|
+
// postalCode: draftReleaseGood.postalCode,
|
|
203
|
+
// country: draftReleaseGood.country,
|
|
204
|
+
// phone1: draftReleaseGood.phone1,
|
|
205
|
+
// phone2: draftReleaseGood.phone2,
|
|
206
|
+
// email: draftReleaseGood.email
|
|
207
|
+
// },
|
|
208
|
+
// orderProducts
|
|
209
|
+
// }
|
|
210
|
+
// data.push(datapoint)
|
|
211
|
+
// }
|
|
143
212
|
context.body = {
|
|
144
213
|
data,
|
|
145
214
|
totalCount,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-draft-order-list.js","sourceRoot":"","sources":["../../../../../../server/routers/api/restful-apis/v1/warehouse/get-draft-order-list.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAsB;AACtB,qCAAkG;AAElG,6CAAgE;AAEhE,2DAAwG;AAExG,gDAA4F;AAC5F,oDAAyF;
|
|
1
|
+
{"version":3,"file":"get-draft-order-list.js","sourceRoot":"","sources":["../../../../../../server/routers/api/restful-apis/v1/warehouse/get-draft-order-list.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAsB;AACtB,qCAAkG;AAElG,6CAAgE;AAEhE,2DAAwG;AAExG,gDAA4F;AAC5F,oDAAyF;AAEzF,sBAAM,CAAC,GAAG,CACR,oCAAoC,EACpC,gCAAkB,EAClB,kCAAoB,EACpB,+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,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,gBAAgB,CAAC,UAAU,EAAE;gBAC1E;oBACE,IAAI,EAAE,WAAW;oBACjB,QAAQ,EAAE,IAAI;oBACd,KAAK,EAAE,UAAU;iBAClB;aACF;SACF,EACD,OAAO,EACP,EAAE,CACH,CAAA;QACD,IAAI,eAAe,GAAG,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,KAAK,CAAC,IAAI,CAChD,CAAC,CAAC,EAAE,WAAC,OAAA,CAAC,CAAC,eAAe,KAAI,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,aAAa,0CAAE,EAAE,CAAA,IAAI,CAAC,CAAC,SAAS,KAAI,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,eAAe,CAAA,CAAA,EAAA,CAC1G,CAAA;QAED,OAAO,CAAC,MAAM,GAAG,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,WAAW;YAC3C,CAAC,CAAC,uCAA0B,CAAC,QAAQ;YACrC,CAAC,CAAC,CAAC,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,SAAS,KAAI,CAAC,CAAC,GAAG,YAAY,CAAC,UAAU;gBAC7D,CAAC,CAAC,uCAA0B,CAAC,YAAY;gBACzC,CAAC,CAAC,uCAA0B,CAAC,KAAK,CAAC,CAAA;IACvC,CAAC,CAAC,CAAA;IACF,OAAO,MAAM,CAAA;AACf,CAAC;AAvCD,gDAuCC"}
|
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.488",
|
|
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": "071cb2aa45495a75dc86ea9874d5b6ba744c10c5"
|
|
125
125
|
}
|
|
@@ -7,13 +7,14 @@ import { ApiError } from './error-util'
|
|
|
7
7
|
export function validateLimitOffset(limit, offset) {
|
|
8
8
|
if (!limit) limit = 100
|
|
9
9
|
limit = parseInt(limit)
|
|
10
|
-
if (isNaN(limit)) throw new ApiError('E01', 'limit')
|
|
11
|
-
if (limit >
|
|
10
|
+
if (isNaN(limit)) throw new ApiError('E01', 'limit is not a number')
|
|
11
|
+
if (limit > 200 || limit < 1) throw new ApiError('E01', 'limit cannot exceed 200')
|
|
12
|
+
if (limit < 1) throw new ApiError('E01', 'limit cannot less than 0')
|
|
12
13
|
|
|
13
14
|
if (!offset) offset = 0
|
|
14
15
|
offset = parseInt(offset)
|
|
15
|
-
if (isNaN(offset)) throw new ApiError('E01', 'offset')
|
|
16
|
-
if (offset < 0) throw new ApiError('E01', 'offset')
|
|
16
|
+
if (isNaN(offset)) throw new ApiError('E01', 'offset is not a number')
|
|
17
|
+
if (offset < 0) throw new ApiError('E01', 'offset cannot less than 0')
|
|
17
18
|
|
|
18
19
|
return { limit, offset }
|
|
19
20
|
}
|
|
@@ -7,7 +7,6 @@ import { DRAFT_RELEASE_ORDER_STATUS, DraftReleaseGood, InventoryUtil } from '@th
|
|
|
7
7
|
|
|
8
8
|
import { businessMiddleware, loggingMiddleware, validationMiddleware } from '../middlewares'
|
|
9
9
|
import { ApiError, ApiErrorHandler, throwInternalServerError } from '../utils/error-util'
|
|
10
|
-
import { companyRolesByScopeResolver } from 'server/graphql/resolvers/oauth2/company-roles-by-scope'
|
|
11
10
|
|
|
12
11
|
router.get(
|
|
13
12
|
'/v1/warehouse/get-draft-order-list',
|
|
@@ -58,8 +57,8 @@ router.get(
|
|
|
58
57
|
.leftJoinAndSelect('op.productDetail', 'pd')
|
|
59
58
|
.leftJoinAndSelect('op.productBundle', 'pb')
|
|
60
59
|
.orderBy('drg.createdAt', 'DESC')
|
|
61
|
-
.
|
|
62
|
-
.
|
|
60
|
+
.skip(offset)
|
|
61
|
+
.take(limit)
|
|
63
62
|
|
|
64
63
|
for (const key in filter) {
|
|
65
64
|
if (filter.hasOwnProperty(key)) {
|
|
@@ -78,80 +77,151 @@ router.get(
|
|
|
78
77
|
}
|
|
79
78
|
}
|
|
80
79
|
|
|
81
|
-
const draftReleaseGoods = await qb.
|
|
82
|
-
const totalCount = draftReleaseGoods.length
|
|
80
|
+
const [draftReleaseGoods, totalCount] = await qb.getManyAndCount()
|
|
81
|
+
// const totalCount = draftReleaseGoods.length
|
|
83
82
|
|
|
84
83
|
// create and format data response
|
|
85
84
|
let data = []
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
85
|
+
data = await Promise.all(
|
|
86
|
+
draftReleaseGoods.map(async draftReleaseGood => {
|
|
87
|
+
let orderProducts = []
|
|
88
|
+
for (const orderProduct of draftReleaseGood.orderProducts) {
|
|
89
|
+
const orderProductsDataPoint = {
|
|
90
|
+
product: {
|
|
91
|
+
sku: orderProduct?.productBundle ? orderProduct.productBundle?.sku : orderProduct?.product?.sku
|
|
92
|
+
},
|
|
93
|
+
productDetail: {
|
|
94
|
+
refCode: orderProduct.productDetail?.refCode
|
|
95
|
+
},
|
|
96
|
+
packingType: orderProduct.packingType,
|
|
97
|
+
releaseQty: orderProduct.releaseQty,
|
|
98
|
+
packingSize: orderProduct.packingSize,
|
|
99
|
+
status: await orderProductStatus(orderProduct, draftReleaseGood)
|
|
100
|
+
}
|
|
101
|
+
orderProducts.push(orderProductsDataPoint)
|
|
102
|
+
}
|
|
103
|
+
const datapoint = {
|
|
104
|
+
id: draftReleaseGood.id,
|
|
105
|
+
name: draftReleaseGood.name,
|
|
106
|
+
draftOrderNo: draftReleaseGood.draftOrderNo,
|
|
107
|
+
refNo: draftReleaseGood.refNo,
|
|
108
|
+
refNo2: draftReleaseGood.refNo2,
|
|
109
|
+
refNo3: draftReleaseGood.refNo3,
|
|
110
|
+
refOrderId: draftReleaseGood.refOrderId,
|
|
111
|
+
type: draftReleaseGood.type,
|
|
112
|
+
releaseDate: draftReleaseGood.releaseDate,
|
|
113
|
+
collectionOrderNo: draftReleaseGood.collectionOrderNo,
|
|
114
|
+
ownTransport: draftReleaseGood.ownTransport,
|
|
115
|
+
exportOption: draftReleaseGood.exportOption,
|
|
116
|
+
packingOption: draftReleaseGood.packingOption,
|
|
117
|
+
courierOption: draftReleaseGood.courierOption,
|
|
118
|
+
codOption: draftReleaseGood.codOption,
|
|
119
|
+
lmdOption: draftReleaseGood.lmdOption,
|
|
120
|
+
storeName: draftReleaseGood.storeName,
|
|
121
|
+
storeId: draftReleaseGood.storeId,
|
|
122
|
+
routeId: draftReleaseGood.routeId,
|
|
123
|
+
stopId: draftReleaseGood.stopId,
|
|
124
|
+
status: await draftReleaseGoodStatus(draftReleaseGood.bizplace.id, draftReleaseGood),
|
|
125
|
+
releaseGood: draftReleaseGood.releaseGood
|
|
126
|
+
? {
|
|
127
|
+
id: draftReleaseGood.releaseGood[0]?.id,
|
|
128
|
+
name: draftReleaseGood.releaseGood[0]?.name
|
|
129
|
+
}
|
|
130
|
+
: null,
|
|
131
|
+
billTo: {
|
|
132
|
+
billingAddress: draftReleaseGood.billingAddress
|
|
92
133
|
},
|
|
93
|
-
|
|
94
|
-
|
|
134
|
+
deliverTo: {
|
|
135
|
+
deliveryAddress1: draftReleaseGood.deliveryAddress1,
|
|
136
|
+
deliveryAddress2: draftReleaseGood.deliveryAddress2,
|
|
137
|
+
deliveryAddress3: draftReleaseGood.deliveryAddress3,
|
|
138
|
+
deliveryAddress4: draftReleaseGood.deliveryAddress4,
|
|
139
|
+
deliveryAddress5: draftReleaseGood.deliveryAddress5,
|
|
140
|
+
attentionTo: draftReleaseGood.attentionTo,
|
|
141
|
+
attentionCompany: draftReleaseGood.attentionCompany,
|
|
142
|
+
city: draftReleaseGood.city,
|
|
143
|
+
district: draftReleaseGood.district,
|
|
144
|
+
state: draftReleaseGood.state,
|
|
145
|
+
postalCode: draftReleaseGood.postalCode,
|
|
146
|
+
country: draftReleaseGood.country,
|
|
147
|
+
phone1: draftReleaseGood.phone1,
|
|
148
|
+
phone2: draftReleaseGood.phone2,
|
|
149
|
+
email: draftReleaseGood.email
|
|
95
150
|
},
|
|
96
|
-
|
|
97
|
-
releaseQty: orderProduct.releaseQty,
|
|
98
|
-
packingSize: orderProduct.packingSize,
|
|
99
|
-
status: await orderProductStatus(orderProduct, draftReleaseGood)
|
|
151
|
+
orderProducts
|
|
100
152
|
}
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
return datapoint
|
|
154
|
+
})
|
|
155
|
+
)
|
|
156
|
+
// for (const draftReleaseGood of draftReleaseGoods) {
|
|
157
|
+
// let orderProducts = []
|
|
158
|
+
// for (const orderProduct of draftReleaseGood.orderProducts) {
|
|
159
|
+
// const orderProductsDataPoint = {
|
|
160
|
+
// product: {
|
|
161
|
+
// sku: orderProduct?.productBundle ? orderProduct.productBundle?.sku : orderProduct?.product?.sku
|
|
162
|
+
// },
|
|
163
|
+
// productDetail: {
|
|
164
|
+
// refCode: orderProduct.productDetail?.refCode
|
|
165
|
+
// },
|
|
166
|
+
// packingType: orderProduct.packingType,
|
|
167
|
+
// releaseQty: orderProduct.releaseQty,
|
|
168
|
+
// packingSize: orderProduct.packingSize,
|
|
169
|
+
// status: await orderProductStatus(orderProduct, draftReleaseGood)
|
|
170
|
+
// }
|
|
171
|
+
// orderProducts.push(orderProductsDataPoint)
|
|
172
|
+
// }
|
|
173
|
+
// const datapoint = {
|
|
174
|
+
// id: draftReleaseGood.id,
|
|
175
|
+
// name: draftReleaseGood.name,
|
|
176
|
+
// draftOrderNo: draftReleaseGood.draftOrderNo,
|
|
177
|
+
// refNo: draftReleaseGood.refNo,
|
|
178
|
+
// refNo2: draftReleaseGood.refNo2,
|
|
179
|
+
// refNo3: draftReleaseGood.refNo3,
|
|
180
|
+
// refOrderId: draftReleaseGood.refOrderId,
|
|
181
|
+
// type: draftReleaseGood.type,
|
|
182
|
+
// releaseDate: draftReleaseGood.releaseDate,
|
|
183
|
+
// collectionOrderNo: draftReleaseGood.collectionOrderNo,
|
|
184
|
+
// ownTransport: draftReleaseGood.ownTransport,
|
|
185
|
+
// exportOption: draftReleaseGood.exportOption,
|
|
186
|
+
// packingOption: draftReleaseGood.packingOption,
|
|
187
|
+
// courierOption: draftReleaseGood.courierOption,
|
|
188
|
+
// codOption: draftReleaseGood.codOption,
|
|
189
|
+
// lmdOption: draftReleaseGood.lmdOption,
|
|
190
|
+
// storeName: draftReleaseGood.storeName,
|
|
191
|
+
// storeId: draftReleaseGood.storeId,
|
|
192
|
+
// routeId: draftReleaseGood.routeId,
|
|
193
|
+
// stopId: draftReleaseGood.stopId,
|
|
194
|
+
// status: await draftReleaseGoodStatus(draftReleaseGood.bizplace.id, draftReleaseGood),
|
|
195
|
+
// releaseGood: draftReleaseGood.releaseGood
|
|
196
|
+
// ? {
|
|
197
|
+
// id: draftReleaseGood.releaseGood[0]?.id,
|
|
198
|
+
// name: draftReleaseGood.releaseGood[0]?.name
|
|
199
|
+
// }
|
|
200
|
+
// : null,
|
|
201
|
+
// billTo: {
|
|
202
|
+
// billingAddress: draftReleaseGood.billingAddress
|
|
203
|
+
// },
|
|
204
|
+
// deliverTo: {
|
|
205
|
+
// deliveryAddress1: draftReleaseGood.deliveryAddress1,
|
|
206
|
+
// deliveryAddress2: draftReleaseGood.deliveryAddress2,
|
|
207
|
+
// deliveryAddress3: draftReleaseGood.deliveryAddress3,
|
|
208
|
+
// deliveryAddress4: draftReleaseGood.deliveryAddress4,
|
|
209
|
+
// deliveryAddress5: draftReleaseGood.deliveryAddress5,
|
|
210
|
+
// attentionTo: draftReleaseGood.attentionTo,
|
|
211
|
+
// attentionCompany: draftReleaseGood.attentionCompany,
|
|
212
|
+
// city: draftReleaseGood.city,
|
|
213
|
+
// district: draftReleaseGood.district,
|
|
214
|
+
// state: draftReleaseGood.state,
|
|
215
|
+
// postalCode: draftReleaseGood.postalCode,
|
|
216
|
+
// country: draftReleaseGood.country,
|
|
217
|
+
// phone1: draftReleaseGood.phone1,
|
|
218
|
+
// phone2: draftReleaseGood.phone2,
|
|
219
|
+
// email: draftReleaseGood.email
|
|
220
|
+
// },
|
|
221
|
+
// orderProducts
|
|
222
|
+
// }
|
|
223
|
+
// data.push(datapoint)
|
|
224
|
+
// }
|
|
155
225
|
context.body = {
|
|
156
226
|
data,
|
|
157
227
|
totalCount,
|