Browse Source

modify:

1. 增加是否姓新增迭代升级内容;
tags/24101601
WendyYang 2 months ago
parent
commit
71614c0be1
5 changed files with 61 additions and 4 deletions
  1. +7
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/controller/ProjectGovSystemReplaceInfoController.java
  2. +36
    -4
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectGovSystemReplaceInfoManage.java
  3. +6
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectDTO.java
  4. +6
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/entity/Project.java
  5. +6
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/ProjectDetailVO.java

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

@@ -9,6 +9,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;

/**
* <p>
* ProjectGovSystemReplaceInfoController
@@ -30,4 +32,9 @@ public class ProjectGovSystemReplaceInfoController {
return systemReplaceInfoManage.systemReplaceInfos(targetSystem);
}

@GetMapping("/down")
public void downTmp(HttpServletResponse response) {
systemReplaceInfoManage.downTmp(response);
}

}

+ 36
- 4
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectGovSystemReplaceInfoManage.java View File

@@ -2,11 +2,14 @@ package com.hz.pm.api.projectlib.manage;

import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.poi.excel.ExcelUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hz.pm.api.common.exception.ReturnException;
import com.hz.pm.api.projectlib.entity.ProjectGovSystemReplaceInfos;
import com.hz.pm.api.projectlib.model.dto.GovSystemReplaceInfoDTO;
import com.hz.pm.api.projectlib.model.entity.Project;
import com.hz.pm.api.projectlib.model.enumeration.GovSystemReplaceTypeEnum;
import com.hz.pm.api.projectlib.model.vo.SystemReplaceInfoVO;
import com.hz.pm.api.projectlib.model.vo.UnitProjectGovSystemReplaceVO;
import com.hz.pm.api.projectlib.model.vo.UnitProjectGovSystemReplaceVO.ProjectGovSystemReplaceVO;
@@ -18,10 +21,9 @@ import com.ningdatech.basic.util.CollUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;

@@ -112,4 +114,34 @@ public class ProjectGovSystemReplaceInfoManage {
return retDetail;
}

public void downTmp(HttpServletResponse response) {
List<ProjectGovSystemReplaceInfos> replaceInfos = systemReplaceInfosService.list();
replaceInfos.removeIf(w -> StrUtil.isNotBlank(w.getSourceSystemId()));
if (replaceInfos.isEmpty()) {
throw ReturnException.wrap("暂无数据可供导出");
}
for (ProjectGovSystemReplaceInfos replaceInfo : replaceInfos) {
if (StrUtil.isNotBlank(replaceInfo.getReplaceType())) {
String replaceType = replaceInfo.getReplaceType();
String[] split = replaceType.split(",");
String replaceTypeStr = Arrays.stream(split)
.filter(NumberUtil::isNumber)
.map(w -> GovSystemReplaceTypeEnum.getVal(Integer.parseInt(w)))
.collect(Collectors.joining(","));
replaceInfo.setReplaceType(replaceTypeStr);
} else {
replaceInfo.setReplaceType(StrUtil.EMPTY);
}
}
try (ServletOutputStream sos = response.getOutputStream()) {
response.setContentType("application/vnd.ms-excel");
ExcelUtil.getWriter()
.write(replaceInfos)
.flush(sos)
.close();
} catch (Exception e) {
throw ReturnException.wrap("导出失败");
}
}

}

+ 6
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectDTO.java View File

@@ -383,6 +383,12 @@ public class ProjectDTO implements Serializable {
@ApiModelProperty("政务信息系统替代情况")
private List<GovSystemReplaceInfoDTO> systemReplaceInfos;

@ApiModelProperty("是否新增迭代升级内容")
private Boolean isAddIterativeUpgradeContent;

@ApiModelProperty("迭代升级内容")
private String iterativeUpgradeContent;

@ApiModelProperty("信产项目ID")
private Long mhProjectId;



+ 6
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/entity/Project.java View File

@@ -503,4 +503,10 @@ public class Project implements Serializable {
@ApiModelProperty("是否是重大项目")
private Boolean isMajorProject;

@ApiModelProperty("是否新增迭代升级内容")
private Boolean isAddIterativeUpgradeContent;

@ApiModelProperty("迭代升级内容")
private String iterativeUpgradeContent;

}

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

@@ -594,4 +594,10 @@ public class ProjectDetailVO {
@ApiModelProperty("所属领域")
private Integer unitStrip;

@ApiModelProperty("是否新增迭代升级内容")
private Boolean isAddIterativeUpgradeContent;

@ApiModelProperty("迭代升级内容")
private String iterativeUpgradeContent;

}

Loading…
Cancel
Save