package com.prolog.cs.biz.inbound.remote;

import com.prolog.cs.basic.warehouse.model.BaseWmsWarehouseLocator;
import com.prolog.cs.biz.control.model.vo.LocatorQueryVO;
import com.prolog.framework.authority.core.dto.UserDTO;
import com.prolog.framework.common.message.RestMessage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

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

@FeignClient(value = "${prolog.service.control}")
public interface ControlRemoteCaller {

	/**
	 * 根据逻辑区和商品 调用库存/策略找到一个唯一的货位
	 * 
	 * @ApiImplicitParam(value = "说明: locatorIdList:货位Id列表(id和code二选一);" +
	 *                         "优先货位id集合查询(即locatorIdList>locatorCodeList>logicIdList>logicCodeList);"
	 *                         + "货位,逻辑区二者必须得有一个;locatorCodeList: 货位code列表;" +
	 *                         "logicIdList:逻辑区id列表(id和code二选一);" +
	 *                         "logicCodeList:逻辑区code列表.")
	 */
	@GetMapping("/item-locator/v1/getRecommendLocatoror")
	public RestMessage<Map<String, BaseWmsWarehouseLocator>> getRecommendLocatoror(
			@RequestBody List<LocatorQueryVO> queryVO);

	//随机获取工作组一个作业员
	@GetMapping("/workgroup/getRandomUserDTOByWorkGroup")
	public RestMessage<UserDTO> getRandomUserDTOByWorkGroup(@RequestParam(value = "businesstype") String businesstype,
															@RequestParam(value = "warehouseId") String warehouseId,
															@RequestParam(value = "enterpriseId") String enterpriseId) ;

}
