From ed81fc8d860adb66676d4990e4ce0ff56cff79a6 Mon Sep 17 00:00:00 2001 From: jiangshuai <291802688@qq.com> Date: 星期三, 22 十一月 2023 19:48:16 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/aps/WMS --- controllers/product_controller.go | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/controllers/product_controller.go b/controllers/product_controller.go index 96f9306..3a40e59 100644 --- a/controllers/product_controller.go +++ b/controllers/product_controller.go @@ -214,6 +214,22 @@ return } + //鏇存柊鍦ㄥ簱鐨勪骇鍝佺被鍨� + if params.CategoryId > 0 { + find, _ := models.NewLocationProductAmountSearch().SetProductId(params.ID).Find() + if len(find) > 0 { + var ids []int + for _, f := range find { + if f.ProductCategoryID != params.CategoryId { + ids = append(ids, f.Id) + } + } + m := make(map[string]interface{}) + m["productCategoryId"] = params.CategoryId + _ = models.NewLocationProductAmountSearch().SetIds(ids).UpdateByMap(m) + } + } + materialAttachmentList := []*models.MaterialAttachment{} for _, v := range params.AttachmentIDs { ma := &models.MaterialAttachment{MaterialID: params.ID, AttachmentID: v} -- Gitblit v1.8.0