From 34dd354c55ffff3339a3232a7a1ba6ec8fe49f60 Mon Sep 17 00:00:00 2001 From: jiangshuai <291802688@qq.com> Date: 星期六, 21 十月 2023 16:27:59 +0800 Subject: [PATCH] 1.修改报废信息接口增加基础作业类型 --- controllers/location_product_amount.go | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/controllers/location_product_amount.go b/controllers/location_product_amount.go index ce3bcf4..23c0ff3 100644 --- a/controllers/location_product_amount.go +++ b/controllers/location_product_amount.go @@ -77,10 +77,12 @@ return } } else { - records[k].AdjustAmount = operation.Details[0].Amount + if len(operation.Details) > 0 { + records[k].AdjustAmount = operation.Details[0].Amount + records[k].DifferenceAmount = v.Amount.Add(v.AdjustAmount) + } records[k].OperationId = operation.Id records[k].Status = operation.Status - records[k].DifferenceAmount = v.Amount.Add(v.AdjustAmount) } } util.ResponseFormatListWithPage(c, code.Success, records, int(total), params.Page, params.PageSize) -- Gitblit v1.8.0