|
|
@@ -208,6 +208,12 @@ public class WorkbenchManage { |
|
|
|
return retDetail; |
|
|
|
} |
|
|
|
|
|
|
|
public long getProjectCount(List<Long> projectIds, ProjectStateChangeEvent event) { |
|
|
|
return projectStatusChangeService.count(Wrappers.lambdaQuery(ProjectStatusChange.class) |
|
|
|
.in(ProjectStatusChange::getProjectId, projectIds) |
|
|
|
.eq(ProjectStatusChange::getEvent, event)); |
|
|
|
} |
|
|
|
|
|
|
|
public List<ProjectProcessStageStatisticsVO> projectProcessStageStatistics(WorkbenchReq req) { |
|
|
|
initWorkbenchDefaultParam(req); |
|
|
|
List<ProjectProcessStageStatisticsVO> retData = new ArrayList<>(); |
|
|
@@ -224,6 +230,9 @@ public class WorkbenchManage { |
|
|
|
.select(Project::getId) |
|
|
|
.eq(Project::getProjectYear, req.getProjectYear()) |
|
|
|
.eq(Project::getNewest, Boolean.TRUE) |
|
|
|
.exists("select 1 from nd_project_status_change npsc " + |
|
|
|
"where npsc.project_code = nd_project.project_code and " + |
|
|
|
"npsc.event = {0}", ProjectStateChangeEvent.COMPLIANCE_REVIEW_PASS) |
|
|
|
.in(Project::getBuildOrgCode, CollUtils.convert(viewUnitIds, String::valueOf)); |
|
|
|
List<Project> projects = projectService.list(query); |
|
|
|
if (projects.isEmpty()) { |
|
|
@@ -233,17 +242,16 @@ public class WorkbenchManage { |
|
|
|
projectIds.addAll(CollUtils.fieldList(projects, Project::getId)); |
|
|
|
break; |
|
|
|
case PROJECT_REVIEW: |
|
|
|
count = 0; |
|
|
|
count = getProjectCount(projectIds, ProjectStateChangeEvent.PROJECT_REVIEW_PASS); |
|
|
|
break; |
|
|
|
case APPROVAL_AMOUNT: |
|
|
|
count = projectService.count(Wrappers.lambdaQuery(Project.class) |
|
|
|
.in(Project::getId, projectIds) |
|
|
|
.gt(Project::getApprovalAmount, BigDecimal.ZERO) |
|
|
|
.isNotNull(Project::getApprovalAmount)); |
|
|
|
break; |
|
|
|
case PROJECT_APPROVAL: |
|
|
|
count = projectStatusChangeService.count(Wrappers.lambdaQuery(ProjectStatusChange.class) |
|
|
|
.in(ProjectStatusChange::getProjectId, projectIds) |
|
|
|
.eq(ProjectStatusChange::getEvent, ProjectStateChangeEvent.DECLARED_RECORD_PASS)); |
|
|
|
count = getProjectCount(projectIds, ProjectStateChangeEvent.DECLARED_RECORD_PASS); |
|
|
|
break; |
|
|
|
case PROJECT_PURCHASE: |
|
|
|
count = purchaseService.count(Wrappers.lambdaQuery(Purchase.class) |
|
|
|