liujiandao
2024-03-30 aeed976c2999e2cea097cdee38d8baeefe323f3d
proto/product_inventory/server.go
@@ -174,6 +174,7 @@
   operation.ReceiverPhone = req.Phone
   operation.ReceiverAddr = req.Address
   operation.Source = req.Source
   operation.OperationSource = constvar.OperationSource(req.OperationSource)
   operation.CompanyID = int(req.ClientId)
   operation.CompanyName = req.ClientName
   if req.DeliverType == 1 {
@@ -330,6 +331,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("参数缺失")
   }
@@ -445,21 +447,22 @@
         productHasSendAmount[productNumber] = productHasSendAmount[productNumber].Add(locationSendAmount)
      }
      outputInfoList = append(outputInfoList, &service.OutputInfo{
         LocationID:   int(locationID),
         WarehouseID:  int(LocationIDWarehouseIDMap[locationID]),
         Products:     productInfoList,
         OperationID:  0,
         SourceNumber: req.OrderNumber,
         LocationID:        int(locationID),
         WarehouseID:       int(LocationIDWarehouseIDMap[locationID]),
         Products:          productInfoList,
         OperationID:       0,
         SourceNumber:      req.OrderNumber,
         SaleDetailsNumber: req.OrderNumber,
      })
   }
   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
}