Commit a2fc1cc0 authored by 18083's avatar 18083

手工凭证导入-首页数据权限控制

parent a15c8563
...@@ -9,31 +9,172 @@ ...@@ -9,31 +9,172 @@
<bm:operations> <bm:operations>
<bm:operation name="query"> <bm:operation name="query">
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
select select * from (
t1.journal_header_id, select t1.journal_header_id,
t1.journal_num, t1.journal_num,
(select c.company_short_name from fnd_companies_vl c where c.company_id=t1.je_company_id) js_company_short_name, (select c.company_short_name
t1.period_name, from fnd_companies_vl c
t1.journal_date, where c.company_id = t1.je_company_id) js_company_short_name,
t1.currency_code, t1.period_name,
(SELECT gc.currency_name t1.journal_date,
FROM gld_currency_v gc t1.currency_code,
WHERE gc.currency_code = t1.currency_code) currency_desc, (SELECT gc.currency_name
t1.total_amount_fuc_dr, FROM gld_currency_v gc
(SELECT d.je_transaction_desc WHERE gc.currency_code = t1.currency_code) currency_desc,
FROM gld_je_transaction d t1.total_amount_fuc_dr,
WHERE d.je_transaction_code = t1.je_transaction_code) je_transaction_desc, (SELECT d.je_transaction_desc
t1.description, FROM gld_je_transaction d
(SELECT COUNT(1) WHERE d.je_transaction_code = t1.je_transaction_code) je_transaction_desc,
FROM hls_journal_detail_imp t t1.description,
WHERE t.journal_header_id = t1.journal_header_id) je_detail_count, (SELECT COUNT(1)
t1.wfl_status, FROM hls_journal_detail_imp t
(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, WHERE t.journal_header_id = t1.journal_header_id) je_detail_count,
t1.reverse_wfl_status, t1.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, (select v.code_value_name value_name
t1.journal_type, from sys_code_values_v v
(select t.post_gl_status from hls_journal_header t where t.journal_num=t1.journal_num) post_gl_status where v.code = 'HLS536_WFL_STATUS'
FROM hls_journal_header_imp t1 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_num = t1.journal_num) post_gl_status
FROM hls_journal_header_imp t1
where 1=1
AND EXISTS (SELECT 1
FROM exp_emp_assign_e_v t
WHERE t.user_id = ${/session/@user_id}
AND t.position_code IN ('014'))
and t1.journal_type in('COST_IMPORT','GLOBAL_TEMPLATE')
union
select t1.journal_header_id,
t1.journal_num,
(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,
t1.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_num = t1.journal_num) post_gl_status
FROM hls_journal_header_imp t1
where 1=1
AND EXISTS (SELECT 1
FROM exp_emp_assign_e_v t
WHERE t.user_id = ${/session/@user_id}
AND t.position_code IN ('012'))
and t1.journal_type in('FUND_POOL','FINANCIAL_TEMPLATE')
union
select t1.journal_header_id,
t1.journal_num,
(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,
t1.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_num = t1.journal_num) post_gl_status
FROM hls_journal_header_imp t1
where 1=1
AND EXISTS (SELECT 1
FROM exp_emp_assign_e_v t
WHERE t.user_id = ${/session/@user_id}
AND t.position_code IN ('026'))
and t1.journal_type in('GENERAL_SALARIES','BPO_SALARIES')
union
select t1.journal_header_id,
t1.journal_num,
(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,
t1.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_num = t1.journal_num) post_gl_status
FROM hls_journal_header_imp t1
where 1=1
AND EXISTS (SELECT 1
FROM exp_emp_assign_e_v t
WHERE t.user_id = ${/session/@user_id}
AND t.position_code IN ('017'))
and t1.journal_type in('GENERAL_SALARIES','BPO_SALARIES','COST_IMPORT','FUND_POOL','GLOBAL_TEMPLATE','FINANCIAL_TEMPLATE')
) t1
#WHERE_CLAUSE# #WHERE_CLAUSE#
order by t1.journal_header_id desc order by t1.journal_header_id desc
]]></bm:query-sql> ]]></bm:query-sql>
......
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