From 675af262e4e511c9a240d9c1fa3332d1dc8d0c42 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期二, 13 一月 2026 13:15:37 +0800
Subject: [PATCH] 1.工时管理:辅助工时编辑后录入人姓名变成编辑人问题修复 2.外购下单:标签打印功能调整 3.人员:培训计划导入导出添加【培训大类】字段 4.业务管理:报检新增【物料属性】字段选择,其余页面添加【物料属性】查询条件以及数据回显
---
cnas-personnel/src/main/java/com/ruoyi/personnel/service/impl/PersonTrainingServiceImpl.java | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/cnas-personnel/src/main/java/com/ruoyi/personnel/service/impl/PersonTrainingServiceImpl.java b/cnas-personnel/src/main/java/com/ruoyi/personnel/service/impl/PersonTrainingServiceImpl.java
index 3463126..6a4bb62 100644
--- a/cnas-personnel/src/main/java/com/ruoyi/personnel/service/impl/PersonTrainingServiceImpl.java
+++ b/cnas-personnel/src/main/java/com/ruoyi/personnel/service/impl/PersonTrainingServiceImpl.java
@@ -11,6 +11,7 @@
import com.deepoove.poi.XWPFTemplate;
import com.deepoove.poi.config.Configure;
import com.deepoove.poi.data.Pictures;
+import com.ruoyi.common.constant.MenuJumpPathConstants;
import com.ruoyi.common.core.domain.entity.InformationNotification;
import com.ruoyi.common.core.domain.entity.User;
import com.ruoyi.common.utils.DateImageUtil;
@@ -61,7 +62,7 @@
* 鍩硅璁″垝 鏈嶅姟瀹炵幇绫�
* </p>
*
- * @author 鑺杞欢锛堟睙鑻忥級鏈夐檺鍏徃
+ * @author
* @since 2024-10-11 01:11:49
*/
@Service
@@ -118,7 +119,7 @@
info.setSenderId(userId);
// 鎺ユ敹浜�
info.setConsigneeId(training.getApproverId());
- info.setJumpPath("a6-personnel");
+ info.setJumpPath(MenuJumpPathConstants.PERSONNEL);
informationNotificationService.addInformationNotification(info);
// 鍙戦�佷紒涓氬井淇¢�氱煡
@@ -178,7 +179,7 @@
info.setSenderId(userId);
// 鎺ユ敹浜�
info.setConsigneeId(training.getApproverId());
- info.setJumpPath("a6-personnel");
+ info.setJumpPath(MenuJumpPathConstants.PERSONNEL);
informationNotificationService.addInformationNotification(info);
// 鍙戦�佷紒涓氬井淇¢�氱煡
@@ -287,6 +288,7 @@
template.write(os);
os.flush();
os.close();
+ inputStream.close();
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("瀵煎嚭澶辫触");
@@ -304,6 +306,10 @@
// 鏌ヨ浜哄憳鍩硅鏄庣粏
PersonTrainingDetailedDto detailedDto = personTrainingDetailedMapper.selectTrainingDetail(id);
+ // 鐢熸垚鍩硅鑰佸笀绛惧悕
+ detailedDto.setTrainingLecturerRender(StringUtils.isNotBlank(detailedDto.getTrainingLecturerSignatureUrl())
+ ? Pictures.ofLocal(imgUrl + "/" + detailedDto.getTrainingLecturerSignatureUrl()).create() : null);
+
// 鏌ヨ鍩硅鐨勪汉鍛�
List<PersonTrainingRecordDto> recordDtos = personTrainingRecordMapper.selectListByTrainingDetailedId(id);
@@ -314,13 +320,15 @@
for (PersonTrainingRecordDto recordDto : recordDtos) {
switch (count) {
case 0:
- exportDto.setUserName1(recordDto.getUserName());
+ exportDto.setUserNameRender1(StringUtils.isNotBlank(recordDto.getSignatureUrl())
+ ? Pictures.ofLocal(imgUrl + "/" + recordDto.getSignatureUrl()).create() : null);
exportDto.setDepartment1(recordDto.getDepartment());
exportDto.setExaminationResults1(recordDto.getExaminationResults());
count ++;
break;
case 1:
- exportDto.setUserName2(recordDto.getUserName());
+ exportDto.setUserNameRender2(StringUtils.isNotBlank(recordDto.getSignatureUrl())
+ ? Pictures.ofLocal(imgUrl + "/" + recordDto.getSignatureUrl()).create() : null);
exportDto.setDepartment2(recordDto.getDepartment());
exportDto.setExaminationResults2(recordDto.getExaminationResults());
exportDtoList.add(exportDto);
@@ -363,6 +371,7 @@
template.write(os);
os.flush();
os.close();
+ inputStream.close();
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("瀵煎嚭澶辫触");
--
Gitblit v1.9.3