You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
122 lines
4.5 KiB
122 lines
4.5 KiB
48250^Beschäftigungsverhältnisse^--Freemarker Template\ |
|
<#include "SQL_lingua_franca"/>\ |
|
<#include "SuperX_general"/>\ |
|
--\ |
|
--Autor D. Quathamer 2024\ |
|
<sqlvars>\ |
|
<sqlvar name="basetable" type="hash"><![CDATA[\ |
|
<#assign my_base_rs='sva_pbv_aggr_pgd' />\ |
|
SELECT distinct name,\ |
|
0::smallint as is_virtual,\ |
|
name as runtime_tablename\ |
|
from sx_tables\ |
|
where name in ('${my_base_rs}')\ |
|
and 0=(select count(*) from rpta_resultset R where R.uniquename='${my_base_rs}')\ |
|
union\ |
|
select R.uniquename,\ |
|
1::smallint as is_virtual,\ |
|
'tmp_' || R.uniquename as runtime_tablename\ |
|
from rpta_resultset R where R.uniquename='${my_base_rs}'\ |
|
;\ |
|
]]>\ |
|
</sqlvar>\ |
|
<sqlvar name="rpta_resultset" type="hash"><![CDATA[\ |
|
select caption,\ |
|
uniquename,\ |
|
fieldclause,\ |
|
joinclause,\ |
|
whereclause,\ |
|
systeminfo_id\ |
|
from rpta_resultset\ |
|
where uniquename='${basetable.name}';\ |
|
\ |
|
]]></sqlvar>\ |
|
<sqlvar name="rpta_column_layout" type="hash"><![CDATA[\ |
|
select L.uniquename,\ |
|
L.caption,\ |
|
L.whereclause,\ |
|
L.sortclause\ |
|
from rpta_resultset R, rpta_column_layout L\ |
|
where L.resultset_id=R.tid\ |
|
and R.uniquename='${basetable.name}'\ |
|
and L.tid=<<Spaltenlayout>>;\ |
|
\ |
|
]]></sqlvar>\ |
|
<sqlvar name="columns" type="hashsequence"><![CDATA[\ |
|
SELECT C.srcfieldname,\ |
|
(case when string_not_null(C.targetfieldname)='' then C.srcfieldname else C.targetfieldname end) as targetfieldname,\ |
|
T.uniquename as coltype,\ |
|
C.is_aggregate,\ |
|
(case when string_not_null(CL.caption)='' then C.caption else CL.caption end) as caption,\ |
|
CL.is_visible,\ |
|
CL.visible_size as visible_width,\ |
|
(select F.sql_code from rpta_format_code F where F.tid=CL.format_code_id) as format_sql,\ |
|
C.col_function as colfunction,\ |
|
(case when string_not_null(CL.description)='' then C.description else CL.description end) as description\ |
|
FROM rpta_column_layout L, rpta_column2layout CL, rpta_column C, rpta_column_type T\ |
|
where L.tid=CL.layout_id\ |
|
and C.tid=CL.column_id\ |
|
and T.tid=C.column_type\ |
|
and L.tid=<<Spaltenlayout>>\ |
|
/* and C.uniquename in (<<Spalten>>) */\ |
|
order by CL.sortnr\ |
|
;\ |
|
]]></sqlvar>\ |
|
</sqlvars>\ |
|
\ |
|
<#assign filter="sva_pbv_aggr.d_besch_von <= date_val(<<Datum>>) \ |
|
and sva_pbv_aggr.d_besch_bis >= date_val(<<Datum>>) "/>\ |
|
\ |
|
<#assign filter= filter + "\ |
|
and sva_pbv_aggr.ch110_besch_st in "+.vars["Beschäftigungsstelle (Person)"].allNeededKeysList + "\ |
|
/* and kapitel = <<Kapitel>> */\ |
|
/* and titel = <<Titel>> */\ |
|
/* and d_befristung <= date_val(<<Befristet bis>>)*/\ |
|
/* and teilzeitart in (<<Teilzeitart>>) */\ |
|
/* and ca501_staat <<Staatsangehörigkeit>> */\ |
|
/* and geschlecht= <<Geschlecht>> */\ |
|
/* and ${<<Filter Personal>>} */\ |
|
" />\ |
|
\ |
|
/* <#assign filter = filter + " and sva_pbv_aggr.kostenstelle in "+.vars["Kostenstelle (Person)"].allNeededKeysList /> -- <<Kostenstelle (Person)>> */\ |
|
/* <#assign filter = filter + " and sva_pbv_aggr.ca107_dienstart in "+.vars["Dienstart"].allNeededKeysList /> -- <<Dienstart>> */\ |
|
/* <#assign filter = filter + " and sva_pbv_aggr.ca108_amtsbez in "+.vars["Amtsbezeichnung"].allNeededKeysList /> -- <<Amtsbezeichnung>> */\ |
|
/* <#assign filter = filter + " and sva_pbv_aggr.ch212_geldgeber in "+.vars["Geldgeber"].allNeededKeysList /> -- <<Geldgeber>> */\ |
|
/* <#assign filter = filter + " and sva_pbv_aggr.vertart in "+.vars["Vertragsart"].allNeededKeysList /> -- <<Vertragsart>> */\ |
|
\ |
|
\ |
|
\ |
|
\ |
|
\ |
|
<#if columns?has_content>\ |
|
\ |
|
\ |
|
<#if basetable.is_virtual==1>\ |
|
\ |
|
create temp table ${basetable.runtime_tablename} as\ |
|
select ${rpta_resultset.fieldclause} \ |
|
from ${rpta_resultset.joinclause} \ |
|
where 1=1\ |
|
<#if rpta_resultset.whereclause != ""> \ |
|
${rpta_resultset.whereclause} </#if>\ |
|
and ${filter}\ |
|
;\ |
|
</#if>\ |
|
\ |
|
\ |
|
<@rpta_interpret_column_layout nonvirtualTableFilter=filter/>\ |
|
\ |
|
</#if> --wenn columns?has_content^--Freemarker Template\ |
|
XIL List\ |
|
sizable_columns horizontal_scrolling\ |
|
drop_and_delete movable_columns \ |
|
white_space_color=COLOR_WHITE fixed_columns=1\ |
|
min_heading_height=55\ |
|
<#foreach column in columns>\ |
|
<#if column.is_visible!=0>\ |
|
Column CID=0 heading_text="${column.caption}" center_heading explanation="${column.description}"\ |
|
row_selectable heading_platform readonly\ |
|
width=${column.visible_width} text_size=60\ |
|
</#if>\ |
|
</#foreach>\ |
|
@@@^^^Informationen über Stellen und deren Besetzung zu einem bel. Zeitpunkt^ ^^2^700^500^^1^<<SQL>> select 'Achtung: Das Datum des Buttons Institution bzw OrgEinheit (Stelle) unterscheidet sich vom ausgewählten Datum im Maskenfeld.' from xdummy where <<Institution (Stelle)-Stand>> != date_val(<<Datum>>)^
|
|
|