package com.njcn.csdevice.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.njcn.csdevice.pojo.dto.CsLineDTO;
import com.njcn.csdevice.pojo.param.CsLineParam;
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
import com.njcn.csdevice.pojo.po.CsLinePO;
import com.njcn.csdevice.pojo.vo.LineDetailDataVO;
import com.njcn.csdevice.pojo.vo.PqSensitiveUserLineVO;
import com.njcn.web.pojo.param.BaseParam;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 *
 * Description:
 * Date: 2023/5/18  14:01【需求编号】
 *
 * @author clam
 * @version V1.0.0
 */
public interface CsLinePOService extends IService<CsLinePO>{

    /**
     * 根据装置id获取监测点
     * @param list
     * @return
     */
    List<CsLinePO> getLineByDev(List<String> list);


    List<CsLinePO> queryByDevId(String devId);


    /**
     * 根据ndid获取监测点
     * @param id
     * @return
     */
    List<CsLinePO> findByNdid(String id);


    Map<String,String> getCustomDetailByLineId(String lineId);

    /**
     * 更新监测点信息
     * @param csLineParam
     */
    void updateLine(CsLineParam csLineParam);

    /**
     * 修改监测点的数据集id和模板id
     * @param csLineParam
     */
    void updateIds(CsLineParam csLineParam);

    List<CsLinePO> getLinesByDevList(List<String> list);

    CsLinePO addCldLine(CsLineParam param);

    void updateCldLine(CsLineParam param);

    void deleteCldLine(String id);

    /**
     * 修改监测点状态为停运
     * @param lineList 监测点集合
     * @param status   运行状态
     */
    void updateCldLineStatus(List<CsLinePO> lineList, Integer status);

    void updateLineDataByList(List<String> list, String id, String setId);

    /**
     * 根据名称获取监测点
     * @param lineName
     * @return
     */
    List<CsLinePO> getLineByName(String lineName);

    List<String> getAllLine();

    List<CsLineDTO> getAllLineDetail();

    List<CsLinePO> getSimpleLine();

    List<CsEquipmentDeliveryPO> getDevBySensitiveUser(List<String> list);

    Page<PqSensitiveUserLineVO> getSensitiveUserLineList(BaseParam  param);
    boolean uploadReport(MultipartFile file, String lineId);
    String getReportUrl(String lineId);

    /**
     * 获取监测点详情
     * @param id 监测点id
     * @return 结果
     */
    LineDetailDataVO getLineDetailData(String id);

    List<CsLinePO> getLineList(CsLinePO param);
}
