package com.unis.base.client;

import com.unis.base.common.vo.DSbtjfxVO;
import com.unis.base.common.vo.DSbxxsjyQueryVO;
import com.unis.common.utils.ResponseWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "base-server")
@Component
@Api(value = "机械台账", tags = "机械台账")
public interface FacilityFeign {

    //设备报废记录
    @ApiOperation(value = "设备报废记录(分页)", notes = "参数：")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageNum", value = "起始页", required = true),
            @ApiImplicitParam(name = "pageSize", value = "每页展示行数", required = true),
            @ApiImplicitParam(name = "lx", value = "1：设备，2：设施，3：仪器", required = true)})

    @PostMapping(value = "/findFacility")
    public ResponseWrapper findFacility(@RequestBody DSbxxsjyQueryVO vo,
                                        @RequestParam(value = "pageNum") Integer pageNum,
                                        @RequestParam(value = "pageSize") Integer pageSize,
                                        @RequestParam(value = "lx") Integer lx);


    //设备报废记录详情
    @ApiOperation(value = "设备报废记录详情", notes = "参数：")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageNum", value = "起始页", required = true),
            @ApiImplicitParam(name = "pageSize", value = "每页展示行数", required = true)})
    @PostMapping(value = "/findFacilityById")
    public ResponseWrapper findFacilityById(@RequestBody DSbxxsjyQueryVO vo,
                                            @RequestParam(value = "pageNum") Integer pageNum,
                                            @RequestParam(value = "pageSize") Integer pageSize);


    //设备维护分页
    @ApiOperation(value = "设备维护分页", notes = "参数：")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageNum", value = "起始页", required = true),
            @ApiImplicitParam(name = "pageSize", value = "每页展示行数", required = true),
            @ApiImplicitParam(name = "lx", value = "1：设备，2：设施，3：仪器", required = true)})
    @PostMapping(value = "/findVindicate")
    public ResponseWrapper findVindicate(@RequestBody DSbxxsjyQueryVO vo,
                                         @RequestParam(value = "pageNum") Integer pageNum,
                                         @RequestParam(value = "pageSize") Integer pageSize,
                                         @RequestParam(value = "lx") Integer lx);


    //设备维护详情
    @ApiOperation(value = "设备维护详情", notes = "参数：")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageNum", value = "起始页", required = true),
            @ApiImplicitParam(name = "pageSize", value = "每页展示行数", required = true)})
    @PostMapping(value = "/findVindicateById")
    public ResponseWrapper findVindicateById(@RequestBody DSbxxsjyQueryVO vo,
                                             @RequestParam(value = "pageNum") Integer pageNum,
                                             @RequestParam(value = "pageSize") Integer pageSize);


    //设备维修分页
    @ApiOperation(value = "设备维修分页", notes = "参数：")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageNum", value = "起始页", required = true),
            @ApiImplicitParam(name = "pageSize", value = "每页展示行数", required = true),
            @ApiImplicitParam(name = "lx", value = "1：设备，2：设施，3：仪器", required = true)})
    @PostMapping(value = "/findMaintain")
    public ResponseWrapper findMaintain(@RequestBody DSbxxsjyQueryVO vo,
                                        @RequestParam(value = "pageNum") Integer pageNum,
                                        @RequestParam(value = "pageSize") Integer pageSize,
                                        @RequestParam(value = "lx") Integer lx);

    //设备维修详情
    @ApiOperation(value = "设备维修详情", notes = "参数：")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageNum", value = "起始页", required = true),
            @ApiImplicitParam(name = "pageSize", value = "每页展示行数", required = true)})
    @PostMapping(value = "/findMaintainById")
    public ResponseWrapper findMaintainById(@RequestBody DSbxxsjyQueryVO vo,
                                            @RequestParam(value = "pageNum") Integer pageNum,
                                            @RequestParam(value = "pageSize") Integer pageSize);


    //设备领用分页
    @ApiOperation(value = "设备领用分页", notes = "参数：")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageNum", value = "起始页", required = true),
            @ApiImplicitParam(name = "pageSize", value = "每页展示行数", required = true)})
    @PostMapping(value = "/findReceive")
    public ResponseWrapper findReceive(@RequestBody DSbxxsjyQueryVO vo,
                                       @RequestParam(value = "pageNum") Integer pageNum,
                                       @RequestParam(value = "pageSize") Integer pageSize,
                                       @RequestParam(value = "lx") Integer lx);



    //设备领用详情
    @ApiOperation(value = "设备领用详情", notes = "参数：设备编号(sbbh)")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageNum", value = "起始页", required = true),
            @ApiImplicitParam(name = "pageSize", value = "每页展示行数", required = true)})
    @PostMapping(value = "/findReceiveById")
    public ResponseWrapper findReceiveById(@RequestBody DSbxxsjyQueryVO vo,
                                           @RequestParam(value = "pageNum") Integer pageNum,
                                           @RequestParam(value = "pageSize") Integer pageSize);


    //设备入库分页
    @ApiOperation(value = "设备入库分页", notes = "参数：")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageNum", value = "起始页", required = true),
            @ApiImplicitParam(name = "pageSize", value = "每页展示行数", required = true),
            @ApiImplicitParam(name = "lx", value = "1：设备，2：设施，3：仪器", required = true)})
    @PostMapping(value = "/findStorage")
    public ResponseWrapper findStorage(@RequestBody DSbxxsjyQueryVO vo,
                                       @RequestParam(value = "pageNum") Integer pageNum,
                                       @RequestParam(value = "pageSize") Integer pageSize,
                                       @RequestParam(value = "lx") Integer lx);


    //设备入库详情
    @ApiOperation(value = "设备入库详情", notes = "参数：")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageNum", value = "起始页", required = true),
            @ApiImplicitParam(name = "pageSize", value = "每页展示行数", required = true)})
    @PostMapping(value = "/findStorageById")
    public ResponseWrapper findStorageById(@RequestBody DSbxxsjyQueryVO vo,
                                           @RequestParam(value = "pageNum") Integer pageNum,
                                           @RequestParam(value = "pageSize") Integer pageSize);


    //设备申购分页
    @ApiOperation(value = "设备申购分页", notes = "参数：")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageNum", value = "起始页", required = true),
            @ApiImplicitParam(name = "pageSize", value = "每页展示行数", required = true)})
    @PostMapping(value = "/findPurchase")
    public ResponseWrapper findPurchase(@RequestBody DSbxxsjyQueryVO vo,
                                        @RequestParam(value = "pageNum") Integer pageNum,
                                        @RequestParam(value = "pageSize") Integer pageSize,
                                        @RequestParam(value = "lx") Integer lx);


    //设备申购详情
    @ApiOperation(value = "设备申购详情", notes = "参数：")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageNum", value = "起始页", required = true),
            @ApiImplicitParam(name = "pageSize", value = "每页展示行数", required = true)})
    @PostMapping(value = "/findPurchaseById")
    public ResponseWrapper findPurchaseById(@RequestBody DSbxxsjyQueryVO vo,
                                            @RequestParam(value = "pageNum") Integer pageNum,
                                            @RequestParam(value = "pageSize") Integer pageSize);

    //机械设备统计
    @ApiOperation(value = "机械设备统计", notes = "参数：")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageNum", value = "起始页", required = true),
            @ApiImplicitParam(name = "pageSize", value = "每页展示行数", required = true)})
    @PostMapping(value = "/findSbtjfx")
    public ResponseWrapper findSbtjfx(@RequestBody DSbtjfxVO vo,
                                      @RequestParam(value = "pageNum") Integer pageNum,
                                      @RequestParam(value = "pageSize") Integer pageSize,
                                      @RequestParam(value = "lx") Integer lx);
}
