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