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
d66db242
Commit
d66db242
authored
Jan 10, 2025
by
38823
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合同电子签约文件大小对比job
parent
83b1a065
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
101 additions
and
0 deletions
+101
-0
con_ele_file_size_check.lwm
...bapp/WEB-INF/classes/wx/WX100/con_ele_file_size_check.lwm
+39
-0
con_ele_file_file_size_fix_check.lsc
...app/modules/wx/WX100/con_ele_file_file_size_fix_check.lsc
+62
-0
No files found.
src/main/webapp/WEB-INF/classes/wx/WX100/con_ele_file_size_check.lwm
0 → 100644
View file @
d66db242
<?xml version="1.0" encoding="UTF-8"?>
<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.source_type_code,
F.FILE_PATH,
F.FILE_SIZE,
f.creation_date,
f.file_name,
F.rowid
from fnd_atm_attachment f
where f.creation_date between to_date('2021-04-24','yyyy-mm-dd') and to_date('2024-05-31','yyyy-mm-dd')
and f.File_Path like ${@ele_con_file_path}||'%' and f.if_same is null and rownum<501
]]>
</bm:query-sql>
</bm:operation>
<bm:operation
name=
"update"
>
<bm:update-sql>
<![CDATA[
BEGIN
UPDATE fnd_atm_attachment f
set f.if_same = ${@if_same},
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_check.lsc
0 → 100644
View file @
d66db242
<?xml version="1.0" encoding="UTF-8"?>
<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 fileSizeCheck() {
var parameter_map = $bm('wx.WX100.con_ele_file_size_check').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_check');
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({
if_same: 'N',
attachment_id: data[i].attachment_id,
source_pk_value: data[i].source_pk_value
})
}else {
fixed_size_bm.update({
if_same: 'Y',
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;
}
}
fileSizeCheck();
]]>
</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