package com.securitycontrol.screen.mapper;

import com.securitycontrol.entity.screen.dto.ScreenParamDto;
import com.securitycontrol.entity.screen.vo.ConstrQuality;
import com.securitycontrol.entity.screen.vo.MapRiskVo;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

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

/**
 * @author：cwchen
 * @date：2024-03-27-10:15
 * @version：1.0
 * @description：省侧大屏
 */
@Repository(value = "IScIndexMapper")
public interface IScIndexMapper {
    /**
     * 工程统计
     *
     * @param dto
     * @return List<Map < Object>>
     * @description
     * @author cwchen
     * @date 2024/3/27 13:15
     */
    @MapKey("id")
    List<Map<String, Object>> proStatusStatistics(ScreenParamDto dto);

    /**
     * 地图风险点
     *
     * @param dto
     * @return List<MapRiskVo>
     * @description
     * @author cwchen
     * @date 2024/3/27 15:06
     */
    List<MapRiskVo> riskStatistics(ScreenParamDto dto);

    /**
     * 施工质量
     *
     * @param dto
     * @return List<ConstrQuality>
     * @description
     * @author cwchen
     * @date 2024/3/27 15:26
     */
    List<ConstrQuality> constrQuality(ScreenParamDto dto);

    /**
     * 告警提醒
     *
     * @param dto
     * @return List<Map < String>>
     * @description
     * @author cwchen
     * @date 2024/3/27 16:40
     */
    @MapKey("warningId")
    List<Map<String, String>> alarmReminder(ScreenParamDto dto);

    /**
     * 环境监测分析
     *
     * @param dto
     * @return List<Map < String>>
     * @description
     * @author cwchen
     * @date 2024/3/27 17:26
     */
    @MapKey("id")
    List<Map<String, Object>> environmentDetection(ScreenParamDto dto);

    /**
     * 设备状态
     *
     * @param dto
     * @return List<Map < Object>>
     * @description
     * @author cwchen
     * @date 2024/3/27 19:54
     */
    @MapKey("bidCode")
    List<Map<String, Object>> deviceStatus(ScreenParamDto dto);

    /**
     * 工程安全隐患分析
     *
     * @param dto
     * @return List<Map < Object>>
     * @description
     * @author cwchen
     * @date 2024/3/28 9:13
     */
    @MapKey("orgId")
    List<Map<String, Object>> potentialSafetyHazard(ScreenParamDto dto);

    /**
     * 获取班组人员/获取站班会人员
     *
     * @param dto
     * @return List<Integer>
     * @description
     * @author cwchen
     * @date 2024/3/28 11:05
     */
    List<Integer> getPersonnel(ScreenParamDto dto);

    /**
     * 设备 在线/不在线 数量
     *
     * @param dto
     * @return List<Map < Object>>
     * @description
     * @author cwchen
     * @date 2024/3/28 11:28
     */
    @MapKey("id")
    List<Map<String, Object>> allDeviceStatus(ScreenParamDto dto);

    /**
     * 效率分析（工程进度分析）
     *
     * @param dto
     * @return List<Map < Object>>
     * @description
     * @author cwchen
     * @date 2024/3/28 13:47
     */
    @MapKey("orgId")
    List<Map<String, Object>> efficiencyAnalysis(ScreenParamDto dto);

    /**
     * 获取隐患数
     * @param orgId
     * @param dto
     * @return List<Map<String, Object>>
     * @description
     * @author cwchen
     * @date 2024/3/28 15:44
     */
    @MapKey("bidCode")
    List<Map<String, Object>> getDangerNum(@Param("orgId") String orgId, @Param("params") ScreenParamDto dto);
}
