From 7b2233d1dab53574facc66b3bebffcd8ca5919de Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期六, 21 三月 2026 14:27:19 +0800
Subject: [PATCH] yys 1.已退货完毕的出库单号不要展示在关联出库单中 2.退货管理唯一处理 3.生产订单-库存数量回显 4.发货管理回显退货数量 5.发货增加详情接口 6.生产核算清理脏数据 7.生产报工-删除生产报工记录报错 8.筛选客户名称数据展示有误

---
 src/main/java/com/ruoyi/sales/service/impl/CommonFileServiceImpl.java |   31 +++++++++++++++++++++++++------
 1 files changed, 25 insertions(+), 6 deletions(-)

diff --git a/src/main/java/com/ruoyi/sales/service/impl/CommonFileServiceImpl.java b/src/main/java/com/ruoyi/sales/service/impl/CommonFileServiceImpl.java
index 76831bc..f3aac49 100644
--- a/src/main/java/com/ruoyi/sales/service/impl/CommonFileServiceImpl.java
+++ b/src/main/java/com/ruoyi/sales/service/impl/CommonFileServiceImpl.java
@@ -1,5 +1,6 @@
 package com.ruoyi.sales.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.other.mapper.TempFileMapper;
@@ -38,6 +39,21 @@
 
     @Value("${file.upload-dir}")
     private String uploadDir;
+
+    public List<CommonFile> getFileListByBusinessId(Long businessId,Integer type) {
+        return commonFileMapper.selectList(new LambdaQueryWrapper<CommonFile>().eq(CommonFile::getCommonId, businessId)
+                .eq(CommonFile::getType, type));
+    }
+
+    public void deleteByBusinessId(Long businessId,Integer type) {
+        commonFileMapper.delete(new LambdaQueryWrapper<CommonFile>().eq(CommonFile::getCommonId, businessId)
+                .eq(CommonFile::getType, type));
+    }
+
+    public void deleteByBusinessIds(List<Long> businessId,Integer type) {
+        commonFileMapper.delete(new LambdaQueryWrapper<CommonFile>().in(CommonFile::getCommonId, businessId)
+                .eq(CommonFile::getType, type));
+    }
 
 
     @Override
@@ -123,12 +139,15 @@
 
             try {
                 // 鎵ц鏂囦欢杩佺Щ锛堜娇鐢ㄥ師瀛愭搷浣滅‘淇濆畨鍏ㄦ�э級
-                Files.move(
-                        Paths.get(tempFile.getTempPath()),
-                        formalFilePath,
-                        StandardCopyOption.REPLACE_EXISTING,
-                        StandardCopyOption.ATOMIC_MOVE
-                );
+//                Files.move(
+//                        Paths.get(tempFile.getTempPath()),
+//                        formalFilePath,
+//                        StandardCopyOption.REPLACE_EXISTING,
+//                        StandardCopyOption.ATOMIC_MOVE
+//                );
+                // 鍘熷瓙绉诲姩澶辫触锛屼娇鐢ㄥ鍒�+鍒犻櫎
+                Files.copy(Paths.get(tempFile.getTempPath()), formalFilePath, StandardCopyOption.REPLACE_EXISTING);
+                Files.deleteIfExists(Paths.get(tempFile.getTempPath()));
                 log.info("鏂囦欢杩佺Щ鎴愬姛: {} -> {}", tempFile.getTempPath(), formalFilePath);
 
                 // 鏇存柊鏂囦欢璁板綍锛堝叧鑱斿埌涓氬姟ID锛�

--
Gitblit v1.9.3