diff --git a/jeecg-module-system/jeecg-system-biz/pom.xml b/jeecg-module-system/jeecg-system-biz/pom.xml
index 0242e61..e8c973d 100644
--- a/jeecg-module-system/jeecg-system-biz/pom.xml
+++ b/jeecg-module-system/jeecg-system-biz/pom.xml
@@ -34,6 +34,12 @@
org.jeecgframework.jimureport
jimureport-spring-boot-starter
+
+
+ com.github.librepdf
+ openpdf
+
+
org.jeecgframework.jimureport
@@ -78,18 +84,18 @@
9.1.9
-
-
com.github.javen205
IJPay-WxPay
2.9.6
+
+
+ com.lowagie
+ itext
+ 2.0.8
+
diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/web/controller/ArtVolunteerController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/web/controller/ArtVolunteerController.java
index 11400ec..c60db77 100644
--- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/web/controller/ArtVolunteerController.java
+++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/web/controller/ArtVolunteerController.java
@@ -1,5 +1,6 @@
package org.jeecg.modules.web.controller;
+import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import io.swagger.annotations.Api;
@@ -16,6 +17,7 @@ import org.jeecg.modules.web.vo.SaveVolunteerVO;
import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.ISysUserService;
import org.jeecg.modules.yx.dto.VolunteerDTO;
+import org.jeecg.modules.yx.dto.VolunteerRecordDTO;
import org.jeecg.modules.yx.entity.YxUserScore;
import org.jeecg.modules.yx.entity.YxVolunteer;
import org.jeecg.modules.yx.entity.YxVolunteerRecord;
@@ -34,6 +36,7 @@ import java.io.IOException;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
+import java.util.stream.Collectors;
/**
* @Description: 填报志愿表
@@ -312,34 +315,50 @@ public class ArtVolunteerController {
@GetMapping(value = "/preview")
public void preview(@RequestParam(value = "id") String id, HttpServletResponse response) throws IOException {
- VolunteerDTO volunteerDTO = yxVolunteerService.findById(id);
- if (volunteerDTO == null) {
+// VolunteerDTO volunteerDTO = yxVolunteerService.findById(id);
+ YxVolunteer yxVolunteer = yxVolunteerService.getById(id);
+ AssertUtils.notNull(yxVolunteer,"请求参数有误");
+ if (yxVolunteer == null) {
response.setContentType("text/html;charset=utf-8");
response.getWriter().print("未找到志愿表!");
} else {
- String scoreId = volunteerDTO.getScoreId();
- YxUserScore yxUserScore = yxUserScoreService.findById(scoreId);
- Date date = new Date();
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
- // 构造freemarker模板引擎参数,listVars.size()个数对应pdf页数
+ YxUserScore userScore = yxUserScoreService.findById(yxVolunteer.getScoreId());
+ String professionalCategory = userScore.getProfessionalCategory();
+ // 获取专业列表
+ List volunteerRecordDTOList = yxVolunteerRecordService.listDTOByVolunteerIdS(id);
+// List volunteerRecordDTOList = yxVolunteerRecordService.listDTOByVolunteerId(id);
+ List benList = volunteerRecordDTOList.stream().filter(v -> v.getBatch().contains("本科")).collect(Collectors.toList());
+ List zhuanList = volunteerRecordDTOList.stream().filter(v -> v.getBatch().contains("高职高专")).collect(Collectors.toList());
+ List