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/LocItemServiceImpl.java | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java
index f82ce5d..c8d7f57 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java
@@ -232,7 +232,7 @@
}
taskItems.add(taskItem);
- Double qty = Math.round((item.getWorkQty() + item.getOutQty()) * 100) / 100.0;
+ Double qty = Math.round((item.getWorkQty() + item.getOutQty()) * 1000000) / 1000000.0;
LocItem locItem = locItemService.getById(item.getId());
if (Objects.isNull(locItem)) {
throw new CoolException("搴撳瓨淇℃伅涓嶅瓨鍦紒");
@@ -243,7 +243,7 @@
}
if (locItem.getAnfme().compareTo(qty) < 0) {
- Double minusQty = Math.round((locItem.getAnfme() - locItem.getWorkQty()) * 100) / 100.0;
+ Double minusQty = Math.round((locItem.getAnfme() - locItem.getWorkQty()) * 1000000) / 1000000.0;
item.setWorkQty(minusQty);
} else {
item.setWorkQty(qty);
--
Gitblit v1.9.1