${IF(pRESOURCE_TYPE = '现存已配车',"
select
calculation_method,
car_series,
car_model,
sum(allocation_predict_qty) as qty
from
dal.dal_dvmp_delivery_forecast_fr
where 1=1 "
+if(len(pMETHOD) == 0,"","and calculation_method IN ('" +pMETHOD + "')")+
"group by car_series,calculation_method,
car_model",
"select
car_series,
car_model,
sum(allocation_predict_qty) as qty
from
dal.dal_dvmp_delivery_forecast_fr
group by car_series,
car_model
"
)}
替换一下即可