rez_core 5.0.287 → 5.0.288
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/module/workflow-automation/service/schedule-handler.service.js +9 -5
- package/dist/module/workflow-automation/service/schedule-handler.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/workflow-automation/service/schedule-handler.service.ts +14 -6
package/package.json
CHANGED
|
@@ -38,7 +38,7 @@ export class ScheduleHandlerService {
|
|
|
38
38
|
typeof workflow.schedule === 'string'
|
|
39
39
|
? JSON.parse(workflow.schedule)
|
|
40
40
|
: workflow.schedule;
|
|
41
|
-
|
|
41
|
+
|
|
42
42
|
const entityType = workflow.applicable_entity_type;
|
|
43
43
|
|
|
44
44
|
// 2️⃣ Get table name from frm_entity_master
|
|
@@ -47,11 +47,11 @@ export class ScheduleHandlerService {
|
|
|
47
47
|
mapped_entity_type: entityType,
|
|
48
48
|
organization_id: jobData.organizationId,
|
|
49
49
|
},
|
|
50
|
-
select: ['
|
|
50
|
+
select: ['db_table_name'],
|
|
51
51
|
});
|
|
52
52
|
if (!entity?.data_source) throw new Error(`Entity ${entityType} not found`);
|
|
53
53
|
|
|
54
|
-
const tableName = entity.
|
|
54
|
+
const tableName = entity.db_table_name;
|
|
55
55
|
|
|
56
56
|
// 3️⃣ Resolve executionDate (list master item name)
|
|
57
57
|
const executionDateItem = await this.listMasterRepo.findOne({
|
|
@@ -88,10 +88,18 @@ export class ScheduleHandlerService {
|
|
|
88
88
|
|
|
89
89
|
const qb = this.dataSource
|
|
90
90
|
.createQueryBuilder()
|
|
91
|
-
.from(tableName,
|
|
92
|
-
.
|
|
91
|
+
.from(tableName, 'e')
|
|
92
|
+
.innerJoin(
|
|
93
|
+
'frm_wf_stage_movement_data',
|
|
94
|
+
'sm',
|
|
95
|
+
`
|
|
96
|
+
sm.mapped_entity_id = e.id
|
|
97
|
+
AND sm.is_current = 'Y'
|
|
98
|
+
`,
|
|
99
|
+
)
|
|
100
|
+
.select('e.*')
|
|
93
101
|
.where(comparisonDateCondition)
|
|
94
|
-
.andWhere(
|
|
102
|
+
.andWhere('e.organization_id = :orgId', {
|
|
95
103
|
orgId: jobData.organizationId,
|
|
96
104
|
});
|
|
97
105
|
|