From 26103c72e1ebd8ec39d4f70808f524a9e3c6689e Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期一, 14 七月 2025 10:27:52 +0800
Subject: [PATCH] 新增离职的人员选项使用下拉框(查询改员工最新的入职信息)

---
 src/main/java/com/ruoyi/sales/service/impl/SalesLedgerProductServiceImpl.java |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerProductServiceImpl.java b/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerProductServiceImpl.java
index 76c74ac..6f9e6a6 100644
--- a/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerProductServiceImpl.java
+++ b/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerProductServiceImpl.java
@@ -63,11 +63,11 @@
             // 缁熻寮�绁ㄧ櫥璁颁骇鍝佺殑宸插紑绁ㄦ暟/宸插紑绁ㄩ噾棰�
             if(!CollectionUtils.isEmpty(invoiceRegistrationProductDtoList)){
                 for (SalesLedgerProduct ledgerProduct : salesLedgerProducts) {
-                    int invoiceNum = 0;
+                    BigDecimal invoiceNum = BigDecimal.ZERO;
                     BigDecimal invoiceAmount = BigDecimal.ZERO;
                     for (InvoiceRegistrationProductDto registrationProductDto : invoiceRegistrationProductDtoList) {
                         if(ledgerProduct.getId().intValue() == registrationProductDto.getSalesLedgerProductId()){
-                            invoiceNum += registrationProductDto.getInvoiceNum();
+                            invoiceNum =  invoiceNum.add(registrationProductDto.getInvoiceNum());
                             invoiceAmount = invoiceAmount.add(registrationProductDto.getInvoiceAmount());
                         }
                     }
@@ -128,6 +128,7 @@
         if (salesLedgerProduct.getId() == null) {
             result = salesLedgerProductMapper.insert(salesLedgerProduct);
         } else {
+            salesLedgerProduct.setFutureTickets(salesLedgerProduct.getQuantity());
             result = salesLedgerProductMapper.updateById(salesLedgerProduct);
         }
 

--
Gitblit v1.9.3