package com.njcn.gather.monitor.mapper;

import com.github.yulichang.base.MPJBaseMapper;
import com.njcn.gather.device.pojo.po.PqDevSub;
import com.njcn.gather.device.pojo.vo.PreDetection;
import com.njcn.gather.monitor.pojo.po.PqMonitor;
import com.njcn.gather.plan.pojo.po.AdPlan;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author caozehui
 * @date 2024-12-12
 */
public interface PqMonitorMapper extends MPJBaseMapper<PqMonitor> {

    /**
     * 根据终端id获取监测点集合
     *
     * @param devId
     * @return: java.util.List<com.njcn.gather.device.pojo.vo.PreDetection.MonitorListDTO>
     * @Author: wr
     * @Date: 2024/12/12 13:15
     */
    List<PreDetection.MonitorListDTO> selectMonitorInfo(@Param("devId") String devId);

    /**
     * 根据被检设备id和线路号获取监测点信息
     *
     * @param devId 被检设备id
     * @param num   线路号
     * @return
     */
    PqMonitor getByDevIdAndNum(@Param("devId") String devId, @Param("num") Integer num);

    List<PqMonitor> listByDevIds(@Param("devIds") List<String> devIds);

    void updateDeviceCheckState(@Param("devId")String devId, @Param("value") Integer value);

    void updateDeviceCheckResult(@Param("devId")String devId, @Param("value") Integer value);

    void updateDeviceReportRState(@Param("devId")String devId, @Param("value") Integer value);

    AdPlan getPlanByDevId(@Param("devId") String devId);

    List<PqDevSub> listDevSubByPlanId(@Param("planId") String planId);

    void updatePlanCheckState(@Param("planId") String planId, @Param("value") Integer value);

    void updatePlanCheckResult(@Param("planId") String planId, @Param("value") Integer value);

    void updatePlanReportRState(@Param("planId") String planId, @Param("value") Integer value);
}

