From a0125ef3d6ce35be7b6dc4919c4192dba4a7329a Mon Sep 17 00:00:00 2001 From: jiangshuai <291802688@qq.com> Date: 星期四, 16 十一月 2023 14:33:51 +0800 Subject: [PATCH] 报废数量bug --- controllers/operation.go | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/controllers/operation.go b/controllers/operation.go index d7912aa..1e56fd1 100644 --- a/controllers/operation.go +++ b/controllers/operation.go @@ -413,6 +413,7 @@ locAmount.ProductId = v.ID locAmount.CreateDate = time.Now().Format("2006-01-02 15:04:05") locAmount.Amount = locAmount.Amount.Add(value) + locAmount.ProductCategoryID = v.CategoryId if res := models.NewLocationProductAmountSearch().Orm.Where("id=?", locAmount.ID).Save(locAmount); res.Error != nil { return res.Error } @@ -462,6 +463,7 @@ locAmount.ProductId = v.ID locAmount.CreateDate = time.Now().Format("2006-01-02 15:04:05") locAmount.Amount = locAmount.Amount.Add(value) + locAmount.ProductCategoryID = v.CategoryId if res := models.NewLocationProductAmountSearch().Orm.Where("id=?", locAmount.ID).Save(locAmount); res.Error != nil { return res.Error } @@ -478,6 +480,7 @@ locAmount.ProductId = v.ID locAmount.CreateDate = time.Now().Format("2006-01-02 15:04:05") locAmount.Amount = locAmount.Amount.Add(value) + locAmount.ProductCategoryID = v.CategoryId if res := models.NewLocationProductAmountSearch().Orm.Where("id=?", locAmount.ID).Save(locAmount); res.Error != nil { return res.Error } @@ -611,6 +614,7 @@ locAmount.ProductId = v.ID locAmount.CreateDate = time.Now().Format("2006-01-02 15:04:05") locAmount.Amount = locAmount.Amount.Add(value) + locAmount.ProductCategoryID = v.CategoryId if res := models.NewLocationProductAmountSearch().Orm.Where("id=?", locAmount.ID).Save(locAmount); res.Error != nil { return res.Error } @@ -659,6 +663,7 @@ locAmount.ProductId = v.ID locAmount.CreateDate = time.Now().Format("2006-01-02 15:04:05") locAmount.Amount = locAmount.Amount.Add(value) + locAmount.ProductCategoryID = v.CategoryId if res := models.NewLocationProductAmountSearch().Orm.Where("id=?", locAmount.ID).Save(locAmount); res.Error != nil { return res.Error } -- Gitblit v1.8.0