From 27f5356ba11e2400aac493502f1c5ba1fb47775b Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期二, 14 十月 2025 16:55:48 +0800
Subject: [PATCH] Merge branch 'master' of http://47.93.189.255:8099/r/archiveSystem
---
archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveCategoryServiceImpl.java | 39 ++++++++++++++++++++++++---------------
1 files changed, 24 insertions(+), 15 deletions(-)
diff --git a/archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveCategoryServiceImpl.java b/archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveCategoryServiceImpl.java
index da6f49e..dd324e4 100644
--- a/archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveCategoryServiceImpl.java
+++ b/archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveCategoryServiceImpl.java
@@ -16,6 +16,7 @@
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.MapUtils;
import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.domain.ArchiveCategory;
import com.ruoyi.domain.ArchiveRecords;
@@ -27,10 +28,11 @@
import com.ruoyi.service.IDocumentMaterialsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
/**
- * 銆愯濉啓鍔熻兘鍚嶇О銆慡ervice涓氬姟灞傚鐞�
+ * 銆愭鍗风被鍒俊鎭�慡ervice涓氬姟灞傚鐞�
*
* @author ruoyi
* @date 2025-07-26
@@ -46,20 +48,7 @@
LambdaQueryWrapper<ArchiveCategory> lqw = new LambdaQueryWrapper<>();
lqw.like(!StringUtils.isEmpty(archiveRecords.getNumb()), ArchiveCategory::getNumb, archiveRecords.getNumb())
.like(!StringUtils.isEmpty(archiveRecords.getNname()), ArchiveCategory::getNname, archiveRecords.getNname());
-// lqw.like(!StringUtils.isEmpty(archiveRecords.getProjectName()), ArchiveRecords::getProjectName, archiveRecords.getProjectName())
-// .like(!StringUtils.isEmpty(archiveRecords.getFilingNumber()), ArchiveRecords::getFilingNumber, archiveRecords.getFilingNumber())
-// .like(!StringUtils.isEmpty(archiveRecords.getArchiveRoomNumber()), ArchiveRecords::getArchiveRoomNumber, archiveRecords.getArchiveRoomNumber())
-// .like(!StringUtils.isEmpty(archiveRecords.getRecordId()), ArchiveRecords::getRecordId, archiveRecords.getRecordId());
-// // .like(!StringUtils.isEmpty(zfProperty.getLocation()), ZfProperty::getLocation, zfProperty.getLocation())
-// .like(!StringUtils.isEmpty(zfProperty.getHolder()), ZfProperty::getHolder, zfProperty.getHolder())
-// .like(!StringUtils.isEmpty(zfProperty.getAddress()), ZfProperty::getAddress, zfProperty.getAddress())
-// .like(!StringUtils.isEmpty(zfProperty.getRemark()), ZfProperty::getRemark, zfProperty.getRemark())
-// .eq(zfProperty.getFamilyId()!=null,ZfProperty::getFamilyId,zfProperty.getFamilyId())
-// .in(ZfProperty::getFamilyId,familyIdList)
-// .eq(zfProperty.getHappenTime()!=null,ZfProperty::getHappenTime,zfProperty.getHappenTime())
-// .between(zfProperty.getHappenStartTime() != null && zfProperty.getHappenEndTime() != null, ZfProperty::getHappenTime, zfProperty.getHappenStartTime(), zfProperty.getHappenEndTime());
-// lqw.orderByDesc(ZfProperty::getCreateTime);
- // lqw.orderByDesc(ArchiveRecords::isOwnData);
+
lqw.orderByDesc(ArchiveCategory::getCtime);
System.out.println("ssssssssssssddd0000000000000000");
return lqw;
@@ -190,5 +179,25 @@
return 0;
}
+ @Override
+ public AjaxResult importExcel(MultipartFile file) {
+ ExcelUtil<ArchiveCategory> util = new ExcelUtil<>(ArchiveCategory.class);
+ List<ArchiveCategory> dataList = null;
+ try {
+ dataList = util.importExcel(file.getInputStream());
+ } catch (Exception e) {
+ throw new RuntimeException("娌℃湁鎸夌収瑙勫垯瀵煎叆鏁版嵁");
+ }
+
+ assert dataList != null;
+
+ for (ArchiveCategory archiveCategory : dataList) {
+ // physcialService.mySave(physcial);
+ this.insertArchiveCategory(archiveCategory);
+ }
+
+ return AjaxResult.success();
+ }
+
}
--
Gitblit v1.9.1