import { baseServer, dict, cbl, main } from '@/api'
import request from '@/utils/require'
// 仓房列表
export function warehouseList(data) {
	return request({ url: `${baseServer}/warehouseList`, method: 'post', data: data || {} })
}
export function warehouseListNew(data) {
	return request({ url: `${baseServer}/warehouseListNew`, method: 'post', data: data || {} })
}
// 库点列表
export function sinkpointList(data) {
	return request({ url: `${baseServer}/sinkpointList`, method: 'post', data: data || {} })
}
// 粮食库存列表
export function foodStocksList(data) {
	return request({ url: `${baseServer}/sinkpointList`, method: 'post', data: data || {} })
}

// 根据分组id查询数据字典/dataDictionary/findByGroupId/{groupId}
export function findByGroupId(groupId) {
	return request({ url: `${dict}/dataDictionary/findByGroupId/${groupId}`, method: 'get' })
}
// /contractPage/{pageNum}/{pageSize}
// 分页获取合同信息列表
export function contractPage(page, data) {
	return request({ url: `${baseServer}/contractPage/${page.pageNum}/${page.pageSize}`, method: 'post', data: data })
}

//粮食库存列表
export function foodStocksListNew(data) {
	return request({
		url: `${cbl}/client/integratedQuery/selectLskcxxList`,
		method: 'post',
		data: data || {}
	})
}
//
export function organization(groupId) {
	return request({ url: `${baseServer}/organization/${groupId}`, method: 'get' })
}
//货源表仓号
export function listWarehouseInventory(data) {
	return request({
		url: `${main}/cbl/base-server/client/listWarehouseInventory`,
		method: 'post',
		data: data || {}
	})
}

export function selectWarehouseAndOilTank(data) {
	return request({
		url: `${main}/cbl/base-server/client/selectWarehouseAndOilTank`,
		method: 'post',
		data: data || {}
	})
}