<bm:fieldname="workflow_desc"forInsert="false"expression="(SELECT c.workflow_desc FROM zj_wfl_workflow c where c.workflow_id= t1.workflow_id)"forUpdate="false"/>
<bm:fieldname="archive_type_desc"forInsert="false"expression="(SELECT c.code_value_name FROM sys_code_values_v c where c.code='DATA_CLASSIFICATION' and c.code_value = t1.archive_type)"forUpdate="false"/>
<bm:fieldname="is_workflow_desc"forInsert="false"expression="(SELECT c.code_value_name FROM sys_code_values_v c where c.code='YES_NO' and c.code_value = t1.is_workflow)"forUpdate="false"/>
<bm:fieldname="post_stru_data_flag_desc"forInsert="false"expression="(SELECT c.code_value_name FROM sys_code_values_v c where c.code='YES_NO' and c.code_value = t1.post_stru_data_flag)"forUpdate="false"/>
<bm:fieldname="post_atm_flag_desc"forInsert="false"expression="(SELECT c.code_value_name FROM sys_code_values_v c where c.code='YES_NO' and c.code_value = t1.post_atm_flag)"forUpdate="false"/>
<bm:fieldname="je_check_flag_desc"forInsert="false"expression="(SELECT c.code_value_name FROM sys_code_values_v c where c.code='YES_NO' and c.code_value = t1.je_check_flag)"forUpdate="false"/>
(SELECT c.code_value_name FROM sys_code_values_v c where c.code='DATA_CLASSIFICATION' and c.code_value = t1.archive_type) archive_type_desc,
(SELECT c.code_value_name 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,
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 ,
(SELECT c.code_value_name FROM sys_code_values_v c where c.code='DATA_CLASSIFICATION' and c.code_value = t1.archive_type) archive_type_desc,
(SELECT c.code_value_name FROM sys_code_values_v c where c.code='YES_NO' and c.code_value = 'Y') suppl_trans_flag,
'建机审批流版式文件-' ||decode(z.workflow_id,-1,substr(z.instance_desc,instr(z.instance_desc,'-',1)+1),(select w.workflow_desc from zj_wfl_workflow w where w.workflow_id=z.workflow_id)) || '-' || z.instance_id || '.docx' to_file_name,
lt.pwd,
fc.document_id,
fc.content_id
FROM
fnd_atm_attachment faa,
fnd_atm_attachment_multi m,
hls_doc_file_templet lt,
con_clause_templet t,
hls_doc_file_content fc,
zj_wfl_workflow_instance z
WHERE
faa.attachment_id = m.attachment_id AND
m.table_name = 'HLS_DOC_FILE_TEMPLET' AND
m.table_pk_value = lt.templet_id AND
lt.templet_id = t.doc_template_id AND
t.doc_plugin_flag = 'Y' AND
t.templet_id = fc.templet_Id AND
fc.document_id = z.instance_id AND
fc.document_table = 'ZJ_WFL_WORKFLOW_INSTANCE' and
var brwt = new BookmarksReplaceWithText($instance('leaf.database.service.IDatabaseServiceFactory'), $instance('uncertain.ocm.IObjectRegistry'), $ctx.getData());