From f64d02a1759906df7ea637913df1f4eec93811c7 Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期五, 24 十一月 2023 14:57:58 +0800
Subject: [PATCH] 查询指定操作详情
---
proto/product_inventory/server.go | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/proto/product_inventory/server.go b/proto/product_inventory/server.go
index a4c77bf..bb375e1 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)
@@ -155,7 +156,7 @@
}
operation.OperationTypeName = operationType.Name
operation.OperationTypeId = operationType.Id
- location, err := models.NewLocationSearch().SetJointNames([]string{warehouse.Code}).First()
+ location, err := models.NewLocationSearch().SetID(warehouse.LocationId).First()
if err != nil {
return nil, err
}
--
Gitblit v1.8.0