@things-factory/sales-base 4.3.66 → 4.3.70
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/controllers/order-controller.js +7 -5
- package/dist-server/controllers/order-controller.js.map +1 -1
- package/dist-server/service/arrival-notice/arrival-notice-mutation.js +35 -21
- package/dist-server/service/arrival-notice/arrival-notice-mutation.js.map +1 -1
- package/dist-server/service/delivery-order/delivery-order-mutation.js +32 -0
- package/dist-server/service/delivery-order/delivery-order-mutation.js.map +1 -1
- package/dist-server/service/delivery-order/delivery-order-query.js +0 -1
- package/dist-server/service/delivery-order/delivery-order-query.js.map +1 -1
- package/dist-server/service/release-good/release-good-mutation.js +28 -17
- package/dist-server/service/release-good/release-good-mutation.js.map +1 -1
- package/dist-server/service/return-order/return-order-mutation.js +28 -17
- package/dist-server/service/return-order/return-order-mutation.js.map +1 -1
- package/dist-server/service/vas-order/vas-order-mutation.js +14 -9
- package/dist-server/service/vas-order/vas-order-mutation.js.map +1 -1
- package/package.json +13 -13
- package/server/controllers/order-controller.ts +7 -4
- package/server/service/arrival-notice/arrival-notice-mutation.ts +42 -20
- package/server/service/delivery-order/delivery-order-mutation.ts +43 -9
- package/server/service/delivery-order/delivery-order-query.ts +16 -18
- package/server/service/release-good/release-good-mutation.ts +38 -21
- package/server/service/return-order/return-order-mutation.ts +32 -17
- package/server/service/vas-order/vas-order-mutation.ts +17 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-order-mutation.js","sourceRoot":"","sources":["../../../server/service/vas-order/vas-order-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAsE;AACtE,qCAA2C;AAE3C,yDAAsD;AACtD,uDAAmD;
|
|
1
|
+
{"version":3,"file":"vas-order-mutation.js","sourceRoot":"","sources":["../../../server/service/vas-order/vas-order-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAsE;AACtE,qCAA2C;AAE3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C,oBAAQ,CAAC;IAE3B,WAAA,IAAA,kBAAG,EAAC,MAAM,CAAC,CAAA;IACX,WAAA,IAAA,kBAAG,EAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,iBAAa,CAAC,CAAA;IACnC,WAAA,IAAA,kBAAG,GAAE,CAAA;;6CADsC,iBAAa;;sDAwE1D;AAjPU,gBAAgB;IAD5B,IAAA,uBAAQ,EAAC,oBAAQ,CAAC;GACN,gBAAgB,CAkP5B;AAlPY,4CAAgB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/sales-base",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.70",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -24,17 +24,17 @@
|
|
|
24
24
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@things-factory/attachment-base": "^4.3.
|
|
28
|
-
"@things-factory/auth-base": "^4.3.
|
|
29
|
-
"@things-factory/biz-base": "^4.3.
|
|
30
|
-
"@things-factory/code-base": "^4.3.
|
|
31
|
-
"@things-factory/integration-sftp": "^4.3.
|
|
32
|
-
"@things-factory/notification": "^4.3.
|
|
33
|
-
"@things-factory/product-base": "^4.3.
|
|
34
|
-
"@things-factory/setting-base": "^4.3.
|
|
35
|
-
"@things-factory/shell": "^4.3.
|
|
36
|
-
"@things-factory/transport-base": "^4.3.
|
|
37
|
-
"@things-factory/warehouse-base": "^4.3.
|
|
27
|
+
"@things-factory/attachment-base": "^4.3.69",
|
|
28
|
+
"@things-factory/auth-base": "^4.3.69",
|
|
29
|
+
"@things-factory/biz-base": "^4.3.69",
|
|
30
|
+
"@things-factory/code-base": "^4.3.69",
|
|
31
|
+
"@things-factory/integration-sftp": "^4.3.69",
|
|
32
|
+
"@things-factory/notification": "^4.3.69",
|
|
33
|
+
"@things-factory/product-base": "^4.3.69",
|
|
34
|
+
"@things-factory/setting-base": "^4.3.69",
|
|
35
|
+
"@things-factory/shell": "^4.3.69",
|
|
36
|
+
"@things-factory/transport-base": "^4.3.69",
|
|
37
|
+
"@things-factory/warehouse-base": "^4.3.69"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "635bb41ac43a80787b3d21812a1f44156037a6c5"
|
|
40
40
|
}
|
|
@@ -163,10 +163,13 @@ export class OrderController {
|
|
|
163
163
|
*/
|
|
164
164
|
async notifyToUsers(users: User[], message: NotificationMsgInterface): Promise<void> {
|
|
165
165
|
const receivers: any[] = users.map(user => user.id)
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
166
|
+
/**
|
|
167
|
+
* @notes Temporary off sendNotification due to suspect of causing wms down
|
|
168
|
+
*/
|
|
169
|
+
// await sendNotification({
|
|
170
|
+
// receivers,
|
|
171
|
+
// message
|
|
172
|
+
// })
|
|
170
173
|
}
|
|
171
174
|
|
|
172
175
|
/**
|
|
@@ -181,10 +181,14 @@ export class ArrivalNoticeMutation {
|
|
|
181
181
|
url: context.header.referer,
|
|
182
182
|
data: { url: context.header.referer }
|
|
183
183
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
184
|
+
/**
|
|
185
|
+
* @notes Temporary off sendNotification due to suspect of causing wms down
|
|
186
|
+
*/
|
|
187
|
+
|
|
188
|
+
// await sendNotification({
|
|
189
|
+
// receivers,
|
|
190
|
+
// message: { ...msg }
|
|
191
|
+
// })
|
|
188
192
|
}
|
|
189
193
|
|
|
190
194
|
return true
|
|
@@ -668,10 +672,14 @@ export async function confirmArrivalNoticeFunction(
|
|
|
668
672
|
data: { url: context.header.referer }
|
|
669
673
|
}
|
|
670
674
|
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
+
/**
|
|
676
|
+
* @notes Temporary off sendNotification due to suspect of causing wms down
|
|
677
|
+
*/
|
|
678
|
+
|
|
679
|
+
// await sendNotification({
|
|
680
|
+
// receivers,
|
|
681
|
+
// message: { ...msg }
|
|
682
|
+
// })
|
|
675
683
|
}
|
|
676
684
|
}
|
|
677
685
|
|
|
@@ -767,10 +775,15 @@ export async function receiveArrivalNoticeFunction(_: any, name: String, context
|
|
|
767
775
|
url: context.header.referer,
|
|
768
776
|
data: { url: context.header.referer }
|
|
769
777
|
}
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
778
|
+
|
|
779
|
+
/**
|
|
780
|
+
* @notes Temporary off sendNotification due to suspect of causing wms down
|
|
781
|
+
*/
|
|
782
|
+
|
|
783
|
+
// await sendNotification({
|
|
784
|
+
// receivers,
|
|
785
|
+
// message: { ...msg }
|
|
786
|
+
// })
|
|
774
787
|
}
|
|
775
788
|
|
|
776
789
|
// 4. Update status of arrival notice (PENDING_RECEIVE => INTRANSIT)
|
|
@@ -857,10 +870,15 @@ export async function checkArrivedNoticeFunction(
|
|
|
857
870
|
url: context.header.referer,
|
|
858
871
|
data: { url: context.header.referer }
|
|
859
872
|
}
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* @notes Temporary off sendNotification due to suspect of causing wms down
|
|
876
|
+
*/
|
|
877
|
+
|
|
878
|
+
// await sendNotification({
|
|
879
|
+
// receivers,
|
|
880
|
+
// message: { ...msg }
|
|
881
|
+
// })
|
|
864
882
|
}
|
|
865
883
|
|
|
866
884
|
return foundArrivalNotice
|
|
@@ -935,10 +953,14 @@ export async function rejectArrivalNotice(
|
|
|
935
953
|
data: { url: context.header.referer }
|
|
936
954
|
}
|
|
937
955
|
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
956
|
+
/**
|
|
957
|
+
* @notes Temporary off sendNotification due to suspect of causing wms down
|
|
958
|
+
*/
|
|
959
|
+
|
|
960
|
+
// await sendNotification({
|
|
961
|
+
// receivers,
|
|
962
|
+
// message: { ...msg }
|
|
963
|
+
// })
|
|
942
964
|
}
|
|
943
965
|
|
|
944
966
|
return foundArrivalNotice
|
|
@@ -207,6 +207,16 @@ export class DeliveryOrderMutation {
|
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
+
/**
|
|
211
|
+
* comment start
|
|
212
|
+
* detailed review needed 06 Aug 2022 by @ChrisLim-git
|
|
213
|
+
* @param context
|
|
214
|
+
* @param orderInfo
|
|
215
|
+
* @param orderItems
|
|
216
|
+
* @param shippingOrderInfo
|
|
217
|
+
* @param exportInfo
|
|
218
|
+
* @returns DeliveryOrder
|
|
219
|
+
*/
|
|
210
220
|
@Directive('@transaction')
|
|
211
221
|
@Mutation(returns => DeliveryOrder)
|
|
212
222
|
async dispatchDeliveryOrder(
|
|
@@ -250,16 +260,16 @@ export class DeliveryOrderMutation {
|
|
|
250
260
|
const product: Product = inventory.product
|
|
251
261
|
const foundItem = inventory.reusablePallet
|
|
252
262
|
? orderItems.filter(
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
263
|
+
(item: any) =>
|
|
264
|
+
item.productName === `${product.name} (${product.description})` &&
|
|
265
|
+
item.batchId === orderInventory.batchId &&
|
|
266
|
+
item.pallet === inventory.reusablePallet.name
|
|
267
|
+
)
|
|
258
268
|
: orderItems.filter(
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
269
|
+
(item: any) =>
|
|
270
|
+
item.productName === `${product.name} (${product.description})` &&
|
|
271
|
+
item.batchId === orderInventory.batchId
|
|
272
|
+
)
|
|
263
273
|
|
|
264
274
|
if (foundItem[0].remark !== '') orderInventory.remark = foundItem[0].remark
|
|
265
275
|
return orderInventory
|
|
@@ -316,6 +326,9 @@ export class DeliveryOrderMutation {
|
|
|
316
326
|
// save export option information
|
|
317
327
|
if (orderInfo?.exportOption) {
|
|
318
328
|
let savedShippingOrder: any = ''
|
|
329
|
+
/**
|
|
330
|
+
* Could potentially override important data
|
|
331
|
+
*/
|
|
319
332
|
if (foundReleaseGood.shippingOrder == null) {
|
|
320
333
|
savedShippingOrder = await tx.getRepository(ShippingOrder).save({
|
|
321
334
|
name: OrderNoGenerator.shippingOrder(),
|
|
@@ -330,6 +343,24 @@ export class DeliveryOrderMutation {
|
|
|
330
343
|
updater: user
|
|
331
344
|
})
|
|
332
345
|
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* @oscarchuaweiwen-fsd
|
|
349
|
+
* I think the expectation here is to update instead of save
|
|
350
|
+
* Should use .update instead of .save as it will override data that was not meant to be updated
|
|
351
|
+
* example:
|
|
352
|
+
*
|
|
353
|
+
* savedShippingOrder = await tx.getRepository(ShippingOrder).update({
|
|
354
|
+
* shipName: exportInfo.shipName,
|
|
355
|
+
* containerNo: exportInfo.containerNo,
|
|
356
|
+
* containerArrivalDate: exportInfo.containerArrivalDate,
|
|
357
|
+
* containerLeavingDate: exportInfo.containerLeavingDate,
|
|
358
|
+
* status: ORDER_STATUS.PENDING,
|
|
359
|
+
* updater: user
|
|
360
|
+
* })
|
|
361
|
+
*
|
|
362
|
+
* Unless the intention was not to update but to insert
|
|
363
|
+
*/
|
|
333
364
|
savedShippingOrder = await tx.getRepository(ShippingOrder).save({
|
|
334
365
|
...foundReleaseGood.shippingOrder,
|
|
335
366
|
name: OrderNoGenerator.shippingOrder(),
|
|
@@ -343,6 +374,8 @@ export class DeliveryOrderMutation {
|
|
|
343
374
|
creator: user,
|
|
344
375
|
updater: user
|
|
345
376
|
})
|
|
377
|
+
/** */
|
|
378
|
+
|
|
346
379
|
exportInfo = savedShippingOrder
|
|
347
380
|
foundReleaseGood.exportOption = true
|
|
348
381
|
} else {
|
|
@@ -393,6 +426,7 @@ export class DeliveryOrderMutation {
|
|
|
393
426
|
throw e
|
|
394
427
|
}
|
|
395
428
|
}
|
|
429
|
+
/** */
|
|
396
430
|
|
|
397
431
|
@Directive('@transaction')
|
|
398
432
|
@Mutation(returns => DeliveryOrder)
|
|
@@ -143,8 +143,8 @@ export class DeliveryOrderQuery {
|
|
|
143
143
|
[arrChildSortData.indexOf(sort.name) >= 0
|
|
144
144
|
? 'releaseGood.' + sort.name
|
|
145
145
|
: arrNameSortData.indexOf(sort.name) >= 0
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
? sort.name + '.name'
|
|
147
|
+
: 'do.' + sort.name]: sort.desc ? 'DESC' : 'ASC'
|
|
148
148
|
}),
|
|
149
149
|
params.sortings.length < 1 ? { rank: 'ASC', 'do.createdAt': 'DESC' } : {}
|
|
150
150
|
)
|
|
@@ -152,8 +152,6 @@ export class DeliveryOrderQuery {
|
|
|
152
152
|
qb.orderBy(sort)
|
|
153
153
|
|
|
154
154
|
let [items, total] = await qb.getManyAndCount()
|
|
155
|
-
|
|
156
|
-
console.time('orderProductsApiFilter')
|
|
157
155
|
if (orderProductsApiFilter?.value) {
|
|
158
156
|
items = await Promise.all(
|
|
159
157
|
items.map(async itm => {
|
|
@@ -323,12 +321,12 @@ export class DeliveryOrderQuery {
|
|
|
323
321
|
systemRemark: prod?.remark
|
|
324
322
|
? prod.remark
|
|
325
323
|
: prod.crossDocking
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
324
|
+
? prod.pallet === ''
|
|
325
|
+
? `${prod.palletQty} PALLET(S) [C/D]`
|
|
326
|
+
: `${prod.palletQty} PALLET(S) (${prod.pallet}) [C/D]`
|
|
327
|
+
: prod.pallet === ''
|
|
328
|
+
? `${prod.palletQty} PALLET(S)`
|
|
329
|
+
: `${prod.palletQty} PALLET(S) (${prod.pallet})`
|
|
332
330
|
}
|
|
333
331
|
})
|
|
334
332
|
|
|
@@ -415,12 +413,12 @@ export class DeliveryOrderQuery {
|
|
|
415
413
|
systemRemark: prod?.remark
|
|
416
414
|
? prod.remark
|
|
417
415
|
: prod.crossDocking
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
416
|
+
? prod.pallet === ''
|
|
417
|
+
? `${prod.palletQty} PALLET(S) [C/D]`
|
|
418
|
+
: `${prod.palletQty} PALLET(S) (${prod.pallet}) [C/D]`
|
|
419
|
+
: prod.pallet === ''
|
|
420
|
+
? `${prod.palletQty} PALLET(S)`
|
|
421
|
+
: `${prod.palletQty} PALLET(S) (${prod.pallet})`
|
|
424
422
|
}
|
|
425
423
|
})
|
|
426
424
|
|
|
@@ -548,8 +546,8 @@ export class DeliveryOrderQuery {
|
|
|
548
546
|
[arrChildSortData.indexOf(sort.name) >= 0
|
|
549
547
|
? 'releaseGood.' + sort.name
|
|
550
548
|
: arrNameSortData.indexOf(sort.name) >= 0
|
|
551
|
-
|
|
552
|
-
|
|
549
|
+
? sort.name + '.name'
|
|
550
|
+
: 'do.' + sort.name]: sort.desc ? 'DESC' : 'ASC'
|
|
553
551
|
}),
|
|
554
552
|
params.sortings.length < 1 ? { rank: 'ASC', 'do.createdAt': 'DESC' } : {}
|
|
555
553
|
)
|
|
@@ -136,7 +136,7 @@ export class ReleaseGoodMutation {
|
|
|
136
136
|
context,
|
|
137
137
|
tx
|
|
138
138
|
)
|
|
139
|
-
} catch (error) {
|
|
139
|
+
} catch (error) {}
|
|
140
140
|
|
|
141
141
|
if (errorsCaught.length)
|
|
142
142
|
throw new ValidationError({
|
|
@@ -624,8 +624,8 @@ export async function generateReleaseGoodFunction(
|
|
|
624
624
|
orderMethod: releaseGood?.orderMethod
|
|
625
625
|
? releaseGood.orderMethod
|
|
626
626
|
: releaseGood.orderInventories[0]?.inventory?.id
|
|
627
|
-
|
|
628
|
-
|
|
627
|
+
? ORDER_METHOD.SELECT_BY_PALLET
|
|
628
|
+
: ORDER_METHOD.SELECT_BY_PRODUCT,
|
|
629
629
|
status: ORDER_STATUS.PENDING,
|
|
630
630
|
packageId: releaseGood?.packageId,
|
|
631
631
|
storeName: releaseGood?.storeName,
|
|
@@ -1026,10 +1026,15 @@ export async function confirmReleaseGood(name: string, context: any, tx?: Entity
|
|
|
1026
1026
|
url: context.header.referer,
|
|
1027
1027
|
data: { url: context.header.referer }
|
|
1028
1028
|
}
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1029
|
+
|
|
1030
|
+
/**
|
|
1031
|
+
* @notes Temporary off sendNotification due to suspect of causing wms down
|
|
1032
|
+
*/
|
|
1033
|
+
|
|
1034
|
+
// await sendNotification({
|
|
1035
|
+
// receivers,
|
|
1036
|
+
// message: { ...msg }
|
|
1037
|
+
// })
|
|
1033
1038
|
}
|
|
1034
1039
|
}
|
|
1035
1040
|
|
|
@@ -1109,10 +1114,14 @@ export async function receiveReleaseGood(name: string, context: any, tx: EntityM
|
|
|
1109
1114
|
data: { url: context.header.referer }
|
|
1110
1115
|
}
|
|
1111
1116
|
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1117
|
+
/**
|
|
1118
|
+
* @notes Temporary off sendNotification due to suspect of causing wms down
|
|
1119
|
+
*/
|
|
1120
|
+
|
|
1121
|
+
// await sendNotification({
|
|
1122
|
+
// receivers,
|
|
1123
|
+
// message: { ...msg }
|
|
1124
|
+
// })
|
|
1116
1125
|
}
|
|
1117
1126
|
}
|
|
1118
1127
|
|
|
@@ -1232,10 +1241,14 @@ export async function rejectReleaseGood(
|
|
|
1232
1241
|
data: { url: context.header.referer }
|
|
1233
1242
|
}
|
|
1234
1243
|
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1244
|
+
/**
|
|
1245
|
+
* @notes Temporary off sendNotification due to suspect of causing wms down
|
|
1246
|
+
*/
|
|
1247
|
+
|
|
1248
|
+
// await sendNotification({
|
|
1249
|
+
// receivers,
|
|
1250
|
+
// message: { ...msg }
|
|
1251
|
+
// })
|
|
1239
1252
|
}
|
|
1240
1253
|
|
|
1241
1254
|
return releaseGood
|
|
@@ -1247,7 +1260,7 @@ export async function bulkGenerateReleaseGood(
|
|
|
1247
1260
|
roNoSetting: any,
|
|
1248
1261
|
domain: Domain,
|
|
1249
1262
|
user: User,
|
|
1250
|
-
tx?: EntityManager
|
|
1263
|
+
tx?: EntityManager
|
|
1251
1264
|
): Promise<ReleaseGood> {
|
|
1252
1265
|
try {
|
|
1253
1266
|
let warehouseDomain: Domain = domain
|
|
@@ -1288,7 +1301,6 @@ export async function bulkGenerateReleaseGood(
|
|
|
1288
1301
|
|
|
1289
1302
|
newReleaseGood = await tx.getRepository(ReleaseGood).save(newReleaseGood)
|
|
1290
1303
|
|
|
1291
|
-
|
|
1292
1304
|
/** Generate Shipping Order */
|
|
1293
1305
|
if (shippingOrder) {
|
|
1294
1306
|
shippingOrder.remark = shippingOrder.exportRemark
|
|
@@ -1466,10 +1478,15 @@ export async function bulkConfirmReleaseGoods(
|
|
|
1466
1478
|
url: context.header.referer,
|
|
1467
1479
|
data: { url: context.header.referer }
|
|
1468
1480
|
}
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1481
|
+
|
|
1482
|
+
/**
|
|
1483
|
+
* @notes Temporary off sendNotification due to suspect of causing wms down
|
|
1484
|
+
*/
|
|
1485
|
+
|
|
1486
|
+
// await sendNotification({
|
|
1487
|
+
// receivers,
|
|
1488
|
+
// message
|
|
1489
|
+
// })
|
|
1473
1490
|
}
|
|
1474
1491
|
}
|
|
1475
1492
|
|
|
@@ -284,11 +284,14 @@ export async function confirmReturnOrder(tx: EntityManager, name: string, contex
|
|
|
284
284
|
url: context.header.referer,
|
|
285
285
|
data: { url: context.header.referer }
|
|
286
286
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
287
|
+
/**
|
|
288
|
+
* @notes Temporary off sendNotification due to suspect of causing wms down
|
|
289
|
+
*/
|
|
290
|
+
|
|
291
|
+
// await sendNotification({
|
|
292
|
+
// receivers,
|
|
293
|
+
// message: { ...msg }
|
|
294
|
+
// })
|
|
292
295
|
}
|
|
293
296
|
|
|
294
297
|
return returnOrder
|
|
@@ -349,10 +352,14 @@ export async function receiveReturnOrder(tx: EntityManager, name: string, contex
|
|
|
349
352
|
data: { url: context.header.referer }
|
|
350
353
|
}
|
|
351
354
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
355
|
+
/**
|
|
356
|
+
* @notes Temporary off sendNotification due to suspect of causing wms down
|
|
357
|
+
*/
|
|
358
|
+
|
|
359
|
+
// await sendNotification({
|
|
360
|
+
// receivers,
|
|
361
|
+
// message: { ...msg }
|
|
362
|
+
// })
|
|
356
363
|
}
|
|
357
364
|
|
|
358
365
|
return returnOrder
|
|
@@ -416,10 +423,14 @@ export async function rejectReturnOrder(
|
|
|
416
423
|
data: { url: context.header.referer }
|
|
417
424
|
}
|
|
418
425
|
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
426
|
+
/**
|
|
427
|
+
* @notes Temporary off sendNotification due to suspect of causing wms down
|
|
428
|
+
*/
|
|
429
|
+
|
|
430
|
+
// await sendNotification({
|
|
431
|
+
// receivers,
|
|
432
|
+
// message: { ...msg }
|
|
433
|
+
// })
|
|
423
434
|
}
|
|
424
435
|
|
|
425
436
|
return foundReturnOrder
|
|
@@ -476,10 +487,14 @@ export async function checkReturnOrder(tx: EntityManager, name: string, context:
|
|
|
476
487
|
data: { url: context.header.referer }
|
|
477
488
|
}
|
|
478
489
|
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
490
|
+
/**
|
|
491
|
+
* @notes Temporary off sendNotification due to suspect of causing wms down
|
|
492
|
+
*/
|
|
493
|
+
|
|
494
|
+
// await sendNotification({
|
|
495
|
+
// receivers,
|
|
496
|
+
// message: { ...msg }
|
|
497
|
+
// })
|
|
483
498
|
}
|
|
484
499
|
|
|
485
500
|
return foundReturnOrder
|
|
@@ -164,10 +164,15 @@ export class VasOrderMutation {
|
|
|
164
164
|
url: context.header.referer,
|
|
165
165
|
data: { url: context.header.referer }
|
|
166
166
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* @notes Temporary off sendNotification due to suspect of causing wms down
|
|
170
|
+
*/
|
|
171
|
+
|
|
172
|
+
// await sendNotification({
|
|
173
|
+
// receivers,
|
|
174
|
+
// message: { ...msg }
|
|
175
|
+
// })
|
|
171
176
|
}
|
|
172
177
|
|
|
173
178
|
return vasOrder
|
|
@@ -235,10 +240,14 @@ export class VasOrderMutation {
|
|
|
235
240
|
data: { url: context.header.referer }
|
|
236
241
|
}
|
|
237
242
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
243
|
+
/**
|
|
244
|
+
* @notes Temporary off sendNotification due to suspect of causing wms down
|
|
245
|
+
*/
|
|
246
|
+
|
|
247
|
+
// await sendNotification({
|
|
248
|
+
// receivers,
|
|
249
|
+
// message: { ...msg }
|
|
250
|
+
// })
|
|
242
251
|
}
|
|
243
252
|
|
|
244
253
|
return vasOrder
|