<?xml version="1.0" encoding="UTF-8"?>
<!--
    @Author: xsh 35973  
    @Date: 2022/3/25 10:58
    @Revision: 1.0  
    @Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1">
    <bm:fields>
        <bm:field name="report_num" displayWidth="150" forDisplay="false" forQuery="false" prompt="财报年月"/>
        <bm:field name="report_month" displayWidth="150" forDisplay="true" forQuery="true" prompt="财报年月"/>
    </bm:fields>
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                select * from (select period_name month_code,period_name report_month,internal_period_num report_num
                from gld_periods where adjustment_flag = 'N'
                and start_date BETWEEN to_date('2015-01-01','YYYY-MM-DD') AND add_months(sysdate,15))
                #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:query-fields>
        <bm:query-field field="report_num" queryExpression=" report_num = ${@report_num}"/>
        <bm:query-field field="report_month" queryExpression=" substr(report_month,0,4) = substr(${@report_month},0,4)"/>
    </bm:query-fields>
</bm:model>