From f56457b75944ef2def631ad5ed07f302123d3f75 Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期五, 28 十一月 2025 21:05:41 +0800
Subject: [PATCH] 小数精确到6位

---
 rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
index e6ecd8a..e2e4833 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
@@ -899,7 +899,7 @@
                             if (Objects.isNull(waveItem)) {
                                 throw new CoolException("娉㈡鏄庣粏涓嶅瓨鍦紒锛�");
                             }
-                            Double workQty = Math.round((waveItem.getWorkQty() - item.getAnfme()) * 100) / 100.0;
+                            Double workQty = Math.round((waveItem.getWorkQty() - item.getAnfme()) * 1000000) / 1000000.0;
                             waveItem.setWorkQty(workQty).setExceStatus(WaveItemExceStatus.WAVE_ITEM_EXCE_STATUS_UN.val);
                             if (!waveItemService.updateById(waveItem)) {
                                 throw new CoolException("娉㈡鏄庣粏鏇存柊澶辫触锛侊紒");
@@ -923,7 +923,7 @@
                             if (Objects.isNull(wkOrder)) {
                                 throw new CoolException("鏁版嵁閿欒锛氬崟鎹凡涓嶅瓨鍦紒锛�");
                             }
-                            Double workQty = Math.round((wkOrder.getWorkQty() - item.getAnfme()) * 100) / 100.0;
+                            Double workQty = Math.round((wkOrder.getWorkQty() - item.getAnfme()) * 1000000) / 1000000.0;
 
                             wkOrder.setExceStatus(AsnExceStatus.OUT_STOCK_STATUS_TASK_INIT.val)
                                     .setWorkQty(workQty.compareTo(0.00) > 0 ? workQty : 0.00)
@@ -938,7 +938,7 @@
                                 throw new CoolException("鏁版嵁閿欒锛氬崟鎹槑缁嗗凡涓嶅瓨鍦紒锛�");
                             }
 
-                            Double workItmQty = Math.round((orderItem.getWorkQty() - item.getAnfme()) * 100) / 100.0;
+                            Double workItmQty = Math.round((orderItem.getWorkQty() - item.getAnfme()) * 1000000) / 1000000.0;
                             orderItem.setWorkQty(workItmQty);
 
                             if (!outStockItemService.updateById(orderItem)) {
@@ -1051,7 +1051,7 @@
                 if (taskItem.getFieldsIndex().equals(working.getFieldsIndex())) {
                     Double minQty = taskItem.getAnfme();
                     if (!task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_IN.type)) {
-                        minQty = Math.round((working.getAnfme() - taskItem.getQty()) * 100) / 100.0;
+                        minQty = Math.round((working.getAnfme() - taskItem.getQty()) * 1000000) / 1000000.0;
                     }
                     if (minQty.compareTo(0.0) >= 0) {
                         taskItem.setAnfme(minQty);
@@ -1310,7 +1310,7 @@
             stock.setSourceId(waveItem.getId()).setType(OrderType.ORDER_OUT.type);
         } else if (!Objects.isNull(orderItem) && StringUtils.isNotBlank(orderItem.getId() + "")) {
             WkOrder wkOrder = asnOrderService.getById(orderItem.getOrderId());
-            Double qty = Math.round((wkOrder.getQty() + sum) * 100) / 100.0;
+            Double qty = Math.round((wkOrder.getQty() + sum) * 1000000) / 1000000.0;
             wkOrder.setExceStatus(AsnExceStatus.OUT_STOCK_STATUS_TASK_WORKING.val)
                     .setQty(qty);
             if (!asnOrderService.updateById(wkOrder)) {
@@ -1634,8 +1634,8 @@
         if (Objects.isNull(itemServiceOne)) {
             throw new CoolException("鏁版嵁閿欒锛氳鏌ョ湅璇疯揣鍖哄簱瀛樻槸鍚﹀瓨鍦紒锛�");
         }
-        Double workQty = Math.round((itemServiceOne.getWorkQty() - pakinItem.getAnfme()) * 100) / 100.0;
-        Double qty = Math.round((itemServiceOne.getQty() + pakinItem.getAnfme()) * 100) / 100.0;
+        Double workQty = Math.round((itemServiceOne.getWorkQty() - pakinItem.getAnfme()) * 1000000) / 1000000.0;
+        Double qty = Math.round((itemServiceOne.getQty() + pakinItem.getAnfme()) * 1000000) / 1000000.0;
         itemServiceOne.setWorkQty(workQty).setQty(qty);
 
         if (!waitPakinService.update(new LambdaUpdateWrapper<WaitPakin>()

--
Gitblit v1.9.1