select MONTH(reportDate) as month,sum(case when b.type > 0 then weight end)/1000.0 as oil_quantity1,
sum(case when b.type = 0 then weight end)/1000.0 as oil_quantity2
from dayOilSale a,oilCode b
where a.stationId=@0 and a.reportDate>=@1 and a.reportDate<@2 and a.oilCode=b.oilCode
and MONTH(reportDate) in (select month from sales_kanban_list where kanbanStationId=@3 and kanbanYear=@4 and oil_quantity1=0)
group by MONTH(reportDate) -- PARAMETERS: ["33153307","2025-01-01","2026-01-01","33153307",2025]
用的nodejs 的 dmdb 驱动,提示“参数个数不匹配”
报错是因为达梦不支持 @0 @1 这种占位符,要改成 ? 占位符