From 32f4f2b0d507c99d9b4fb7d555b0c2523a92c503 Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期一, 15 四月 2024 15:08:12 +0800
Subject: [PATCH] 添加字段

---
 controllers/operation.go |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/controllers/operation.go b/controllers/operation.go
index c585774..216c091 100644
--- a/controllers/operation.go
+++ b/controllers/operation.go
@@ -1103,7 +1103,10 @@
 	}
 
 	db := mysqlx.GetDB().Table("wms_operation").
-		Select("wms_operation.id as operation_id,wms_operation.number,wms_operation.base_operation_type,material.id AS product_id,material.`name` AS product_name,wms_operation_details.amount,material.unit,wms_operation_details.from_location_id,from_location.`name` AS from_location,wms_operation_details.to_location_id,to_location.`name` AS to_location,wms_operation.operation_date as date,wms_operation.`status`").
+		Select("wms_operation.id as operation_id,wms_operation.number,wms_operation.base_operation_type,material.id AS product_id," +
+			"material.`name` AS product_name,wms_operation_details.amount,material.unit,wms_operation_details.from_location_id," +
+			"from_location.`name` AS from_location,wms_operation_details.to_location_id,to_location.`name` AS to_location," +
+			"wms_operation.operation_date as date,wms_operation.`status`,material.weight").
 		InnerJoins("inner join wms_operation_details ON wms_operation_details.operation_id = wms_operation.id").
 		InnerJoins("INNER JOIN material ON material.id = wms_operation_details.product_id").
 		InnerJoins("INNER JOIN wms_location AS from_location ON from_location.id = wms_operation_details.from_location_id").
@@ -1127,3 +1130,21 @@
 	}
 	util.ResponseFormatListWithPage(c, code.Success, records, int(total), params.Page, params.PageSize)
 }
+
+// GetPersonnelList
+// @Tags      鍏ュ簱/鍑哄簱
+// @Summary   鑾峰彇浜哄憳鍒楄〃
+// @Produce   application/json
+// @Param     object  body  request.OperationCondition true  "鍙傛暟"
+// @Success   200 {object} util.ResponseList{data=[]inventory_order.WorkerInfo} "鎴愬姛"
+// @Router    /api-wms/v1/operation/getPersonnelList [get]
+func (slf OperationController) GetPersonnelList(c *gin.Context) {
+	cli := inventory_order.NewInventoryOrderServiceClient(init_client.ApsConn)
+	list, err := cli.GetWorkerList(context.Background(), &inventory_order.GetWorkerListRequest{})
+	if err != nil {
+		util.ResponseFormat(c, code.RequestParamError, "鍐呴儴閿欒")
+		logx.Error("grpc璋冪敤澶辫触, GetPersonnelList err : " + err.Error())
+		return
+	}
+	util.ResponseFormat(c, code.Success, list.List)
+}

--
Gitblit v1.8.0