From f80c6068d5e2ae5b9101125497b4de88726e1d9e Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期日, 07 四月 2024 21:44:58 +0800
Subject: [PATCH] 发货接口增加仓库ID

---
 service/quotation.go |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/service/quotation.go b/service/quotation.go
index ede0edc..3f32563 100644
--- a/service/quotation.go
+++ b/service/quotation.go
@@ -9,6 +9,15 @@
 type QuotationService struct{}
 
 func (QuotationService) AddQuotation(quotation *model.Quotation) int {
+	//鏍规嵁閿�鍞満浼歩d鍘绘煡璇㈠鎴穒d
+	if quotation.ClientId == 0 {
+		record, err := model.NewSaleChanceSearch().SetId(quotation.SaleChanceId).Find()
+		if err != nil {
+			return ecode.SaleChanceNotExist
+		}
+		quotation.ClientId = record.ClientId
+		quotation.ContactId = record.ContactId
+	}
 	err := model.NewQuotationSearch(nil).Create(quotation)
 	if err != nil {
 		return ecode.QuotationExist

--
Gitblit v1.8.0