package cn.cslg.report.service.business.InvalidReReport;

import cn.cslg.report.common.model.dto.invalidReReport.InvalidProcessDTO;
import cn.cslg.report.common.model.vo.PersonnelVO;
import cn.cslg.report.common.model.vo.invalidReReport.InvalidProcessVO;
import cn.cslg.report.common.utils.CacheUtils;
import cn.cslg.report.common.utils.FileUtils;
import cn.cslg.report.common.utils.SecurityUtils.LoginUtils;
import cn.cslg.report.entity.ReportFiles;
import cn.cslg.report.entity.invalidReReport.AssoFeatureProof;
import cn.cslg.report.entity.invalidReReport.InvalidProcess;
import cn.cslg.report.entity.invalidReReport.OralExam;
import cn.cslg.report.exception.XiaoShiException;
import cn.cslg.report.mapper.InvalidReReport.AssoFeatureProofMapper;
import cn.cslg.report.mapper.InvalidReReport.InvalidProcessMapper;
import cn.cslg.report.service.business.OralExamService;
import cn.cslg.report.service.business.ReportFileService;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;


@Service
@Slf4j
@RequiredArgsConstructor(onConstructor_ = {@Lazy})
public class AssoFeatureProofService extends ServiceImpl<AssoFeatureProofMapper, AssoFeatureProof> {

    public AssoFeatureProof queryProofStr(Integer proofId, Integer featureId){
                 LambdaQueryWrapper<AssoFeatureProof> queryWrapper =new LambdaQueryWrapper<>();
                 queryWrapper.eq(AssoFeatureProof::getCompareFileId,proofId)
                             .eq(AssoFeatureProof::getFeatureId,featureId);
                 List<AssoFeatureProof> assoFeatureProofs =this.list(queryWrapper);
                 AssoFeatureProof assoFeatureProof =new AssoFeatureProof();
                 if(assoFeatureProofs.size()>0){
                     assoFeatureProof=   assoFeatureProofs.get(0);
                 }
                return  assoFeatureProof;


    }

}