From 5991f5ab76fc9d1c0cc56d2c37b82d5503a6d0a9 Mon Sep 17 00:00:00 2001
From: yinbentan <yinbentan@live.com>
Date: 星期六, 06 七月 2024 18:01:20 +0800
Subject: [PATCH] 出入库明细筛选添加仓库关联,防止脏数据污染

---
 service/history_forms.go |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/service/history_forms.go b/service/history_forms.go
index e29b868..906354e 100644
--- a/service/history_forms.go
+++ b/service/history_forms.go
@@ -96,7 +96,7 @@
 	for _, location := range locations {
 		locationIds = append(locationIds, location.Id)
 	}
-	search.Orm = search.Orm.Where("from_location_id in ? or to_location_id in ?", ids, ids)
+	search.Orm = search.Orm.Where("from_location_id in ? or to_location_id in ?", locationIds, locationIds)
 
 	return search, err
 }

--
Gitblit v1.8.0