From 9c7551a7a752c07db11b0fd23bfba8da1ad062e0 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 21 六月 2024 20:39:12 +0800
Subject: [PATCH] fix 404
---
controllers/attribute.go | 4
docs/swagger.yaml | 265 ++++++++++++++
docs/docs.go | 401 ++++++++++++++++++++++
docs/swagger.json | 401 ++++++++++++++++++++++
router/router.go | 2
5 files changed, 1,056 insertions(+), 17 deletions(-)
diff --git a/controllers/attribute.go b/controllers/attribute.go
index 079fb27..7e804aa 100644
--- a/controllers/attribute.go
+++ b/controllers/attribute.go
@@ -146,9 +146,9 @@
// @Tags 灞炴�у�煎拰瀵硅薄
// @Summary 娣诲姞灞炴�у�煎拰瀵硅薄
// @Produce application/json
-// @Param object body request.GetAttributeList true "灞炴�у�煎拰瀵硅薄淇℃伅"
+// @Param object body request.AttributeList true "灞炴�у�煎拰瀵硅薄淇℃伅"
// @Success 200 {object} util.Response "鎴愬姛"
-// @Router /api-wms/v1/attribute/list [post]
+// @Router /api-wms/v1/attribute/attribute [post]
func (slf AttributeController) ListAttribute(c *gin.Context) {
var params request.AttributeList
if err := c.ShouldBind(¶ms); err != nil {
diff --git a/docs/docs.go b/docs/docs.go
index 56ac84f..a30715f 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -166,6 +166,251 @@
}
}
},
+ "/api-wms/v1/attribute/attribute": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "灞炴�у�煎拰瀵硅薄"
+ ],
+ "summary": "娣诲姞灞炴�у�煎拰瀵硅薄",
+ "parameters": [
+ {
+ "description": "灞炴�у�煎拰瀵硅薄淇℃伅",
+ "name": "object",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/request.AttributeList"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/util.Response"
+ }
+ }
+ }
+ }
+ },
+ "/api-wms/v1/attribute/delete/{id}": {
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "灞炴��"
+ ],
+ "summary": "鍒犻櫎灞炴��",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "token",
+ "name": "Authorization",
+ "in": "header",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "灞炴�d",
+ "name": "id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/util.Response"
+ }
+ }
+ }
+ }
+ },
+ "/api-wms/v1/attribute/primary/{id}": {
+ "get": {
+ "tags": [
+ "灞炴�у�煎拰瀵硅薄"
+ ],
+ "summary": "鏌ヨ灞炴�у�煎拰瀵硅薄 閫氳繃涓婚敭ID鏌ヨ",
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/util.Response"
+ }
+ }
+ }
+ }
+ },
+ "/api-wms/v1/attribute/updateAttribute/{id}": {
+ "put": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "灞炴��"
+ ],
+ "summary": "缂栬緫灞炴��",
+ "parameters": [
+ {
+ "description": "灞炴�т俊鎭�",
+ "name": "object",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/request.UpdateAttribute"
+ }
+ },
+ {
+ "type": "string",
+ "description": "灞炴�d",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "token",
+ "name": "Authorization",
+ "in": "header",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/util.Response"
+ }
+ }
+ }
+ }
+ },
+ "/api-wms/v1/attributeValue/add": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "灞炴�у�煎拰瀵硅薄"
+ ],
+ "summary": "娣诲姞灞炴�у�煎拰瀵硅薄",
+ "parameters": [
+ {
+ "description": "灞炴�у�煎拰瀵硅薄淇℃伅",
+ "name": "object",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/request.AddAttributeValue"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/util.Response"
+ }
+ }
+ }
+ }
+ },
+ "/api-wms/v1/attributeValue/delete/{id}": {
+ "delete": {
+ "tags": [
+ "灞炴�у�煎拰瀵硅薄"
+ ],
+ "summary": "鍒犻櫎灞炴�у�煎拰瀵硅薄",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "id",
+ "name": "id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/util.Response"
+ }
+ }
+ }
+ }
+ },
+ "/api-wms/v1/attributeValue/list": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "灞炴�у�煎拰瀵硅薄"
+ ],
+ "summary": "鏌ヨ灞炴�у�煎拰瀵硅薄 鍒嗛〉鏉′欢绛涢�塚alue like '%v%' 妯$硦鏌ヨ",
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/util.Response"
+ }
+ }
+ }
+ }
+ },
+ "/api-wms/v1/attributeValue/primary/{id}": {
+ "get": {
+ "tags": [
+ "灞炴�у�煎拰瀵硅薄"
+ ],
+ "summary": "鏌ヨ灞炴�у�煎拰瀵硅薄 閫氳繃涓婚敭ID鏌ヨ",
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/util.Response"
+ }
+ }
+ }
+ }
+ },
+ "/api-wms/v1/attributeValue/update": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "灞炴�у�煎拰瀵硅薄"
+ ],
+ "summary": "鏇存柊灞炴�у�煎拰瀵硅薄",
+ "parameters": [
+ {
+ "description": "灞炴�у�煎拰瀵硅薄淇℃伅",
+ "name": "object",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/request.UpdateAttributeValue"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/util.Response"
+ }
+ }
+ }
+ }
+ },
"/api-wms/v1/code/getAutoCode": {
"post": {
"produces": [
@@ -2423,6 +2668,25 @@
}
}
},
+ "/api-wms/v1/product/inputProduct": {
+ "post": {
+ "produces": [
+ "application/xlsx"
+ ],
+ "tags": [
+ "鐗╂枡绠$悊"
+ ],
+ "summary": "瀵煎叆鐗╂枡",
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/util.Response"
+ }
+ }
+ }
+ }
+ },
"/api-wms/v1/product/listDisuse": {
"post": {
"produces": [
@@ -3827,6 +4091,10 @@
"description": "鎴愭湰",
"type": "number"
},
+ "createBy": {
+ "description": "鍒涘缓浜�",
+ "type": "string"
+ },
"currencyName": {
"description": "甯佺鍚嶇О",
"type": "string"
@@ -4215,9 +4483,6 @@
}
]
},
- "checkedAt": {
- "type": "string"
- },
"checkedBy": {
"type": "string"
},
@@ -4256,6 +4521,10 @@
},
"id": {
"type": "integer"
+ },
+ "isInternalOutput": {
+ "description": "鏄惁璋冩嫧浜х敓鐨勫嚭搴�",
+ "type": "boolean"
},
"location": {
"description": "婧愪綅缃�",
@@ -4374,6 +4643,10 @@
"auxiliaryUnit": {
"type": "string"
},
+ "cost": {
+ "description": "鎴愭湰鍗曚环",
+ "type": "number"
+ },
"createTime": {
"type": "string"
},
@@ -4392,8 +4665,9 @@
"id": {
"type": "integer"
},
- "note": {
- "type": "string"
+ "isInternalOutput": {
+ "description": "鏄惁璋冩嫧浜х敓鐨勫嚭搴�",
+ "type": "boolean"
},
"operationId": {
"description": "鎿嶄綔id",
@@ -4410,6 +4684,13 @@
"productId": {
"description": "浜у搧id",
"type": "string"
+ },
+ "remark": {
+ "type": "string"
+ },
+ "salePrice": {
+ "description": "閿�鍞崟浠�",
+ "type": "number"
},
"toLocation": {
"description": "鐩爣浣嶇疆",
@@ -4651,6 +4932,43 @@
},
"warehouseLocation": {
"description": "搴撳瓨浣嶇疆",
+ "type": "string"
+ }
+ }
+ },
+ "request.AddAttribute": {
+ "type": "object",
+ "properties": {
+ "dataType": {
+ "description": "鍊肩被鍨嬶紙1瀛楃涓� 2 int 3 涓嬫媺妗� 锛�",
+ "type": "integer"
+ },
+ "entityType": {
+ "description": "缁欒皝鐢ㄧ殑 1 鐗╂枡锛堜骇鍝侊級",
+ "type": "integer"
+ },
+ "name": {
+ "description": "灞炴�у悕绉�",
+ "type": "string"
+ },
+ "selectValues": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "request.AddAttributeValue": {
+ "type": "object",
+ "properties": {
+ "attributeId": {
+ "type": "integer"
+ },
+ "entityId": {
+ "type": "string"
+ },
+ "value": {
"type": "string"
}
}
@@ -4984,6 +5302,25 @@
}
}
},
+ "request.AttributeList": {
+ "type": "object",
+ "properties": {
+ "entityType": {
+ "type": "integer"
+ },
+ "keyword": {
+ "type": "string"
+ },
+ "page": {
+ "description": "椤电爜",
+ "type": "integer"
+ },
+ "pageSize": {
+ "description": "姣忛〉澶у皬",
+ "type": "integer"
+ }
+ }
+ },
"request.DoMonthStats": {
"type": "object",
"properties": {
@@ -5296,6 +5633,10 @@
"description": "杈呭姪鍗曚綅",
"type": "string"
},
+ "cost": {
+ "description": "鎴愭湰鍗曚环",
+ "type": "number"
+ },
"fromLocationId": {
"description": "Unit string ` + "`" + `json:\"unit\" gorm:\"type:varchar(31);comment:鍗曚綅\"` + "`" + ` //鍗曚綅\nProduct models.Material ` + "`" + `json:\"product\" gorm:\"foreignKey:ProductId;references:ID\"` + "`" + `",
"type": "integer"
@@ -5303,6 +5644,13 @@
"productId": {
"description": "浜у搧id",
"type": "string"
+ },
+ "remark": {
+ "type": "string"
+ },
+ "salePrice": {
+ "description": "閿�鍞崟浠�",
+ "type": "number"
},
"toLocationId": {
"description": "鐩爣浣嶇疆id",
@@ -5426,6 +5774,49 @@
}
}
},
+ "request.UpdateAttribute": {
+ "type": "object",
+ "properties": {
+ "dataType": {
+ "description": "鍊肩被鍨嬶紙1瀛楃涓� 2 int 3 涓嬫媺妗� 锛�",
+ "type": "integer"
+ },
+ "entityType": {
+ "description": "缁欒皝鐢ㄧ殑 1 鐗╂枡锛堜骇鍝侊級",
+ "type": "integer"
+ },
+ "id": {
+ "type": "integer"
+ },
+ "name": {
+ "description": "灞炴�у悕绉�",
+ "type": "string"
+ },
+ "selectValues": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "request.UpdateAttributeValue": {
+ "type": "object",
+ "properties": {
+ "attributeId": {
+ "type": "integer"
+ },
+ "entityId": {
+ "type": "string"
+ },
+ "id": {
+ "type": "integer"
+ },
+ "value": {
+ "type": "string"
+ }
+ }
+ },
"request.UpdateCompany": {
"type": "object",
"properties": {
diff --git a/docs/swagger.json b/docs/swagger.json
index 78a2dd8..e2c314e 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -154,6 +154,251 @@
}
}
},
+ "/api-wms/v1/attribute/attribute": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "灞炴�у�煎拰瀵硅薄"
+ ],
+ "summary": "娣诲姞灞炴�у�煎拰瀵硅薄",
+ "parameters": [
+ {
+ "description": "灞炴�у�煎拰瀵硅薄淇℃伅",
+ "name": "object",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/request.AttributeList"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/util.Response"
+ }
+ }
+ }
+ }
+ },
+ "/api-wms/v1/attribute/delete/{id}": {
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "灞炴��"
+ ],
+ "summary": "鍒犻櫎灞炴��",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "token",
+ "name": "Authorization",
+ "in": "header",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "灞炴�d",
+ "name": "id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/util.Response"
+ }
+ }
+ }
+ }
+ },
+ "/api-wms/v1/attribute/primary/{id}": {
+ "get": {
+ "tags": [
+ "灞炴�у�煎拰瀵硅薄"
+ ],
+ "summary": "鏌ヨ灞炴�у�煎拰瀵硅薄 閫氳繃涓婚敭ID鏌ヨ",
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/util.Response"
+ }
+ }
+ }
+ }
+ },
+ "/api-wms/v1/attribute/updateAttribute/{id}": {
+ "put": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "灞炴��"
+ ],
+ "summary": "缂栬緫灞炴��",
+ "parameters": [
+ {
+ "description": "灞炴�т俊鎭�",
+ "name": "object",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/request.UpdateAttribute"
+ }
+ },
+ {
+ "type": "string",
+ "description": "灞炴�d",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "string",
+ "description": "token",
+ "name": "Authorization",
+ "in": "header",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/util.Response"
+ }
+ }
+ }
+ }
+ },
+ "/api-wms/v1/attributeValue/add": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "灞炴�у�煎拰瀵硅薄"
+ ],
+ "summary": "娣诲姞灞炴�у�煎拰瀵硅薄",
+ "parameters": [
+ {
+ "description": "灞炴�у�煎拰瀵硅薄淇℃伅",
+ "name": "object",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/request.AddAttributeValue"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/util.Response"
+ }
+ }
+ }
+ }
+ },
+ "/api-wms/v1/attributeValue/delete/{id}": {
+ "delete": {
+ "tags": [
+ "灞炴�у�煎拰瀵硅薄"
+ ],
+ "summary": "鍒犻櫎灞炴�у�煎拰瀵硅薄",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "id",
+ "name": "id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/util.Response"
+ }
+ }
+ }
+ }
+ },
+ "/api-wms/v1/attributeValue/list": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "灞炴�у�煎拰瀵硅薄"
+ ],
+ "summary": "鏌ヨ灞炴�у�煎拰瀵硅薄 鍒嗛〉鏉′欢绛涢�塚alue like '%v%' 妯$硦鏌ヨ",
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/util.Response"
+ }
+ }
+ }
+ }
+ },
+ "/api-wms/v1/attributeValue/primary/{id}": {
+ "get": {
+ "tags": [
+ "灞炴�у�煎拰瀵硅薄"
+ ],
+ "summary": "鏌ヨ灞炴�у�煎拰瀵硅薄 閫氳繃涓婚敭ID鏌ヨ",
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/util.Response"
+ }
+ }
+ }
+ }
+ },
+ "/api-wms/v1/attributeValue/update": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "灞炴�у�煎拰瀵硅薄"
+ ],
+ "summary": "鏇存柊灞炴�у�煎拰瀵硅薄",
+ "parameters": [
+ {
+ "description": "灞炴�у�煎拰瀵硅薄淇℃伅",
+ "name": "object",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/request.UpdateAttributeValue"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/util.Response"
+ }
+ }
+ }
+ }
+ },
"/api-wms/v1/code/getAutoCode": {
"post": {
"produces": [
@@ -2411,6 +2656,25 @@
}
}
},
+ "/api-wms/v1/product/inputProduct": {
+ "post": {
+ "produces": [
+ "application/xlsx"
+ ],
+ "tags": [
+ "鐗╂枡绠$悊"
+ ],
+ "summary": "瀵煎叆鐗╂枡",
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/util.Response"
+ }
+ }
+ }
+ }
+ },
"/api-wms/v1/product/listDisuse": {
"post": {
"produces": [
@@ -3815,6 +4079,10 @@
"description": "鎴愭湰",
"type": "number"
},
+ "createBy": {
+ "description": "鍒涘缓浜�",
+ "type": "string"
+ },
"currencyName": {
"description": "甯佺鍚嶇О",
"type": "string"
@@ -4203,9 +4471,6 @@
}
]
},
- "checkedAt": {
- "type": "string"
- },
"checkedBy": {
"type": "string"
},
@@ -4244,6 +4509,10 @@
},
"id": {
"type": "integer"
+ },
+ "isInternalOutput": {
+ "description": "鏄惁璋冩嫧浜х敓鐨勫嚭搴�",
+ "type": "boolean"
},
"location": {
"description": "婧愪綅缃�",
@@ -4362,6 +4631,10 @@
"auxiliaryUnit": {
"type": "string"
},
+ "cost": {
+ "description": "鎴愭湰鍗曚环",
+ "type": "number"
+ },
"createTime": {
"type": "string"
},
@@ -4380,8 +4653,9 @@
"id": {
"type": "integer"
},
- "note": {
- "type": "string"
+ "isInternalOutput": {
+ "description": "鏄惁璋冩嫧浜х敓鐨勫嚭搴�",
+ "type": "boolean"
},
"operationId": {
"description": "鎿嶄綔id",
@@ -4398,6 +4672,13 @@
"productId": {
"description": "浜у搧id",
"type": "string"
+ },
+ "remark": {
+ "type": "string"
+ },
+ "salePrice": {
+ "description": "閿�鍞崟浠�",
+ "type": "number"
},
"toLocation": {
"description": "鐩爣浣嶇疆",
@@ -4639,6 +4920,43 @@
},
"warehouseLocation": {
"description": "搴撳瓨浣嶇疆",
+ "type": "string"
+ }
+ }
+ },
+ "request.AddAttribute": {
+ "type": "object",
+ "properties": {
+ "dataType": {
+ "description": "鍊肩被鍨嬶紙1瀛楃涓� 2 int 3 涓嬫媺妗� 锛�",
+ "type": "integer"
+ },
+ "entityType": {
+ "description": "缁欒皝鐢ㄧ殑 1 鐗╂枡锛堜骇鍝侊級",
+ "type": "integer"
+ },
+ "name": {
+ "description": "灞炴�у悕绉�",
+ "type": "string"
+ },
+ "selectValues": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "request.AddAttributeValue": {
+ "type": "object",
+ "properties": {
+ "attributeId": {
+ "type": "integer"
+ },
+ "entityId": {
+ "type": "string"
+ },
+ "value": {
"type": "string"
}
}
@@ -4972,6 +5290,25 @@
}
}
},
+ "request.AttributeList": {
+ "type": "object",
+ "properties": {
+ "entityType": {
+ "type": "integer"
+ },
+ "keyword": {
+ "type": "string"
+ },
+ "page": {
+ "description": "椤电爜",
+ "type": "integer"
+ },
+ "pageSize": {
+ "description": "姣忛〉澶у皬",
+ "type": "integer"
+ }
+ }
+ },
"request.DoMonthStats": {
"type": "object",
"properties": {
@@ -5284,6 +5621,10 @@
"description": "杈呭姪鍗曚綅",
"type": "string"
},
+ "cost": {
+ "description": "鎴愭湰鍗曚环",
+ "type": "number"
+ },
"fromLocationId": {
"description": "Unit string `json:\"unit\" gorm:\"type:varchar(31);comment:鍗曚綅\"` //鍗曚綅\nProduct models.Material `json:\"product\" gorm:\"foreignKey:ProductId;references:ID\"`",
"type": "integer"
@@ -5291,6 +5632,13 @@
"productId": {
"description": "浜у搧id",
"type": "string"
+ },
+ "remark": {
+ "type": "string"
+ },
+ "salePrice": {
+ "description": "閿�鍞崟浠�",
+ "type": "number"
},
"toLocationId": {
"description": "鐩爣浣嶇疆id",
@@ -5414,6 +5762,49 @@
}
}
},
+ "request.UpdateAttribute": {
+ "type": "object",
+ "properties": {
+ "dataType": {
+ "description": "鍊肩被鍨嬶紙1瀛楃涓� 2 int 3 涓嬫媺妗� 锛�",
+ "type": "integer"
+ },
+ "entityType": {
+ "description": "缁欒皝鐢ㄧ殑 1 鐗╂枡锛堜骇鍝侊級",
+ "type": "integer"
+ },
+ "id": {
+ "type": "integer"
+ },
+ "name": {
+ "description": "灞炴�у悕绉�",
+ "type": "string"
+ },
+ "selectValues": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "request.UpdateAttributeValue": {
+ "type": "object",
+ "properties": {
+ "attributeId": {
+ "type": "integer"
+ },
+ "entityId": {
+ "type": "string"
+ },
+ "id": {
+ "type": "integer"
+ },
+ "value": {
+ "type": "string"
+ }
+ }
+ },
"request.UpdateCompany": {
"type": "object",
"properties": {
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index 206520a..f99e6fd 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -572,6 +572,9 @@
cost:
description: 鎴愭湰
type: number
+ createBy:
+ description: 鍒涘缓浜�
+ type: string
currencyName:
description: 甯佺鍚嶇О
type: string
@@ -850,8 +853,6 @@
allOf:
- $ref: '#/definitions/constvar.BaseOperationType'
description: 鍩虹浣滀笟绫诲瀷
- checkedAt:
- type: string
checkedBy:
type: string
comment:
@@ -878,6 +879,9 @@
type: array
id:
type: integer
+ isInternalOutput:
+ description: 鏄惁璋冩嫧浜х敓鐨勫嚭搴�
+ type: boolean
location:
allOf:
- $ref: '#/definitions/models.Location'
@@ -959,6 +963,9 @@
type: number
auxiliaryUnit:
type: string
+ cost:
+ description: 鎴愭湰鍗曚环
+ type: number
createTime:
type: string
fromLocation:
@@ -970,8 +977,9 @@
type: integer
id:
type: integer
- note:
- type: string
+ isInternalOutput:
+ description: 鏄惁璋冩嫧浜х敓鐨勫嚭搴�
+ type: boolean
operationId:
description: 鎿嶄綔id
type: integer
@@ -982,6 +990,11 @@
productId:
description: 浜у搧id
type: string
+ remark:
+ type: string
+ salePrice:
+ description: 閿�鍞崟浠�
+ type: number
toLocation:
allOf:
- $ref: '#/definitions/models.Location'
@@ -1145,6 +1158,31 @@
type: string
warehouseLocation:
description: 搴撳瓨浣嶇疆
+ type: string
+ type: object
+ request.AddAttribute:
+ properties:
+ dataType:
+ description: 鍊肩被鍨嬶紙1瀛楃涓� 2 int 3 涓嬫媺妗� 锛�
+ type: integer
+ entityType:
+ description: 缁欒皝鐢ㄧ殑 1 鐗╂枡锛堜骇鍝侊級
+ type: integer
+ name:
+ description: 灞炴�у悕绉�
+ type: string
+ selectValues:
+ items:
+ type: string
+ type: array
+ type: object
+ request.AddAttributeValue:
+ properties:
+ attributeId:
+ type: integer
+ entityId:
+ type: string
+ value:
type: string
type: object
request.AddCompany:
@@ -1376,6 +1414,19 @@
required:
- code
type: object
+ request.AttributeList:
+ properties:
+ entityType:
+ type: integer
+ keyword:
+ type: string
+ page:
+ description: 椤电爜
+ type: integer
+ pageSize:
+ description: 姣忛〉澶у皬
+ type: integer
+ type: object
request.DoMonthStats:
properties:
token:
@@ -1593,6 +1644,9 @@
auxiliaryUnit:
description: 杈呭姪鍗曚綅
type: string
+ cost:
+ description: 鎴愭湰鍗曚环
+ type: number
fromLocationId:
description: |-
Unit string `json:"unit" gorm:"type:varchar(31);comment:鍗曚綅"` //鍗曚綅
@@ -1601,6 +1655,11 @@
productId:
description: 浜у搧id
type: string
+ remark:
+ type: string
+ salePrice:
+ description: 閿�鍞崟浠�
+ type: number
toLocationId:
description: 鐩爣浣嶇疆id
type: integer
@@ -1682,6 +1741,35 @@
isDefault:
type: boolean
name:
+ type: string
+ type: object
+ request.UpdateAttribute:
+ properties:
+ dataType:
+ description: 鍊肩被鍨嬶紙1瀛楃涓� 2 int 3 涓嬫媺妗� 锛�
+ type: integer
+ entityType:
+ description: 缁欒皝鐢ㄧ殑 1 鐗╂枡锛堜骇鍝侊級
+ type: integer
+ id:
+ type: integer
+ name:
+ description: 灞炴�у悕绉�
+ type: string
+ selectValues:
+ items:
+ type: string
+ type: array
+ type: object
+ request.UpdateAttributeValue:
+ properties:
+ attributeId:
+ type: integer
+ entityId:
+ type: string
+ id:
+ type: integer
+ value:
type: string
type: object
request.UpdateCompany:
@@ -2128,6 +2216,163 @@
summary: 涓婁紶闄勪欢
tags:
- 闄勪欢绠$悊
+ /api-wms/v1/attribute/attribute:
+ post:
+ parameters:
+ - description: 灞炴�у�煎拰瀵硅薄淇℃伅
+ in: body
+ name: object
+ required: true
+ schema:
+ $ref: '#/definitions/request.AttributeList'
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: 鎴愬姛
+ schema:
+ $ref: '#/definitions/util.Response'
+ summary: 娣诲姞灞炴�у�煎拰瀵硅薄
+ tags:
+ - 灞炴�у�煎拰瀵硅薄
+ /api-wms/v1/attribute/delete/{id}:
+ delete:
+ parameters:
+ - description: token
+ in: header
+ name: Authorization
+ required: true
+ type: string
+ - description: 灞炴�d
+ in: path
+ name: id
+ required: true
+ type: string
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: 鎴愬姛
+ schema:
+ $ref: '#/definitions/util.Response'
+ summary: 鍒犻櫎灞炴��
+ tags:
+ - 灞炴��
+ /api-wms/v1/attribute/primary/{id}:
+ get:
+ responses:
+ "200":
+ description: 鎴愬姛
+ schema:
+ $ref: '#/definitions/util.Response'
+ summary: 鏌ヨ灞炴�у�煎拰瀵硅薄 閫氳繃涓婚敭ID鏌ヨ
+ tags:
+ - 灞炴�у�煎拰瀵硅薄
+ /api-wms/v1/attribute/updateAttribute/{id}:
+ put:
+ parameters:
+ - description: 灞炴�т俊鎭�
+ in: body
+ name: object
+ required: true
+ schema:
+ $ref: '#/definitions/request.UpdateAttribute'
+ - description: 灞炴�d
+ in: path
+ name: id
+ required: true
+ type: string
+ - description: token
+ in: header
+ name: Authorization
+ required: true
+ type: string
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: 鎴愬姛
+ schema:
+ $ref: '#/definitions/util.Response'
+ summary: 缂栬緫灞炴��
+ tags:
+ - 灞炴��
+ /api-wms/v1/attributeValue/add:
+ post:
+ parameters:
+ - description: 灞炴�у�煎拰瀵硅薄淇℃伅
+ in: body
+ name: object
+ required: true
+ schema:
+ $ref: '#/definitions/request.AddAttributeValue'
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: 鎴愬姛
+ schema:
+ $ref: '#/definitions/util.Response'
+ summary: 娣诲姞灞炴�у�煎拰瀵硅薄
+ tags:
+ - 灞炴�у�煎拰瀵硅薄
+ /api-wms/v1/attributeValue/delete/{id}:
+ delete:
+ parameters:
+ - description: id
+ in: path
+ name: id
+ required: true
+ type: string
+ responses:
+ "200":
+ description: 鎴愬姛
+ schema:
+ $ref: '#/definitions/util.Response'
+ summary: 鍒犻櫎灞炴�у�煎拰瀵硅薄
+ tags:
+ - 灞炴�у�煎拰瀵硅薄
+ /api-wms/v1/attributeValue/list:
+ post:
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: 鎴愬姛
+ schema:
+ $ref: '#/definitions/util.Response'
+ summary: 鏌ヨ灞炴�у�煎拰瀵硅薄 鍒嗛〉鏉′欢绛涢�塚alue like '%v%' 妯$硦鏌ヨ
+ tags:
+ - 灞炴�у�煎拰瀵硅薄
+ /api-wms/v1/attributeValue/primary/{id}:
+ get:
+ responses:
+ "200":
+ description: 鎴愬姛
+ schema:
+ $ref: '#/definitions/util.Response'
+ summary: 鏌ヨ灞炴�у�煎拰瀵硅薄 閫氳繃涓婚敭ID鏌ヨ
+ tags:
+ - 灞炴�у�煎拰瀵硅薄
+ /api-wms/v1/attributeValue/update:
+ post:
+ parameters:
+ - description: 灞炴�у�煎拰瀵硅薄淇℃伅
+ in: body
+ name: object
+ required: true
+ schema:
+ $ref: '#/definitions/request.UpdateAttributeValue'
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: 鎴愬姛
+ schema:
+ $ref: '#/definitions/util.Response'
+ summary: 鏇存柊灞炴�у�煎拰瀵硅薄
+ tags:
+ - 灞炴�у�煎拰瀵硅薄
/api-wms/v1/code/getAutoCode:
post:
parameters:
@@ -3506,6 +3751,18 @@
summary: 鑾峰彇鐧诲綍鐢ㄦ埛淇℃伅
tags:
- 浜у搧
+ /api-wms/v1/product/inputProduct:
+ post:
+ produces:
+ - application/xlsx
+ responses:
+ "200":
+ description: 鎴愬姛
+ schema:
+ $ref: '#/definitions/util.Response'
+ summary: 瀵煎叆鐗╂枡
+ tags:
+ - 鐗╂枡绠$悊
/api-wms/v1/product/listDisuse:
post:
parameters:
diff --git a/router/router.go b/router/router.go
index 1656c68..81695c8 100644
--- a/router/router.go
+++ b/router/router.go
@@ -73,7 +73,7 @@
attributeAPI.POST("attribute", attributeController.Add) // 娣诲姞灞炴��
attributeAPI.PUT("updateAttribute/:id", attributeController.Update) // 淇敼灞炴��
attributeAPI.DELETE("delete/:id", attributeController.Delete) // 鍒犻櫎灞炴��
- attributeAPI.POST("list", attributeController.ListAttribute) // 鑾峰彇灞炴��
+ attributeAPI.POST("attribute", attributeController.ListAttribute) // 鑾峰彇灞炴��
attributeAPI.GET("primary/:id", attributeController.PrimaryAttribute) //鍒犻櫎
//attributeAPI.GET("attribute/:id", attributeController.GetAttributeDetail) // 鑾峰彇灞炴��
}
--
Gitblit v1.8.0