package com.njcn.device.pms.service.majornetwork;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.jeffreyning.mybatisplus.service.IMppService;
import com.njcn.device.pms.pojo.dto.PmsDistributionMonitorDTO;
import com.njcn.device.pms.pojo.dto.PmsMonitorBaseDTO;
import com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO;
import com.njcn.device.pms.pojo.param.DistributionMonitorParam;
import com.njcn.device.pms.pojo.param.MonitorStatus;
import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam;
import com.njcn.device.pms.pojo.param.TaiZhangDelParam;
import com.njcn.device.pms.pojo.param.pwUser.PwUserMonitorParam;
import com.njcn.device.pms.pojo.po.DistributionMonitor;
import com.njcn.device.pms.pojo.vo.DoubleUserVO;
import com.njcn.device.pms.pojo.vo.PmsSummaryStatisticsVO;
import com.njcn.device.pms.pojo.vo.pwUser.PwUserMonitorDataVO;

import java.util.List;

/**
 * <p>
 *  配网
 * </p>
 *
 * @author hongawen
 * @since 2022-10-14
 */
public interface IDistributionMonitorService extends IMppService<DistributionMonitor> {


    /**
     * 获取组织机构下的配网监测点
     * @author cdf
     * @date 2022/10/27
     * @param
     */
    List<PmsMonitorBaseDTO> getMonitorByCondition(List<String> deptIdList, PmsDeviceInfoParam pmsDeviceInfoParam);

    /**
     * 获取组织机构下的配网监测点数量和终端数量
     * @author wr
     * @date 2023/10/11
     * @param
     */
    PmsSummaryStatisticsVO.SummaryVO getMonitorAndDevice(List<String> deptIdList);


    /**
     * 获取指定组装下的发电用电用户
     * @author cdf
     * @date 2022/11/15
     */
    List<DoubleUserVO> getDoubleUserByDept(String orgId);

    /**
     * 新增配网监测点
     * @author cdf
     * @date 2022/11/23
     */
    Boolean addDistributionMonitor(DistributionMonitorParam distributionMonitorParam);

    /**
     * 修改配网监测点
     * @author cdf
     * @date 2022/11/23
     */
    Boolean updateDistributionMonitor(DistributionMonitorParam distributionMonitorParam);

    /**
     * 查询配网监测点
     * @author cdf
     * @date 2022/11/29
     */
    List<DistributionMonitor> distributionMonitorList(List<String> disMonitorIds);


    DistributionMonitor getDistributionMonitorById(String monitorSort,String id);


    /**
     * 删除配网监测点
     * @author cdf
     * @date 2022/12/5
     */
    Boolean delDistributionMonitor(TaiZhangDelParam taiZhangDelParam);
    /**
    * @Description: 按部门获取旗下配网所有监测点(分一类，二类，三类)
    * @Param: [orgId, monitorSort]
    * @return: java.util.List<com.njcn.device.pms.pojo.po.DistributionMonitor>
    * @Author: clam
    * @Date: 2022/12/14
    */
    List<DistributionMonitor> distributionMonitorListByCondition(String orgId, String monitorSort);

    /**
     *  修改配网的数据状态
     * @param monitorParam
     * @return
     */
    boolean updateStatus(MonitorStatus.PwMonitorStatus monitorParam);


    /**
     * 获取配网详情
     * @author cdf
     * @date 2023/2/24
     */
    PmsDistributionMonitorDTO distributionMonitorDetail(String monitorId, String monitorSort,Integer ifPowerUser);



    List<PwPmsMonitorDTO> pwMonitorAreaDetailInfo(List<String> monitorIds);

    /**
     * 根据单位获取配网监测点id集合
     * @author cdf
     * @date 2023/9/11
     */
    List<String> getBaseDisMonitorIds(List<String> orgIds,List<String> monitorSortIds);


    /**
     * 获取配网用户信息
     *
     */
    List<PwUserMonitorDataVO> getPwUserIds(PwUserMonitorParam pwUserMonitorParam);

    /**
     * 批量同步发电用户到配网表
     * @return
     */
    Boolean savePmsDistributionUser();

    /**
     * 批量同步台区到配网表
     * @return
     */
    Boolean savePmsDistributionArea();
}
