package com.njcn.supervision.service.leaflet;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
import com.njcn.bpm.pojo.vo.TodoVO;
import com.njcn.bpm.service.IBpmService;
import com.njcn.harmonic.pojo.dto.RMpPartHarmonicDetailDTO;
import com.njcn.supervision.pojo.param.leaflet.WarningLeafletParam;
import com.njcn.supervision.pojo.po.leaflet.WarningLeaflet;
import com.njcn.supervision.pojo.vo.leaflet.WarningLeafletVO;

import java.util.List;

/**
 * <p>
 * 预告警单表 服务类
 * </p>
 *
 * @author hongawen
 * @since 2024-05-21
 */
public interface IWarningLeafletService extends IBpmService<WarningLeaflet> {

    /**
     * 创建预告警单，此时还没有走流程，等待用户上传反馈单后，才正式进入工作流阶段
     * name：预告警单名称，此处暂时用普测计划名称+变电站名称组成预告警单名
     * deptId：预告警单名称，负责单位id
     * code：预告警编号暂时随机by yxb
     * id：对应问题源id，用于查询详细数据
     * problemType：问题类型：1：技术监督管理；2：在线监测超标问题；3：用户投诉；4：现场测试超标，参考枚举：ProblemTypeEnum
     * leaflet：单子类型：1：预警单；2：告警单
     * issueDetail：问题详细描述
     * reformAdvice:整改意见
     * filePath:预告警单文件路径
     */
    String createLeaflet(String name, String deptId, String code, String id, Integer problemType, Integer leaflet, String issueDetail,String  reformAdvice,String filePath);

    Page<WarningLeafletVO> alarmPageData(WarningLeafletParam.WarningLeafletQueryParam warningLeafletQueryParam);

    Page<WarningLeafletVO> warningPageData(WarningLeafletParam.WarningLeafletQueryParam warningLeafletQueryParam);

    void addFeedback(WarningLeafletParam.WarningLeafletUpdateParam warningLeafletUpdateParam);


    String updateFeedback(WarningLeafletParam.WarningLeafletUpdateParam warningLeafletUpdateParam);

    WarningLeafletVO getVOById(String id);

    String addLineOverLimitData(RMpPartHarmonicDetailDTO rMpPartHarmonicDetailDTO);

    String cancelWarningLeaflet(BpmProcessInstanceCancelParam cancelReqVO);

    /**
     * 查询告警单信息，包含预警单和告警单
     */
    Page<WarningLeafletVO> allPageData(WarningLeafletParam.WarningLeafletQueryParam warningLeafletQueryParam);

    Boolean deleteWarningLeaflet(List<String> supervisionId);

    List<TodoVO> getTodoBusiness();
}
