package com.xinda.iot.service;

import java.util.List;

import com.xinda.common.core.mq.ota.OtaUpgradeBo;
import com.xinda.common.enums.OTAUpgrade;
import com.xinda.iot.domain.FirmwareTaskDetail;
import com.xinda.iot.model.FirmwareTaskDetailInput;
import com.xinda.iot.model.FirmwareTaskDetailOutput;
import com.xinda.iot.model.FirmwareTaskDeviceStatistic;

/**
 * 固件升级任务详细Service接口
 * 
 * @author kerwincui
 * @date 2022-10-24
 */
public interface IFirmwareTaskDetailService 
{
    /**
     * 查询固件升级任务详细
     * 
     * @param id 固件升级任务详细主键
     * @return 固件升级任务详细
     */
    public FirmwareTaskDetail selectFirmwareTaskDetailById(Long id);

    /**
     * 查询固件升级任务详细列表
     * 
     * @param firmwareTaskDetail 固件升级任务详细
     * @return 固件升级任务详细集合
     */
    public List<FirmwareTaskDetail> selectFirmwareTaskDetailList(FirmwareTaskDetail firmwareTaskDetail);

    /**
     * 新增固件升级任务详细
     * 
     * @param firmwareTaskDetail 固件升级任务详细
     * @return 结果
     */
    public int insertFirmwareTaskDetail(FirmwareTaskDetail firmwareTaskDetail);

    /**
     * 修改固件升级任务详细
     * 
     * @param firmwareTaskDetail 固件升级任务详细
     * @return 结果
     */
    public int updateFirmwareTaskDetail(FirmwareTaskDetail firmwareTaskDetail);

    /**
     * 批量删除固件升级任务详细
     * 
     * @param ids 需要删除的固件升级任务详细主键集合
     * @return 结果
     */
    public int deleteFirmwareTaskDetailByIds(Long[] ids);

    /**
     * 删除固件升级任务详细信息
     * 
     * @param id 固件升级任务详细主键
     * @return 结果
     */
    public int deleteFirmwareTaskDetailById(Long id);

    /**
     * OTA升级更新
     * @param bo 升级返回对象
     * @param status 升级状态
     * @return 版本号
     */
    public String update(OtaUpgradeBo bo, OTAUpgrade status);

    public List<FirmwareTaskDetailOutput> selectFirmwareTaskDetailListByFirmwareId(FirmwareTaskDetailInput firmwareTaskDetailInput);

    public List<FirmwareTaskDeviceStatistic> deviceStatistic(FirmwareTaskDetailInput firmwareTaskDetailInput);

}
