package cz.moneta.test.dsl.util.task.retail.loans;

public class RetailSQL {

    public static String GET_APP_STATE_CIF_BY_RC = "select a.ins_dt, a.upd_dt, as1.descr as stav, ft.descr as typ_zadosti, a.* from NASDB_OWNER.appl a " +
            "  inner join NASDB_OWNER.appl_stat as1 on a.appl_stat_key=as1.appl_stat_key " +
            "  inner join NASDB_OWNER.form_tp ft on a.form_tp_key=ft.form_tp_key " +
            "  where a.appl_key in ( " +
            "    select appl_key from NASDB_OWNER.appl_pt_role where inst_pt_key in(select inst_pt_key from NASDB_OWNER.inst_pt where  " +
            "    rc_num='%s' " +
            ")) " +
            "and BUS_KEY = 7 " +
            "and ft.descr ='Identifikační žádost' " +
            "order by a.UPD_DT DESC";

    public static String GET_APP_STATE_NBL_BY_RC = "select a.ins_dt, a.upd_dt, as1.descr as stav, ft.descr as typ_zadosti, a.* from NASDB_OWNER.appl a " +
            "  inner join NASDB_OWNER.appl_stat as1 on a.appl_stat_key=as1.appl_stat_key " +
            "  inner join NASDB_OWNER.form_tp ft on a.form_tp_key=ft.form_tp_key " +
            "  where a.appl_key in ( " +
            "    select appl_key from NASDB_OWNER.appl_pt_role where inst_pt_key in(select inst_pt_key from NASDB_OWNER.inst_pt where  " +
            "rc_num='%s' " +
            ")) " +
            "and BUS_KEY = 58156 " +
            "order by a.UPD_DT DESC";
}
