|
|
@@ -31,6 +31,7 @@ import com.hz.pm.api.projectlib.model.dto.GovSystemReplaceInfoDTO; |
|
|
|
import com.hz.pm.api.projectlib.model.entity.Project; |
|
|
|
import com.hz.pm.api.projectlib.model.entity.ProjectStatusChange; |
|
|
|
import com.hz.pm.api.projectlib.model.enumeration.GovSystemReplaceTypeEnum; |
|
|
|
import com.hz.pm.api.projectlib.model.enumeration.status.ProjectStatus; |
|
|
|
import com.hz.pm.api.projectlib.model.req.ProjectListReq; |
|
|
|
import com.hz.pm.api.projectlib.model.vo.ProjectLibListItemVO; |
|
|
|
import com.hz.pm.api.projectlib.model.vo.SystemReplaceInfoVO; |
|
|
@@ -212,17 +213,19 @@ public class WorkbenchManage { |
|
|
|
if (projects.isEmpty()) { |
|
|
|
return retDetail; |
|
|
|
} |
|
|
|
retDetail.setTotalApprovalAmount(DecimalUtil.sum(projects, Project::getApprovalAmount)); |
|
|
|
retDetail.setTotalReviewAmount(DecimalUtil.sum(projects, Project::getReviewAmount)); |
|
|
|
retDetail.setCurrOrgApprovalAmount(DecimalUtil.sum(projects, Project::getApprovalGovOwnFinanceAmount)); |
|
|
|
retDetail.setUpperOrgApprovalAmount(DecimalUtil.sum(projects, Project::getApprovalGovSuperiorFinanceAmount)); |
|
|
|
List<Long> projectIds = CollUtils.fieldList(projects, Project::getId); |
|
|
|
List<Project> validProjects = CollUtils.filter(projects, w -> !ProjectStatus.STOPPED.eq(w.getStage())); |
|
|
|
retDetail.setTotalApprovalAmount(DecimalUtil.sum(validProjects, Project::getApprovalAmount)); |
|
|
|
retDetail.setTotalReviewAmount(DecimalUtil.sum(validProjects, Project::getReviewAmount)); |
|
|
|
retDetail.setCurrOrgApprovalAmount(DecimalUtil.sum(validProjects, Project::getApprovalGovOwnFinanceAmount)); |
|
|
|
retDetail.setUpperOrgApprovalAmount(DecimalUtil.sum(validProjects, Project::getApprovalGovSuperiorFinanceAmount)); |
|
|
|
List<Long> validProjectIds = CollUtils.fieldList(validProjects, Project::getId); |
|
|
|
// 合同金额 |
|
|
|
List<Contract> contracts = contractService.list(Wrappers.lambdaQuery(Contract.class) |
|
|
|
.select(Contract::getTotalAmount, Contract::getId) |
|
|
|
.in(Contract::getProjectId, projectIds)); |
|
|
|
.in(Contract::getProjectId, validProjectIds)); |
|
|
|
retDetail.setTotalContractAmount(DecimalUtil.sum(contracts, Contract::getTotalAmount)); |
|
|
|
// 系统替代情况统计 |
|
|
|
List<Long> projectIds = CollUtils.fieldList(projects, Project::getId); |
|
|
|
Wrapper<ProjectGovSystemReplaceInfos> pgsriQuery = Wrappers.lambdaQuery(ProjectGovSystemReplaceInfos.class) |
|
|
|
.in(ProjectGovSystemReplaceInfos::getProjectId, projectIds); |
|
|
|
List<ProjectGovSystemReplaceInfos> systemReplaceInfos = systemReplaceInfosService.list(pgsriQuery); |
|
|
|