From c039cfb5c25922547b4889637432c4fe6d535178 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期三, 12 十一月 2025 11:59:29 +0800
Subject: [PATCH] 管理后台导出
---
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TOldsterWarningServiceImpl.java | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TOldsterWarningServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TOldsterWarningServiceImpl.java
index 7a6671e..140bee4 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TOldsterWarningServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TOldsterWarningServiceImpl.java
@@ -2,14 +2,20 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.basic.PageInfo;
+import com.ruoyi.system.export.TOldsterWarningExport;
import com.ruoyi.system.mapper.TOldsterWarningMapper;
import com.ruoyi.system.model.TAdvertisement;
+import com.ruoyi.system.model.TOldster;
import com.ruoyi.system.model.TOldsterWarning;
import com.ruoyi.system.query.OldsterListQuery;
+import com.ruoyi.system.query.TCourseOrderQuery;
import com.ruoyi.system.service.TOldsterWarningService;
+import com.ruoyi.system.utils.util.IDCardAgeCalculator;
import com.ruoyi.system.vo.TOldsterWarningVO;
import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+import java.util.ArrayList;
import java.util.List;
/**
@@ -27,7 +33,27 @@
public PageInfo<TOldsterWarningVO> pageList(OldsterListQuery query) {
PageInfo<TOldsterWarningVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize());
List<TOldsterWarningVO> list = this.baseMapper.pageList(query,pageInfo);
+ if(CollectionUtils.isEmpty(list)){
+ return pageInfo;
+ }
+ for (TOldsterWarningVO oldsterWarningVO : list) {
+ int age = IDCardAgeCalculator.calculateAge(oldsterWarningVO.getIdCard());
+ oldsterWarningVO.setOldsterAge(age);
+ }
pageInfo.setRecords(list);
return pageInfo;
}
+
+ @Override
+ public List<TOldsterWarningExport> exportOldsterWarning(TCourseOrderQuery query) {
+ List<TOldsterWarningExport> list = this.baseMapper.exportOldsterWarning(query);
+ if(CollectionUtils.isEmpty(list)){
+ return new ArrayList<>();
+ }
+ for (TOldsterWarningExport oldsterWarningExport : list) {
+ int age = IDCardAgeCalculator.calculateAge(oldsterWarningExport.getIdCard());
+ oldsterWarningExport.setOldsterAge(age);
+ }
+ return list;
+ }
}
--
Gitblit v1.7.1