Quellcode durchsuchen

feat:

1. 批量查询修改;
dev
WendyYang vor 1 Monat
Ursprung
Commit
8c1e00618a
1 geänderte Dateien mit 11 neuen und 6 gelöschten Zeilen
  1. +11
    -6
      hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java

+ 11
- 6
hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java Datei anzeigen

@@ -15,6 +15,7 @@ import com.google.common.collect.Sets;
import com.hz.pm.api.common.helper.UserInfoHelper;
import com.hz.pm.api.common.model.constant.BizConst;
import com.hz.pm.api.common.model.constant.ExistsSqlConst;
import com.hz.pm.api.common.model.constant.MhUnitConst;
import com.hz.pm.api.common.statemachine.event.AbstractStateChangeEvent;
import com.hz.pm.api.common.statemachine.event.ProjectStateChangeEvent;
import com.hz.pm.api.common.statemachine.event.TenderStateChangeEvent;
@@ -222,8 +223,10 @@ public class WorkbenchManage {
" and npsc.event = {0}", ProjectStateChangeEvent.PROJECT_APPLICATION_SUBMIT)
.notIn(Project::getStatus, ProjectStatusConstant.CHANGE_DELETE_PASSED)
.eq(Project::getNewest, Boolean.TRUE);
List<Long> viewUnitIds = mhUnitCache.getViewChildIdsRecursion(req.getUnitId());
projectQuery.in(Project::getBuildOrgCode, CollUtils.convert(viewUnitIds, String::valueOf));
if (MhUnitConst.ROOT_UNIT_ID != req.getUnitId()) {
List<Long> viewUnitIds = mhUnitCache.getViewChildIdsRecursion(req.getUnitId());
projectQuery.in(Project::getBuildOrgCode, CollUtils.convert(viewUnitIds, String::valueOf));
}
List<Project> projects = projectService.list(projectQuery);
if (projects.isEmpty()) {
return retDetail;
@@ -385,16 +388,18 @@ public class WorkbenchManage {
Map<String, Map<Long, Long>> purchaseEventMap = new HashMap<>();
Map<Long, List<Purchase>> projectPurchaseCountMap = new HashMap<>();
// 查询完成立项备案的项目
List<Long> viewUnitIds = mhUnitCache.getViewChildIdsRecursion(req.getUnitId());
Wrapper<Project> query = Wrappers.lambdaQuery(Project.class)
LambdaQueryWrapper<Project> query = Wrappers.lambdaQuery(Project.class)
.select(Project::getId, Project::getApprovalAmount, Project::getProjectCode, Project::getStatus, Project::getAnnualPlanOpened)
.eq(Project::getProjectYear, req.getProjectYear())
.eq(req.getUnitStrip() != null, Project::getUnitStrip, req.getUnitStrip())
.eq(Project::getNewest, Boolean.TRUE)
.notIn(Project::getStatus, ProjectStatusConstant.CHANGE_DELETE_PASSED)
.exists(ExistsSqlConst.PROJECT_EXISTS_STATUS_CHANGE + " and npsc.event = {0}",
ProjectStateChangeEvent.PROJECT_APPLICATION_SUBMIT)
.in(Project::getBuildOrgCode, CollUtils.convert(viewUnitIds, String::valueOf));
ProjectStateChangeEvent.PROJECT_APPLICATION_SUBMIT);
if (MhUnitConst.ROOT_UNIT_ID != req.getUnitId()) {
List<Long> viewUnitIds = mhUnitCache.getViewChildIdsRecursion(req.getUnitId());
query.in(Project::getBuildOrgCode, CollUtils.convert(viewUnitIds, String::valueOf));
}
List<Project> projects = projectService.list(query);
Map<String, Project> projectMap = CollUtils.listToMap(projects, Project::getProjectCode);
Map<String, List<ProjectStatusChange>> projectStatusChangeMap = new HashMap<>();


Laden…
Abbrechen
Speichern