Browse Source

modify:

1. 修改项目列表查询;
tags/24082301
WendyYang 4 months ago
parent
commit
de152aa637
3 changed files with 11 additions and 7 deletions
  1. +7
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/helper/ProjectManageUtil.java
  2. +2
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java
  3. +2
    -4
      hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java

+ 7
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/helper/ProjectManageUtil.java View File

@@ -94,6 +94,13 @@ public class ProjectManageUtil {
}
}

public static void projectBaseQuery(LambdaQueryWrapper<Project> query) {
query.select(Project::getId, Project::getStage, Project::getStatus, Project::getProjectCode,
Project::getBuildOrgCode, Project::getBuildOrgName, Project::getApprovalAmount,
Project::getCreateOn, Project::getProjectName, Project::getProjectYear,
Project::getDeclareAmount, Project::getReviewAmount);
}

/**
* 通用项目查询
*


+ 2
- 3
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java View File

@@ -205,7 +205,6 @@ public class ProjectLibManage {
if (CollUtil.isEmpty(page.getRecords())) {
return PageVo.empty();
}
UserFullInfoDTO finalUser = user;
Set<String> projectCodes = new HashSet<>();
List<Long> projectIds = new ArrayList<>();
for (Project project : page.getRecords()) {
@@ -234,8 +233,8 @@ public class ProjectLibManage {
item.setProcessStatus(w.getProcessStatus());
item.setInstCode(w.getInstCode());
item.setIsHigherSuperOrg(w.getIsHigherSuperOrg());
if (finalUser.getIsOrgAdmin() && StringUtils.isNotBlank(w.getSuperOrgCode())
&& w.getSuperOrgCode().equals(finalUser.getMhUnitIdStr())) {
if (user.getIsOrgAdmin() && StringUtils.isNotBlank(w.getSuperOrgCode())
&& w.getSuperOrgCode().equals(user.getMhUnitIdStr())) {
item.setCanPreDeclared(Boolean.TRUE);
}
item.setApprovedAmount(w.getApprovalAmount());


+ 2
- 4
hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java View File

@@ -21,6 +21,7 @@ import com.hz.pm.api.projectdeclared.service.IPurchaseService;
import com.hz.pm.api.projectdeclared.utils.ProjectIdCodeCacheUtil;
import com.hz.pm.api.projectlib.entity.ProjectGovSystemReplaceInfos;
import com.hz.pm.api.projectlib.entity.PurchaseStatusChange;
import com.hz.pm.api.projectlib.helper.ProjectManageUtil;
import com.hz.pm.api.projectlib.manage.ProjectLibManage;
import com.hz.pm.api.projectlib.model.entity.Project;
import com.hz.pm.api.projectlib.model.entity.ProjectStatusChange;
@@ -518,10 +519,6 @@ public class WorkbenchManage {
Long unitId = Optional.ofNullable(req.getUnitId()).orElseGet(LoginUserUtil::getMhUnitId);
List<Long> viewUnitIds = mhUnitCache.getViewChildIdsRecursion(unitId);
LambdaQueryWrapper<Project> query = Wrappers.lambdaQuery(Project.class)
.select(Project::getId, Project::getStage, Project::getStatus, Project::getProjectCode,
Project::getBuildOrgCode, Project::getBuildOrgName, Project::getApprovalAmount,
Project::getCreateOn, Project::getProjectName, Project::getProjectYear,
Project::getDeclareAmount, Project::getReviewAmount)
.eq(req.getProjectYear() != null, Project::getProjectYear, req.getProjectYear())
.like(StrUtil.isNotBlank(req.getBuildOrg()), Project::getBuildOrgName, req.getBuildOrg())
.like(StrUtil.isNotBlank(req.getProjectName()), Project::getProjectName, req.getProjectName())
@@ -536,6 +533,7 @@ public class WorkbenchManage {
.ne(Project::getStage, ProjectStatus.STOPPED.getCode())
.eq(Project::getNewest, Boolean.TRUE)
.orderByDesc(Project::getUpdateOn);
ProjectManageUtil.projectBaseQuery(query);
projectQueryByProjectStatusChange(query, ProjectStateChangeEvent.PROJECT_APPLICATION_SUBMIT);
switch (req.getProcessNode()) {
case PROJECT_DECLARED:


Loading…
Cancel
Save