|
|
@@ -16,6 +16,7 @@ import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
/** |
|
|
|
* @Classname ApplicationHandler |
|
|
@@ -42,12 +43,14 @@ public class ApplicationHandler { |
|
|
|
generateOutputEntity(DashboardConstant.Protrait.PROJECT_SIGNS)); |
|
|
|
//2.查询应用 |
|
|
|
Project project = projectService.getProjectByCode(projectCode); |
|
|
|
List<ProjectApplication> apps = applicationService.list(Wrappers.lambdaQuery(ProjectApplication.class) |
|
|
|
.eq(ProjectApplication::getProjectVersion, project.getVersion()) |
|
|
|
.eq(ProjectApplication::getProjectCode, projectCode)); |
|
|
|
for(ProjectApplication app : apps){ |
|
|
|
String appName = StringUtils.isNotBlank(app.getApplicationName()) ? app.getApplicationName() : app.getRelatedExistsApplication(); |
|
|
|
res.put(appName,generateOutputEntity(appName)); |
|
|
|
if(Objects.nonNull(project)){ |
|
|
|
List<ProjectApplication> apps = applicationService.list(Wrappers.lambdaQuery(ProjectApplication.class) |
|
|
|
.eq(ProjectApplication::getProjectVersion, project.getVersion()) |
|
|
|
.eq(ProjectApplication::getProjectCode, projectCode)); |
|
|
|
for(ProjectApplication app : apps){ |
|
|
|
String appName = StringUtils.isNotBlank(app.getApplicationName()) ? app.getApplicationName() : app.getRelatedExistsApplication(); |
|
|
|
res.put(appName,generateOutputEntity(appName)); |
|
|
|
} |
|
|
|
} |
|
|
|
return res; |
|
|
|
} |
|
|
|