总仓和门店是多选框
这个地方存的仓库
if( (select count(1) from dwd_department d left join dwd_3rd_sys_store s1 on s1.3rd_sys_store_id = d.id
where d.department_code = '${storeCode}' and s1.3rd_sys_store_id is not null ) >= 1 ,i.Store_Turnover_Days,i.Warehouse_Turnover_Days)
(case when '${参数名}'='总仓' then 总仓用i.Warehouse_Turnover_Days else i.Store_Turnover_Days end)
--------------
(CASE WHEN A.INV_CODE='总仓' then 总仓用i.Warehouse_Turnover_Days else i.Store_Turnover_Days end)