package com.unis.base.client;

import com.unis.base.common.vo.TyLskcxxQueryVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import com.unis.base.common.vo.TyLskcxxVO;
import com.unis.common.utils.ResponseWrapper;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * @author zhengbodang
 * @version 1.0
 * @Title DAjxxsjyController
 * @ProjectName 粮食库存信息 Controller
 * @Description
 * @date 2019/07/22 17点26分
 */
@FeignClient(name = "base-server")
@Component
@Api(value = "粮食库存信息 ", tags = "粮食库存信息 维护")
public interface FoodStocksFeign {

	/**
	 * @author zhengbodang
	 * @Description 获取粮食库存列表
	 * @param
	 * @return 粮食库存列表
	 */
	@ApiOperation(value = "粮食库存列表", notes = "参数：")
	@PostMapping(value = "/foodStocksList")
    public ResponseWrapper getTyLskcxxList(@RequestBody TyLskcxxQueryVO  tyLskcxxQueryVO);

	@PostMapping(value="/foodStock/selectById")
	@ApiOperation(value = "根据id,仓号获取唯一粮食库存信息", notes = "参数：")
	public ResponseWrapper selectById(@RequestBody TyLskcxxQueryVO tyLskcxxQueryVO);

	/**
	 * @author zhengbodang
	 * @Description 分页获取粮食库存信息列表
	 * @param
	 * @return
	 */
	@ApiOperation(value = "分页获取粮食库存信息列表", notes = "参数：")
	@PostMapping(value = "/foodStocksPage/{pageNum}/{pageSize}")
    public ResponseWrapper getTyLskcxxPage(@RequestBody TyLskcxxQueryVO tyLskcxxQueryVO , @PathVariable("pageNum")Integer pageNum, @PathVariable("pageSize") Integer pageSize);

	/**
	 * @author zhengbodang
	 * @Description 新增粮食库存信息
	 * @param 廒间信息实体 models
	 * @return 新增状态
	 */
	@PostMapping(value = "/foodStocks")
	@ApiOperation(value = "新增粮食库存信息", notes = "参数：")
    public ResponseWrapper insert(@RequestBody TyLskcxxVO tyLskcxxVO);

	/**
	 * @author zhengbodang
	 * @Description 更新粮食库存信息
	 * @param
	 * @return 新增状态
	 */
	@PutMapping(value = "/foodStocks")
	@ApiOperation(value = "更新粮食库存信息", notes = "参数：")
    public ResponseWrapper update(@RequestBody TyLskcxxVO tyLskcxxVO);

	/**
	 * @author zhengbodang
	 * @Description 更新粮食库存信息
	 * @param
	 * @return 新增状态
	 */
	@PostMapping(value = "/foodStocks/updateByEntitySelective")
	@ApiOperation(value = "更新粮食库存信息", notes = "参数：")
	public ResponseWrapper updateByEntitySelective(@RequestBody TyLskcxxVO tyLskcxxVO);

	/**
	 * @author zhengbodang
	 * @Description 删除粮食库存信息
	 * @param
	 * @return 状态
	 */
	@DeleteMapping(value="/foodStocks/{kcxxid}")
	@ApiOperation(value = "根据粮食库存信息编号删除粮食库存信息", notes = "参数：")
	public ResponseWrapper delete(@PathVariable("kcxxid") String kcxxid);

	/**
	 * @author zhengbodang
	 * @Description 删除粮食库存信息
	 * @param
	 * @return 状态
	 */
	@GetMapping(value="/foodStocks/{kcxxid}")
	@ApiOperation(value = "获取粮食库存信息", notes = "参数：")
	public ResponseWrapper getTyLskcxxByTfzyid(@PathVariable("kcxxid") String kcxxid);

	@PostMapping(value="/foodStocks/lastest")
	@ApiOperation(value = "根据品种,仓号,公司,截止时间,获取唯一粮食库存信息", notes = "参数：")
	public ResponseWrapper selectLastestByEntity(@RequestBody TyLskcxxQueryVO tyLskcxxQueryVO);

}
