package com.unis.detectionnum.client;

import com.unis.detectionnum.common.vo.*;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import com.unis.common.utils.ResponseWrapper;

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

/** 
 * @ClassName: SinkpointFeign 
 * @Description: 库点信息
 * @author LiuFeng 
 * @date 2019年10月15日 下午4:33:00  
 */
@FeignClient(name = "detectionnum-server")
@Component
@Api(value = "库点信息  ", tags = "库点信息")
public interface SinkpointFeign {

	/**
	 * @author huangxing
	 * @Description 获取库点列表
	 * @return 库点信息列表
	 */
	@ApiOperation(value = "获取库点信息列表", notes = "参数：库点名称，粮库类别，企业编号，企业名称，库点企业性质")
	@PostMapping(value = "/sinkpointList")
    public ResponseWrapper getDKdxxsjyList(@RequestBody DKdxxsjyVO dKdxxsjyVO);
	
	/**
	 * @author huangxing
	 * @Description 分页获取库点列表
	 * @return 库点信息列表
	 */
	@ApiOperation(value = "分页获取库点信息列表", notes = "参数：库点名称，粮库类别，企业编号，企业名称，库点企业性质")
	@PostMapping(value = "/sinkpointPage/{pageNum}/{pageSize}")
    public ResponseWrapper getDKdxxsjyPage(@RequestBody DKdxxsjyVO dKdxxsjyVO,@PathVariable("pageNum")Integer pageNum,@PathVariable("pageSize") Integer pageSize);
	
	/**
	 * @author huangxing
	 * @Description 根据库点编码获取库点信息
	 * @return 库点信息
	 */
	@ApiOperation(value = "根据库点编码获取库点信息", notes = "参数：库点编号")
	@GetMapping(value = "/sinkpoint/{kddm}")
    public ResponseWrapper getDKdxxsjyInfoBykddm(@PathVariable("kddm") String kddm);

	/**
	 * @author WangZL
	 * @Description 根据统一社会信用代码获取库点信息列表
	 * @return 统一社会信用代码
	 */
	@ApiOperation(value = "获取库点信息列表", notes = "参数：统一社会信用代码")
	@GetMapping(value = "/sinkpointList/{tyshxydm}")
	public ResponseWrapper getDKdxxsjyInfoBytyshxydm(@PathVariable("tyshxydm") String tyshxydm);

	/**
	 * @author WangZL
	 * @Description 根据统一社会信用代码删除库点信息
	 * @param 参数：统一社会信用代码
	 * @return 状态
	 */
	@DeleteMapping(value="/sinkpoint/{tyshxydm}")
	@ApiOperation(value = "根据统一社会信用代码删除库点信息", notes = "参数：统一社会信用代码")
	public ResponseWrapper deleteList(@PathVariable("tyshxydm") String tyshxydm) ;
	
	/**
	 * @author huangxing
	 * @Description 新增库点信息
	 * @param 参数：库点信息实体 models
	 * @return 新增状态
	 */
	@PostMapping(value = "/sinkpoint")
	@ApiOperation(value = "新增库点信息", notes = "参数：库点名称，统一社会信用代码")
    public ResponseWrapper insert(@RequestBody DKdxxsjyVO dKdxxsjyVO);
	
	/**
	 * @author huangxing
	 * @Description 修改库点信息
	 * @param 参数：库点信息实体 models
	 * @return 新增状态
	 */
	@PutMapping(value = "/sinkpoint")
	@ApiOperation(value = "更新库点信息", notes = "参数：库点代码")
    public ResponseWrapper update(@RequestBody DKdxxsjyVO dKdxxsjyVO);
	
	/**
	 * @author huangxing
	 * @Description 删除库点信息
	 * @param 参数：苦点编号
	 * @return 状态
	 */
	@DeleteMapping(value="/sinkpoint/{kddm}")
	@ApiOperation(value = "根据库点编号删除库点信息", notes = "参数：库点编号")
	public ResponseWrapper delete(@PathVariable("kddm") String kddm);
}
