ソースを参照

modify:

1. 首页金额统计规则修改;
tags/24091901
WendyYang 1ヶ月前
コミット
892207e73c
1個のファイルの変更9行の追加6行の削除
  1. +9
    -6
      hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java

+ 9
- 6
hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java ファイルの表示

@@ -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);


読み込み中…
キャンセル
保存