From 04abe23808d72c86781c2fa9af358d93455f2bb1 Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期四, 13 十一月 2025 17:35:56 +0800
Subject: [PATCH] yys  1.仓储物流增加分类管理      2.仓储物流分类管理导出接口      4.新疆生产管控定制化

---
 src/main/java/com/ruoyi/purchase/service/impl/TicketRegistrationServiceImpl.java |   27 +++++++++++++++++----------
 1 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/src/main/java/com/ruoyi/purchase/service/impl/TicketRegistrationServiceImpl.java b/src/main/java/com/ruoyi/purchase/service/impl/TicketRegistrationServiceImpl.java
index a6e152e..287997d 100644
--- a/src/main/java/com/ruoyi/purchase/service/impl/TicketRegistrationServiceImpl.java
+++ b/src/main/java/com/ruoyi/purchase/service/impl/TicketRegistrationServiceImpl.java
@@ -164,11 +164,11 @@
                     productRecord.setSaleLedgerProjectId(salesLedgerProduct.getId());
                     productRecord.setId(null);
                     productRecord.setType("2");
-                     insert = productRecordMapper.insert(productRecord);
+                    insert += productRecordMapper.insert(productRecord);
                 }
-                if (insert <= 0) {
-                    throw new RuntimeException("浜у搧寮�绁ㄦ暟閮戒负0锛岃妫�鏌�");
-                }
+            }
+            if (insert <= 0) {
+                throw new RuntimeException("浜у搧寮�绁ㄦ暟閮戒负0锛岃妫�鏌�");
             }
         }
         // 杩佺Щ涓存椂鏂囦欢鍒版寮忕洰褰�
@@ -222,12 +222,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锛�
@@ -366,6 +369,10 @@
                 ticketRegistrationIPage.setTotal(ticketRegistrationIPage.getRecords().size());
             }
         }
+        ticketRegistrationIPage.getRecords().forEach(item -> {
+            // 宸蹭粯娆鹃噾棰� == 寰呬粯娆鹃噾棰�
+            item.setStatusName(item.getPaymentAmountTotal().compareTo(item.getInvoiceAmount()) == 0 ? "宸插畬鎴愪粯娆�" : "鏈畬鎴愪粯娆�");
+        });
         return ticketRegistrationIPage;
     }
 

--
Gitblit v1.9.3