From 23dd1249959955c32bb4af9f51b73f5f538010f0 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Thu, 8 Aug 2024 15:52:10 +0800 Subject: [PATCH] =?UTF-8?q?modify:=201.=20=E9=80=82=E9=85=8D=E6=94=B9?= =?UTF-8?q?=E9=80=A0=E4=BF=AE=E6=94=B9=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java index e385c5b..ec434ca 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java @@ -17,6 +17,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.google.common.collect.Lists; import com.hz.pm.api.common.enumeration.ProjectProcessType; import com.hz.pm.api.common.helper.UserInfoHelper; +import com.hz.pm.api.common.model.constant.ExistsSqlConst; import com.hz.pm.api.common.statemachine.event.AbstractStateChangeEvent; import com.hz.pm.api.common.statemachine.event.AdaptStateChangeEvent; import com.hz.pm.api.common.statemachine.event.SelfTestStateChangeEvent; @@ -148,7 +149,7 @@ public class PurchaseManage { query.eq(Project::getNewest, Boolean.TRUE); query.orderByAsc(Project::getApprovalDate); if (req.getBidStatus() != null) { - query.exists("select 1 from nd_purchase np where np.project_id = nd_project.id " + + query.exists(ExistsSqlConst.PROJECT_EXISTS_PURCHASE + "and (np.status = {0} or np.adapt_status = {0} or np.self_test_status = {0} " + " or np.test_valid_status = {0} or np.xcfhx_apply_status = {0})", req.getBidStatus()); } @@ -483,6 +484,8 @@ public class PurchaseManage { .le(req.getCreateOnMax() != null, Purchase::getCreateOn, req.getCreateOnMax()) .ge(req.getCreateOnMin() != null, Purchase::getCreateOn, req.getCreateOnMin()) .eq(req.getStatus() != null, function, req.getStatus()) + .notExists(ExistsSqlConst.PURCHASE_EXISTS_PROJECT + + "and np.stage != {0}", ProjectStatus.STOPPED) .isNotNull(function) .orderByDesc(Purchase::getCreateOn); boolean display = !Boolean.FALSE.equals(req.getDisplay());