@things-factory/operato-hub 4.3.555 → 4.3.556
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/graphql/resolvers/email/send-emails.js +1 -1
- package/dist-server/graphql/resolvers/email/send-emails.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/custom-elccl-fn-dispatch-report.js +85 -0
- package/dist-server/graphql/resolvers/reports/custom-elccl-fn-dispatch-report.js.map +1 -0
- package/dist-server/graphql/resolvers/reports/index.js +2 -1
- package/dist-server/graphql/resolvers/reports/index.js.map +1 -1
- package/dist-server/graphql/types/reports/custom-elccl-fn-dispatch-report-list.js +14 -0
- package/dist-server/graphql/types/reports/custom-elccl-fn-dispatch-report-list.js.map +1 -0
- package/dist-server/graphql/types/reports/custom-elccl-fn-dispatch-report.js +25 -0
- package/dist-server/graphql/types/reports/custom-elccl-fn-dispatch-report.js.map +1 -0
- package/dist-server/graphql/types/reports/index.js +6 -1
- package/dist-server/graphql/types/reports/index.js.map +1 -1
- package/package.json +2 -2
- package/server/graphql/resolvers/email/send-emails.ts +1 -1
- package/server/graphql/resolvers/reports/custom-elccl-fn-dispatch-report.ts +94 -0
- package/server/graphql/resolvers/reports/index.ts +3 -1
- package/server/graphql/types/reports/custom-elccl-fn-dispatch-report-list.ts +8 -0
- package/server/graphql/types/reports/custom-elccl-fn-dispatch-report.ts +19 -0
- package/server/graphql/types/reports/index.ts +6 -1
|
@@ -54,7 +54,7 @@ exports.sendEmailsResolver = {
|
|
|
54
54
|
let startDate = new Date(interval.prev());
|
|
55
55
|
if (dag < now && dag > thirtyMinsAgo) {
|
|
56
56
|
try {
|
|
57
|
-
processEmailCronJob(email, startDate.toISOString(), now.toISOString());
|
|
57
|
+
processEmailCronJob(email, startDate.toISOString(), now.toISOString());
|
|
58
58
|
}
|
|
59
59
|
catch (e) {
|
|
60
60
|
env_1.logger.error(`[auto_email_log_by_id(${email.id})] ${e}`);
|
|
@@ -1 +1 @@
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,WAAW,CAAC,OAAO,CAC5B,WAAW,KAAK,CAAC,EAAE,EAAE,EACrB,8BAA8B,KAAK,CAAC,EAAE,GAAG,EACzC,4BAA4B,KAAK,CAAC,EAAE,GAAG,CACxC,CAAA;QACD,YAAM,CAAC,IAAI,CAAC,oCAAoC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;KACjE;AACH,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.customElcclDispatchReport = void 0;
|
|
4
|
+
const biz_base_1 = require("@things-factory/biz-base");
|
|
5
|
+
exports.customElcclDispatchReport = {
|
|
6
|
+
async customElcclDispatchReport(_, params, context) {
|
|
7
|
+
try {
|
|
8
|
+
const { tx } = context.state;
|
|
9
|
+
let bizplaceFilter = params.filters.find(data => data.name === 'bizplace'); // Directly fetch bizplace filter
|
|
10
|
+
// Check for required filters
|
|
11
|
+
if (!bizplaceFilter)
|
|
12
|
+
throw 'Invalid input: Bizplace filter is required';
|
|
13
|
+
const bizplace = await tx.getRepository(biz_base_1.Bizplace).findOne({
|
|
14
|
+
id: bizplaceFilter.value
|
|
15
|
+
});
|
|
16
|
+
if (!bizplace)
|
|
17
|
+
throw 'Invalid input: Bizplace not found';
|
|
18
|
+
// Create temporary table for report (execute in json)
|
|
19
|
+
await tx.query(`
|
|
20
|
+
create temp table temp_inbound_order_report on commit drop as (
|
|
21
|
+
select
|
|
22
|
+
to_char(rg.release_date::timestamp,'dd/mm/yyyy') as "creation_date",
|
|
23
|
+
to_char(do2.delivery_date::date,'dd/mm/yyyy') as "planned_shipped_date",
|
|
24
|
+
to_char((do2.delivery_date_time + interval '8 hours')::date, 'DD/MM/YYYY') as "actual_shipped_date",
|
|
25
|
+
rg.ref_no_2 as "shipment_id",
|
|
26
|
+
case when do2.contact_point_ref_id is not null then cp."name" else do2.attention_to end as "ship_to",
|
|
27
|
+
case when do2.contact_point_ref_id is not null then cp.company_name else do2.attention_company end as "ship_to_name",
|
|
28
|
+
p.sku as "item",
|
|
29
|
+
p.description as "description",
|
|
30
|
+
oi.release_qty as "qty",
|
|
31
|
+
'CS' as "qty_um",
|
|
32
|
+
i.batch_id as "batch",
|
|
33
|
+
to_char(i.expiration_date,'dd/mm/yyyy') as "exp_date",
|
|
34
|
+
to_char(i.manufacture_date,'dd/mm/yyyy') as "mfg_date"
|
|
35
|
+
from release_goods rg
|
|
36
|
+
inner join order_inventories oi on rg.id = oi.release_good_id
|
|
37
|
+
inner join inventories i on i.id = oi.inventory_id
|
|
38
|
+
inner join products p on p.id = oi.product_id
|
|
39
|
+
left join delivery_orders do2 on rg.id = do2.release_good_id
|
|
40
|
+
left join contact_points cp on cp.id = do2.contact_point_ref_id::uuid
|
|
41
|
+
where rg.bizplace_id = ANY($1::uuid[]) and rg.status = $2
|
|
42
|
+
and do2.delivery_date::date = (NOW()::date - interval '1 day')
|
|
43
|
+
and do2.status in('DELIVERING','DONE')
|
|
44
|
+
order by "creation_date" asc
|
|
45
|
+
)
|
|
46
|
+
`, [[bizplace.id], 'DONE']);
|
|
47
|
+
// Count total records
|
|
48
|
+
// const total: any = await tx.query(`
|
|
49
|
+
// select count(*) from temp_inbound_order_report
|
|
50
|
+
// `) and do2.delivery_date::date = NOW()::Date
|
|
51
|
+
// Fetch paginated results
|
|
52
|
+
const result = await tx.query(`
|
|
53
|
+
select *
|
|
54
|
+
from temp_inbound_order_report
|
|
55
|
+
`);
|
|
56
|
+
// Map results to required format
|
|
57
|
+
let items = result.map(itm => {
|
|
58
|
+
return {
|
|
59
|
+
creationDate: itm.creation_date,
|
|
60
|
+
plannedShippedDate: itm.planned_shipped_date,
|
|
61
|
+
actualShippedDate: itm.actual_shipped_date,
|
|
62
|
+
shipmentId: itm.shipment_id,
|
|
63
|
+
shipTo: itm.ship_to,
|
|
64
|
+
shipToName: itm.ship_to_name,
|
|
65
|
+
productSku: itm.item,
|
|
66
|
+
productDescription: itm.description,
|
|
67
|
+
qty: itm.qty,
|
|
68
|
+
qtyUm: itm.qty_um,
|
|
69
|
+
batch: itm.batch,
|
|
70
|
+
expDate: itm.exp_date,
|
|
71
|
+
mfgDate: itm.mfg_date // Correctly mapped
|
|
72
|
+
};
|
|
73
|
+
});
|
|
74
|
+
// Return items and total count
|
|
75
|
+
return {
|
|
76
|
+
items
|
|
77
|
+
// total: total[0].count
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
throw error;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
//# sourceMappingURL=custom-elccl-fn-dispatch-report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-elccl-fn-dispatch-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/custom-elccl-fn-dispatch-report.ts"],"names":[],"mappings":";;;AACA,uDAAmD;AAGtC,QAAA,yBAAyB,GAAG;IACvC,KAAK,CAAC,yBAAyB,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QACrE,IAAI;YACF,MAAM,EAAE,EAAE,EAAE,GAA0B,OAAO,CAAC,KAAK,CAAA;YACnD,IAAI,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,CAAA,CAAC,iCAAiC;YAE5G,6BAA6B;YAC7B,IAAI,CAAC,cAAc;gBAAE,MAAM,4CAA4C,CAAA;YAEvE,MAAM,QAAQ,GAAa,MAAM,EAAE,CAAC,aAAa,CAAC,mBAAQ,CAAC,CAAC,OAAO,CAAC;gBAClE,EAAE,EAAE,cAAc,CAAC,KAAK;aACzB,CAAC,CAAA;YAEF,IAAI,CAAC,QAAQ;gBAAE,MAAM,mCAAmC,CAAA;YAExD,sDAAsD;YACtD,MAAM,EAAE,CAAC,KAAK,CACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BD,EACC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CACxB,CAAA;YAED,sBAAsB;YACtB,sCAAsC;YACtC,mDAAmD;YACnD,+CAA+C;YAE/C,0BAA0B;YAC1B,MAAM,MAAM,GAAQ,MAAM,EAAE,CAAC,KAAK,CAChC;;;OAGD,CACA,CAAA;YAED,iCAAiC;YACjC,IAAI,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;gBAC3B,OAAO;oBACL,YAAY,EAAE,GAAG,CAAC,aAAa;oBAC/B,kBAAkB,EAAE,GAAG,CAAC,oBAAoB;oBAC5C,iBAAiB,EAAE,GAAG,CAAC,mBAAmB;oBAC1C,UAAU,EAAE,GAAG,CAAC,WAAW;oBAC3B,MAAM,EAAE,GAAG,CAAC,OAAO;oBACnB,UAAU,EAAE,GAAG,CAAC,YAAY;oBAC5B,UAAU,EAAE,GAAG,CAAC,IAAI;oBACpB,kBAAkB,EAAE,GAAG,CAAC,WAAW;oBACnC,GAAG,EAAE,GAAG,CAAC,GAAG;oBACZ,KAAK,EAAE,GAAG,CAAC,MAAM;oBACjB,KAAK,EAAE,GAAG,CAAC,KAAK;oBAChB,OAAO,EAAE,GAAG,CAAC,QAAQ;oBACrB,OAAO,EAAE,GAAG,CAAC,QAAQ,CAAC,mBAAmB;iBAC1C,CAAA;YACH,CAAC,CAAC,CAAA;YAEF,+BAA+B;YAC/B,OAAO;gBACL,KAAK;gBACL,wBAAwB;aACzB,CAAA;SACF;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CACF,CAAA"}
|
|
@@ -4,5 +4,6 @@ exports.Query = void 0;
|
|
|
4
4
|
const inbound_order_details_report_1 = require("./inbound-order-details-report");
|
|
5
5
|
const outbound_order_details_report_1 = require("./outbound-order-details-report");
|
|
6
6
|
const shortage_report_1 = require("./shortage-report");
|
|
7
|
-
|
|
7
|
+
const custom_elccl_fn_dispatch_report_1 = require("./custom-elccl-fn-dispatch-report");
|
|
8
|
+
exports.Query = Object.assign(Object.assign(Object.assign(Object.assign({}, inbound_order_details_report_1.inboundOrderDetailsReport), outbound_order_details_report_1.outboundOrderDetailsReport), shortage_report_1.shortageReport), custom_elccl_fn_dispatch_report_1.customElcclDispatchReport);
|
|
8
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/index.ts"],"names":[],"mappings":";;;AAAA,iFAA0E;AAC1E,mFAA4E;AAC5E,uDAAkD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/index.ts"],"names":[],"mappings":";;;AAAA,iFAA0E;AAC1E,mFAA4E;AAC5E,uDAAkD;AAClD,uFAA6E;AAEhE,QAAA,KAAK,+DACb,wDAAyB,GACzB,0DAA0B,GAC1B,gCAAc,GACd,2DAAyB,EAC7B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CustomElcclDispatchReportList = void 0;
|
|
7
|
+
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
8
|
+
exports.CustomElcclDispatchReportList = (0, graphql_tag_1.default) `
|
|
9
|
+
type CustomElcclDispatchReportList {
|
|
10
|
+
items: [CustomElcclDispatchReport]
|
|
11
|
+
total: Int
|
|
12
|
+
}
|
|
13
|
+
`;
|
|
14
|
+
//# sourceMappingURL=custom-elccl-fn-dispatch-report-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-elccl-fn-dispatch-report-list.js","sourceRoot":"","sources":["../../../../server/graphql/types/reports/custom-elccl-fn-dispatch-report-list.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,6BAA6B,GAAG,IAAA,qBAAG,EAAA;;;;;CAK/C,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CustomElcclDispatchReport = void 0;
|
|
7
|
+
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
8
|
+
exports.CustomElcclDispatchReport = (0, graphql_tag_1.default) `
|
|
9
|
+
type CustomElcclDispatchReport {
|
|
10
|
+
creationDate: Date
|
|
11
|
+
plannedShippedDate: Date
|
|
12
|
+
actualShippedDate: Date
|
|
13
|
+
shipmentId: String
|
|
14
|
+
shipTo: String
|
|
15
|
+
shipToName: String
|
|
16
|
+
productSku: String
|
|
17
|
+
productDescription: String
|
|
18
|
+
qty: Int
|
|
19
|
+
qtyUm: String
|
|
20
|
+
batch: String
|
|
21
|
+
expDate: Date
|
|
22
|
+
mfgDate: Date
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
//# sourceMappingURL=custom-elccl-fn-dispatch-report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-elccl-fn-dispatch-report.js","sourceRoot":"","sources":["../../../../server/graphql/types/reports/custom-elccl-fn-dispatch-report.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,yBAAyB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;CAgB3C,CAAA"}
|
|
@@ -7,10 +7,13 @@ const outbound_order_details_report_1 = require("./outbound-order-details-report
|
|
|
7
7
|
const outbound_order_details_report_list_1 = require("./outbound-order-details-report-list");
|
|
8
8
|
const shortage_report_list_1 = require("./shortage-report-list");
|
|
9
9
|
const shortage_report_type_1 = require("./shortage-report-type");
|
|
10
|
+
const custom_elccl_fn_dispatch_report_1 = require("./custom-elccl-fn-dispatch-report");
|
|
11
|
+
const custom_elccl_fn_dispatch_report_list_1 = require("./custom-elccl-fn-dispatch-report-list");
|
|
10
12
|
exports.Query = `
|
|
11
13
|
inboundOrderDetailsReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): InboundOrderDetailsReportList @transaction
|
|
12
14
|
outboundOrderDetailsReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): OutboundOrderDetailsReportList @transaction
|
|
13
15
|
shortageReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]):ShortageReportList @transaction
|
|
16
|
+
customElcclDispatchReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): CustomElcclDispatchReportList @transaction
|
|
14
17
|
`;
|
|
15
18
|
exports.Types = [
|
|
16
19
|
inbound_order_details_report_1.InboundOrderDetailsReport,
|
|
@@ -18,6 +21,8 @@ exports.Types = [
|
|
|
18
21
|
outbound_order_details_report_1.OutboundOrderDetailsReport,
|
|
19
22
|
outbound_order_details_report_list_1.OutboundOrderDetailsReportList,
|
|
20
23
|
shortage_report_type_1.ShortageReport,
|
|
21
|
-
shortage_report_list_1.ShortageReportList
|
|
24
|
+
shortage_report_list_1.ShortageReportList,
|
|
25
|
+
custom_elccl_fn_dispatch_report_1.CustomElcclDispatchReport,
|
|
26
|
+
custom_elccl_fn_dispatch_report_list_1.CustomElcclDispatchReportList
|
|
22
27
|
];
|
|
23
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/types/reports/index.ts"],"names":[],"mappings":";;;AAAA,iFAA0E;AAC1E,2FAAmF;AACnF,mFAA4E;AAC5E,6FAAqF;AACrF,iEAA2D;AAC3D,iEAAuD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/types/reports/index.ts"],"names":[],"mappings":";;;AAAA,iFAA0E;AAC1E,2FAAmF;AACnF,mFAA4E;AAC5E,6FAAqF;AACrF,iEAA2D;AAC3D,iEAAuD;AACvD,uFAA6E;AAC7E,iGAAsF;AAEzE,QAAA,KAAK,GAAG;;;;;CAKpB,CAAA;AAEY,QAAA,KAAK,GAAG;IACnB,wDAAyB;IACzB,iEAA6B;IAC7B,0DAA0B;IAC1B,mEAA8B;IAC9B,qCAAc;IACd,yCAAkB;IAClB,2DAAyB;IACzB,oEAA6B;CAC9B,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.556",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -122,5 +122,5 @@
|
|
|
122
122
|
"resolutions": {
|
|
123
123
|
"core-js": "^3.16.0"
|
|
124
124
|
},
|
|
125
|
-
"gitHead": "
|
|
125
|
+
"gitHead": "e79e9776c4d331d5c13c8b46cbeb82e07c9c08f9"
|
|
126
126
|
}
|
|
@@ -32,7 +32,7 @@ export const sendEmailsResolver = {
|
|
|
32
32
|
|
|
33
33
|
if (dag < now && dag > thirtyMinsAgo) {
|
|
34
34
|
try {
|
|
35
|
-
processEmailCronJob(email, startDate.toISOString(), now.toISOString())
|
|
35
|
+
processEmailCronJob(email, startDate.toISOString(), now.toISOString())
|
|
36
36
|
} catch (e) {
|
|
37
37
|
logger.error(`[auto_email_log_by_id(${email.id})] ${e}`)
|
|
38
38
|
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { EntityManager } from 'typeorm'
|
|
2
|
+
import { Bizplace } from '@things-factory/biz-base'
|
|
3
|
+
import { ListParam } from '@things-factory/shell'
|
|
4
|
+
|
|
5
|
+
export const customElcclDispatchReport = {
|
|
6
|
+
async customElcclDispatchReport(_: any, params: ListParam, context: any) {
|
|
7
|
+
try {
|
|
8
|
+
const { tx }: { tx: EntityManager } = context.state
|
|
9
|
+
let bizplaceFilter = params.filters.find(data => data.name === 'bizplace') // Directly fetch bizplace filter
|
|
10
|
+
|
|
11
|
+
// Check for required filters
|
|
12
|
+
if (!bizplaceFilter) throw 'Invalid input: Bizplace filter is required'
|
|
13
|
+
|
|
14
|
+
const bizplace: Bizplace = await tx.getRepository(Bizplace).findOne({
|
|
15
|
+
id: bizplaceFilter.value
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
if (!bizplace) throw 'Invalid input: Bizplace not found'
|
|
19
|
+
|
|
20
|
+
// Create temporary table for report (execute in json)
|
|
21
|
+
await tx.query(
|
|
22
|
+
`
|
|
23
|
+
create temp table temp_inbound_order_report on commit drop as (
|
|
24
|
+
select
|
|
25
|
+
to_char(rg.release_date::timestamp,'dd/mm/yyyy') as "creation_date",
|
|
26
|
+
to_char(do2.delivery_date::date,'dd/mm/yyyy') as "planned_shipped_date",
|
|
27
|
+
to_char((do2.delivery_date_time + interval '8 hours')::date, 'DD/MM/YYYY') as "actual_shipped_date",
|
|
28
|
+
rg.ref_no_2 as "shipment_id",
|
|
29
|
+
case when do2.contact_point_ref_id is not null then cp."name" else do2.attention_to end as "ship_to",
|
|
30
|
+
case when do2.contact_point_ref_id is not null then cp.company_name else do2.attention_company end as "ship_to_name",
|
|
31
|
+
p.sku as "item",
|
|
32
|
+
p.description as "description",
|
|
33
|
+
oi.release_qty as "qty",
|
|
34
|
+
'CS' as "qty_um",
|
|
35
|
+
i.batch_id as "batch",
|
|
36
|
+
to_char(i.expiration_date,'dd/mm/yyyy') as "exp_date",
|
|
37
|
+
to_char(i.manufacture_date,'dd/mm/yyyy') as "mfg_date"
|
|
38
|
+
from release_goods rg
|
|
39
|
+
inner join order_inventories oi on rg.id = oi.release_good_id
|
|
40
|
+
inner join inventories i on i.id = oi.inventory_id
|
|
41
|
+
inner join products p on p.id = oi.product_id
|
|
42
|
+
left join delivery_orders do2 on rg.id = do2.release_good_id
|
|
43
|
+
left join contact_points cp on cp.id = do2.contact_point_ref_id::uuid
|
|
44
|
+
where rg.bizplace_id = ANY($1::uuid[]) and rg.status = $2
|
|
45
|
+
and do2.delivery_date::date = (NOW()::date - interval '1 day')
|
|
46
|
+
and do2.status in('DELIVERING','DONE')
|
|
47
|
+
order by "creation_date" asc
|
|
48
|
+
)
|
|
49
|
+
`,
|
|
50
|
+
[[bizplace.id], 'DONE']
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
// Count total records
|
|
54
|
+
// const total: any = await tx.query(`
|
|
55
|
+
// select count(*) from temp_inbound_order_report
|
|
56
|
+
// `) and do2.delivery_date::date = NOW()::Date
|
|
57
|
+
|
|
58
|
+
// Fetch paginated results
|
|
59
|
+
const result: any = await tx.query(
|
|
60
|
+
`
|
|
61
|
+
select *
|
|
62
|
+
from temp_inbound_order_report
|
|
63
|
+
`
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
// Map results to required format
|
|
67
|
+
let items = result.map(itm => {
|
|
68
|
+
return {
|
|
69
|
+
creationDate: itm.creation_date, // Correctly mapped
|
|
70
|
+
plannedShippedDate: itm.planned_shipped_date, // Correctly mapped
|
|
71
|
+
actualShippedDate: itm.actual_shipped_date, // Correctly mapped
|
|
72
|
+
shipmentId: itm.shipment_id, // Correctly mapped
|
|
73
|
+
shipTo: itm.ship_to, // Correctly mapped
|
|
74
|
+
shipToName: itm.ship_to_name, // Correctly mapped
|
|
75
|
+
productSku: itm.item, // Correctly mapped (item -> sku)
|
|
76
|
+
productDescription: itm.description, // Correctly mapped (description -> description)
|
|
77
|
+
qty: itm.qty, // Correctly mapped
|
|
78
|
+
qtyUm: itm.qty_um, // Correctly mapped
|
|
79
|
+
batch: itm.batch, // Correctly mapped
|
|
80
|
+
expDate: itm.exp_date, // Correctly mapped
|
|
81
|
+
mfgDate: itm.mfg_date // Correctly mapped
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
// Return items and total count
|
|
86
|
+
return {
|
|
87
|
+
items
|
|
88
|
+
// total: total[0].count
|
|
89
|
+
}
|
|
90
|
+
} catch (error) {
|
|
91
|
+
throw error
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { inboundOrderDetailsReport } from './inbound-order-details-report'
|
|
2
2
|
import { outboundOrderDetailsReport } from './outbound-order-details-report'
|
|
3
3
|
import { shortageReport } from './shortage-report'
|
|
4
|
+
import { customElcclDispatchReport } from './custom-elccl-fn-dispatch-report'
|
|
4
5
|
|
|
5
6
|
export const Query = {
|
|
6
7
|
...inboundOrderDetailsReport,
|
|
7
8
|
...outboundOrderDetailsReport,
|
|
8
|
-
...shortageReport
|
|
9
|
+
...shortageReport,
|
|
10
|
+
...customElcclDispatchReport
|
|
9
11
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
|
|
3
|
+
export const CustomElcclDispatchReport = gql`
|
|
4
|
+
type CustomElcclDispatchReport {
|
|
5
|
+
creationDate: Date
|
|
6
|
+
plannedShippedDate: Date
|
|
7
|
+
actualShippedDate: Date
|
|
8
|
+
shipmentId: String
|
|
9
|
+
shipTo: String
|
|
10
|
+
shipToName: String
|
|
11
|
+
productSku: String
|
|
12
|
+
productDescription: String
|
|
13
|
+
qty: Int
|
|
14
|
+
qtyUm: String
|
|
15
|
+
batch: String
|
|
16
|
+
expDate: Date
|
|
17
|
+
mfgDate: Date
|
|
18
|
+
}
|
|
19
|
+
`
|
|
@@ -4,11 +4,14 @@ import { OutboundOrderDetailsReport } from './outbound-order-details-report'
|
|
|
4
4
|
import { OutboundOrderDetailsReportList } from './outbound-order-details-report-list'
|
|
5
5
|
import { ShortageReportList } from './shortage-report-list'
|
|
6
6
|
import { ShortageReport } from './shortage-report-type'
|
|
7
|
+
import { CustomElcclDispatchReport } from './custom-elccl-fn-dispatch-report'
|
|
8
|
+
import { CustomElcclDispatchReportList } from './custom-elccl-fn-dispatch-report-list'
|
|
7
9
|
|
|
8
10
|
export const Query = `
|
|
9
11
|
inboundOrderDetailsReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): InboundOrderDetailsReportList @transaction
|
|
10
12
|
outboundOrderDetailsReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): OutboundOrderDetailsReportList @transaction
|
|
11
13
|
shortageReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]):ShortageReportList @transaction
|
|
14
|
+
customElcclDispatchReport(filters: [Filter!], pagination: Pagination, sortings: [Sorting!]): CustomElcclDispatchReportList @transaction
|
|
12
15
|
`
|
|
13
16
|
|
|
14
17
|
export const Types = [
|
|
@@ -17,5 +20,7 @@ export const Types = [
|
|
|
17
20
|
OutboundOrderDetailsReport,
|
|
18
21
|
OutboundOrderDetailsReportList,
|
|
19
22
|
ShortageReport,
|
|
20
|
-
ShortageReportList
|
|
23
|
+
ShortageReportList,
|
|
24
|
+
CustomElcclDispatchReport,
|
|
25
|
+
CustomElcclDispatchReportList
|
|
21
26
|
]
|