From e1ec7e077a10938ce795c766915c5c5673dcf282 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期三, 20 三月 2024 19:08:10 +0800
Subject: [PATCH] crm发货申请补充发货单号
---
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