package com.unis.base.client;

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.common.utils.ResponseWrapper;
import com.unis.base.common.vo.DHwxxsjyVO;

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

/**
 * @author huangxing
 * @version 1.0
 * @Title DHwxxsjyController
 * @ProjectName 货位信息 Controller
 * @Description
 * @date 2019/07/22 17点26分
 */
@FeignClient(name = "base-server")
@Component
@Api(value = "货位信息", tags = "货位信息维护")
public interface GoodsallocationController {


	/**
	 * @author huangxing
	 * @Description 获取仓房列表
	 * @param 仓房编号，仓房名称，货位编号，货位名称，货位状态
	 * @return 仓房信息列表
	 */
	@ApiOperation(value = "获取货位信息列表", notes = "参数：仓房编号，仓房名称，货位编号，货位名称，货位状态")
	@PostMapping(value = "/goodsallocationList")
    public ResponseWrapper getDHwxxsjyList(@RequestBody DHwxxsjyVO dHwxxsjyVO );

	/**
	 * @author huangxing
	 * @Description 获取货位信息列表
	 * @param 仓房编号，仓房名称，货位编号，货位名称，货位状态
	 * @return 企业信息列表
	 */
	@ApiOperation(value = "分页获取企业信息列表", notes = "参数：仓房编号，仓房名称，货位编号，货位名称，货位状态")
	@PostMapping(value = "/goodsallocationPage/{pageNum}/{pageSize}")
    public ResponseWrapper getDHwxxsjyPage(@RequestBody DHwxxsjyVO dHwxxsjyVO ,@PathVariable("pageNum")Integer pageNum,@PathVariable("pageSize") Integer pageSize);

	/**
	 * @author huangxing
	 * @Description 新增货位信息
	 * @param 货位信息实体 models
	 * @return 新增状态
	 */
	@PostMapping(value = "/goodsallocation")
	@ApiOperation(value = "新增货位信息", notes = "参数：货位信息实体 models")
    public ResponseWrapper insert(@RequestBody DHwxxsjyVO dHwxxsjyVO);

	/**
	 * @author huangxing
	 * @Description 更新货位信息
	 * @param 参数：货位信息实体 models
	 * @return 新增状态
	 */
	@PutMapping(value = "/goodsallocation")
	@ApiOperation(value = "更新货位信息", notes = "参数：货位信息实体 models")
    public ResponseWrapper update(@RequestBody DHwxxsjyVO dHwxxsjyVO);

	/**
	 * @author huangxing
	 * @Description 删除货位信息
	 * @param 参数：货位编号
	 * @return 状态
	 */
	@DeleteMapping(value="/goodsallocation/{hwbh}")
	@ApiOperation(value = "根据货位编号删除货位信息", notes = "参数：货位编号")
	public ResponseWrapper delete(@PathVariable("hwbh") String hwbh);

	/**
	 * @author huangxing
	 * @Description 删除货位信息
	 * @param 参数：货位编号
	 * @return 状态
	 */
	@GetMapping(value="/goodsallocation/{hwbh}")
	@ApiOperation(value = "根据货位编号获取货位信息", notes = "参数：货位编号")
	public ResponseWrapper getDHwxxsjyByhwbh(@PathVariable("hwbh") String hwbh);
}
