From 194ec646259446eb39b3b5ed50dbba270d96c9b4 Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期五, 22 三月 2024 16:32:02 +0800
Subject: [PATCH] srm创建入库单
---
proto/product_inventory/server.go | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/proto/product_inventory/server.go b/proto/product_inventory/server.go
index 274d478..adac6c4 100644
--- a/proto/product_inventory/server.go
+++ b/proto/product_inventory/server.go
@@ -330,6 +330,7 @@
}
func (s *Server) OrderProductOutput(ctx context.Context, req *OrderProductOutputRequest) (resp *OrderProductOutputResponse, err error) {
+ resp = new(OrderProductOutputResponse)
if req.OrderNumber == "" || len(req.Products) == 0 {
return nil, errors.New("鍙傛暟缂哄け")
}
@@ -435,6 +436,9 @@
} else {
locationSendAmount = productAmount
}
+ if locationSendAmount.LessThanOrEqual(decimal.Zero) {
+ continue
+ }
productInfoList = append(productInfoList, &service.ProductInfo{
ProductID: productNumber,
Amount: locationSendAmount,
@@ -453,10 +457,10 @@
err = service.AddOutputOperations(outputInfoList)
if err != nil {
+ logx.Errorf("OrderProductOutput AddOutputOperations err:%v", err)
return nil, err
}
-
resp.Code = 1
resp.Msg = "success"
- return nil, nil
+ return resp, nil
}
--
Gitblit v1.8.0