From d3cf73c4718bc1972565277f038434a34f03907c Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期二, 26 三月 2024 14:23:56 +0800
Subject: [PATCH] 操作明细添加销售明细编码

---
 proto/purchase_wms/server.go |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/proto/purchase_wms/server.go b/proto/purchase_wms/server.go
index 80f4c71..cbab86d 100644
--- a/proto/purchase_wms/server.go
+++ b/proto/purchase_wms/server.go
@@ -24,8 +24,9 @@
 	operation.Number = strconv.FormatInt(time.Now().Unix(), 10)
 	operation.Status = constvar.OperationStatus_Ready
 	operation.CompanyName = req.SupplierName
+	operation.CompanyID = int(req.SupplierId)
 	operation.Source = req.Source
-	warehouse, err := models.NewWarehouseSearch().First()
+	warehouse, err := models.NewWarehouseSearch().SetName(req.WarehouseName).First()
 	if err != nil {
 		return nil, err
 	}
@@ -100,9 +101,7 @@
 		index := strings.LastIndex(operation.OperationTypeName, "-")
 		so.WarehouseName = operation.OperationTypeName[:index]
 		so.Status = int64(operation.Status)
-		if operation.Status == constvar.OperationStatus_Finish {
-			so.OverTime = operation.UpdateTime
-		}
+		so.OverTime = operation.CreateTime
 		for _, detail := range operation.Details {
 			s := so
 			s.ProductId = detail.ProductId

--
Gitblit v1.8.0