From 1691d8ee8fe10799d98b296625fd30183407ef25 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期五, 28 六月 2024 12:17:22 +0800 Subject: [PATCH] 新增操作类型增加基础操作类型和仓库id来支持库存盘点 --- docs/swagger.yaml | 745 +++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 691 insertions(+), 54 deletions(-) diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 8177db7..83f23c2 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -74,6 +74,17 @@ - CostingMethodStandardPrice - CostingMethodFIFO - CostingMethodAverageCost + constvar.FileTemplateCategory: + enum: + - 1 + - 2 + type: integer + x-enum-comments: + FileTemplateCategory_Output: 鍑哄簱 + FileTemplateCategory_Selfmade: 鍏ュ簱-鑷埗 + x-enum-varnames: + - FileTemplateCategory_Selfmade + - FileTemplateCategory_Output constvar.FileType: enum: - file @@ -297,6 +308,14 @@ x-enum-varnames: - RuleType_Product - RuleType_ProductCategory + constvar.SystemConfigType: + enum: + - 1 + type: integer + x-enum-comments: + SystemConfigTypeInventoryCutOffPoint: 搴撳瓨缁撶畻鏃堕棿鐐� + x-enum-varnames: + - SystemConfigTypeInventoryCutOffPoint constvar.WhetherType: enum: - 1 @@ -311,6 +330,14 @@ - WhetherTypeAsk - WhetherTypeAlways - ReservationNever + gorm.DeletedAt: + properties: + time: + type: string + valid: + description: Valid is true if Time is not NULL + type: boolean + type: object inventory_order.WorkerInfo: properties: id: @@ -330,6 +357,34 @@ $ref: '#/definitions/constvar.FileType' id: type: integer + type: object + models.Attribute: + properties: + createdAt: + type: string + dataType: + description: 鍊肩被鍨嬶紙1瀛楃涓� 2 int 3 涓嬫媺妗� 锛� + type: integer + deletedAt: + $ref: '#/definitions/gorm.DeletedAt' + entityType: + description: 缁欒皝鐢ㄧ殑 1 鐗╂枡锛堜骇鍝侊級 + type: integer + id: + type: integer + name: + description: 灞炴�у悕绉� + type: string + selectValues: + description: dateType=3鏃剁敤 + items: + type: string + type: array + updatedAt: + type: string + value: + description: 浠嶢ttributeValue鍙栧埌鐨剉alue + type: string type: object models.Company: properties: @@ -497,9 +552,14 @@ items: $ref: '#/definitions/models.Attachment' type: array + attributes: + description: 鍔ㄦ�佸睘鎬� + items: + $ref: '#/definitions/models.Attribute' + type: array autoIncr: type: integer - barcode: + barCode: description: 鏉$爜 type: string buyExplain: @@ -531,6 +591,9 @@ cost: description: 鎴愭湰 type: number + createBy: + description: 鍒涘缓浜� + type: string currencyName: description: 甯佺鍚嶇О type: string @@ -742,6 +805,61 @@ description: 閲嶉噺 type: number type: object + models.MoveHistory: + properties: + amount: + description: 鏁伴噺 + type: number + baseOperationType: + allOf: + - $ref: '#/definitions/constvar.BaseOperationType' + description: 鍩虹浣滀笟绫诲瀷 + createTime: + type: string + fromLocation: + description: 婧愪綅缃� + type: string + fromLocationId: + description: 婧愪綅缃甶d + type: integer + id: + type: integer + number: + description: 鍗曞彿 + type: string + operationId: + description: 鎿嶄綔id + type: integer + operationTypeId: + description: 浣滀笟绫诲瀷id + type: integer + operationTypeName: + description: 浣滀笟绫诲瀷鍚嶇О + type: string + operator: + description: 鎿嶄綔鑰� + type: string + productId: + description: 浜у搧id + type: string + productName: + description: 浜у搧鍚嶇О + type: string + toLocation: + description: 鐩爣浣嶇疆 + type: string + toLocationId: + description: 鐩爣浣嶇疆id + type: integer + unit: + description: 鍗曚綅 + type: string + updateTime: + type: string + weight: + description: 閲嶉噺 + type: number + type: object models.Operation: properties: accountant: @@ -754,6 +872,8 @@ allOf: - $ref: '#/definitions/constvar.BaseOperationType' description: 鍩虹浣滀笟绫诲瀷 + checkedBy: + type: string comment: type: string companyID: @@ -763,6 +883,8 @@ contacterID: type: integer contacterName: + type: string + createBy: type: string createTime: type: string @@ -776,6 +898,9 @@ type: array id: type: integer + isInternalOutput: + description: 鏄惁璋冩嫧浜х敓鐨勫嚭搴� + type: boolean location: allOf: - $ref: '#/definitions/models.Location' @@ -820,6 +945,8 @@ type: string receiverPhone: type: string + remark: + type: string salesDetailsNumber: type: string source: @@ -840,6 +967,8 @@ type: integer updateTime: type: string + warehouseId: + type: integer waybillNumber: description: 杩愬崟鍙� type: string @@ -857,6 +986,9 @@ type: number auxiliaryUnit: type: string + cost: + description: 鎴愭湰鍗曚环 + type: number createTime: type: string fromLocation: @@ -868,6 +1000,9 @@ type: integer id: type: integer + isInternalOutput: + description: 鏄惁璋冩嫧浜х敓鐨勫嚭搴� + type: boolean operationId: description: 鎿嶄綔id type: integer @@ -878,6 +1013,11 @@ productId: description: 浜у搧id type: string + remark: + type: string + salePrice: + description: 閿�鍞崟浠� + type: number toLocation: allOf: - $ref: '#/definitions/models.Location' @@ -968,6 +1108,25 @@ updateTime: type: string type: object + models.SystemConfig: + properties: + configType: + allOf: + - $ref: '#/definitions/constvar.SystemConfigType' + description: 姣忔湀搴撳瓨缁撶畻鏃堕棿鐐� + createTime: + type: string + id: + type: integer + name: + description: 璁剧疆鍚嶇О + type: string + updateTime: + type: string + val: + description: 璁剧疆鍊� + type: string + type: object models.UnitDict: properties: id: @@ -982,6 +1141,7 @@ amount: type: number floating: + description: 鏄惁娴姩鍒╃巼 type: boolean unit: type: string @@ -1009,6 +1169,10 @@ type: string createTime: type: string + fileTemplateCategoryIn: + $ref: '#/definitions/constvar.FileTemplateCategory' + fileTemplateCategoryOut: + $ref: '#/definitions/constvar.FileTemplateCategory' id: type: integer inboundTransportation: @@ -1040,6 +1204,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: @@ -1105,6 +1294,10 @@ type: string accountantId: type: string + baseOperationType: + allOf: + - $ref: '#/definitions/constvar.BaseOperationType' + description: 鍩虹浣滀笟绫诲瀷 5搴撳瓨鐩樼偣 comment: description: 澶囨敞 type: string @@ -1171,6 +1364,9 @@ description: 鐘舵�� toLocationId: description: 鐩爣浣嶇疆id + type: integer + warehouseId: + description: 浠撳簱id type: integer waybillNumber: description: 杩愬崟鍙� @@ -1270,6 +1466,19 @@ type: array 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: @@ -1457,11 +1666,20 @@ properties: condition: type: string + keyword: + description: 鍏抽敭瀛楁悳绱� + type: string + locationId: + description: 浣嶇疆ID + type: integer page: description: 椤电爜 type: integer pageSize: description: 姣忛〉澶у皬 + type: integer + warehouseId: + description: 浠撳簱ID type: integer type: object request.OperationDetails: @@ -1479,6 +1697,9 @@ auxiliaryUnit: description: 杈呭姪鍗曚綅 type: string + cost: + description: 鎴愭湰鍗曚环 + type: number fromLocationId: description: |- Unit string `json:"unit" gorm:"type:varchar(31);comment:鍗曚綅"` //鍗曚綅 @@ -1487,6 +1708,11 @@ productId: description: 浜у搧id type: string + remark: + type: string + salePrice: + description: 閿�鍞崟浠� + type: number toLocationId: description: 鐩爣浣嶇疆id type: integer @@ -1499,6 +1725,10 @@ type: object request.OperationList: properties: + baseOperationType: + allOf: + - $ref: '#/definitions/constvar.BaseOperationType' + description: 1 鍏ュ簱 2 鍑哄簱 3 鍐呴儴璋冩嫧 4 鎶ュ簾 5 搴撳瓨鐩樼偣 number: type: string operationTypeId: @@ -1563,11 +1793,55 @@ $ref: '#/definitions/request.UnitDict' type: array type: object + request.SystemConfig: + properties: + ID: + type: integer + configType: + allOf: + - $ref: '#/definitions/constvar.SystemConfigType' + description: 1 姣忔湀搴撳瓨缁撶畻鏃堕棿鐐� + name: + description: 璁剧疆鍚嶇О + type: string + val: + description: 璁剧疆鍊� + type: string + type: object request.UnitDict: properties: 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: @@ -1803,18 +2077,38 @@ amount: description: 鍦ㄥ簱鏁伴噺 type: number + amountMoreUnits: + description: 鍦ㄥ簱鏁伴噺澶氬崟浣� + items: + $ref: '#/definitions/models.UnitItems' + type: array availableNumber: description: 鍙敤搴撳瓨 type: number + availableNumberMoreUnits: + description: 鍙敤搴撳瓨澶氬崟浣� + items: + $ref: '#/definitions/models.UnitItems' + type: array cost: description: 鎴愭湰 type: number in: description: 鍏ュ簱 type: number + inMoreUnits: + description: 鍏ュ簱澶氬崟浣� + items: + $ref: '#/definitions/models.UnitItems' + type: array out: description: 鍑哄簱 type: number + outMoreUnits: + description: 鍑哄簱澶氬崟浣� + items: + $ref: '#/definitions/models.UnitItems' + type: array produceId: description: 浜у搧id type: string @@ -1831,59 +2125,16 @@ description: 鎬讳环鍊� type: number type: object - response.InventoryHistory: - properties: - amount: - description: 鏁伴噺 - type: number - baseOperationType: - allOf: - - $ref: '#/definitions/constvar.BaseOperationType' - description: 鍩虹浣滀笟绫诲瀷 - contactedName: - description: 瀹屾垚鑰� - type: string - date: - description: 鏃ユ湡 - type: string - fromLocation: - description: 婧愪綅缃� - type: string - fromLocationId: - type: integer - number: - description: 鍗曞彿 - type: string - operationId: - type: integer - operationTypeName: - description: 浣滀笟绫诲瀷鍚嶇О - type: string - productId: - type: string - productName: - description: 浜у搧鍚嶇О - type: string - status: - description: 鐘舵�� - type: string - toLocation: - description: 鐩爣浣嶇疆 - type: string - toLocationId: - type: integer - unit: - description: 鍗曚綅 - type: string - weight: - description: 閲嶉噺 - type: number - type: object response.LocationForms: properties: amount: description: 鏁伴噺 type: number + amountMoreUnits: + description: 鍦ㄥ簱鏁伴噺澶氬崟浣� + items: + $ref: '#/definitions/models.UnitItems' + type: array locationId: description: 浣嶇疆id type: integer @@ -2037,6 +2288,186 @@ summary: 涓婁紶闄勪欢 tags: - 闄勪欢绠$悊 + /api-wms/v1/attribute/attribute: + get: + 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: + - 灞炴�у�煎拰瀵硅薄 + post: + parameters: + - description: 灞炴�т俊鎭� + in: body + name: object + required: true + schema: + $ref: '#/definitions/request.AddAttribute' + - 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/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: @@ -2220,6 +2651,37 @@ summary: 鎵嬪姩璺戞湀搴︾粺璁″簱瀛樻姤琛� tags: - 鎶ヨ〃 + /api-wms/v1/forms/downloadHistory: + post: + parameters: + - description: token + in: header + name: Authorization + required: true + type: string + - description: 鏌ヨ鍙傛暟 + in: body + name: object + required: true + schema: + $ref: '#/definitions/request.GetInventoryHistory' + produces: + - application/json + responses: + "200": + description: 鎴愬姛 + schema: + allOf: + - $ref: '#/definitions/util.ResponseList' + - properties: + data: + items: + $ref: '#/definitions/models.MoveHistory' + type: array + type: object + summary: 涓嬭浇鍑哄叆搴撴槑缁嗘姤琛� + tags: + - 鎶ヨ〃 /api-wms/v1/forms/downloadInventoryForms: post: parameters: @@ -2282,9 +2744,45 @@ summary: 涓嬭浇浣嶇疆鎶ヨ〃 tags: - 鎶ヨ〃 + /api-wms/v1/forms/downloadMonthStats: + post: + parameters: + - description: 鏌ヨ鍙傛暟 + in: body + name: object + required: true + schema: + $ref: '#/definitions/request.GetMonthStats' + - description: token + in: header + name: Authorization + required: true + type: string + produces: + - application/json + responses: + "200": + description: 鎴愬姛 + schema: + allOf: + - $ref: '#/definitions/util.ResponseList' + - properties: + data: + items: + $ref: '#/definitions/models.MonthStats' + type: array + type: object + summary: 涓嬭浇鏈堝害缁熻搴撳瓨鎶ヨ〃 + tags: + - 鎶ヨ〃 /api-wms/v1/forms/getHistory: post: parameters: + - description: token + in: header + name: Authorization + required: true + type: string - description: 鏌ヨ鍙傛暟 in: body name: object @@ -2302,10 +2800,10 @@ - properties: data: items: - $ref: '#/definitions/response.InventoryHistory' + $ref: '#/definitions/models.MoveHistory' type: array type: object - summary: 鑾峰彇鍘嗗彶淇℃伅 + summary: 鑾峰彇鍑哄叆搴撴槑缁� tags: - 鎶ヨ〃 /api-wms/v1/forms/getInventoryForms: @@ -2999,7 +3497,8 @@ /api-wms/v1/operationType/operationType: get: parameters: - - in: query + - description: 鍏抽敭瀛楁悳绱� + in: query name: keyword type: string - description: 椤电爜 @@ -3009,6 +3508,10 @@ - description: 姣忛〉澶у皬 in: query name: pageSize + type: integer + - description: 浠撳簱id + in: query + name: warehouseId type: integer produces: - application/json @@ -3169,7 +3672,25 @@ description: 鎴愬姛 schema: $ref: '#/definitions/util.Response' - summary: 鍒犻櫎浜у搧 + summary: 閫氳繃浜у搧/鍟嗗搧/鐗╂枡 ID鍒犻櫎浜у搧 + tags: + - 浜у搧 + /api-wms/v1/product/deleteProductByBarCode/{barCode}: + delete: + parameters: + - description: barCode + in: path + name: barCode + required: true + type: string + produces: + - application/json + responses: + "200": + description: 鎴愬姛 + schema: + $ref: '#/definitions/util.Response' + summary: 閫氳繃浜у搧/鍟嗗搧/鐗╂枡 鏉″舰鐮佸垹闄や骇鍝� tags: - 浜у搧 /api-wms/v1/product/deleteProductCategory/{id}: @@ -3260,6 +3781,11 @@ /api-wms/v1/product/getProductDetails/{id}: get: parameters: + - description: token + in: header + name: Authorization + required: true + type: string - description: id in: path name: id @@ -3277,7 +3803,35 @@ data: $ref: '#/definitions/models.Material' type: object - summary: 鑾峰彇浜у搧璇︽儏 + summary: 閫氳繃浜у搧/鍟嗗搧/鐗╂枡 ID鑾峰彇浜у搧璇︽儏 + tags: + - 浜у搧 + /api-wms/v1/product/getProductDetailsByBarCode/{barCode}: + get: + parameters: + - description: token + in: header + name: Authorization + required: true + type: string + - description: barCode + in: path + name: barCode + required: true + type: string + produces: + - application/json + responses: + "200": + description: 鎴愬姛 + schema: + allOf: + - $ref: '#/definitions/util.Response' + - properties: + data: + $ref: '#/definitions/models.Material' + type: object + summary: 閫氳繃浜у搧/鍟嗗搧/鐗╂枡 鏉″舰鐮� 鑾峰彇浜у搧璇︽儏 tags: - 浜у搧 /api-wms/v1/product/getProductList: @@ -3343,6 +3897,31 @@ summary: 鑾峰彇鐧诲綍鐢ㄦ埛淇℃伅 tags: - 浜у搧 + /api-wms/v1/product/inputProduct: + post: + consumes: + - multipart/form-data + parameters: + - description: file + in: formData + name: file + required: true + type: file + - description: token + in: header + name: Authorization + required: true + type: string + produces: + - application/xlsx + responses: + "200": + description: 鎴愬姛 + schema: + $ref: '#/definitions/util.Response' + summary: 瀵煎叆鐗╂枡 + tags: + - 鐗╂枡绠$悊 /api-wms/v1/product/listDisuse: post: parameters: @@ -3619,6 +4198,64 @@ summary: 鏇存柊閲嶈璐ц鍒� tags: - 閲嶈璐ц鍒� + /api-wms/v1/systemConfig/get: + get: + parameters: + - description: 1 姣忔湀搴撳瓨缁撶畻鏃堕棿鐐� + enum: + - 1 + in: query + name: configType + required: true + type: integer + x-enum-comments: + SystemConfigTypeInventoryCutOffPoint: 搴撳瓨缁撶畻鏃堕棿鐐� + x-enum-varnames: + - SystemConfigTypeInventoryCutOffPoint + - description: token + in: header + name: Authorization + required: true + type: string + produces: + - application/json + responses: + "200": + description: 鎴愬姛 + schema: + allOf: + - $ref: '#/definitions/util.Response' + - properties: + data: + $ref: '#/definitions/models.SystemConfig' + type: object + summary: 鏍规嵁璁剧疆绫诲瀷鏌ヨ绯荤粺璁剧疆 + tags: + - 绯荤粺璁剧疆 + /api-wms/v1/systemConfig/save: + post: + parameters: + - description: 绯荤粺璁剧疆淇℃伅 + in: body + name: object + required: true + schema: + $ref: '#/definitions/request.SystemConfig' + - 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/warehouse/getWarehouseDetails/{id}: get: parameters: -- Gitblit v1.8.0