case
when t.establish_date=$s{sys_param_50000002} then to_char(to_date($s{sys_param_50000002},'yyyymmdd'),'yyyy-MM-dd')
when t.winding_date=$s{sys_param_50000002} then to_char(to_date($s{sys_param_50000001},'yyyymmdd'),'yyyy-MM-dd')
end
case t4.allow_cust_type
when '0' then '个人理财'
when '1' then '机构专属理财产品'
when '2' then '同业理财'
when '3' then '私人银行'
when '4' then '高资产净值客户'
else '混合购买' end