From 36d20a4fca90696069ae1e233e4d9fde69610468 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Tue, 3 Sep 2024 11:59:55 +0800 Subject: [PATCH] =?UTF-8?q?modify:=201.=20=E7=BB=88=E9=AA=8C=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=9F=A5=E8=AF=A2=E4=BF=AE=E6=94=B9=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projectdeclared/manage/FinalAcceptanceManage.java | 18 ++++++++---------- .../hz/pm/api/projectlib/helper/ProjectManageUtil.java | 4 ++-- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/FinalAcceptanceManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/FinalAcceptanceManage.java index 5e8dadc..6f19a7d 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/FinalAcceptanceManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/FinalAcceptanceManage.java @@ -2,9 +2,7 @@ package com.hz.pm.api.projectdeclared.manage; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.NumberUtil; -import cn.hutool.core.util.StrUtil; import com.alibaba.excel.EasyExcel; -import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Assert; import com.baomidou.mybatisplus.core.toolkit.Wrappers; @@ -109,22 +107,22 @@ public class FinalAcceptanceManage { * @return \ */ public FinalAcceptProgressStatisticsVO finalAcceptProgressStatistics(ProjectListReq req) { - LambdaQueryWrapper purchaseQuery = Wrappers.lambdaQuery(Purchase.class) - .select(Purchase::getProjectId, Purchase::getStatus) - .in(Purchase::getStatus, FINAL_INSPECTED_TENDER_STATUS); - List purchases = purchaseService.list(purchaseQuery); - if (purchases.isEmpty()) { - return null; - } UserInfoDetails user = LoginUserUtil.loginUserDetail(); String buildOrgCode = req.getBuildOrgCode(); req.setBuildOrgCode(null); - LambdaQueryWrapper query = ProjectManageUtil.projectQuery(req); Long buildOrgCodeNum = NumberUtil.parseLong(buildOrgCode, null); UnitQueryState queryState = mhUnitQueryHelper.listCanViewUnitIds(buildOrgCodeNum, user); if (!queryState.isState()) { return null; } + LambdaQueryWrapper purchaseQuery = Wrappers.lambdaQuery(Purchase.class) + .select(Purchase::getProjectId, Purchase::getStatus) + .in(Purchase::getStatus, FINAL_INSPECTED_TENDER_STATUS); + List purchases = purchaseService.list(purchaseQuery); + if (purchases.isEmpty()) { + return null; + } + LambdaQueryWrapper query = ProjectManageUtil.projectQuery(req); if (CollUtil.isNotEmpty(queryState.getUnitIds())) { query.in(Project::getBuildOrgCode, CollUtils.convert(queryState.getUnitIds(), String::valueOf)); } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/helper/ProjectManageUtil.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/helper/ProjectManageUtil.java index 8c4ddba..1cef28b 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/helper/ProjectManageUtil.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/helper/ProjectManageUtil.java @@ -74,9 +74,9 @@ public class ProjectManageUtil { .ge(req.getApproveAmountMin() != null, Project::getApprovalAmount, req.getApproveAmountMin()) .le(req.getApproveAmountMax() != null, Project::getApprovalAmount, req.getApproveAmountMax()) - .like(req.getBuildOrg() != null, Project::getBuildOrgName, req.getBuildOrg()) + .like(StrUtil.isNotBlank(req.getBuildOrg()), Project::getBuildOrgName, req.getBuildOrg()) .eq(req.getUnitStrip() != null, Project::getUnitStrip, req.getUnitStrip()) - .like(StringUtils.isNotBlank(req.getBuildOrgName()), Project::getBuildOrgName, req.getBuildOrgName()) + .like(StrUtil.isNotBlank(req.getBuildOrgName()), Project::getBuildOrgName, req.getBuildOrgName()) .eq(req.getSuperOrgCode() != null, Project::getSuperOrgCode, req.getSuperOrgCode()) .eq(req.getIsTemporaryAugment() != null, Project::getIsTemporaryAugment, req.getIsTemporaryAugment()) //状态 阶段 list