1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: jack
$Date: 2014-6-3 上午11:41:02
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:parameters>
<!-- <bm:parameter name="fin_statement_templet_id" inputPath="" input="true" dataType="java.lang.Long" /> -->
<!-- <bm:parameter name="bp_id" input="true" inputPath="" dataType="java.lang.Long" /> --><![CDATA[
]]></bm:parameters>
<bm:query-sql><![CDATA[select t.fiscal_year || '年' || t.fiscal_month || '月' fiscal_year,
'first_year' as year,
t.audit_inf,
'Y' as flag
from rsc_fin_statement_prj_hds t
where t.fin_statement_id =
rsc_fin_statement_prj_pkg.get_fin_statement_id(${/model/get_tenant_id/record/@fin_statement_templet_id}, ${/session/@company_id},${/model/get_tenant_id/record/@bp_id}, 1)
union all
select t.fiscal_year || '年' || t.fiscal_month || '月' fiscal_year,
'second_year' as year,
t.audit_inf,
'N' as flag
from rsc_fin_statement_prj_hds t
where t.fin_statement_id =
rsc_fin_statement_prj_pkg.get_fin_statement_id(${/model/get_tenant_id/record/@fin_statement_templet_id}, ${/session/@company_id},${/model/get_tenant_id/record/@bp_id}, 2)
union all
select t.fiscal_year || '年' || t.fiscal_month || '月' fiscal_year,
'third_year' as year,
t.audit_inf,
'N' as flag
from rsc_fin_statement_prj_hds t
where t.fin_statement_id =
rsc_fin_statement_prj_pkg.get_fin_statement_id(${/model/get_tenant_id/record/@fin_statement_templet_id}, ${/session/@company_id},${/model/get_tenant_id/record/@bp_id}, 3)
union all
select t.fiscal_year || '年' || t.fiscal_month || '月' fiscal_year,
'fourth_year' as year,
t.audit_inf,
'N' as flag
from rsc_fin_statement_prj_hds t
where t.fin_statement_id =
rsc_fin_statement_prj_pkg.get_fin_statement_id(${/model/get_tenant_id/record/@fin_statement_templet_id}, ${/session/@company_id},${/model/get_tenant_id/record/@bp_id}, 4)
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>