<?xml version="1.0" encoding="UTF-8"?> <bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false" defaultOrderBy="t2.monthlist desc"> <bm:operations> <bm:operation name="query"> <bm:query-sql><![CDATA[ select * from( select substr(t1.monthlist, 1, 4) yearlist, t1.monthlist from (SELECT TO_CHAR(ADD_MONTHS(TO_DATE('2007-01', 'yyyy-MM'), ROWNUM - 1), 'yyyy-MM') as monthlist FROM DUAL CONNECT BY ROWNUM <= months_between(to_date('2107-01', 'yyyy-MM'), to_date('2007-01', 'yyyy-MM')) + 1) t1) t2 #WHERE_CLAUSE# ]]></bm:query-sql> </bm:operation> </bm:operations> <bm:fields> <bm:field name="yearlist" forDisplay="true" forQuery="true" prompt="年份"/> <bm:field name="monthlist" forDisplay="true" forQuery="true" prompt="月份"/> </bm:fields> <bm:query-fields> <bm:query-field name="monthlist" queryExpression="t2.monthlist like ${@monthlist}"/> <bm:query-field name="yearlist" queryExpression="t2.yearlist like ${@yearlist}"/> </bm:query-fields> </bm:model>