From 1572f45e72cc0fa15c029f9ee2a08474104435e6 Mon Sep 17 00:00:00 2001 From: selfcheer <selfcheer@gmail.com> Date: 星期五, 19 七月 2024 00:48:43 +0800 Subject: [PATCH] 采购单产品列表去掉过滤重复产品的逻辑 --- docs/docs.go | 730 +++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 690 insertions(+), 40 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index 7e686f0..5137dbb 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -417,6 +417,95 @@ } } }, + "/dict/getMiniDictList": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "鏁版嵁瀛楀吀" + ], + "summary": "鑾峰彇杩蜂綘瀛楀吀鍒楄〃", + "parameters": [ + { + "description": "鍙傛暟", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.GetMiniDictList" + } + }, + { + "type": "string", + "description": "token", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/utils.ResponseList" + }, + { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/model.MiniDict" + } + } + } + } + ] + } + } + } + } + }, + "/dict/saveMiniDict": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "鏁版嵁瀛楀吀" + ], + "summary": "鏇存柊杩蜂綘瀛楀吀", + "parameters": [ + { + "description": "鍙傛暟", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.SaveMiniDict" + } + }, + { + "type": "string", + "description": "token", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/utils.Response" + } + } + } + } + }, "/downloadContract": { "get": { "security": [ @@ -1140,6 +1229,201 @@ } } }, + "/outsourcing/enterprise/add": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "濮斿浼佷笟绠$悊" + ], + "summary": "浼佷笟鏂板", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "鏌ヨ鍙傛暟", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/outsourcingrequest.OutsourcingEnterprise" + } + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/contextx.Response" + } + } + } + } + }, + "/outsourcing/enterprise/list": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "濮斿浼佷笟绠$悊" + ], + "summary": "浼佷笟鍒楄〃", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "type": "string", + "name": "keyword", + "in": "query" + }, + { + "type": "integer", + "description": "椤电爜", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "姣忛〉澶у皬", + "name": "pageSize", + "in": "query" + }, + { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "x-enum-comments": { + "RecordStatusActive": "鍚敤", + "RecordStatusCreate": "鏂板缓", + "RecordStatusInactive": "鍋滅敤" + }, + "x-enum-varnames": [ + "RecordStatusCreate", + "RecordStatusActive", + "RecordStatusInactive" + ], + "description": "鐘舵�� 0 鏂板缓 1 鍚敤 2鍋滅敤", + "name": "status", + "in": "query" + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/utils.ResponseList" + }, + { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/models.OutsourcingEnterprise" + } + } + } + } + ] + } + } + } + } + }, + "/outsourcing/enterprise/overview": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "濮斿浼佷笟绠$悊" + ], + "summary": "浼佷笟缁熻", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/utils.ResponseList" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/outsourcingrequest.OutsourcingEnterpriseOverview" + } + } + } + ] + } + } + } + } + }, + "/outsourcing/enterprise/update": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "濮斿浼佷笟绠$悊" + ], + "summary": "浼佷笟淇敼", + "parameters": [ + { + "type": "string", + "description": "token", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "鏌ヨ鍙傛暟", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/outsourcingrequest.OutsourcingEnterprise" + } + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/contextx.Response" + } + } + } + } + }, "/p/createProduct": { "post": { "security": [ @@ -1389,6 +1673,13 @@ "type": "string", "name": "unit", "in": "query" + }, + { + "type": "string", + "description": "token", + "name": "Authorization", + "in": "header", + "required": true } ], "responses": { @@ -1851,11 +2142,13 @@ "summary": "鏂扮増鎻愪氦", "parameters": [ { - "type": "integer", - "description": "閲囪喘鍗旾D", - "name": "id", - "in": "path", - "required": true + "description": "鍙傛暟", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/purchaserequest.SubmitPurchase" + } } ], "responses": { @@ -2434,11 +2727,13 @@ "summary": "鎻愪氦閲囪喘鍗�", "parameters": [ { - "type": "integer", - "description": "閲囪喘鍗旾D", - "name": "id", - "in": "path", - "required": true + "description": "鍙傛暟", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/purchaserequest.SubmitPurchase" + } } ], "responses": { @@ -3966,6 +4261,247 @@ } } }, + "constvar.MiniDictType": { + "type": "integer", + "enum": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "x-enum-comments": { + "EarlyWarningDay": "棰勮澶╂暟", + "InspectionWayType": "璐ㄦ鏂瑰紡绫诲瀷", + "MiniDictTypeBomVersionType": "Bom鐗堟湰绫诲瀷", + "MiniDictTypePlcBrand": "PLC鍝佺墝", + "OutsourcingSupplierCreditGrade": "淇$敤绛夌骇", + "OutsourcingSupplierRange": "渚涜揣鑼冨洿", + "OutsourcingSupplierType": "濮斿渚涘簲鍟嗙被鍨�" + }, + "x-enum-varnames": [ + "MiniDictTypePlcBrand", + "MiniDictTypeBomVersionType", + "EarlyWarningDay", + "InspectionWayType", + "OutsourcingSupplierType", + "OutsourcingSupplierCreditGrade", + "OutsourcingSupplierRange" + ] + }, + "constvar.RecordStatus": { + "type": "integer", + "enum": [ + 0, + 1, + 2 + ], + "x-enum-comments": { + "RecordStatusActive": "鍚敤", + "RecordStatusCreate": "鏂板缓", + "RecordStatusInactive": "鍋滅敤" + }, + "x-enum-varnames": [ + "RecordStatusCreate", + "RecordStatusActive", + "RecordStatusInactive" + ] + }, + "contextx.Response": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "data": {}, + "msg": { + "type": "string" + } + } + }, + "gorm.DeletedAt": { + "type": "object", + "properties": { + "time": { + "type": "string" + }, + "valid": { + "description": "Valid is true if Time is not NULL", + "type": "boolean" + } + } + }, + "model.MiniDict": { + "type": "object", + "properties": { + "createdAt": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "isDefault": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/constvar.MiniDictType" + }, + "updatedAt": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "models.OutsourcingEnterprise": { + "type": "object", + "properties": { + "address": { + "description": "鍦板潃", + "type": "string" + }, + "contact": { + "description": "鑱旂郴浜�", + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "creditGrade": { + "description": "淇$敤绛夌骇", + "type": "string" + }, + "deletedAt": { + "$ref": "#/definitions/gorm.DeletedAt" + }, + "enterpriseType": { + "description": "浼佷笟绫诲瀷", + "type": "string" + }, + "id": { + "type": "integer" + }, + "name": { + "description": "濮斿浼佷笟缂栧彿鍚嶇О", + "type": "string" + }, + "number": { + "description": "濮斿浼佷笟缂栧彿", + "type": "string" + }, + "organizationCode": { + "description": "缁勭粐鏈烘瀯浠g爜", + "type": "string" + }, + "status": { + "description": "鐘舵�� 0 鏂板缓 1 鍚敤 2鍋滅敤", + "allOf": [ + { + "$ref": "#/definitions/constvar.RecordStatus" + } + ] + }, + "supplyCapacity": { + "description": "渚涜揣鑳藉姏", + "type": "string" + }, + "supplyRange": { + "description": "渚涜揣鑼冨洿", + "type": "string" + }, + "tel": { + "description": "鑱旂郴鏂瑰紡", + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + }, + "outsourcingrequest.OutsourcingEnterprise": { + "type": "object", + "required": [ + "enterpriseType", + "name", + "number" + ], + "properties": { + "address": { + "description": "鍦板潃", + "type": "string" + }, + "contact": { + "description": "鑱旂郴浜�", + "type": "string" + }, + "creditGrade": { + "description": "淇$敤绛夌骇", + "type": "string" + }, + "enterpriseType": { + "description": "浼佷笟绫诲瀷", + "type": "string" + }, + "id": { + "type": "integer" + }, + "name": { + "description": "濮斿渚涘簲鍟嗙紪鍙峰悕绉�", + "type": "string" + }, + "number": { + "description": "濮斿渚涘簲鍟嗙紪鍙�", + "type": "string" + }, + "organizationCode": { + "description": "缁勭粐鏈烘瀯浠g爜", + "type": "string" + }, + "status": { + "description": "鐘舵�� 0 鏂板缓 1 鍚敤 2鍋滅敤", + "allOf": [ + { + "$ref": "#/definitions/constvar.RecordStatus" + } + ] + }, + "supplyCapacity": { + "description": "渚涜揣鑳藉姏", + "type": "string" + }, + "supplyRange": { + "description": "渚涜揣鑼冨洿", + "type": "string" + }, + "tel": { + "description": "鑱旂郴鏂瑰紡", + "type": "string" + } + } + }, + "outsourcingrequest.OutsourcingEnterpriseOverview": { + "type": "object", + "properties": { + "close": { + "description": "鍋滅敤鏁伴噺", + "type": "integer" + }, + "open": { + "description": "鍚敤鏁伴噺", + "type": "integer" + }, + "total": { + "description": "鎬婚噺", + "type": "integer" + } + } + }, "purchase.OrderStatus": { "type": "integer", "enum": [ @@ -4114,7 +4650,7 @@ "type": "string" }, "sourceOrder": { - "description": "鏉ユ簮鍗曟嵁", + "description": "鏉ユ簮鍗曟嵁 ,閿�鍞槑缁嗙紪鐮�", "type": "string" }, "status": { @@ -4555,6 +5091,17 @@ } } }, + "purchaserequest.SubmitPurchase": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "status": { + "$ref": "#/definitions/purchase.OrderStatus" + } + } + }, "purchaserequest.UpdatePurchase": { "type": "object", "properties": { @@ -4668,17 +5215,9 @@ } } }, - "response.OperationInfo": { + "response.InWarehouseInfo": { "type": "object", "properties": { - "amount": { - "description": "閲囪喘鏁�", - "type": "number" - }, - "modelNumber": { - "description": "鍨嬪彿", - "type": "string" - }, "name": { "description": "浜у搧鍚嶇О", "type": "string" @@ -4703,32 +5242,29 @@ "description": "璐熻矗浜�", "type": "string" }, - "purchasePrice": { - "description": "鍗曚环", - "type": "number" - }, - "sendAmount": { - "description": "鍙戣揣鏁�", - "type": "integer" - }, - "specifications": { - "description": "瑙勬牸", - "type": "string" - }, "status": { "type": "integer" - }, - "total": { - "description": "鎬讳环", - "type": "number" - }, - "unit": { - "description": "鍗曚綅", - "type": "string" }, "warehouseName": { "description": "浠撳簱鍚�", "type": "string" + } + } + }, + "response.OperationInfo": { + "type": "object", + "properties": { + "inWarehouseInfos": { + "type": "array", + "items": { + "$ref": "#/definitions/response.InWarehouseInfo" + } + }, + "productInfos": { + "type": "array", + "items": { + "$ref": "#/definitions/response.ProductInfo" + } } } }, @@ -4744,6 +5280,51 @@ }, "total": { "type": "integer" + } + } + }, + "response.ProductInfo": { + "type": "object", + "properties": { + "amount": { + "description": "閲囪喘鏁�", + "type": "number" + }, + "modelNumber": { + "description": "鍨嬪彿", + "type": "string" + }, + "name": { + "description": "浜у搧鍚嶇О", + "type": "string" + }, + "number": { + "description": "浜у搧缂栫爜", + "type": "string" + }, + "overAmount": { + "description": "鍏ュ簱鏁�", + "type": "integer" + }, + "purchasePrice": { + "description": "鍗曚环", + "type": "number" + }, + "sendAmount": { + "description": "鏀惰揣鏁�", + "type": "integer" + }, + "specifications": { + "description": "瑙勬牸", + "type": "string" + }, + "total": { + "description": "鎬讳环", + "type": "number" + }, + "unit": { + "description": "鍗曚綅", + "type": "string" } } }, @@ -5047,6 +5628,75 @@ "type": "string" } } + }, + "utils.Response": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "data": {}, + "msg": { + "type": "string" + } + } + }, + "utils.ResponseList": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "data": {}, + "msg": { + "type": "string" + }, + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer" + }, + "total": { + "type": "integer" + } + } + }, + "v1.GetMiniDictList": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/constvar.MiniDictType" + } + } + }, + "v1.MiniDict": { + "type": "object", + "properties": { + "isDefault": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "v1.SaveMiniDict": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/v1.MiniDict" + } + }, + "type": { + "$ref": "#/definitions/constvar.MiniDictType" + } + } } }, "securityDefinitions": { -- Gitblit v1.8.0