select oil_price_id, oil_name, oil_price, station_id, d.dept_name as station_name, date
from station_oil_price p join sys_dept d
on p.station_id = d.dept_id
and p.oil_name like concat('%', #{oilName}, '%')
and p.oil_price = #{oilPrice}
and p.station_id = #{stationId}
and p.station_id in
#{item}
select oil_price_id, oil_name, oil_price, station_id, d.dept_name as station_name, date
from station_oil_price p join sys_dept d
on p.station_id = d.dept_id
and p.oil_name like concat('%', #{oilName}, '%')
and p.oil_price = #{oilPrice}
and p.station_id = #{stationId}
and p.station_id in
#{item}
and oil_name!="非油品"
-- select oil_price_id, oil_name, oil_price, station_id, d.dept_name as station_name, s.dict_value as oil_type
-- from station_oil_price p
-- join sys_dept d on p.station_id = d.dept_id
-- join sys_dict_data s on s.dict_label = p.oil_name and s.dict_type = "oil_name"
select DISTINCT oil_name,s.dict_value as oil_type
from station_oil_price p
join sys_dept d on p.station_id = d.dept_id
join sys_dict_data s on s.dict_label = p.oil_name and s.dict_type = "oil_name"
and p.oil_name like concat('%', #{oilName}, '%')
and p.oil_price = #{oilPrice}
and p.station_id = #{stationId}
and p.station_id in
#{item}
select oil_price_id, oil_name, oil_price, station_id, d.dept_name as station_name, date
from station_oil_price p join sys_dept d
on p.station_id = d.dept_id
where p.oil_price_id = #{oilPriceId}
insert into station_oil_price
oil_name,
oil_price,
station_id,
date,
#{oilName},
#{oilPrice},
#{stationId},
#{date},
update station_oil_price
oil_name = #{oilName},
oil_price = #{oilPrice},
station_id = #{stationId},
date = #{date},
where oil_price_id = #{oilPriceId}
delete from station_oil_price where oil_price_id = #{oilPriceId}
delete from station_oil_price where oil_price_id in
#{oilPriceId}