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
82d86acc
Commit
82d86acc
authored
May 31, 2024
by
王炜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
I-19408【建机运维】系统自动回传的电子合同打不开修复
parent
89a9620f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
99 additions
and
0 deletions
+99
-0
con_ele_file_size_fixed.lwm
...bapp/WEB-INF/classes/wx/WX100/con_ele_file_size_fixed.lwm
+37
-0
con_ele_file_file_size_fix_job.lsc
...ebapp/modules/wx/WX100/con_ele_file_file_size_fix_job.lsc
+62
-0
No files found.
src/main/webapp/WEB-INF/classes/wx/WX100/con_ele_file_size_fixed.lwm
0 → 100644
View file @
82d86acc
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: wangwei5743
$Date: 2024-5-31 上午10:38:31
$Revision: 1.0
$Purpose: 电子签约附件大小错误更新
-->
<bm:model
xmlns:bm=
"http://www.leaf-framework.org/schema/bm"
needAccessControl=
"false"
>
<bm:fields>
<bm:field
name=
"attachment_id"
/>
<bm:field
name=
"source_pk_value"
/>
<bm:field
name=
"file_path"
/>
<bm:field
name=
"file_size"
/>
</bm:fields>
<bm:operations>
<bm:operation
name=
"query"
>
<bm:query-sql>
<![CDATA[
select F.ATTACHMENT_ID,F.SOURCE_PK_VALUE,F.FILE_PATH,F.FILE_SIZE
from fnd_atm_attachment f where f.creation_date>
sysdate-1/24
and f.File_Path like substr(${@ele_con_file_path},1,2) || '%'
]]>
</bm:query-sql>
</bm:operation>
<bm:operation
name=
"update"
>
<bm:update-sql>
<![CDATA[
BEGIN
UPDATE fnd_atm_attachment f
set f.file_size=${@file_size},
f.last_update_date=sysdate,
f.last_updated_by= nvl(${/session/@user_id},1)
where f.attachment_id=${@attachment_id}
and f.source_pk_value=${@source_pk_value};
COMMIT;
END;
]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
src/main/webapp/modules/wx/WX100/con_ele_file_file_size_fix_job.lsc
0 → 100644
View file @
82d86acc
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: wangwei5743
$Date: 2024-5-31 上午10:38:31
$Revision: 1.0
$Purpose: 电子签约附件大小错误更新
-->
<a:service
xmlns:s=
"leaf.plugin.script"
xmlns:a=
"http://www.leaf-framework.org/application"
trace=
"true"
>
<a:init-procedure>
<s:server-script>
<![CDATA[
importPackage(java.io);
//系统参数获取
function info_query(parameter_code) {
var info = new Object();
var data = null;
var parameter_map = $bm('wx.WX100.sys_parameter_value').queryAsMap({
parameter_code:parameter_code
});
var data = parameter_map.getChildren();
info.code_value = data[0].code_value;
return info;
}
var ele_con_file_path = info_query('HL_ELE_FILE_PATH').code_value;
function fileSizeFixed() {
var parameter_map = $bm('wx.WX100.con_ele_file_size_fixed').queryAsMap({
ele_con_file_path:ele_con_file_path
});
var data = parameter_map.getChildren();
var fixed_size_bm = $bm('wx.WX100.con_ele_file_size_fixed');
for (var i = 0; i < data.length; i++) {
var file_path = data[i].file_path;
var file_size =data[i].file_size;
var now_file_size=get_file_length(file_path);
if(file_size!=now_file_size){
fixed_size_bm.update({
file_size: now_file_size,
attachment_id: data[i].attachment_id,
source_pk_value: data[i].source_pk_value
})
}
}
}
//获取文件长度
function get_file_length(path){
var file=new File(String(path));
if (file.exists() && file.isFile()){
length=file.length();
return length;
} else{
return 0;
}
}
fileSizeFixed();
]]>
</s:server-script>
</a:init-procedure>
<a:service-output/>
</a:service>
\ No newline at end of file
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