From 8397fb4c46d08d0332300f9fde1e7b3eb04845fe Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期六, 23 三月 2024 14:00:12 +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