PostgreSQL多字段拼接、传入多条件查询
select * from tzq_bas_date_rule_head_t where date_rule_head_id in (select tmp.s1 from (select distinct unnest(ARRAY[r.date_rule_head_id,r.twice_salary_date_rule_head_id ]) as s1from tzq_bas_salary_rule_t r,tzq_bas_salary_supplier_t s where r.salary_rule_id=s.salary_rule_idAND s.enable_flag='Y'and concat(r.management_entity_code::text,',',S.SUPPLIER_CODE::text)= ANY(ARRAY['ME0474,00640946','ME0104,00640946'])) tmp where tmp.s1 is not null
);