|
|
@@ -13,11 +13,9 @@ import com.hz.pm.api.common.model.constant.BizConst; |
|
|
|
import com.hz.pm.api.common.model.constant.ExistsSqlConst; |
|
|
|
import com.hz.pm.api.common.statemachine.event.*; |
|
|
|
import com.hz.pm.api.common.util.DecimalUtil; |
|
|
|
import com.hz.pm.api.projectdeclared.manage.PurchaseManage; |
|
|
|
import com.hz.pm.api.projectdeclared.model.entity.Contract; |
|
|
|
import com.hz.pm.api.projectdeclared.model.entity.Purchase; |
|
|
|
import com.hz.pm.api.projectdeclared.model.enumerization.BidTypeEnum; |
|
|
|
import com.hz.pm.api.projectdeclared.model.vo.AdaptionProgressStatVO; |
|
|
|
import com.hz.pm.api.projectdeclared.service.IContractService; |
|
|
|
import com.hz.pm.api.projectdeclared.service.IPurchaseService; |
|
|
|
import com.hz.pm.api.projectdeclared.utils.ProjectIdCodeCacheUtil; |
|
|
@@ -73,7 +71,7 @@ import java.util.function.BiFunction; |
|
|
|
import java.util.function.Predicate; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
import static com.hz.pm.api.workbench.model.vo.ProjectProcessStatVO.*; |
|
|
|
import static com.hz.pm.api.workbench.model.vo.ProjectProcessStatVO.TenderAdaptFinishStatVO; |
|
|
|
|
|
|
|
/** |
|
|
|
* <p> |
|
|
@@ -101,7 +99,6 @@ public class WorkbenchManage { |
|
|
|
private final MhUnitCache mhUnitCache; |
|
|
|
private final IProjectGovSystemReplaceInfosService systemReplaceInfosService; |
|
|
|
private final IPurchaseStatusChangeService purchaseStatusChangeService; |
|
|
|
private final PurchaseManage purchaseManage; |
|
|
|
|
|
|
|
public WorkbenchVO getWorkbenchData(Integer year) { |
|
|
|
WorkbenchVO res = new WorkbenchVO(); |
|
|
@@ -191,6 +188,7 @@ public class WorkbenchManage { |
|
|
|
.ne(Project::getStatus, ProjectStatus.STOPPED_PASSED.getCode()) |
|
|
|
.select(Project::getReviewAmount, Project::getApprovalGovOwnFinanceAmount, Project::getId) |
|
|
|
.eq(Project::getProjectYear, req.getProjectYear()) |
|
|
|
.eq(req.getUnitStrip() != null, Project::getUnitStrip, req.getUnitStrip()) |
|
|
|
.eq(Project::getNewest, Boolean.TRUE); |
|
|
|
List<Long> viewUnitIds = mhUnitCache.getViewChildIdsRecursion(req.getUnitId()); |
|
|
|
projectQuery.in(Project::getBuildOrgCode, CollUtils.convert(viewUnitIds, String::valueOf)); |
|
|
@@ -198,7 +196,7 @@ public class WorkbenchManage { |
|
|
|
if (projects.isEmpty()) { |
|
|
|
return retDetail; |
|
|
|
} |
|
|
|
BigDecimal approvalAmount = DecimalUtil.sum(projects, Project::getApprovalGovOwnFinanceAmount); |
|
|
|
BigDecimal approvalAmount = DecimalUtil.sum(projects, Project::getApprovalAmount); |
|
|
|
BigDecimal reviewAmount = DecimalUtil.sum(projects, Project::getReviewAmount); |
|
|
|
retDetail.setTotalApprovalAmount(approvalAmount); |
|
|
|
retDetail.setTotalReviewAmount(reviewAmount); |
|
|
@@ -338,7 +336,7 @@ public class WorkbenchManage { |
|
|
|
Map<String, List<ProjectStatusChange>> projectStatusChangeMap = new HashMap<>(); |
|
|
|
for (WorkbenchProcessNode node : WorkbenchProcessNode.ALL) { |
|
|
|
if (!projects.isEmpty()) { |
|
|
|
ProjectProcessStatVO currStat = builder() |
|
|
|
ProjectProcessStatVO currStat = ProjectProcessStatVO.builder() |
|
|
|
.stageName(node.getName()) |
|
|
|
.stage(node) |
|
|
|
.build(); |
|
|
|