Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

master
WendyYang 1 год назад
Родитель
Сommit
1e1e5ac644
8 измененных файлов: 55 добавлений и 6 удалений
  1. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java
  2. +2
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/converter/ApplicationConverter.java
  3. +32
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java
  4. +2
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/provincial/model/dto/ProvincialProjectDTO.java
  5. +12
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java
  6. Двоичные данные
      pmapi/src/main/resources/template/丽水市2023年数字化项目年度计划编辑表(空).xls
  7. Двоичные данные
      pmapi/src/main/resources/template/丽水市2023年数字化项目年度计划编辑表.xls
  8. +5
    -1
      pmapi/src/main/resources/template/预审申请单.html

+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java Просмотреть файл

@@ -89,9 +89,9 @@ public class MeetingController {
return meetingManage.meetingListForLeave(req);
}

@ApiOperation("会议详情-基本信息")
@ApiOperation("项目详情-基本信息")
@GetMapping("/basicInfo/{meetingId}")
@WebLog(value = "会议详情-基本信息")
@WebLog(value = "项目详情-基本信息",response = true,project = true)
public MeetingDetailBasicVO meetingBasic(@PathVariable Long meetingId) {
return meetingManage.getMeetingDetail(meetingId);
}


+ 2
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/converter/ApplicationConverter.java Просмотреть файл

@@ -67,6 +67,8 @@ public class ApplicationConverter {
.projectApplyFile(convertFile(projectInfo.getProjectApplicationForm(),fileService))
.researchReport(convertFile(projectInfo.getPreliminaryPlanFile(),fileService))
.applicationInfo(convertApplications(applications,fileService))
//条线单位 先写死
.lineManageUnit("GO_3a8d76d825a849488916e618ff2f7474")
.build();
}



+ 32
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java Просмотреть файл

@@ -6,6 +6,7 @@ import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.excel.entity.TemplateExportParams;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.poi.excel.ExcelUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -22,6 +23,7 @@ import com.ningdatech.pmapi.common.helper.UserInfoHelper;
import com.ningdatech.pmapi.common.model.entity.ExcelExportWriter;
import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils;
import com.ningdatech.pmapi.common.util.ExcelDownUtil;
import com.ningdatech.pmapi.common.util.ExcelExportStyle;
import com.ningdatech.pmapi.datascope.model.DataScopeDTO;
import com.ningdatech.pmapi.datascope.utils.DataScopeUtil;
import com.ningdatech.pmapi.expert.constant.ExpertUserInfoSensitiveFieldEnum;
@@ -54,9 +56,14 @@ import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
@@ -399,7 +406,31 @@ public class AnnualPlanLibManage {
map.put("mapList1", null);
Workbook workbook = ExcelExportUtil.exportExcel(temp, map);
if (workbook == null) {
throw new BizException("读取模板失败!");
// 输出空模板
// 获取本地目录的年度计划编辑表空Excel模板
String emptyTemplate = "丽水市" + year + "年数字化项目年度计划编辑表(空)";
try {
InputStream templateInputStream =
this.getClass().getClassLoader().getResourceAsStream("template" + File.separator + emptyTemplate + ".xls");

OutputStream outputStream = response.getOutputStream();
// 设置要下载的文件的名称
response.setHeader("Content-disposition", "attachment;fileName=" + new String(templateName.getBytes("UTF-8"),"ISO8859-1"));
// 设置文件的MIME类型
response.setContentType("application/vnd.ms-excel;charset=UTF-8");

byte[] b = new byte[2048];
int len;
while ((len = templateInputStream.read(b)) != -1) {
outputStream.write(b, 0, len);
}
templateInputStream.close();
outputStream.flush();
outputStream.close();
} catch (IOException e) {
throw new BizException("读取模板失败!");
}
return;
}
// 重置响应对象
response.reset();


+ 2
- 0
pmapi/src/main/java/com/ningdatech/pmapi/provincial/model/dto/ProvincialProjectDTO.java Просмотреть файл

@@ -123,4 +123,6 @@ public class ProvincialProjectDTO implements Serializable {
@ApiModelProperty("app信息")
private List<ProvincialApplicationDTO> applicationInfo;

@ApiModelProperty("条线单位 先写死")
private String lineManageUnit;
}

+ 12
- 2
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java Просмотреть файл

@@ -431,7 +431,7 @@ public class TodoCenterManage {
// 调用盖章接口,获取盖章后返回的pdf文件字符数组
byte[] signPdf = IRSAPIRequest.createSignPdf(signReq);
// 转换成MultipartFile
MultipartFile multipartFile = new MockMultipartFile("file", originalFileName + ".pdf", "application/pdf", signPdf);
MultipartFile multipartFile = new MockMultipartFile("file", originalFileName, "application/pdf", signPdf);
// 上传OSS
FileResultVO resultVo = fileService.upload(multipartFile, "default");
// 将返回的文件ID更新到项目库中对应的项目下
@@ -957,8 +957,13 @@ public class TodoCenterManage {
* @since 2023/03/16 22:46
*/
public Long getNotSealedPdf(Long projectId) {
// 设置pdf模板参数
Project project = projectService.getById(projectId);
Long pretrialFileId = project.getPretrialFileId();
// 如果项目关联的预审文件ID不为空,说明已经进行过盖章审核,直接返回盖章后的预审申请单文件ID
if (Objects.nonNull(pretrialFileId)){
return pretrialFileId;
}
// 设置pdf模板参数
JSONObject paramsMap = assemblyPdfParams(project);
paramsMap.put("superOrgOpinion",null);
paramsMap.put("superOrgAuditDate",null);
@@ -1072,6 +1077,10 @@ public class TodoCenterManage {
paramsMap.put("yearPlanInvest",yearPlanInvest);
// TODO 根据地区编码获取当地大数据局(中心)的名称
paramsMap.put("bigDataBureauName",null);
// 备注模块如果为空
if (Objects.isNull(pdfGenerateDTO.getProjectRemarks())){
paramsMap.put("projectRemarks",null);
}

// 获取立项依据
String buildBasis = project.getBuildBasis();
@@ -1097,6 +1106,7 @@ public class TodoCenterManage {
}
String buildBasisList = builder.toString();
paramsMap.put("buildBasisList",buildBasisList);

return paramsMap;
}



Двоичные данные
template/丽水市2023年数字化项目年度计划编辑表.xls → pmapi/src/main/resources/template/丽水市2023年数字化项目年度计划编辑表(空).xls Просмотреть файл


Двоичные данные
pmapi/src/main/resources/template/丽水市2023年数字化项目年度计划编辑表.xls Просмотреть файл


+ 5
- 1
pmapi/src/main/resources/template/预审申请单.html Просмотреть файл

@@ -24,6 +24,10 @@
font-size: 34px;
margin: 40px 0 0 0;
font-family: SimSun;
word-break: break-all;
}
.tit {
word-break: break-all;
}
.tab {
padding: 0 20px;
@@ -84,7 +88,7 @@
<body>
<div class="pdf">
<p class="title">
<span>#title#</span>
<span class="tit">#title#</span>
</p>
<div class="tab">
<p class="projectId">


Загрузка…
Отмена
Сохранить