From f16252d8b4736a0212b14a2bfb0eeee411d0cc76 Mon Sep 17 00:00:00 2001 From: jiangshuai <291802688@qq.com> Date: 星期一, 13 十一月 2023 11:16:34 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/aps/WMS --- proto/product_inventory/server.go | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/proto/product_inventory/server.go b/proto/product_inventory/server.go index a4c77bf..5abf83f 100644 --- a/proto/product_inventory/server.go +++ b/proto/product_inventory/server.go @@ -93,7 +93,7 @@ Joins("left join wms_operation on wms_operation_details.operation_id = wms_operation.id"). Where("wms_operation_details.product_id in (?)", productIds). Where("wms_operation.from_location_id in (?)", locationIds).Where("wms_operation.status = ?", constvar.OperationStatus_Ready). - Where("wms_operation.base_operation_type in (?)", []constvar.BaseOperationType{constvar.BaseOperationTypeOutgoing, constvar.BaseOperationTypeInternal}). + Where("wms_operation.base_operation_type in (?)", []constvar.BaseOperationType{constvar.BaseOperationTypeOutgoing, constvar.BaseOperationTypeInternal, constvar.BaseOperationTypeDisuse}). Find(&canUse).Error if err != nil { return nil, err @@ -129,6 +129,7 @@ cu = cu.Add(info.Amount) } } + cu = at.Sub(cu) p.AvailableNumber = cu.String() products = append(products, &p) -- Gitblit v1.8.0