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/api/service/impl/MobileServiceImpl.java |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/MobileServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/MobileServiceImpl.java
index 0454885..d1cfe78 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/MobileServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/MobileServiceImpl.java
@@ -254,7 +254,7 @@
             throw new CoolException("鏁版嵁閿欒锛氫富鍗曚笉瀛樺湪锛侊紒");
         }
         //TODO /**鏀惰揣鏁伴噺绱姞锛�1. 浼氬嚭瓒呮敹鎯呭喌 2. 浼氭湁鏀惰揣涓嶈冻鎯呭喌*/
-        Double rcptedQty = Math.round((wkOrder.getQty() + receiptQty) * 100) / 100.0;
+        Double rcptedQty = Math.round((wkOrder.getQty() + receiptQty) * 1000000) / 1000000.0;
         wkOrder.setQty(rcptedQty).setExceStatus(AsnExceStatus.ASN_EXCE_STATUS_EXCE_ING.val);
         if (!asnOrderMapper.updateById(wkOrder)) {
             throw new CoolException("宸叉敹璐ф暟閲忎慨鏀瑰け璐ワ紒锛�");
@@ -302,7 +302,7 @@
                 throw new CoolException("璇疯緭鍏ユ纭殑鏃堕棿鏍煎紡锛侊紒");
             }
 
-            Double itemRcptQty = Math.round((dto.getReceiptQty() + orderItem.getQty()) * 100) / 100.0;
+            Double itemRcptQty = Math.round((dto.getReceiptQty() + orderItem.getQty()) * 1000000) / 1000000.0;
             Boolean allowOver = false;
             if (!Objects.isNull(config)) {
                 if (Boolean.parseBoolean(config.getVal())) {
@@ -415,7 +415,7 @@
 
         if (!Objects.isNull(serviceOne)) {
             item.setId(serviceOne.getId());
-            Double anfme = Math.round((item.getAnfme() + serviceOne.getAnfme()) * 100) / 100.0;
+            Double anfme = Math.round((item.getAnfme() + serviceOne.getAnfme()) * 1000000) / 1000000.0;
             item.setAnfme(anfme);
         }
 
@@ -1149,7 +1149,7 @@
             if (Objects.isNull(stockItem)) {
                 detlsDto.setStockQty(0.0);
             } else {
-                Double anfme = Math.round((stockItem.getAnfme() + stockItem.getWorkQty()) * 100) / 100.0;
+                Double anfme = Math.round((stockItem.getAnfme() + stockItem.getWorkQty()) * 1000000) / 1000000.0;
                 detlsDto.setStockQty(anfme);
             }
 

--
Gitblit v1.9.1