From 5611b19e904ec0daa96ea5f648500cf6205c9385 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期一, 26 十月 2026 15:39:37 +0800
Subject: [PATCH] fix(hrm): 合并定位打卡与考勤状态功能

---
 yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/service/storage/SystemAgentImportBridgeService.java |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/service/storage/SystemAgentImportBridgeService.java b/yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/service/storage/SystemAgentImportBridgeService.java
index a1b00ef..3d7629d 100644
--- a/yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/service/storage/SystemAgentImportBridgeService.java
+++ b/yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/service/storage/SystemAgentImportBridgeService.java
@@ -75,6 +75,23 @@
                         "闄勪欢缁戝畾澶辫触锛岃閲嶆柊涓婁紶鍚庡啀璇�", true, null));
     }
 
+    /** 鍒犻櫎琛ュ綍闄勪欢鎵�灞炰細璇濓細闄勪欢鍏崇郴銆乥lob 璁板綍涓庣鐩樻枃浠朵竴骞舵竻鐞嗭紝闄勪欢涓嶅瓨鍦ㄦ椂骞傜瓑杩斿洖銆� */
+    @Transactional(rollbackFor = Exception.class)
+    public void deleteImportAttachment(Long attachmentId) {
+        SystemStorageAttachmentDO attachment = attachmentMapper.selectById(attachmentId);
+        if (attachment == null) {
+            return;
+        }
+        if (!RECORD_TYPE.equals(attachment.getRecordType())) {
+            throw new AgentBridgeException(HttpStatus.FORBIDDEN, "ATTACHMENT_FORBIDDEN", "闄勪欢涓嶅彲璁块棶");
+        }
+        Long sessionId = attachment.getRecordId();
+        requireOwnedSession(sessionId);
+        // 鎸変細璇濇暣鎵瑰垹闄わ紝鍚屼竴浼氳瘽鍐呰鏇挎崲鐨勬棫闄勪欢琛屼笌 blob 鏂囦欢閮戒笉浼氭畫鐣�
+        attachmentService.deleteAttachmentsByRecordTypeAndRecordId(RECORD_TYPE, sessionId);
+        sessionMapper.deleteById(sessionId);
+    }
+
     public SystemAgentAttachmentRef requireOwnedAttachmentRef(Long attachmentId) {
         SystemStorageAttachmentDO attachment = attachmentMapper.selectById(attachmentId);
         if (attachment == null) {

--
Gitblit v1.9.3