import { getDicts } from "@/api/system/dict/data";
/**
 * 油品，根据油品名查类型
 */
export async function queryOilType(oilName) {
  const oilListRes =  await getDicts("oil_name")
  const oilList = oilListRes.data;
  const res = oilList.find((ele)=>{
    return ele.dictLabel === oilName
  })
  if(!res){
    return 0
  }
  return +res.dictValue
}