From 2dd645b5346f510d1207346347f1fa70a204d9d3 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期四, 05 十一月 2026 16:11:34 +0800
Subject: [PATCH] 1. 完成项目管理全流程优化,补充阶段推进、汇报统计及生命周期记录。 2. 完成业务与项目数据关联,支持查看项目进度、详情及相关附件。 3. 完成采购审批流程接入,支持配置审批人员及采购业务审批。 4. 精简用户、角色、部门、菜单和字典,完善操作日志及附件下载。
---
src/main/java/com/ruoyi/basic/service/impl/CustomerFollowUpFileServiceImpl.java | 29 ++++++++++++++++++++++-------
1 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/src/main/java/com/ruoyi/basic/service/impl/CustomerFollowUpFileServiceImpl.java b/src/main/java/com/ruoyi/basic/service/impl/CustomerFollowUpFileServiceImpl.java
index e5f992f..cb915c4 100644
--- a/src/main/java/com/ruoyi/basic/service/impl/CustomerFollowUpFileServiceImpl.java
+++ b/src/main/java/com/ruoyi/basic/service/impl/CustomerFollowUpFileServiceImpl.java
@@ -1,13 +1,13 @@
package com.ruoyi.basic.service.impl;
import cn.hutool.core.collection.CollUtil;
-import cn.hutool.core.stream.CollectorUtil;
import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.google.common.collect.Lists;
import com.ruoyi.basic.mapper.CustomerFollowUpFileMapper;
import com.ruoyi.basic.pojo.CustomerFollowUpFile;
import com.ruoyi.basic.service.CustomerFollowUpFileService;
-import com.ruoyi.basic.service.CustomerFollowUpService;
import com.ruoyi.common.vo.SimpleFileVo;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
@@ -30,8 +30,7 @@
@RequiredArgsConstructor
public class CustomerFollowUpFileServiceImpl extends ServiceImpl<CustomerFollowUpFileMapper, CustomerFollowUpFile> implements CustomerFollowUpFileService {
- private final CustomerFollowUpService customerFollowUpService;
-
+ private final CustomerFollowUpFileMapper customerFollowUpFileMapper;
@Override
public <T> void fillAttachment(List<T> list, Function<T, String> getAttachmentIds, BiConsumer<T, List<SimpleFileVo>> setAttachmentList) {
@@ -45,8 +44,12 @@
.flatMap(s -> Arrays.stream(s.split(",")))
.map(Long::valueOf)
.collect(Collectors.toSet());
-
- List<CustomerFollowUpFile> followUpFilesByIds = customerFollowUpService.getFollowUpFilesByIds(ids);
+ List<CustomerFollowUpFile> followUpFilesByIds = new ArrayList<>();
+ Lists.partition(Lists.newArrayList(ids), 999).forEach(it -> {
+ followUpFilesByIds.addAll(
+ getFollowUpFilesByIds(it)
+ );
+ });
if (CollUtil.isEmpty(followUpFilesByIds)) {
return;
}
@@ -59,10 +62,22 @@
if (StrUtil.isNotBlank(attachmentIds)) {
List<SimpleFileVo> fileVos = Arrays.stream(attachmentIds.split(","))
.map(Long::valueOf)
- .map(it->collectMap.getOrDefault(it, (SimpleFileVo) Collections.emptyList()))
+ .map(it->collectMap.getOrDefault(it, null))
+ .filter(Objects::nonNull)
.collect(Collectors.toList());
setAttachmentList.accept(t, fileVos);
}
});
}
+
+ private List<CustomerFollowUpFile> getFollowUpFilesByIds(Collection<Long> fileIds) {
+ if (fileIds == null || fileIds.isEmpty()) {
+ return new ArrayList<>(0);
+ }
+
+ LambdaQueryWrapper<CustomerFollowUpFile> queryWrapper = new LambdaQueryWrapper<>();
+ queryWrapper.in(CustomerFollowUpFile::getId, fileIds)
+ .select(CustomerFollowUpFile::getId, CustomerFollowUpFile::getFileUrl, CustomerFollowUpFile::getFileName);
+ return customerFollowUpFileMapper.selectList(queryWrapper);
+ }
}
--
Gitblit v1.9.3