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
98b4d4a8
Commit
98b4d4a8
authored
Feb 03, 2023
by
gzj34291
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
b0f1759c
61bffbba
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
249 additions
and
106 deletions
+249
-106
ConExportMapper.xml
...sources/com/hand/hls/hlcm/cont/mapper/ConExportMapper.xml
+1
-15
hls_journal_import_header.lwm
.../WEB-INF/classes/hls/HLS536/hls_journal_import_header.lwm
+7
-7
hls_journal_import_header_wfl.lwm
...-INF/classes/hls/HLS536/hls_journal_import_header_wfl.lwm
+7
-3
wfl_instance_pdf.lwm
...bapp/WEB-INF/classes/zjwfl/ZJWFL1060/wfl_instance_pdf.lwm
+74
-0
hls_journal_import_wfl.lview
...in/webapp/modules/hls/HLS536/hls_journal_import_wfl.lview
+17
-80
wfl_instance_pdf.lsc
src/main/webapp/modules/zjwfl/ZJWFL1060/wfl_instance_pdf.lsc
+98
-0
zj_wfl_monitoring_query.lview
...app/modules/zjwfl/ZJWFL1060/zj_wfl_monitoring_query.lview
+45
-1
No files found.
src/main/resources/com/hand/hls/hlcm/cont/mapper/ConExportMapper.xml
View file @
98b4d4a8
...
...
@@ -277,21 +277,7 @@
cc2.cf_direction = 'NONCASH' And
cc2.cf_status = 'BLOCK' And
nvl(cc2.write_off_flag, 'NOT') != 'NOT'))
And rownum = 1) -
nvl((Select nvl(Sum(cc2.received_amount), 0)
From con_contract_cashflow cc2
Where cc2.contract_id = t2.contract_id
And cc2.times = t2.times
And cc2.cf_item Not In (0, 9)
And ((cc2.cf_direction = 'INFLOW' And
cc2.cf_status = 'RELEASE') Or
(t2.contract_status In
('REPURING', 'REPUR') And
cc2.cf_direction = 'NONCASH' And
cc2.cf_status = 'BLOCK' And
nvl(cc2.write_off_flag, 'NOT') !=
'NOT'))),
0)) As due_amount,
And rownum = 1) ) As due_amount,
nvl(t1.transaction_date, t2.transaction_date) transaction_date,
nvl(t1.write_off_date, t2.write_off_date) write_off_date,
nvl(t1.received_amount, 0) As received_amount,
...
...
src/main/webapp/WEB-INF/classes/hls/HLS536/hls_journal_import_header.lwm
View file @
98b4d4a8
...
...
@@ -20,7 +20,7 @@
from fnd_companies_vl c
where c.company_id = t1.je_company_id) js_company_short_name,
t1.period_name,
t
1.
journal_date,
t
o_char(t1.journal_date,'yyyy-mm-dd')
journal_date,
t1.currency_code,
(SELECT gc.currency_name
FROM gld_currency_v gc
...
...
@@ -65,7 +65,7 @@
from fnd_companies_vl c
where c.company_id = t1.je_company_id) js_company_short_name,
t1.period_name,
t
1.
journal_date,
t
o_char(t1.journal_date,'yyyy-mm-dd')
journal_date,
t1.currency_code,
(SELECT gc.currency_name
FROM gld_currency_v gc
...
...
@@ -110,7 +110,7 @@
from fnd_companies_vl c
where c.company_id = t1.je_company_id) js_company_short_name,
t1.period_name,
t
1.
journal_date,
t
o_char(t1.journal_date,'yyyy-mm-dd')
journal_date,
t1.currency_code,
(SELECT gc.currency_name
FROM gld_currency_v gc
...
...
@@ -155,7 +155,7 @@
from fnd_companies_vl c
where c.company_id = t1.je_company_id) js_company_short_name,
t1.period_name,
t
1.
journal_date,
t
o_char(t1.journal_date,'yyyy-mm-dd')
journal_date,
t1.currency_code,
(SELECT gc.currency_name
FROM gld_currency_v gc
...
...
@@ -187,7 +187,7 @@
AND EXISTS (SELECT 1
FROM exp_emp_assign_e_v t
WHERE t.user_id = ${/session/@user_id}
AND t.position_code IN ('017') or
t.user_id
= 10418
AND t.position_code IN ('017') or
${/session/@user_id}
= 10418
)
and t1.journal_type in('GENERAL_SALARIES','BPO_SALARIES','COST_IMPORT','FUND_POOL','GLOBAL_TEMPLATE','FINANCIAL_TEMPLATE')
...
...
@@ -199,8 +199,8 @@
</bm:operations>
<bm:query-fields>
<bm:query-field
name=
"journal_num"
queryExpression=
"t1.journal_num like ${@journal_num}"
/>
<bm:query-field
name=
"journal_date_from"
queryExpression=
"t
1.journal_date
>= to_date(${@journal_date_from},'yyyy-mm-dd')"
/>
<bm:query-field
name=
"journal_date_to"
queryExpression=
"t
1.journal_date
<= to_date(${@journal_date_to},'yyyy-mm-dd')"
/>
<bm:query-field
name=
"journal_date_from"
queryExpression=
"t
o_date(t1.journal_date,'yyyy-mm-dd')
>= to_date(${@journal_date_from},'yyyy-mm-dd')"
/>
<bm:query-field
name=
"journal_date_to"
queryExpression=
"t
o_date(t1.journal_date,'yyyy-mm-dd')
<= to_date(${@journal_date_to},'yyyy-mm-dd')"
/>
<bm:query-field
name=
"total_amount_dr_from"
datatype=
"java.lang.Double"
queryExpression=
"nvl(t1.total_amount_dr,t1.total_amount_cr) >= ${@total_amount_dr_from}"
/>
<bm:query-field
name=
"total_amount_dr_to"
datatype=
"java.lang.Double"
queryExpression=
"nvl(t1.total_amount_dr,t1.total_amount_cr) <= ${@total_amount_dr_to}"
/>
<bm:query-field
name=
"description"
queryExpression=
"t1.description like ${@description}"
/>
...
...
src/main/webapp/WEB-INF/classes/hls/HLS536/hls_journal_import_header_wfl.lwm
View file @
98b4d4a8
...
...
@@ -13,11 +13,13 @@
t1.journal_submit_batch_id,
t1.journal_num,
t1.error_message,
t1.total_amount_dr,
t1.total_amount_cr,
(select c.company_short_name
from fnd_companies_vl c
where c.company_id = t1.je_company_id) js_company_short_name,
t1.period_name,
t
1.
journal_date,
t
o_char(t1.journal_date,'yyyy-mm-dd')
journal_date,
t1.currency_code,
(SELECT gc.currency_name
FROM gld_currency_v gc
...
...
@@ -52,10 +54,12 @@
</bm:operations>
<bm:query-fields>
<bm:query-field
name=
"journal_num"
queryExpression=
"t1.journal_num like ${@journal_num}"
/>
<bm:query-field
name=
"journal_date_from"
queryExpression=
"t1.journal_date
>= to_date(${@journal_date_from},'yyyy-mm-dd')"
/>
<bm:query-field
name=
"journal_date_to"
queryExpression=
"t1.journal_date
<= to_date(${@journal_date_to},'yyyy-mm-dd')"
/>
<bm:query-field
name=
"journal_date_from"
queryExpression=
"to_date(t1.journal_date,'yyyy-mm-dd')
>= to_date(${@journal_date_from},'yyyy-mm-dd')"
/>
<bm:query-field
name=
"journal_date_to"
queryExpression=
"to_date(t1.journal_date,'yyyy-mm-dd')
<= to_date(${@journal_date_to},'yyyy-mm-dd')"
/>
<bm:query-field
name=
"total_amount_dr_from"
datatype=
"java.lang.Double"
queryExpression=
"nvl(t1.total_amount_dr,t1.total_amount_cr) >= ${@total_amount_dr_from}"
/>
<bm:query-field
name=
"total_amount_dr_to"
datatype=
"java.lang.Double"
queryExpression=
"nvl(t1.total_amount_dr,t1.total_amount_cr) <= ${@total_amount_dr_to}"
/>
<bm:query-field
name=
"journal_submit_batch_id"
queryExpression=
"t1.journal_submit_batch_id = ${@journal_submit_batch_id}"
/>
<bm:query-field
name=
"description"
queryExpression=
"t1.description like ${@description}"
/>
<bm:query-field
name=
"wfl_status"
queryExpression=
"t1.wfl_status=${@wfl_status}"
/>
</bm:query-fields>
</bm:model>
src/main/webapp/WEB-INF/classes/zjwfl/ZJWFL1060/wfl_instance_pdf.lwm
0 → 100644
View file @
98b4d4a8
<?xml version="1.0" encoding="UTF-8"?>
<bm:model
xmlns:bm=
"http://www.leaf-framework.org/schema/bm"
needAccessControl=
"false"
>
<bm:operations>
<bm:operation
name=
"update"
>
<bm:update-sql>
<![CDATA[
BEGIN
wfl_instance_pdf_pkg.create_wfl_instance_content(p_instance_id =>
${@instance_id},
p_user_id => ${/session/@user_id});
commit;
END;
]]>
</bm:update-sql>
</bm:operation>
<bm:operation
name=
"execute"
>
<bm:update-sql>
<![CDATA[
BEGIN
wfl_instance_pdf_pkg.insert_fnd_atm(
p_table_name =>
${@table_name},
p_table_pk_value =>${@instance_id},
p_file_name =>${@file_name},
p_file_path =>${@file_path},
p_user_id =>nvl(${/session/@user_id},1),
p_file_size =>${@file_size}
);
END;
]]>
</bm:update-sql>
</bm:operation>
<bm:operation
name=
"query"
>
<bm:query-sql>
<![CDATA[
SELECT
faa.file_name,
faa.file_path,
faa.file_type_code,
'建机审批流版式文件-'||z.workflow_desc||'-'||z.instance_id||'.docx' to_file_name,
lt.pwd,
fc.document_id,
fc.content_id
FROM
fnd_atm_attachment faa,
fnd_atm_attachment_multi m,
hls_doc_file_templet lt,
con_clause_templet t,
hls_doc_file_content fc,
zj_wfl_workflow_instance_v z
WHERE
faa.attachment_id = m.attachment_id AND
m.table_name = 'HLS_DOC_FILE_TEMPLET' AND
m.table_pk_value = lt.templet_id AND
lt.templet_id = t.doc_template_id AND
t.doc_plugin_flag = 'Y' AND
t.templet_id = fc.templet_Id AND
fc.document_id = z.instance_id AND
fc.document_table = 'ZJ_WFL_WORKFLOW_INSTANCE' and
z.instance_id = ${@instance_id}
]]>
</bm:query-sql>
</bm:operation>
<bm:operation
name=
"insert"
>
<bm:update-sql>
<![CDATA[
begin
wfl_instance_pdf_pkg.save_pdf_atm(p_instance_id =>
${@instance_id},
p_table_name =>${@table_name});
end;
]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field
name=
"file_name"
databaseType=
"VARCHAR2"
datatype=
"java.lang.String"
physicalName=
"FILE_NAME"
/>
<bm:field
name=
"file_path"
databaseType=
"VARCHAR2"
datatype=
"java.lang.String"
physicalName=
"FILE_PATH"
/>
<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=
"pwd"
databaseType=
"VARCHAR2"
datatype=
"java.lang.String"
physicalName=
"PWD"
/>
<bm:field
name=
"document_id"
databaseType=
"NUMBER"
datatype=
"java.lang.Long"
physicalName=
"DOCUMENT_ID"
/>
<bm:field
name=
"content_id"
databaseType=
"NUMBER"
datatype=
"java.lang.Long"
physicalName=
"CONTENT_ID"
/>
</bm:fields>
</bm:model>
src/main/webapp/modules/hls/HLS536/hls_journal_import_wfl.lview
View file @
98b4d4a8
This diff is collapsed.
Click to expand it.
src/main/webapp/modules/zjwfl/ZJWFL1060/wfl_instance_pdf.lsc
0 → 100644
View file @
98b4d4a8
<?xml version="1.0" encoding="UTF-8"?>
<a:service
xmlns:a=
"http://www.leaf-framework.org/application"
xmlns:s=
"leaf.plugin.script"
trace=
"true"
>
<a:init-procedure>
<s:server-script
import=
"con_print_path.js"
>
<![CDATA[
set_parameter_file_path();
]]>
</s:server-script>
<s:server-script>
<![CDATA[
importPackage(java.io);
importPackage(Packages.hls.plugin.docx4j);
importPackage(Packages.leaf.plugin.word2pdf);
function copyFile(fOld, fNew) {
var fis = new java.io.FileInputStream(fOld);
var fos = new java.io.FileOutputStream(fNew);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 4);
var len = -1;
while ((len = fis.read(b)) != -1) {
fos.write(b, 0, len);
}
fis.close();
fos.close();
}
function get_file_length(path){
var file=new File(String(path));
if(file.exists() && file.isFile()){
//println(f.length());
length=file.length();
return length;}
else{
return 0 ;}
}
var instance_id = $ctx.parameter.instance_id;
$bm('zjwfl.ZJWFL1060.wfl_instance_pdf').update({
instance_id: instance_id
});
var file_templet_get_atm_path = $bm('zjwfl.ZJWFL1060.wfl_instance_pdf').queryAsMap({
instance_id: instance_id
});
var from_file_data = file_templet_get_atm_path.getChildren();
for (var i = 0;i < from_file_data.length;i++) {
var to_file_path = $ctx.parameter.file_path;
var record_data = from_file_data[i];
var to_file_name = record_data.to_file_name ;
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_tables = guid_file_name_path.getChildren();
to_file_path = to_file_path + guid_file_name_tables[0].guid_file_name + 'wfl' + record_data.content_id;
copyFile(from_file_path, to_file_path);
//放入实例id方便表单参数取值
$ctx.current_parameter.document_id = instance_id;
try {
var brwt = new BookmarksReplaceWithText($instance('leaf.database.service.IDatabaseServiceFactory'), $instance('uncertain.ocm.IObjectRegistry'), $ctx.getData());
brwt.replaceBookmarkFromContent(to_file_path.toString(), record_data.content_id,'COMMON');
} catch (e) {
raise_app_error(e);
}
word_to_pdf_sign(record_data.content_id,to_file_path.toString());
//得到生成的pdf文件的大小
var file_size=get_file_length(to_file_path.toString() + '.pdf');
//关联附件表
$bm('zjwfl.ZJWFL1060.wfl_instance_pdf').execute({
table_name: 'ZJ_WFL_WORKFLOW_INSTANCE',
instance_id: instance_id,
file_name: to_file_name.toString(),
file_path: to_file_path.toString(),
file_size: file_size
});
var attachment_update = $bm('zjwfl.ZJWFL1060.wfl_instance_pdf');
//更新转换的pdf附件,其附件表的字段
//这里的附件关联表是工作流监控表
attachment_update.insert({
instance_id: instance_id,
table_name: 'ZJ_WFL_WORKFLOW_INSTANCE'
});
}
function word_to_pdf_sign(content_id,file_path) {
importPackage(Packages.com.hl.signatures);
importPackage(Packages.java.io);
importPackage(Packages.java.util);
var outputfilepath = file_path + '.pdf'; // 由于wordToPdf转换后pdf文件已经带有.pdf
var wordToPdf = new WordToPdf($instance('uncertain.ocm.IObjectRegistry'), "jacob-1.19-x64.dll");
wordToPdf.word2pdf(file_path, outputfilepath);
}
]]>
</s:server-script>
</a:init-procedure>
</a:service>
src/main/webapp/modules/zjwfl/ZJWFL1060/zj_wfl_monitoring_query.lview
View file @
98b4d4a8
...
...
@@ -9,8 +9,38 @@
<a:link
id=
"pageLink_node_approve_history"
url=
"${/request/@context_path}/modules/zjwfl/ZJWFL1060/zj_wfl_monitoring_node_approve_history.lview"
/>
<a:link
id=
"pageLink_view_graphics"
url=
"${/request/@context_path}/modules/zjwfl/zj_wfl_graphics.lview"
/>
<a:link
id=
"pageLink_do_operation"
url=
"${/request/@context_path}/modules/zjwfl/ZJWFL1060/zj_wfl_monitoring_admin_operation.lview"
/>
<a:link
id=
"wfl_instance_pdf_link"
url=
"${/request/@context_path}/modules/zjwfl/ZJWFL1060/wfl_instance_pdf.lsc"
/>
<a:link
id=
"attachment_downloadFile_link"
url=
"${/request/@context_path}/downloadFile.lview"
/>
<a:screen-include
screen=
"modules/zjwfl/zj_wfl_common_javascript.lview"
/>
<script
type=
"text/javascript"
>
<![CDATA[
function get_pdf() {
var ds = $('monitorDs');
var records = ds.getSelected();
if(records.length != 1){
Leaf.showMessage('${l:PROMPT}', '请选择一条记录生成附件');
return;
}
var record = records[0];
var param = {};
param['instance_id'] = record.get('instance_id');
Leaf.Masker.mask(Ext.getBody(), '正在生成...');
Leaf.request({
url: $('wfl_instance_pdf_link').getUrl(),
para: param,
success: function() {
Leaf.Masker.unmask(Ext.getBody());
//生成之后重新查询数据
ds.query();
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
},
error: function() {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
function query_monitorDs() {
$('monitorDs').query();
}
...
...
@@ -84,6 +114,8 @@
else if(name=='do_operation')
{
return '
<a
href=
\"javascript:winOpen_do_operation('
+
record.get('instance_id')
+
','
+
record.get('workflow_id')
+
')\"
>
操作
</a>
';
}else if (name == 'wlf_pdf') {
return '
<a
href=
"javascript:attachment_downFile_win(\'' + record.get('instance_id') + '\')"
>
' + '附件查看' + '
</a>
';
}
}
function onload(ds) {
...
...
@@ -92,6 +124,16 @@
grid_id.hideColumn('do_operation');
}
}
function attachment_downFile_win(instance_id) {
new Leaf.Window({
id: 'open_attachment_window',
url: $('attachment_downloadFile_link').getUrl() + '?table_name=ZJ_WFL_WORKFLOW_INSTANCE
&
header_id=' + instance_id,
title: '工作流附件',
width: 850,
height: 200
});
}
]]>
</script>
<a:dataSets>
<a:dataSet
id=
"instanceStatusDs"
>
...
...
@@ -111,7 +153,7 @@
<a:field
name=
"workflow_desc"
readOnly=
"true"
/>
</a:fields>
</a:dataSet>
<a:dataSet
id=
"monitorDs"
autoPageSize=
"true"
autoQuery=
"true"
model=
"zjwfl.ZJWFL1060.zj_wfl_monitoring_query"
queryDataSet=
"para_monitorDs"
>
<a:dataSet
id=
"monitorDs"
autoPageSize=
"true"
autoQuery=
"true"
model=
"zjwfl.ZJWFL1060.zj_wfl_monitoring_query"
queryDataSet=
"para_monitorDs"
selectable=
"true"
>
<a:events>
<a:event
name=
"load"
handler=
"onload"
/>
</a:events>
...
...
@@ -130,6 +172,7 @@
<a:hBox>
<a:button
click=
"query_monitorDs"
text=
"HAP_QUERY"
/>
<a:button
click=
"reset_para_monitorDs"
text=
"HAP_RESET"
/>
<a:button
click=
"get_pdf"
text=
"生成一个工作流实例的附件"
/>
</a:hBox>
<a:grid
id=
"monitorDs_grid"
bindTarget=
"monitorDs"
marginHeight=
"200"
marginWidth=
"50"
navBar=
"true"
>
<a:columns>
...
...
@@ -146,6 +189,7 @@
<a:column
name=
"approve_history"
align=
"center"
prompt=
"明细"
renderer=
"render_monitorDs_grid"
width=
"50"
/>
<!-- <a:column name="view_graphics" align="center" prompt="流程图" renderer="render_monitorDs_grid" width="50"/> -->
<a:column
name=
"do_operation"
align=
"center"
prompt=
"操作"
renderer=
"render_monitorDs_grid"
width=
"50"
/>
<a:column
name=
"wlf_pdf"
align=
"center"
prompt=
"附件查看"
renderer=
"render_monitorDs_grid"
width=
"100"
/>
</a:columns>
</a:grid>
</a:screenBody>
...
...
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