langjiu-project/BI/销售业绩/销售回款明细-废弃.sql

8 lines
491 B
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- ======================================
-- 2024-11-21由李维调整完毕
-- ======================================
select * from dm.v_ag_sal_collection
where 1=1
${if(len(p_bill_code) == 0,"","and bill_code in ('" + p_bill_code + "')")}
${if(len(p_remark) == 0,"","and remark in ('" + p_remark + "')")}
${if(p_is_src_deal== "主经销商",if(len(p_deal_name)==0,"","and deal_name in ('" + p_deal_name + "')"),if(len(p_deal_name)==0,"","and src_deal_name in ('" + p_deal_name + "')"))}