From d6f4e3fe92d1da0c028ac61289a759cc4b8c993e Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期二, 14 十一月 2023 10:07:14 +0800
Subject: [PATCH] 获取出入库信息产品名称修改

---
 controllers/reorder_rule_controller.go |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/controllers/reorder_rule_controller.go b/controllers/reorder_rule_controller.go
index 69d8590..a2b1dbe 100644
--- a/controllers/reorder_rule_controller.go
+++ b/controllers/reorder_rule_controller.go
@@ -119,7 +119,7 @@
 		rule.Prediction = rule.Amount.Add(rule.Prediction)
 	}
 	//鍑哄簱灏辩华
-	operationType = []constvar.BaseOperationType{constvar.BaseOperationTypeOutgoing, constvar.BaseOperationTypeInternal}
+	operationType = []constvar.BaseOperationType{constvar.BaseOperationTypeOutgoing, constvar.BaseOperationTypeInternal, constvar.BaseOperationTypeDisuse}
 	amount, err = GetProductAmount(productIds, nil, locationIds, status, operationType)
 	if err != nil {
 		util.ResponseFormat(c, code.RequestParamError, "鏌ヨ閲嶈璐ц鍒欏垪琛ㄥけ璐�")
@@ -221,7 +221,7 @@
 	}
 	prediction = amount.Add(prediction)
 	//鍑哄簱灏辩华
-	operationType = []constvar.BaseOperationType{constvar.BaseOperationTypeOutgoing, constvar.BaseOperationTypeInternal}
+	operationType = []constvar.BaseOperationType{constvar.BaseOperationTypeOutgoing, constvar.BaseOperationTypeInternal, constvar.BaseOperationTypeDisuse}
 	list, err = GetProductAmount(productIds, nil, locationIds, status, operationType)
 	if err != nil {
 		util.ResponseFormat(c, code.RequestParamError, "鏌ヨ閲嶈璐ц鍒欏垪琛ㄥけ璐�")
@@ -334,7 +334,7 @@
 			return err
 		}
 		params.OrderNumber = decimal.NewFromInt(0)
-		err = models.NewReorderRuleSearch().SetID(params.Id).Update(&params)
+		err = models.NewReorderRuleSearch().SetOrm(db).SetID(params.Id).Update(&params)
 		return err
 	})
 	if err != nil {

--
Gitblit v1.8.0