diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java index c7da6da..2459dff 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java @@ -618,17 +618,17 @@ public class WorkbenchManage { BidTypeEnum.BUILD_APP.getCode()); break; case TEST_VALID: - query.apply("(select count(1) from nd_purchase np where np.project_id = nd_project.id and bid_type = {0}) " + + query.apply("(select t.bidCnt from (select count(1) bidCnt from nd_purchase np where np.project_id = nd_project.id and bid_type = {0}) t where bidCnt > 0) " + "= (select count(distinct bid_id) from nd_purchase_status_change npsc where npsc.project_code = nd_project.project_code " + "and event = {1})", BidTypeEnum.BUILD_APP.getCode(), TEST_VALID_INFO_PASSED); break; case SELF_TEST: - query.apply("(select count(1) from nd_purchase np where np.project_id = nd_project.id and bid_type = {0}) " + + query.apply("(select t.bidCnt from (select count(1) bidCnt from nd_purchase np where np.project_id = nd_project.id and bid_type = {0}) t where bidCnt > 0) " + "= (select count(distinct bid_id) from nd_purchase_status_change npsc where npsc.project_code = nd_project.project_code " + "and event = {1})", BidTypeEnum.BUILD_APP.getCode(), SELF_TEST_PASSED); break; case SUBMIT_START_FILE: - query.apply("(select count(1) from nd_purchase np where np.project_id = nd_project.id and bid_type = {0}) " + + query.apply("(select t.bidCnt from (select count(1) bidCnt from nd_purchase np where np.project_id = nd_project.id and bid_type = {0}) t where bidCnt > 0) " + "= (select count(distinct bid_id) from nd_purchase_status_change npsc where npsc.project_code = nd_project.project_code " + "and event = {1})", BidTypeEnum.BUILD_APP.getCode(), ADAPT_INFO_PASSED); break;