From 5193dcb9336e853502baf8a539d3f45efebe2f86 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期六, 26 八月 2023 21:55:56 +0800 Subject: [PATCH] 采购单增删改查 --- docs/docs.go | 967 +++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 911 insertions(+), 56 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index c4ef0fd..7a8ba8b 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -2054,11 +2054,6 @@ "summary": "棰勮Contract", "parameters": [ { - "type": "string", - "name": "endCreatedAt", - "in": "query" - }, - { "type": "array", "items": { "type": "integer" @@ -2076,29 +2071,6 @@ "type": "integer", "description": "涓婚敭ID", "name": "id", - "in": "query" - }, - { - "type": "string", - "description": "鍏抽敭瀛�", - "name": "keyword", - "in": "query" - }, - { - "type": "integer", - "description": "椤电爜", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "姣忛〉澶у皬", - "name": "pageSize", - "in": "query" - }, - { - "type": "string", - "name": "startCreatedAt", "in": "query" }, { @@ -3038,7 +3010,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/test.Industry" + "$ref": "#/definitions/request.IndustryList" } } ], @@ -3628,6 +3600,726 @@ } } }, + "/p/createProduct": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Product" + ], + "summary": "鍒涘缓Product", + "parameters": [ + { + "description": "鍒涘缓Product", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/test.Product" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"鑾峰彇鎴愬姛\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/p/deleteProduct": { + "delete": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Product" + ], + "summary": "鍒犻櫎Product", + "parameters": [ + { + "description": "鍒犻櫎Product", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/test.Product" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"鍒犻櫎鎴愬姛\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/p/deleteProductByIds": { + "delete": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Product" + ], + "summary": "鎵归噺鍒犻櫎Product", + "parameters": [ + { + "description": "鎵归噺鍒犻櫎Product", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.IdsReq" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"鎵归噺鍒犻櫎鎴愬姛\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/p/findProduct": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Product" + ], + "summary": "鐢╥d鏌ヨProduct", + "parameters": [ + { + "type": "integer", + "name": "deliveryTime", + "in": "query" + }, + { + "type": "integer", + "description": "涓婚敭ID", + "name": "id", + "in": "query" + }, + { + "type": "integer", + "name": "maximumStock", + "in": "query" + }, + { + "type": "integer", + "name": "minimumStock", + "in": "query" + }, + { + "type": "string", + "name": "name", + "in": "query" + }, + { + "type": "string", + "name": "number", + "in": "query" + }, + { + "type": "string", + "name": "productType", + "in": "query" + }, + { + "type": "number", + "name": "purchasePrice", + "in": "query" + }, + { + "type": "string", + "name": "remark", + "in": "query" + }, + { + "type": "integer", + "name": "shippingDuration", + "in": "query" + }, + { + "type": "string", + "name": "unit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"鏌ヨ鎴愬姛\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/p/getProductList": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Product" + ], + "summary": "鍒嗛〉鑾峰彇Product鍒楄〃", + "parameters": [ + { + "type": "integer", + "name": "deliveryTime", + "in": "query" + }, + { + "type": "string", + "name": "endCreatedAt", + "in": "query" + }, + { + "type": "integer", + "description": "涓婚敭ID", + "name": "id", + "in": "query" + }, + { + "type": "string", + "description": "鍏抽敭瀛�", + "name": "keyword", + "in": "query" + }, + { + "type": "integer", + "name": "maximumStock", + "in": "query" + }, + { + "type": "integer", + "name": "minimumStock", + "in": "query" + }, + { + "type": "string", + "name": "name", + "in": "query" + }, + { + "type": "string", + "name": "number", + "in": "query" + }, + { + "type": "integer", + "description": "椤电爜", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "姣忛〉澶у皬", + "name": "pageSize", + "in": "query" + }, + { + "type": "string", + "name": "productType", + "in": "query" + }, + { + "type": "number", + "name": "purchasePrice", + "in": "query" + }, + { + "type": "string", + "name": "remark", + "in": "query" + }, + { + "type": "integer", + "name": "shippingDuration", + "in": "query" + }, + { + "type": "string", + "name": "startCreatedAt", + "in": "query" + }, + { + "type": "string", + "name": "unit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"鑾峰彇鎴愬姛\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/p/getProductListFromGrpc": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Product" + ], + "summary": "鍒嗛〉鑾峰彇Product鍒楄〃", + "parameters": [ + { + "type": "integer", + "name": "deliveryTime", + "in": "query" + }, + { + "type": "string", + "name": "endCreatedAt", + "in": "query" + }, + { + "type": "integer", + "description": "涓婚敭ID", + "name": "id", + "in": "query" + }, + { + "type": "string", + "description": "鍏抽敭瀛�", + "name": "keyword", + "in": "query" + }, + { + "type": "integer", + "name": "maximumStock", + "in": "query" + }, + { + "type": "integer", + "name": "minimumStock", + "in": "query" + }, + { + "type": "string", + "name": "name", + "in": "query" + }, + { + "type": "string", + "name": "number", + "in": "query" + }, + { + "type": "integer", + "description": "椤电爜", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "姣忛〉澶у皬", + "name": "pageSize", + "in": "query" + }, + { + "type": "string", + "name": "productType", + "in": "query" + }, + { + "type": "number", + "name": "purchasePrice", + "in": "query" + }, + { + "type": "string", + "name": "remark", + "in": "query" + }, + { + "type": "integer", + "name": "shippingDuration", + "in": "query" + }, + { + "type": "string", + "name": "startCreatedAt", + "in": "query" + }, + { + "type": "string", + "name": "unit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"鑾峰彇鎴愬姛\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/p/updateProduct": { + "put": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Product" + ], + "summary": "鏇存柊Product", + "parameters": [ + { + "description": "鏇存柊Product", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/test.Product" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"鏇存柊鎴愬姛\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/purchase/purchase": { + "put": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Purchase" + ], + "summary": "鏇存柊閲囪喘鍗曚俊鎭�", + "parameters": [ + { + "description": "閲囪喘鍗旾D, 閲囪喘鍗曚俊鎭�", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/purchaserequest.AddPurchase" + } + } + ], + "responses": { + "200": { + "description": "鏇存柊閲囪喘鍗曚俊鎭�", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "msg": { + "type": "string" + } + } + } + ] + } + } + } + }, + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Purchase" + ], + "summary": "鍒涘缓閲囪喘鍗�", + "parameters": [ + { + "description": "閲囪喘鍗曠敤鎴峰悕, 閲囪喘鍗曟墜鏈哄彿鐮�", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/purchaserequest.AddPurchase" + } + } + ], + "responses": { + "200": { + "description": "鍒涘缓閲囪喘鍗�", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "msg": { + "type": "string" + } + } + } + ] + } + } + } + } + }, + "/purchase/purchase/{id}": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Purchase" + ], + "summary": "鑾峰彇鍗曚竴閲囪喘鍗曚俊鎭�", + "parameters": [ + { + "type": "integer", + "description": "閲囪喘鍗旾D", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "鑾峰彇鍗曚竴閲囪喘鍗曚俊鎭�,杩斿洖鍖呮嫭閲囪喘鍗曡鎯�", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/response.PurchaseResponse" + }, + "msg": { + "type": "string" + } + } + } + ] + } + } + } + }, + "delete": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Purchase" + ], + "summary": "鍒犻櫎閲囪喘鍗�", + "parameters": [ + { + "type": "integer", + "description": "閲囪喘鍗旾D", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "鍒犻櫎閲囪喘鍗�", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "msg": { + "type": "string" + } + } + } + ] + } + } + } + } + }, + "/purchase/purchaseList": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Purchase" + ], + "summary": "鍒嗛〉鑾峰彇鏉冮檺閲囪喘鍗曞垪琛�", + "parameters": [ + { + "type": "string", + "description": "鍏抽敭瀛�", + "name": "keyword", + "in": "query" + }, + { + "type": "integer", + "description": "椤电爜", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "姣忛〉澶у皬", + "name": "pageSize", + "in": "query" + } + ], + "responses": { + "200": { + "description": "鍒嗛〉鑾峰彇鏉冮檺閲囪喘鍗曞垪琛�,杩斿洖鍖呮嫭鍒楄〃,鎬绘暟,椤电爜,姣忛〉鏁伴噺", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/response.PageResult" + }, + "msg": { + "type": "string" + } + } + } + ] + } + } + } + } + }, "/s/changeSupplierStatus": { "post": { "security": [ @@ -3829,8 +4521,8 @@ "in": "query" }, { - "type": "string", - "name": "file", + "type": "integer", + "name": "fileId", "in": "query" }, { @@ -3944,8 +4636,8 @@ "in": "query" }, { - "type": "string", - "name": "file", + "type": "integer", + "name": "fileId", "in": "query" }, { @@ -4312,7 +5004,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/test.SupplierType" + "$ref": "#/definitions/request.SupplierTypeList" } } ], @@ -6563,7 +7255,7 @@ } }, "email": { - "$ref": "#/definitions/github_com_flipped-aurora_gin-vue-admin_server_config.Email" + "$ref": "#/definitions/srm_config.Email" }, "excel": { "$ref": "#/definitions/config.Excel" @@ -6972,36 +7664,91 @@ } } }, - "github_com_flipped-aurora_gin-vue-admin_server_config.Email": { + "purchase.Purchase": { "type": "object", "properties": { - "from": { - "description": "鍙戜欢浜� 浣犺嚜宸辫鍙戦偖浠剁殑閭", + "contact": { + "description": "鑱旂郴浜�", "type": "string" }, - "host": { - "description": "鏈嶅姟鍣ㄥ湴鍧� 渚嬪 smtp.qq.com 璇峰墠寰�QQ鎴栬�呬綘瑕佸彂閭欢鐨勯偖绠辨煡鐪嬪叾smtp鍗忚", + "deliveryDate": { + "description": "浜や粯鏃ユ湡", "type": "string" }, - "is-ssl": { - "description": "鏄惁SSL 鏄惁寮�鍚疭SL", - "type": "boolean" - }, - "nickname": { - "description": "鏄电О 鍙戜欢浜烘樀绉� 閫氬父涓鸿嚜宸辩殑閭", - "type": "string" - }, - "port": { - "description": "绔彛 璇峰墠寰�QQ鎴栬�呬綘瑕佸彂閭欢鐨勯偖绠辨煡鐪嬪叾smtp鍗忚 澶у涓� 465", + "id": { + "description": "涓婚敭ID", "type": "integer" }, - "secret": { - "description": "瀵嗛挜 鐢ㄤ簬鐧诲綍鐨勫瘑閽� 鏈�濂戒笉瑕佺敤閭瀵嗙爜 鍘婚偖绠眘mtp鐢宠涓�涓敤浜庣櫥褰曠殑瀵嗛挜", + "name": { + "description": "閲囪喘鍚嶇О", "type": "string" }, - "to": { - "description": "鏀朵欢浜�:澶氫釜浠ヨ嫳鏂囬�楀彿鍒嗛殧 渚嬶細a@qq.com b@qq.com 姝e紡寮�鍙戜腑璇锋妸姝ら」鐩綔涓哄弬鏁颁娇鐢�", + "phone": { + "description": "鑱旂郴浜虹數璇�", "type": "string" + }, + "purchaseTypeId": { + "description": "閲囪喘绫诲瀷id", + "type": "integer" + }, + "remark": { + "description": "澶囨敞", + "type": "string" + }, + "signingDate": { + "description": "绛剧害鏃ユ湡", + "type": "string" + }, + "supplierId": { + "description": "渚涘簲鍟唅d", + "type": "integer" + } + } + }, + "purchase.PurchaseProducts": { + "type": "object", + "properties": { + "amount": { + "description": "閲囪喘鏁伴噺", + "type": "number" + }, + "id": { + "description": "涓婚敭ID", + "type": "integer" + }, + "price": { + "description": "閲囪喘鍗曚环", + "type": "number" + }, + "productId": { + "description": "浜у搧id", + "type": "integer" + }, + "purchaseId": { + "description": "閲囪喘id", + "type": "integer" + }, + "remark": { + "description": "鎻忚堪", + "type": "string" + }, + "total": { + "description": "閲囪喘鎬讳环", + "type": "number" + } + } + }, + "purchaserequest.AddPurchase": { + "type": "object", + "properties": { + "productList": { + "type": "array", + "items": { + "$ref": "#/definitions/purchase.PurchaseProducts" + } + }, + "purchase": { + "$ref": "#/definitions/purchase.Purchase" } } }, @@ -7089,6 +7836,17 @@ "type": "array", "items": { "type": "integer" + } + } + } + }, + "request.IndustryList": { + "type": "object", + "properties": { + "industries": { + "type": "array", + "items": { + "$ref": "#/definitions/test.Industry" } } } @@ -7301,6 +8059,17 @@ } } }, + "request.SupplierTypeList": { + "type": "object", + "properties": { + "supplierTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/test.SupplierType" + } + } + } + }, "request.SysAuthorityBtnReq": { "type": "object", "properties": { @@ -7421,6 +8190,20 @@ "items": { "$ref": "#/definitions/request.CasbinInfo" } + } + } + }, + "response.PurchaseResponse": { + "type": "object", + "properties": { + "productList": { + "type": "array", + "items": { + "$ref": "#/definitions/purchase.PurchaseProducts" + } + }, + "purchase": { + "$ref": "#/definitions/purchase.Purchase" } } }, @@ -7546,6 +8329,39 @@ "properties": { "user": { "$ref": "#/definitions/system.SysUser" + } + } + }, + "srm_config.Email": { + "type": "object", + "properties": { + "from": { + "description": "鍙戜欢浜� 浣犺嚜宸辫鍙戦偖浠剁殑閭", + "type": "string" + }, + "host": { + "description": "鏈嶅姟鍣ㄥ湴鍧� 渚嬪 smtp.qq.com 璇峰墠寰�QQ鎴栬�呬綘瑕佸彂閭欢鐨勯偖绠辨煡鐪嬪叾smtp鍗忚", + "type": "string" + }, + "is-ssl": { + "description": "鏄惁SSL 鏄惁寮�鍚疭SL", + "type": "boolean" + }, + "nickname": { + "description": "鏄电О 鍙戜欢浜烘樀绉� 閫氬父涓鸿嚜宸辩殑閭", + "type": "string" + }, + "port": { + "description": "绔彛 璇峰墠寰�QQ鎴栬�呬綘瑕佸彂閭欢鐨勯偖绠辨煡鐪嬪叾smtp鍗忚 澶у涓� 465", + "type": "integer" + }, + "secret": { + "description": "瀵嗛挜 鐢ㄤ簬鐧诲綍鐨勫瘑閽� 鏈�濂戒笉瑕佺敤閭瀵嗙爜 鍘婚偖绠眘mtp鐢宠涓�涓敤浜庣櫥褰曠殑瀵嗛挜", + "type": "string" + }, + "to": { + "description": "鏀朵欢浜�:澶氫釜浠ヨ嫳鏂囬�楀彿鍒嗛殧 渚嬶細a@qq.com b@qq.com 姝e紡寮�鍙戜腑璇锋妸姝ら」鐩綔涓哄弬鏁颁娇鐢�", + "type": "string" } } }, @@ -8180,6 +8996,45 @@ } } }, + "test.Product": { + "type": "object", + "properties": { + "deliveryTime": { + "type": "integer" + }, + "id": { + "description": "涓婚敭ID", + "type": "integer" + }, + "maximumStock": { + "type": "integer" + }, + "minimumStock": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "number": { + "type": "string" + }, + "productType": { + "type": "string" + }, + "purchasePrice": { + "type": "number" + }, + "remark": { + "type": "string" + }, + "shippingDuration": { + "type": "integer" + }, + "unit": { + "type": "string" + } + } + }, "test.Supplier": { "type": "object", "properties": { @@ -8201,8 +9056,8 @@ "email": { "type": "string" }, - "file": { - "type": "string" + "fileId": { + "type": "integer" }, "id": { "description": "涓婚敭ID", -- Gitblit v1.8.0