|
|
@@ -264,9 +264,9 @@ public class WorkbenchManage { |
|
|
|
int targetCount = 0; |
|
|
|
for (List<ProjectGovSystemReplaceInfos> currSystems : replaceGroupProject.values()) { |
|
|
|
sourceCount += CollUtil.count(CollUtils.fieldSet(currSystems, ProjectGovSystemReplaceInfos::getSourceSystem), |
|
|
|
isValidSystem::test); |
|
|
|
IS_VALID_SYSTEM::test); |
|
|
|
targetCount += CollUtil.count(CollUtils.fieldSet(currSystems, ProjectGovSystemReplaceInfos::getTargetSystem), |
|
|
|
isValidSystem::test); |
|
|
|
IS_VALID_SYSTEM::test); |
|
|
|
} |
|
|
|
return SystemReplaceStatVO.builder() |
|
|
|
.sourceCount(sourceCount) |
|
|
@@ -281,7 +281,7 @@ public class WorkbenchManage { |
|
|
|
return retDetail; |
|
|
|
} |
|
|
|
|
|
|
|
static Predicate<String> isValidSystem = x -> StrUtil.isNotBlank(x) && !"/".equals(x); |
|
|
|
public static final Predicate<String> IS_VALID_SYSTEM = x -> StrUtil.isNotBlank(x) && !"/".equals(x); |
|
|
|
|
|
|
|
private Pair<Integer, Integer> countReplaceSystemByProjectIds(Collection<Long> projectIds) { |
|
|
|
List<String> projectCodes = CollUtils.convert(projectIds, ProjectIdCodeCacheUtil::get); |
|
|
@@ -306,9 +306,9 @@ public class WorkbenchManage { |
|
|
|
Collectors.collectingAndThen(Collectors.toList(), |
|
|
|
w -> { |
|
|
|
Set<String> sourceNames = CollUtils.fieldSet(w, ProjectGovSystemReplaceInfos::getSourceSystem); |
|
|
|
int sourceCount = CollUtil.count(sourceNames, isValidSystem::test); |
|
|
|
int sourceCount = CollUtil.count(sourceNames, IS_VALID_SYSTEM::test); |
|
|
|
Set<String> targetNames = CollUtils.fieldSet(w, ProjectGovSystemReplaceInfos::getTargetSystem); |
|
|
|
int targetCount = CollUtil.count(targetNames, isValidSystem::test); |
|
|
|
int targetCount = CollUtil.count(targetNames, IS_VALID_SYSTEM::test); |
|
|
|
return Pair.create(sourceCount, targetCount); |
|
|
|
}))).values(); |
|
|
|
int totalTargetCount = 0; |
|
|
@@ -718,7 +718,7 @@ public class WorkbenchManage { |
|
|
|
} |
|
|
|
query.notIn(Project::getStatus, ProjectStatus.CHANGE_APPLY_PASSED.getCode() |
|
|
|
, ProjectStatus.STOPPED_PASSED.getCode()) |
|
|
|
.select(Project::getProjectCode, Project::getProjectName, |
|
|
|
.select(Project::getProjectCode, Project::getProjectName, Project::getId, |
|
|
|
Project::getBuildOrgCode, Project::getBuildOrgName); |
|
|
|
projectQueryByProjectStatusChange(query, ProjectStateChangeEvent.PROJECT_APPLICATION_SUBMIT); |
|
|
|
switch (req.getProcessNode()) { |
|
|
@@ -819,6 +819,8 @@ public class WorkbenchManage { |
|
|
|
List<ProjectGovSystemReplaceInfos> replaceInfos = projectSystemMap.get(proj.getProjectCode()); |
|
|
|
if (replaceInfos != null) { |
|
|
|
ProjectGovSystemReplaceVO projectSystem = new ProjectGovSystemReplaceVO(); |
|
|
|
projectSystem.setProjectId(proj.getId()); |
|
|
|
projectSystem.setProjectCode(proj.getProjectCode()); |
|
|
|
projectSystem.setProjectName(proj.getProjectName()); |
|
|
|
currOrgReplaceInfos.add(projectSystem); |
|
|
|
Map<Integer, List<ProjectGovSystemReplaceInfos>> replaceInfoGroup = CollUtils.group(replaceInfos, |
|
|
@@ -833,13 +835,13 @@ public class WorkbenchManage { |
|
|
|
replaceInfo.setTargetSystemName(firstReplaceInfo.getTargetSystem()); |
|
|
|
List<String> sourceSystemNames = CollUtils.fieldList(currBatchValues, val -> { |
|
|
|
String sourceSystem = val.getSourceSystem(); |
|
|
|
if (isValidSystem.test(sourceSystem)) { |
|
|
|
if (IS_VALID_SYSTEM.test(sourceSystem)) { |
|
|
|
sourceCount.incrementAndGet(); |
|
|
|
} |
|
|
|
return sourceSystem; |
|
|
|
}); |
|
|
|
replaceInfo.setSourceSystemNames(sourceSystemNames); |
|
|
|
if (isValidSystem.test(replaceInfo.getTargetSystemName())) { |
|
|
|
if (IS_VALID_SYSTEM.test(replaceInfo.getTargetSystemName())) { |
|
|
|
targetCount.incrementAndGet(); |
|
|
|
} |
|
|
|
return replaceInfo; |
|
|
|