import http from '@/services/http'
import tradeServer from '@/services/socket/trade'

/**
 * 查询仓库信息
 */
export function queryWarehouseInfo(params: Ermcp.WarehouseInfoReq) {
    return http.commonRequest<Ermcp.WarehouseInfoRsp[]>({
        url: '/Guangzuan/QueryWarehouseInfo',
        params,
    })
}

/**
 * 仓库新增修改
 */
export function warehouseApply(params: Proto.WarehouseApplyReq) {
    return tradeServer.sendMessage<Proto.WarehouseApplyRsp>({
        params,
        reqName: 'WarehouseApplyReq',
        rspName: 'WarehouseApplyRsp'
    })
}