| | |
| | | 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; |
| | |
| | | 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; |
| | | |
| | |
| | | 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; |
| | | } |
| | | } |