package com.elephant.framework.galaxy.aroad.module.emergency.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.elephant.framework.galaxy.aroad.module.emergency.dto.MaterialCoordinateDto;
import com.elephant.framework.galaxy.aroad.module.emergency.dto.TeamEquipmentInfoDto;
import com.elephant.framework.galaxy.aroad.module.emergency.entity.EmergencyMaterial;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

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

/**
 * 应急处置物资
 *
 * @author songwenjie
 * @date 2019-03-21 14:50:12
 */
public interface EmergencyMaterialMapper extends BaseMapper<EmergencyMaterial> {
    IPage<EmergencyMaterial> getEmergencyMaterialPage(Page<EmergencyMaterial> page, @Param("text") String text);

    List<MaterialCoordinateDto> getCoordinates(@Param("teamids") List<String> teamIdList);
    List<TeamEquipmentInfoDto> getTeams();
    @Select("SELECT row_id,longitude,latitude FROM emergency_material where longitude IS NOT NULL AND latitude IS NOT NULL")
    List<Map<String,Object>> queryLngLat();
}
