AND zwi.instance_id = t1.document_id) workflow_id,
(SELECT hl.workflow_id FROM hl_e_archives_post_list hl
WHERE hl.e_archives_id = t1.e_archives_id) workflow_id,
(SELECT e.je_check_flag
FROM e_archives_define e
WHERE e.base_archive_code = t1.base_archive_code
AND e.workflow_id = (SELECT DISTINCT zwi.workflow_id
FROM zj_wfl_workflow_instance zwi,
zj_wfl_workflow zww
WHERE zww.workflow_id = zwi.workflow_id
AND zwi.instance_id = t1.document_id)) je_check_flag,
AND nvl(e.workflow_id,'-1') = nvl((SELECT hl.workflow_id
FROM hl_e_archives_post_list hl
WHERE hl.e_archives_id = t1.e_archives_id),'-1')
and nvl(e.func_type,'-1')=nvl((select hl.func_type from hl_e_archives_post_list hl where hl.e_archives_id=t1.e_archives_id),'-1')) je_check_flag,
(SELECT e.post_stru_data_flag
FROM e_archives_define e
WHERE e.base_archive_code = t1.base_archive_code
AND nvl(e.workflow_id,'-1') = nvl((SELECT hl.workflow_id
FROM hl_e_archives_post_list hl
WHERE hl.e_archives_id = t1.e_archives_id),'-1')
and nvl(e.func_type,'-1')=nvl((select hl.func_type from hl_e_archives_post_list hl where hl.e_archives_id=t1.e_archives_id),'-1')) post_stru_data_flag,
(SELECT e.post_atm_flag
FROM e_archives_define e
WHERE e.base_archive_code = t1.base_archive_code
AND nvl(e.workflow_id,'-1') = nvl((SELECT hl.workflow_id
FROM hl_e_archives_post_list hl
WHERE hl.e_archives_id = t1.e_archives_id),'-1')
and nvl(e.func_type,'-1')=nvl((select hl.func_type from hl_e_archives_post_list hl where hl.e_archives_id=t1.e_archives_id),'-1')) post_atm_flag,
(SELECT e.base_archive_id
FROM e_archives_define e
WHERE e.base_archive_code = t1.base_archive_code
AND e.workflow_id = (SELECT DISTINCT zwi.workflow_id
FROM zj_wfl_workflow_instance zwi,
zj_wfl_workflow zww
WHERE zww.workflow_id = zwi.workflow_id
AND zwi.instance_id = t1.document_id)) base_archive_id,
nvl((SELECT gps.monthly_closed_flag
FROM gld_periods gp,
gld_period_status gps
WHERE REPLACE(gp.period_name,
'-',
'') = t1.internal_period_num
AND gps.company_id = ${ / session / @company_id}
AND gp.internal_period_num = gps.internal_period_num
AND gps.period_set_code = gp.period_set_code),
'N') monthly_closed_flag,
AND nvl(e.workflow_id,'-1') = nvl((SELECT hl.workflow_id
FROM hl_e_archives_post_list hl
WHERE hl.e_archives_id = t1.e_archives_id),'-1')
and nvl(e.func_type,'-1')=nvl((select hl.func_type from hl_e_archives_post_list hl where hl.e_archives_id=t1.e_archives_id),'-1')) base_archive_id,
(SELECT c.code_value_name
FROM sys_code_values_v c
WHERE c.code = 'DATA_CLASSIFICATION'
...
...
@@ -58,10 +57,11 @@
FROM sys_code_values_v c
WHERE c.code = 'YES_NO'
AND c.code_value = 'Y') suppl_trans_flag,
t1.hly_req_number AS post_batch_num,
t1.hly_req_number ,
t1.post_message
FROM hl_e_archives_pool t1
where t1.creation_date>=sysdate-30)
where t1.internal_period_num = to_char(ADD_MONTHS(sysdate, -1), 'yyyymm')