package com.unis.base.client;

import com.unis.base.common.vo.DSbxxsjyClassifyVO;
import com.unis.base.common.vo.DSbxxsjyQueryVO;
import com.unis.base.common.vo.EquipmentRecordsVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;

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

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

/**
 * @author huangxing
 * @version 1.0
 * @Title: DSbxxsjyFeign
 * @ProjectName DSbxxsjyFeign
 * @Description:设备fegin接口
 * @date 2019/7/7 18:05
 */
@FeignClient(name = "base-server")
@Component
@Api(value = "设备信息", tags = "设备信息维护")
public interface EquipmentFeign {

	/**
	 * @author huangxing
	 * @Description 获取设备列表
	 * @param 设备编号，设备名称，库点编号，库点名称，设备类型，设备状态, 机构ID
	 * @return 设备信息列表
	 */
	@ApiOperation(value = "获取设备信息列表", notes = "参数：设备编号，设备名称，库点编号，库点名称，设备类型，设备状态, 机构ID")
	@PostMapping(value = "/equipmentList")
    public ResponseWrapper getDSbxxsjyList(@RequestBody DSbxxsjyQueryVO dSbxxsjyQueryVO);
	
	/**
	 * @author huangxing
	 * @Description 获取设备信息列表
	 * @param 设备编号，设备名称，库点编号，库点名称，设备类型，设备状态, 机构ID
	 * @return 设备信息列表
	 */
	@ApiOperation(value = "分页获取设备信息列表", notes = "参数：设备编号，设备名称，库点编号，库点名称，设备类型，设备状态, 机构ID")
	@PostMapping(value = "/equipmentPage/{pageNum}/{pageSize}")
	public ResponseWrapper getDSbxxsjyPage(@RequestBody DSbxxsjyQueryVO dSbxxsjyQueryVO,@PathVariable("pageNum")Integer pageNum,@PathVariable("pageSize") Integer pageSize);

	@ApiOperation(value = "根据机构获取设备信息列表", notes = "参数：机构ID")
	@PostMapping(value = "/equipmentList/{jgId}")
	public ResponseWrapper getDSbxxsjyListByJgId(@PathVariable("jgId")String jgId) ;

	@ApiOperation(value = "根据库点获取设备信息列表", notes = "参数：库点代码")
	@PostMapping(value = "/equipmentListByKddm/{kddm}")
	public ResponseWrapper getEquipmentListByKddm(@PathVariable("kddm")String kddm);

	/**
	 * @author huangxing
	 * @Description 根据设备编码获取设备信息
	 * @return 库点信息
	 */
	@ApiOperation(value = "根据设备编码获取设备信息", notes = "参数：库点编号")
	@GetMapping(value = "/equipment/{sbbh}")
	public ResponseWrapper getDSbxxsjyInfoBysbbh(@PathVariable("sbbh")String sbbh);
	
	/**
	 * @author huangxing
	 * @Description 根据库点编码获取库点信息
	 * @return 库点信息
	 */
	@ApiOperation(value = "更新设备信息", notes = "参数：设备信息 models")
	@PutMapping(value = "/equipment")
	public ResponseWrapper update(@RequestBody DSbxxsjyVO dSbxxsjyVO);

	@ApiOperation(value = "设备信息-带状态更新", notes = "参数：设备编号")
	@PutMapping(value = "/equipmentUpdate")
	public ResponseWrapper equipmentUpdate(@RequestBody DSbxxsjyVO dSbxxsjyVO) ;
	
	/**
	 * @author huangxing
	 * @Description 删除设备信息
	 * @param 参数：社会行政代码
	 * @return 状态
	 */
	@DeleteMapping(value="/equipment/{sbbh}")
	@ApiOperation(value = "根据设备编号删除设备信息", notes = "参数：设备编号")
	public ResponseWrapper delete(@PathVariable("sbbh")String sbbh);

	@DeleteMapping(value="/equipmentDeleteList")
	@ApiOperation(value = "设备信息-根据条件删除设备列表", notes = "参数：库点代码，设施分类")
	public ResponseWrapper deleteList(@RequestBody DSbxxsjyClassifyVO dSbxxsjyClassifyVO) ;
	
	/**
	 * @author huangxing
	 * @Description 新增设备信息
	 * @param 设备信息实体 models
	 * @return 新增状态
	 */
	@PostMapping(value = "/equipment")
	@ApiOperation(value = "新增设备信息", notes = "参数：设备信息实体 models")
    public ResponseWrapper insert(@RequestBody DSbxxsjyVO dSbxxsjyVO) ;

	@PostMapping(value = "/equipmentFilingStatus")
	@ApiOperation(value = "设备信息-更改备案状态", notes = "参数：备案信息")
	public ResponseWrapper updateFilingStatus(@RequestBody EquipmentRecordsVO equipmentRecordsVO) ;

	@PostMapping(value = "/equipmentFiling")
	@ApiOperation(value = "设备信息-备案主表状态", notes = "参数：设备编号，是否备案")
	public ResponseWrapper updateFiling(@RequestBody DSbxxsjyVO dSbxxsjyVO) ;
	
	
	@PostMapping(value = "/equipmentBatch")
	@ApiOperation(value = "新增设备信息", notes = "参数：设备仪器名称，库点代码")
    public ResponseWrapper insertBatch(@RequestBody DSbxxsjyVO dSbxxsjyVO);
	
	@PutMapping(value = "/equipmentBatch")
	public ResponseWrapper updateBatch(@RequestBody DSbxxsjyVO dSbxxsjyVO);
}
