package com.diagbot.client;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.diagbot.dto.CommonResult;
import com.diagbot.dto.GetAppealInfoDTO;
import com.diagbot.dto.GetAppealReviewDTO;
import com.diagbot.dto.GetComplaintRecordDTO;
import com.diagbot.dto.RespDTO;
import com.diagbot.entity.QcresultDetail;
import com.diagbot.vo.ApprovedVo;
import com.diagbot.vo.GetAppealInfoVO;
import com.diagbot.vo.GetAppealReviewVO;
import com.diagbot.vo.GetAuditNumberVO;
import com.diagbot.vo.GetComplaintDetailMsgVO;
import com.diagbot.vo.GetComplaintRecordVO;
import com.diagbot.vo.RejectedVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @description: 申诉功能远程调用后处理
 * @author: zhoutg
 * @date: 2020/4/13 18:28
 */
@Component
public class MedAppealExamineInfoServiceClientFacade {

    @Autowired
    MedAppealExamineInfoServiceClient medAppealExamineInfoServiceClient;

    /**
     * 获取申诉记录
     *
     * @param getComplaintRecordVO
     * @return
     */
    public RespDTO<Page<GetComplaintRecordDTO>> getComplaintRecord(GetComplaintRecordVO getComplaintRecordVO) {
        return CommonResult.tranResp(medAppealExamineInfoServiceClient.getComplaintRecord(getComplaintRecordVO));
    }

    /**
     * 获取申诉审核列表
     *
     * @param getAppealReviewVO
     * @return
     */
    public RespDTO<Page<GetAppealReviewDTO>> getAppealReview(GetAppealReviewVO getAppealReviewVO) {
        return CommonResult.tranResp(medAppealExamineInfoServiceClient.getAppealReview(getAppealReviewVO));
    }


    /**
     * 审核通过
     *
     * @param approvedVo
     * @return
     */
    public RespDTO<Boolean> approved(ApprovedVo approvedVo) {
        return CommonResult.tranResp(medAppealExamineInfoServiceClient.approved(approvedVo));
    }

    /**
     * 驳回
     *
     * @param rejectedVo
     * @return
     */
    public RespDTO<Boolean> rejected(RejectedVo rejectedVo) {
        return CommonResult.tranResp(medAppealExamineInfoServiceClient.rejected(rejectedVo));
    }

    /**
     * 审核查看
     *
     * @param getAppealInfoVO
     * @return
     */
    public RespDTO<GetAppealInfoDTO> getApprovedView(GetAppealInfoVO getAppealInfoVO) {
        return CommonResult.tranResp(medAppealExamineInfoServiceClient.getApprovedView(getAppealInfoVO));
    }

    /**
     * 待审核数量
     *
     * @param getAuditNumberVO
     * @return
     */
    public RespDTO<Integer> getAuditNumber(GetAuditNumberVO getAuditNumberVO) {
        return CommonResult.tranResp(medAppealExamineInfoServiceClient.getAuditNumber(getAuditNumberVO));
    }

    /**
     * 获取该申诉记录最新缺陷详情
     *
     * @param getComplaintDetailMsgVO
     * @return
     */
    public RespDTO<QcresultDetail> getComplaintDetailMsg(GetComplaintDetailMsgVO getComplaintDetailMsgVO) {
        return CommonResult.tranResp(medAppealExamineInfoServiceClient.getComplaintDetailMsg(getComplaintDetailMsgVO));
    }

}