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/OutStockServiceImpl.java    |   22 +++++-----
 rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java     |    4 +-
 rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaveServiceImpl.java        |    2 
 rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaitPakinServiceImpl.java   |   14 +++---
 rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/ScheduleJobs.java              |    2 
 rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/MobileServiceImpl.java          |    8 ++--
 rsf-server/src/main/java/com/vincent/rsf/server/common/CodeBuilder.java                          |    6 +-
 rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java        |   14 +++---
 rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/QlyIsptItemServiceImpl.java |    2 
 rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/ReviseLogItem.java                |    2 
 rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/AsnOrderServiceImpl.java    |    8 ++--
 rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/PdaOutStockServiceImpl.java     |   11 +++--
 rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/CheckDiffItem.java                |    2 
 13 files changed, 50 insertions(+), 47 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);
             }
 
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/PdaOutStockServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/PdaOutStockServiceImpl.java
index 9dc2808..df9a7dd 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/PdaOutStockServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/PdaOutStockServiceImpl.java
@@ -283,7 +283,7 @@
             //taskItems涓烘嫞璐ф槑缁嗭紝浣滃弬鏁颁笂鎶�
             Double summed = items.stream().mapToDouble(TaskItem::getAnfme).sum();
             //鍔犱笂鍘嗗彶鎷f枡鏁伴噺
-            Double pickQty = Math.round((orderItem.getQty() + summed) * 100) / 100.0;
+            Double pickQty = Math.round((orderItem.getQty() + summed) * 1000000) / 1000000.0;
             Config config = configService.getOne(new LambdaQueryWrapper<Config>().eq(Config::getFlag, GlobalConfigCode.ALLOW_OVER_CHANGE));
             //鍒ゆ柇鏄惁鍏佽瓒呮敹锛屼笉鍏佽瓒呮敹娣诲姞鎷掓敹鍒ゆ柇
             if (!Objects.isNull(config)) {
@@ -334,14 +334,17 @@
                     if (taskItem.getAnfme().compareTo(serviceOne.getAnfme()) > 0) {
                         throw new CoolException("鎷h揣鏁伴噺瓒呭嚭褰撳墠绁ㄥ彿搴撳瓨鏁伴噺锛侊紒");
                     }
+
                     if (!Boolean.parseBoolean(config.getVal())) {
-                        if (item.getAnfme().compareTo(item.getQty() + taskItem.getAnfme()) < 0.0) {
+                        Double v = Math.round((item.getQty() + taskItem.getAnfme()) * 1000000) / 1000000.0;
+                        if (item.getAnfme().compareTo(v) < 0.0) {
+
                             throw new CoolException("鍓嶅綋鐗╂枡宸茶秴鍑哄彲鎷h寖鍥达紝璇锋牳瀵瑰悗鍐嶆搷浣滐紒锛�");
                         }
                     }
                 }
 
-                Double picQty = Math.round((item.getQty() + taskItem.getAnfme()) * 100) / 100.0;
+                Double picQty = Math.round((item.getQty() + taskItem.getAnfme()) * 1000000) / 1000000.0;
                 item.setQty(picQty).setOrderId(order.getId()).setOrderItemId(orderItem.getId());
                 if (!taskItemService.updateById(item)) {
                     throw new CoolException("鐘舵�佸畬鎴愬け璐ワ紒锛�");
@@ -360,7 +363,7 @@
         List<WkOrderItem> orderItems = asnOrderItemService.list(new LambdaQueryWrapper<WkOrderItem>().eq(WkOrderItem::getOrderId, params.getOrderId()));
         Double total = orderItems.stream().mapToDouble(WkOrderItem::getQty).sum();
         Double wkQty = orderItems.stream().mapToDouble(WkOrderItem::getWorkQty).sum();
-        double v = order.getWorkQty().compareTo(wkQty) < 0 ? 0.0 : Math.round((total - wkQty) * 100) / 100.0;
+        double v = order.getWorkQty().compareTo(wkQty) < 0 ? 0.0 : Math.round((total - wkQty) * 1000000) / 1000000.0;
         order.setQty(total).setWorkQty(v);
         if (!asnOrderService.updateById(order)) {
             throw new CoolException("璁㈠崟鏁伴噺鏇存柊澶辫触锛侊紒");
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/common/CodeBuilder.java b/rsf-server/src/main/java/com/vincent/rsf/server/common/CodeBuilder.java
index e8bbef4..682269d 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/common/CodeBuilder.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/common/CodeBuilder.java
@@ -15,15 +15,15 @@
         generator.frontendPrefixPath = "rsf-admin/";
 
         generator.sqlOsType = SqlOsType.MYSQL;
-        generator.url = "192.168.4.151:3306/rsf";
+        generator.url = "127.0.0.1:3306/rsf-xiri";
         generator.username = "root";
         generator.password = "34821015";
 //        generator.url="47.97.1.152:51433;databasename=jkasrs";
 //        generator.username="sa";
 //        generator.password="Zoneyung@zy56$";
 
-        generator.table = "view_stock_statistic";
-        generator.tableDesc = "鏃ュ簱瀛樼粺璁�";
+        generator.table = "man_loc_item";
+        generator.tableDesc = "搴撳瓨鏄庣粏";
         generator.packagePath = "com.vincent.rsf.server.manager";
 
         generator.build();
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/CheckDiffItem.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/CheckDiffItem.java
index 759d0e8..be896a2 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/CheckDiffItem.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/CheckDiffItem.java
@@ -224,7 +224,7 @@
         if (checkQty.compareTo(0.0) <= 0) {
             return 0.0;
         }
-        Double diffQty = Math.round((this.checkQty - this.anfme) * 100) / 100.0;
+        Double diffQty = Math.round((this.checkQty - this.anfme) * 1000000) / 1000000.0;
         return diffQty;
     }
 
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/ReviseLogItem.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/ReviseLogItem.java
index 323d9ae..32b6d75 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/ReviseLogItem.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/ReviseLogItem.java
@@ -252,7 +252,7 @@
     }
 
     public Double getDiffQty() {
-        return Math.round((this.reviseQty - this.anfme) * 100) / 100.0;
+        return Math.round((this.reviseQty - this.anfme) * 1000000) / 1000000.0;
     }
 
     public String getUpdateBy$(){
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/ScheduleJobs.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/ScheduleJobs.java
index 618be12..4ad7c8f 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/ScheduleJobs.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/ScheduleJobs.java
@@ -214,7 +214,7 @@
         WarehouseAreasItem serviceOne = warehouseAreasItemService.getOne(queryWrapper);
         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);
         }
         //鏈川妫�
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/AsnOrderServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/AsnOrderServiceImpl.java
index e2b0562..6a387fb 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/AsnOrderServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/AsnOrderServiceImpl.java
@@ -299,7 +299,7 @@
             }
 
             PurchaseItem service = purchaseItemService.getById(item.getId());
-            Double qty = Math.round((service.getQty() + item.getAnfme()) * 100) / 100.0;
+            Double qty = Math.round((service.getQty() + item.getAnfme()) * 1000000) / 1000000.0;
             if (qty.compareTo(service.getAnfme()) > 0) {
                 throw new CoolException("鏂板缓鍗曟嵁鏁伴噺涓嶈兘澶т簬璁″垝鏁伴噺锛侊紒");
             }
@@ -326,7 +326,7 @@
                 throw new CoolException("鍗曟嵁涓嶅瓨鍦紒锛�");
             }
 
-            Double toQty = Math.round((purchaseItem.getQty() + item.getAnfme()) * 100) / 100.0;
+            Double toQty = Math.round((purchaseItem.getQty() + item.getAnfme()) * 1000000) / 1000000.0;
             purchaseItem.setQty(toQty);
             if (!purchaseItemService.updateById(purchaseItem)) {
                 throw new CoolException("PO鍗曟槑缁嗕慨鏀瑰け璐ワ紒锛�");
@@ -339,7 +339,7 @@
             throw new CoolException(("Asn鍗曟嵁鏄庣粏淇濆瓨澶辫触锛侊紒"));
         }
         //浠诲姟鎵ц瀹屾垚锛屼慨鏀瑰凡瀹屾垚鏁伴噺鍜孭O鍗曟墽琛岀姸鎬�
-        Double qty = Math.round((sum + purchase.getQty()) * 100) / 100.0;
+        Double qty = Math.round((sum + purchase.getQty()) * 1000000) / 1000000.0;
         purchase.setQty(qty)
                 .setExceStatus(POExceStatus.PO_EXCE_STATUS_EXCE_ING.val);
 
@@ -373,7 +373,7 @@
             list.forEach(item -> {
                 PurchaseItem purchaseItem = purchaseItemService.getById(item.getPoDetlId());
                 if (!Objects.isNull(purchaseItem)) {
-                    Double minusQty = Math.round((purchaseItem.getQty() - item.getAnfme()) * 100) / 100.0;
+                    Double minusQty = Math.round((purchaseItem.getQty() - item.getAnfme()) * 1000000) / 1000000.0;
                     purchaseItem.setQty(minusQty);
                     if (!purchaseItemService.updateById(purchaseItem)) {
                         throw new CoolException("PO鍗曟槑缁嗘洿鏂板け璐ワ紒锛�");
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);
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/OutStockServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/OutStockServiceImpl.java
index e2cf508..c90f8a7 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/OutStockServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/OutStockServiceImpl.java
@@ -134,7 +134,7 @@
             for (WkOrderItem orderItem : orderItems) {
                 if (!Objects.isNull(orderItem.getPoDetlId())) {
                     DeliveryItem deliveryItem = deliveryItemService.getById(orderItem.getPoDetlId());
-                    Double workQty = Math.round((deliveryItem.getWorkQty() - orderItem.getAnfme()) * 100) / 100.0;
+                    Double workQty = Math.round((deliveryItem.getWorkQty() - orderItem.getAnfme()) * 1000000) / 1000000.0;
                     deliveryItem.setWorkQty(workQty.compareTo(0.0) >= 0 ? workQty : 0);
                     if (!deliveryItemService.updateById(deliveryItem)) {
                         throw new CoolException("DO鍗曟槑缁嗘洿鏂板け璐ワ紒锛�");
@@ -142,7 +142,7 @@
 
                     Delivery delivery = deliveryService.getOne(new LambdaQueryWrapper<Delivery>().eq(Delivery::getCode, orderItem.getPoCode()));
                     if (!Objects.isNull(delivery)) {
-                        Double wkQty = Math.round((delivery.getWorkQty() - delivery.getAnfme()) * 100) / 100.0;
+                        Double wkQty = Math.round((delivery.getWorkQty() - delivery.getAnfme()) * 1000000) / 1000000.0;
                         delivery.setWorkQty(wkQty.compareTo(0.0) >= 0 ? wkQty : 0).setExceStatus(POExceStatus.PO_EXCE_STATUS_UN_EXCE.val);
                         if (!deliveryService.updateById(delivery)) {
                             throw new CoolException("DO鍗曟嵁淇敼澶辫触锛侊紒");
@@ -206,7 +206,7 @@
                 if (item.getAnfme().compareTo(0.0) <= 0) {
                     throw new CoolException("鍑哄簱鏁伴噺涓嶈兘灏忎簬鎴栫瓑浜庨浂锛侊紒");
                 }
-                Double anfme = Math.round((deliveryItem.getAnfme() - item.getAnfme()) * 100) / 100.0;
+                Double anfme = Math.round((deliveryItem.getAnfme() - item.getAnfme()) * 1000000) / 1000000.0;
                 if (anfme.compareTo(0.0) < 0) {
                     throw new CoolException("鍑哄簱鏁伴噺涓嶈冻锛侊紒");
                 }
@@ -254,7 +254,7 @@
                 exceStatus = AsnExceStatus.ASN_EXCE_STATUS_TASK_DONE.val;
             }
 
-            Double wkQty = Math.round((delivery.getWorkQty() + sum) * 100) / 100.0;
+            Double wkQty = Math.round((delivery.getWorkQty() + sum) * 1000000) / 1000000.0;
             if (!deliveryService.update(new LambdaUpdateWrapper<Delivery>()
                     .set(Delivery::getExceStatus, exceStatus)
                     .set(Delivery::getWorkQty, wkQty)
@@ -286,7 +286,7 @@
         }
         Double sum = orders.stream().mapToDouble(WkOrder::getAnfme).sum();
         Double workQty = orders.stream().mapToDouble(WkOrder::getWorkQty).sum();
-        Double anfme = Math.round((sum - workQty) * 100) / 100.0;
+        Double anfme = Math.round((sum - workQty) * 1000000) / 1000000.0;
         Wave wave = new Wave();
         String ruleCode = SerialRuleUtils.generateRuleCode(SerialRuleCode.SYS_WAVE_TYPE, null);
         if (StringUtils.isBlank(ruleCode)) {
@@ -351,7 +351,7 @@
             throw new CoolException("鍑哄簱鍗曟墽琛屾暟閲忎慨鏀瑰け璐ワ紒锛�");
         }
         for (WkOrder order : orders) {
-            Double wkQty = Math.round((order.getWorkQty() + order.getAnfme()) * 100) / 100.0;
+            Double wkQty = Math.round((order.getWorkQty() + order.getAnfme()) * 1000000) / 1000000.0;
             if (!this.update(new LambdaUpdateWrapper<WkOrder>()
                     .set(WkOrder::getWaveId, wave.getId())
                     .set(WkOrder::getWorkQty, wkQty)
@@ -514,7 +514,7 @@
                     throw new CoolException(e.getMessage());
                 }
 
-                Double workQty = Math.round((orderItem.getWorkQty() + locItem.getOutQty()) * 100) / 100.0;
+                Double workQty = Math.round((orderItem.getWorkQty() + locItem.getOutQty()) * 1000000) / 1000000.0;
 
                 orderItem.setUpdateBy(loginUserId).setUpdateTime(new Date()).setWorkQty(workQty);
 
@@ -530,7 +530,7 @@
         if (Objects.isNull(outOrder)) {
             throw new CoolException("鍑哄簱鍗曟嵁涓嶅瓨鍦紒锛�");
         }
-        Double workQty = Math.round((outOrder.getWorkQty() + sum) * 100) / 100.0;
+        Double workQty = Math.round((outOrder.getWorkQty() + sum) * 1000000) / 1000000.0;
 
         outOrder.setWorkQty(workQty).setExceStatus(AsnExceStatus.OUT_STOCK_STATUS_TASK_CREATE.val);
 
@@ -569,7 +569,7 @@
             if (!items.isEmpty()) {
                 for (WkOrderItem orderItem : items) {
                     DeliveryItem deliveryItem = deliveryItemService.getById(orderItem.getPoDetlId());
-                    Double workQty = Math.round((deliveryItem.getWorkQty() - orderItem.getAnfme()) * 100) / 100.0;
+                    Double workQty = Math.round((deliveryItem.getWorkQty() - orderItem.getAnfme()) * 1000000) / 1000000.0;
                     deliveryItem.setWorkQty(workQty.compareTo(0.0) >= 0 ? workQty : 0);
                     if (!deliveryItemService.updateById(deliveryItem)) {
                         throw new CoolException("DO鍗曟槑缁嗘洿鏂板け璐ワ紒锛�");
@@ -577,7 +577,7 @@
 
                     Delivery delivery = deliveryService.getOne(new LambdaQueryWrapper<Delivery>().eq(Delivery::getCode, orderItem.getPoCode()));
                     if (!Objects.isNull(delivery)) {
-                        Double wkQty = Math.round((delivery.getWorkQty() - delivery.getAnfme()) * 100) / 100.0;
+                        Double wkQty = Math.round((delivery.getWorkQty() - delivery.getAnfme()) * 1000000) / 1000000.0;
                         delivery.setWorkQty(wkQty.compareTo(0.0) >= 0 ? wkQty : 0).setExceStatus(POExceStatus.PO_EXCE_STATUS_UN_EXCE.val);
                         if (!deliveryService.updateById(delivery)) {
                             throw new CoolException("DO鍗曟嵁淇敼澶辫触锛侊紒");
@@ -685,7 +685,7 @@
     private List<WaveItem> mergeWave(List<WkOrderItem> orderItems, Wave wave) {
         List<WaveItem> items = new ArrayList<>();
         orderItems.forEach(order -> {
-            Double anfme = Math.round((order.getAnfme() - order.getWorkQty()) * 100) / 100.0;
+            Double anfme = Math.round((order.getAnfme() - order.getWorkQty()) * 1000000) / 1000000.0;
             WaveItem item = new WaveItem();
             BeanUtils.copyProperties(order, item);
                 item.setId(null)
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/QlyIsptItemServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/QlyIsptItemServiceImpl.java
index 915c255..404f5ea 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/QlyIsptItemServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/QlyIsptItemServiceImpl.java
@@ -190,7 +190,7 @@
                 }
             }
         } else {
-            Double anfme = Math.round((orderItem.getAnfme() - sum) * 100) / 100.0;
+            Double anfme = Math.round((orderItem.getAnfme() - sum) * 1000000) / 1000000.0;
             orderItem.setAnfme(anfme);
             if (!warehouseAreasItemService.updateById(orderItem)) {
                 throw new CoolException("鏀惰揣鍖哄簱瀛樻槑缁嗘洿鏂板け璐ワ紒锛�");
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>()
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaitPakinServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaitPakinServiceImpl.java
index d12a5b3..766ec93 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaitPakinServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaitPakinServiceImpl.java
@@ -172,8 +172,8 @@
             if (Objects.isNull(one)) {
                 throw new CoolException("鏀惰揣鍖烘暟鎹敊璇紒锛�");
             }
-            Double workQty = Math.round((one.getWorkQty() + pakinItem.getAnfme()) * 100) / 100.0;
-            Double qty = Math.round((workQty + one.getQty()) * 100) / 100.0;
+            Double workQty = Math.round((one.getWorkQty() + pakinItem.getAnfme()) * 1000000) / 1000000.0;
+            Double qty = Math.round((workQty + one.getQty()) * 1000000) / 1000000.0;
             one.setWorkQty(workQty);
             if (qty.compareTo(one.getAnfme()) > 0) {
                 throw new CoolException("缁勬墭鏁伴噺涓嶈兘澶т簬鏀惰揣鏁伴噺锛侊紒");
@@ -231,12 +231,12 @@
                             if (item.getReceiptQty().compareTo(0.00) == 0) {
                                 throw new CoolException("瑙g粦鏁伴噺涓嶈兘涓洪浂锛侊紒");
                             }
-                            Double reslt = Math.round((pakinItems.get(i1).getAnfme() - pakinItems.get(i1).getWorkQty() - pakinItems.get(i1).getQty()) * 100) / 100.0;
+                            Double reslt = Math.round((pakinItems.get(i1).getAnfme() - pakinItems.get(i1).getWorkQty() - pakinItems.get(i1).getQty()) * 1000000) / 1000000.0;
                             if (item.getReceiptQty().compareTo(reslt) > 0) {
                                 throw new CoolException("瑙g粦鏁伴噺涓嶈兘澶т簬鍓╀綑鍙墽琛屾暟锛侊紒");
                             }
 
-                            Double anfme = Math.round((pakinItems.get(i1).getAnfme() - item.getReceiptQty()) * 100) / 100.0;
+                            Double anfme = Math.round((pakinItems.get(i1).getAnfme() - item.getReceiptQty()) * 1000000) / 1000000.0;
                            pakinItems.get(i1).setAnfme(anfme);
                            if (!waitPakinItemService.updateById(pakinItems.get(i1))) {
                                throw new CoolException("缁勬墭鏄庣粏鏁伴噺淇敼澶辫触锛侊紒");
@@ -248,7 +248,7 @@
                         }
                         for (int i = 0; i < warehouseAreasItems.size(); i++) {
                             if (warehouseAreasItems.get(i).getId().equals(pakinItems.get(i1).getSource())) {
-                                double v = Math.round((warehouseAreasItems.get(i).getWorkQty() - item.getReceiptQty()) * 100) / 100.0;
+                                double v = Math.round((warehouseAreasItems.get(i).getWorkQty() - item.getReceiptQty()) * 1000000) / 1000000.0;
                                 warehouseAreasItems.get(i).setWorkQty(v);
                                 if (!warehouseAreasItemService.updateById(warehouseAreasItems.get(i))) {
                                     throw new CoolException("鏀惰揣鍖烘暟閲忎慨鏀瑰け璐ワ紒锛�");
@@ -266,7 +266,7 @@
                     throw new CoolException("缁勬墭鍒犻櫎澶辫触锛侊紒");
                 }
             } else {
-                Double anfme = Math.round((waitPakins.getAnfme() - anfmes) * 100) / 100.0;
+                Double anfme = Math.round((waitPakins.getAnfme() - anfmes) * 1000000) / 1000000.0;
                 waitPakins.setAnfme(anfme);
                 if (!waitPakinService.updateById(waitPakins)) {
                     throw new CoolException("缁勬墭鏁版嵁淇敼澶辫触锛侊紒");
@@ -311,7 +311,7 @@
                     continue;
                 }
                 double sum = pakin.stream().mapToDouble(WaitPakinItem::getAnfme).sum();
-                Double workQty = Math.round((item.getWorkQty() - sum) * 100) / 100.0;
+                Double workQty = Math.round((item.getWorkQty() - sum) * 1000000) / 1000000.0;
                 item.setWorkQty(workQty);
                 if (!warehouseAreasItemService.updateById(item)) {
                     throw new CoolException("鏀惰揣鍖烘暟鎹洖婊氬け璐ワ紒锛�");
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaveServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaveServiceImpl.java
index 6c8faf2..f4888c3 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaveServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaveServiceImpl.java
@@ -187,7 +187,7 @@
             }
             for (TaskItem item : taskItems) {
                 WaveItem waveItem = waveItemService.getById(item.getSource());
-                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);
                 if (workQty.compareTo(waveItem.getAnfme()) < 0) {
                     waveItem.setExceStatus(WaveExceStatus.WAVE_EXCE_STATUS_EXCING.val);

--
Gitblit v1.9.1