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;
import io.swagger.annotations.ApiParam;

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

	/**
	 * @author huangxing
	 * @Description 获取仓房列表
	 * @return 仓房信息列表
	 */
	@ApiOperation(value = "获取仓房信息列表", notes = "参数：仓房编号，仓房名称，库点编号，库点名称，仓房类型，建筑类型，仓房状态")
	@PostMapping(value = "/warehouseList")
    public ResponseWrapper getDCfxxxsjyList(@RequestBody DCfxxsjyVO dCfxxsjyVO);
	
	/**
	 * @author huangxing
	 * @Description 获取企业信息列表
	 * @param 社会统一行政编码，企业名称，企业类型，企业性质，法定代表人
	 * @return 企业信息列表
	 */
	@ApiOperation(value = "分页获取仓房信息列表", notes = "参数：仓房编号，仓房名称，库点编号，库点名称，仓房类型，建筑类型，仓房状态")
	@PostMapping(value = "/warehousePage/{pageNum}/{pageSize}")
	public ResponseWrapper getDCfxxxsjyPage(@RequestBody DCfxxsjyVO dCfxxsjyVO,@PathVariable("pageNum")Integer pageNum,@PathVariable("pageSize") Integer pageSize);
	

	/**
	 * @author huangxing
	 * @Description 根据仓房编码获取仓房信息
	 * @return 库点信息
	 */
	@ApiOperation(value = "根据仓房编码获取仓房信息", notes = "参数：仓房编号")
	@GetMapping(value = "/warehouse/{cfbh}")
	public ResponseWrapper getDCfxxxsjyInfoBycfbh(@PathVariable("cfbh")String cfbh);

	/**
	 * @author huangxing
	 * @Description 更新仓房信息
	 * @return 库点信息
	 */
	@ApiOperation(value = "更新仓房信息", notes = "参数：仓房编号")
	@PutMapping(value = "/warehouse")
	public ResponseWrapper update(@RequestBody DCfxxsjyVO dCfxxsjyVO);

	/**
	 * @author WangZL
	 * @Description 更新仓房信息
	 * @return 库点信息
	 */
	@ApiOperation(value = "仓房信息-带状态更新", notes = "参数：仓房编号")
	@PutMapping(value = "/warehouseUpdate")
	public ResponseWrapper warehouseUpdate(@RequestBody DCfxxsjyVO dCfxxsjyVO);
	
	/**
	 * @author huangxing
	 * @Description 删除企业信息
	 * @param 参数：社会行政代码
	 * @return 状态
	 */
	@DeleteMapping(value="/warehouse/{cfbh}")
	@ApiOperation(value = "根据仓房编号删除仓房信息", notes = "参数：仓房编号")
	public ResponseWrapper delete(@PathVariable("cfbh")String cfbh);
	
	/**
	 * @author huangxing
	 * @Description 新增仓房信息
	 * @param 仓房信息实体 models
	 * @return 新增状态
	 */
	@PostMapping(value = "/warehouse")
	@ApiOperation(value = "新增仓房信息", notes = "参数：仓房名称，苦点代码")
    public ResponseWrapper insert(@RequestBody DCfxxsjyVO dAjxxsjyVO);

	/**
	 * @author WangZL
	 * @Description 根据库点代码删除仓房信息列表
	 * @param 库点代码
	 * @return 状态
	 */
	@DeleteMapping(value="/warehouseList/{kddm}")
	@ApiOperation(value = "根据库点代码删除仓房信息列表", notes = "参数：库点代码")
	public ResponseWrapper deleteList(@PathVariable("kddm")String kddm);

	/**
	 * @author WangZL
	 * @Description 根据库点代码获取仓房列表
	 * @param 库点代码
	 * @return 仓房信息列表
	 */
	@ApiOperation(value = "仓房信息-根据库点代码获取仓房列表", notes = "参数：库点代码")
	@PostMapping(value = "/warehouseListByKddm/{kddm}")
	public ResponseWrapper getWarehouseListByKddm(@PathVariable("kddm")String kddm);

	/**
	 * 人员信息-备案主表状态
	 * @param dCfxxsjyVO
	 * @return
	 */
	@PostMapping(value = "/warehouseFiling")
	@ApiOperation(value = "仓房信息-备案主表状态", notes = "参数：仓房编号，是否备案")
	public ResponseWrapper updateFiling(@RequestBody DCfxxsjyVO dCfxxsjyVO);
	
	/**
	 * 菜单栏  直属库-库点-仓房
	 * @param dCfxxsjyVO
	 * @return
	 */
	@GetMapping(value = "/menuList")
	@ApiOperation(value = "菜单栏  直属库-库点-仓房", notes = "参数：库点名称")
	public ResponseWrapper getMenuList(
			@ApiParam(name="kdmc",value="库点名称",required=false)
			@RequestParam(value = "kdmc", required = false)String kdmc) ;
}
