From 32ae1fdc5f62c4792f6c0541fbf31d717f3124a5 Mon Sep 17 00:00:00 2001 From: Leo Date: Fri, 25 Jul 2025 16:33:54 +0800 Subject: [PATCH] fix: supply.go --- cmd/supply.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/supply.go b/cmd/supply.go index ae0c041..4780aec 100644 --- a/cmd/supply.go +++ b/cmd/supply.go @@ -44,7 +44,7 @@ type exchange struct { outProject string goodsName string unit string - productsNums int + productsNums float64 realPrice float64 remainderRealAmount float64 inOut string @@ -145,16 +145,16 @@ func getDetail(id, inOut, changeNo, inProject, outProject, note string) { unit := v.Get("unit").String() productsNums := v.Get("productsNums").String() realPrice := v.Get("realPrice").String() - remainderRealAmount := v.Get("remainderRealAmount").String() + productsAmount := v.Get("productsAmount").String() ex := new(exchange) ex.changeNo = changeNo ex.inProject = inProject ex.outProject = outProject ex.goodsName = goodsName ex.unit = unit - ex.productsNums = cast.ToInt(productsNums) + ex.productsNums = cast.ToFloat64(productsNums) ex.realPrice = cast.ToFloat64(realPrice) - ex.remainderRealAmount = cast.ToFloat64(remainderRealAmount) + ex.remainderRealAmount = cast.ToFloat64(productsAmount) ex.note = note if inOut == "in" { ex.inOut = "调入"