@things-factory/worksheet-base 4.3.545 → 4.3.546
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.setOrderVasStatus = exports.completeVAS = exports.completeVasResolver = void 0;
|
|
4
|
-
const sales_base_1 = require("@things-factory/sales-base");
|
|
5
4
|
const typeorm_1 = require("typeorm");
|
|
5
|
+
const sales_base_1 = require("@things-factory/sales-base");
|
|
6
6
|
const constants_1 = require("../../../../constants");
|
|
7
7
|
const controllers_1 = require("../../../../controllers");
|
|
8
8
|
const entities_1 = require("../../../../entities");
|
|
@@ -61,20 +61,22 @@ async function setOrderVasStatus(tx, domain, user, orderNo) {
|
|
|
61
61
|
releaseGood: releaseGood
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
|
-
// Update the status of each OrderVas to
|
|
64
|
+
// Update the status of each OrderVas to DONE
|
|
65
65
|
for (const orderVas of orderVasList) {
|
|
66
|
-
orderVas.
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
await orderVasRepo.update({ id: orderVas.id }, {
|
|
67
|
+
status: sales_base_1.ORDER_VAS_STATUS.DONE,
|
|
68
|
+
updater: user
|
|
69
|
+
});
|
|
69
70
|
// Find and update OrderVasItems
|
|
70
71
|
const orderVasItems = await orderVasItemRepo.find({
|
|
71
72
|
where: { orderVas: orderVas }
|
|
72
73
|
});
|
|
73
74
|
for (const item of orderVasItems) {
|
|
74
75
|
if (item.executedAt === null) {
|
|
75
|
-
item.
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
await orderVasItemRepo.update({ id: item.id }, {
|
|
77
|
+
executedAt: orderVas.updatedAt,
|
|
78
|
+
updater: user
|
|
79
|
+
});
|
|
78
80
|
}
|
|
79
81
|
}
|
|
80
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"complete-vas.js","sourceRoot":"","sources":["../../../../../server/graphql/resolvers/worksheet/vas/complete-vas.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"complete-vas.js","sourceRoot":"","sources":["../../../../../server/graphql/resolvers/worksheet/vas/complete-vas.ts"],"names":[],"mappings":";;;AAAA,qCAIgB;AAGhB,2DAMmC;AAGnC,qDAAsD;AACtD,yDAIgC;AAChC,mDAG6B;AAEhB,QAAA,mBAAmB,GAAG;IACjC,KAAK,CAAC,WAAW,CAAC,CAAM,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,OAAY;QAC9E,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,GAAsD,OAAO,CAAC,KAAK,CAAA;QAC7F,IAAI,CAAC,gBAAgB,EAAE;YACrB,MAAM,WAAW,GAAgB,MAAM,IAAA,uBAAa,EAAC,wBAAW,CAAC,CAAC,OAAO,CAAC;gBACxE,MAAM,EAAE,MAAM,CAAC,EAAE;gBACjB,IAAI,EAAE,OAAO;aACd,CAAC,CAAA;YACF,MAAM,SAAS,GAAgB,MAAM,IAAA,uBAAa,EAAC,oBAAS,CAAC,CAAC,IAAI,CAAC;gBACjE,MAAM,EAAE,MAAM,CAAC,EAAE;gBACjB,WAAW,EAAE,WAAW,CAAC,EAAE;gBAC3B,IAAI,EAAE,0BAAc,CAAC,GAAG;aACzB,CAAC,CAAA;YACF,MAAM,WAAW,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;gBACpC,OAAO,CAAC,CAAC,EAAE,CAAA;YACb,CAAC,CAAC,CAAA;YACF,gBAAgB,GAAG,MAAM,IAAA,uBAAa,EAAC,0BAAe,CAAC,CAAC,IAAI,CAAC;gBAC3D,MAAM,EAAE,MAAM,CAAC,EAAE;gBACjB,SAAS,EAAE,IAAA,YAAE,EAAC,WAAW,CAAC;aAC3B,CAAC,CAAA;SACH;QACD,MAAM,WAAW,CAAC,EAAE,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AAmB,GAA+B,IAAI,wCAA0B,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;IACxG,MAAM,SAAS,GAAc,MAAM,mBAAmB,CAAC,uBAAuB,CAAC,WAAW,EAAE,0BAAc,CAAC,OAAO,CAAC,CAAA;IACnH,MAAM,WAAW,GAAW,SAAS,CAAC,IAAI,CAAA;IAC1C,MAAM,uBAAuB,GAAsB,SAAS,CAAC,gBAAgB,CAAA;IAC7E,MAAM,mBAAmB,CAAC,eAAe,CAAC,WAAW,EAAE,uBAAuB,CAAC,CAAA;AACjF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/worksheet-base",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.546",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@things-factory/integration-sftp": "^4.3.544",
|
|
37
37
|
"@things-factory/marketplace-base": "^4.3.544",
|
|
38
38
|
"@things-factory/notification": "^4.3.535",
|
|
39
|
-
"@things-factory/sales-base": "^4.3.
|
|
39
|
+
"@things-factory/sales-base": "^4.3.546",
|
|
40
40
|
"@things-factory/setting-base": "^4.3.535",
|
|
41
41
|
"@things-factory/shell": "^4.3.535",
|
|
42
42
|
"@things-factory/transport-base": "^4.3.535",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"puppeteer": "21.0.3",
|
|
46
46
|
"uuid": "^9.0.0"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "c4bbae287b5f38f125b5c9f0337ac30ffafac94c"
|
|
49
49
|
}
|
|
@@ -1,10 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EntityManager,
|
|
3
|
+
getRepository,
|
|
4
|
+
In
|
|
5
|
+
} from 'typeorm'
|
|
6
|
+
|
|
1
7
|
import { User } from '@things-factory/auth-base'
|
|
2
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
ArrivalNotice,
|
|
10
|
+
ORDER_VAS_STATUS,
|
|
11
|
+
OrderVas,
|
|
12
|
+
OrderVasItem,
|
|
13
|
+
ReleaseGood
|
|
14
|
+
} from '@things-factory/sales-base'
|
|
3
15
|
import { Domain } from '@things-factory/shell'
|
|
4
|
-
|
|
16
|
+
|
|
5
17
|
import { WORKSHEET_TYPE } from '../../../../constants'
|
|
6
|
-
import {
|
|
7
|
-
|
|
18
|
+
import {
|
|
19
|
+
LoadingWorksheetController,
|
|
20
|
+
PutawayWorksheetController,
|
|
21
|
+
VasWorksheetController
|
|
22
|
+
} from '../../../../controllers'
|
|
23
|
+
import {
|
|
24
|
+
Worksheet,
|
|
25
|
+
WorksheetDetail
|
|
26
|
+
} from '../../../../entities'
|
|
8
27
|
|
|
9
28
|
export const completeVasResolver = {
|
|
10
29
|
async completeVas(_: any, { orderNo, orderType, worksheetDetails }, context: any) {
|
|
@@ -84,11 +103,15 @@ export async function setOrderVasStatus(tx: EntityManager, domain: Domain, user:
|
|
|
84
103
|
}
|
|
85
104
|
})
|
|
86
105
|
|
|
87
|
-
// Update the status of each OrderVas to
|
|
106
|
+
// Update the status of each OrderVas to DONE
|
|
88
107
|
for (const orderVas of orderVasList) {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
108
|
+
await orderVasRepo.update(
|
|
109
|
+
{ id: orderVas.id },
|
|
110
|
+
{
|
|
111
|
+
status: ORDER_VAS_STATUS.DONE,
|
|
112
|
+
updater: user
|
|
113
|
+
}
|
|
114
|
+
)
|
|
92
115
|
|
|
93
116
|
// Find and update OrderVasItems
|
|
94
117
|
const orderVasItems = await orderVasItemRepo.find({
|
|
@@ -97,9 +120,13 @@ export async function setOrderVasStatus(tx: EntityManager, domain: Domain, user:
|
|
|
97
120
|
|
|
98
121
|
for (const item of orderVasItems) {
|
|
99
122
|
if (item.executedAt === null) {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
123
|
+
await orderVasItemRepo.update(
|
|
124
|
+
{ id: item.id },
|
|
125
|
+
{
|
|
126
|
+
executedAt: orderVas.updatedAt,
|
|
127
|
+
updater: user
|
|
128
|
+
}
|
|
129
|
+
)
|
|
103
130
|
}
|
|
104
131
|
}
|
|
105
132
|
}
|