Commit 8a63118e authored by 18083's avatar 18083

非银企直连付款附件改造

parent d039b176
...@@ -10,13 +10,15 @@ ...@@ -10,13 +10,15 @@
<bm:operation name="execute"> <bm:operation name="execute">
<bm:update-sql><![CDATA[ <bm:update-sql><![CDATA[
BEGIN BEGIN
CSH_PAYMENT_JE_PKG.insert_fnd_atm( CSH_PAYMENT_JE_PKG.init_fnd_atm(
p_table_name =>${@table_name}, p_table_name =>${@table_name},
p_table_pk_value =>${@journal_id}, p_table_pk_value =>${@journal_id},
p_file_name =>${@file_name}, p_file_name =>${@file_name},
p_file_path =>${@file_path}, p_file_path =>${@file_path},
p_user_id =>nvl(${/session/@user_id},${@user_id}), p_user_id =>nvl(${/session/@user_id},${@user_id}),
p_file_size =>${@file_size} p_file_size =>${@file_size},
p_file_type_code =>${@file_type_code},
p_mime_type =>${@mime_type}
); );
END; END;
]]></bm:update-sql> ]]></bm:update-sql>
...@@ -28,8 +30,9 @@ ...@@ -28,8 +30,9 @@
faa.file_name, faa.file_name,
faa.file_path, faa.file_path,
faa.file_type_code, faa.file_type_code,
faa.mime_type,
m.table_name, m.table_name,
hd.payment_req_number||'_'||faa.file_name to_file_name faa.file_name to_file_name
FROM fnd_atm_attachment faa, FROM fnd_atm_attachment faa,
fnd_atm_attachment_multi m, fnd_atm_attachment_multi m,
csh_payment_req_hd hd csh_payment_req_hd hd
...@@ -45,6 +48,7 @@ ...@@ -45,6 +48,7 @@
<bm:field name="file_path" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_PATH"/> <bm:field name="file_path" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_PATH"/>
<bm:field name="table_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TABLE_NAME"/> <bm:field name="table_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TABLE_NAME"/>
<bm:field name="file_type_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_TYPE_CODE"/> <bm:field name="file_type_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_TYPE_CODE"/>
<bm:field name="to_file_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TO_FILE_NAME"/> <bm:field name="mime_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="MIME_TYPE"/>
<bm:field name="to_file_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TO_FILE_NAME"/>
</bm:fields> </bm:fields>
</bm:model> </bm:model>
...@@ -43,22 +43,25 @@ ...@@ -43,22 +43,25 @@
var to_file_name = record_data.to_file_name; var to_file_name = record_data.to_file_name;
var from_file_path = record_data.file_path; var from_file_path = record_data.file_path;
println(table_name); var guid_file_name_path = $bm('cont.CON500.con_contract_get_guid_file_name').queryAsMap();
var guid_file_name_path = $bm('cont.CON500.con_contract_get_guid_file_name').queryAsMap();
var guid_file_name_tables = guid_file_name_path.getChildren(); var guid_file_name_tables = guid_file_name_path.getChildren();
to_file_path = to_file_path + guid_file_name_tables[0].guid_file_name; to_file_path = to_file_path + guid_file_name_tables[0].guid_file_name;
copyFile(from_file_path, to_file_path); copyFile(from_file_path, to_file_path);
//得到生成的pdf文件的大小 //生成文件的大小
var file_size=get_file_length(to_file_path.toString()); var file_size=get_file_length(to_file_path.toString());
var table_name = record_data.table_name; var table_name = record_data.table_name;
var file_type_code=record_data.file_type_code;
var mime_type=record_data.mime_type;
$bm('csh.CSH501.csh_journal_get_atm').execute({ $bm('csh.CSH501.csh_journal_get_atm').execute({
table_name: table_name, table_name: table_name,
journal_id: $ctx.parameter.journal_id, journal_id: $ctx.parameter.journal_id,
file_name: to_file_name.toString(), file_name: to_file_name.toString(),
file_path: to_file_path.toString(), file_path: to_file_path.toString(),
user_id :$ctx.parameter.user_id,
file_size: file_size, file_size: file_size,
user_id :$ctx.parameter.user_id file_type_code:file_type_code,
mime_type:mime_type,
}); });
......
...@@ -192,8 +192,7 @@ ...@@ -192,8 +192,7 @@
}; };
window['${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, record, config_records, bp_seq) { window['${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, record, config_records, bp_seq) {
debugger; var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var hdds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_ln');
var hd_ds, lineRecords, currency_code; var hd_ds, lineRecords, currency_code;
if (hdds_id) { if (hdds_id) {
...@@ -775,7 +774,7 @@ ...@@ -775,7 +774,7 @@
hls_doc_get_layout_code('csh501d_get_layout_code_link_id', param, 'con_rd_wfl_link', '', '${/parameter/@layout_code}'); hls_doc_get_layout_code('csh501d_get_layout_code_link_id', param, 'con_rd_wfl_link', '', '${/parameter/@layout_code}');
} }
function upload_file(id,name,record_id,item_code) { function upload_csh_file(id,name,record_id,item_code) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name]; var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
if (item_code=='INVOICE') { if (item_code=='INVOICE') {
var url = $('csh_uploadFile_id').getUrl() + '?table_name=INVOICE&header_id=' + record_id; var url = $('csh_uploadFile_id').getUrl() + '?table_name=INVOICE&header_id=' + record_id;
...@@ -803,7 +802,7 @@ ...@@ -803,7 +802,7 @@
if (name == 'contract_number' && value) { if (name == 'contract_number' && value) {
return '<a href="javascript:open_con_contract_readonly_win(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>'; return '<a href="javascript:open_con_contract_readonly_win(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>';
}else if (name == 'attachment'){ }else if (name == 'attachment'){
return '<a href=javascript:upload_file(\''+record.id+'\',\''+ name + '\',\'' +record.get('payment_req_id')+'\',\'' + record.get('item_code')+'\')>附件上传</a>'; return '<a href=javascript:upload_csh_file(\''+record.id+'\',\''+ name + '\',\'' +record.get('payment_req_id')+'\',\'' + record.get('item_code')+'\')>附件上传</a>';
} else if (name == 'attach_file_name') { } else if (name == 'attach_file_name') {
if (value != null) { if (value != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment