Переглянути джерело

删除无用代码

tags/24080901
WendyYang 7 місяці тому
джерело
коміт
961093fd37
9 змінених файлів з 46 додано та 1367 видалено
  1. +0
    -23
      hz-pm-api/pom.xml
  2. +40
    -48
      hz-pm-api/src/main/java/com/hz/pm/api/todocenter/controller/TodoCenterController.java
  3. +6
    -293
      hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java
  4. +0
    -119
      hz-pm-api/src/main/java/com/hz/pm/api/todocenter/utils/PdfUtil.java
  5. BIN
      hz-pm-api/src/main/resources/template/simsun.ttc
  6. +0
    -290
      hz-pm-api/src/main/resources/template/区县-预审申请单.html
  7. +0
    -282
      hz-pm-api/src/main/resources/template/市级-预审申请单.html
  8. +0
    -277
      hz-pm-api/src/main/resources/template/建设方案申请单.html
  9. +0
    -35
      pom.xml

+ 0
- 23
hz-pm-api/pom.xml Переглянути файл

@@ -200,29 +200,6 @@
<groupId>org.springframework.statemachine</groupId>
<artifactId>spring-statemachine-core</artifactId>
</dependency>

<!-- PDF生成 -->
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itext-asian</artifactId>
</dependency>
<dependency>
<groupId>com.itextpdf.tool</groupId>
<artifactId>xmlworker</artifactId>
</dependency>
<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>flying-saucer-pdf-itext5</artifactId>
</dependency>
<!--将html转换成pdf-->
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>html2pdf</artifactId>
</dependency>
<!--导入导出-->
<dependency>
<groupId>cn.afterturn</groupId>


+ 40
- 48
hz-pm-api/src/main/java/com/hz/pm/api/todocenter/controller/TodoCenterController.java Переглянути файл

@@ -1,17 +1,6 @@
package com.hz.pm.api.todocenter.controller;


import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;

import com.ningdatech.log.annotation.WebLog;
import com.hz.pm.api.todocenter.model.vo.NotSealedInfoVO;
import com.hz.pm.api.todocenter.model.vo.TodoNumVO;
import com.wflow.workflow.bean.dto.ReqAuditOpinionSaveDTO;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import com.ningdatech.basic.model.PageVo;
import com.hz.pm.api.todocenter.manage.TodoCenterManage;
import com.hz.pm.api.todocenter.model.dto.AdjustHandleDTO;
import com.hz.pm.api.todocenter.model.dto.SealInfoDTO;
@@ -20,15 +9,23 @@ import com.hz.pm.api.todocenter.model.req.ToBeProcessedExportReq;
import com.hz.pm.api.todocenter.model.req.ToBeProcessedReq;
import com.hz.pm.api.todocenter.model.vo.ProcessProgressDetailVO;
import com.hz.pm.api.todocenter.model.vo.ResToBeProcessedVO;
import com.hz.pm.api.todocenter.model.vo.TodoNumVO;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.log.annotation.WebLog;
import com.wflow.workflow.bean.dto.ReqAuditOpinionSaveDTO;
import com.wflow.workflow.bean.dto.ReqProcessHandlerDTO;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;

/**
* <p>
* 待办中心 前端控制器
* 待办中心 前端控制器
* </p>
*
* @author CMM
@@ -46,23 +43,24 @@ public class TodoCenterController {
* 实时取当前操作人 某个工作流的下一个操作taskId
*/
@GetMapping("/todo/taskId/{instanceId}")
public String todoTaskId(@PathVariable String instanceId){
public String todoTaskId(@PathVariable String instanceId) {
return todoCenterManage.todoTaskId(instanceId);
}

/**
* 待办中心-待我处理项目列表查询
*
* @param param
* @return
*/
@GetMapping("/todo-list")
public PageVo<ResToBeProcessedVO> todoList(@Valid @ModelAttribute ToBeProcessedReq param){
public PageVo<ResToBeProcessedVO> todoList(@Valid @ModelAttribute ToBeProcessedReq param) {
return todoCenterManage.todoProjectList(param);
}

/**
* 待办中心-待我处理项目列表导出
*
*
* @param param
* @param response
* @return void
@@ -70,12 +68,13 @@ public class TodoCenterController {
@PostMapping("/todo-list/export")
@WebLog("待办中心-待我处理项目列表导出")
public void exportPendingProjectList(@Valid @RequestBody ToBeProcessedExportReq param,
HttpServletResponse response){
todoCenterManage.exportTodoList(response,param);
HttpServletResponse response) {
todoCenterManage.exportTodoList(response, param);
}

/**
* 查询流程表单数据及审批的进度步骤
*
* @param request 请求参数
* @return 流程进度及表单详情
*/
@@ -86,6 +85,7 @@ public class TodoCenterController {

/**
* 审核通过,盖章并通过、退回、撤回、驳回等操作
*
* @param param 操作参数
* @return 操作结果
*/
@@ -97,6 +97,7 @@ public class TodoCenterController {

/**
* 保存盖章审核提交的审核意见
*
* @param param 操作参数
* @return 操作结果
*/
@@ -106,17 +107,17 @@ public class TodoCenterController {
return todoCenterManage.saveAuditOpinion(param);
}



/**
* 待办中心-我已处理项目列表查询
*
* @param param
* @return
*/
@GetMapping("/ido-list")
public PageVo<ResToBeProcessedVO> idoList(@ModelAttribute ToBeProcessedReq param){
public PageVo<ResToBeProcessedVO> idoList(@ModelAttribute ToBeProcessedReq param) {
return todoCenterManage.idoList(param);
}

/**
* 待办中心-我已处理项目列表导出
*
@@ -126,53 +127,51 @@ public class TodoCenterController {
*/
@PostMapping("/ido-list/export")
public void exportHandledProjectList(@RequestBody ToBeProcessedExportReq param,
HttpServletResponse response){
todoCenterManage.idoExport(response,param);
HttpServletResponse response) {
todoCenterManage.idoExport(response, param);
}

/**
* 待办中心-我发起的项目列表查询
* @param param
* @return
*
* @param param \
*/
@GetMapping("/my-submitted-list")
public PageVo<ResToBeProcessedVO> mySubmittedList(@ModelAttribute ToBeProcessedReq param){
public PageVo<ResToBeProcessedVO> mySubmittedList(@ModelAttribute ToBeProcessedReq param) {
return todoCenterManage.mySubmittedList(param);
}

/**
* 待办中心-我发起的项目列表导出
*
* @param param
* @param response
* @return void
* @param param \
* @param response \
*/
@PostMapping("/my-submitted-list/export")
public void exportMySubmittedList(@RequestBody ToBeProcessedExportReq param,
HttpServletResponse response){
todoCenterManage.exportMySubmittedList(response,param);
HttpServletResponse response) {
todoCenterManage.exportMySubmittedList(response, param);
}

/**
* 待办中心-抄送我的项目列表查询
* @param param
* @return
*
* @param param \
*/
@GetMapping("/ccme-list")
public PageVo<ResToBeProcessedVO> ccmeList(@Valid @ModelAttribute ToBeProcessedReq param){
public PageVo<ResToBeProcessedVO> ccmeList(@Valid @ModelAttribute ToBeProcessedReq param) {
return todoCenterManage.ccmeList(param);
}

/**
* 待办中心-抄送我的项目列表导出
*
* @param param
* @param response
* @return void
* @param param \
* @param response \
*/
@PostMapping("/ccme-list/export")
public void exportCcMeProjectList(@Valid @RequestBody ToBeProcessedExportReq param, HttpServletResponse response){
todoCenterManage.exportCcMeProjectList(response,param);
public void exportCcMeProjectList(@Valid @RequestBody ToBeProcessedExportReq param, HttpServletResponse response) {
todoCenterManage.exportCcMeProjectList(response, param);
}

@ApiOperation(value = "被退回项目内容调整并通过", notes = "被退回项目内容调整并通过")
@@ -183,23 +182,16 @@ public class TodoCenterController {
return "退回项目内容调整并且重新通过 【" + instanceId + "】 成功";
}

@ApiOperation("获取未签章的pdf文件")
@WebLog("获取未签章的pdf文件")
@PostMapping("/getNotSealedPdf")
public NotSealedInfoVO getNotSealedPdf (@Valid @RequestBody SealInfoDTO req){
return todoCenterManage.getNotSealedPdf(req);
}

@ApiOperation("获取签章后的pdf文件")
@WebLog("获取签章后的pdf文件")
@PostMapping("/getSealedPdf")
public Long getSealedPdf(@Valid @RequestBody SealInfoDTO req){
public Long getSealedPdf(@Valid @RequestBody SealInfoDTO req) {
return todoCenterManage.getSealedPdf(req);
}

@ApiOperation("待办中心待我处理数量统计")
@GetMapping("/getTodoNums")
public TodoNumVO getTodoNums(@Valid @ModelAttribute ToBeProcessedReq param){
public TodoNumVO getTodoNums(@Valid @ModelAttribute ToBeProcessedReq param) {
return todoCenterManage.getTodoNums(param);
}
}

+ 6
- 293
hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java Переглянути файл

@@ -7,8 +7,6 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.Assert;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.google.common.collect.Lists;
@@ -17,7 +15,6 @@ import com.google.common.collect.Sets;
import com.hz.pm.api.common.enumeration.CommonEnum;
import com.hz.pm.api.common.helper.UserInfoHelper;
import com.hz.pm.api.common.model.constant.BizConst;
import com.hz.pm.api.common.model.constant.CommonConst;
import com.hz.pm.api.common.model.constant.RegionConst;
import com.hz.pm.api.common.model.entity.ExcelExportWriter;
import com.hz.pm.api.common.util.BizUtils;
@@ -32,7 +29,7 @@ import com.hz.pm.api.projectlib.model.dto.ProjectDTO;
import com.hz.pm.api.projectlib.model.entity.Project;
import com.hz.pm.api.projectlib.model.entity.ProjectApplication;
import com.hz.pm.api.projectlib.model.entity.ProjectInst;
import com.hz.pm.api.projectlib.model.enumeration.*;
import com.hz.pm.api.projectlib.model.enumeration.InstTypeEnum;
import com.hz.pm.api.projectlib.model.req.ProjectListReq;
import com.hz.pm.api.projectlib.service.IProjectApplicationService;
import com.hz.pm.api.projectlib.service.IProjectInstService;
@@ -44,22 +41,22 @@ import com.hz.pm.api.sys.service.IRegionService;
import com.hz.pm.api.todocenter.constant.TodoCenterConst;
import com.hz.pm.api.todocenter.constant.TodoCenterConst.SealTemplate;
import com.hz.pm.api.todocenter.enumeration.IsAppendProjectEnum;
import com.hz.pm.api.todocenter.enumeration.IsOrNotEnum;
import com.hz.pm.api.todocenter.handle.PassHandle;
import com.hz.pm.api.todocenter.handle.WithDrawHandle;
import com.hz.pm.api.todocenter.model.dto.AdjustHandleDTO;
import com.hz.pm.api.todocenter.model.dto.PdfGenerateDTO;
import com.hz.pm.api.todocenter.model.dto.SealInfoDTO;
import com.hz.pm.api.todocenter.model.dto.SignReqDTO;
import com.hz.pm.api.todocenter.model.po.TodoCenterStatisticsPO;
import com.hz.pm.api.todocenter.model.req.ProcessDetailReq;
import com.hz.pm.api.todocenter.model.req.ToBeProcessedExportReq;
import com.hz.pm.api.todocenter.model.req.ToBeProcessedReq;
import com.hz.pm.api.todocenter.model.vo.*;
import com.hz.pm.api.todocenter.model.vo.ProcessProgressDetailVO;
import com.hz.pm.api.todocenter.model.vo.ResToBeProcessedVO;
import com.hz.pm.api.todocenter.model.vo.TodoCenterStatisticsVO;
import com.hz.pm.api.todocenter.model.vo.TodoNumVO;
import com.hz.pm.api.todocenter.service.ITodoService;
import com.hz.pm.api.todocenter.service.StatisticsService;
import com.hz.pm.api.todocenter.utils.BuildUserUtils;
import com.hz.pm.api.todocenter.utils.PdfUtil;
import com.hz.pm.api.user.security.model.UserFullInfoDTO;
import com.hz.pm.api.user.security.model.UserInfoDetails;
import com.hz.pm.api.user.util.LoginUserUtil;
@@ -67,7 +64,6 @@ import com.ningdatech.basic.exception.BizException;
import com.ningdatech.basic.function.VUtils;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.basic.util.CollUtils;
import com.ningdatech.basic.util.NdDateUtils;
import com.ningdatech.basic.util.StrPool;
import com.ningdatech.file.entity.File;
import com.ningdatech.file.entity.vo.result.FileResultVO;
@@ -88,7 +84,6 @@ import com.wflow.workflow.service.ProcessTaskService;
import com.wflow.workflow.utils.ProcessTaskUtils;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.flowable.bpmn.model.BpmnModel;
import org.flowable.bpmn.model.FlowElement;
@@ -112,7 +107,6 @@ import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
@@ -122,9 +116,9 @@ import java.util.stream.Stream;
* @author ZPF
* @since 2023/02/19 16:09
*/
@Slf4j
@Component
@RequiredArgsConstructor
@Slf4j
public class TodoCenterManage {

private final ProcessTaskService processTaskService;
@@ -1177,287 +1171,6 @@ public class TodoCenterManage {
return Boolean.TRUE;
}

/**
* 获取未盖章的预审申请单/建设方案申请单pdf文件
*
* @param req
* @return java.lang.Long
* @author CMM
* @since 2023/03/16 22:46
*/
public NotSealedInfoVO getNotSealedPdf(SealInfoDTO req) {
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId());
Long projectId = req.getProjectId();
String auditOpinion = req.getAuditOpinion();
String auditDate = NdDateUtils.format(LocalDateTime.now(), NdDateUtils.DEFAULT_DATE_TIME_FORMAT);
NotSealedInfoVO notSealedInfoVo = new NotSealedInfoVO();
String mhUnitId = user.getMhUnitId().toString();
// 判断项目盖章审批类型
Project project = projectService.getById(projectId);
String buildOrgCode = project.getBuildOrgCode();
String instanceId = project.getInstCode();
ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class)
.eq(ProjectInst::getInstCode, instanceId));
Integer instType = projectInst.getInstType();
// 如果为预审申报审批
if (InstTypeEnum.PRELIMINARY_PREVIEW.getCode().equals(instType)) {
// 再根据项目所属区域判断是市级预审还是区县预审
Long pretrialFileId = project.getPretrialFileId();
// 获取项目申报时是否选择了主管单位和上级条线主管单位
// 主管单位信息
Integer isSuperOrg = project.getIsSuperOrg();
String superOrgCode = project.getSuperOrgCode();
// 上级条线主管单位信息
// 如果项目关联的预审文件ID不为空,说明已经提交过审核意见,直接返回文件ID
if (Boolean.TRUE.equals(getCityNotSealedInfoVO(pretrialFileId, notSealedInfoVo))) {
return notSealedInfoVo;
}
String cityTemplateName = SealTemplate.CITY_TEMPLATE;
// 设置pdf模板参数
JSONObject cityParamsMap = assemblyPdfParams(project, cityTemplateName);
// 盖章审核为主管单位审核
if (CommonEnum.YES.getCode().equals(isSuperOrg)) {
// 有主管单位信息且登录用户所在单位是主管单位
checkEmpPosUnitCode(mhUnitId, auditOpinion, auditDate, superOrgCode, cityParamsMap);
} else if (CommonEnum.NO.getCode().equals(isSuperOrg)) {
// 没有选主管单位,默认为项目建设单位且登录用户所在单位为项目建设单位
checkEmpPosUnitCode(mhUnitId, auditOpinion, auditDate, buildOrgCode, cityParamsMap);
}
Long cityPdfId = generateNotSealedPdf(projectId, cityTemplateName, cityParamsMap);
notSealedInfoVo.setFileId(cityPdfId);
checkAuditOpinion(auditOpinion, notSealedInfoVo);
return notSealedInfoVo;
}
// 如果为建设方案申报审批
else if (InstTypeEnum.CONSTRUCTION_PLAN_REVIEW.getCode().equals(instType)) {
Long constructFileId = project.getConstructFileId();
// 如果项目关联的建设方案文件ID不为空,说明已经提交过审核意见,直接返回文件ID
if (Boolean.TRUE.equals(getCityNotSealedInfoVO(constructFileId, notSealedInfoVo))) {
return notSealedInfoVo;
}
// 设置pdf模板参数
String constructTemplateName = SealTemplate.CONSTRUCT_TEMPLATE;
JSONObject constructParamsMap = assemblyPdfParams(project, constructTemplateName);
// 审核为指定大数据局盖章
// 获取流程配置的指定单位信息
constructParamsMap.put("bigDataBureauOpinion", auditOpinion);
constructParamsMap.put("bigDataBureauAuditDate", auditDate);
Long constructNotFileId = generateNotSealedPdf(projectId, constructTemplateName, constructParamsMap);
notSealedInfoVo.setFileId(constructNotFileId);
checkAuditOpinion(auditOpinion, notSealedInfoVo);
return notSealedInfoVo;
}
return notSealedInfoVo;
}

private void checkAuditOpinion(String auditOpinion, NotSealedInfoVO notSealedInfoVo) {
if (StringUtils.isNotBlank(auditOpinion)) {
notSealedInfoVo.setIsCommit(Boolean.TRUE);
}
}

private Boolean getCityNotSealedInfoVO(Long fileId, NotSealedInfoVO notSealedInfoVo) {
if (Objects.nonNull(fileId)) {
notSealedInfoVo.setFileId(fileId);
notSealedInfoVo.setIsCommit(Boolean.TRUE);
return true;
}
return false;
}

private void checkEmpPosUnitCode(String empPosUnitCode, String auditOpinion, String auditDate, String orgCode, JSONObject cityParamsMap) {
if (empPosUnitCode.equals(orgCode)) {
cityParamsMap.put("superOrgOpinion", auditOpinion);
cityParamsMap.put("superOrgAuditDate", auditDate);
} else {
cityParamsMap.put("superOrgOpinion", null);
cityParamsMap.put("superOrgAuditDate", null);
}
}

private Long generateNotSealedPdf(Long projectId, String templateName, JSONObject paramsMap) {
// 获取本地目录的pdf模板
String fileName;
if (templateName.contains(StrPool.DASH)) {
int index = templateName.indexOf(StrPool.DASH);
fileName = templateName.substring(index + 1);
} else {
fileName = templateName;
}
InputStream htmlInputStream = this.getClass().getClassLoader()
.getResourceAsStream("template" + java.io.File.separator + templateName + ".html");
// 生成pdf字节数组
byte[] pdf = PdfUtil.generatePdf(htmlInputStream, paramsMap);

// 转换成MultipartFile
MultipartFile multipartFile = new MockMultipartFile("file", fileName + ".pdf", "application/pdf", pdf);

// 上传OSS
FileResultVO resultVo = fileService.upload(multipartFile, "default");

// 将带审核意见的返回的文件ID更新到项目库中对应的项目下
Project declaredProject = projectService.getById(projectId);
// 根据模版名称判断是预审申请单还是建设方案申请单
String superOrgOpinion = paramsMap.getString("superOrgOpinion");
String higherOrgOpinion = paramsMap.getString("higherOrgOpinion");
if (StringUtils.isNotBlank(superOrgOpinion) || StringUtils.isNotBlank(higherOrgOpinion)) {
if (SealTemplate.CITY_TEMPLATE.equals(templateName) ||
SealTemplate.COUNTRY_TEMPLATE.equals(templateName)) {
//放到项目申报书字段
declaredProject.setProjectApplicationForm(BizUtils.buildFileJson(resultVo));
declaredProject.setUpdateOn(LocalDateTime.now());
} else if (SealTemplate.CONSTRUCT_TEMPLATE.equals(templateName)) {
declaredProject.setConstructFileId(resultVo.getId());
declaredProject.setConstructFileName(resultVo.getOriginalFileName());
declaredProject.setUpdateOn(LocalDateTime.now());
}
projectService.updateById(declaredProject);
}
try {
if (null != htmlInputStream) {
htmlInputStream.close();
}

// 删除输出文件夹下的临时文件
java.io.File directory = new java.io.File("");
//pdf输出路径
String filePath = directory.getAbsolutePath() + java.io.File.separator + "fileout";
java.io.File directoryPath = new java.io.File(filePath);
FileUtils.cleanDirectory(directoryPath);
} catch (IOException e) {
log.error(e.getMessage());
}

// 返回文件id供前端下载
return resultVo.getId();
}

/**
* 装配pdf模板参数
*
* @param project
* @param templateName
* @return com.alibaba.fastjson.JSONObject
* @author CMM
* @since 2023/03/16 22:28
*/
private JSONObject assemblyPdfParams(Project project, String templateName) {
// 获取本地目录的pdf模板
String fileName;
if (templateName.contains(StrPool.DASH)) {
int index = templateName.indexOf(StrPool.DASH);
fileName = templateName.substring(index + 1);
} else {
fileName = templateName;
}
Long projectId = project.getId();
// 获取表单数据
PdfGenerateDTO pdfGenerateDTO = new PdfGenerateDTO();
BeanUtils.copyProperties(project, pdfGenerateDTO);

JSONObject paramsMap = JSONObject.parseObject(JSONObject.toJSONString(pdfGenerateDTO));
// 设置title
String title = "【" + project.getProjectName() + "】" + fileName;
paramsMap.put("title", title);
// 获取预审申报的开始时间
ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class)
.eq(ProjectInst::getProjectId, projectId)
.eq(ProjectInst::getInstType, InstTypeEnum.PRELIMINARY_PREVIEW.getCode())
.orderByDesc(ProjectInst::getCreateOn)
.last("limit 1"));
LocalDateTime time;
if (Objects.nonNull(projectInst)) {
time = projectInst.getCreateOn();
paramsMap.put("time", NdDateUtils.format(time, "yyyy-MM-dd HH:mm"));
} else {
paramsMap.put("time", null);
}
// 获取是否临时增补项目
String isTemporaryAugment = IsOrNotEnum.getDescByCode(project.getIsTemporaryAugment());
paramsMap.put("isTemporaryAugment", isTemporaryAugment);
// 获取项目类型
String projectType = project.getProjectType();
paramsMap.put("projectType", ProjectTypeNewEnum.getDesc(projectType));
// 获取是否首次新建
String isFirst = IsOrNotEnum.getDescByCode(project.getIsFirst());
paramsMap.put("isFirst", isFirst);
// 获取是否一地创新全省共享项目
Boolean isInnovateWholeProvinceShare = project.getIsInnovateWholeProvinceShare();
paramsMap.put("isInnovateWholeProvinceShare", Boolean.TRUE.equals(isInnovateWholeProvinceShare) ?
IsOrNotEnum.IS.getDesc() : IsOrNotEnum.NOT.getDesc());
// 获取项目建设起始时间
String beginTime = project.getBeginTime();
String endTime = project.getEndTime();
String beginAndEndTime = beginTime + StrUtil.DASHED + endTime;
paramsMap.put("beginAndEndTime", beginAndEndTime);
// 获取四大体系
String fourSystem = FourSystemEnum.getDescByCode(project.getFourSystems());
paramsMap.put("fourSystems", fourSystem);
// 获取是否数字化改革项目
String isDigitalReform = IsOrNotEnum.getDescByCode(project.getIsDigitalReform());
paramsMap.put("isDigitalReform", isDigitalReform);
if (IsOrNotEnum.NOT.getDesc().equals(isDigitalReform)) {
paramsMap.put("bizDomain", null);
} else {
paramsMap.put("bizDomain", BizDomainEnum.getDescByCode(project.getBizDomain()));
}
// 获取是否上云
String isCloud = IsOrNotEnum.getDescByCode(project.getIsCloud());
paramsMap.put("isCloud", isCloud);
if (IsOrNotEnum.NOT.getDesc().equals(isCloud)) {
paramsMap.put("cloudType", null);
} else {
String cloudType = project.getCloudType();
String cloudTypeName;
// 云类型为多选
if (cloudType.contains(StrPool.COMMA)) {
cloudTypeName = Arrays.stream(cloudType.split(StrPool.COMMA))
.map(s -> CloudTypeEnum.getDescByCode(Integer.valueOf(s)))
.collect(Collectors.joining(StrPool.COMMA));

} else {
cloudTypeName = CloudTypeEnum.getDescByCode(Integer.valueOf(cloudType));
}
paramsMap.put("cloudType", cloudTypeName);
}
// 获取本年计划投资金额
// BigDecimal yearPlanInvest = project.getAnnualPlanAmount();
paramsMap.put("yearPlanInvest", BigDecimal.ZERO);
// 根据地区编码获取当地大数据局(中心)的名称
paramsMap.put("bigDataBureauName", null);
// 备注模块如果为空
if (Objects.isNull(pdfGenerateDTO.getProjectRemarks())) {
paramsMap.put("projectRemarks", null);
}

// 获取立项依据
String buildBasis = project.getBuildBasis();
StringBuilder builder = new StringBuilder();
List<JSONObject> fileArray = JSON.parseArray(buildBasis, JSONObject.class);
for (JSONObject jsonObject : fileArray) {
String titleStr = jsonObject.getString(CommonConst.TITLE);
builder.append(CommonConst.ITEM_BASED);
builder.append(titleStr);
builder.append(StrPool.SPACE);
String fileNameStr = jsonObject.getString(CommonConst.FILE_NAME_STR);
builder.append(CommonConst.ITEM_BASED_FILE_NAME);
builder.append(fileNameStr);
builder.append(StrPool.SPACE);
String fileInfo = jsonObject.getString(CommonConst.FILE_LIST);
List<JSONObject> fileInfoArray = JSON.parseArray(fileInfo, JSONObject.class);
List<String> nameList = CollUtils.fieldList(fileInfoArray, w -> w.getString(CommonConst.FILE_NAME));
String appendixStr = String.join(StrPool.COMMA, nameList);
builder.append(CommonConst.APPENDIX);
builder.append(appendixStr);
builder.append(StrPool.SEMICOLON);
builder.append(StrPool.NEWLINE);
}
String buildBasisList = builder.toString();
paramsMap.put("buildBasisList", buildBasisList);

return paramsMap;
}

public Long getSealedPdf(SealInfoDTO req) {
Long projectId = req.getProjectId();
Long notSealedFileId = req.getNotSealedFileId();


+ 0
- 119
hz-pm-api/src/main/java/com/hz/pm/api/todocenter/utils/PdfUtil.java Переглянути файл

@@ -1,119 +0,0 @@
package com.hz.pm.api.todocenter.utils;


import com.itextpdf.text.DocumentException;
import com.itextpdf.text.pdf.BaseFont;
import com.ningdatech.basic.exception.BizException;
import lombok.extern.slf4j.Slf4j;
import org.xhtmlrenderer.pdf.ITextFontResolver;
import org.xhtmlrenderer.pdf.ITextRenderer;

import java.io.*;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Map;
import java.util.Optional;
import java.util.UUID;

/**
* pdf生成工具类
*
* @author CMM
* @since 2023/03/13 17:01
*/
@Slf4j
public class PdfUtil {

private PdfUtil() {
}

/**
* 生成PDF文件
*
* @return int
* @author CMM
* @since 2023/03/13 17:07
*/
public static byte[] generatePdf(InputStream templateHtmlInputStream, Map<String, Object> paramsMap) {
try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(templateHtmlInputStream, StandardCharsets.UTF_8))) {
// 字体格式
String fontPath = "font" + File.separator + "simsun.ttc";
StringBuilder stringBuilder = new StringBuilder();
bufferedReader.lines().forEach(stringBuilder::append);
String htmlInfo = stringBuilder.toString();

// 替换参数、多个参数多次替换
for (Map.Entry<String, Object> entry : paramsMap.entrySet()) {
String value = Optional.ofNullable(entry.getValue())
.map(Object::toString)
.orElse("");
htmlInfo = htmlInfo.replace("#" + entry.getKey() + "#", value);
}

// 生成临时文件
String htmlFileName = UUID.randomUUID().toString().replace("-", "") + ".html";
String htmlFilePath = "fileout" + File.separator + htmlFileName;
File file = new File(htmlFilePath);
try (FileOutputStream fop = new FileOutputStream(file)) {
byte[] contentInBytes = htmlInfo.getBytes();
fop.write(contentInBytes);
} catch (IOException e) {
throw BizException.wrap("生成html文件失败!" + e.getMessage());
}

// 生成pdf
String pdfFileName = UUID.randomUUID().toString().replace("-", "") + ".pdf";
String pdfFilePath = "fileout" + File.separator + pdfFileName;
String url = new File(htmlFilePath).toURI().toURL().toString();
try (OutputStream os = Files.newOutputStream(Paths.get(pdfFilePath))) {
ITextRenderer renderer = new ITextRenderer();
renderer.setDocument(url);
ITextFontResolver fontResolver = renderer.getFontResolver();
fontResolver.addFont(fontPath, BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
renderer.layout();
renderer.createPDF(os);
} catch (IOException | DocumentException e) {
throw BizException.wrap("生成pdf文件失败!" + e.getMessage());
}

// 返回生成的pdf文件字节数组
try (FileInputStream inputStream = new FileInputStream(pdfFilePath)) {
return readBytes(inputStream);
} catch (IOException e) {
throw BizException.wrap("读取pdf文件失败!" + e.getMessage());
}
} catch (IOException e) {
throw BizException.wrap("读取模板html文件失败!" + e.getMessage());
}
}


/**
* 读取输入流到字节数组
*
* @param in
* @return
* @throws IOException
*/
private static byte[] readBytes(InputStream in) throws IOException {
//读取字节的缓冲
byte[] buffer = new byte[1024];
//最终的数据
byte[] result = new byte[0];
int size;
while ((size = in.read(buffer)) != -1) {
int oldLen = result.length;
byte[] tmp = new byte[oldLen + size];
if (oldLen > 0) {
//copy 旧字节
System.arraycopy(result, 0, tmp, 0, oldLen);
}
//copy 新字节
System.arraycopy(buffer, 0, tmp, oldLen, size);
result = tmp;
}
return result;
}

}

BIN
hz-pm-api/src/main/resources/template/simsun.ttc Переглянути файл


+ 0
- 290
hz-pm-api/src/main/resources/template/区县-预审申请单.html Переглянути файл

@@ -1,290 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:font-family="http://www.w3.org/1999/xhtml"
>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
html,
body,p {
padding: 0;
margin: 0;
font-family: SimSun;
}
.pdf {
margin: 0 auto;
padding: 10px 0 30px;
text-align: center;
}
.title {
padding: 0 0 20px 0;
font-size: 34px;
margin: 0;
font-family: SimSun;
word-break: break-all;
white-space: pre-wrap;
width: 100%;
}
.tab {
padding: 0 20px;
}
.projectId {
color: #999999;
text-align: left;
margin-bottom: 8px;
margin-top: 0;
}
.projectId > .time {
float: right;
}

table {
width: 100%;
border-collapse: collapse;
font-size: 16px;
table-layout: fixed;
word-break: break-all;
word-wrap: break-word;
text-align: left;
}
td {
padding: 15px 8px;
border: 1px solid;
}
.tabTit {
background-color: #eee;
}
.label {
width: 150px;
}
.sealTd {
height: 200px;
position: relative;
}
.seal {
position: absolute;
right: 20px;
bottom: 30px;
width: 150px;
}
.seal > .time {
text-align: right;
}
.content {
height: 210px;
}
.textDiv{
display: flex;
align-items: center;
height: 100%;
position: relative;
}
.textDiv > .right {
position: absolute;
bottom: 4px;
right: 4px;
}
.h-80{
height: 80px;
}
.h-100{
height: 100px;
}
.h-400{
height: 400px;
}
.h-1200{
height: 1200px;
}
</style>
</head>
<body>
<div class="pdf">
<p class="title">#title#</p>
<div class="tab">
<p class="projectId">
<span>
项目编号:
<span>#projectCode#</span>
</span>
<span class="time">#time#</span>
</p>
<table>
<tbody>
<tr>
<td class="tabTit" colspan="4">项目基本信息</td>
</tr>
<tr class="h-80">
<td class="label">项目名称</td>
<td colspan="3" align="center">#projectName#</td>
</tr>
<tr class="h-80">
<td class="label">是否临时增补</td>
<td align="center">#isTemporaryAugment#</td>
<td class="label">是否一地创新全省共享项目</td>
<td align="center">#isInnovateWholeProvinceShare#</td>
</tr>
<tr class="h-80">
<td class="label">项目负责人</td>
<td align="center">#responsibleMan#</td>
<td class="label">负责人手机号</td>
<td align="center">#responsibleManMobile#</td>
</tr>
<tr class="h-80">
<td class="label">项目联系人</td>
<td align="center">#contactName#</td>
<td class="label">项目联系人手机号</td>
<td align="center">#contactPhone#</td>
</tr>
<tr class="h-80">
<td class="label">建设单位</td>
<td align="center">#buildOrgName#</td>
<td class="label">建设单位统一社会信用代码</td>
<td align="center">#orgCreditCode#</td>
</tr>
<tr class="h-80">
<td class="label">项目类型</td>
<td align="center">#projectType#</td>
<td class="label">是否首次新建</td>
<td align="center">#isFirst#</td>
</tr>
<tr class="h-80">
<td class="label">预算年度</td>
<td align="center">#projectYear#</td>
<td class="label">建设起止时间</td>
<td align="center">#beginAndEndTime#</td>
</tr>
<tr class="h-80">
<td class="label">四大体系</td>
<td colspan="3" align="center">#fourSystems#</td>
</tr>
<tr class="h-80">
<td class="label">是否数字化改革项目</td>
<td align="center">#isDigitalReform#</td>
<td class="label">综合业务领域</td>
<td align="center">#bizDomain#</td>
</tr>
<tr class="h-400">
<td class="label">立项依据</td>
<td colspan="3" align="center">#buildBasisList#</td>
</tr>
<tr class="h-100">
<td class="label">是否上云</td>
<td align="center">#isCloud#</td>
<td class="label">云类型</td>
<td align="center">#cloudType#</td>
</tr>
<tr>
<td class="label">项目简介</td>
<td colspan="3" align="center">
<p class="h-1200">#projectIntroduction#</p>
</td>
</tr>
<tr>
<td class="tabTit" colspan="4">资金申报情况</td>
</tr>
<tr class="h-80">
<td class="label">申报金额</td>
<td colspan="3" align="center">#declareAmount#</td>
</tr>
<tr class="h-80">
<td class="label">自有资金</td>
<td align="center">#declareHaveAmount#</td>
<td class="label">政府投资-本级财政资金</td>
<td align="center">#declareGovOwnFinanceAmount#</td>
</tr>
<tr class="h-80">
<td class="label">政府投资-上级补助资金</td>
<td align="center">#declareGovSuperiorFinanceAmount#</td>
<td class="label">银行贷款</td>
<td align="center">#declareBankLendingAmount#</td>
</tr>
<tr class="h-80">
<td class="label">其他资金</td>
<td colspan="3" align="center">#declareOtherAmount#</td>
</tr>
<tr class="h-80">
<td class="label">本年计划投资(万元)</td>
<td colspan="3" align="center">#yearPlanInvest#</td>
</tr>
<tr>
<td class="tabTit" colspan="4">资金分配情况</td>
</tr>
<tr class="h-80">
<td class="label">软件开发</td>
<td align="center">#softwareDevelopmentAmount#</td>
<td class="label">云资源、硬件购置</td>
<td align="center">#cloudHardwarePurchaseAmount#</td>
</tr>
<tr class="h-80">
<td class="label">第三方服务</td>
<td colspan="3" align="center">#thirdPartyAmount#</td>
</tr>
<tr>
<td class="tabTit" colspan="4">年度支付计划</td>
</tr>
<tr class="h-80">
<td class="label">年度支付金额</td>
<td colspan="3" align="center">#annualPlanAmount#</td>
</tr>
<tr class="h-80">
<td class="label">自有资金</td>
<td align="center">#annualPlanHaveAmount#</td>
<td class="label">政府投资-本级财政资金</td>
<td align="center">#annualPlanGovOwnFinanceAmount#</td>
</tr>
<tr class="h-80">
<td class="label">政府投资-上级补助资金</td>
<td align="center">#annualPlanGovSuperiorFinanceAmount#</td>
<td class="label">银行贷款</td>
<td align="center">#annualPlanBankLendingAmount#</td>
</tr>
<tr class="h-80">
<td class="label">其他资金</td>
<td colspan="3" align="center">#annualPlanOtherAmount#</td>
</tr>
<tr>
<td class="tabTit" colspan="4">备注</td>
</tr>
<tr>
<td class="label">备注</td>
<td colspan="3" align="center"><p class="h-1200">#projectRemarks#</p></td>
</tr>
<tr>
<td class="tabTit" colspan="4">单位意见</td>
</tr>
<tr>
<td class="label">本级主管单位意见(盖章)</td>
<td colspan="3" class="text content">
<div class="textDiv">
<div class="left">
<span>#superOrgOpinion#</span>
</div>
<div class="right">
<span>#superOrgAuditDate#</span>
</div>
</div>
</td>
</tr>
<tr>
<td class="label">上级主管单位意见(盖章)</td>
<td colspan="3" class="text content">
<div class="textDiv">
<div class="left">
<span>#higherOrgOpinion#</span>
</div>
<div class="right">
<span>#higherOrgAuditDate#</span>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>

+ 0
- 282
hz-pm-api/src/main/resources/template/市级-预审申请单.html Переглянути файл

@@ -1,282 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:font-family="http://www.w3.org/1999/xhtml"
>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
html,
body,p {
padding: 0;
margin: 0;
font-family: SimSun;
}
.pdf {
margin: 0 auto;
padding: 10px 0 30px;
text-align: center;
}
.title {
padding: 0 10px 20px 10px;
font-size: 34px;
margin: 0;
font-family: SimSun;
word-break: break-all;
white-space: pre-wrap;
width: 100%;
}
.tit {
word-break: break-all;
}
.tab {
padding: 0 20px;
}
.projectId {
color: #999999;
text-align: left;
margin-bottom: 8px;
margin-top: 0;
}
.projectId > .time {
float: right;
}

table {
width: 100%;
border-collapse: collapse;
font-size: 16px;
table-layout: fixed;
word-break: break-all;
word-wrap: break-word;
text-align: left;
}
td {
padding: 15px 8px;
border: 1px solid;
}
.tabTit {
background-color: #eee;
}
.label {
width: 150px;
}
.sealTd {
height: 200px;
position: relative;
}
.seal {
position: absolute;
right: 20px;
bottom: 30px;
width: 150px;
}
.seal > .time {
text-align: right;
}
.content {
height: 210px;
}
.textDiv{
display: flex;
align-items: center;
height: 100%;
position: relative;
}
.textDiv > .right {
position: absolute;
bottom: 4px;
right: 4px;
}
.h-80{
height: 80px;
}
.h-100{
height: 100px;
}
.h-400{
height: 400px;
}
.h-1200{
height: 1200px;
}
</style>
</head>
<body>
<div class="pdf">
<p class="title">
<span class="tit">#title#</span>
</p>
<div class="tab">
<p class="projectId">
<span>
项目编号:
<span>#projectCode#</span>
</span>
<span class="time">#time#</span>
</p>
<table>
<tbody>
<tr>
<td class="tabTit" colspan="4">项目基本信息</td>
</tr>
<tr class="h-80">
<td class="label">项目名称</td>
<td colspan="3" align="center">#projectName#</td>
</tr>
<tr class="h-80">
<td class="label">是否临时增补</td>
<td align="center">#isTemporaryAugment#</td>
<td class="label">是否一地创新全省共享项目</td>
<td align="center">#isInnovateWholeProvinceShare#</td>
</tr>
<tr class="h-80">
<td class="label">项目负责人</td>
<td align="center">#responsibleMan#</td>
<td class="label">负责人手机号</td>
<td align="center">#responsibleManMobile#</td>
</tr>
<tr class="h-80">
<td class="label">项目联系人</td>
<td align="center">#contactName#</td>
<td class="label">项目联系人手机号</td>
<td align="center">#contactPhone#</td>
</tr>
<tr class="h-80">
<td class="label">建设单位</td>
<td align="center">#buildOrgName#</td>
<td class="label">建设单位统一社会信用代码</td>
<td align="center">#orgCreditCode#</td>
</tr>
<tr class="h-80">
<td class="label">项目类型</td>
<td align="center">#projectType#</td>
<td class="label">是否首次新建</td>
<td align="center">#isFirst#</td>
</tr>
<tr class="h-80">
<td class="label">预算年度</td>
<td align="center">#projectYear#</td>
<td class="label">建设起止时间</td>
<td align="center">#beginAndEndTime#</td>
</tr>
<tr class="h-80">
<td class="label">四大体系</td>
<td colspan="3" align="center">#fourSystems#</td>
</tr>
<tr class="h-80">
<td class="label">是否数字化改革项目</td>
<td align="center">#isDigitalReform#</td>
<td class="label">综合业务领域</td>
<td align="center">#bizDomain#</td>
</tr>
<tr class="h-400">
<td class="label">立项依据</td>
<td colspan="3" align="center">#buildBasisList#</td>
</tr>
<tr class="h-100">
<td class="label">是否上云</td>
<td align="center">#isCloud#</td>
<td class="label">云类型</td>
<td align="center">#cloudType#</td>
</tr>
<tr>
<td class="label">项目简介</td>
<td colspan="3" align="center">
<p class="h-1200">#projectIntroduction#</p>
</td>
</tr>
<tr>
<td class="tabTit" colspan="4">资金申报情况</td>
</tr>
<tr class="h-80">
<td class="label">申报金额</td>
<td colspan="3" align="center">#declareAmount#</td>
</tr>
<tr class="h-80">
<td class="label">自有资金</td>
<td align="center">#declareHaveAmount#</td>
<td class="label">政府投资-本级财政资金</td>
<td align="center">#declareGovOwnFinanceAmount#</td>
</tr>
<tr class="h-80">
<td class="label">政府投资-上级补助资金</td>
<td align="center">#declareGovSuperiorFinanceAmount#</td>
<td class="label">银行贷款</td>
<td align="center">#declareBankLendingAmount#</td>
</tr>
<tr class="h-80">
<td class="label">其他资金</td>
<td colspan="3" align="center">#declareOtherAmount#</td>
</tr>
<tr class="h-80">
<td class="label">本年计划投资(万元)</td>
<td colspan="3" align="center">#yearPlanInvest#</td>
</tr>
<tr>
<td class="tabTit" colspan="4">资金分配情况</td>
</tr>
<tr class="h-80">
<td class="label">软件开发</td>
<td align="center">#softwareDevelopmentAmount#</td>
<td class="label">云资源、硬件购置</td>
<td align="center">#cloudHardwarePurchaseAmount#</td>
</tr>
<tr class="h-80">
<td class="label">第三方服务</td>
<td colspan="3" align="center">#thirdPartyAmount#</td>
</tr>
<tr>
<td class="tabTit" colspan="4">年度支付计划</td>
</tr>
<tr class="h-80">
<td class="label">年度支付金额</td>
<td colspan="3" align="center">#annualPlanAmount#</td>
</tr>
<tr class="h-80">
<td class="label">自有资金</td>
<td align="center">#annualPlanHaveAmount#</td>
<td class="label">政府投资-本级财政资金</td>
<td align="center">#annualPlanGovOwnFinanceAmount#</td>
</tr>
<tr class="h-80">
<td class="label">政府投资-上级补助资金</td>
<td align="center">#annualPlanGovSuperiorFinanceAmount#</td>
<td class="label">银行贷款</td>
<td align="center">#annualPlanBankLendingAmount#</td>
</tr>
<tr class="h-80">
<td class="label">其他资金</td>
<td colspan="3" align="center">#annualPlanOtherAmount#</td>
</tr>
<tr>
<td class="tabTit" colspan="4">备注</td>
</tr>
<tr>
<td class="label">备注</td>
<td colspan="3" align="center"><p class="h-1200">#projectRemarks#</p></td>
</tr>
<tr>
<td class="tabTit" colspan="4">单位意见</td>
</tr>
<tr>
<td class="label">本级主管单位意见(盖章)</td>
<td colspan="3" class="text content">
<div class="textDiv">
<div class="left">
<span>#superOrgOpinion#</span>
</div>
<div class="right">
<span>#superOrgAuditDate#</span>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>

+ 0
- 277
hz-pm-api/src/main/resources/template/建设方案申请单.html Переглянути файл

@@ -1,277 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:font-family="http://www.w3.org/1999/xhtml"
>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
html,
body,p {
padding: 0;
margin: 0;
font-family: SimSun;
}
.pdf {
margin: 0 auto;
padding: 10px 0 30px;
text-align: center;
}
.title {
padding: 0 0 20px 0;
font-size: 34px;
margin: 0;
font-family: SimSun;
word-break: break-all;
white-space: pre-wrap;
width: 100%;
}
.tab {
padding: 0 20px;
}
.projectId {
color: #999999;
text-align: left;
margin-bottom: 8px;
margin-top: 0;
}
.projectId > .time {
float: right;
}

table {
width: 100%;
border-collapse: collapse;
font-size: 16px;
table-layout: fixed;
word-break: break-all;
word-wrap: break-word;
text-align: left;
}
td {
padding: 15px 8px;
border: 1px solid;
}
.tabTit {
background-color: #eee;
}
.label {
width: 150px;
}
.sealTd {
height: 200px;
position: relative;
}
.seal {
position: absolute;
right: 20px;
bottom: 30px;
width: 150px;
}
.seal > .time {
text-align: right;
}
.content {
height: 210px;
}
.textDiv{
display: flex;
align-items: center;
height: 100%;
position: relative;
}
.textDiv > .right {
position: absolute;
bottom: 4px;
right: 4px;
}
.h-80{
height: 80px;
}
.h-100{
height: 100px;
}
.h-400{
height: 400px;
}
.h-1200{
height: 1200px;
}
</style>
</head>
<body>
<div class="pdf">
<p class="title">#title#</p>
<div class="tab">
<p class="projectId">
<span>
项目编号:
<span>#projectCode#</span>
</span>
<span class="time">#time#</span>
</p>
<table>
<tbody>
<tr>
<td class="tabTit" colspan="4">项目基本信息</td>
</tr>
<tr class="h-80">
<td class="label">项目名称</td>
<td colspan="3" align="center">#projectName#</td>
</tr>
<tr class="h-80">
<td class="label">是否临时增补</td>
<td align="center">#isTemporaryAugment#</td>
<td class="label">是否一地创新全省共享项目</td>
<td align="center">#isInnovateWholeProvinceShare#</td>
</tr>
<tr class="h-80">
<td class="label">项目负责人</td>
<td align="center">#responsibleMan#</td>
<td class="label">负责人手机号</td>
<td align="center">#responsibleManMobile#</td>
</tr>
<tr class="h-80">
<td class="label">项目联系人</td>
<td align="center">#contactName#</td>
<td class="label">项目联系人手机号</td>
<td align="center">#contactPhone#</td>
</tr>
<tr class="h-80">
<td class="label">建设单位</td>
<td align="center">#buildOrgName#</td>
<td class="label">建设单位统一社会信用代码</td>
<td align="center">#orgCreditCode#</td>
</tr>
<tr class="h-80">
<td class="label">项目类型</td>
<td align="center">#projectType#</td>
<td class="label">是否首次新建</td>
<td align="center">#isFirst#</td>
</tr>
<tr class="h-80">
<td class="label">预算年度</td>
<td align="center">#projectYear#</td>
<td class="label">建设起止时间</td>
<td align="center">#beginAndEndTime#</td>
</tr>
<tr class="h-80">
<td class="label">四大体系</td>
<td colspan="3" align="center">#fourSystems#</td>
</tr>
<tr class="h-80">
<td class="label">是否数字化改革项目</td>
<td align="center">#isDigitalReform#</td>
<td class="label">综合业务领域</td>
<td align="center">#bizDomain#</td>
</tr>
<tr class="h-400">
<td class="label">立项依据</td>
<td colspan="3" align="center">#buildBasisList#</td>
</tr>
<tr class="h-100">
<td class="label">是否上云</td>
<td align="center">#isCloud#</td>
<td class="label">云类型</td>
<td align="center">#cloudType#</td>
</tr>
<tr>
<td class="label">项目简介</td>
<td colspan="3" align="center">
<p class="h-1200">#projectIntroduction#</p>
</td>
</tr>
<tr>
<td class="tabTit" colspan="4">资金申报情况</td>
</tr>
<tr class="h-80">
<td class="label">申报金额</td>
<td colspan="3" align="center">#declareAmount#</td>
</tr>
<tr class="h-80">
<td class="label">自有资金</td>
<td align="center">#declareHaveAmount#</td>
<td class="label">政府投资-本级财政资金</td>
<td align="center">#declareGovOwnFinanceAmount#</td>
</tr>
<tr class="h-80">
<td class="label">政府投资-上级补助资金</td>
<td align="center">#declareGovSuperiorFinanceAmount#</td>
<td class="label">银行贷款</td>
<td align="center">#declareBankLendingAmount#</td>
</tr>
<tr class="h-80">
<td class="label">其他资金</td>
<td colspan="3" align="center">#declareOtherAmount#</td>
</tr>
<tr class="h-80">
<td class="label">本年计划投资(万元)</td>
<td colspan="3" align="center">#yearPlanInvest#</td>
</tr>
<tr>
<td class="tabTit" colspan="4">资金分配情况</td>
</tr>
<tr class="h-80">
<td class="label">软件开发</td>
<td align="center">#softwareDevelopmentAmount#</td>
<td class="label">云资源、硬件购置</td>
<td align="center">#cloudHardwarePurchaseAmount#</td>
</tr>
<tr class="h-80">
<td class="label">第三方服务</td>
<td colspan="3" align="center">#thirdPartyAmount#</td>
</tr>
<tr>
<td class="tabTit" colspan="4">年度支付计划</td>
</tr>
<tr class="h-80">
<td class="label">年度支付金额</td>
<td colspan="3" align="center">#annualPlanAmount#</td>
</tr>
<tr class="h-80">
<td class="label">自有资金</td>
<td align="center">#annualPlanHaveAmount#</td>
<td class="label">政府投资-本级财政资金</td>
<td align="center">#annualPlanGovOwnFinanceAmount#</td>
</tr>
<tr class="h-80">
<td class="label">政府投资-上级补助资金</td>
<td align="center">#annualPlanGovSuperiorFinanceAmount#</td>
<td class="label">银行贷款</td>
<td align="center">#annualPlanBankLendingAmount#</td>
</tr>
<tr class="h-80">
<td class="label">其他资金</td>
<td colspan="3" align="center">#annualPlanOtherAmount#</td>
</tr>
<tr>
<td class="tabTit" colspan="4">备注</td>
</tr>
<tr>
<td class="label">备注</td>
<td colspan="3" align="center"><p class="h-1200">#projectRemarks#</p></td>
</tr>
<tr>
<td class="tabTit" colspan="4">单位意见</td>
</tr>
<tr>
<td class="label">大数据局主管单位意见(盖章)</td>
<td colspan="3" class="text content">
<div class="textDiv">
<div class="left">
<span>#bigDataBureauOpinion#</span>
</div>
<div class="right">
<span>#bigDataBureauAuditDate#</span>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>

+ 0
- 35
pom.xml Переглянути файл

@@ -96,11 +96,6 @@
</dependency>
<dependency>
<groupId>com.ningdatech</groupId>
<artifactId>nd-zwdd-starter</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.ningdatech</groupId>
<artifactId>nd-cache-starter</artifactId>
<version>1.0.0</version>
</dependency>
@@ -125,34 +120,6 @@
<artifactId>spring-statemachine-core</artifactId>
<version>2.0.1.RELEASE</version>
</dependency>

<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.5.9</version>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itext-asian</artifactId>
<version>5.2.0</version>
</dependency>
<dependency>
<groupId>com.itextpdf.tool</groupId>
<artifactId>xmlworker</artifactId>
<version>5.5.9</version>
</dependency>
<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>flying-saucer-pdf-itext5</artifactId>
<version>9.0.3</version>
</dependency>
<!--将html转换成pdf-->
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>html2pdf</artifactId>
<version>2.0.2</version>
</dependency>
<!--导入导出-->
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-base</artifactId>
@@ -180,8 +147,6 @@
</snapshots>
</repository>
</repositories>


<pluginRepositories>
<!--阿里云代理Spring 插件仓库-->
<pluginRepository>


Завантаження…
Відмінити
Зберегти