updates 导出志愿单

This commit is contained in:
zhouwentao 2024-06-24 17:20:11 +08:00
parent e666b43778
commit 5fd0d310a6
16 changed files with 379 additions and 283 deletions

View File

@ -34,6 +34,12 @@
<dependency>
<groupId>org.jeecgframework.jimureport</groupId>
<artifactId>jimureport-spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>com.github.librepdf</groupId>
<artifactId>openpdf</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jeecgframework.jimureport</groupId>
@ -78,18 +84,18 @@
<version>9.1.9</version>
</dependency>
<!--微信支付-->
<!--<dependency>
<groupId>com.github.wechatpay-apiv3</groupId>
<artifactId>wechatpay-java</artifactId>
<version>0.2.11</version>
</dependency>-->
<!-- 微信支付 SDK -->
<dependency>
<groupId>com.github.javen205</groupId>
<artifactId>IJPay-WxPay</artifactId>
<version>2.9.6</version>
</dependency>
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>2.0.8</version>
</dependency>
</dependencies>
</project>

View File

@ -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<VolunteerRecordDTO> volunteerRecordDTOList = yxVolunteerRecordService.listDTOByVolunteerIdS(id);
// List<VolunteerRecordDTO> volunteerRecordDTOList = yxVolunteerRecordService.listDTOByVolunteerId(id);
List<VolunteerRecordDTO> benList = volunteerRecordDTOList.stream().filter(v -> v.getBatch().contains("本科")).collect(Collectors.toList());
List<VolunteerRecordDTO> zhuanList = volunteerRecordDTOList.stream().filter(v -> v.getBatch().contains("高职高专")).collect(Collectors.toList());
List<Map<String,Object>> batchList = new ArrayList<>();
Map<String,Object> batchMap = null;
if (CollectionUtil.isNotEmpty(benList)) {
batchMap = new LinkedHashMap<>();
if (professionalCategory.contains("体育")) {
batchMap.put("batch","体育类(本科批)");
}else{
batchMap.put("batch","艺术类(本科批)");
}
batchMap.put("volunteerList",benList);
batchList.add(batchMap);
}
if (CollectionUtil.isNotEmpty(zhuanList)) {
batchMap = new LinkedHashMap<>();
if (professionalCategory.contains("体育")) {
batchMap.put("batch","体育类(专科批)");
}else{
batchMap.put("batch","艺术类(专科批)");
}
batchMap.put("volunteerList",zhuanList);
batchList.add(batchMap);
}
List<Map<String, Object>> listVars = new ArrayList<>();
Map<String, Object> variables = new HashMap<>();
BigDecimal professionalScore = yxUserScore.getProfessionalScore();
BigDecimal culturalScore = yxUserScore.getCulturalScore();
variables.put("professionalScore", professionalScore);
variables.put("culturalScore", culturalScore);
//获取用户信息
SysUser sysUser = sysUserService.getById(yxUserScore.getCreateBy());
variables.put("userName", sysUser.getRealname());
String apply = "";
variables.put("nowDate", sdf.format(date));
variables.put("lastUpdateDate", sdf.format(volunteerDTO.getUpdateTime() == null ? volunteerDTO.getCreateTime() : volunteerDTO.getUpdateTime()));
variables.put("apply", apply);
variables.put("volunteer", volunteerDTO);
variables.put("professionalCategory",professionalCategory);
variables.put("batchList",batchList);
listVars.add(variables);
PdfUtil.preview(templateEngine, "preview.html", listVars, response);
PdfUtil.preview(templateEngine,"志愿单导出.pdf", "preview.html", listVars, response);
}
}
}

View File

@ -60,99 +60,6 @@ public class WebMajorController {
private IYxHistoryScoreControlLineService yxHistoryScoreControlLineService;
@GetMapping(value = "/recommendMajor/page")
public Result<?> recommendMajorPage(QueryRecommendMajorVO queryRecommendMajorVO) {
// Map<String, YxHistoryScoreControlLine> historyScoreControlLineMap = yxHistoryScoreControlLineService.allMaps();
//
// List<YxHistoryMajorEnroll> list = yxHistoryMajorEnrollService.list(new LambdaQueryWrapper<YxHistoryMajorEnroll>()
// .eq(YxHistoryMajorEnroll::getBatch,"高职高专")
// .eq(YxHistoryMajorEnroll::getYear, "2023")
// .eq(YxHistoryMajorEnroll::getRulesEnrollProbability, "文*0.5+专*1.25"));
// String year = "2023";
// String batch = "高职高专";
// String category = "";
// String key = "";
// YxHistoryScoreControlLine historyScoreControlLine = null;
// BigDecimal culturalScore = null;
// BigDecimal specialScore = null;
// BigDecimal wenhuaBili = null;
// BigDecimal zhuanyeBili = null;
// for (YxHistoryMajorEnroll yxHistoryMajorEnroll : list) {
// String majorType = yxHistoryMajorEnroll.getMajorType();
// category = yxHistoryMajorEnroll.getCategory();
// String mainSubjects = yxHistoryMajorEnroll.getMainSubjects();
// if(majorType.contains("美术")){
// yxHistoryMajorEnroll.setProbabilityOperator("文*0.067+专*0.167");
// }else if(majorType.contains("音乐")){
// yxHistoryMajorEnroll.setProbabilityOperator("文*0.067+专*0.25");
// }else if(majorType.contains("舞蹈")){
// yxHistoryMajorEnroll.setProbabilityOperator("文*0.067+专*0.25");
// }else if(majorType.contains("播音")){
// yxHistoryMajorEnroll.setProbabilityOperator("文*0.067+专*0.125");
// }else if(majorType.contains("表演")){
// yxHistoryMajorEnroll.setProbabilityOperator("文*0.067+专*0.25");
// }else if(majorType.contains("书法")){
// yxHistoryMajorEnroll.setProbabilityOperator("文*0.067+专*0.167");
// }
// String probabilityOperator = yxHistoryMajorEnroll.getProbabilityOperator();
// String rulesEnrollProbability = yxHistoryMajorEnroll.getRulesEnrollProbability();
// //省控线
// //美术与设计类文0.067 专0.167
// //音乐类文0.067 专0.25
// //舞蹈类文0.067 专0.25
// //播音与主持类文 0.067 专0.125
// //表演类文0.067 专0.25
// //书法类文0.067 专0.167
//
// //文科_本科A段_美术与设计_2023
// if ("舞蹈类".equals(majorType)) {
// if (mainSubjects.contains("艺术舞蹈")) {
// key = category + "_" + batch + "_" + "艺术舞蹈类" + "_" + year;
// } else if (mainSubjects.contains("国际标准")) {
// key = category + "_" + batch + "_" + "国际标准舞类" + "_" + year;
// }
// } else if(majorType.contains("体育")){
// if (batch.contains("专科") || batch.contains("高职高专")) {
// batch = "高职高专";
// }else{
// batch = "本科";
// }
// key = category + "_" + batch + "_" + majorType + "_" + year;
// } else {
// key = category + "_" + batch + "_" + majorType + "_" + year;
// }
// historyScoreControlLine = historyScoreControlLineMap.get(key);
// AssertUtils.notNull(historyScoreControlLine, String.format("行,未在系统中找到省控线"));
// culturalScore = historyScoreControlLine.getCulturalScore();
// specialScore = historyScoreControlLine.getSpecialScore();
// //换算分数
// String[] operators = probabilityOperator.split("\\+");
// for (String operator : operators) {
// if (operator.contains("")) {
// wenhuaBili = new BigDecimal(operator.split("\\*")[1]);
// }
// if (operator.contains("")) {
// zhuanyeBili = new BigDecimal(operator.split("\\*")[1]);
// }
// }
// if ("文过专排".equals(rulesEnrollProbability) || "文过专排主科".equals(rulesEnrollProbability)) {
// BigDecimal multiply = specialScore.multiply(zhuanyeBili);
// yxHistoryMajorEnroll.setControlLine(multiply);
// yxHistoryMajorEnroll.setRulesEnrollProbability("文过专排");
// } else if ("专过文排".equals(rulesEnrollProbability)) {
// BigDecimal multiply = culturalScore.multiply(wenhuaBili);
// yxHistoryMajorEnroll.setControlLine(multiply);
// yxHistoryMajorEnroll.setRulesEnrollProbability("专过文排");
// } else if ("其他计算办法".equals(rulesEnrollProbability)) {
// yxHistoryMajorEnroll.setRulesEnrollProbability("其他计算办法");
// } else {
// if (wenhuaBili == null || zhuanyeBili == null) {
// wenhuaBili = YxConstant.bigDecimal100;
// zhuanyeBili = YxConstant.bigDecimal100;
// }
// yxHistoryMajorEnroll.setControlLine((culturalScore.multiply(wenhuaBili)).add((specialScore.multiply(zhuanyeBili))));
// yxHistoryMajorEnroll.setRulesEnrollProbability(probabilityOperator);
// }
// }
// yxHistoryMajorEnrollService.updateBatchById(list,300);
return Result.OK(yxCalculationMajorService.recommendMajorPage(queryRecommendMajorVO));
}

View File

@ -27,6 +27,7 @@ public class ArtRecommendMajorBaseDTO implements Serializable {
private Integer nan=0;//
private Integer allNumber=0;//全部数量
private List<String> haveMajorList = new ArrayList<>();
public ArtRecommendMajorBaseDTO() {
}

View File

@ -20,4 +20,6 @@ public interface YxVolunteerRecordMapper extends BaseMapper<YxVolunteerRecord> {
List<VolunteerRecordDTO> listDTOByVolunteerId(@Param("volunteerId") String volunteerId);
List<VolunteerRecordDTO> listDTOByVolunteerId2(@Param("scoreId")String scoreId, @Param("calutionTableName") String calculationTableName, @Param("volunteerId") String volunteerId);
List<VolunteerRecordDTO> listDTOByVolunteerIdS(@Param("volunteerId") String volunteerId);
}

View File

@ -171,25 +171,19 @@
AND(
<choose>
<when test="queryvo.pCategoryChildrenList.contains('音乐表演声乐')">
cm.main_subjects like '%声乐%'
<!--AND (
cm.major_type_child = '音乐表演'
(cm.main_subjects like '%声乐%' AND cm.major_type_child like '%音乐表演%')
<if test="queryvo.pCategoryChildrenList.contains('音乐教育')">
or cm.major_type_child = '音乐教育'
OR cm.major_type_child like '%音乐教育%'
</if>
)-->
</when>
<when test="queryvo.pCategoryChildrenList.contains('音乐表演器乐')">
cm.main_subjects like '%器乐%'
<!--AND (
cm.major_type_child = '音乐表演'
(cm.main_subjects like '%器乐%' AND cm.major_type_child like '%音乐表演%')
<if test="queryvo.pCategoryChildrenList.contains('音乐教育')">
or cm.major_type_child = '音乐教育'
OR cm.major_type_child like '%音乐教育%'
</if>
)-->
</when>
<when test="queryvo.pCategoryChildrenList.contains('音乐教育')">
cm.major_type_child = '音乐教育'
cm.major_type_child like '%音乐教育%'
</when>
</choose>
)

View File

@ -235,12 +235,6 @@
<if test="qvo.schoolName!=null and qvo.schoolName!=''">
AND (s.school_name like concat('%',#{qvo.schoolName},'%') or sc.school_code like concat('%',#{qvo.schoolName},'%'))
</if>
<!--<if test="qvo.province!=null and qvo.province!=''">
AND s.province like concat('%',#{qvo.province},'%')
</if>
<if test="qvo.institutionType!=null and qvo.institutionType!=''">
AND s.institution_type = #{qvo.institutionType}
</if>-->
<if test="qvo.schoolNatureList!=null and qvo.schoolNatureList.size>0">
AND s.school_nature in
<foreach collection="qvo.schoolNatureList" index="index" item="id" open="(" separator="," close=")">

View File

@ -112,4 +112,23 @@
group by vr.id
ORDER BY vr.indexs asc
</select>
<select id="listDTOByVolunteerIdS" resultType="org.jeecg.modules.yx.dto.VolunteerRecordDTO">
SELECT vr.id,
vr.indexs,
vr.major_code,
vr.school_code,
vr.enrollment_code,
vr.batch as batch,
sc.school_name,
sm.major_name,
sm.category
FROM yx_volunteer_record vr
LEFT JOIN yx_school_major sm ON sm.major_code = vr.major_code AND sm.school_code = vr.school_code AND sm.enrollment_code = vr.enrollment_code
LEFT JOIN yx_major m ON m.major_code = sm.major_code
LEFT JOIN (SELECT school_id,school_code,school_name FROM yx_school_child group by school_code) sc ON sc.school_code = sm.school_code
LEFT JOIN yx_school s ON s.id = sc.school_id
WHERE vr.volunteer_id = #{volunteerId}
group by vr.id
ORDER BY vr.indexs asc
</select>
</mapper>

View File

@ -34,4 +34,5 @@ public interface IYxVolunteerRecordService extends IService<YxVolunteerRecord> {
*/
boolean deleteByVolunteerId(String volunteerId);
List<VolunteerRecordDTO> listDTOByVolunteerIdS(String volunteerId);
}

View File

@ -176,6 +176,10 @@ public class YxCalculationMajorServiceImpl extends ServiceImpl<YxCalculationMajo
if (StringUtils.isNotBlank(rulesEnrollProbability)) {
queryRecommendMajorVO.setRulesEnrollProbabilityList(Arrays.asList(rulesEnrollProbability.split(",")));
}
//获取推荐志愿信息service
// List<String> haveMajorList = baseMapper.groupByBatchNumber(activeCurrentUserScore.getCalculationTableName(),queryRecommendMajorVO);
//获取推荐志愿信息service
List<RecommendMajorDTO> recommendMajorList = baseMapper.recommendMajorList(activeCurrentUserScore.getCalculationTableName(),queryRecommendMajorVO);
ArtRecommendMajorBaseDTO artRecommendMajorBaseDTO = this.checkLevelNum(recommendMajorList);
@ -231,6 +235,7 @@ public class YxCalculationMajorServiceImpl extends ServiceImpl<YxCalculationMajo
convertRecommendMajorListToNull(recommendMajorDTOList);
pageList.setRecords(recommendMajorDTOList);
artRecommendMajorBaseDTO.setPageList(pageList);
// artRecommendMajorBaseDTO.setHaveMajorList(haveMajorList);
return artRecommendMajorBaseDTO;
}

View File

@ -154,4 +154,9 @@ public class YxVolunteerRecordServiceImpl extends ServiceImpl<YxVolunteerRecordM
return this.remove(new LambdaQueryWrapper<YxVolunteerRecord>().eq(YxVolunteerRecord::getVolunteerId,volunteerId));
}
@Override
public List<VolunteerRecordDTO> listDTOByVolunteerIdS(String volunteerId) {
return baseMapper.listDTOByVolunteerIdS(volunteerId);
}
}

View File

@ -15,6 +15,7 @@ import javax.servlet.http.HttpServletResponse;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import java.io.*;
import java.net.URLEncoder;
import java.util.List;
import java.util.Map;
@ -129,8 +130,15 @@ public class PdfUtil {
* @param response HttpServletResponse
*
*/
public static void preview(TemplateEngine templateEngine, String templateName, List<Map<String, Object>> listVars, HttpServletResponse response) {
public static void preview(TemplateEngine templateEngine,String pdfFileName, String templateName, List<Map<String, Object>> listVars, HttpServletResponse response) {
response.setContentType("application/pdf");
String encodedFileName = null;
try {
encodedFileName = URLEncoder.encode(pdfFileName, "UTF-8");
response.setHeader("Content-Disposition", "attachment;filename*=UTF-8''" + encodedFileName);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
try (ServletOutputStream out = response.getOutputStream()) {
generateAll(templateEngine, templateName, out, listVars);
out.flush();
@ -138,4 +146,4 @@ public class PdfUtil {
log.error(e.getMessage(), e);
}
}
}
}

View File

@ -3,6 +3,9 @@
<head lang="en">
<title>打印志愿表</title>
<style>
*{
font-family: SimSun;
}
@page {
size: 210mm 297mm;
margin: 0.25in;
@ -23,12 +26,12 @@
}
body {
font-family: 'SimSun'
font-family: SimSun;
}
h2 {
text-align: center;
color: crimson
/*color: crimson;*/
}
h4 {
@ -36,28 +39,48 @@
}
table {
border-right: 1px solid #000000;
border-bottom: 1px solid #000000;
text-align: center;
border: 1px solid #000000;
border-collapse: collapse;
font-family: SimSun;
font-size: 0.8rem;
letter-spacing: 1px;
}
table thead{
background-color: #ec964d;
font-weight: 500;
}
table td{
border: 1px solid #000000;
}
table th {
border-left: 1px solid #000000;
border-top: 1px solid #000000;
}
table td {
border-left: 1px solid #000000;
border-top: 1px solid #000000;
}
.nowTime{
float: left;
}
.title{
text-align: center;
align-content: center;
}
.info-body{
.text-left{
text-align: left !important;
}
.text-right{
text-align: right !important;
}
.border-b{
border-bottom: 1px solid #000000;
}
.font-b{
font-weight: bold;
}
.pd-l-10{
padding-left: 10px;
}
.pd-r-10{
padding-right: 10px;
}
.mr-l-5{
margin-left: 5px;
}
.mr-r-5{
margin-right: 5px;
}
</style>
<!--<link href="../static/bootstrap5.2.3/bootstrap.min.css" rel="stylesheet">
@ -66,134 +89,46 @@
<body>
<!--顶部-->
<div class="header">
<span class="nowTime" th:text="${nowDate}"></span>
<div align="center">
<span class="title">打印志愿表</span>
<div class="title border-b" style="padding: 5px;">
<span>河南省2024年普通高校招生考生志愿草表</span>
</div>
</div>
<!--学生信息-->
<div class="container text-center">
<div class="row justify-content-start">
<div class="col-4">
<span th:text="${volunteer.volunteerName}"></span>
<div align="center" style="margin-top:32px">
<h2>河南省2024年普通高校招生考生志愿草表</h2>
</div>
<div th:each="item: ${batchList}">
<div align="center">
<h2 th:text="${item.batch}"></h2>
</div>
<div class="col-2">姓名:<span th:text="${userName}"></span></div>
<div class="col-3">文化成绩:<span th:text="${culturalScore}"></span></div>
<div class="col-3">统考成绩:<span th:text="${professionalScore}"></span></div>
<div class="col-3">最新修改时间:<span th:text="${lastUpdateDate}"></span></div>
</div>
<!--提前批-->
<div th:if="${volunteer.volunteerRecordEarlyAdmissionList!=null && volunteer.volunteerRecordEarlyAdmissionList.size()>0}">
<h3>提前批</h3>
<table align="center" cellspacing="0">
<thead>
<tr>
<td>序号</td>
<td>院校代码</td>
<td width="200" >院校名称</td>
<td>专业代码</td>
<td width="250" >专业名称</td>
</tr>
</thead>
<tbody>
<tr th:each="u,iterStat:${volunteer.volunteerRecordEarlyAdmissionList}">
<td th:text="${u.indexs}"></td>
<td th:text="${u.institutionCode}"></td>
<td>
<b th:text="${u.schoolName}"></b>
<!--<p>综合/公办/中国科学院/院校代码:1525 安徽/985/211/双一流/国家重点/强基计划</p>-->
</td>
<td th:text="${u.enrollmentCode}"></td>
<td th:text="${u.majorName}"></td>
<div align="center">
<table>
<thead>
<tr>
<td width="300">志愿名称</td>
<td width="200">代号</td>
<td width="600">名称</td>
</tr>
</tbody>
</table>
</div>
<!--本科A段-->
<div th:if="${volunteer.volunteerRecordUndergraduateAList!=null && volunteer.volunteerRecordUndergraduateAList.size()>0}">
<h3>本科A段</h3>
<table align="center" cellspacing="0">
<thead>
<tr>
<td>序号</td>
<td>院校代码</td>
<td width="200" >院校名称</td>
<td>专业代码</td>
<td width="250" >专业名称</td>
</tr>
</thead>
<tbody>
<tr th:each="u,iterStat:${volunteer.volunteerRecordUndergraduateAList}">
<td th:text="${u.indexs}"></td>
<td th:text="${u.institutionCode}"></td>
<td>
<b th:text="${u.schoolName}"></b>
<!--<p>综合/公办/中国科学院/院校代码:1525 安徽/985/211/双一流/国家重点/强基计划</p>-->
</td>
<td th:text="${u.enrollmentCode}"></td>
<td th:text="${u.majorName}"></td>
</tr>
</tbody>
</table>
</div>
<!--本科B段-->
<div th:if="${volunteer.volunteerRecordUndergraduateBList!=null && volunteer.volunteerRecordUndergraduateBList.size()>0}">
<h3>本科B段</h3>
<table align="center" cellspacing="0">
<thead>
<tr>
<td>序号</td>
<td>院校代码</td>
<td width="200" >院校名称</td>
<td>专业代码</td>
<td width="250" >专业名称</td>
</tr>
</thead>
<tbody>
<tr th:each="u,iterStat:${volunteer.volunteerRecordUndergraduateBList}">
<td th:text="${u.indexs}"></td>
<td th:text="${u.institutionCode}"></td>
<td>
<b th:text="${u.schoolName}"></b>
<!--<p>综合/公办/中国科学院/院校代码:1525 安徽/985/211/双一流/国家重点/强基计划</p>-->
</td>
<td th:text="${u.enrollmentCode}"></td>
<td th:text="${u.majorName}"></td>
</tr>
</tbody>
</table>
</div>
<!--高职高专-->
<div th:if="${volunteer.volunteerRecordJuniorCollegeList!=null && volunteer.volunteerRecordJuniorCollegeList.size()>0}">
<h3>高职高专</h3>
<table align="center" cellspacing="0">
<thead>
<tr>
<td>序号</td>
<td>院校代码</td>
<td width="200" >院校名称</td>
<td>专业代码</td>
<td width="250" >专业名称</td>
</tr>
</thead>
<tbody>
<tr th:each="u,iterStat:${volunteer.volunteerRecordUndergraduateBList}">
<td th:text="${u.indexs}"></td>
<td th:text="${u.institutionCode}"></td>
<td>
<b th:text="${u.schoolName}"></b>
<!--<p>综合/公办/中国科学院/院校代码:1525 安徽/985/211/双一流/国家重点/强基计划</p>-->
</td>
<td th:text="${u.enrollmentCode}"></td>
<td th:text="${u.majorName}"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="info-body">
<div align="center">
</thead>
<tbody>
<tr>
<td colspan="3" class="text-left pd-l-10">平行志愿</td>
</tr>
<th:block th:each="vo:${item.volunteerList}">
<tr>
<td class="text-right pd-r-10 font-b" th:style="'font-weight: bold;'">
<span class="mr-r-5 font-b" th:text="'平行志愿'+${vo.indexs}"></span><span class="font-b">院校</span>
</td>
<td th:text="${vo.schoolCode}"></td>
<td th:text="${vo.schoolName}"></td>
</tr>
<tr>
<td class="text-right pd-r-10">专业</td>
<td th:text="${vo.enrollmentCode}"></td>
<td th:text="${vo.majorName}"></td>
</tr>
</th:block>
</tbody>
</table>
</div>
</div>
</div>
</body>

View File

@ -0,0 +1,200 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head lang="en">
<title>打印志愿表</title>
<style>
@page {
size: 210mm 297mm;
margin: 0.25in;
padding: 1em;
@bottom-center {
font-family: SimSun;
font-size: 12px;
color: red;
};
@top-center {
content: element(header)
};
@bottom-right {
font-family: SimSun;
font-size: 12px;
color: #000;
};
}
body {
font-family: 'SimSun'
}
h2 {
text-align: center;
color: crimson
}
h4 {
text-align: center;
}
table {
border-right: 1px solid #000000;
border-bottom: 1px solid #000000;
text-align: center;
}
table th {
border-left: 1px solid #000000;
border-top: 1px solid #000000;
}
table td {
border-left: 1px solid #000000;
border-top: 1px solid #000000;
}
.nowTime{
float: left;
}
.title{
align-content: center;
}
.info-body{
}
</style>
<!--<link href="../static/bootstrap5.2.3/bootstrap.min.css" rel="stylesheet">
<script src="../static/bootstrap5.2.3/bootstrap.bundle.min.js" type="text/javascript"></script>-->
</head>
<body>
<!--顶部-->
<div class="header">
<span class="nowTime" th:text="${nowDate}"></span>
<div align="center">
<span class="title">打印志愿表</span>
</div>
</div>
<!--学生信息-->
<div class="container text-center">
<div class="row justify-content-start">
<div class="col-4">
<span th:text="${volunteer.volunteerName}"></span>
</div>
<div class="col-2">姓名:<span th:text="${userName}"></span></div>
<div class="col-3">文化成绩:<span th:text="${culturalScore}"></span></div>
<div class="col-3">统考成绩:<span th:text="${professionalScore}"></span></div>
<div class="col-3">最新修改时间:<span th:text="${lastUpdateDate}"></span></div>
</div>
<!--提前批-->
<div th:if="${volunteer.volunteerRecordEarlyAdmissionList!=null && volunteer.volunteerRecordEarlyAdmissionList.size()>0}">
<h3>提前批</h3>
<table align="center" cellspacing="0">
<thead>
<tr>
<td>序号</td>
<td>院校代码</td>
<td width="200" >院校名称</td>
<td>专业代码</td>
<td width="250" >专业名称</td>
</tr>
</thead>
<tbody>
<tr th:each="u,iterStat:${volunteer.volunteerRecordEarlyAdmissionList}">
<td th:text="${u.indexs}"></td>
<td th:text="${u.institutionCode}"></td>
<td>
<b th:text="${u.schoolName}"></b>
<!--<p>综合/公办/中国科学院/院校代码:1525 安徽/985/211/双一流/国家重点/强基计划</p>-->
</td>
<td th:text="${u.enrollmentCode}"></td>
<td th:text="${u.majorName}"></td>
</tr>
</tbody>
</table>
</div>
<!--本科A段-->
<div th:if="${volunteer.volunteerRecordUndergraduateAList!=null && volunteer.volunteerRecordUndergraduateAList.size()>0}">
<h3>本科A段</h3>
<table align="center" cellspacing="0">
<thead>
<tr>
<td>序号</td>
<td>院校代码</td>
<td width="200" >院校名称</td>
<td>专业代码</td>
<td width="250" >专业名称</td>
</tr>
</thead>
<tbody>
<tr th:each="u,iterStat:${volunteer.volunteerRecordUndergraduateAList}">
<td th:text="${u.indexs}"></td>
<td th:text="${u.institutionCode}"></td>
<td>
<b th:text="${u.schoolName}"></b>
<!--<p>综合/公办/中国科学院/院校代码:1525 安徽/985/211/双一流/国家重点/强基计划</p>-->
</td>
<td th:text="${u.enrollmentCode}"></td>
<td th:text="${u.majorName}"></td>
</tr>
</tbody>
</table>
</div>
<!--本科B段-->
<div th:if="${volunteer.volunteerRecordUndergraduateBList!=null && volunteer.volunteerRecordUndergraduateBList.size()>0}">
<h3>本科B段</h3>
<table align="center" cellspacing="0">
<thead>
<tr>
<td>序号</td>
<td>院校代码</td>
<td width="200" >院校名称</td>
<td>专业代码</td>
<td width="250" >专业名称</td>
</tr>
</thead>
<tbody>
<tr th:each="u,iterStat:${volunteer.volunteerRecordUndergraduateBList}">
<td th:text="${u.indexs}"></td>
<td th:text="${u.institutionCode}"></td>
<td>
<b th:text="${u.schoolName}"></b>
<!--<p>综合/公办/中国科学院/院校代码:1525 安徽/985/211/双一流/国家重点/强基计划</p>-->
</td>
<td th:text="${u.enrollmentCode}"></td>
<td th:text="${u.majorName}"></td>
</tr>
</tbody>
</table>
</div>
<!--高职高专-->
<div th:if="${volunteer.volunteerRecordJuniorCollegeList!=null && volunteer.volunteerRecordJuniorCollegeList.size()>0}">
<h3>高职高专</h3>
<table align="center" cellspacing="0">
<thead>
<tr>
<td>序号</td>
<td>院校代码</td>
<td width="200" >院校名称</td>
<td>专业代码</td>
<td width="250" >专业名称</td>
</tr>
</thead>
<tbody>
<tr th:each="u,iterStat:${volunteer.volunteerRecordUndergraduateBList}">
<td th:text="${u.indexs}"></td>
<td th:text="${u.institutionCode}"></td>
<td>
<b th:text="${u.schoolName}"></b>
<!--<p>综合/公办/中国科学院/院校代码:1525 安徽/985/211/双一流/国家重点/强基计划</p>-->
</td>
<td th:text="${u.enrollmentCode}"></td>
<td th:text="${u.majorName}"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="info-body">
<div align="center">
</div>
</div>
</body>
</html>