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

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.EquipmentStatus;
import com.yuchen.saas.park.api.vo.fault.EquipmentPictureAnalyseVo;
import org.nest.springwrap.core.mp.base.BaseService;
import org.nest.springwrap.core.tool.api.R;

/**
 * @Author: 肖润飞
 * @CreateTime: 2022/10/18 15:26
 * @Description: 设备画像分析
 * @Version: 1.0
 */
public interface EquipmentPictureAnalyseService extends BaseService<EquipmentPictureAnalyse> {
    /**
     * 根据画像分析表id,获得生成画像分析数据的设备故障历史数据
     *
     * @param page 分页数据
     * @param id   设备状态id
     * @return
     */
    R pageHistory(Page page, Long id);


    /**
     * 保存设备画像分析数据
     *
     * @param equipmentStatus 设备异常状态信息
     * @return
     */
    EquipmentPictureAnalyse saveAnalyse(EquipmentStatus equipmentStatus, EquipmentBreakdownHistory history);


    /**
     * @param page
     * @param vo
     * @return
     */
    R analysePage(Page page, EquipmentPictureAnalyseVo vo);

    /**
     * 根据园区统计设备画像数据
     *
     * @param parkId
     * @return
     */
    R pictureRate(Long parkId);
}
