From 95ab5d307745e620002006835f01184b6647c726 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Wed, 3 Apr 2024 18:42:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E6=96=BD=E8=AE=A1=E5=88=92=E5=A1=AB?= =?UTF-8?q?=E5=86=99=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hz/pm/api/projectdeclared/manage/OperationManage.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/OperationManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/OperationManage.java index 5cc9268..afb6f01 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/OperationManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/OperationManage.java @@ -1,6 +1,7 @@ package com.hz.pm.api.projectdeclared.manage; import cn.hutool.core.bean.BeanUtil; +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; @@ -13,10 +14,7 @@ import com.hz.pm.api.projectdeclared.model.vo.OperationVO; import com.hz.pm.api.projectdeclared.service.IOperationService; import com.hz.pm.api.projectdeclared.service.IPurchaseService; import com.hz.pm.api.projectlib.model.entity.Project; -import com.hz.pm.api.projectlib.model.enumeration.TenderAdaptStatusEnum; -import com.hz.pm.api.projectlib.model.enumeration.TenderSelfTestStatusEnum; import com.hz.pm.api.projectlib.model.enumeration.TenderStatusEnum; -import com.hz.pm.api.projectlib.model.enumeration.TenderTestValidStatusEnum; import com.hz.pm.api.projectlib.service.IProjectService; import com.hz.pm.api.user.security.model.UserInfoDetails; import com.hz.pm.api.user.util.LoginUserUtil; @@ -30,7 +28,6 @@ import org.springframework.transaction.annotation.Transactional; import java.time.LocalDateTime; import java.util.List; import java.util.Map; -import java.util.Objects; /** * @Classname OperationManage @@ -99,8 +96,10 @@ public class OperationManage { operation.setUpdateOn(now); operation.setUpdateBy(user.getUsername()); operationService.saveOrUpdate(operation); - long operationCount = operationService.countByBidIds(purchaseMap.keySet()); - if (operationCount == purchaseMap.size()) { + Wrapper oQuery = Wrappers.lambdaQuery(Operation.class) + .eq(Operation::getProjectId, project.getId()) + .isNotNull(Operation::getProjectStartDate); + if (operationService.count(oQuery) == purchaseMap.size()) { // 修改项目状态 projectStateMachineUtil.pass(project); projectService.updateById(project);