From a0e9fac251df54e5ed6159ce1fdb77d463ebdc48 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期四, 26 六月 2025 20:05:35 +0800
Subject: [PATCH] 菌种库所有代码
---
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TStrainReportServiceImpl.java | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TStrainReportServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TStrainReportServiceImpl.java
index 9564a71..8c69508 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TStrainReportServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TStrainReportServiceImpl.java
@@ -58,30 +58,33 @@
public PageInfo<TStrainReportProjectVO> pageListProject(TStrainReportProjectQuery query) {
PageInfo<TStrainReportProjectVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize());
List<TStrainReportProjectVO> list = this.baseMapper.pageListProject(query,pageInfo);
- List<TStrainReport> tStrainReports = this.baseMapper.selectList(new LambdaQueryWrapper<TStrainReport>().eq(TStrainReport::getStatus,3));
+ LambdaQueryWrapper<TStrainReport> queryWrapper = new LambdaQueryWrapper<TStrainReport>().eq(TStrainReport::getStatus, 3);
+
+ List<TStrainReport> tStrainReports = this.baseMapper.selectList(
+ queryWrapper);
List<TStrainReportDetail> tStrainReportDetails = strainReportDetailMapper.selectList(new LambdaQueryWrapper<TStrainReportDetail>());
for (TStrainReportProjectVO tStrainReportProjectVO : list) {
- List<TStrainReport> collect = tStrainReports.stream().filter(e -> e.getProjectId().equals(tStrainReportProjectVO.getProjectId())).collect(Collectors.toList());
+ List<TStrainReport> strainReports = tStrainReports.stream().filter(e -> e.getProjectId().equals(tStrainReportProjectVO.getProjectId())).collect(Collectors.toList());
BigDecimal sum = new BigDecimal("0");
BigDecimal sum1 = new BigDecimal("0");
BigDecimal sum2 = new BigDecimal("0");
Integer temp = 0;
- for (TStrainReport tStrainReport : collect) {
- List<TStrainReportDetail> collect1 = tStrainReportDetails.stream()
+ for (TStrainReport tStrainReport : strainReports) {
+ List<TStrainReportDetail> tStrainReportDetails1 = tStrainReportDetails.stream()
.filter(e -> e.getReportId().equals(tStrainReport.getId())&&
e.getEvaluateHumanType()==1).collect(Collectors.toList());
- List<TStrainReportDetail> collect2 = tStrainReportDetails.stream()
+ List<TStrainReportDetail> tStrainReportDetails2 = tStrainReportDetails.stream()
.filter(e -> e.getReportId().equals(tStrainReport.getId())&&
e.getEvaluateHumanType()==2).collect(Collectors.toList());
// 菌种工程积分
- sum1 = collect2.stream()
- .filter(e -> e.getEvaluateHumanType().equals(1))
+ sum1 = tStrainReportDetails2.stream()
+ .filter(e -> e.getEvaluateHumanType().equals(2))
.map(TStrainReportDetail::getEvaluateTotal)
.reduce(BigDecimal::add)
.orElse(BigDecimal.ZERO);
// 菌种实验员积分
- sum2 = collect1.stream()
- .filter(e -> e.getEvaluateHumanType().equals(2))
+ sum2 = tStrainReportDetails1.stream()
+ .filter(e -> e.getEvaluateHumanType().equals(1))
.map(TStrainReportDetail::getEvaluateTotal)
.reduce(BigDecimal::add)
.orElse(BigDecimal.ZERO);
--
Gitblit v1.7.1