From f5fec3e27510969ee9f2fc89d2e1e2868d25f1f1 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期三, 22 四月 2026 09:36:14 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_New_pro' into dev_New_pro

---
 src/main/java/com/ruoyi/inspectiontask/service/impl/QrCodeScanRecordServiceImpl.java |   60 +++++++++++++++++++++++++++++-------------------------------
 1 files changed, 29 insertions(+), 31 deletions(-)

diff --git a/src/main/java/com/ruoyi/inspectiontask/service/impl/QrCodeScanRecordServiceImpl.java b/src/main/java/com/ruoyi/inspectiontask/service/impl/QrCodeScanRecordServiceImpl.java
index 5ac3038..d43513a 100644
--- a/src/main/java/com/ruoyi/inspectiontask/service/impl/QrCodeScanRecordServiceImpl.java
+++ b/src/main/java/com/ruoyi/inspectiontask/service/impl/QrCodeScanRecordServiceImpl.java
@@ -5,13 +5,11 @@
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.basic.dto.StorageBlobDTO;
 import com.ruoyi.basic.mapper.StorageAttachmentMapper;
 import com.ruoyi.basic.mapper.StorageBlobMapper;
 import com.ruoyi.basic.pojo.StorageAttachment;
 import com.ruoyi.basic.pojo.StorageBlob;
 import com.ruoyi.basic.service.StorageAttachmentService;
-import com.ruoyi.common.constant.StorageAttachmentConstants;
 import com.ruoyi.common.utils.MinioUtils;
 import com.ruoyi.common.utils.bean.BeanUtils;
 import com.ruoyi.inspectiontask.dto.QrCodeScanRecordDto;
@@ -22,8 +20,6 @@
 import com.ruoyi.inspectiontask.service.QrCodeScanRecordService;
 import com.ruoyi.project.system.domain.SysUser;
 import com.ruoyi.project.system.mapper.SysUserMapper;
-import lombok.AllArgsConstructor;
-import lombok.Getter;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -130,23 +126,24 @@
                     });
 
             // 6.2 璁剧疆闄勪欢淇℃伅
-            dto.setStorageBlobDTO(
-                    Optional.ofNullable(attachmentsMap.get(record.getId()))
-                            .orElse(Collections.emptyList())
-                            .stream()
-                            .map(att -> {
-                                StorageBlobDTO blobDTO = new StorageBlobDTO();
-                                Optional.ofNullable(blobMap.get(att.getStorageBlobId()))
-                                        .ifPresent(blob -> {
-                                            BeanUtils.copyProperties(blob, blobDTO);
-                                            blobDTO.setUrl(minioUtils.getPreviewUrls(blob.getBucketFilename(), blob.getBucketName(), true));
-                                            blobDTO.setDownloadUrl(minioUtils.getDownloadUrls(blob.getBucketFilename(),blob.getBucketName(),blob.getOriginalFilename(),true));
-                                        });
-                                return blobDTO;
-                            })
-                            .filter(blobDTO -> blobDTO.getId() != null) // 杩囨护鏃犳晥闄勪欢
-                            .collect(Collectors.toList())
-            );
+            // todo fileChange
+//            dto.setStorageBlobDTO(
+//                    Optional.ofNullable(attachmentsMap.get(record.getId()))
+//                            .orElse(Collections.emptyList())
+//                            .stream()
+//                            .map(att -> {
+//                                StorageBlobDTO blobDTO = new StorageBlobDTO();
+//                                Optional.ofNullable(blobMap.get(att.getStorageBlobId()))
+//                                        .ifPresent(blob -> {
+//                                            BeanUtils.copyProperties(blob, blobDTO);
+//                                            blobDTO.setUrl(minioUtils.getPreviewUrls(blob.getBucketFilename(), blob.getBucketName(), true));
+//                                            blobDTO.setDownloadUrl(minioUtils.getDownloadUrls(blob.getBucketFilename(),blob.getBucketName(),blob.getOriginalFilename(),true));
+//                                        });
+//                                return blobDTO;
+//                            })
+//                            .filter(blobDTO -> blobDTO.getId() != null) // 杩囨护鏃犳晥闄勪欢
+//                            .collect(Collectors.toList())
+//            );
             return dto;
         }).collect(Collectors.toList());
 
@@ -169,18 +166,19 @@
             i = qrCodeScanRecordMapper.updateById(qrCodeScanRecord);
         }
 
-        if (qrCodeScanRecordDto.getStorageBlobDTO() != null && !qrCodeScanRecordDto.getStorageBlobDTO().isEmpty()) {
+        if (qrCodeScanRecordDto.getStorageBlobVO() != null && !qrCodeScanRecordDto.getStorageBlobVO().isEmpty()) {
             List<StorageAttachment> attachments = new ArrayList<>();
 
-            for (StorageBlobDTO storageBlobDTO : qrCodeScanRecordDto.getStorageBlobDTO()) {
-                StorageAttachment storageAttachment = new StorageAttachment(
-                        StorageAttachmentFile,
-                        (long) QrCodeScanRecords.ordinal(),
-                        qrCodeScanRecord.getId()
-                );
-                storageAttachment.setStorageBlobDTO(storageBlobDTO);
-                attachments.add(storageAttachment);
-            }
+            // todo fileChange
+//            for (StorageBlobDTO storageBlobDTO : qrCodeScanRecordDto.getStorageBlobDTO()) {
+//                StorageAttachment storageAttachment = new StorageAttachment(
+//                        StorageAttachmentFile,
+//                        (long) QrCodeScanRecords.ordinal(),
+//                        qrCodeScanRecord.getId()
+//                );
+//                storageAttachment.setStorageBlobDTO(storageBlobDTO);
+//                attachments.add(storageAttachment);
+//            }
             storageAttachmentService.saveStorageAttachment(attachments, qrCodeScanRecord.getId(), QrCodeScanRecords, StorageAttachmentFile);
         }
         return i;

--
Gitblit v1.9.3