From ed81fc8d860adb66676d4990e4ce0ff56cff79a6 Mon Sep 17 00:00:00 2001
From: jiangshuai <291802688@qq.com>
Date: 星期三, 22 十一月 2023 19:48:16 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/aps/WMS

---
 main.go |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/main.go b/main.go
index c6017aa..acfe495 100644
--- a/main.go
+++ b/main.go
@@ -15,7 +15,9 @@
 	"wms/models"
 	"wms/pkg/logx"
 	"wms/proto/product_inventory"
+	"wms/proto/purchase_wms"
 	"wms/router"
+	"wms/service"
 )
 
 func main() {
@@ -46,6 +48,7 @@
 	//鍚姩grpc瀹㈡埛绔�
 	go controllers.InitInventoryOrderServiceConn()
 	go controllers.InitProductInventoryServiceConn()
+	go controllers.InitCodeServiceConn()
 	//鍚姩grpc鏈嶅姟
 	go func() {
 		ln, err := net.Listen("tcp", ":"+conf.WebConf.GrpcPort)
@@ -57,12 +60,17 @@
 		s := grpc.NewServer()
 		//todo 娣诲姞鍏蜂綋鏈嶅姟
 		product_inventory.RegisterProductInventoryServiceServer(s, &product_inventory.Server{})
+		purchase_wms.RegisterPurchaseServiceServer(s, &purchase_wms.Server{})
 		err = s.Serve(ln)
 		if err != nil {
 			logx.Errorf("grpc server init error: %v", err.Error())
 			panic(fmt.Sprintf("grpc server init error: %v", err.Error()))
 		}
 	}()
+
+	go service.InitLocationReportData()
+	go service.InitHistoryReportData()
+
 	logx.Error(server.ListenAndServe().Error())
 }
 
@@ -78,6 +86,7 @@
 
 	controllers.CloseInventoryOrderServiceConn()
 	controllers.CloseProductInventoryServiceConn()
+	controllers.CloseCodeServiceConn()
 	// 鍏抽棴HTTP鏈嶅姟鍣�
 	if err := server.Shutdown(ctx); err != nil {
 		logx.Infof("鏈嶅姟浼橀泤閫�鍑哄け璐�: %v", err)

--
Gitblit v1.8.0