From da00bc6ff72dc4259f2411ff96ee71d5756509b6 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期三, 25 十一月 2026 11:21:53 +0800
Subject: [PATCH] 修改了增值税城建税

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java |   33 ++++++++++++++++++++++++++++++++-
 1 files changed, 32 insertions(+), 1 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java
index 6f70343..a287a6b 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java
@@ -355,8 +355,37 @@
     @RepeatSubmit
     @Options(useGeneratedKeys = true, keyProperty = "id")
     public AjaxResult addOrUpdateNew(@RequestBody ServiceFundVO serviceFundVO) {
+        // 2026-11-23锛氬墧闄� blob:/data: 杩欑被娴忚鍣ㄤ复鏃堕檮浠跺湴鍧�锛岄伩鍏嶈惤搴撳悗鏃犳硶棰勮
+        int droppedAttach = sanitizeAttachments(serviceFundVO);
+        AjaxResult result = AjaxResult.success(serviceFundService.addOrUpdateNew(serviceFundVO));
+        if (droppedAttach > 0) {
+            result.put("attachWarn",
+                    "妫�娴嬪埌 " + droppedAttach + " 涓檮浠跺湴鍧�鏃犳晥锛堟祻瑙堝櫒涓存椂鍦板潃锛夛紝宸茶嚜鍔ㄥ墧闄わ紝璇烽噸鏂颁笂浼犺繖浜涢檮浠跺悗鍐嶄繚瀛樸��");
+        }
+        return result;
+    }
 
-        return AjaxResult.success(serviceFundService.addOrUpdateNew(serviceFundVO));
+    /**
+     * 2026-11-23锛氭竻娲楁暣鍗曟槑缁嗛噷鐨勪复鏃堕檮浠跺湴鍧�锛坆lob:/data:/file:锛夈��
+     *
+     * @return 琚墧闄ょ殑闄勪欢鏉℃暟
+     */
+    private int sanitizeAttachments(ServiceFundVO serviceFundVO) {
+        if (serviceFundVO == null || CollectionUtils.isEmpty(serviceFundVO.getServiceFunddetails())) {
+            return 0;
+        }
+        int dropped = 0;
+        for (ServiceFunddetailVO detail : serviceFundVO.getServiceFunddetails()) {
+            if (detail == null) {
+                continue;
+            }
+            dropped += com.ruoyi.project.common.AttachmentUrlSanitizer.sanitize(detail.getAnnexfilesList());
+            dropped += com.ruoyi.project.common.AttachmentUrlSanitizer.sanitize(detail.getInvoicefilesList());
+        }
+        if (dropped > 0) {
+            log.warn("鎶ラ攢鍗曚繚瀛橈細鍓旈櫎 {} 涓复鏃堕檮浠跺湴鍧�锛坆lob:/data:锛夛紝鍗曟嵁 fundid={}", dropped, serviceFundVO.getId());
+        }
+        return dropped;
     }
 
     /**
@@ -409,6 +438,8 @@
         List<ServiceFund> infoByInfoIdList = serviceFundService.queryInfoById(serviceFund);
         log.info("淇敼璐圭敤鐢宠锛岄�氳繃鍏ュ弬鏌ヨ serviceFundService.queryInfoById鏁版嵁涓虹┖,鍏ュ弬:{}", infoByInfoIdList.size());
         if (CollectionUtils.isEmpty(infoByInfoIdList)) {
+            // 2026-11-23锛氬悓鏍峰墧闄や复鏃堕檮浠跺湴鍧�锛坆lob:/data:锛夛紝閬垮厤钀藉簱鍚庢棤娉曢瑙�
+            sanitizeAttachments(serviceFundVO);
             Long id = serviceFundService.addOrUpdateNew(serviceFundVO);
             serviceFund.setId(id);
         }

--
Gitblit v1.9.3