@things-factory/operato-hub 4.3.412 → 4.3.414
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.
|
@@ -55,29 +55,76 @@ exports.shortageReport = {
|
|
|
55
55
|
if (!bizplaceFilter || !fromDate || !toDate)
|
|
56
56
|
throw 'Invalid input';
|
|
57
57
|
await tx.query(`
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
58
|
+
CREATE TEMP TABLE shortage_report ON COMMIT DROP AS (
|
|
59
|
+
SELECT
|
|
60
|
+
b."name" AS "company",
|
|
61
|
+
drg.name AS "order_no",
|
|
62
|
+
drg.ref_no,
|
|
63
|
+
p.sku AS "product_sku",
|
|
64
|
+
p."name" AS "product_name",
|
|
65
|
+
op.release_qty AS "order_quantity",
|
|
66
|
+
COALESCE(src.av_qty, 0) AS available_qty,
|
|
67
|
+
COALESCE(src.av_qty, 0) - op.release_qty AS "Nett_Stock",
|
|
68
|
+
CONCAT(
|
|
69
|
+
drg.delivery_address_1, ' ',
|
|
70
|
+
drg.delivery_address_2, ' ',
|
|
71
|
+
drg.delivery_address_3, ' ',
|
|
72
|
+
drg.delivery_address_4, ' ',
|
|
73
|
+
drg.delivery_address_5
|
|
74
|
+
) AS "delivery_address",
|
|
75
|
+
drg.state,
|
|
76
|
+
drg.city,
|
|
77
|
+
drg.country,
|
|
78
|
+
drg.created_at
|
|
79
|
+
FROM
|
|
80
|
+
draft_release_goods drg
|
|
81
|
+
INNER JOIN
|
|
82
|
+
bizplaces b ON b.id = drg.bizplace_id
|
|
83
|
+
INNER JOIN
|
|
84
|
+
order_products op ON op.draft_release_good_id = drg.id
|
|
85
|
+
INNER JOIN
|
|
86
|
+
products p ON p.id = op.product_id
|
|
87
|
+
INNER JOIN
|
|
88
|
+
product_details pd ON pd.id = op.product_detail_id
|
|
89
|
+
LEFT JOIN (
|
|
90
|
+
SELECT
|
|
91
|
+
i.domain_id AS "domain_id",
|
|
92
|
+
i.bizplace_id AS "bizplace_id",
|
|
93
|
+
i.product_id AS "product_id",
|
|
94
|
+
i.product_detail_id AS "product_detail_id",
|
|
95
|
+
COALESCE(SUM(COALESCE(i.qty, 0)) - SUM(COALESCE(i.locked_qty, 0))) AS "av_qty"
|
|
96
|
+
FROM
|
|
97
|
+
inventories i
|
|
98
|
+
INNER JOIN
|
|
99
|
+
locations l2 ON i.location_id = l2.id AND i.domain_id = l2.domain_id AND l2.type NOT IN ('QUARANTINE', 'RESERVE', 'DAMAGE')
|
|
100
|
+
INNER JOIN
|
|
101
|
+
products p ON p.id = i.product_id
|
|
102
|
+
INNER JOIN
|
|
103
|
+
product_details pd ON pd.id = i.product_detail_id
|
|
104
|
+
WHERE
|
|
105
|
+
i.status = 'STORED'
|
|
106
|
+
AND i.obsolete IS FALSE
|
|
107
|
+
AND i.domain_id = $1
|
|
108
|
+
AND i.bizplace_id = '${bizplace.value}'
|
|
109
|
+
GROUP BY
|
|
110
|
+
i.domain_id,
|
|
111
|
+
i.bizplace_id,
|
|
112
|
+
i.product_id,
|
|
113
|
+
i.product_detail_id
|
|
114
|
+
) src ON op.product_id = src.product_id AND op.product_detail_id = src.product_detail_id
|
|
115
|
+
WHERE
|
|
116
|
+
drg.status = 'DRAFT'
|
|
117
|
+
AND drg.domain_id = $1
|
|
118
|
+
AND COALESCE(src.av_qty - op.release_qty, 0) <= 0
|
|
119
|
+
AND op.release_qty != COALESCE(src.av_qty, 0)
|
|
120
|
+
AND drg.created_at >= $2
|
|
121
|
+
AND drg.created_at <= $3
|
|
122
|
+
${roFilter}
|
|
123
|
+
${queryFilter}
|
|
124
|
+
ORDER BY
|
|
125
|
+
drg.created_at DESC
|
|
126
|
+
)
|
|
127
|
+
`, [context.state.domain.id, fromDate.value, toDate.value]);
|
|
81
128
|
const total = await tx.query(`
|
|
82
129
|
select count(*) from shortage_report
|
|
83
130
|
`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shortage-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/shortage-report.ts"],"names":[],"mappings":";;;AAIa,QAAA,cAAc,GAAG;
|
|
1
|
+
{"version":3,"file":"shortage-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/shortage-report.ts"],"names":[],"mappings":";;;AAIa,QAAA,cAAc,GAAG;IAC5B,KAAK,CAAC,cAAc,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QAC1D,IAAI;YACF,MAAM,EAAE,EAAE,EAAE,GAA0B,OAAO,CAAC,KAAK,CAAA;YACnD,IAAI,cAAc,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAA;YAC1D,IAAI,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,OAAO,CAAC,CAAA;YAChE,IAAI,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,UAAU,CAAC,CAAA;YACtE,IAAI,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAA;YAClE,IAAI,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,CAAA;YACpE,IAAI,OAAO,GAAG,MAAM,CAAC,OAA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BACd,OAAO,EAAE,GAAG,CAAC,OAAO;oBACpB,SAAS,EAAE,GAAG,CAAC,UAAU;iBAC1B,CAAA;YACH,CAAC,CAAC,CAAA;YAEF,OAAO;gBACL,KAAK;gBACL,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK;aACtB,CAAA;SACF;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CACF,CAAA"}
|
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.414",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -79,20 +79,20 @@
|
|
|
79
79
|
"@things-factory/import-ui-excel": "^4.3.381",
|
|
80
80
|
"@things-factory/integration-accounting": "^4.3.411",
|
|
81
81
|
"@things-factory/integration-fulfillment": "^4.3.411",
|
|
82
|
-
"@things-factory/integration-lmd": "^4.3.
|
|
83
|
-
"@things-factory/integration-marketplace": "^4.3.
|
|
82
|
+
"@things-factory/integration-lmd": "^4.3.414",
|
|
83
|
+
"@things-factory/integration-marketplace": "^4.3.414",
|
|
84
84
|
"@things-factory/integration-pos": "^4.3.411",
|
|
85
|
-
"@things-factory/integration-powrup": "^4.3.
|
|
86
|
-
"@things-factory/integration-sellercraft": "^4.3.
|
|
85
|
+
"@things-factory/integration-powrup": "^4.3.414",
|
|
86
|
+
"@things-factory/integration-sellercraft": "^4.3.414",
|
|
87
87
|
"@things-factory/integration-sftp": "^4.3.411",
|
|
88
88
|
"@things-factory/lite-menu": "^4.3.381",
|
|
89
|
-
"@things-factory/marketplace-base": "^4.3.
|
|
89
|
+
"@things-factory/marketplace-base": "^4.3.414",
|
|
90
90
|
"@things-factory/more-ui": "^4.3.381",
|
|
91
91
|
"@things-factory/notification": "^4.3.381",
|
|
92
92
|
"@things-factory/pdf": "^4.3.381",
|
|
93
|
-
"@things-factory/product-ui": "^4.3.
|
|
93
|
+
"@things-factory/product-ui": "^4.3.413",
|
|
94
94
|
"@things-factory/resource-ui": "^4.3.381",
|
|
95
|
-
"@things-factory/sales-base": "^4.3.
|
|
95
|
+
"@things-factory/sales-base": "^4.3.414",
|
|
96
96
|
"@things-factory/scene-data-transform": "^4.3.381",
|
|
97
97
|
"@things-factory/scene-excel": "^4.3.381",
|
|
98
98
|
"@things-factory/scene-firebase": "^4.3.381",
|
|
@@ -108,8 +108,8 @@
|
|
|
108
108
|
"@things-factory/shell": "^4.3.381",
|
|
109
109
|
"@things-factory/system-ui": "^4.3.381",
|
|
110
110
|
"@things-factory/transport-base": "^4.3.381",
|
|
111
|
-
"@things-factory/warehouse-base": "^4.3.
|
|
112
|
-
"@things-factory/worksheet-base": "^4.3.
|
|
111
|
+
"@things-factory/warehouse-base": "^4.3.414",
|
|
112
|
+
"@things-factory/worksheet-base": "^4.3.414",
|
|
113
113
|
"cron-parser": "^4.7.0",
|
|
114
114
|
"koa2-swagger-ui": "^5.0.2",
|
|
115
115
|
"swagger-jsdoc": "^5.0.0",
|
|
@@ -121,5 +121,5 @@
|
|
|
121
121
|
"resolutions": {
|
|
122
122
|
"core-js": "^3.16.0"
|
|
123
123
|
},
|
|
124
|
-
"gitHead": "
|
|
124
|
+
"gitHead": "3badbd3b0ba661e42abed08751fd1ff68d0bddfb"
|
|
125
125
|
}
|
|
@@ -3,31 +3,31 @@ import { EntityManager } from 'typeorm'
|
|
|
3
3
|
import { ListParam } from '@things-factory/shell'
|
|
4
4
|
|
|
5
5
|
export const shortageReport = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
6
|
+
async shortageReport(_: any, params: ListParam, context: any) {
|
|
7
|
+
try {
|
|
8
|
+
const { tx }: { tx: EntityManager } = context.state
|
|
9
|
+
let bizplaceFilter = { name: '', operator: '', value: '' }
|
|
10
|
+
let order = params.filters.find(items => items.name === 'order')
|
|
11
|
+
let fromDate = params.filters.find(items => items.name === 'fromDate')
|
|
12
|
+
let toDate = params.filters.find(items => items.name === 'toDate')
|
|
13
|
+
let orderNo = params.filters.find(items => items.name === 'orderNo')
|
|
14
|
+
let product = params.filters.find(items => items.name === 'product')
|
|
15
|
+
let bizplace = params.filters.find(items => items.name === 'bizplace')
|
|
16
|
+
|
|
17
|
+
if (!bizplace) throw 'Invalid input'
|
|
18
|
+
|
|
19
|
+
let roFilter = '',
|
|
20
20
|
queryFilter = ''
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
if (product) {
|
|
23
|
+
let productInfoValue = product.value
|
|
24
|
+
.toLowerCase()
|
|
25
|
+
.split(',')
|
|
26
|
+
.map(prod => {
|
|
27
|
+
return "'%" + prod.trim().replace(/'/g, "''") + "%'"
|
|
28
|
+
})
|
|
29
|
+
.join(',')
|
|
30
|
+
|
|
31
31
|
roFilter += `AND (
|
|
32
32
|
Lower(drg.name) LIKE ANY(ARRAY[${productInfoValue}])
|
|
33
33
|
OR Lower(p.sku) LIKE ANY(ARRAY[${productInfoValue}])
|
|
@@ -40,14 +40,14 @@ export const shortageReport = {
|
|
|
40
40
|
)`
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
43
|
+
if (orderNo) {
|
|
44
|
+
let orderValue = orderNo.value
|
|
45
|
+
.toLowerCase()
|
|
46
|
+
.split(',')
|
|
47
|
+
.map(prod => {
|
|
48
|
+
return "'%" + prod.trim().replace(/'/g, "''") + "%'"
|
|
49
|
+
})
|
|
50
|
+
.join(',')
|
|
51
51
|
|
|
52
52
|
roFilter += `AND (
|
|
53
53
|
Lower(drg.name) LIKE ANY(ARRAY[${orderValue}])
|
|
@@ -65,29 +65,76 @@ export const shortageReport = {
|
|
|
65
65
|
|
|
66
66
|
await tx.query(
|
|
67
67
|
`
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
68
|
+
CREATE TEMP TABLE shortage_report ON COMMIT DROP AS (
|
|
69
|
+
SELECT
|
|
70
|
+
b."name" AS "company",
|
|
71
|
+
drg.name AS "order_no",
|
|
72
|
+
drg.ref_no,
|
|
73
|
+
p.sku AS "product_sku",
|
|
74
|
+
p."name" AS "product_name",
|
|
75
|
+
op.release_qty AS "order_quantity",
|
|
76
|
+
COALESCE(src.av_qty, 0) AS available_qty,
|
|
77
|
+
COALESCE(src.av_qty, 0) - op.release_qty AS "Nett_Stock",
|
|
78
|
+
CONCAT(
|
|
79
|
+
drg.delivery_address_1, ' ',
|
|
80
|
+
drg.delivery_address_2, ' ',
|
|
81
|
+
drg.delivery_address_3, ' ',
|
|
82
|
+
drg.delivery_address_4, ' ',
|
|
83
|
+
drg.delivery_address_5
|
|
84
|
+
) AS "delivery_address",
|
|
85
|
+
drg.state,
|
|
86
|
+
drg.city,
|
|
87
|
+
drg.country,
|
|
88
|
+
drg.created_at
|
|
89
|
+
FROM
|
|
90
|
+
draft_release_goods drg
|
|
91
|
+
INNER JOIN
|
|
92
|
+
bizplaces b ON b.id = drg.bizplace_id
|
|
93
|
+
INNER JOIN
|
|
94
|
+
order_products op ON op.draft_release_good_id = drg.id
|
|
95
|
+
INNER JOIN
|
|
96
|
+
products p ON p.id = op.product_id
|
|
97
|
+
INNER JOIN
|
|
98
|
+
product_details pd ON pd.id = op.product_detail_id
|
|
99
|
+
LEFT JOIN (
|
|
100
|
+
SELECT
|
|
101
|
+
i.domain_id AS "domain_id",
|
|
102
|
+
i.bizplace_id AS "bizplace_id",
|
|
103
|
+
i.product_id AS "product_id",
|
|
104
|
+
i.product_detail_id AS "product_detail_id",
|
|
105
|
+
COALESCE(SUM(COALESCE(i.qty, 0)) - SUM(COALESCE(i.locked_qty, 0))) AS "av_qty"
|
|
106
|
+
FROM
|
|
107
|
+
inventories i
|
|
108
|
+
INNER JOIN
|
|
109
|
+
locations l2 ON i.location_id = l2.id AND i.domain_id = l2.domain_id AND l2.type NOT IN ('QUARANTINE', 'RESERVE', 'DAMAGE')
|
|
110
|
+
INNER JOIN
|
|
111
|
+
products p ON p.id = i.product_id
|
|
112
|
+
INNER JOIN
|
|
113
|
+
product_details pd ON pd.id = i.product_detail_id
|
|
114
|
+
WHERE
|
|
115
|
+
i.status = 'STORED'
|
|
116
|
+
AND i.obsolete IS FALSE
|
|
117
|
+
AND i.domain_id = $1
|
|
118
|
+
AND i.bizplace_id = '${bizplace.value}'
|
|
119
|
+
GROUP BY
|
|
120
|
+
i.domain_id,
|
|
121
|
+
i.bizplace_id,
|
|
122
|
+
i.product_id,
|
|
123
|
+
i.product_detail_id
|
|
124
|
+
) src ON op.product_id = src.product_id AND op.product_detail_id = src.product_detail_id
|
|
125
|
+
WHERE
|
|
126
|
+
drg.status = 'DRAFT'
|
|
127
|
+
AND drg.domain_id = $1
|
|
128
|
+
AND COALESCE(src.av_qty - op.release_qty, 0) <= 0
|
|
129
|
+
AND op.release_qty != COALESCE(src.av_qty, 0)
|
|
130
|
+
AND drg.created_at >= $2
|
|
131
|
+
AND drg.created_at <= $3
|
|
132
|
+
${roFilter}
|
|
133
|
+
${queryFilter}
|
|
134
|
+
ORDER BY
|
|
135
|
+
drg.created_at DESC
|
|
136
|
+
)
|
|
137
|
+
`,
|
|
91
138
|
[context.state.domain.id, fromDate.value, toDate.value]
|
|
92
139
|
)
|
|
93
140
|
|
|
@@ -104,20 +151,20 @@ export const shortageReport = {
|
|
|
104
151
|
)
|
|
105
152
|
|
|
106
153
|
let items = result.map(itm => {
|
|
107
|
-
return{
|
|
154
|
+
return {
|
|
108
155
|
bizplaceName: itm.company,
|
|
109
156
|
orderNo: itm.order_no,
|
|
110
|
-
refNo:itm.ref_no,
|
|
157
|
+
refNo: itm.ref_no,
|
|
111
158
|
productSku: itm.product_sku,
|
|
112
159
|
productName: itm.product_name,
|
|
113
|
-
orderQty:itm.order_quantity,
|
|
114
|
-
avQty:itm.available_qty,
|
|
115
|
-
nettStock:itm.Nett_Stock,
|
|
116
|
-
deliveryAddress:itm.delivery_address,
|
|
117
|
-
state:itm.state,
|
|
118
|
-
city:itm.city,
|
|
119
|
-
country:itm.country,
|
|
120
|
-
createdAt:itm.created_at
|
|
160
|
+
orderQty: itm.order_quantity,
|
|
161
|
+
avQty: itm.available_qty,
|
|
162
|
+
nettStock: itm.Nett_Stock,
|
|
163
|
+
deliveryAddress: itm.delivery_address,
|
|
164
|
+
state: itm.state,
|
|
165
|
+
city: itm.city,
|
|
166
|
+
country: itm.country,
|
|
167
|
+
createdAt: itm.created_at
|
|
121
168
|
}
|
|
122
169
|
})
|
|
123
170
|
|
|
@@ -129,4 +176,4 @@ export const shortageReport = {
|
|
|
129
176
|
throw error
|
|
130
177
|
}
|
|
131
178
|
}
|
|
132
|
-
}
|
|
179
|
+
}
|