/*
* Copyright (c) 京北方信息技术股份有限公司 Corporation 2022 . All rights reserved.
*
*/
package net.northking.cctp.device.db.service;

import net.northking.cctp.common.db.BasicService;
import net.northking.cctp.common.db.Pagination;
import net.northking.cctp.common.http.QueryByPage;
import net.northking.cctp.device.db.entity.CdEngineInfo;
import net.northking.cctp.device.dto.engineInfo.CdEngineInfoDetailDto;
import net.northking.cctp.device.dto.engineInfo.CdEngineInfoQueryDto;
import net.northking.cctp.device.dto.engineInfo.CdEngineInfoVersionDto;

import java.util.List;

public interface CdEngineInfoService extends BasicService<CdEngineInfo>
{

    Pagination<CdEngineInfoDetailDto> queryPages(QueryByPage<CdEngineInfoQueryDto> dto);

    Integer updateVersion(CdEngineInfoVersionDto dto);

    List<CdEngineInfo> queryEngineInfoNotIds(List<String> ids, int deviceNum,String ipAddr);

    List<CdEngineInfo> queryEngineOffLive();

    void updateEngineStatus(List<String> ids);

    /**
     * 范围查询引擎，返回需要的数量
     * @param pcDeviceIds
     * @param countNeed
     * @return
     */
    List<CdEngineInfo> queryNgInDeviceIds(List<String> pcDeviceIds, int countNeed);

    /**
     * 查询可用引擎
     * @param deviceIdList 设备id集合
     * @return 可用引擎集合
     */
    List<CdEngineInfo> queryUsableEngine(List<String> deviceIdList);
}
