package com.prolog.rdc.tms.rmi.feign;

import com.prolog.framework.common.message.RestMessage;
import com.prolog.rdc.tms.model.dto.e6.*;
import com.prolog.rdc.tms.model.dto.g7.*;
import com.prolog.rdc.tms.model.vo.BillDownloadVO;
import com.prolog.rdc.tms.model.vo.e6.*;
import com.prolog.rdc.tms.model.vo.g7.ColdchainAlarmVO;
import com.prolog.rdc.tms.model.vo.g7.CurrentLocationVO;
import com.prolog.rdc.tms.model.vo.g7.CurrentTemperatureVO;
import com.prolog.rdc.tms.model.vo.g7.HistoryLocationByGpsnoVO;
import com.prolog.rdc.tms.rmi.hystrix.InterfaceHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author hongbo.pan
 */
@FeignClient(value = "${prolog.rdc.services.tms.interface.name}", url = "${prolog.rdc.services.tms.interface.url}", fallbackFactory = InterfaceHystrix.class)
public interface InterfaceFeign {

	/**
	 * 获取车辆的最新位置信息
	 * @param vo
	 * @return
	 */
	@PostMapping(value = "/e6Gps/getVehicleInfo")
	RestMessage<List<VehicleInfoDTO>> getVehicleInfo(@RequestBody VehicleInfoVO vo);

	/**
	 * 获取车辆的轨迹信息
	 * @param vo
	 * @return
	 */
	@PostMapping(value = "/e6Gps/getTrackDetail")
	RestMessage<List<TrackDetailDTO>> getTrackDetail(@RequestBody TrackDetailVO vo);

	/**
	 * 查询车辆的温度信息
	 * @param vo
	 * @return
	 */
	@PostMapping(value = "/e6Gps/getVehicleTemperatureInfo")
	RestMessage<List<VehicleTemperatureInfoDTO>> getVehicleTemperatureInfo(@RequestBody VehicleTemperatureInfoVO vo);

	/**
	 * 查询车辆报警和异常信息
	 * @param vo
	 * @return
	 */
	@PostMapping(value = "/e6Gps/getVechilesAllAlarmInfo")
	RestMessage<List<VehiclesAllAlarmInfoDTO>> getVechilesAllAlarmInfo(@RequestBody VehiclesAllAlarmInfoVO vo);

	/**
	 * g7车辆当前定位
	 * @param vos
	 * @return
	 */
	@PostMapping("/g7/current_location")
	RestMessage<List<CurrentLocationDTO>> currentLocationExecute(@RequestBody List<CurrentLocationVO> vos);

	/**
	 * g7车辆历史轨迹
	 * @param vo
	 * @return
	 */
	@PostMapping("/g7/history_location_by_vehicle")
	RestMessage<List<HistoryLocationByGpsnoDTO>> historyLocationByVehExecute(@RequestBody HistoryLocationByGpsnoVO vo);

	/**
	 * G7冷链报警列表接口
	 * @param vo
	 * @return
	 */
	@PostMapping("/g7/coldchain_alarm")
	RestMessage<List<ColdchainAlarmDTO>> coldchainAlarmExecute(@RequestBody ColdchainAlarmVO vo);

	/**
	 * 设备车辆当前温度查询接口
	 * @param vo
	 * @return
	 */
	@PostMapping("/g7/current_temperature")
	RestMessage<List<CurrentTemperatureDTO>> currentTemperatureExecute(@RequestBody CurrentTemperatureVO vo);

	/**
	 * 设备实时数据查询
	 * @param vo
	 * @return
	 */
	@PostMapping(value = "/e6Gps/getEquipInfoReal")
	RestMessage<List<EquipInfoDTO>> getEquipInfoReal(@RequestBody EquipInfoVO vo);

	/**
	 * 设备轨迹数据查询
	 * @param vo
	 * @return
	 */
	@PostMapping(value = "/e6Gps/getEquipInfoHistory")
	RestMessage<List<EquipInfoHistoryDTO>> getEquipInfoHistory(@RequestBody EquipInfoHistoryVO vo);

	/**
	 * 设备车辆轨迹查询接口
	 * @param vo
	 * @return
	 */
	@PostMapping("/g7/history_location_by_gpsno")
	RestMessage<List<HistoryLocationByGpsnoDTO>> historyLocationByGpsnoCall(@RequestBody HistoryLocationByGpsnoVO vo);

	/**
	 * 设备位置和状态查询
	 * @param vo
	 * @return
	 */
	@PostMapping("/g7/simpleCurrentsByGpsnos")
	RestMessage<List<CurrentGpsLocationDTO>> simpleCurrentsByGpsnos(@RequestBody CurrentTemperatureVO vo);

	/**
	 * TMS运单同步BMS接口
	 *
	 * @return
	 */
	@PostMapping("/shipbill/bms/save")
	RestMessage<Object> saveShipbillBmsExecute(@RequestBody List<BillDownloadVO> billDownloadVO);

}
