package com.sptg.estate.api.feigns;

import com.sptg.common.core.beans.ResultBean;
import com.sptg.estate.api.entity.InstallationReview;
import com.sptg.estate.api.feigns.fallback.InstallationReviewFeignFallbackFactory;
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= InstallationReviewFeignFallbackFactory.class)
public interface InstallationReviewFeign {

    /**
     * 功能描述:测定位是否已经创建安装环境评审记录
     * @param positionId
     * @return ResultBean<Boolean>
     *               
     *                     
     */
    @PostMapping("/implement/installation/review/countByPositionId")
    ResultBean<Boolean> countByPositionId(@RequestBody Long positionId);
    /**
     * 功能描述:根据positionRecordId获取安装评审记录
     * @param positionRecordId
     * @return ResultBean<PositionRecord>
     *               
     *                     
     */
    @PostMapping("/implement/installation/review/findByPositionRecordId")
    ResultBean<InstallationReview> findByPositionRecordId(@RequestBody Long positionRecordId);
    /**
     * 功能描述:新增/修改
     * @param installationReview
     * @return ResultBean<Boolean>
     *               
     *                     
     */
    @PostMapping("/implement/installation/review/insertOrUpdate")
    ResultBean<Boolean> insertOrUpdate(@RequestBody InstallationReview installationReview);
    /**
     * 功能描述:根据环境评审id获安装环境评审记录
     * @param environmentalReviewId
     * @return ResultBean<InstallationReview>
     *               
     *                      
     */
    @PostMapping("/implement/installation/review/findByEnvironmentalReviewId")
    ResultBean<InstallationReview> findByEnvironmentalReviewId(@RequestBody Long environmentalReviewId);
    /**
     * 功能描述:获取记录
     * @param id
     * @return ResultBean<InstallationReview>
     *               
     *                      
     */
    @PostMapping("/implement/installation/review/findById")
    ResultBean<InstallationReview> findById(@RequestBody Long id);
}
