From 3109c9a47ff73d7af857ccd668821a3eb13d16fe Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期四, 21 九月 2023 19:13:53 +0800
Subject: [PATCH] 位置模块添加拼接字段

---
 models/location.go      |    1 
 docs/swagger.yaml       |   15 +++++++
 controllers/location.go |    3 +
 docs/docs.go            |   22 +++++++++++
 docs/swagger.json       |   20 ++++++++++
 5 files changed, 61 insertions(+), 0 deletions(-)

diff --git a/controllers/location.go b/controllers/location.go
index 595a2ba..682c1f0 100644
--- a/controllers/location.go
+++ b/controllers/location.go
@@ -60,6 +60,9 @@
 		util.ResponseFormat(c, code.RequestParamError, "鏌ユ壘澶辫触")
 		return
 	}
+	for _, location := range list {
+		location.JointName = location.ParentId + "/" + location.Name
+	}
 
 	util.ResponseFormatList(c, code.Success, list, int(total))
 }
diff --git a/docs/docs.go b/docs/docs.go
index 0e06838..bce2dc6 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -1618,8 +1618,20 @@
                     "description": "浣嶇疆鍚嶇О",
                     "type": "string"
                 },
+                "nextCount": {
+                    "description": "涓嬫鐩樼偣",
+                    "type": "string"
+                },
+                "notes": {
+                    "description": "澶栭儴澶囨敞",
+                    "type": "string"
+                },
                 "parentId": {
                     "description": "涓婄骇id",
+                    "type": "string"
+                },
+                "recentlyCount": {
+                    "description": "鏈�杩戠洏鐐�",
                     "type": "string"
                 },
                 "replenishLocation": {
@@ -1893,11 +1905,19 @@
                     "description": "榛樿婧愪綅缃甶d",
                     "type": "integer"
                 },
+                "earlyOperations": {
+                    "description": "棰勫~鍐欎綔涓氳鎯�",
+                    "type": "boolean"
+                },
                 "id": {
                     "type": "integer"
                 },
                 "name": {
                     "description": "浠撳簱鍚嶇О",
+                    "type": "string"
+                },
+                "prefix": {
+                    "description": "鍓嶇紑",
                     "type": "string"
                 },
                 "printLabel": {
@@ -2553,6 +2573,8 @@
 	Description:      "",
 	InfoInstanceName: "swagger",
 	SwaggerTemplate:  docTemplate,
+	LeftDelim:        "{{",
+	RightDelim:       "}}",
 }
 
 func init() {
diff --git a/docs/swagger.json b/docs/swagger.json
index e4afa48..cfa2f3c 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -1606,8 +1606,20 @@
                     "description": "浣嶇疆鍚嶇О",
                     "type": "string"
                 },
+                "nextCount": {
+                    "description": "涓嬫鐩樼偣",
+                    "type": "string"
+                },
+                "notes": {
+                    "description": "澶栭儴澶囨敞",
+                    "type": "string"
+                },
                 "parentId": {
                     "description": "涓婄骇id",
+                    "type": "string"
+                },
+                "recentlyCount": {
+                    "description": "鏈�杩戠洏鐐�",
                     "type": "string"
                 },
                 "replenishLocation": {
@@ -1881,6 +1893,10 @@
                     "description": "榛樿婧愪綅缃甶d",
                     "type": "integer"
                 },
+                "earlyOperations": {
+                    "description": "棰勫~鍐欎綔涓氳鎯�",
+                    "type": "boolean"
+                },
                 "id": {
                     "type": "integer"
                 },
@@ -1888,6 +1904,10 @@
                     "description": "浠撳簱鍚嶇О",
                     "type": "string"
                 },
+                "prefix": {
+                    "description": "鍓嶇紑",
+                    "type": "string"
+                },
                 "printLabel": {
                     "description": "鏄惁鎵撳嵃鏍囩",
                     "type": "boolean"
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index 34d9940..0ffdc96 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -244,8 +244,17 @@
       name:
         description: 浣嶇疆鍚嶇О
         type: string
+      nextCount:
+        description: 涓嬫鐩樼偣
+        type: string
+      notes:
+        description: 澶栭儴澶囨敞
+        type: string
       parentId:
         description: 涓婄骇id
+        type: string
+      recentlyCount:
+        description: 鏈�杩戠洏鐐�
         type: string
       replenishLocation:
         description: 鏄惁琛ュ厖浣嶇疆
@@ -442,11 +451,17 @@
       defaultLocationSrcId:
         description: 榛樿婧愪綅缃甶d
         type: integer
+      earlyOperations:
+        description: 棰勫~鍐欎綔涓氳鎯�
+        type: boolean
       id:
         type: integer
       name:
         description: 浠撳簱鍚嶇О
         type: string
+      prefix:
+        description: 鍓嶇紑
+        type: string
       printLabel:
         description: 鏄惁鎵撳嵃鏍囩
         type: boolean
diff --git a/models/location.go b/models/location.go
index ff81758..394e0bb 100644
--- a/models/location.go
+++ b/models/location.go
@@ -25,6 +25,7 @@
 		Notes                string                        `json:"notes" gorm:"type:varchar(255);comment:澶栭儴澶囨敞"`           //澶栭儴澶囨敞
 		RecentlyCount        string                        `json:"recentlyCount" gorm:"type:varchar(255);comment:鏈�杩戠洏鐐�"`   //鏈�杩戠洏鐐�
 		NextCount            string                        `json:"nextCount" gorm:"type:varchar(255);comment:涓嬫鐩樼偣"`       //涓嬫鐩樼偣
+		JointName            string                        `json:"jointName" gorm:"-"`                                    //鎷兼帴鍚嶇О
 	}
 
 	LocationSearch struct {

--
Gitblit v1.8.0