Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leaf-hlcm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hlcm
leaf-hlcm
Commits
1b44cd36
Commit
1b44cd36
authored
Feb 24, 2023
by
Luochenglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
附件上传写入返回值,附件下载参数修改
parent
601509ba
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
109 additions
and
14 deletions
+109
-14
att_download.lwm
...n/webapp/WEB-INF/classes/efile/EFILE1030/att_download.lwm
+0
-2
att_upload_return.lwm
...app/WEB-INF/classes/efile/EFILE1040/att_upload_return.lwm
+83
-0
att_download.lsc
src/main/webapp/modules/efile/EFILE1030/att_download.lsc
+1
-4
efile_att_upload.lsc
src/main/webapp/modules/efile/EFILE1040/efile_att_upload.lsc
+25
-8
No files found.
src/main/webapp/WEB-INF/classes/efile/EFILE1030/att_download.lwm
View file @
1b44cd36
...
...
@@ -21,12 +21,10 @@
fnd_atm_attachment_multi fam,
fnd_atm_attachment faa
WHERE
fam.attachment_id = ${@attachment_id} AND
faa.rowid =${@rowid} AND
fam.attachment_id = faa.attachment_id
]]>
</bm:query-sql>
<bm:parameters>
<bm:parameter
name=
"attachment_id"
/>
<bm:parameter
name=
"rowid"
/>
</bm:parameters>
</bm:operation>
...
...
src/main/webapp/WEB-INF/classes/efile/EFILE1040/att_upload_return.lwm
0 → 100644
View file @
1b44cd36
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luochenglong
$Date: 2023-02-10 早上 11:03:31
$Revision: 1.0
$Purpose: 电子档案池bm
-->
<bm:model
xmlns:f=
"leaf.database.features"
xmlns:bm=
"http://www.leaf-framework.org/schema/bm"
>
<bm:operations>
<bm:operation
name=
"query"
>
<bm:query-sql>
<![CDATA[
SELECT t1.pool_id,
t1.primary_field,
t1.internal_period_num,
t1.base_archive_code,
t1.archive_type,
t1.document_id,
t1.document_number,
t1.document_info,
t1.post_status,
(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,
(SELECT c.code_value_name FROM sys_code_values_v c where c.code='POST_STATUS_DESC' and c.code_value =t1.post_status) post_status_desc,
t1.hly_req_number as post_batch_num,
t1.post_message
FROM hl_e_archives_pool t1
#WHERE_CLAUSE#
]]>
</bm:query-sql>
</bm:operation>
<bm:operation
name=
"insert"
>
<bm:update-sql>
<![CDATA[
begin
elec_wfl_pkg.att_upload_return(
p_primary_field =>
${@primary_field},
p_status =>${@status},
p_message =>${@message},
p_attachmentoid =>${@attachmentoid},
p_hly_fileurl =>${@hly_fileurl},
p_user_id =>${/session/@user_id});
end;
]]>
</bm:update-sql>
</bm:operation>
<bm:operation
name=
"update"
>
<bm:update-sql>
<![CDATA[
begin
elec_wfl_pkg.elec_type_update(
p_sql_type =>
'UPDATE',
p_base_archive_id => ${@base_archive_id},
p_base_archive_code => ${@base_archive_code},
p_archive_type => ${@archive_type},
p_post_stru_data_flag => ${@post_stru_data_flag},
p_stru_data_sql => ${@stru_data_sql},
p_is_workflow => ${@is_workflow},
p_workflow_id => ${@workflow_id},
p_post_atm_flag => ${@post_atm_flag},
p_atm_sql => ${@atm_sql},
p_je_check_flag => ${@je_check_flag},
p_je_source_sql => ${@je_source_sql},
p_user_id => ${/session/@user_id});
end;
]]>
</bm:update-sql>
</bm:operation>
<bm:operation
name=
"delete"
>
<bm:update-sql>
<![CDATA[
begin
elec_wfl_pkg.elec_type_delete(
p_base_archive_id =>
${@base_archive_id},
p_user_id => ${/session/@user_id});
end;
]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field
name=
"internal_period_num"
queryExpression=
"t1.internal_period_num =${@internal_period_num}"
/>
<bm:query-field
name=
"archive_type_desc"
queryExpression=
"t1.archive_type_desc =${@archive_type_desc}"
/>
<bm:query-field
name=
"primary_field"
queryExpression=
"t1.primary_field =${@primary_field}"
/>
<bm:query-field
name=
"document_info"
queryExpression=
"t1.document_info like ${@document_info}"
/>
<bm:query-field
name=
"post_status_desc"
queryExpression=
"t1.post_status_desc =${@post_status_desc}"
/>
<bm:query-field
name=
"post_batch_num"
queryExpression=
"t1.post_batch_num =${@post_batch_num}"
/>
<bm:query-field
name=
"suppl_trans_flag"
queryExpression=
"t1.suppl_trans_flag =${@suppl_trans_flag}"
/>
</bm:query-fields>
</bm:model>
src/main/webapp/modules/efile/EFILE1030/att_download.lsc
View file @
1b44cd36
...
...
@@ -11,15 +11,12 @@
var resp = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
resp.setHeader("Pragma", "No-cache");
resp.setHeader("Cache-Control", "no-cache, must-revalidate");
var attachment_id = $ctx.parameter.attachment_id;
var rowid = $ctx.parameter.rowid;
var attachment_queryBm = $bm('efile.EFILE1030.att_download');
logger.info(attachment_id);
var attachment_data = attachment_queryBm.queryAsMap({
attachment_id: attachment_id,
rowid:rowid
});
if(
attachment_id&&
rowid){
if(rowid){
var filename = attachment_data.getChildren()[0].file_name;
var filepath= attachment_data.getChildren()[0].file_path;
resp.setHeader("Content-Disposition",
...
...
src/main/webapp/modules/efile/EFILE1040/efile_att_upload.lsc
View file @
1b44cd36
...
...
@@ -42,26 +42,32 @@
var check_token_valid_bm = $bm('efile.EFILE1000.check_token_valid');
var checkTokenQuery = check_token_valid_bm.queryAsMap();
var is_valid = checkTokenQuery.getChildren()[0].is_valid;
var primaryField='CF-4252CE7A665C4562BF8E8AC3AD79BF1D';
var file=new File('D:\\aurora_reference.pdf');
logger.info(primaryField);
var map = {
"documentTypeCode" : "workflow_QC02",
"primaryField":
"CF-4252CE7A665C4562BF8E8AC3AD79BF1D"
,
"primaryField":
primaryField
,
"documentSource":"CF",
"companyCode":"HL"
}
var att_recordBm=$bm('efile.EFILE1040.att_upload_return');
if (is_valid == 'true') {
var SystokenQuery = token_savelogs_bm.queryAsMap();
var access_token = SystokenQuery.getChildren()[0].access_token;
var data=httpPostAttUpload(attUrl,map,file,access_token,token_type);
var json = JSON.parse(data);
var result=JSON.stringify(json.result);
result=JSON.parse(result)
att_recordBm.insert({
'primary_field': primaryField,
'status': json.statusCode,
'message': json.message,
'attachmentoid': result.attachmentOID,
'hly_fileurl': result.fileURL
})
logger.info(data);
} else {
println("=======有效期外======");
...
...
@@ -72,6 +78,17 @@
if (access_token) {
var data_att=httpPostAttUpload(attUrl,map,file,access_token,token_type);
var json = JSON.parse(data_att);
var result=JSON.stringify(json.result);
result=JSON.parse(result)
att_recordBm.insert({
'primary_field': primaryField,
'status': json.statusCode,
'message': json.message,
'attachmentoid': result.attachmentOID,
'hly_fileurl': result.fileURL
})
logger.info(data_att);
token_savelogs_bm.insert({
'json': data,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment