wenminjie
2026-07-13 0220811fbcffd4bd4df334502a2af272ae29f1e3
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TQaTestItemReportServiceImpl.java
@@ -1,5 +1,6 @@
package com.ruoyi.system.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.basic.PageInfo;
@@ -11,10 +12,12 @@
import com.ruoyi.system.query.TQaTestItemReportQuery;
import com.ruoyi.system.service.TQaTestItemReportService;
import com.ruoyi.system.vo.TQaTestItemReportVO;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@@ -64,4 +67,20 @@
    public List<TQaTestItemReportVO> getListByItemId(String itemId) {
        return this.baseMapper.getListByItemId(itemId);
    }
    @Override
    public List<TQaTestItemReportVO> getListByItemIdDraft(String itemId) {
        LambdaQueryWrapper<TQaTestItemReport> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(TQaTestItemReport::getItemId, itemId);
        lambdaQueryWrapper.eq(TQaTestItemReport::getStatus, -1);
        List<TQaTestItemReport> tQaTestItemReports = this.baseMapper.selectList(lambdaQueryWrapper);
        List<TQaTestItemReportVO> tQaTestItemReportVOSList = new ArrayList<>();
        for (TQaTestItemReport tQaTestItemReport : tQaTestItemReports) {
            TQaTestItemReportVO tQaTestItemReportVO = new TQaTestItemReportVO();
            BeanUtils.copyProperties(tQaTestItemReport, tQaTestItemReportVO);
            tQaTestItemReportVOSList.add(tQaTestItemReportVO);
        }
        return tQaTestItemReportVOSList;
    }
}