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

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import com.prolog.framework.common.message.RestMessage;
import com.prolog.rdc.tms.model.dto.IntfErrorLogDTO;
import com.prolog.rdc.tms.model.dto.ShipAndLoadingBillDTO;
import com.prolog.rdc.tms.model.dto.ShipbillAndLoadingbillInfoDTO;
import com.prolog.rdc.tms.model.vo.ClearFieldByExtendedObjectVO;
import com.prolog.rdc.tms.model.vo.GpsDataVO;
import com.prolog.rdc.tms.model.vo.IntfShipbillHeaderVO;
import com.prolog.rdc.tms.model.vo.IntfShipbillPackageVO;
import com.prolog.rdc.tms.model.vo.ShipbillLocationVO;
import com.prolog.rdc.tms.model.vo.ShipbillOperateLogSaveNewVO;
import com.prolog.rdc.tms.model.vo.business.ShipInfoSaveVO;
import com.prolog.rdc.tms.rmi.hystrix.BusinessComingRecordBack;

import io.swagger.annotations.ApiOperation;

/**
 * 
 *
 * 业务服务调用
 *
 * @className :BusinessComingRecordFeign
 * @author :fanzw
 * @creationTime :2022/05/12
 * @description :
 *
 * @modifier :fanzw
 * @modifyTime :2022/05/12
 * @reviseRemarks:
 *
 * @version :1.0.0
 *
 */
@FeignClient(value = "${prolog.rdc.services.tms.business.name}", url = "${prolog.rdc.services.tms.business.url}", fallbackFactory = BusinessComingRecordBack.class)
public interface BusinessComingRecordFeign {

	@ApiOperation(value = "扩展字段置空", notes = "扩展字段置空")
	@PostMapping("/common/clear")
	RestMessage<String> clearFieldExecute(@RequestBody ClearFieldByExtendedObjectVO clearFieldByExtendedObjectVO);

	/**
	 * 运单日志接口
	 *
	 * @param logModel
	 * @return
	 */
	@PostMapping("/shipbill/log")
	RestMessage<String> addLog(@RequestBody ShipbillOperateLogSaveNewVO logModel);

	/**
	 * 运单接口转TMS
	 * 
	 * @param intfShipbillHeaderVOs
	 * @return
	 */
	@PostMapping("/shipbill/save/interface")
	RestMessage<List<IntfErrorLogDTO>> saveShipbillInterfaceExecute(@RequestBody List<IntfShipbillHeaderVO> intfShipbillHeaderVOs);

	/**
	 * 运单包裹接口转TMS
	 * 
	 * @param intfShipbillPackageHeaderVOs
	 * @return
	 */
	@PostMapping("/shipbill/save/package/interface")
	RestMessage<List<IntfErrorLogDTO>> saveShipbillPackageInterfaceExecute(@RequestBody List<IntfShipbillPackageVO> intfShipbillPackageVOss);

	/**
	 * 通过运单ID查询装车单信息
	 *
	 * @param
	 * @return
	 */
	@PostMapping("/shipbill/getInfoByShipbillid")
	RestMessage<ShipbillAndLoadingbillInfoDTO> getInfoByDriverId(@RequestParam(value = "shipbillId") String shipbillId);

	/**
	 * 通过运单ID查询所有父级运单信息
	 * 
	 * @param shipBillId
	 * @return
	 */
	@PostMapping("/shipbill/getAllShipBillById")
	RestMessage<List<ShipAndLoadingBillDTO>> getAllShipBillById(@RequestParam(value = "shipBillId") String shipBillId);

	@PostMapping("/shipbill/saveShipInfoFromIntf")
	RestMessage<Object> saveShipInfoFromIntf(@RequestBody ShipInfoSaveVO vo);

	/**
	 * 运单修改定位处理
	 *
	 * @return
	 */
	@PostMapping("/shipbill/modify_location")
	RestMessage<String> modifyShipbillHeaderLocationExecute(@RequestBody List<ShipbillLocationVO> shipbillLocationVOS);

	/**
	 * GPS数据保存
	 * 
	 * @param gpsDataVOs
	 * @return
	 */
	@PostMapping("/gps/save")
	RestMessage<List<IntfErrorLogDTO>> saveGpsExecute(@RequestBody List<GpsDataVO> gpsDataVOs);
}
