Commit 56a37a0d authored by gzj34291's avatar gzj34291

Merge remote-tracking branch 'origin/remote_dev' into remote_dev

parents 18dceb94 faad2325
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<select id="selectCashflowList" parameterType="integer" resultType="java.util.LinkedHashMap"> <select id="selectCashflowList" parameterType="integer" resultType="java.util.LinkedHashMap">
Select Select
contract_id, contract_id,
cashflow_id, cashflow_id,
write_off_id, write_off_id,
...@@ -806,35 +806,20 @@ ...@@ -806,35 +806,20 @@
nvl(cc2.write_off_flag, 'NOT') != nvl(cc2.write_off_flag, 'NOT') !=
'NOT')) 'NOT'))
And rownum = 1)) due_date, And rownum = 1)) due_date,
nvl(t1.due_amount, nvl(t1.due_amount,
(Select cc2.due_amount (Select cc2.due_amount
From con_contract_cashflow cc2 From con_contract_cashflow cc2
Where cc2.contract_id = t2.contract_id Where cc2.contract_id = t2.contract_id
And cc2.times = t2.times And cc2.times = t2.times
And cc2.cf_item Not In (0, 9) And cc2.cf_item Not In (0, 9)
And ((cc2.cf_direction = 'INFLOW' And And ((cc2.cf_direction = 'INFLOW' And
cc2.cf_status = 'RELEASE') Or cc2.cf_status = 'RELEASE') Or
(t2.contract_status In (t2.contract_status In
('REPURING', 'REPUR') And ('REPURING', 'REPUR') And
cc2.cf_direction = 'NONCASH' And cc2.cf_direction = 'NONCASH' And
cc2.cf_status = 'BLOCK' And cc2.cf_status = 'BLOCK' And
nvl(cc2.write_off_flag, 'NOT') != nvl(cc2.write_off_flag, 'NOT') != 'NOT'))
'NOT')) And rownum = 1) ) As due_amount,
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,
nvl(t1.transaction_date, t2.transaction_date) transaction_date, nvl(t1.transaction_date, t2.transaction_date) transaction_date,
nvl(t1.write_off_date, t2.write_off_date) write_off_date, nvl(t1.write_off_date, t2.write_off_date) write_off_date,
nvl(t1.received_amount, 0) As received_amount, nvl(t1.received_amount, 0) As received_amount,
...@@ -1102,10 +1087,10 @@ ...@@ -1102,10 +1087,10 @@
And nvl(cc2.received_amount, 0) != 0), And nvl(cc2.received_amount, 0) != 0),
-1)))) -1))))
Order By times, Order By times,
--cf_item,
--due_amount Desc, --due_amount Desc,
transaction_date, transaction_date,
write_off_date, write_off_date,
cf_item,
write_off_id) write_off_id)
</select> </select>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2023年2月7日 09点13分
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:e="leaf.service.exception" xmlns:o="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" needAccessControl="false">
<bm:fields>
<bm:field name="is_valid" databaseType="VARCHAR2" datatype="java.lang.String"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select token_post_pkg.check_token_valid is_valid from dual
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: zhangxing5129
$Date: 2014-7-14 下午03:09:37
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:o="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT t.access_token
FROM (SELECT v.record_id, v.access_token
FROM token_record_info v
where v.start_time <= sysdate
and v.over_time >= sysdate
order by v.record_id desc) t
where rownum = 1
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
token_post_pkg.insert_token_recode(p_system_source =>${@system_source},
p_expires_in =>${@expires_in},
p_access_token =>${@access_token},
p_user_id => ${/session/@user_id}
);
end;]]></bm:update-sql>
</bm:operation>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
insert into token_response_logs
(
log_id,
response_json,
status,
created_by,
creation_date,
last_updated_by,
last_update_date
) values
(token_response_logs_s.nextval,
${@json},
${@status},
${/session/@user_id},
sysdate,
${/session/@user_id},
sysdate
);
commit;
end;]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="access_token"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2023-2-7 下午2:36:27
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="E_ARCHIVES_DEFINE_DATA" defaultOrderBy="cloumn_code"
<bm:fields>
<bm:field name="base_archive_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BASE_ARCHIVE_ID" />
<bm:field name="sture_data_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="STURE_DATA_ID" />
<bm:field name="cloumn_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CLOUMN_CODE" />
<bm:field name="cloumn_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CLOUMN_NAME" />
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select t1.base_archive_id,
t1.sture_data_id,
t1.cloumn_code,
t1.cloumn_name
from E_ARCHIVES_DEFINE_DATA t1
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.cloumn_code_update(
p_sql_type =>'INSERT',
p_sture_data_id => ${@sture_data_id},
p_base_archive_id => ${@base_archive_id},
p_cloumn_code => ${@cloumn_code},
p_cloumn_name => ${@cloumn_name},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.cloumn_code_update(
p_sql_type =>'UPDATE',
p_sture_data_id => ${@sture_data_id},
p_base_archive_id => ${@base_archive_id},
p_cloumn_code => ${@cloumn_code},
p_cloumn_name => ${@cloumn_name},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="delete">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.cloumn_code_delete(
p_sture_data_id => ${@sture_data_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:data-filters>
<bm:data-filter name="base_archive_id" enforceOperations="query" expression="base_archive_id=${@base_archive_id}"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luochenglong
$Date: 2023-02-07 早上 11:03:31
$Revision: 1.0
$Purpose: 电子档案类型定义bm
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="E_ARCHIVES_DEFINE" defaultOrderBy="base_archive_code">
<bm:fields>
<bm:field name="base_archive_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BASE_ARCHIVE_ID" />
<bm:field name="base_archive_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BASE_ARCHIVE_CODE" />
<bm:field name="archive_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ARCHIVE_TYPE" />
<bm:field name="post_stru_data_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="POST_STRU_DATA_FLAG" />
<bm:field name="stru_data_sql" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="STRU_DATA_SQL" />
<bm:field name="is_workflow" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="IS_WORKFLOW" />
<bm:field name="workflow_id" databaseType="NUMBER" datatype="java.lang.String" physicalName="WORKFLOW_ID" />
<bm:field name="post_atm_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="POST_ATM_FLAG" />
<bm:field name="atm_sql" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATM_SQL" />
<bm:field name="je_check_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="JE_CHECK_FLAG" />
<bm:field name="je_source_sql" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="JE_SOURCE_SQL" />
<bm:field name="workflow_desc" forInsert="false" expression="(SELECT c.workflow_desc FROM zj_wfl_workflow c where c.workflow_id= t1.workflow_id)" forUpdate="false"/>
<bm:field name="archive_type_desc" forInsert="false" expression="(SELECT c.code_value_name FROM sys_code_values_v c where c.code=&apos;DATA_CLASSIFICATION&apos; and c.code_value = t1.archive_type)" forUpdate="false" />
<bm:field name="is_workflow_desc" forInsert="false" expression="(SELECT c.code_value_name FROM sys_code_values_v c where c.code=&apos;YES_NO&apos; and c.code_value = t1.is_workflow)" forUpdate="false" />
<bm:field name="post_stru_data_flag_desc" forInsert="false" expression="(SELECT c.code_value_name FROM sys_code_values_v c where c.code=&apos;YES_NO&apos; and c.code_value = t1.post_stru_data_flag)" forUpdate="false"/>
<bm:field name="post_atm_flag_desc" forInsert="false" expression="(SELECT c.code_value_name FROM sys_code_values_v c where c.code=&apos;YES_NO&apos; and c.code_value = t1.post_atm_flag)" forUpdate="false" />
<bm:field name="je_check_flag_desc" forInsert="false" expression="(SELECT c.code_value_name FROM sys_code_values_v c where c.code=&apos;YES_NO&apos; and c.code_value = t1.je_check_flag)" forUpdate="false"/>
</bm:fields>
<bm:operations>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.elec_type_update(
p_sql_type =>'INSERT',
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="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 field="archive_type" queryExpression="t1.archive_type =${@archive_type}"/>
<bm:query-field field="is_workflow" queryExpression="t1.is_workflow =${@is_workflow}"/>
<bm:query-field field="post_atm_flag" queryExpression="t1.post_atm_flag =${@post_atm_flag}"/>
<bm:query-field field="je_check_flag" queryExpression="t1.je_check_flag =${@je_check_flag}"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luochenglong
$Date: 2023-02-07 下午3:03:31
$Revision: 1.0
$Purpose: 凭证模板bm
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="E_ARCHIVES_DEFINE_JE" defaultOrderBy="je_template_code">
<bm:fields>
<bm:field name="base_archive_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BASE_ARCHIVE_ID" />
<bm:field name="je_id" databaseType="NUMBER" datatype="java.lang.String" physicalName="JE_ID" />
<bm:field name="je_template_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="JE_TEMPLATE_CODE" />
<bm:field name="je_template_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="JE_TEMPLATE_NAME" />
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select t1.base_archive_id,
t1.je_id,
t1.je_template_code,
t1.je_template_name
from E_ARCHIVES_DEFINE_JE t1
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.je_template_update(
p_sql_type =>'INSERT',
p_je_id => ${@je_id},
p_base_archive_id => ${@base_archive_id},
p_je_template_code => ${@je_template_code},
p_je_template_name => ${@je_template_name},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.je_template_update(
p_sql_type =>'UPDATE',
p_je_id => ${@je_id},
p_base_archive_id => ${@base_archive_id},
p_je_template_code => ${@je_template_code},
p_je_template_name => ${@je_template_name},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="delete">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.je_template_delete(
p_je_id => ${@je_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:data-filters>
<bm:data-filter name="base_archive_id" enforceOperations="query" expression="base_archive_id=${@base_archive_id}"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2023-2-7 下午2:36:27
$Revision: 1.0
$Purpose:
-->
<ns1:model xmlns:ns1="http://www.leaf-framework.org/schema/bm" alias="t1" defaultOrderBy="workflow_id desc" extend="zjwfl.zj_wfl_workflow">
<ns1:fields>
<ns1:field name="workflow_id" databaseType="NUMBER" datatype="java.lang.Long"/>
<ns1:field name="workflow_code" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" prompt="流程代码"/>
<ns1:field name="workflow_desc" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" prompt="流程描述"/>
<ns1:field name="workflow_type_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WORKFLOW_TYPE_ID"/>
<ns1:field name="sub_category"/>
<ns1:field name="enabled_flag"/>
</ns1:fields>
<ns1:query-fields>
<ns1:query-field field="workflow_code" queryOperator="like"/>
<ns1:query-field field="workflow_desc" queryOperator="like"/>
<ns1:query-field field="sub_category" queryExpression="t1.sub_category = ${/parameter/@sub_category}"/>
<ns1:query-field field="workflow_type_id" queryExpression="t1.workflow_type_id = ${/parameter/@workflow_type_id}"/>
</ns1:query-fields>
<ns1:data-filters>
<ns1:data-filter enforceOperations="query" expression="t1.enabled_flag = &apos;Y&apos;"/>
</ns1:data-filters>
</ns1:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2023-2-7 下午2:36:27
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select
t.e_archives_id,
t.base_archive_code,
t.archive_type,
(select v.code_value_name value_name
from sys_code_values_v v
where v.code = 'ELEC_FILE_TYPE'
and v.code_value = t.archive_type) archive_type_desc,
t.document_id,
t.document_number,
t.document_info,
t.done_flag,
t.workflow_id,
(select v.code_value_name value_name
from sys_code_values_v v
where v.code = 'DONE_FLAG_STATUS'
and v.code_value = t.done_flag) done_flag_desc,
t.error_message,
to_char(t.last_update_date,'yyyy-mm-dd') last_update_date
from hl_e_archives_post_list t
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="archive_type" queryExpression="t.archive_type like ${@archive_type}"/>
<bm:query-field name="done_flag" queryExpression="t.done_flag=${@done_flag}"/>
<bm:query-field name="document_id" queryExpression="t.document_id=${@document_id}"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2023-2-7 下午2:36:27
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.efile_generate_pool(p_e_archives_id => ${@e_archives_id},
p_base_archive_code => ${@base_archive_code},
p_archive_type => ${@archive_type},
p_document_id => ${@document_id},
p_document_number => ${@document_number},
p_document_info => ${@document_info},
p_workflow_id => ${@workflow_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?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
fam.table_name,
fam.table_pk_value,
fam.record_id,
faa.attachment_id,
faa.file_name,
faa.file_type_code,
faa.file_path
FROM
fnd_atm_attachment_multi fam,
fnd_atm_attachment faa
WHERE
faa.rowid =${@rowid} AND
fam.attachment_id = faa.attachment_id
]]></bm:query-sql>
<bm:parameters>
<bm:parameter name="rowid"/>
</bm:parameters>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="table_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TABLE_NAME" required="true"/>
<bm:field name="table_pk_value" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TABLE_PK_VALUE" required="true"/>
<bm:field name="record_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RECORD_ID" required="true"/>
<bm:field name="attachment_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ATTACHMENT_ID" required="true"/>
<bm:field name="file_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_NAME"/>
<bm:field name="file_type_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_TYPE_CODE"/>
<bm:field name="file_path" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_PATH"/>
</bm:fields>
</bm:model>
<?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 * from (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,
t1.e_archives_id,
(SELECT DISTINCT zwi.workflow_id
FROM zj_wfl_workflow_instance zwi,
zj_wfl_workflow zww
WHERE zww.workflow_id = zwi.workflow_id
AND zwi.instance_id = t1.document_id) workflow_id,
(SELECT e.je_check_flag
FROM e_archives_define e
WHERE e.base_archive_code = t1.base_archive_code
AND e.workflow_id = (SELECT DISTINCT zwi.workflow_id
FROM zj_wfl_workflow_instance zwi,
zj_wfl_workflow zww
WHERE zww.workflow_id = zwi.workflow_id
AND zwi.instance_id = t1.document_id)) je_check_flag,
(SELECT e.base_archive_id
FROM e_archives_define e
WHERE e.base_archive_code = t1.base_archive_code
AND e.workflow_id = (SELECT DISTINCT zwi.workflow_id
FROM zj_wfl_workflow_instance zwi,
zj_wfl_workflow zww
WHERE zww.workflow_id = zwi.workflow_id
AND zwi.instance_id = t1.document_id)) base_archive_id,
nvl((SELECT gps.monthly_closed_flag
FROM gld_periods gp,
gld_period_status gps
WHERE REPLACE(gp.period_name,
'-',
'') = t1.internal_period_num
AND gps.company_id = ${ / session / @company_id}
AND gp.internal_period_num = gps.internal_period_num
AND gps.period_set_code = gp.period_set_code),
'N') monthly_closed_flag,
(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,
t1.hly_req_number AS post_batch_num,
t1.post_message
FROM hl_e_archives_pool t1
where t1.creation_date>=sysdate-30)
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="e_archives_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="E_ARCHIVES_ID" />
<bm:field name="workflow_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WORKFLOW_ID" />
<bm:field name="je_check_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="JE_CHECK_FLAG"/>
<bm:field name="base_archive_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BASE_ARCHIVE_ID" />
<bm:field name="monthly_closed_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="MONTHLY_CLOSED_FLAG"/>
<bm:field name="pool_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="POOL_ID" />
<bm:field name="primary_field" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PRIMARY_ID" />
<bm:field name="internal_period_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INTERNAL_PERIOD_NUM"/>
<bm:field name="base_archive_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BASE_ARCHIVE_CODE" />
<bm:field name="archive_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ARCHIVE_TYPE"/>
<bm:field name="document_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DOCUMENT_ID"/>
<bm:field name="document_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_NUMBER"/>
<bm:field name="post_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_NUMBER"/>
<bm:field name="document_info" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="POST_STATUS"/>
<bm:field name="post_message" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="POST_MESSAGE"/>
</bm:fields>
</bm:model>
<?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,
t1.e_archives_id,
(SELECT DISTINCT zwi.workflow_id
FROM zj_wfl_workflow_instance zwi,
zj_wfl_workflow zww
WHERE zww.workflow_id = zwi.workflow_id
AND zwi.instance_id = t1.document_id) workflow_id,
(SELECT e.je_check_flag
FROM e_archives_define e
WHERE e.base_archive_code = t1.base_archive_code
AND e.workflow_id = (SELECT DISTINCT zwi.workflow_id
FROM zj_wfl_workflow_instance zwi,
zj_wfl_workflow zww
WHERE zww.workflow_id = zwi.workflow_id
AND zwi.instance_id = t1.document_id)) je_check_flag,
(SELECT e.base_archive_id
FROM e_archives_define e
WHERE e.base_archive_code = t1.base_archive_code
AND e.workflow_id = (SELECT DISTINCT zwi.workflow_id
FROM zj_wfl_workflow_instance zwi,
zj_wfl_workflow zww
WHERE zww.workflow_id = zwi.workflow_id
AND zwi.instance_id = t1.document_id)) base_archive_id,
nvl((SELECT gps.monthly_closed_flag
FROM gld_periods gp,
gld_period_status gps
WHERE REPLACE(gp.period_name,
'-',
'') = t1.internal_period_num
AND gps.company_id = ${ / session / @company_id}
AND gp.internal_period_num = gps.internal_period_num
AND gps.period_set_code = gp.period_set_code),
'N') monthly_closed_flag,
(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 = nvl(t1.suppl_trans_flag,'N')) suppl_trans_flag_desc,
t1.hly_req_number AS post_batch_num,
t1.suppl_trans_flag,
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.elec_type_update(
p_sql_type =>'INSERT',
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="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="original_archive_no" queryExpression="t1.original_archive_no =${@original_archive_no}"/>
<bm:query-field name="post_status" queryExpression="t1.post_status =${@post_status}"/>
<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>
<?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 '{'||pt.atm_data_json||'}' sql_content
from hl_e_archives_pool_data pt
where pt.pool_id = ${@pool_id}
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="sql_content" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SQL"/>
</bm:fields>
</bm:model>
<?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 '{'||pt.stru_data_json||'}' sql_content
from hl_e_archives_pool_data pt
where pt.pool_id = ${@pool_id}
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="sql_content" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SQL"/>
</bm:fields>
</bm:model>
<?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>
<?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.doc_import_return(
p_primary_field =>${@primary_field},
p_post_status =>${@post_status},
p_post_message =>${@post_message},
p_hly_req_number =>${@hly_req_number},
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>
<?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 pt.atm_data_json attachmentList,pt.stru_data_json as fieldValueList
from hl_e_archives_pool_data pt
where pt.pool_id = ${@pool_id}
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="fieldValueList"/>
<bm:field name="attachmentList"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<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 elec_wfl_pkg.get_sql_value(p_e_archives_id =>${@e_archives_id},
p_instance_id =>${@document_id},
p_sql_type =>'JE_DATA_JSON',
p_workflow_id =>${@workflow_id},
p_user_id =>${/session/@user_id}) je_data_json from dual
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="je_data_json"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2022-12-22 下午1:05:40
$Revision: 1.0
$Purpose: 批量刪除
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="delete">
<bm:update-sql><![CDATA[
BEGIN
hls_journal_import_pkg.delete_hls_journal_import( p_journal_header_id =>${@journal_header_id}, p_user_id =>${/session/@user_id} );
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: lixi
$Date: 2011-8-1 上午10:21:39
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select fnd_interface_headers_s.nextval header_id from dual
]]></bm:query-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
BEGIN
hls_journal_import_pkg.reverse_hls_journal_import( p_journal_header_id =>${@journal_header_id}, p_user_id =>${/session/@user_id} );
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2022-12-6 下午2:36:27
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select t1.journal_header_id,
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,
to_char(t1.journal_date,'yyyy-mm-dd') journal_date,
t1.currency_code,
(SELECT gc.currency_name
FROM gld_currency_v gc
WHERE gc.currency_code = t1.currency_code) currency_desc,
t1.total_amount_fuc_dr,
(SELECT d.je_transaction_desc
FROM gld_je_transaction d
WHERE d.je_transaction_code = t1.je_transaction_code) je_transaction_desc,
t1.description,
(SELECT COUNT(1)
FROM hls_journal_detail_imp t
WHERE t.journal_header_id = t1.journal_header_id) je_detail_count,
t1.wfl_status,
(select v.code_value_name value_name
from sys_code_values_v v
where v.code = 'HLS536_WFL_STATUS'
and v.code_value = t1.wfl_status) wfl_status_n,
t1.reversed_flag,
t1.reverse_wfl_status,
(select v.code_value_name value_name
from sys_code_values_v v
where v.code = 'HLS536_WFL_STATUS_REVERSE'
and v.code_value = t1.reverse_wfl_status) reverse_wfl_status_n,
t1.journal_type,
(select t.post_gl_status
from hls_journal_header t
where t.journal_header_imp_id = t1.journal_header_id
) post_gl_status
FROM hls_journal_header_imp t1
#WHERE_CLAUSE#
order by t1.journal_header_id desc
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:data-filters>
<bm:data-filter name="query" expression="t1.reversed_journal_header_id is null "/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field name="journal_num" queryExpression="t1.journal_num like ${@journal_num}"/>
<bm:query-field name="journal_date_from" queryExpression="to_date(t1.journal_date,'yyyy-mm-dd') &gt;= to_date(${@journal_date_from},'yyyy-mm-dd')"/>
<bm:query-field name="journal_date_to" queryExpression="to_date(t1.journal_date,'yyyy-mm-dd') &lt;= 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) &gt;= ${@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) &lt;= ${@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-field name="reverse_wfl_status" queryExpression="t1.reverse_wfl_status=${@reverse_wfl_status}"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2022-12-6 下午2:36:27
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select t1.journal_header_id,
t1.journal_submit_batch_id,
t1.journal_reverse_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,
to_char(t1.journal_date,'yyyy-mm-dd') journal_date,
t1.currency_code,
(SELECT gc.currency_name
FROM gld_currency_v gc
WHERE gc.currency_code = t1.currency_code) currency_desc,
t1.total_amount_fuc_dr,
(SELECT d.je_transaction_desc
FROM gld_je_transaction d
WHERE d.je_transaction_code = t1.je_transaction_code) je_transaction_desc,
t1.description,
(SELECT COUNT(1)
FROM hls_journal_detail_imp t
WHERE t.journal_header_id = t1.journal_header_id) je_detail_count,
t1.wfl_status,
(select v.code_value_name value_name
from sys_code_values_v v
where v.code = 'HLS536_WFL_STATUS'
and v.code_value = t1.wfl_status) wfl_status_n,
t1.reverse_wfl_status,
(select v.code_value_name value_name
from sys_code_values_v v
where v.code = 'HLS536_WFL_STATUS_REVERSE'
and v.code_value = t1.reverse_wfl_status) reverse_wfl_status_n,
t1.journal_type,
(select t.post_gl_status
from hls_journal_header t
where t.journal_header_imp_id = t1.journal_header_id) post_gl_status
FROM hls_journal_header_imp t1
#WHERE_CLAUSE#
order by t1.journal_header_id desc
]]></bm:query-sql>
</bm:operation>
</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="to_date(t1.journal_date,'yyyy-mm-dd') &gt;= to_date(${@journal_date_from},'yyyy-mm-dd')"/>
<bm:query-field name="journal_date_to" queryExpression="to_date(t1.journal_date,'yyyy-mm-dd') &lt;= 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) &gt;= ${@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) &lt;= ${@total_amount_dr_to}"/>
<bm:query-field name="journal_reverse_batch_id" queryExpression="t1.journal_reverse_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>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
Select ep.position_code
From exp_employees e, exp_employee_assigns ea, exp_org_position ep
Where e.employee_id = ea.employee_id
And ea.position_id = ep.position_id
And nvl(e.enabled_flag, 'N') = 'Y'
And nvl(ea.enabled_flag, 'N') = 'Y'
And nvl(ep.enabled_flag, 'N') = 'Y'
And nvl(ea.primary_position_flag, 'N') = 'Y'
And e.employee_id = (Select t.employee_id
From sys_user t
Where t.user_id = ${/session/@user_id})
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
BEGIN
hls_journal_import_pkg.insert_hls_journal_tmp(p_user_id => ${/session/@user_id},
p_header_id => ${/model/header/record/@header_id},
p_company_id => ${/session/@company_id},
p_template_type=>${@template_type}
);
END;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter inputPath="/session/@user_id"/>
<bm:parameter inputPath="/session/@session_id"/>
<bm:parameter inputPath="/session/@template_type"/>
</bm:parameters>
</bm:operation>
<bm:operation name="update" >
<bm:update-sql><![CDATA[
BEGIN
hls_journal_import_pkg.init_journal_atm(p_document_number =>${@document_number},
p_file_path =>${@file_path},
p_file_name =>${@file_name},
p_file_length =>${@file_length},
p_user_id =>${/session/@user_id});
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="insert">
<bm:parameters>
<bm:parameter name="journal_submit_batch_id" output="true" outputPath="@journal_submit_batch_id"/>
</bm:parameters>
<bm:update-sql>
<![CDATA[
declare
v_journal_submit_batch_id hls_journal_submit_batch.journal_submit_batch_id%TYPE := hls_journal_submit_batch_s.nextval;
begin
${@journal_submit_batch_id} := v_journal_submit_batch_id;
insert into hls_journal_submit_batch
(journal_submit_batch_id,
instance_id,
wfl_status,
wfl_type,
created_by,
creation_date,
last_updated_by,
last_update_date)
values
(v_journal_submit_batch_id,
null,
'NEW',
'',
${/session/@user_id},
sysdate,
${/session/@user_id},
sysdate
);
end;
]]>
</bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql>
<![CDATA[
begin
update hls_journal_header_imp hjhi
set hjhi.reverse_wfl_status = 'APPROVING',
hjhi.journal_reverse_batch_id = ${/parameter/@journal_submit_batch_id},
hjhi.last_updated_by = ${/session/@user_id},
hjhi.last_update_date = sysdate
where hjhi.journal_header_id = ${@journal_header_id};
end;
]]>
</bm:update-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql>
<![CDATA[
begin
hls_journal_import_pkg.submit_hls_journal_reverse(
p_journal_submit_batch_id => ${/parameter/@journal_submit_batch_id},
p_user_id => ${/session/@user_id},
p_company_id => ${/session/@company_id}
);
end;
]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="insert">
<bm:parameters>
<bm:parameter name="journal_submit_batch_id" output="true" outputPath="@journal_submit_batch_id"/>
</bm:parameters>
<bm:update-sql>
<![CDATA[
declare
v_journal_submit_batch_id hls_journal_submit_batch.journal_submit_batch_id%TYPE := hls_journal_submit_batch_s.nextval;
begin
${@journal_submit_batch_id} := v_journal_submit_batch_id;
insert into hls_journal_submit_batch
(journal_submit_batch_id,
instance_id,
wfl_status,
wfl_type,
created_by,
creation_date,
last_updated_by,
last_update_date)
values
(v_journal_submit_batch_id,
null,
null,
${@wfl_type},
${/session/@user_id},
sysdate,
${/session/@user_id},
sysdate
);
end;
]]>
</bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql>
<![CDATA[
update hls_journal_header_imp hjhi
set
hjhi.journal_submit_batch_id = ${/parameter/@journal_submit_batch_id},
hjhi.last_updated_by = ${/session/@user_id},
hjhi.last_update_date = sysdate
where hjhi.journal_header_id = ${@journal_header_id}
]]>
</bm:update-sql>
<!--<bm:parameters>
<bm:parameter inputPath="/session/@session_id"/>
</bm:parameters>-->
</bm:operation>
<bm:operation name="execute">
<bm:update-sql>
<![CDATA[
begin
hls_journal_import_pkg.submit_hls_journal_tmp(
p_journal_submit_batch_id => ${/parameter/@journal_submit_batch_id},
p_user_id => ${/session/@user_id},
p_company_id => ${/session/@company_id}
);
end;
]]>
</bm:update-sql>
<!--<bm:parameters>
<bm:parameter inputPath="/session/@session_id"/>
</bm:parameters>-->
</bm:operation>
</bm:operations>
</bm:model>
...@@ -320,6 +320,11 @@ SELECT h.period_year, ...@@ -320,6 +320,11 @@ SELECT h.period_year,
where g.account_id = d.account_id where g.account_id = d.account_id
and g.account_code in ('6041001000')) and g.account_code in ('6041001000'))
and rownum = 1) and rownum = 1)
when ghd.je_template_code in('HL_REPURCHASE_VAT') then
(select -1*round(cc.ccr_due_amount-cc.ccr_due_amount/(1+DECODE(CC.BUSINESS_TYPE, 'LEASEBACK', 0.06, 0.13))*DECODE(CC.BUSINESS_TYPE, 'LEASEBACK', 0.06, 0.13),2)
from con_contract cc
WHERE cc.contract_number = l.reference3
and cc.data_class = 'NORMAL')
else else
(select nvl(d.amount_dr,d.amount_cr) (select nvl(d.amount_dr,d.amount_cr)
from hls_journal_detail d from hls_journal_detail d
...@@ -344,6 +349,11 @@ SELECT h.period_year, ...@@ -344,6 +349,11 @@ SELECT h.period_year,
where g.account_id = d.account_id where g.account_id = d.account_id
and g.account_code in ('6041001000')) and g.account_code in ('6041001000'))
and rownum = 1) and rownum = 1)
when ghd.je_template_code in('HL_REPURCHASE_VAT') then
(select -1*round(cc.ccr_due_amount-cc.ccr_due_amount/(1+DECODE(CC.BUSINESS_TYPE, 'LEASEBACK', 0.06, 0.13))*DECODE(CC.BUSINESS_TYPE, 'LEASEBACK', 0.06, 0.13),2)
from con_contract cc
WHERE cc.contract_number = l.reference3
and cc.data_class = 'NORMAL')
else else
(select nvl(d.amount_dr,d.amount_cr) (select nvl(d.amount_dr,d.amount_cr)
from hls_journal_detail d from hls_journal_detail d
...@@ -387,6 +397,7 @@ SELECT h.period_year, ...@@ -387,6 +397,7 @@ SELECT h.period_year,
'HL_CSH_CONSOLIDATION_DALAY' or 'HL_CSH_CONSOLIDATION_DALAY' or
ghd.je_template_code in ghd.je_template_code in
('HL_GLD_BALANCE_REPURCHASE','HL_GLD_BALANCE_REPURCHASE_LB','HL_RECEIVABLES_AGENT_REPUR_LB','HL_RECEIVABLES_AGENT_REPUR','HL_GLD_BALANCE_PENALTY','HL_PENALTY_R_ET','HL_PENALTY_R_ET_LB') ('HL_GLD_BALANCE_REPURCHASE','HL_GLD_BALANCE_REPURCHASE_LB','HL_RECEIVABLES_AGENT_REPUR_LB','HL_RECEIVABLES_AGENT_REPUR','HL_GLD_BALANCE_PENALTY','HL_PENALTY_R_ET','HL_PENALTY_R_ET_LB')
or( ghd.je_template_code in('HL_REPURCHASE_VAT') and l.line_description like '%违约金销项税' )
) )
and not exists (SELECT 1 and not exists (SELECT 1
FROM acr_invoice_hd hi, acr_invoice_ln li FROM acr_invoice_hd hi, acr_invoice_ln li
......
...@@ -348,6 +348,12 @@ SELECT h.period_year, ...@@ -348,6 +348,12 @@ SELECT h.period_year,
where g.account_id = d.account_id where g.account_id = d.account_id
and g.account_code in ('6041001000')) and g.account_code in ('6041001000'))
and rownum = 1) and rownum = 1)
when ghd.je_template_code in('HL_REPURCHASE_VAT') then
(select
-1*round(cc.ccr_due_amount-cc.ccr_due_amount/(1+DECODE(CC.BUSINESS_TYPE, 'LEASEBACK', 0.06, 0.13))*DECODE(CC.BUSINESS_TYPE, 'LEASEBACK', 0.06, 0.13),2)
from con_contract cc
WHERE cc.contract_number = l.reference3
and cc.data_class = 'NORMAL')
else else
(select nvl(d.amount_dr,d.amount_cr) (select nvl(d.amount_dr,d.amount_cr)
from hls_journal_detail d from hls_journal_detail d
...@@ -372,6 +378,11 @@ SELECT h.period_year, ...@@ -372,6 +378,11 @@ SELECT h.period_year,
where g.account_id = d.account_id where g.account_id = d.account_id
and g.account_code in ('6041001000')) and g.account_code in ('6041001000'))
and rownum = 1) and rownum = 1)
when ghd.je_template_code in('HL_REPURCHASE_VAT') then
(select -1*round(cc.ccr_due_amount-cc.ccr_due_amount/(1+DECODE(CC.BUSINESS_TYPE, 'LEASEBACK', 0.06, 0.13))*DECODE(CC.BUSINESS_TYPE, 'LEASEBACK', 0.06, 0.13),2)
from con_contract cc
WHERE cc.contract_number = l.reference3
and cc.data_class = 'NORMAL')
else else
(select nvl(d.amount_dr,d.amount_cr) (select nvl(d.amount_dr,d.amount_cr)
from hls_journal_detail d from hls_journal_detail d
...@@ -402,7 +413,11 @@ SELECT h.period_year, ...@@ -402,7 +413,11 @@ SELECT h.period_year,
and cc.data_class = 'NORMAL') vat_rate, and cc.data_class = 'NORMAL') vat_rate,
h.je_transaction_code, h.je_transaction_code,
l.cashflow_id, l.cashflow_id,
'N' fixed_data_flag case when ghd.je_template_code in('HL_REPURCHASE_VAT') then
'Y'
else
'N'
end fixed_data_flag
FROM hls_journal_header h, hls_journal_detail l, gld_accounts ga,gld_je_template_hds ghd FROM hls_journal_header h, hls_journal_detail l, gld_accounts ga,gld_je_template_hds ghd
WHERE h.journal_header_id = l.journal_header_id WHERE h.journal_header_id = l.journal_header_id
and h.je_template_hd_id=ghd.je_template_hd_id and h.je_template_hd_id=ghd.je_template_hd_id
...@@ -416,6 +431,7 @@ SELECT h.period_year, ...@@ -416,6 +431,7 @@ SELECT h.period_year,
'HL_CSH_CONSOLIDATION_DALAY' or 'HL_CSH_CONSOLIDATION_DALAY' or
ghd.je_template_code in ghd.je_template_code in
('HL_GLD_BALANCE_REPURCHASE','HL_GLD_BALANCE_REPURCHASE_LB','HL_RECEIVABLES_AGENT_REPUR_LB','HL_RECEIVABLES_AGENT_REPUR','HL_GLD_BALANCE_PENALTY','HL_PENALTY_R_ET','HL_PENALTY_R_ET_LB') ('HL_GLD_BALANCE_REPURCHASE','HL_GLD_BALANCE_REPURCHASE_LB','HL_RECEIVABLES_AGENT_REPUR_LB','HL_RECEIVABLES_AGENT_REPUR','HL_GLD_BALANCE_PENALTY','HL_PENALTY_R_ET','HL_PENALTY_R_ET_LB')
or( ghd.je_template_code in('HL_REPURCHASE_VAT') and l.line_description like '%违约金销项税' )
) )
and ((trunc(h.journal_date) <= and ((trunc(h.journal_date) <=
trunc(to_date('2020-01-31', 'yyyy-mm-dd')) and trunc(to_date('2020-01-31', 'yyyy-mm-dd')) and
......
<?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 => nvl(${/session/@user_id},${@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},${@user_id}),
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,
'建机审批流版式文件-' ||decode(z.workflow_id,-1,substr(z.instance_desc,instr(z.instance_desc,'-',1)+1),(select w.workflow_desc from zj_wfl_workflow w where w.workflow_id=z.workflow_id)) || '-' || 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 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>
...@@ -55,6 +55,23 @@ ...@@ -55,6 +55,23 @@
<bm:query-field name="approve_user_code" queryExpression="t1.approve_user_code like ${@approve_user_code}"/> <bm:query-field name="approve_user_code" queryExpression="t1.approve_user_code like ${@approve_user_code}"/>
</bm:query-fields> </bm:query-fields>
<bm:data-filters> <bm:data-filters>
<bm:data-filter name="query" expression="( (${/session/@role_id} = (select role_id from sys_role where role_code = '0006') and t1.workflow_code in (&apos;CONTRACT_INCEPT_WFL&apos;, &apos;DCFL_CSH_PAYMENT_REQ&apos;)) or (${/session/@role_id} in (select role_id from sys_role where role_code in ('0012', '0013', '0014')) and t1.workflow_code in (&apos;DCFL_CSH_PAYMENT_REQ&apos;, &apos;DEPOSIT_RETURN&apos;)) or (${/session/@role_id} = (select role_id from sys_role where role_code = '0005') and t1.workflow_code in (&apos;PROJECT_WFL&apos;)) or (${/session/@role_id} = (select role_id from sys_role where role_code = '0008') and t1.workflow_code in (&apos;CON_ET_WFL&apos;,&apos;TENANT_CHANGE_WFL&apos;,&apos;CON_BUYBACK_WFL&apos;,&apos;DEPOSIT_RETURN&apos;,&apos;WFL_FEE_REMIT&apos;)) or (${/session/@role_id} not in (select role_id from sys_role where role_code in('0005', '0006', '0008', '0012', '0013', '0014')) and 1 = 1))"/> <!--<bm:data-filter name="query" expression="( (${/session/@role_id} = (select role_id from sys_role where role_code = '0006') and t1.workflow_code in (&apos;CONTRACT_INCEPT_WFL&apos;, &apos;DCFL_CSH_PAYMENT_REQ&apos;)) or (${/session/@role_id} in (select role_id from sys_role where role_code in ('0012', '0013', '0014')) and t1.workflow_code in (&apos;DCFL_CSH_PAYMENT_REQ&apos;, &apos;DEPOSIT_RETURN&apos;)) or (${/session/@role_id} = (select role_id from sys_role where role_code = '0005') and t1.workflow_code in (&apos;PROJECT_WFL&apos;)) or (${/session/@role_id} = (select role_id from sys_role where role_code = '0008') and t1.workflow_code in (&apos;CON_ET_WFL&apos;,&apos;TENANT_CHANGE_WFL&apos;,&apos;CON_BUYBACK_WFL&apos;,&apos;DEPOSIT_RETURN&apos;,&apos;WFL_FEE_REMIT&apos;)) or (${/session/@role_id} not in (select role_id from sys_role where role_code in('0005', '0006', '0008', '0012', '0013', '0014')) and 1 = 1))"/>-->
<bm:data-filter name="query" expression="( (${/session/@role_id} = (select role_id from sys_role where role_code = '0006') and t1.workflow_code in (&apos;CONTRACT_INCEPT_WFL&apos;, &apos;DCFL_CSH_PAYMENT_REQ&apos;)) or (${/session/@role_id} in (select role_id from sys_role where role_code in ('0012', '0013', '0014')) and t1.workflow_code in (&apos;DCFL_CSH_PAYMENT_REQ&apos;, &apos;DEPOSIT_RETURN&apos;)) or (${/session/@role_id} = (select role_id from sys_role where role_code = '0005') and t1.workflow_code in (&apos;PROJECT_WFL&apos;)) or (${/session/@role_id} = (select role_id from sys_role where role_code = '0008') and t1.workflow_code in (&apos;CON_ET_WFL&apos;,&apos;TENANT_CHANGE_WFL&apos;,&apos;CON_BUYBACK_WFL&apos;,&apos;DEPOSIT_RETURN&apos;)) or (${/session/@role_id} not in (select role_id from sys_role where role_code in('0005', '0006', '0008', '0012', '0013', '0014')) and 1 = 1)
or( ((t1.SUBMITTED_BY = ${/session/@user_id}) or (
(${/session/@user_id}
in (Select t.user_id
From zj_wfl_instance_node_recipient t
Where t.instance_id = t1.instance_id
And t.record_type = 'APPROVER')
and t1.instance_status = 1)
or
(${/session/@user_id}
in (Select t.user_id
From zj_wfl_instance_node_rcpt_ht t
Where t.instance_id = t1.instance_id
And t.record_type = 'APPROVER')
and t1.instance_status in (-1000,-1,10))
) ) and t1.workflow_code in('HLS_JOURNAL_WFL','HLS_JOURNAL_REVERSE_WFL')))"/>
</bm:data-filters> </bm:data-filters>
</bm:model> </bm:model>
...@@ -175,6 +175,7 @@ var enableLayoutConfig = { ...@@ -175,6 +175,7 @@ var enableLayoutConfig = {
'modules/cont/CON762/con_contract_finish_query.lview':true, 'modules/cont/CON762/con_contract_finish_query.lview':true,
'modules/csh/CSH540/agent_deposit_return.lview':true, 'modules/csh/CSH540/agent_deposit_return.lview':true,
'modules/hls/HLS530/manual_journal_create.lview':true, 'modules/hls/HLS530/manual_journal_create.lview':true,
'modules/hls/HLS536/hls_journal_import_create.lview':true,
'modules/csh/CSH541/agent_deposit_details.lview':true, 'modules/csh/CSH541/agent_deposit_details.lview':true,
'modules/hls/HLS535/hls_sap_process_resend.lview':true, 'modules/hls/HLS535/hls_sap_process_resend.lview':true,
'modules/prj/PRJ500/prj_project_create_entrance.lview':true, 'modules/prj/PRJ500/prj_project_create_entrance.lview':true,
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<s:server-script import="token_record.js"><![CDATA[
try {
var sys_url_bm = $bm('cont.CON4000.get_sys_url');
var parameter_code = 'TOKEN_POSTURL';
var SysposturlQuery = sys_url_bm.queryAsMap({
parameter_code: parameter_code
});
var posturl = SysposturlQuery.getChildren()[0].parameter_value;
var parameter_code = 'TOKEN_APPID';
var SysappidQuery = sys_url_bm.queryAsMap({
parameter_code: parameter_code
});
var token_appid = SysappidQuery.getChildren()[0].parameter_value;
var parameter_code = 'TOKEN_APPSECRET';
var SysappsecretQuery = sys_url_bm.queryAsMap({
parameter_code: parameter_code
});
var token_appsecret = SysappsecretQuery.getChildren()[0].parameter_value;
var token_savelogs_bm = $bm('efile.EFILE1000.efile_get_token');
//token是否在有效期内,在有效期内直接获取表中的token
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;
if (is_valid == 'true') {
var SystokenQuery = token_savelogs_bm.queryAsMap();
var access_token = SystokenQuery.getChildren()[0].access_token;
} else {
println("=======有效期外======");
var data = httpPostGetToken(posturl, token_appid, token_appsecret);
println(data);
var json = JSON.parse(data);
var access_token = json.access_token;
var status = json.status;
if (access_token) {
token_savelogs_bm.insert({
'json': data,
'status': 'success'
})
token_savelogs_bm.update({
'system_source': 'hlcm',
'expires_in': json.expires_in,
'access_token': access_token
})
}
if (status) {
var token_savelogs_bm = $bm('efile.EFILE1000.token_savelogs');
token_savelogs_bm.insert({
'json': json,
'status': 'fail'
});
}
}
} catch (e) {
println('e:' + e);
}
]]></s:server-script>
</a:init-procedure>
</a:service>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luochenglong
$Date: 2023-02-07 下午2:03:31
$Revision: 1.0
$Purpose: 结构化字段定义
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:view>
<a:link id="cloumn_code_save_link" model="efile.EFILE1010.cloumn_code_query" modelaction="batch_update"/>
<a:link id="cloumn_code_delete_link" model="efile.EFILE1010.cloumn_code_query" modelaction="batch_update"/>
<script type="text/javascript"><![CDATA[
function cloumn_code_add() {
var ds = $('cloumn_para_ds');
var record = ds.create(ds.currentIndex);
$('cloumn_para_ds_id').showEditorByRecord(record);
}
function cloumn_code_delete() {
debugger;
var ds = $('cloumn_para_ds');
var records = ds.getSelected();
if(records.length<=0){
Leaf.showMessage('提示','请勾选数据进行删除!');
return ;
}
var paras = [];
var detail_mask = Ext.getBody();
for(var n=0;n<records.length;n++){
records[n].set('_status', 'delete');
paras.push(records[n].data);
}
if (records.length != 0) {
Leaf.showConfirm('${l:HLS.PROMPT}', '${l:HLS030.CONFIRM_DELETE}', function() {
Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
Leaf.request({
url: $('cloumn_code_delete_link').getUrl(),
para: paras,
success: function(res) {
Leaf.showMessage('提示','删除成功',function(){
ds.query();
});
Leaf.Masker.unmask(detail_mask);
},
failure: function() {
Leaf.Masker.unmask(detail_mask);
},
error: function() {
Leaf.Masker.unmask(detail_mask);
},
scope: this
});
});
}
}
function cloumn_code_save() {
debugger;
var ds = $('cloumn_para_ds');
var records=ds.getAll();
var paras = [];
var detail_masks = Ext.getBody();
var base_archive_id='${/parameter/@record_id}';
console.log(base_archive_id);
for(var n=0;n<records.length;n++){
if(records[n].isNew){
records[n].set('_status', 'insert');
}else{
records[n].set('_status', 'update');
}
records[n].set('base_archive_id', base_archive_id);
paras.push(records[n].data);
}
console.log(paras);
if (ds.validate()) {
Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
Leaf.request({
url: $('cloumn_code_save_link').getUrl(),
para: paras,
success: function(res) {
Leaf.showMessage('提示','保存成功',function(){
ds.query();
});
Leaf.Masker.unmask(detail_mask);
},
failure: function() {
Leaf.Masker.unmask(detail_mask);
},
error: function() {
Leaf.Masker.unmask(detail_mask);
},
scope: this
});
}
}
function update_checklength(ds, record, name, value, oldvalue) {
}
]]></script>
<a:dataSets>
<a:dataSet id="cloumn_para_ds" autoQuery="true" model="efile.EFILE1010.cloumn_code_query" queryUrl="${/request/@context_path}/autocrud/efile.EFILE1010.cloumn_code_query/query?base_archive_id=${/parameter/@record_id}" queryDataSet="for_query_ds" selectable="true">
<a:fields>
<a:field name="cloumn_code" />
<a:field name="cloumn_name" />
<a:field name="base_archive_id" />
</a:fields>
<a:events>
<a:event name="update" handler="update_checklength"/>
</a:events>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton click="cloumn_code_add" text="新增"/>
<a:gridButton click="cloumn_code_delete" text="删除"/>-
<a:gridButton click="cloumn_code_save" text="HLS.SAVE"/>
</a:screenTopToolbar>
<a:grid id="cloumn_para_ds_id" bindTarget="cloumn_para_ds" height="300" width="380" navBar="true">
<a:columns>
<a:column name="cloumn_code" editor="elec_text_ed" prompt="结构化字段code" width="170"/>
<a:column name="cloumn_name" editor="elec_text_ed" prompt="结构化字段描述" width="170"/>
</a:columns>
<a:editors>
<a:textField id="elec_text_ed"/>
<a:textField id="elec_text_ed_up" typeCase="upper"/>
<a:checkBox id="elec_checkbox_ed"/>
<a:lov id="elec_conBasicClauseParaDs_grid_lov"/>
<a:comboBox id="cloumn_code_comed"/>
</a:editors>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luochenglong
$Date: 2023-02-09 早上 10:03:31
$Revision: 1.0
$Purpose: 附件取值SQL
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:view>
<script type="text/javascript"><![CDATA[
function okbtn() {
var record = $('para_lov_ds').getAt(0);
$('${/parameter/@lovid}').commit(record);
}
function returnok() {
$('${/parameter/@lovid}').win.close();
}
]]></script>
<a:dataSets>
<a:dataSet id="para_lov_ds" autoCreate="true">
<a:fields>
<a:field name="lov_sql"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<script type="text/javascript"><![CDATA[
function initSql(){
var sql=$('efile_type_ds').getCurrentRecord().get('atm_sql');
$('para_lov_ds').getAt(0).set('lov_sql',sql);
}
initSql();
]]></script>
<a:screenBody>
<a:form column="1" style="margin-top:10px;margin-left:10px;">
<a:textArea name="lov_sql" bindTarget="para_lov_ds" height="320" width="500"/>
</a:form>
<a:hBox style="margin-left:10px;margin-bottom:20px;">
<a:button id="okbtnid" click="okbtn" text="PROMPT.OK"/>
<a:button click="returnok" text="PROMPT.RETURN"/>
</a:hBox>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luochenglong
$Date: 2023-02-09 早上 10:05:31
$Revision: 1.0
$Purpose: 凭证模板取值SQL
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:view>
<script type="text/javascript"><![CDATA[
function okbtn() {
var record = $('para_lov_ds').getAt(0);
$('${/parameter/@lovid}').commit(record);
}
function returnok() {
$('${/parameter/@lovid}').win.close();
}
]]></script>
<a:dataSets>
<a:dataSet id="para_lov_ds" autoCreate="true">
<a:fields>
<a:field name="lov_sql"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<script type="text/javascript"><![CDATA[
function initSql(){
var sql=$('efile_type_ds').getCurrentRecord().get('je_source_sql');
$('para_lov_ds').getAt(0).set('lov_sql',sql);
}
initSql();
]]></script>
<a:screenBody>
<a:form column="1" style="margin-top:10px;margin-left:10px;">
<a:textArea name="lov_sql" bindTarget="para_lov_ds" height="320" width="500"/>
</a:form>
<a:hBox style="margin-left:10px;margin-bottom:20px;">
<a:button id="okbtnid" click="okbtn" text="PROMPT.OK"/>
<a:button click="returnok" text="PROMPT.RETURN"/>
</a:hBox>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luochenglong
$Date: 2023-02-09 早上 10:15:31
$Revision: 1.0
$Purpose: 结构化数据取值SQL
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:view>
<script type="text/javascript"><![CDATA[
function okbtn() {
var record = $('para_lov_ds').getAt(0);
$('${/parameter/@lovid}').commit(record);
}
function returnok() {
$('${/parameter/@lovid}').win.close();
}
]]></script>
<a:dataSets>
<a:dataSet id="para_lov_ds" autoCreate="true">
<a:fields>
<a:field name="lov_sql"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<script type="text/javascript"><![CDATA[
function initSql(){
var sql=$('efile_type_ds').getCurrentRecord().get('stru_data_sql');
$('para_lov_ds').getAt(0).set('lov_sql',sql);
}
initSql();
]]></script>
<a:screenBody>
<a:form column="1" style="margin-top:10px;margin-left:10px;">
<a:textArea name="lov_sql" bindTarget="para_lov_ds" height="320" width="500"/>
</a:form>
<a:hBox style="margin-left:10px;margin-bottom:20px;">
<a:button id="okbtnid" click="okbtn" text="PROMPT.OK"/>
<a:button click="returnok" text="PROMPT.RETURN"/>
</a:hBox>
</a:screenBody>
</a:view>
</a:screen>
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luochenglong
$Date: 2023-02-07 下午3:03:31
$Revision: 1.0
$Purpose: 凭证模板定义
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:view>
<a:link id="je_template_save_link" model="efile.EFILE1010.je_template_query" modelaction="batch_update"/>
<a:link id="je_template_delete_link" model="efile.EFILE1010.je_template_query" modelaction="batch_update"/>
<script type="text/javascript"><![CDATA[
function je_template_add() {
var ds = $('je_template_ds');
var record = ds.create(ds.currentIndex);
$('je_template_ds_id').showEditorByRecord(record);
}
function je_template_delete() {
var ds = $('je_template_ds');
var records = ds.getSelected();
if(records.length<=0){
Leaf.showMessage('提示','请勾选数据进行删除!');
return;
}
var paras = [];
var detail_mask = Ext.getBody();
for(var n=0;n<records.length;n++){
records[n].set('_status', 'delete');
paras.push(records[n].data);
}
if (records.length != 0) {
Leaf.showConfirm('${l:HLS.PROMPT}', '${l:HLS030.CONFIRM_DELETE}', function() {
Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
Leaf.request({
url: $('je_template_delete_link').getUrl(),
para: paras,
success: function(res) {
Leaf.showMessage('提示','删除成功',function(){
ds.query();
});
Leaf.Masker.unmask(detail_mask);
},
failure: function() {
Leaf.Masker.unmask(detail_mask);
},
error: function() {
Leaf.Masker.unmask(detail_mask);
},
scope: this
});
});
}
}
function je_template_save() {
var ds = $('je_template_ds');
var records=ds.getAll();
var paras = [];
var detail_mask = Ext.getBody();
var base_archive_id='${/parameter/@record_id}';
for(var n=0;n<records.length;n++){
if(records[n].isNew){
records[n].set('_status', 'insert');
}else{
records[n].set('_status', 'update');
}
records[n].set('base_archive_id', base_archive_id);
paras.push(records[n].data);
}
if (ds.validate()) {
Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
Leaf.request({
url: $('je_template_save_link').getUrl(),
para: paras,
success: function(res) {
Leaf.showMessage('提示','保存成功',function(){
ds.query();
});
Leaf.Masker.unmask(detail_mask);
},
failure: function() {
Leaf.Masker.unmask(detail_mask);
},
error: function() {
Leaf.Masker.unmask(detail_mask);
},
scope: this
});
}
}
function je_template_update(ds, record, name, value, oldvalue) {
}
]]></script>
<a:dataSets>
<a:dataSet id="je_template_ds" autoQuery="true" model="efile.EFILE1010.je_template_query" queryUrl="${/request/@context_path}/autocrud/efile.EFILE1010.je_template_query/query?base_archive_id=${/parameter/@record_id}" queryDataSet="for_query_ds" selectable="true">
<a:fields>
<a:field name="je_template_code" lovGridHeight="450" lovHeight="600" lovService="gld.GLD104.gld_je_transaction_for_lov" lovWidth="550" lovpagesize="30" required="true" title="GLD104.GLD_JE_TRANSACTION.JE_TRANSACTION_DESC">
<a:mapping>
<a:map from="je_transaction_desc" to="je_template_name"/>
<a:map from="je_transaction_code" to="je_template_code"/>
</a:mapping>
</a:field>
<a:field name="je_template_name" />
</a:fields>
<a:events>
<a:event name="update" handler="je_template_update"/>
</a:events>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton click="je_template_add" text="新增"/>
<a:gridButton click="je_template_delete" text="删除"/>
<a:gridButton click="je_template_save" text="HLS.SAVE"/>
</a:screenTopToolbar>
<a:grid id="je_template_ds_id" bindTarget="je_template_ds" height="300" width="380" navBar="true">
<a:columns>
<a:column name="je_template_code" editor="voucherconBasicClauseParaDs_grid_lov" prompt="凭证模板代码" width="170"/>
<a:column name="je_template_name" editor="voucher_text_ed" prompt="凭证模板描述" width="170"/>
</a:columns>
<a:editors>
<a:textField id="voucher_text_ed"/>
<a:textField id="voucher_text_ed_up" typeCase="upper"/>
<a:checkBox id="voucher_checkbox_ed"/>
<a:lov id="voucherconBasicClauseParaDs_grid_lov"/>
<a:comboBox id="je_template_comed"/>
</a:editors>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2023-2-7 下午1:37:08
$Revision: 1.0
$Purpose: 待生成电子档案清单
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:view>
<a:link id="efile1020_generated_save_link" url="${/request/@context_path}/modules/efile/EFILE1020/efile_generated_save_selected.lsc"/>
<script type="text/javascript"><![CDATA[
function efile1020_query(){
$('archives_pool_list_ds').query();
}
//重置按钮
function efile1020_reset() {
$('archives_post_list_query').reset();
}
function efile1020_generated(){
var datas = [];
var records = $('archives_pool_list_ds').getSelected();
for (var i=0;i<records.length;i++){
var record = records[i];
datas.push(record.data);
}
var param = {};
param['details'] = datas;
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认生成电子档案?', function () {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: $('efile1020_generated_save_link').getUrl(),
para: datas,
success: function (res) {
Leaf.SideBar.show({
msg: '生成成功',
duration: 2000
});
Leaf.Masker.unmask(Ext.getBody());
$('archives_pool_list_ds').query();
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}, null);
}
]]></script>
<a:dataSets>
<a:dataSet id="archive_type_ds" lookupCode="ELEC_FILE_TYPE"/>
<a:dataSet id="done_flag_ds" lookupCode="DONE_FLAG_STATUS"/>
<a:dataSet id="archives_post_list_query" autoCreate="true">
<a:fields>
<a:field name="document_id"/>
<a:field name="archive_type"/>
<a:field name="archive_type_desc" displayField="code_value_name" options="archive_type_ds" returnField="archive_type" valueField="code_value"/>
<a:field name="done_flag"/>
<a:field name="done_flag_desc" displayField="code_value_name" options="done_flag_ds" returnField="done_flag" valueField="code_value"/>
</a:fields>
</a:dataSet>
<a:dataSet id="archives_pool_list_ds" autoQuery="true" model="efile.EFILE1020.archives_post_list" queryDataSet="archives_post_list_query" selectable="true">
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton click="efile1020_query" text="HLS.QUERY"/>
<a:gridButton click="efile1020_reset" text="HLS.RESET"/>
<a:gridButton click="efile1020_generated" text="生成电子档案"/>
</a:screenTopToolbar>
<a:form column="4" marginWidth="200" title="查询条件">
<a:comboBox name="archive_type_desc" bindTarget="archives_post_list_query" prompt="资料类型"/>
<a:textField name="document_id" bindTarget="archives_post_list_query" prompt="资料来源"/>
<a:comboBox name="done_flag_desc" bindTarget="archives_post_list_query" prompt="生成状态"/>
</a:form>
<a:grid id="archives_pool_list_ds_id" bindTarget="archives_pool_list_ds" marginHeight="200" marginWidth="200" navBar="true">
<a:columns>
<a:column name="archive_type_desc" prompt="资料类型" width="150"/>
<a:column name="document_id" prompt="资料来源" width="150"/>
<a:column name="done_flag_desc" prompt="生成状态" width="100"/>
<a:column name="error_message" prompt="日志" width="150"/>
<a:column name="last_update_date" renderer="Leaf.formatDate" prompt="最后更新时间" width="150"/>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<batch-apply sourcepath="/parameter">
<a:model-insert model="efile.EFILE1020.efile_generated_selected"/>
</batch-apply>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<s:server-script import="att_downloadUtil.js"><![CDATA[
importPackage(java.util.zip);
importPackage(java.io);
importPackage(java.net);
var logger = $logger('server-script');
$ctx["__request_type__"] = 'file';
var resp = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
resp.setHeader("Pragma", "No-cache");
resp.setHeader("Cache-Control", "no-cache, must-revalidate");
var rowid = $ctx.parameter.rowid;
var attachment_queryBm = $bm('efile.EFILE1030.att_download');
var attachment_data = attachment_queryBm.queryAsMap({
rowid:rowid
});
if(rowid){
var filename = attachment_data.getChildren()[0].file_name;
var filepath= attachment_data.getChildren()[0].file_path;
resp.setHeader("Content-Disposition",
"attachment; filename=\"" + java.net.URLEncoder.encode(filename, "UTF-8"));
resp.setDateHeader("Expires", 0);
resp.setContentType("application/x-msdownload");
attDownloadUtil(resp,filepath,filename);
}
]]></s:server-script>
</a:init-procedure>
</a:service>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luochenglong
$Date: 2023-02-10 早上10:03:31
$Revision: 1.0
$Purpose:电子档池定义
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:view>
<a:link id="att_link_id" url="${/request/@context_path}/modules/efile/EFILE1030/efile_att_json_lov.lview"/>
<a:link id="post_stru_link_id" url="${/request/@context_path}/modules/efile/EFILE1030/efile_post_stru_json_lov.lview"/>
<a:link id="doc_post_link" url="${/request/@context_path}/modules/efile/EFILE1040/efile_doc_import.svc"/>
<script type="text/javascript"><![CDATA[
function efile_archive_pool_batch_trans() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: $('doc_post_link').getUrl(),
para: {
batch_flag :'Y'
},
success: function() {
Leaf.Masker.unmask(Ext.getBody());
Leaf.showMessage('提示','传输成功',function(){
$('efile_archive_pool_ds').query();
});
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
},
error: function() {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
function efile_archive_pool_manual_trans() {
var record = $('efile_archive_pool_ds').getSelected();
if (record.length==0){
Leaf.showMessage('提示','请选择传输数据!');
return;
}
for (var i = 0; i < record.length; i++) {
if(record[i].get('monthly_closed_flag')=='N'){
Leaf.showMessage('提示','资料期间对应的会计期间必须是关账状态!');
return;
}
}
var records = new Array();
for (i = 0;i < record.length;i++) {
records.push(record[i].data);
/* if (record[i].get('upload_ftp_flag') == 'Y') {
Aurora.showMessage('提示','已上传批次不能重复上传!');
return;
}*/
}
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: $('doc_post_link').getUrl(),
para: records,
success: function() {
Leaf.Masker.unmask(Ext.getBody());
Leaf.showMessage('提示','传输成功',function(){
$('efile_archive_pool_ds').query();
});
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
},
error: function() {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
function efile_archive_pool_reset() {
}
function efile_archive_pool_query() {
$('efile_archive_pool_ds').query();
}
function att_update_renderer(value, record, name) {
if(name=='att'){
return '<a href="javascript:efile_archive_att_list(\'' + record.get('pool_id') + '\')">附件</a>';
}
if(name=='post_stru_data'){
return '<a href="javascript:efile_archive_post_stru_data_list(\'' + record.get('pool_id') + '\')">结构化数据</a>';
}
}
function efile_archive_att_list(record_id) {
var record = $('efile_archive_pool_ds').findById(record_id);
var url = $('att_link_id').getUrl();
if (!Leaf.isEmpty(record_id)) {
var win = new Leaf.Window({
id: 'att_id_winid',
url: url,
params: {
record_id: record_id
},
height: 350,
width: 700
});
}
}
function efile_archive_post_stru_data_list(record_id) {
var record = $('efile_archive_pool_ds').findById(record_id);
var url = $('post_stru_link_id').getUrl();
if (!Leaf.isEmpty(record_id)) {
var win = new Leaf.Window({
id: 'post_stru_id_winid',
url: url,
params: {
record_id: record_id
},
height: 350,
width: 700
});
}
}
function checklength(ds, record, name, value, oldvalue) {
}
]]></script>
<a:dataSets>
<a:dataSet id="yes_no_ds" lookupCode="YES_NO"/>
<a:dataSet id="data_cf_ds" lookupCode="DATA_CLASSIFICATION"/>
<a:dataSet id="post_status_ds" lookupCode="POST_STATUS_DESC"/>
<a:dataSet id="for_query_ds" autoCreate="true">
<a:fields>
<a:field name="internal_period_num" />
<a:field name="post_batch_num" />
<a:field name="primary_field" />
<a:field name="document_info" />
<a:field name="post_status" />
<a:field name="archive_type" />
<a:field name="suppl_trans_flag" />
<a:field name="archive_type_desc" displayField="code_value_name" options="data_cf_ds" returnField="archive_type" valueField="code_value"/>
<a:field name="suppl_trans_flag_desc" displayField="code_value_name" options="yes_no_ds" returnField="suppl_trans_flag" valueField="code_value"/>
<a:field name="post_status_desc" displayField="code_value_name" options="post_status_ds" returnField="post_status" valueField="code_value"/>
</a:fields>
</a:dataSet>
<a:dataSet id="efile_archive_pool_ds" model="efile.EFILE1030.e_archive_pool_query" queryDataSet="for_query_ds" selectable="true">
<a:fields>
<a:field name="monthly_closed_flag" />
<a:field name="post_message" readOnly="true" />
</a:fields>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<!--<a:screenTitle/>-->
<a:gridButton click="efile_archive_pool_query" text="HLS.QUERY"/>
<a:gridButton click="efile_archive_pool_reset" text="重置"/>
<a:gridButton click="efile_archive_pool_batch_trans" text="启动批量传输"/>
<a:gridButton click="efile_archive_pool_manual_trans" text="手动传输"/>
</a:screenTopToolbar>
<a:form column="4" marginWidth="30" title="查询条件">
<a:textField name="internal_period_num" bindTarget="for_query_ds" prompt="资料期间"/>
<a:comboBox name="archive_type_desc" bindTarget="for_query_ds" prompt="资料类型"/>
<a:textField name="primary_field" bindTarget="for_query_ds" prompt="主键"/>
<a:comboBox name="suppl_trans_flag_desc" bindTarget="for_query_ds" prompt="是否补传"/>
<a:textField name="document_info" bindTarget="for_query_ds" prompt="原始资料号"/>
<a:comboBox name="post_status_desc" bindTarget="for_query_ds" prompt="传输状态"/>
<a:textField name="post_batch_num" bindTarget="for_query_ds" prompt="传输批次号"/>
</a:form>
<a:grid id="efile_archive_pool_ds_id" bindTarget="efile_archive_pool_ds" marginHeight="200" marginWidth="30" navBar="true">
<a:columns>
<a:column name="primary_field" prompt="主键" width="320"/>
<a:column name="internal_period_num" prompt="资料期间" width="120"/>
<a:column name="archive_type_desc" prompt="资料类型" width="120"/>
<a:column name="document_info" prompt="原始资料号" width="300"/>
<a:column name="post_stru_data" prompt="结构化数据" renderer="att_update_renderer" width="110"/>
<a:column name="att" align="center" prompt="附件" renderer="att_update_renderer"/>
<a:column name="suppl_trans_flag_desc" align="center" width="120" prompt="是否补传"/>
<a:column name="post_status" align="center" width="120" prompt="传输状态"/>
<a:column name="post_message" align="center" editor="textarea_id" width="180" prompt="传输结果"/>
<a:column name="post_batch_num" align="center" width="120" prompt="传输批次号"/>
</a:columns>
<a:editors>
<a:textField id="text_ed"/>
<a:textArea id="textarea_id"/>
<a:textField id="text_ed_up" typeCase="upper"/>
<a:checkBox id="checkbox_ed"/>
<a:lov id="conBasicClauseParaDs_grid_lov"/>
<a:comboBox id="efile_type_comed"/>
</a:editors>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luochenglong
$Date: 2023-02-10 下午2:03:31
$Revision: 1.0
$Purpose: 附件列表
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" customizationEnabled="true" trace="true">
<a:init-procedure>
<s:server-script><![CDATA[
function newMap(name) {
return new CompositeMap("a", 'http://www.aurora-framework.org/application',
name);
}
var para = $ctx.current_parameter || $ctx.parameter;
var sql_content;
var query_validation_sql_bm = $bm('efile.EFILE1030.efile_pool_att_para_sql');
var config_map = query_validation_sql_bm.queryAsMap(para);
var config_map_detail = config_map.getChildren();
if (config_map_detail.length != 0) {
sql_content = config_map_detail[0].sql_content;
para.sql_content = sql_content;
}
//println(sql_content);
var dataSet_id='att_json_ds';
var obj = JSON.parse(sql_content).attachmentList;
var config = $config();
var dataSets = CompositeUtil.findChild(config, 'dataSets');
var dataSet = CompositeUtil.findChild(dataSets, 'dataSet', 'id', dataSet_id);
if (!dataSet) {
dataSet = newMap("dataSet");
dataSet.id = dataSet_id;
dataSet.autocreate = 'true';
dataSets.addChild(dataSet.getData());
var datas = newMap("datas");
dataSet.addChild(datas.getData());
}
// dataSets.addChild(dataSet.getData());
// dataSet.id = 'att_json_ds';
// dataSet.autocreate = 'true';
// dataSets.addChild(dataSet.getData());
// var datas = newMap("datas");
// dataSet.addChild(datas.getData());
for (var k in obj) {
// if (obj[k] instanceof Object) {
var datasRecord = newMap("record");
datasRecord.code_value = obj[k].fileURL;
datasRecord.code_value_name = obj[k].fileName;
datasRecord.action_type = obj[k].attachTypeCode;
datas.addChild(datasRecord.getData());
//println(datasRecord.code_value+":"+datasRecord.code_value_name);
//} else {
// println("2222"+obj[k].fieldCode);
//}
}
]]></s:server-script>
</a:init-procedure>
<a:view>
<script type="text/javascript"><![CDATA[
]]></script>
<a:dataSets>
</a:dataSets>
<a:screenBody>
<a:grid id="att_para_ds_id" bindTarget="att_json_ds" height="180" width="760" navBar="true">
<a:columns>
<a:column name="action_type" prompt="附件类型" width="150"/>
<a:column name="code_value" prompt="附件地址" width="400"/>
<a:column name="code_value_name" prompt="附件名称" width="200"/>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: luochenglong
$Date: 2023-02-10 下午2:03:31
$Revision: 1.0
$Purpose: 结构化数据列表
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" customizationEnabled="true" trace="true">
<a:init-procedure>
<s:server-script><![CDATA[
function newMap(name) {
return new CompositeMap("a", 'http://www.aurora-framework.org/application',
name);
}
var para = $ctx.current_parameter || $ctx.parameter;
var sql_content;
var query_validation_sql_bm = $bm('efile.EFILE1030.efile_pool_para_sql');
var config_map = query_validation_sql_bm.queryAsMap(para);
var config_map_detail = config_map.getChildren();
if (config_map_detail.length != 0) {
sql_content = config_map_detail[0].sql_content;
para.sql_content = sql_content;
}
//println(sql_content);
var dataSet_id='post_stur_json_ds';
var obj = JSON.parse(sql_content).fieldValueList;
var config = $config();
var dataSets = CompositeUtil.findChild(config, 'dataSets');
var dataSet = CompositeUtil.findChild(dataSets, 'dataSet', 'id', dataSet_id);
if (!dataSet) {
dataSet = newMap("dataSet");
dataSet.id = dataSet_id;
dataSet.autocreate = 'true';
dataSets.addChild(dataSet.getData());
var datas = newMap("datas");
dataSet.addChild(datas.getData());
}
//var dataSet = newMap("dataSet");
// dataSets.addChild(dataSet.getData());
//dataSet.id = 'post_stur_json_ds';
// dataSet.autocreate = 'true';
// dataSets.addChild(dataSet.getData());
// var datas = newMap("datas");
// dataSet.addChild(datas.getData());
for (var k in obj) {
// if (obj[k] instanceof Object) {
var datasRecord = newMap("record");
datasRecord.code_value = obj[k].fieldCode;
datasRecord.code_value_name = obj[k].value;
datas.addChild(datasRecord.getData());
//println(datasRecord.code_value+":"+datasRecord.code_value_name);
//} else {
// println("2222"+obj[k].fieldCode);
//}
}
]]></s:server-script>
</a:init-procedure>
<a:view>
<script type="text/javascript"><![CDATA[
]]></script>
<a:dataSets >
</a:dataSets>
<a:screenBody>
<a:grid id="post_stru_para_ds_id" bindTarget="post_stur_json_ds" marginHeight="200" width="355" navBar="true">
<a:columns>
<a:column name="code_value" prompt="字段代码" width="150"/>
<a:column name="code_value_name" prompt="值内容" width="200"/>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<s:server-script import="token_record.js;att_upload.js"><![CDATA[
try {
var logger = $logger('server-script');
logger.info('------');
var req_date = $ctx.parameter.getChildren();
var sys_url_bm = $bm('cont.CON4000.get_sys_url');
var parameter_code = 'TOKEN_POSTURL';
var SysposturlQuery = sys_url_bm.queryAsMap({
parameter_code: parameter_code
});
var posturl = SysposturlQuery.getChildren()[0].parameter_value;
var parameter_code = 'TOKEN_APPID';
var SysappidQuery = sys_url_bm.queryAsMap({
parameter_code: parameter_code
});
var token_appid = SysappidQuery.getChildren()[0].parameter_value;
var parameter_code = 'TOKEN_APPSECRET';
var SysappsecretQuery = sys_url_bm.queryAsMap({
parameter_code: parameter_code
});
var parameter_code = 'ATT_UPLOAD_POSTURL';
var attUrlQuery = sys_url_bm.queryAsMap({
parameter_code: parameter_code
});
var attUrl = attUrlQuery.getChildren()[0].parameter_value;
var parameter_code = 'TOKEN_TYPE';
var tokenTypeyQuery = sys_url_bm.queryAsMap({
parameter_code: parameter_code
});
var token_type = tokenTypeyQuery.getChildren()[0].parameter_value;
var token_appsecret = SysappsecretQuery.getChildren()[0].parameter_value;
var token_savelogs_bm = $bm('efile.EFILE1000.efile_get_token');
//token是否在有效期内,在有效期内直接获取表中的token
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 documentTypeCode = $ctx.parameter.documentTypeCode;
var file_path = $ctx.parameter.file_path;
var primaryField = $ctx.parameter.primaryField;
var file=new File(file_path);
var map = {
"documentTypeCode" : documentTypeCode,
"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("=======有效期外======");
var data = httpPostGetToken(posturl, token_appid, token_appsecret);
var json = JSON.parse(data);
var access_token = json.access_token;
var status = json.status;
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,
'status': 'success'
})
token_savelogs_bm.update({
'system_source': 'hlcm',
'expires_in': json.expires_in,
'access_token': access_token
})
}
if (status) {
var token_savelogs_bm = $bm('efile.EFILE1000.token_savelogs');
token_savelogs_bm.insert({
'json': json,
'status': 'fail'
});
}
}
} catch (e) {
println('e:' + e);
}
]]></s:server-script>
</a:init-procedure>
</a:service>
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
<a:init-procedure>
<p:echo></p:echo>
<a:model-insert model="hls.HLS536.submit_hls_journal_reverse" trace="true"/>
<a:batch-apply sourcepath="/parameter/details">
<a:model-update model="hls.HLS536.submit_hls_journal_reverse" trace="true"/>
</a:batch-apply>
<a:model-execute model="hls.HLS536.submit_hls_journal_reverse" trace="true"/>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
<a:init-procedure>
<!--lsc文件在日志中打印参数信息-->
<p:echo></p:echo>
<a:model-insert model="hls.HLS536.submit_hls_journal_tmp" trace="true"/>
<a:batch-apply sourcepath="/parameter/details">
<!--只要是 record 里面没有 被 改变 的 数字字段 ,没有 改变还是 数字类型的,但是 改变后 传到 后端是 String 类型 的 了 -->
<a:model-update model="hls.HLS536.submit_hls_journal_tmp" trace="true"/>
</a:batch-apply>
<a:model-execute model="hls.HLS536.submit_hls_journal_tmp" trace="true"/>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2022-11-9 上午10:30:00
$Revision: 1.0
$Purpose: 导入凭证模板修改
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" dynamiccreateenabled="true" trace="true">
<a:init-procedure><![CDATA[
]]></a:init-procedure>
<a:view>
<a:link id="get_period_name_id" model="csh.CSH511.csh_transaction_get_period_name" modelaction="query"/>
<a:link id="get_new_journal_num_link_id" model="hls.HLS530.get_new_journal_number" modelaction="update"/>
<a:link id="get_document_type_id" model="csh.CSH511.get_document_type" modelaction="update"/>
<script><![CDATA[
Leaf.onReady(function() {
if ('${/parameter/@maintain_type}' == 'READONLY') {
const btn_dom = document.getElementById('${/parameter/@layout_code}' + '_save');
btn_dom.remove();
}
});
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function(ds, record) {
var journal_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_journal_header_imp');
var detail_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'JE_LN', 'hls_journal_detail_imp');
var journal_record = $(journal_ds_id).getAt(0);
var je_records = $(detail_ds_id).getAll();
var sum_dr = 0;
var sum_cr = 0;
for (var i=0;i<je_records.length;i++){
var je_record = je_records[i];
if(!isNaN(je_record.get('amount_dr'))){
sum_dr = (Number(sum_dr) + Number(je_record.get('amount_dr'))).toFixed(2);
}
if(!isNaN(je_record.get('amount_cr'))){
sum_cr = (Number(sum_cr) + Number(je_record.get('amount_cr'))).toFixed(2);
}
}
var check_flag = false;
if((sum_dr != sum_cr)&&(sum_dr != 0)){
Leaf.showMessage('提示','借贷总额必须相等');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}else{
journal_record.set('total_amount_dr', sum_dr);
journal_record.set('total_amount_cr', sum_dr);
journal_record.set('total_amount_fuc_dr', sum_dr);
journal_record.set('total_amount_fuc_cr', sum_dr);
if (journal_record.get('journal_num')) {
return true;
}
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('get_new_journal_num_link_id').getUrl(),
para: {
document_category: '${/parameter/@document_category}',
document_type: record.get('document_type')
},
success: function(res) {
var document_number = res.result.document_number;
journal_record.set('journal_num', document_number);
check_flag = true;
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
sync: true,
scope: this
});
return check_flag;
}
};
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function(ds, record, res, bp_seq) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
var detail1_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'JE_LN_REF1', 'hls_journal_detail_imp');
var header_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'JE_HD', 'hls_journal_header_imp');
$(detail1_ds_id).query();
var header_ds_record = $(header_ds_id).getAt(0);
var document_type = header_ds_record.get('document_type');
var journal_num = header_ds_record.get('journal_num');
if (!header_ds_record.get('post_gl_status')){
header_ds_record.set('post_gl_status', 'N');
}
header_ds_record.set('reversed_flag', 'N');
// if (name = 'document_type') {
// Leaf.request({
// url: $('get_document_type_id').getUrl(),
// para: {
// document_type: document_type,
// //journal_header_id: '${/parameter/@journal_header_id}',
// journal_num: journal_num
// },
// success: periodname,
// scope: this
// });
// }
};
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
if(name=='journal_date'){
var journal_date = record.get('journal_date');
journal_date = Leaf.formatDate(journal_date);
Leaf.request({
url: $('get_period_name_id').getUrl(),
para: {
p_date: journal_date
},
success: periodname,
scope: this
});
}else if(name=='amount_dr'){
record.set('amount_fuc_dr',value);
}else if(name=='amount_cr'){
record.set('amount_fuc_cr',value);
}
};
function periodname(res) {
var journal_ds_id1 = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_journal_header_imp');
var journal_record1 = $(journal_ds_id1).getAt(0);
if (res) {
var period_name = res.result.record.period_name;
var period_year = res.result.record.period_year;
var period_num = res.result.record.period_name.substring(5, 7);
var internal_period_num = res.result.record.internal_period_num;
var period_set_code = res.result.record.period_set_code;
journal_record1.set('period_name', period_name);
journal_record1.set('period_year', period_year);
journal_record1.set('period_num', period_num);
journal_record1.set('internal_period_num', internal_period_num);
journal_record1.set('period_set_code', period_set_code);
}
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
var bp_info_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_journal_header_imp');
if( Ext.isEmpty(record.get('journal_header_id'))){
record.set('je_company_id', 1);
record.set('je_company_id_n', '宏菱租赁');
record.set('currency_code', 'CNY');
record.set('currency_code_n', '人民币');
//record.set('je_transaction_code', 'MANUAL');
//record.set('je_transaction_code_n', '手工生成');
//record.set('post_gl_status', 'N');
if(!record.get('post_gl_status')){
record.set('post_gl_status', 'N');
}
record.set('exchange_rate', 1);
record.set('reversed_flag', 'N');
record.set('source_table', 'hls_journal_header_imp');
record.set('company_id', 1);
}
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2012-12-6 上午11:18:39
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:init-procedure>
</a:init-procedure>
<a:view>
<a:link id="hls_journal_import_create_link_id" url="${/request/@context_path}/modules/hls/HLS536/hls_journal_import_create.lview"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="journal_attachment_uploadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<a:screen-include screen="modules/hls/hls_common_javascript.lview"/>
<script><![CDATA[
Leaf.onReady(function () {
$('hls_journal_header_result_ds').setQueryParameter('journal_submit_batch_id','${/parameter/@journal_submit_batch_id}');
})
//查询按钮
function hls536_journal_query() {
$('hls_journal_header_result_ds').setQueryParameter('journal_submit_batch_id','${/parameter/@journal_submit_batch_id}');
$('hls_journal_header_result_ds').query();
}
//重置按钮
function hls536_journal_reset() {
$('hls_journal_header_query').reset();
}
// 审批流程中,叶唯吟节点可编辑页面
function hls536_link_dynamic(reocrd_id, journal_header_id) {
var record = $('hls_journal_header_result_ds').findById(reocrd_id);
var param = record.data;
param['currency'] = param['currency_code'];
param['function_code'] = 'HLS536';
param['document_id'] = journal_header_id;
param['document_category'] = 'JE';
var edit_flag = '${/parameter/@edit_flag}';
if(edit_flag == 'Y' ){
param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'UPDATE';
}else {
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY';
}
param['url_title'] = '${l:HLS530.JOURNAL_LINE_MODIFY}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_journal_import_create_link_id');
}
function hls536_journal_num_render(value, record, name) {
return '<a href="javascript:hls536_link_dynamic(' + record.id + ',' + record.get('journal_header_id') + ');">' + value + '</a>';
}
function receipt_attachment_upload(val,rec,name){
return '<a href=javascript:open_upload_window('+rec.get('journal_header_id')+')>附件</a>';
}
function open_upload_window(record_id){
var url = $('journal_attachment_uploadFile_id').getUrl() + '?table_name=HLS_JOURNAL_HEADER_IMP&header_id=' + record_id;
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'attachment_uploadFile_id',
width: 850,
height: 400
});
win.on('close', function() {
hls536_journal_query();
});
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
<a:dataSet id="hls536_wfl_status_ds" lookupCode="HLS536_WFL_STATUS"/>
<a:dataSet id="hls_journal_header_query">
<a:fields>
<a:field name="journal_num"/>
<a:field name="journal_date_from"/>
<a:field name="journal_date_to"/>
<a:field name="total_amount_dr_from"/>
<a:field name="total_amount_dr_to"/>
<a:field name="description"/>
<a:field name="wfl_status_n" displayField="code_value_name" options="hls536_wfl_status_ds" returnField="wfl_status" valueField="code_value"/>
<a:field name="wfl_status" />
</a:fields>
</a:dataSet>
<a:dataSet id="hls_journal_header_result_ds" autoPageSize="true" autoQuery="true" model="hls.HLS536.hls_journal_import_reverse_wfl" queryDataSet="hls_journal_header_query" selectable="true" queryUrl="${/request/@context_path}/autocrud/hls.HLS536.hls_journal_import_reverse_wfl/query?journal_reverse_batch_id=${/parameter/@journal_submit_batch_id}">
>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:toolbarButton click="hls536_journal_query" text="HLS.QUERY"/>
<a:toolbarButton click="hls536_journal_reset" text="HLS.RESET"/>
</a:screenTopToolbar>
<a:form column="5" labelSeparator=" " labelWidth="100" marginWidth="40" title="HAP_QUERY_TITLE">
<a:textField name="journal_num" bindTarget="hls_journal_header_query" prompt="凭证编号"/>
<a:datePicker name="journal_date_from" bindTarget="hls_journal_header_query" prompt="凭证日期从"/>
<a:datePicker name="journal_date_to" bindTarget="hls_journal_header_query" prompt="凭证日期到"/>
<a:numberField name="total_amount_dr_from" allowFormat="true" bindTarget="hls_journal_header_query" prompt="金额从"/>
<a:numberField name="total_amount_dr_to" allowFormat="true" bindTarget="hls_journal_header_query" prompt="金额到"/>
<a:textField name="description" bindTarget="hls_journal_header_query" prompt="凭证摘要"/>
<a:comboBox name="wfl_status_n" bindTarget="hls_journal_header_query" prompt="凭证导入状态"/>
</a:form>
<a:grid id="hls_journal_headers_grid" bindTarget="hls_journal_header_result_ds" marginHeight="250" marginWidth="40" navBar="true">
<a:columns>
<a:column name="journal_num" lock="true" prompt="凭证编号" renderer="hls536_journal_num_render" width="120"/>
<a:column name="js_company_short_name" prompt="记账公司" width="90"/>
<a:column name="period_name" align="center" prompt="期间" width="80"/>
<a:column name="journal_date" align="center" prompt="凭证日期" renderer="Leaf.formatDate" width="90"/>
<a:column name="currency_desc" align="center" prompt="币种" width="80"/>
<a:column name="total_amount_fuc_dr" align="right" prompt="金额" renderer="Leaf.formatMoney" width="120"/>
<a:column name="description" prompt="凭证摘要" width="220"/>
<a:column name="je_detail_count" prompt="凭证行数量" width="50"/>
<!--<a:column name="wfl_status_n" prompt="凭证导入状态" width="100"/>-->
<a:column name="reverse_wfl_status_n" prompt="凭证反冲状态" width="100"/>
<!--<a:column name="error_message" prompt="错误信息" width="150"/>-->
<!--<a:column name="attachment_file" prompt="附件" width="120" renderer="receipt_attachment_upload" align="center"/>-->
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">-->
<a:screen xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure >
<!--<a:model-execute model="hls.HLS536.delete_hls_journal_tmp"/>-->
<a:model-query model="hls.HLS536.hls_journal_import_head_id" rootPath="header"/>
<a:import-excel header_id="${/model/header/record/@header_id}" attribute5="D:\u01\hls_journal,fnd_interface_headers,${/model/header/record/@header_id}" separator="," status_field="/parameter/@ImportSuccess" template_code="HLS_JOURNAL_IMPORT" user_id="${/session/@user_id}" />
<!--<a:import-excel header_id="${/session/@session_id}" attribute5="D:\u01,fnd_interface_headers,${/session/@session_id}" separator="," status_field="/parameter/@ImportSuccess" template_code="HLS_JOURNAL_IMPORT" user_id="${/session/@user_id}" />-->
<a:model-execute model="hls.HLS536.insert_hls_journal_tmp"/>
</a:init-procedure>
<a:view>
<a:link id="hls_journal_entrance_import_link" url="${/request/@context_path}/modules/hls/HLS536/hls_journal_import_entrance.lview"/>
<script type="text/javascript"><![CDATA[
window.location.href = $('hls_journal_entrance_import_link').getUrl();
]]></script>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--<a:screen xmlns:a="http://www.leaf-framework.org/application">-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="hls.HLS536.hls_journal_position_query" rootPath="hls536_position_code"/>
</a:init-procedure>
<a:view>
<script type="text/javascript"><![CDATA[
function saveClick() {
if (!$('template_ds').validate()) {
return;
}
var templatetype = $('template_ds').getAt(0).get('template_type');
if (document.getElementById('importFile').value) {
var fileName = document.getElementById('importFile').value;
var fileType = fileName.substr(fileName.lastIndexOf("."));
fileType = fileType.toLowerCase();
if (fileType != '.xls'&&fileType != '.xlsx') {
alert('请选择正确的导入文件!请使用xls或者xlsx后缀的文件');
} else {
doSubmit(templatetype);
//document.getElementById('importForm').submit();
}
}
}
function doSubmit(templatetype) {
var form = document.getElementById('importForm');
var url = '${/request/@context_path}/modules/hls/HLS536/hls_journal_import_trans_upload.lview?_csrf=${/session/@_csrf.token}&template_type='+templatetype;
form.action = url;
form.submit();
}
]]></script>
<a:dataSets>
<a:dataSet id="template_type_desc_ds" autoCreate="true">
<a:datas>
<a:record code_value="GENERAL_SALARIES" code_value_name="普通工资导入模板"/>
<a:record code_value="BPO_SALARIES" code_value_name="BPO工资导入模板"/>
<a:record code_value="COST_IMPORT" code_value_name="成本导入模板"/>
<a:record code_value="FUND_POOL" code_value_name="资金池导入模板"/>
<a:record code_value="GLOBAL_TEMPLATE" code_value_name="通用模板"/>
<a:record code_value="FINANCIAL_TEMPLATE" code_value_name="财务模板"/>
</a:datas>
</a:dataSet>
<a:dataSet id="template_type_desc_ds1" autoCreate="true">
<a:datas>
<a:record code_value="GENERAL_SALARIES" code_value_name="普通工资导入模板"/>
<a:record code_value="BPO_SALARIES" code_value_name="BPO工资导入模板"/>
</a:datas>
</a:dataSet>
<a:dataSet id="template_type_desc_ds2" autoCreate="true">
<a:datas>
<a:record code_value="COST_IMPORT" code_value_name="成本导入模板"/>
<a:record code_value="GLOBAL_TEMPLATE" code_value_name="通用模板"/>
</a:datas>
</a:dataSet>
<a:dataSet id="template_type_desc_ds3" autoCreate="true">
<a:datas>
<a:record code_value="FUND_POOL" code_value_name="资金池导入模板"/>
<a:record code_value="FINANCIAL_TEMPLATE" code_value_name="财务模板"/>
</a:datas>
</a:dataSet>
<a:switch test="/model/hls536_position_code/record/@position_code">
<a:case value="026">
<a:dataSet id="template_ds" autoCreate="true">
<a:fields>
<a:field name="template_type_desc" displayField="code_value_name" options="template_type_desc_ds1"
returnField="template_type" valueField="code_value" required="true"/>
<a:field name="template_type"/>
</a:fields>
</a:dataSet>
</a:case>
<a:case value="014">
<a:dataSet id="template_ds" autoCreate="true">
<a:fields>
<a:field name="template_type_desc" displayField="code_value_name" options="template_type_desc_ds2"
returnField="template_type" valueField="code_value" required="true"/>
<a:field name="template_type"/>
</a:fields>
</a:dataSet>
</a:case>
<a:case value="012">
<a:dataSet id="template_ds" autoCreate="true">
<a:fields>
<a:field name="template_type_desc" displayField="code_value_name" options="template_type_desc_ds3"
returnField="template_type" valueField="code_value" required="true"/>
<a:field name="template_type"/>
</a:fields>
</a:dataSet>
</a:case>
<a:case value="017">
<a:dataSet id="template_ds" autoCreate="true">
<a:fields>
<a:field name="template_type_desc" displayField="code_value_name" options="template_type_desc_ds"
returnField="template_type" valueField="code_value" required="true"/>
<a:field name="template_type"/>
</a:fields>
</a:dataSet>
</a:case>
</a:switch>
<a:dataSet id="label_ds" autoCreate="true">
<a:fields>
<a:field name="label2" defaultValue="1、 严格按照导入模板整理数据,检查必输事项是否缺少数据。"/>
<a:field name="label3" defaultValue="2、 关闭Excel文件后,方可进行产品主数据导入。"/>
<a:field name="label4" defaultValue="3、 本导入程序只支持Office Excel。"/>
<a:field name="label5" defaultValue="仔细阅读上述事项,并检查确认无误。"/>
<a:field name="label6" defaultValue="导入完毕后,请在系统内核实数据是否导入成功。"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<a:fieldSet style="margin-left:10px;margin-top:10px;" title="导入注意事项" width="400">
<a:label name="label2" bindTarget="label_ds" style="margin-left:10px;" width="380"/>
<a:label name="label3" bindTarget="label_ds" style="margin-left:10px;" width="380"/>
<a:label name="label4" bindTarget="label_ds" style="margin-left:10px;" width="380"/>
<a:label name="label5" bindTarget="label_ds" style="color:#055A78;font-weight:bold;margin-left:10px;" width="380"/>
<a:label name="label6" bindTarget="label_ds" style="color:#055A78;font-weight:bold;margin-left:10px;" width="380"/>
</a:fieldSet>
<a:fieldSet style="margin-left:10px;margin-top:10px;" title="选择模板" width="400">
<a:comboBox name="template_type_desc" bindTarget="template_ds" prompt="模板类型"/>
</a:fieldSet>
<a:fieldSet style="margin-left:10px;margin-top:10px;" title="导入文件" width="400">
<form name="upload" id="importForm" action="hls_journal_import_trans_upload.lview?session_id=${/parameter/@session_id}&amp;template_type=${/parameter/@template_type}&amp;parent_ds_id=${/parameter/@parent_ds_id}&amp;_csrf=${/session/@_csrf.token}" enctype="multipart/form-data" method="post">
<label style="margin-left:10px;margin-top:10px;"><![CDATA[请选择文件:]]></label>
<input name="CONTENT" id="importFile" style="margin-bottom:4px;width:160px;height:22px;" type="file"/>
<input onclick="saveClick()" style="margin-left:10px;margin-top:10px;width:60px;" type="button" value="导入"/>
</form>
</a:fieldSet>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2012-12-6 上午11:18:39
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:init-procedure>
</a:init-procedure>
<a:view>
<a:link id="hls_journal_import_create_link_id" url="${/request/@context_path}/modules/hls/HLS536/hls_journal_import_create.lview"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="journal_attachment_uploadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<a:screen-include screen="modules/hls/hls_common_javascript.lview"/>
<script><![CDATA[
Leaf.onReady(function () {
$('hls_journal_header_result_ds').setQueryParameter('journal_submit_batch_id','${/parameter/@journal_submit_batch_id}');
})
//查询按钮
function hls536_journal_query() {
$('hls_journal_header_result_ds').setQueryParameter('journal_submit_batch_id','${/parameter/@journal_submit_batch_id}');
$('hls_journal_header_result_ds').query();
}
//重置按钮
function hls536_journal_reset() {
$('hls_journal_header_query').reset();
}
// 审批流程中,叶唯吟节点可编辑页面
function hls536_link_dynamic(reocrd_id, journal_header_id) {
var record = $('hls_journal_header_result_ds').findById(reocrd_id);
var param = record.data;
param['currency'] = param['currency_code'];
param['function_code'] = 'HLS536';
param['document_id'] = journal_header_id;
param['document_category'] = 'JE';
var edit_flag = '${/parameter/@edit_flag}';
if(edit_flag == 'Y' ){
param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'UPDATE';
}else {
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY';
}
param['url_title'] = '${l:HLS530.JOURNAL_LINE_MODIFY}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_journal_import_create_link_id');
}
function hls536_journal_num_render(value, record, name) {
return '<a href="javascript:hls536_link_dynamic(' + record.id + ',' + record.get('journal_header_id') + ');">' + value + '</a>';
}
function receipt_attachment_upload(val,rec,name){
return '<a href=javascript:open_upload_window('+rec.get('journal_header_id')+')>附件</a>';
}
function open_upload_window(record_id){
var url = $('journal_attachment_uploadFile_id').getUrl() + '?table_name=HLS_JOURNAL_HEADER_IMP&header_id=' + record_id;
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'attachment_uploadFile_id',
width: 850,
height: 400
});
win.on('close', function() {
hls536_journal_query();
});
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
<a:dataSet id="hls536_wfl_status_ds" lookupCode="HLS536_WFL_STATUS"/>
<a:dataSet id="hls536_reverse_wfl_status_ds" lookupCode="HLS536_WFL_STATUS_REVERSE"/>
<a:dataSet id="hls_journal_header_query">
<a:fields>
<a:field name="journal_num"/>
<a:field name="journal_date_from"/>
<a:field name="journal_date_to"/>
<a:field name="total_amount_dr_from"/>
<a:field name="total_amount_dr_to"/>
<a:field name="description"/>
<a:field name="wfl_status_n" displayField="code_value_name" options="hls536_wfl_status_ds" returnField="wfl_status" valueField="code_value"/>
<a:field name="wfl_status" />
<a:field name="reverse_wfl_status_n" displayField="code_value_name" options="hls536_reverse_wfl_status_ds" returnField="reverse_wfl_status" valueField="code_value"/>
<a:field name="reverse_wfl_status" />
</a:fields>
</a:dataSet>
<a:dataSet id="hls_journal_header_result_ds" autoPageSize="true" autoQuery="true" model="hls.HLS536.hls_journal_import_header_wfl" queryDataSet="hls_journal_header_query" selectable="true">
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:toolbarButton click="hls536_journal_query" text="HLS.QUERY"/>
<a:toolbarButton click="hls536_journal_reset" text="HLS.RESET"/>
</a:screenTopToolbar>
<a:form column="5" labelSeparator=" " labelWidth="100" marginWidth="40" title="HAP_QUERY_TITLE">
<a:textField name="journal_num" bindTarget="hls_journal_header_query" prompt="凭证编号"/>
<a:datePicker name="journal_date_from" bindTarget="hls_journal_header_query" prompt="凭证日期从"/>
<a:datePicker name="journal_date_to" bindTarget="hls_journal_header_query" prompt="凭证日期到"/>
<a:numberField name="total_amount_dr_from" allowFormat="true" bindTarget="hls_journal_header_query" prompt="金额从"/>
<a:numberField name="total_amount_dr_to" allowFormat="true" bindTarget="hls_journal_header_query" prompt="金额到"/>
<a:textField name="description" bindTarget="hls_journal_header_query" prompt="凭证摘要"/>
<a:comboBox name="wfl_status_n" bindTarget="hls_journal_header_query" prompt="凭证导入状态"/>
<a:comboBox name="reverse_wfl_status_n" bindTarget="hls_journal_header_query" prompt="凭证反冲状态"/>
</a:form>
<a:grid id="hls_journal_headers_grid" bindTarget="hls_journal_header_result_ds" marginHeight="250" marginWidth="40" navBar="true">
<a:columns>
<a:column name="journal_num" lock="true" prompt="凭证编号" renderer="hls536_journal_num_render" width="120"/>
<a:column name="js_company_short_name" prompt="记账公司" width="90"/>
<a:column name="period_name" align="center" prompt="期间" width="80"/>
<a:column name="journal_date" align="center" prompt="凭证日期" renderer="Leaf.formatDate" width="90"/>
<a:column name="currency_desc" align="center" prompt="币种" width="80"/>
<a:column name="total_amount_fuc_dr" align="right" prompt="金额" renderer="Leaf.formatMoney" width="120"/>
<a:column name="description" prompt="凭证摘要" width="220"/>
<a:column name="je_detail_count" prompt="凭证行数量" width="50"/>
<a:column name="wfl_status_n" prompt="凭证导入状态" width="100"/>
<a:column name="reverse_wfl_status_n" prompt="凭证反冲状态" width="100"/>
<a:column name="error_message" prompt="错误信息" width="150"/>
<a:column name="attachment_file" prompt="附件" width="120" renderer="receipt_attachment_upload" align="center"/>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
<?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 logger = $logger('server-script');
var instance_id = $ctx.parameter.instance_id;
var user_id=$ctx.parameter.user_id;
$bm('zjwfl.ZJWFL1060.wfl_instance_pdf').update({
instance_id: instance_id,
user_id :user_id
});
var file_templet_get_atm_path = $bm('zjwfl.ZJWFL1060.wfl_instance_pdf').queryAsMap({
instance_id: instance_id,
user_id :user_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;
$ctx.current_parameter.user_id = user_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,
user_id :user_id
});
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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment