package com.xzzn.ems.service;

import com.xzzn.common.enums.DeviceCategory;
import com.xzzn.ems.domain.EmsDevicesSetting;
import com.xzzn.ems.domain.vo.DeviceUpdateRequest;
import com.xzzn.ems.domain.vo.DevicesSettingVo;
import com.xzzn.ems.domain.vo.PointDataRequest;
import com.xzzn.ems.domain.vo.PointQueryResponse;
import com.xzzn.ems.domain.vo.SiteMonitorDataSaveRequest;
import com.xzzn.ems.domain.vo.SiteMonitorProjectDisplayVo;
import com.xzzn.ems.domain.vo.SiteMonitorProjectPointMappingSaveRequest;
import com.xzzn.ems.domain.vo.SiteMonitorProjectPointMappingVo;
import com.xzzn.ems.domain.vo.SingleBatteryConfigInitRequest;
import com.xzzn.ems.domain.vo.SingleBatteryConfigInitResultVo;
import com.xzzn.ems.domain.vo.SingleBatteryMonitorImportResultVo;
import com.xzzn.ems.domain.vo.SingleBatteryMonitorImportRowVo;
import com.xzzn.ems.domain.vo.WorkStatusEnumMappingVo;

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

/**
 * 设备信息 服务层
 *
 */
public interface IEmsDeviceSettingService
{

    public DevicesSettingVo getDeviceDetailInfo(Long deviceId);

    public int addDevice(DevicesSettingVo devicesSetting);

    public int updateDevice(DevicesSettingVo emsDevicesSetting);

    public int deleteEmsDevicesSettingById(Long id);

    public  List<DeviceCategory> getDeviceCategory();

    public List<PointQueryResponse> getSingleSiteDevicePoints(PointDataRequest request);

    public List<String> getSiteAllDeviceCategory(String siteId);
    // 初始化设备信息
    public Map<String, List<EmsDevicesSetting>> initDeviceInfo();

    public List<Map<String, Object>> getDeviceListBySiteAndCategory(String siteId, String deviceCategory);

    public boolean updateDeviceStatus(DeviceUpdateRequest request);

    public List<SiteMonitorProjectPointMappingVo> getSiteMonitorProjectPointMapping(String siteId);

    public int saveSiteMonitorProjectPointMapping(SiteMonitorProjectPointMappingSaveRequest request, String operName);

    public List<WorkStatusEnumMappingVo> getSiteWorkStatusEnumMappings(String siteId);

    public int saveSiteWorkStatusEnumMappings(String siteId, List<WorkStatusEnumMappingVo> mappings, String operName);

    public List<SiteMonitorProjectDisplayVo> getSiteMonitorProjectDisplay(String siteId);

    public int saveSiteMonitorProjectData(SiteMonitorDataSaveRequest request, String operName);

    public int syncSiteMonitorDataByMqtt(String siteId, String deviceId, String jsonData, Date valueTime);

    public SingleBatteryMonitorImportResultVo importSingleBatteryMonitorMappings(String siteId, List<SingleBatteryMonitorImportRowVo> rows, String operName);

    public SingleBatteryConfigInitResultVo initializeSingleBatteryMonitorMappings(SingleBatteryConfigInitRequest request, String operName);
}
