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
2f71211b
Commit
2f71211b
authored
Apr 24, 2020
by
stone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【fix】合同文本打印修改
parent
71675f61
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
120 additions
and
79 deletions
+120
-79
con_doc_batch_create.lsc
src/main/webapp/modules/cont/CON500/con_doc_batch_create.lsc
+120
-79
No files found.
src/main/webapp/modules/cont/CON500/con_doc_batch_create.lsc
View file @
2f71211b
...
@@ -37,6 +37,33 @@
...
@@ -37,6 +37,33 @@
//删除word文件
//删除word文件
// deleteFile(word_file_path);
// deleteFile(word_file_path);
return pdf_file_path_new;
}
//生成pdf openoffice
function doc2pdf(word_file_path,pdf_file_path) {
// word转pdf
var pdf_file_path_new = pdf_file_path + '.pdf';
var wordToPdf = new doc2pdf2();
wordToPdf.doc2pdf2("C:/Program Files (x86)/OpenOffice 4",word_file_path, pdf_file_path_new);
//删除word文件
deleteFile(word_file_path);
return pdf_file_path_new;
}
//生成pdf
function AsposeWordToPDF(word_file_path,pdf_file_path) {
// word转pdf
var pdf_file_path_new = pdf_file_path + '.pdf';
var wordToPdf = new AsposeUtil();
wordToPdf.trans(word_file_path, pdf_file_path_new,"word");
//删除word文件
deleteFile(word_file_path);
return pdf_file_path_new;
return pdf_file_path_new;
}
}
...
@@ -74,7 +101,7 @@
...
@@ -74,7 +101,7 @@
var from_file_path = record_data.file_path;
var from_file_path = record_data.file_path;
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 + 'con' + record_data.content_id
;
to_file_path = to_file_path + guid_file_name_tables[0].guid_file_name + 'con' + record_data.content_id+ '.' + record_data.file_type_code || 'doc'
;
copyFile(from_file_path, to_file_path);
copyFile(from_file_path, to_file_path);
...
@@ -85,12 +112,13 @@
...
@@ -85,12 +112,13 @@
} catch (e) {
} catch (e) {
raise_app_error(e);
raise_app_error(e);
}
}
if (record_data.templet_code == 'FINANCE_LEASE_CONTRACT'||record_data.templet_code == 'BUSINESS_CONTRACT'||record_data.templet_code == 'BUSINESS_CONTRACT_XJ'||record_data.templet_code=='LEASE_EXCHANGE'||record_data.templet_code=='LEASE_EXCHANGE_GN'||record_data.templet_code=='FINANCE_LEASE_CONTRACT_EX') {
// word转pdf
// word转pdf
var pdf_file_path=datePath+guid_file_name_tables[0].guid_file_name + 'con
' + record_data.content_id;
var pdf_file_path=datePath+guid_file_name_tables[0].guid_file_name + 'con_
' + record_data.content_id;
var outputfilepath = wordToPdf(to_file_path,pdf_file_path);
var outputfilepath = wordToPdf(to_file_path,pdf_file_path);
var outputfilename= record_data.to_file_name +'.pdf';
var outputfilename= record_data.to_file_name +'.pdf';
var pdf_file = new File(outputfilepath);
var pdf_file = new File(outputfilepath);
println(outputfilepath);
var file_size = 0;
var file_size = 0;
if (pdf_file.exists()) {
if (pdf_file.exists()) {
file_size = pdf_file.length();
file_size = pdf_file.length();
...
@@ -106,6 +134,19 @@
...
@@ -106,6 +134,19 @@
mime_type: 'application/pdf',
mime_type: 'application/pdf',
user_id: $ctx.parameter.user_id
user_id: $ctx.parameter.user_id
});
});
}
else{
$bm('cont.CON500.con_file_content_copy_update').update({
table_name: 'CON_CONTRACT_CONTENT',
content_id: record_data.content_id,
file_name: to_file_name.toString(),
file_path: to_file_path.toString()
});
}
}
}
}
}
]]>
</s:server-script>
]]>
</s:server-script>
...
...
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