diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java index 77ff065..23ec12a 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java +++ b/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); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/converter/ApplicationConverter.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/converter/ApplicationConverter.java index aeca03d..43c1cdc 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/converter/ApplicationConverter.java +++ b/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(); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java index 05ecd4c..6dbe71e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java +++ b/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(); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/provincial/model/dto/ProvincialProjectDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/provincial/model/dto/ProvincialProjectDTO.java index d84da7e..335468f 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/provincial/model/dto/ProvincialProjectDTO.java +++ b/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 applicationInfo; + @ApiModelProperty("条线单位 先写死") + private String lineManageUnit; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java index 516db34..27e3e55 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java +++ b/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; } diff --git a/template/丽水市2023年数字化项目年度计划编辑表.xls b/pmapi/src/main/resources/template/丽水市2023年数字化项目年度计划编辑表(空).xls similarity index 81% rename from template/丽水市2023年数字化项目年度计划编辑表.xls rename to pmapi/src/main/resources/template/丽水市2023年数字化项目年度计划编辑表(空).xls index dccfe42..7317bac 100644 Binary files a/template/丽水市2023年数字化项目年度计划编辑表.xls and b/pmapi/src/main/resources/template/丽水市2023年数字化项目年度计划编辑表(空).xls differ diff --git a/pmapi/src/main/resources/template/丽水市2023年数字化项目年度计划编辑表.xls b/pmapi/src/main/resources/template/丽水市2023年数字化项目年度计划编辑表.xls index 04432a4..d06cdad 100644 Binary files a/pmapi/src/main/resources/template/丽水市2023年数字化项目年度计划编辑表.xls and b/pmapi/src/main/resources/template/丽水市2023年数字化项目年度计划编辑表.xls differ diff --git a/pmapi/src/main/resources/template/预审申请单.html b/pmapi/src/main/resources/template/预审申请单.html index d0d2937..1319e8b 100644 --- a/pmapi/src/main/resources/template/预审申请单.html +++ b/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 @@

- #title# + #title#