package com.unis.base.client;

import java.util.List;

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.RequestBody;

import com.unis.base.common.vo.TyZjxxzbQueryVO;
import com.unis.base.common.vo.TyZjxxzbVO;
import com.unis.common.utils.ResponseWrapper;

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

/**
 * @author huangxing
 * @version 1.0
 * @Title: BaseFeign
 * @ProjectName Base-Service
 * @Description:base层fegin接口
 * @date 2019/7/7 18:05
 */
@FeignClient(name = "base-server")
@Component
@Api(value = "质检信息主表", tags = "质检信息主表维护")
public interface QualityMainFeign {
	
	/**
	 * @author zhengbodang
	 * @Description 获取质检信息主表
	 * @param 
	 * @return 质检信息主表
	 */
	@ApiOperation(value = "质检信息主表", notes = "参数：")
	@PostMapping(value = "/qualityMainList")
    public ResponseWrapper getZjxxzbList(@RequestBody TyZjxxzbQueryVO tyZjxxzbQueryVO);
	
	/**
	 * @author zhengbodang
	 * @Description 分页质检信息主表
	 * @param 
	 * @return 
	 */
	@ApiOperation(value = "分页获取质检信息主表", notes = "参数：")
	@PostMapping(value = "/qualityMainPage/{pageNum}/{pageSize}")
    public ResponseWrapper getTyZjxxzbPage(@RequestBody TyZjxxzbQueryVO tyZjxxzbQueryVO ,@PathVariable("pageNum")Integer pageNum,@PathVariable("pageSize") Integer pageSize);
	
	/**
	 * @author zhengbodang
	 * @Description 新增出入库结算信息
	 * @param 廒间信息实体 models
	 * @return 新增状态
	 */
	@PostMapping(value = "/qualityMain")
	@ApiOperation(value = "新增质检信息主表", notes = "参数：")
    public ResponseWrapper insert(@RequestBody TyZjxxzbVO tyZjxxzbVO);
	
	/**
	 * @author zhengbodang
	 * @Description 更新出入库结算信息
	 * @param 
	 * @return 新增状态
	 */
	@PostMapping(value = "/qualityMain")
	@ApiOperation(value = "更新质检信息主表", notes = "参数：")
    public ResponseWrapper update(@RequestBody TyZjxxzbVO tyZjxxzbVO);
	
	/**
	 * @author zhengbodang
	 * @Description 删除出入库结算信息
	 * @param 
	 * @return 状态
	 */
	@DeleteMapping(value="/qualityMain/{zjxxid}")
	@ApiOperation(value = "根据信息编号删除质检信息主表", notes = "参数：")
	public ResponseWrapper delete(@PathVariable("zjxxid") String zjxxid);
	
	/**
	 * @author zhengbodang
	 * @Description 删除出入库结算信息
	 * @param 
	 * @return 状态
	 */
	@GetMapping(value="/qualityMain/{zjxxid}")
	@ApiOperation(value = "根据信息编号获取质检信息主表", notes = "参数：")
	public ResponseWrapper getZjxxzbByZjxxzbid(@PathVariable("zjxxid") String zjxxid);

	/**
	 * 获取所有列表不分页
	 * @return
	 */
	@GetMapping(value="/qualityMain/getAllList")
	@ApiOperation(value = "根据信息编号获取质检信息主表", notes = "参数：")
	public ResponseWrapper getPageList();
	
	/**
	 * @author zhengbodang
	 * @Description 新增出入库结算信息
	 * @param 廒间信息实体 models
	 * @return 新增状态
	 */
	@PostMapping(value = "/batchQualityMain")
	@ApiOperation(value = "批量新增质检信息主表", notes = "参数：")
    public ResponseWrapper batchInserts(@RequestBody List<TyZjxxzbVO> tyZjxxzbVO);
}
