package com.yuchen.saas.park.service.fault.service;

import com.yuchen.saas.park.api.entity.fault.EquipmentBreakdownHistory;
import com.yuchen.saas.park.api.entity.fault.EquipmentPictureAnalyse;
import com.yuchen.saas.park.api.entity.fault.EquipmentPictureRule;
import com.yuchen.saas.park.api.entity.fault.EquipmentStatus;
import org.nest.springwrap.core.mp.base.BaseService;
import org.nest.springwrap.core.tool.api.R;

import java.util.List;

/**
 * @Author: 肖润飞
 * @CreateTime: 2022/10/18 15:26
 * @Description: 设备画像规则
 * @Version: 1.0
 */
public interface EquipmentPictureRuleService extends BaseService<EquipmentPictureRule> {
    /**
     * 检测该异常状态是否触发设备画像分析
     *
     * @param equipmentStatus 设备异常状态信息
     * @return
     */
    EquipmentPictureRule checkEquipmentPictureRule(EquipmentStatus equipmentStatus);

    /**
     * 根据设备异常进行指定画像规则统计
     *
     * @param pictureRule     指定画像规则
     * @param equipmentStatus 设备异常信息
     */
    EquipmentPictureAnalyse pictureCount(EquipmentPictureRule pictureRule, EquipmentStatus equipmentStatus, EquipmentBreakdownHistory history);

    /**
     * 批量更改显示的rule
     * @param rule 需要显示的rule
     * @return
     */
    R updateBatchShow(List<EquipmentPictureRule> rule);

    /**
     * 更新画像规则
     * @param rule
     * @return
     */
    R updateRule(EquipmentPictureRule rule);

    /**
     * 列表统计vo
     * @return
     */
    R listVo();
}
