From cc0635fdc45d9b0e9396f76ed4074bdb1d81f9d3 Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期二, 11 十一月 2025 11:07:19 +0800
Subject: [PATCH] yys 优化仓储物流模块
---
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