package com.cusc.nirvana.user.rnr.fp.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cusc.nirvana.user.rnr.fp.dao.entity.InstructionPO;
import com.cusc.nirvana.user.rnr.fp.dto.InstructionDTO;
import com.cusc.nirvana.user.rnr.fp.dto.InstructionRespDTO;

/**
 * 指令表服务接口
 */
public interface IInstructionService extends IService<InstructionPO> {

    /**
     * 收到指令，进行信息上报
     *
     * @param instructionDTO
     * @return
     */
    InstructionRespDTO uploadInfo(InstructionDTO instructionDTO);

    InstructionRespDTO instructionsIssue(InstructionDTO instructionDTO);

    /**
     * 新增指令说明
     *
     * @param instructionDTO
     * @return
     */
    InstructionPO insertInstruction(InstructionDTO instructionDTO);

    /**
     * 重试上报
     *
     * @param uuid
     * @return
     */
    void tryUploadInfo(String uuid);

    /**
     * 超出重试次数之后发送告警信息
     *
     * @param instructionPO
     */
    void sendWarningMessage(InstructionPO instructionPO);

    /**
     * 异步同步上报信息
     *
     * @param instructionPO
     */
    void asyncUploadInfo(InstructionPO instructionPO);

    /**
     * 根据uuid获取指令信息
     *
     * @param uuid
     * @return
     */
    InstructionPO getByUuid(String uuid);

}
