From 1a8bf79751c3a832ffbe6a2430db14f994b7e2bd Mon Sep 17 00:00:00 2001 From: qiankanghui Date: Tue, 18 Aug 2026 09:36:05 +0800 Subject: [PATCH] =?UTF-8?q?fix(inventory):=20=E4=BF=AE=E5=A4=8D=E5=BA=93?= =?UTF-8?q?=E5=AD=98=E6=95=B0=E9=87=8F=E5=AD=97=E6=AE=B5=E7=B2=BE=E5=BA=A6?= =?UTF-8?q?=E5=A4=84=E7=90=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改了QtyOnHand字段的查询逻辑,添加ROUND函数确保数值精度为3位小数 - 对空值进行ISNULL处理,避免数据库中null值导致的计算异常 - 确保库存数量显示的一致性和准确性 --- src/main/resources/mapper/pms/InventoryStockMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/mapper/pms/InventoryStockMapper.xml b/src/main/resources/mapper/pms/InventoryStockMapper.xml index b82c2d9..6f4fa8d 100644 --- a/src/main/resources/mapper/pms/InventoryStockMapper.xml +++ b/src/main/resources/mapper/pms/InventoryStockMapper.xml @@ -221,7 +221,7 @@ p.PartDescription AS partDescription, istk.BatchNo AS batchNo, istk.LocationID AS locationId, - istk.QtyOnHand AS qtyOnHand, + ROUND(ISNULL(istk.QtyOnHand, 0), 3) AS qtyOnHand, istk.FirstInDate AS firstInDate, istk.LatestOutDate AS latestOutDate, istk.LatestInDate AS latestInDate,