From cdb38521ea1f662b53bafb87412c38dfd0d5e11d Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期五, 19 四月 2024 17:06:12 +0800 Subject: [PATCH] 更新文档 --- docs/swagger.yaml | 752 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 725 insertions(+), 27 deletions(-) diff --git a/docs/swagger.yaml b/docs/swagger.yaml index bdcf9a0..5a769cb 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -393,6 +393,179 @@ description: 鏍堝悕 type: string type: object + constvar.MiniDictType: + enum: + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + type: integer + x-enum-comments: + EarlyWarningDay: 棰勮澶╂暟 + InspectionWayType: 璐ㄦ鏂瑰紡绫诲瀷 + MiniDictTypeBomVersionType: Bom鐗堟湰绫诲瀷 + MiniDictTypePlcBrand: PLC鍝佺墝 + OutsourcingSupplierCreditGrade: 淇$敤绛夌骇 + OutsourcingSupplierRange: 渚涜揣鑼冨洿 + OutsourcingSupplierType: 濮斿渚涘簲鍟嗙被鍨� + x-enum-varnames: + - MiniDictTypePlcBrand + - MiniDictTypeBomVersionType + - EarlyWarningDay + - InspectionWayType + - OutsourcingSupplierType + - OutsourcingSupplierCreditGrade + - OutsourcingSupplierRange + constvar.RecordStatus: + enum: + - 0 + - 1 + - 2 + type: integer + x-enum-comments: + RecordStatusActive: 鍚敤 + RecordStatusCreate: 鏂板缓 + RecordStatusInactive: 鍋滅敤 + x-enum-varnames: + - RecordStatusCreate + - RecordStatusActive + - RecordStatusInactive + contextx.Response: + properties: + code: + type: integer + data: {} + msg: + type: string + type: object + gorm.DeletedAt: + properties: + time: + type: string + valid: + description: Valid is true if Time is not NULL + type: boolean + type: object + model.MiniDict: + properties: + createdAt: + type: string + id: + type: integer + isDefault: + type: boolean + name: + type: string + type: + $ref: '#/definitions/constvar.MiniDictType' + updatedAt: + type: string + value: + type: string + type: object + models.OutsourcingEnterprise: + 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: + allOf: + - $ref: '#/definitions/constvar.RecordStatus' + description: 鐘舵�� 0 鏂板缓 1 鍚敤 2鍋滅敤 + supplyCapacity: + description: 渚涜揣鑳藉姏 + type: string + supplyRange: + description: 渚涜揣鑼冨洿 + type: string + tel: + description: 鑱旂郴鏂瑰紡 + type: string + updatedAt: + type: string + type: object + outsourcingrequest.OutsourcingEnterprise: + 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: + allOf: + - $ref: '#/definitions/constvar.RecordStatus' + description: 鐘舵�� 0 鏂板缓 1 鍚敤 2鍋滅敤 + supplyCapacity: + description: 渚涜揣鑳藉姏 + type: string + supplyRange: + description: 渚涜揣鑼冨洿 + type: string + tel: + description: 鑱旂郴鏂瑰紡 + type: string + required: + - enterpriseType + - name + - number + type: object + outsourcingrequest.OutsourcingEnterpriseOverview: + properties: + close: + description: 鍋滅敤鏁伴噺 + type: integer + open: + description: 鍚敤鏁伴噺 + type: integer + total: + description: 鎬婚噺 + type: integer + type: object purchase.OrderStatus: enum: - 1 @@ -400,19 +573,28 @@ - 3 - 4 - 5 + - 6 + - 7 + - 8 type: integer x-enum-comments: OrderStatusCanceled: 宸插彇娑� OrderStatusCompleted: 宸插畬鎴� OrderStatusConfirmed: 寰呯‘璁� + OrderStatusPartReceive: 閮ㄥ垎鏀惰揣 OrderStatusReceived: 寰呭叆搴� OrderStatusStored: 宸插叆搴� + OrderStatusWaitQuality: 寰呰川妫� + OrderStatusWaitReceive: 寰呮敹璐� x-enum-varnames: - OrderStatusConfirmed - OrderStatusReceived - OrderStatusStored - OrderStatusCompleted - OrderStatusCanceled + - OrderStatusWaitReceive + - OrderStatusPartReceive + - OrderStatusWaitQuality purchase.PriceAdjustmentType: enum: - 1 @@ -497,7 +679,7 @@ description: 绛剧害鏃ユ湡 type: string sourceOrder: - description: 鏉ユ簮鍗曟嵁 + description: 鏉ユ簮鍗曟嵁 ,閿�鍞槑缁嗙紪鐮� type: string status: allOf: @@ -530,6 +712,42 @@ allOf: - $ref: '#/definitions/purchase.WholeDiscountType' description: 鏁村崟鎶樻墸绫诲瀷 + type: object + purchase.PurchaseProductConfirm: + properties: + amount: + type: number + created_at: + type: string + id: + description: 涓婚敭ID + example: "0" + type: string + notReceiveAmount: + type: number + nowReceiveAmount: + description: 鏈鏀惰揣鏁伴噺 + type: number + overReceiveAmount: + type: number + principal: + type: string + productId: + type: string + productName: + type: string + purchaseNumber: + type: string + specs: + type: string + surplusReceiveAmount: + type: number + type: + type: string + unit: + type: string + updated_at: + type: string type: object purchase.PurchaseProducts: properties: @@ -618,6 +836,19 @@ purchase: $ref: '#/definitions/purchaserequest.Purchase' type: object + purchaserequest.GetQualityInspectionInfo: + properties: + purchaseNumber: + type: string + status: + items: + type: integer + type: array + times: + items: + type: string + type: array + type: object purchaserequest.Purchase: properties: contact: @@ -696,6 +927,33 @@ - $ref: '#/definitions/purchase.WholeDiscountType' description: 鏁村崟鎶樻墸绫诲瀷 type: object + purchaserequest.PurchaseProductConfirmInfo: + properties: + amount: + type: number + notReceiveAmount: + type: number + nowReceiveAmount: + type: number + overReceiveAmount: + type: number + principal: + type: string + productId: + type: string + productName: + type: string + purchaseNumber: + type: string + specs: + type: string + surplusReceiveAmount: + type: number + type: + type: string + unit: + type: string + type: object purchaserequest.PurchaseType: properties: id: @@ -711,6 +969,24 @@ sort: description: 鎺掑簭 type: integer + type: object + purchaserequest.SaveQualityInspectionInfo: + properties: + ids: + items: + type: integer + type: array + purchaseId: + type: integer + status: + type: integer + type: object + purchaserequest.SubmitPurchase: + properties: + id: + type: integer + status: + $ref: '#/definitions/purchase.OrderStatus' type: object purchaserequest.UpdatePurchase: properties: @@ -785,14 +1061,8 @@ $ref: '#/definitions/test.SupplierType' type: array type: object - response.OperationInfo: + response.InWarehouseInfo: properties: - amount: - description: 閲囪喘鏁� - type: number - modelNumber: - description: 鍨嬪彿 - type: string name: description: 浜у搧鍚嶇О type: string @@ -811,26 +1081,22 @@ principal: 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 + type: object + response.OperationInfo: + properties: + inWarehouseInfos: + items: + $ref: '#/definitions/response.InWarehouseInfo' + type: array + productInfos: + items: + $ref: '#/definitions/response.ProductInfo' + type: array type: object response.PageResult: properties: @@ -841,6 +1107,39 @@ type: integer total: type: integer + type: object + response.ProductInfo: + 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 type: object response.PurchaseProducts: properties: @@ -1044,6 +1343,51 @@ type: string updated_at: type: string + type: object + utils.Response: + properties: + code: + type: integer + data: {} + msg: + type: string + type: object + utils.ResponseList: + properties: + code: + type: integer + data: {} + msg: + type: string + page: + type: integer + pageSize: + type: integer + total: + type: integer + type: object + v1.GetMiniDictList: + properties: + type: + $ref: '#/definitions/constvar.MiniDictType' + type: object + v1.MiniDict: + properties: + isDefault: + type: boolean + name: + type: string + value: + type: string + type: object + v1.SaveMiniDict: + properties: + list: + items: + $ref: '#/definitions/v1.MiniDict' + type: array + type: + $ref: '#/definitions/constvar.MiniDictType' type: object info: contact: {} @@ -1293,6 +1637,61 @@ summary: 鏇存柊Contract tags: - Contract + /dict/getMiniDictList: + post: + parameters: + - description: 鍙傛暟 + in: body + name: object + required: true + schema: + $ref: '#/definitions/v1.GetMiniDictList' + - description: token + in: header + name: Authorization + required: true + type: string + produces: + - application/json + responses: + "200": + description: 鎴愬姛 + schema: + allOf: + - $ref: '#/definitions/utils.ResponseList' + - properties: + data: + items: + $ref: '#/definitions/model.MiniDict' + type: array + type: object + summary: 鑾峰彇杩蜂綘瀛楀吀鍒楄〃 + tags: + - 鏁版嵁瀛楀吀 + /dict/saveMiniDict: + post: + parameters: + - description: 鍙傛暟 + in: body + name: object + required: true + schema: + $ref: '#/definitions/v1.SaveMiniDict' + - description: token + in: header + name: Authorization + required: true + type: string + produces: + - application/json + responses: + "200": + description: 鎴愬姛 + schema: + $ref: '#/definitions/utils.Response' + summary: 鏇存柊杩蜂綘瀛楀吀 + tags: + - 鏁版嵁瀛楀吀 /downloadContract: get: consumes: @@ -1732,6 +2131,129 @@ summary: 鏇存柊Member tags: - Member + /outsourcing/enterprise/add: + post: + parameters: + - description: token + in: header + name: Authorization + required: true + type: string + - description: 鏌ヨ鍙傛暟 + in: body + name: object + required: true + schema: + $ref: '#/definitions/outsourcingrequest.OutsourcingEnterprise' + produces: + - application/json + responses: + "200": + description: 鎴愬姛 + schema: + $ref: '#/definitions/contextx.Response' + summary: 浼佷笟鏂板 + tags: + - 濮斿浼佷笟绠$悊 + /outsourcing/enterprise/list: + get: + parameters: + - description: token + in: header + name: Authorization + required: true + type: string + - in: query + name: keyword + type: string + - description: 椤电爜 + in: query + name: page + type: integer + - description: 姣忛〉澶у皬 + in: query + name: pageSize + type: integer + - description: 鐘舵�� 0 鏂板缓 1 鍚敤 2鍋滅敤 + enum: + - 0 + - 1 + - 2 + in: query + name: status + type: integer + x-enum-comments: + RecordStatusActive: 鍚敤 + RecordStatusCreate: 鏂板缓 + RecordStatusInactive: 鍋滅敤 + x-enum-varnames: + - RecordStatusCreate + - RecordStatusActive + - RecordStatusInactive + produces: + - application/json + responses: + "200": + description: 鎴愬姛 + schema: + allOf: + - $ref: '#/definitions/utils.ResponseList' + - properties: + data: + items: + $ref: '#/definitions/models.OutsourcingEnterprise' + type: array + type: object + summary: 浼佷笟鍒楄〃 + tags: + - 濮斿浼佷笟绠$悊 + /outsourcing/enterprise/overview: + get: + parameters: + - description: token + in: header + name: Authorization + required: true + type: string + produces: + - application/json + responses: + "200": + description: 鎴愬姛 + schema: + allOf: + - $ref: '#/definitions/utils.ResponseList' + - properties: + data: + $ref: '#/definitions/outsourcingrequest.OutsourcingEnterpriseOverview' + type: object + summary: 浼佷笟缁熻 + tags: + - 濮斿浼佷笟绠$悊 + /outsourcing/enterprise/update: + post: + parameters: + - description: token + in: header + name: Authorization + required: true + type: string + - description: 鏌ヨ鍙傛暟 + in: body + name: object + required: true + schema: + $ref: '#/definitions/outsourcingrequest.OutsourcingEnterprise' + produces: + - application/json + responses: + "200": + description: 鎴愬姛 + schema: + $ref: '#/definitions/contextx.Response' + summary: 浼佷笟淇敼 + tags: + - 濮斿浼佷笟绠$悊 /p/createProduct: post: consumes: @@ -1878,6 +2400,11 @@ - in: query name: unit type: string + - description: token + in: header + name: Authorization + required: true + type: string produces: - application/json responses: @@ -2014,6 +2541,29 @@ summary: 棰勮Contract tags: - Contract + /purchase/allProductInWarehouse: + post: + consumes: + - application/json + parameters: + - description: 鍙傛暟 + in: body + name: data + required: true + schema: + $ref: '#/definitions/purchaserequest.PurchaseProductConfirmInfo' + produces: + - application/json + responses: + "200": + description: 鑾峰彇纭淇℃伅 + schema: + $ref: '#/definitions/response.Response' + security: + - ApiKeyAuth: [] + summary: 鍏ㄩ儴鍚堟牸鍏ュ簱 + tags: + - Purchase /purchase/getOperationInfo/{id}: get: consumes: @@ -2037,6 +2587,65 @@ summary: 鑾峰彇鎿嶄綔淇℃伅 tags: - Purchase + /purchase/getPurchaseProductConfirmInfo/{number}: + get: + consumes: + - application/json + parameters: + - description: 閲囪喘鍗曠紪鐮� + in: path + name: number + required: true + type: string + produces: + - application/json + responses: + "200": + description: 鑾峰彇纭淇℃伅 + schema: + allOf: + - $ref: '#/definitions/response.Response' + - properties: + data: + items: + $ref: '#/definitions/purchase.PurchaseProductConfirm' + type: array + type: object + security: + - ApiKeyAuth: [] + summary: 鑾峰彇纭淇℃伅 + tags: + - Purchase + /purchase/getPurchaseQualityInspectionInfo: + post: + consumes: + - application/json + parameters: + - description: 鍙傛暟 + in: body + name: data + required: true + schema: + $ref: '#/definitions/purchaserequest.GetQualityInspectionInfo' + produces: + - application/json + responses: + "200": + description: 鑾峰彇纭淇℃伅 + schema: + allOf: + - $ref: '#/definitions/response.Response' + - properties: + data: + items: + $ref: '#/definitions/purchase.PurchaseProductConfirm' + type: array + type: object + security: + - ApiKeyAuth: [] + summary: 鑾峰彇閲囪喘璐ㄦ淇℃伅淇℃伅 + tags: + - Purchase /purchase/getWarehouseInfo: get: consumes: @@ -2058,6 +2667,34 @@ security: - ApiKeyAuth: [] summary: 鑾峰彇浠撳簱鍒楄〃 + tags: + - Purchase + /purchase/newSubmit: + post: + consumes: + - application/json + parameters: + - description: 鍙傛暟 + in: body + name: data + required: true + schema: + $ref: '#/definitions/purchaserequest.SubmitPurchase' + produces: + - application/json + responses: + "200": + description: 鏂扮増鎻愪氦 + schema: + allOf: + - $ref: '#/definitions/response.Response' + - properties: + msg: + type: string + type: object + security: + - ApiKeyAuth: [] + summary: 鏂扮増鎻愪氦 tags: - Purchase /purchase/purchase: @@ -2305,16 +2942,77 @@ summary: 鍒嗛〉鑾峰彇璐ㄦ鍗曞垪琛� tags: - QualityInspect + /purchase/savePurchaseProductConfirm: + post: + consumes: + - application/json + parameters: + - description: list + in: body + name: data + required: true + schema: + items: + $ref: '#/definitions/purchaserequest.PurchaseProductConfirmInfo' + type: array + produces: + - application/json + responses: + "200": + description: 纭鏀惰揣 + schema: + allOf: + - $ref: '#/definitions/response.Response' + - properties: + msg: + type: string + type: object + security: + - ApiKeyAuth: [] + summary: 纭鏀惰揣 + tags: + - Purchase + /purchase/savePurchaseQualityInspectionInfo: + post: + consumes: + - application/json + parameters: + - description: 鍙傛暟 + in: body + name: data + required: true + schema: + $ref: '#/definitions/purchaserequest.SaveQualityInspectionInfo' + produces: + - application/json + responses: + "200": + description: 鑾峰彇纭淇℃伅 + schema: + allOf: + - $ref: '#/definitions/response.Response' + - properties: + data: + items: + $ref: '#/definitions/purchase.PurchaseProductConfirm' + type: array + type: object + security: + - ApiKeyAuth: [] + summary: 淇濆瓨閲囪喘璐ㄦ淇℃伅淇℃伅 + tags: + - Purchase /purchase/submit: post: consumes: - application/json parameters: - - description: 閲囪喘鍗旾D - in: path - name: id + - description: 鍙傛暟 + in: body + name: data required: true - type: integer + schema: + $ref: '#/definitions/purchaserequest.SubmitPurchase' produces: - application/json responses: -- Gitblit v1.8.0