package com.sptg.estate.api.feigns;

import com.baomidou.mybatisplus.plugins.Page;
import com.sptg.common.core.beans.ResultBean;
import com.sptg.estate.api.dto.EnvironmentalReviewDto;
import com.sptg.estate.api.entity.EnvironmentalReview;
import com.sptg.estate.api.feigns.fallback.EnvironmentalReviewFeignFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * title: PositionFeign
 * package: com.sptg.estate.api.feigns
 * description: 环境评审-服务接口
 *
 *               
 *                
 */
@FeignClient(value= "smart-house-estate",fallbackFactory= EnvironmentalReviewFeignFallbackFactory.class)
public interface EnvironmentalReviewFeign {
    /**
     * 功能描述:测定位是否已经创建环境评审记录
     * @param positionId
     * @return ResultBean<Boolean>
     *               
     *                     
     */
    @PostMapping("/implement/environmental/review/countByPositionId")
    ResultBean<Boolean> countByPositionId(@RequestBody Long positionId);
    /**
     * 功能描述:测定位是否已经创建环境评审记录
     * @param positionId
     * @return ResultBean<EnvironmentalReview>
     *               
     *                     
     */
    @PostMapping("/implement/environmental/review/findByPositionId")
    ResultBean<EnvironmentalReview> findByPositionId(@RequestBody Long positionId);
    /**
     * 功能描述:保存/修改
     * @param environmentalReview
     * @return ResultBean<EnvironmentalReview>
     *               
     *                     
     */
    @PostMapping("/implement/environmental/review/insertOrUpdate")
    ResultBean<Boolean> insertOrUpdate(@RequestBody EnvironmentalReview environmentalReview);
    /**
     * 功能描述:分页查询
     * @param dto
     * @return ResultBean<Page<EnvironmentalReview>>
     *               
     *                     
     */
    @PostMapping("/implement/environmental/review/showList")
    ResultBean<Page<EnvironmentalReview>> showList(@RequestBody EnvironmentalReviewDto dto);
    /**
     * 功能描述:根据机构位置统计数量
     * @param orgPosition
     * @return ResultBean<Integer>
     *               
     *                      
     */
    @PostMapping("/implement/environmental/review/countByOrgPosition")
    ResultBean<Integer> countByOrgPosition(@RequestBody String orgPosition);
    /**
     * 功能描述:审核
     * @param dto
     * @return ResultBean<Boolean>
     *               
     *                      
     */
    @PostMapping("/implement/environmental/review/checkState")
    ResultBean<Boolean> checkState(@RequestBody EnvironmentalReviewDto dto);
    /**
     * 功能描述:查询
     * @param id
     * @return ResultBean<EnvironmentalReview>
     *               
     *                      
     */
    @PostMapping("/implement/environmental/review/findById")
    ResultBean<EnvironmentalReview> findById(@RequestBody Long id);
}
