package com.artfess.rescue.event.manager;

import com.artfess.base.model.CommonResult;
import com.artfess.rescue.event.dto.EventInfoDto;
import com.artfess.rescue.event.model.BizEventHandle;
import com.artfess.base.manager.BaseManager;
import com.artfess.rescue.event.vo.HandInfoVO;

import java.util.List;

/**
 * 事件处置记录 服务类
 *
 * @company 阿特菲斯信息技术有限公司
 * @author 系统管理员
 * @since 2024-08-05
 */
public interface BizEventHandleManager extends BaseManager<BizEventHandle> {

    /**
     * 确认接收该事件
     * @param dto
     * @return
     */
    boolean accept(EventInfoDto dto);

    /**
     * 根据节点名称查询，该事件节点的个数
     * @param eventId
     * @param nodeName
     * @return
     */
    int countNode(String eventId,String nodeName);

    /**
     * 新增操作
     * @param entity
     * @return
     */
    boolean saveInfo(BizEventHandle entity);

    /**
     * 新增操作
     * @param entity
     * @return
     */
    boolean savePcInfo(BizEventHandle entity);

    /**
     * 新增操作
     * @param entity
     * @return
     */
    boolean saveEndInfo(BizEventHandle entity);

    /**
     * 修改操作
     * @param entity
     * @return
     */
    boolean updateInfo(BizEventHandle entity);

    /**
     * 根据事件id查询处置详情
     * @param eventId
     * @return
     */
    List<HandInfoVO> getHands(String eventId);

    /**
     * 根据事件id查询事件处置信息和救援处置信息
     * @param id
     * @return
     */
    List<HandInfoVO> getHandInfo(String id);

    /**
     * 事件批量完结
     *
     * @param ids 实体ID集合
     * @return CommonResult<String>
     */
    CommonResult<String> batchFinish(List<String> ids);
}
