From a10d59528a36dc5a1fbe4d9caa6b4abf25ab828c Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 12 一月 2024 10:49:08 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/aps/WMS

---
 proto/inventory_order/server.go |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/proto/inventory_order/server.go b/proto/inventory_order/server.go
index faa9a98..c38a32e 100644
--- a/proto/inventory_order/server.go
+++ b/proto/inventory_order/server.go
@@ -55,10 +55,12 @@
 		operation.Status = constvar.OperationStatus_Ready
 		operation.OperationTypeName = operationType.Name
 		operation.OperationTypeId = operationType.Id
-		operation.FromLocationID = fromLocation.Id
-		operation.ToLocationID = toLocation.Id
 		operation.BaseOperationType = constvar.BaseOperationTypeOutgoing
 		operation.Source = req.Source
+		operation.LocationID = fromLocation.Id
+		if req.OperationType == 1 {
+			operation.LocationID = toLocation.Id
+		}
 		or.WorkOrderId = operation.SourceNumber
 		or.Number = operation.Number
 		operationResp = append(operationResp, &or)
@@ -69,6 +71,8 @@
 			var detail models.OperationDetails
 			detail.ProductId = product.ProductNumber
 			detail.Amount = decimal.NewFromInt(product.Amount)
+			detail.FromLocationID = fromLocation.Id
+			detail.ToLocationID = toLocation.Id
 			details = append(details, &detail)
 		}
 		operation.Details = details

--
Gitblit v1.8.0