Browse Source

依赖升级

tags/24080901
WendyYang 9 months ago
parent
commit
5af6df643a
5 changed files with 32 additions and 79 deletions
  1. +3
    -1
      hz-pm-api/pom.xml
  2. +11
    -46
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/handle/ApplicationHandler.java
  3. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardProjectPortraitVO.java
  4. +14
    -27
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/PortraitProjectOutputVO.java
  5. +2
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/ProjectDetailVO.java

+ 3
- 1
hz-pm-api/pom.xml View File

@@ -14,11 +14,12 @@
<dependency> <dependency>
<groupId>com.google.guava</groupId> <groupId>com.google.guava</groupId>
<artifactId>guava</artifactId> <artifactId>guava</artifactId>
<version>33.0.0-jre</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>cn.hutool</groupId> <groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId> <artifactId>hutool-all</artifactId>
<version>5.8.5</version>
<version>5.8.25</version>
</dependency> </dependency>
<!--lombok--> <!--lombok-->
<dependency> <dependency>
@@ -64,6 +65,7 @@
<dependency> <dependency>
<groupId>org.apache.tomcat.embed</groupId> <groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId> <artifactId>tomcat-embed-core</artifactId>
<version>9.0.87</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>


+ 11
- 46
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/handle/ApplicationHandler.java View File

@@ -2,26 +2,18 @@ package com.hz.pm.api.dashboard.handle;


import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.hz.pm.api.App;
import com.hz.pm.api.dashboard.constant.DashboardConstant; import com.hz.pm.api.dashboard.constant.DashboardConstant;
import com.hz.pm.api.dashboard.model.vo.ProtraitProjectOutputVO;
import com.hz.pm.api.projectlib.model.entity.Project;
import com.hz.pm.api.dashboard.model.vo.PortraitProjectOutputVO;
import com.hz.pm.api.projectlib.model.entity.ProjectApplication; import com.hz.pm.api.projectlib.model.entity.ProjectApplication;
import com.hz.pm.api.projectlib.service.IProjectApplicationService; import com.hz.pm.api.projectlib.service.IProjectApplicationService;
import com.hz.pm.api.projectlib.service.IProjectService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;


import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Objects;


/** /**
* @Classname ApplicationHandler * @Classname ApplicationHandler
@@ -33,37 +25,10 @@ import java.util.Objects;
@RequiredArgsConstructor @RequiredArgsConstructor
@Slf4j @Slf4j
public class ApplicationHandler { public class ApplicationHandler {
private final IProjectApplicationService applicationService;

private final IProjectService projectService;
private final App app;


/**
* 生成项目产出
*
* @param projectCode
* @return
*/
public Map<String, ProtraitProjectOutputVO> generateOutput(String projectCode) {
Map<String, ProtraitProjectOutputVO> res = Maps.newHashMap();
//1.初始化 项目体征
res.put(DashboardConstant.Protrait.PROJECT_SIGNS,
generateOutputEntity(DashboardConstant.Protrait.PROJECT_SIGNS));
//2.查询应用
Project project = projectService.getProjectByCode(projectCode);
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;
}
private final IProjectApplicationService applicationService;


public List<ProtraitProjectOutputVO> generateIrsApp(String projectCode, Integer version) {
public List<PortraitProjectOutputVO> generateIrsApp(String projectCode, Integer version) {
//.查询应用 //.查询应用
Wrapper<ProjectApplication> paQuery = Wrappers.lambdaQuery(ProjectApplication.class) Wrapper<ProjectApplication> paQuery = Wrappers.lambdaQuery(ProjectApplication.class)
.eq(ProjectApplication::getProjectVersion, version) .eq(ProjectApplication::getProjectVersion, version)
@@ -72,7 +37,7 @@ public class ApplicationHandler {
if (apps.isEmpty()) { if (apps.isEmpty()) {
return Collections.emptyList(); return Collections.emptyList();
} }
List<ProtraitProjectOutputVO> retApps = Lists.newArrayList();
List<PortraitProjectOutputVO> retApps = Lists.newArrayList();
for (ProjectApplication app : apps) { for (ProjectApplication app : apps) {
String appName = StrUtil.blankToDefault(app.getApplicationName(), app.getRelatedExistsApplication()); String appName = StrUtil.blankToDefault(app.getApplicationName(), app.getRelatedExistsApplication());
retApps.add(generateOutputEntity(appName)); retApps.add(generateOutputEntity(appName));
@@ -80,14 +45,14 @@ public class ApplicationHandler {
return retApps; return retApps;
} }


private ProtraitProjectOutputVO generateOutputEntity(String name) {
return ProtraitProjectOutputVO.builder()
private PortraitProjectOutputVO generateOutputEntity(String name) {
return PortraitProjectOutputVO.builder()
.name(DashboardConstant.Protrait.PROJECT_SIGNS) .name(DashboardConstant.Protrait.PROJECT_SIGNS)
.generateData(new ProtraitProjectOutputVO.GenerateData())
.componentUsage(new ProtraitProjectOutputVO.ComponentUsage())
.cloudResourceUsage(new ProtraitProjectOutputVO.CloudResourceUsage())
.dataUsage(new ProtraitProjectOutputVO.DataUsage())
.operationReport(new ProtraitProjectOutputVO.OperationReport())
.generateData(new PortraitProjectOutputVO.GenerateData())
.componentUsage(new PortraitProjectOutputVO.ComponentUsage())
.cloudResourceUsage(new PortraitProjectOutputVO.CloudResourceUsage())
.dataUsage(new PortraitProjectOutputVO.DataUsage())
.operationReport(new PortraitProjectOutputVO.OperationReport())
.build(); .build();
} }
} }

hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardProjectProtraitVO.java → hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardProjectPortraitVO.java View File

@@ -15,7 +15,7 @@ import java.util.Map;


@Data @Data
@ApiModel("驾驶舱项目画像VO") @ApiModel("驾驶舱项目画像VO")
public class DashboardProjectProtraitVO {
public class DashboardProjectPortraitVO {


@ApiModelProperty("项目信息") @ApiModelProperty("项目信息")
private ProtraitProjectInfoVO projectInfo; private ProtraitProjectInfoVO projectInfo;
@@ -24,7 +24,7 @@ public class DashboardProjectProtraitVO {
private List<Tag> projectFeatures; private List<Tag> projectFeatures;


@ApiModelProperty("项目产出") @ApiModelProperty("项目产出")
private Map<String,ProtraitProjectOutputVO> projectOutput;
private Map<String, PortraitProjectOutputVO> projectOutput;


} }



hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ProtraitProjectOutputVO.java → hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/PortraitProjectOutputVO.java View File

@@ -14,42 +14,28 @@ import lombok.Data;
@Data @Data
@Builder @Builder
@ApiModel("驾驶舱项目画像里的项目产出VO") @ApiModel("驾驶舱项目画像里的项目产出VO")
public class ProtraitProjectOutputVO {

public ProtraitProjectOutputVO(){

}

public ProtraitProjectOutputVO(String name,CloudResourceUsage cloudResourceUsage,DataUsage dataUsage,
ComponentUsage componentUsage,GenerateData generateData,OperationReport operationReport){
this.name = name;
this.cloudResourceUsage = cloudResourceUsage;
this.dataUsage = dataUsage;
this.componentUsage = componentUsage;
this.generateData = generateData;
this.operationReport = operationReport;
}
public class PortraitProjectOutputVO {


@ApiModelProperty("名称") @ApiModelProperty("名称")
private String name; private String name;


@ApiModelProperty("云资源使用情况") @ApiModelProperty("云资源使用情况")
private CloudResourceUsage cloudResourceUsage = new CloudResourceUsage();
private CloudResourceUsage cloudResourceUsage;


@ApiModelProperty("数据使用情况") @ApiModelProperty("数据使用情况")
private DataUsage dataUsage = new DataUsage();
private DataUsage dataUsage;


@ApiModelProperty("组件使用情况") @ApiModelProperty("组件使用情况")
private ComponentUsage componentUsage = new ComponentUsage();
private ComponentUsage componentUsage;


@ApiModelProperty("产生数据") @ApiModelProperty("产生数据")
private GenerateData generateData = new GenerateData();
private GenerateData generateData;


@ApiModelProperty("试运行报告") @ApiModelProperty("试运行报告")
private OperationReport operationReport = new OperationReport();
private OperationReport operationReport;


@Data @Data
public static class CloudResourceUsage{
public static class CloudResourceUsage {
@ApiModelProperty("云资源实例使用数") @ApiModelProperty("云资源实例使用数")
private String instancesNum = DashboardConstant.Protrait.NONE; private String instancesNum = DashboardConstant.Protrait.NONE;


@@ -58,7 +44,7 @@ public class ProtraitProjectOutputVO {
} }


@Data @Data
public static class DataUsage{
public static class DataUsage {
@ApiModelProperty("数据共享申请量") @ApiModelProperty("数据共享申请量")
private String sharedApplicationVolume = DashboardConstant.Protrait.NONE; private String sharedApplicationVolume = DashboardConstant.Protrait.NONE;


@@ -69,11 +55,11 @@ public class ProtraitProjectOutputVO {
private String sharedInterfaceCallVolume = DashboardConstant.Protrait.NONE; private String sharedInterfaceCallVolume = DashboardConstant.Protrait.NONE;


@ApiModelProperty("协同接口使用量") @ApiModelProperty("协同接口使用量")
private String collaborativeInterfaceCallVolume= DashboardConstant.Protrait.NONE;
private String collaborativeInterfaceCallVolume = DashboardConstant.Protrait.NONE;
} }


@Data @Data
public static class ComponentUsage{
public static class ComponentUsage {
@ApiModelProperty("组件申请量") @ApiModelProperty("组件申请量")
private String applicationVolume = DashboardConstant.Protrait.NONE; private String applicationVolume = DashboardConstant.Protrait.NONE;


@@ -88,7 +74,7 @@ public class ProtraitProjectOutputVO {
} }


@Data @Data
public static class GenerateData{
public static class GenerateData {
@ApiModelProperty("产生数据量") @ApiModelProperty("产生数据量")
private String volume = DashboardConstant.Protrait.NONE; private String volume = DashboardConstant.Protrait.NONE;


@@ -102,16 +88,17 @@ public class ProtraitProjectOutputVO {
private String approvalPassRate = DashboardConstant.Protrait.NONE; private String approvalPassRate = DashboardConstant.Protrait.NONE;


@ApiModelProperty("数据接口被调用量") @ApiModelProperty("数据接口被调用量")
private String dataInterfaceCallsVolume = DashboardConstant.Protrait.NONE;
private String dataInterfaceCallsVolume = DashboardConstant.Protrait.NONE;


@ApiModelProperty("协同接口使用量") @ApiModelProperty("协同接口使用量")
private String collaborativeInterfaceCallVolume = DashboardConstant.Protrait.NONE; private String collaborativeInterfaceCallVolume = DashboardConstant.Protrait.NONE;
} }


@Data @Data
public static class OperationReport{
public static class OperationReport {
@ApiModelProperty("试运行报告通过率") @ApiModelProperty("试运行报告通过率")
private String passRate = DashboardConstant.Protrait.NONE; private String passRate = DashboardConstant.Protrait.NONE;
} }

} }



+ 2
- 3
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/ProjectDetailVO.java View File

@@ -4,8 +4,7 @@ import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson.annotation.JSONField;
import com.hz.pm.api.common.compare.Compare; import com.hz.pm.api.common.compare.Compare;
import com.hz.pm.api.dashboard.model.vo.ProtraitProjectOutputVO;
import com.hz.pm.api.external.model.dto.MhProjectSchemeTargetDTO;
import com.hz.pm.api.dashboard.model.vo.PortraitProjectOutputVO;
import com.hz.pm.api.portrait.model.vo.TagVO; import com.hz.pm.api.portrait.model.vo.TagVO;
import com.hz.pm.api.projectdeclared.model.vo.PurchaseFullInfoVO; import com.hz.pm.api.projectdeclared.model.vo.PurchaseFullInfoVO;
import com.hz.pm.api.projectlib.model.dto.GovSystemReplaceInfoDTO; import com.hz.pm.api.projectlib.model.dto.GovSystemReplaceInfoDTO;
@@ -515,7 +514,7 @@ public class ProjectDetailVO {
private String superOrgCreditCode; private String superOrgCreditCode;


@ApiModelProperty("终验信息 IRS档案") @ApiModelProperty("终验信息 IRS档案")
private List<ProtraitProjectOutputVO> finalIrsApps;
private List<PortraitProjectOutputVO> finalIrsApps;


@ApiModelProperty("建议项目总投资") @ApiModelProperty("建议项目总投资")
private BigDecimal proposeTotalInvest; private BigDecimal proposeTotalInvest;


Loading…
Cancel
Save