@@ -312,6 +312,7 @@ public class ConstructionManage { | |||
.select(Project::getId) | |||
.eq(Project::getNewest, Boolean.TRUE) | |||
.ne(Project::getStage, ProjectStatus.STOPPED.getCode()) | |||
.ne(Project::getStatus, ProjectStatus.CHANGE_APPLY_PASSED.getCode()) | |||
.and(q1 -> q1.exists(ExistsSqlConst.PROJECT_EXISTS_PURCHASE | |||
+ " and np.status = {0} ", TenderMainStatus.TO_BE_SUBMIT_FIRST_INSPECTED_INFO.getCode()) | |||
.or(q2 -> q2.exists(ExistsSqlConst.PROJECT_EXISTS_PURCHASE_STATUS_CHANGE | |||
@@ -368,6 +369,7 @@ public class ConstructionManage { | |||
+ " and npsc.event = '%s'", TenderStateChangeEvent.SUBMIT_FIRST_INSPECTED_FILES); | |||
LambdaQueryWrapper<Project> query = ProjectManageUtil.projectQuery(req) | |||
.ne(Project::getStage, ProjectStatus.STOPPED.getCode()) | |||
.ne(Project::getStatus, ProjectStatus.CHANGE_APPLY_PASSED.getCode()) | |||
.eq(Project::getNewest, Boolean.TRUE) | |||
.orderByAsc(Project::getDeliveryTime); | |||
if (req.getTabStatus() != null) { | |||
@@ -357,6 +357,7 @@ public class DeclaredProjectManage { | |||
return null; | |||
} | |||
query.ne(Project::getStage, ProjectStatus.STOPPED.getCode()) | |||
.ne(Project::getStatus, ProjectStatus.CHANGE_APPLY_PASSED.getCode()) | |||
.eq(Project::getNewest, Boolean.TRUE) | |||
.select(Project::getStatus, Project::getId); | |||
List<Project> projects = projectService.list(query); | |||
@@ -402,7 +403,8 @@ public class DeclaredProjectManage { | |||
query.eq(Project::getStatus, status); | |||
} | |||
} | |||
query.ne(Project::getStage, ProjectStatus.STOPPED.getCode()); | |||
query.ne(Project::getStage, ProjectStatus.STOPPED.getCode()) | |||
.ne(Project::getStatus, ProjectStatus.CHANGE_APPLY_PASSED.getCode()); | |||
query.eq(Project::getNewest, Boolean.TRUE); | |||
Page<Project> page = projectService.page(req.page(), query); | |||
if (page.getTotal() == 0) { | |||
@@ -149,6 +149,7 @@ public class ProjectReviewManage { | |||
query.exists(ExistsSqlConst.PROJECT_EXISTS_STATUS_CHANGE + | |||
" and npsc.event = {0}", ProjectStateChangeEvent.EXPERT_REVIEW_PASS) | |||
.ne(Project::getStage, ProjectStatus.STOPPED.getCode()) | |||
.ne(Project::getStatus, ProjectStatus.CHANGE_APPLY_PASSED.getCode()) | |||
.eq(Project::getNewest, Boolean.TRUE) | |||
.select(Project::getStatus, Project::getId); | |||
List<Project> projects = projectService.list(query); | |||
@@ -198,7 +199,8 @@ public class ProjectReviewManage { | |||
} | |||
ProjectManageUtil.projectQuery(query, req); | |||
query.eq(Project::getNewest, Boolean.TRUE) | |||
.ne(Project::getStage, ProjectStatus.STOPPED.getCode()); | |||
.ne(Project::getStage, ProjectStatus.STOPPED.getCode()) | |||
.ne(Project::getStatus, ProjectStatus.CHANGE_APPLY_PASSED.getCode()); | |||
Page<Project> page = projectService.page(req.page(), query); | |||
if (page.getTotal() == 0) { | |||
return PageVo.empty(); | |||
@@ -228,6 +230,7 @@ public class ProjectReviewManage { | |||
query.exists(ExistsSqlConst.PROJECT_EXISTS_STATUS_CHANGE + | |||
" and npsc.event = {0}", ProjectStateChangeEvent.COMPLIANCE_REVIEW_PASS) | |||
.ne(Project::getStage, ProjectStatus.STOPPED.getCode()) | |||
.ne(Project::getStatus, ProjectStatus.CHANGE_APPLY_PASSED.getCode()) | |||
.eq(Project::getNewest, Boolean.TRUE) | |||
.select(Project::getStatus, Project::getId); | |||
List<Project> projects = projectService.list(query); | |||
@@ -278,7 +281,8 @@ public class ProjectReviewManage { | |||
ProjectManageUtil.projectQuery(query, req); | |||
ProjectManageUtil.projectBaseQuery(query); | |||
query.eq(Project::getNewest, Boolean.TRUE) | |||
.ne(Project::getStage, ProjectStatus.STOPPED.getCode()); | |||
.ne(Project::getStage, ProjectStatus.STOPPED.getCode()) | |||
.ne(Project::getStatus, ProjectStatus.CHANGE_APPLY_PASSED.getCode()); | |||
Page<Project> page = projectService.page(req.page(), query); | |||
if (page.getTotal() == 0) { | |||
return PageVo.empty(); | |||
@@ -144,7 +144,8 @@ public class PurchaseManage { | |||
return null; | |||
} | |||
//待采购状态 | |||
query.notIn(Project::getStage, ProjectStatus.STOPPED.getCode(), ProjectStatus.CHANGE.getCode()) | |||
query.ne(Project::getStage, ProjectStatus.STOPPED.getCode()) | |||
.ne(Project::getStatus, ProjectStatus.CHANGE_APPLY_PASSED.getCode()) | |||
.eq(Project::getNewest, Boolean.TRUE) | |||
.exists(ExistsSqlConst.PROJECT_EXISTS_STATUS_CHANGE + | |||
" and npsc.event = {0}", ProjectStateChangeEvent.DECLARED_RECORD_PASS) | |||
@@ -185,7 +186,8 @@ public class PurchaseManage { | |||
return PageVo.empty(); | |||
} | |||
//待采购状态 | |||
query.notIn(Project::getStage, ProjectStatus.STOPPED.getCode(), ProjectStatus.CHANGE.getCode()); | |||
query.ne(Project::getStage, ProjectStatus.STOPPED.getCode()) | |||
.ne(Project::getStatus, ProjectStatus.CHANGE_APPLY_PASSED.getCode()); | |||
query.eq(Project::getNewest, Boolean.TRUE); | |||
query.orderByAsc(Project::getApprovalDate); | |||
ProjectManageUtil.projectBaseQuery(query); | |||
@@ -658,8 +660,8 @@ public class PurchaseManage { | |||
.exists(ExistsSqlConst.PURCHASE_EXISTS_STATUS_CHANGE | |||
+ " and npsc.event = {0}", TenderStateChangeEvent.SUBMIT_PURCHASE_CONSTRUCTION_INFO) | |||
.notExists(ExistsSqlConst.PURCHASE_EXISTS_PROJECT | |||
+ "and np.stage in ({0}, {1})", ProjectStatus.STOPPED.getCode(), | |||
ProjectStatus.CHANGE.getCode()) | |||
+ "and (np.stage = {0} or np.status = {1})", ProjectStatus.STOPPED.getCode(), | |||
ProjectStatus.CHANGE_APPLY_PASSED.getCode()) | |||
.orderByDesc(Purchase::getCreateOn); | |||
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); | |||
if (!purchaseService.buildPurchaseQueryPermission(query, user)) { | |||
@@ -719,8 +721,8 @@ public class PurchaseManage { | |||
.exists(ExistsSqlConst.PURCHASE_EXISTS_STATUS_CHANGE | |||
+ " and npsc.event = {0}", TenderStateChangeEvent.SUBMIT_PURCHASE_CONSTRUCTION_INFO) | |||
.notExists(ExistsSqlConst.PURCHASE_EXISTS_PROJECT | |||
+ "and np.stage in ({0}, {1})", ProjectStatus.STOPPED.getCode(), | |||
ProjectStatus.CHANGE.getCode()) | |||
+ "and (np.stage = {0} or np.status = {1})", ProjectStatus.STOPPED.getCode(), | |||
ProjectStatus.CHANGE_APPLY_PASSED.getCode()) | |||
.orderByDesc(Purchase::getCreateOn); | |||
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); | |||
if (!purchaseService.buildPurchaseQueryPermission(query, user)) { | |||
@@ -112,7 +112,8 @@ public class AmountApprovalManage { | |||
ProjectManageUtil.projectQuery(query, req); | |||
ProjectManageUtil.projectBaseQuery(query); | |||
query.eq(Project::getNewest, Boolean.TRUE) | |||
.ne(Project::getStage, ProjectStatus.STOPPED.getCode()); | |||
.ne(Project::getStage, ProjectStatus.STOPPED.getCode()) | |||
.ne(Project::getStatus, ProjectStatus.CHANGE_APPLY_PASSED.getCode()); | |||
buildAmountApprovalFilter(req.getIsAmountApproval(), query); | |||
Page<Project> page = projectService.page(req.page(), query); | |||
long total = page.getTotal(); | |||
@@ -161,7 +162,8 @@ public class AmountApprovalManage { | |||
ProjectManageUtil.projectQuery(query, req); | |||
ProjectManageUtil.projectBaseQuery(query); | |||
query.eq(Project::getNewest, Boolean.TRUE) | |||
.ne(Project::getStage, ProjectStatus.STOPPED.getCode()); | |||
.ne(Project::getStage, ProjectStatus.STOPPED.getCode()) | |||
.ne(Project::getStatus, ProjectStatus.CHANGE_APPLY_PASSED.getCode()); | |||
buildAmountApprovalFilter(req.getIsAmountApproval(), query); | |||
List<Project> page = projectService.list(query); | |||
AmountApprovalProgressStatisticsVO stat = new AmountApprovalProgressStatisticsVO(); | |||
@@ -16,6 +16,7 @@ import com.hz.pm.api.common.util.ExcelDownUtil; | |||
import com.hz.pm.api.projectlib.helper.ProjectManageUtil; | |||
import com.hz.pm.api.projectlib.model.dto.ProjectDTO; | |||
import com.hz.pm.api.projectlib.model.entity.Project; | |||
import com.hz.pm.api.projectlib.model.enumeration.status.ProjectStatus; | |||
import com.hz.pm.api.projectlib.model.req.ProjectApprovedReq; | |||
import com.hz.pm.api.projectlib.model.req.ProjectIdReq; | |||
import com.hz.pm.api.projectlib.model.req.ProjectListReq; | |||
@@ -73,7 +74,9 @@ public class AnnualPlanLibManage { | |||
.eq(Project::getNewest, Boolean.TRUE) | |||
.and(q1 -> q1.in(Project::getStatus, ON_ANNUAL_PLAN.getCode()) | |||
.or(q2 -> q2.exists(ExistsSqlConst.PROJECT_EXISTS_STATUS_CHANGE + " and event = {0}", | |||
ProjectStateChangeEvent.ANNUAL_PLAN_PASS))); | |||
ProjectStateChangeEvent.ANNUAL_PLAN_PASS))) | |||
.ne(Project::getStatus, ProjectStatus.CHANGE_APPLY_PASSED.getCode()) | |||
.ne(Project::getStage, ProjectStatus.STOPPED.getCode()); | |||
List<Project> projects = projectService.list(query); | |||
AnnualPlanProgressStatisticsVO stat = new AnnualPlanProgressStatisticsVO(); | |||
stat.setTotalCount(projects.size()); | |||
@@ -90,8 +93,10 @@ public class AnnualPlanLibManage { | |||
ProjectManageUtil.projectQuery(query, req); | |||
query.eq(Project::getNewest, Boolean.TRUE); | |||
query.and(q1 -> q1.in(Project::getStatus, ON_ANNUAL_PLAN.getCode()) | |||
.or(q2 -> q2.exists(ExistsSqlConst.PROJECT_EXISTS_STATUS_CHANGE + " and event = {0}", | |||
ProjectStateChangeEvent.ANNUAL_PLAN_PASS))); | |||
.or(q2 -> q2.exists(ExistsSqlConst.PROJECT_EXISTS_STATUS_CHANGE + " and event = {0}", | |||
ProjectStateChangeEvent.ANNUAL_PLAN_PASS))) | |||
.ne(Project::getStatus, ProjectStatus.CHANGE_APPLY_PASSED.getCode()) | |||
.ne(Project::getStage, ProjectStatus.STOPPED.getCode()); | |||
Page<Project> page = projectService.page(req.page(), query); | |||
long total = page.getTotal(); | |||
if (total == 0) { | |||
@@ -180,6 +180,7 @@ public class DeclaredRecordManage { | |||
case DECLARED_APPROVED_TO_BE_RECORD: | |||
case DECLARED_APPROVED_RECORD_AUDITING: | |||
case DECLARED_APPROVED_RECORD_FAILED: | |||
case ON_CHANGE_APPLY: | |||
return status; | |||
default: | |||
return ProjectStatus.DECLARED_APPROVED_RECORD_PASSED; | |||
@@ -194,6 +195,8 @@ public class DeclaredRecordManage { | |||
.eq(req.getUnitStrip() != null, Project::getUnitStrip, req.getUnitStrip()) | |||
.ge(req.getCreateDateMin() != null, Project::getCreateOn, req.getCreateDateMin()) | |||
.eq(Project::getNewest, Boolean.TRUE) | |||
.ne(Project::getStatus, ProjectStatus.CHANGE_APPLY_PASSED.getCode()) | |||
.ne(Project::getStage, ProjectStatus.STOPPED.getCode()) | |||
.orderByDesc(Project::getUpdateOn); | |||
BizUtils.notNull(req.getCreateDateMax(), w -> query.lt(Project::getCreateOn, w.plusDays(1))); | |||
if (req.getStatus() == null) { | |||