{ "swagger": "2.0", "info": { "contact": {} }, "paths": { "/v1/task/finish/{id}": { "put": { "produces": [ "application/json" ], "tags": [ "Task" ], "summary": "任务结束", "parameters": [ { "type": "integer", "description": "工序id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "成功", "schema": { "$ref": "#/definitions/contextx.Response" } } } } }, "/v1/task/get": { "get": { "produces": [ "application/json" ], "tags": [ "Task" ], "summary": "获取任务", "responses": { "200": { "description": "成功", "schema": { "allOf": [ { "$ref": "#/definitions/contextx.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.TaskData" } } } ] } } } } }, "/v1/task/sendProcessParams/{id}": { "post": { "produces": [ "application/json" ], "tags": [ "Task" ], "summary": "下发工艺参数", "parameters": [ { "type": "integer", "description": "工序id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "成功", "schema": { "$ref": "#/definitions/contextx.Response" } } } } }, "/v1/task/start/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "Task" ], "summary": "任务开始", "parameters": [ { "type": "integer", "description": "工序id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "成功", "schema": { "$ref": "#/definitions/contextx.Response" } } } } } }, "definitions": { "contextx.Response": { "type": "object", "properties": { "code": { "type": "integer" }, "data": {}, "msg": { "type": "string" } } }, "model.Order": { "type": "object", "properties": { "amount": { "type": "number" }, "customer": { "type": "string" }, "deliverDate": { "type": "string" }, "endTime": { "type": "integer" }, "orderAttr": { "description": "订单属性拼接的字符串,即货物描述", "type": "string" }, "orderId": { "type": "string" }, "parameter": { "type": "string" }, "productId": { "type": "string" }, "productName": { "type": "string" }, "startTime": { "type": "integer" }, "unit": { "type": "string" } } }, "model.Procedures": { "type": "object", "properties": { "id": { "type": "integer" }, "procedure": { "description": "request.ProductProcedure 对象", "allOf": [ { "$ref": "#/definitions/request.ProductProcedure" } ] } } }, "request.ProcedureMaterial": { "type": "object", "properties": { "amount": { "type": "number" }, "materialId": { "type": "string" }, "materialName": { "type": "string" }, "unit": { "type": "string" } } }, "request.ProcedureWorker": { "type": "object", "properties": { "phoneNum": { "type": "string" }, "workerId": { "type": "string" }, "workerName": { "type": "string" } } }, "request.ProductProcedure": { "type": "object", "properties": { "deviceId": { "type": "string" }, "endTime": { "type": "integer" }, "inputMaterials": { "description": "输入物料列表", "type": "array", "items": { "$ref": "#/definitions/request.ProcedureMaterial" } }, "outputMaterials": { "description": "输出物料列表", "type": "array", "items": { "$ref": "#/definitions/request.ProcedureMaterial" } }, "procedureId": { "type": "string" }, "procedureName": { "type": "string" }, "startTime": { "type": "integer" }, "workHours": { "type": "number" }, "workers": { "description": "人员列表", "type": "array", "items": { "$ref": "#/definitions/request.ProcedureWorker" } } } }, "response.TaskData": { "type": "object", "properties": { "order": { "$ref": "#/definitions/model.Order" }, "procedure": { "$ref": "#/definitions/model.Procedures" } } } } }