package com.qingyun.service.service.impl;

import org.apache.commons.lang3.StringUtils;

import com.qingyun.common.utils.MapstructUtils;
import com.qingyun.mybatisplus.page.TableDataInfo;
import com.qingyun.common.core.domain.PageQuery;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import com.qingyun.service.domain.bo.ContractCompareResultBo;
import com.qingyun.service.domain.vo.ContractCompareResultVo;
import com.qingyun.service.domain.ContractCompareResult;
import com.qingyun.service.mapper.ContractCompareResultMapper;
import com.qingyun.service.service.IContractCompareResultService;

import com.qingyun.mybatisplus.core.ServicePlusImpl;
import java.util.List;
import java.util.Map;
import java.util.Collection;

/**
 * 对比结果Service业务层处理
 *
 * @author jianlu
 * @date 2025-07-11
 */
@RequiredArgsConstructor
@Service
public class ContractCompareResultServiceImpl extends ServicePlusImpl<ContractCompareResultMapper, ContractCompareResult, ContractCompareResultVo> implements IContractCompareResultService {


    /**
     * 查询对比结果列表
     * @param taskId 任务ID
     */
    @Override
    public List<ContractCompareResultVo> queryList(Long taskId) {
        List<ContractCompareResult> resultList = this.baseMapper.selectList(Wrappers.lambdaQuery(ContractCompareResult.class)
            .eq(ContractCompareResult::getTaskId, taskId)
        );
        return MapstructUtils.convert(resultList, ContractCompareResultVo.class);
    }

}
