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

import com.baomidou.mybatisplus.core.enums.SqlLike;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.elephant.framework.galaxy.aroad.module.emergency.dto.TeamCoordinateDto;
import com.elephant.framework.galaxy.aroad.module.emergency.entity.EmergencyTeam;
import com.elephant.framework.galaxy.aroad.module.emergency.vo.EmergencyMaterialAndEquipmentVo;

import java.util.List;

/**
 * 应急队伍服务类
 * @author songwenjie
 * @date 2019-03-21 09:50:15
 */
public interface EmergencyTeamService extends IService<EmergencyTeam> {

    IPage<EmergencyTeam> getEmergencyTeamPage(Page page, EmergencyTeam emergencyTeam);

    /**
     * @Description: 根据队伍ID获取该队伍详情信息及关联的装备物资、应急物资库信息
     * @Param: [id] 队伍ID
     * @return: com.elephant.framework.galaxy.aroad.module.emergency.vo.EmergencyMaterialAndEquipmentVo
     * @Author: songwenjie
     * @Date: 2019/3/21
     */
    EmergencyMaterialAndEquipmentVo getEmergencyMaterialAndEquipmentVo(Long id);

    /**
    * @Description: 获取应急队伍的坐标信息
    * @Param: []
    * @return: java.util.List<com.elephant.framework.galaxy.aroad.module.emergency.dto.TeamCoordinateDto>
    * @Author: songwenjie
    * @Date: 2019/4/2
    */
    List<TeamCoordinateDto> getCoordinates();

    /**
     * @Description: 计算并返回在目标范围内的应急队伍id
     * @Param: [latitude, longitude, goalDistance] 纬度、经度、目标距离（千米）
     * @return: java.util.List<java.lang.Integer>
     * @Author: songwenjie
     * @Date: 2019/4/2
     */
    List<Integer> calculatedCoordinates(double latitude,double longitude,double goalDistance);

    /**
    * @Description: 查询在目标范围内的应急队伍及其物资信息
    * @Param: [latitude, longitude, goalDistance] 纬度，经度，目标距离
    * @return: java.util.List<com.elephant.framework.galaxy.aroad.module.emergency.vo.EmergencyMaterialAndEquipmentVo>
    * @Author: songwenjie
    * @Date: 2019/4/2
    */
    List<EmergencyMaterialAndEquipmentVo> getGoalTeamVo(double latitude,double longitude,double goalDistance);

    /**
     * @Description: 根据队伍ID删除相关信息
     * @Param:
     * @return:
     * @Author: XingYuyang
     * @Date: 2019-04-15 15:51:20
     */
    boolean removeById(String teamId);
    /**
     * @Description: 新增队伍信息
     * @Author: XingYuyang
     * @Date: 2019-04-16 10:35:01
     */
    boolean save(EmergencyTeam emergencyTeam);
    /**
     * @Description: 修改队伍信息
     * @Author: XingYuyang
     * @Date: 2019年4月17日10:08:21
     */
    boolean updateWithId(EmergencyTeam emergencyTeam);
}
