From 230ce554d9a42e5c1e322bf13d186f87651edd96 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期五, 12 一月 2024 10:49:03 +0800 Subject: [PATCH] 物料只查有库存的 --- models/operation_type.go | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/models/operation_type.go b/models/operation_type.go index 5c1c4b3..4857259 100644 --- a/models/operation_type.go +++ b/models/operation_type.go @@ -36,6 +36,7 @@ ReturnOperationType string `json:"returnOperationType" gorm:"-"` //閫�璐х被鍨嬪悕绉� ReadyCount int `json:"readyCount" gorm:"-"` //灏辩华鏁伴噺 FinishCount int `json:"finishCount" gorm:"-"` //瀹屾垚鏁伴噺 + CancelCount int `json:"cancelCount" gorm:"-"` //鍙栨秷鏁伴噺 } OperationTypeSearch struct { @@ -135,6 +136,10 @@ db = db.Where("warehouse_id = ?", slf.WarehouseId) } + if int(slf.BaseOperationType) != 0 { + db = db.Where("base_operation_type = ?", slf.BaseOperationType) + } + return db } -- Gitblit v1.8.0