| | |
| | | "host": "{{.Host}}", |
| | | "basePath": "{{.BasePath}}", |
| | | "paths": { |
| | | "/v1/notice/task/start": { |
| | | "post": { |
| | | "/v1/task/finish/{id}": { |
| | | "put": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "Base" |
| | | "Task" |
| | | ], |
| | | "summary": "任务开启通知", |
| | | "summary": "任务结束", |
| | | "parameters": [ |
| | | { |
| | | "description": "查询参数", |
| | | "name": "object", |
| | | "in": "body", |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/request.TaskInfo" |
| | | } |
| | | "type": "integer", |
| | | "description": "工序id", |
| | | "name": "id", |
| | | "in": "path", |
| | | "required": true |
| | | } |
| | | ], |
| | | "responses": { |
| | |
| | | } |
| | | } |
| | | }, |
| | | "/v1/task/list": { |
| | | "/v1/task/get": { |
| | | "get": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "Base" |
| | | "Task" |
| | | ], |
| | | "summary": "任务开启通知", |
| | | "parameters": [ |
| | | { |
| | | "type": "integer", |
| | | "description": "页码", |
| | | "name": "page", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "integer", |
| | | "description": "每页大小", |
| | | "name": "pageSize", |
| | | "in": "query" |
| | | } |
| | | ], |
| | | "summary": "获取任务", |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/model.ScheduleTask" |
| | | } |
| | | "$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" |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | }, |
| | | "model.ScheduleTask": { |
| | | "model.Order": { |
| | | "type": "object", |
| | | "properties": { |
| | | "amount": { |
| | | "description": "Parameter string ` + "`" + `json:\"parameter\"` + "`" + ` //产品名称\nCustomer string ` + "`" + `json:\"customer\"` + "`" + `\nDeliverDate string ` + "`" + `json:\"deliverDate\"` + "`" + `\nOrderAttr string ` + "`" + `json:\"orderAttr\"` + "`" + `", |
| | | "type": "number" |
| | | }, |
| | | "data": { |
| | | "description": "排程任务json串", |
| | | "customer": { |
| | | "type": "string" |
| | | }, |
| | | "deliverDate": { |
| | | "type": "string" |
| | | }, |
| | | "endTime": { |
| | | "type": "integer" |
| | | }, |
| | | "id": { |
| | | "type": "integer" |
| | | "orderAttr": { |
| | | "description": "订单属性拼接的字符串,即货物描述", |
| | | "type": "string" |
| | | }, |
| | | "orderId": { |
| | | "description": "订单id", |
| | | "type": "string" |
| | | }, |
| | | "parameter": { |
| | | "type": "string" |
| | | }, |
| | | "productId": { |
| | | "description": "订单id", |
| | | "type": "string" |
| | | }, |
| | | "productName": { |
| | | "description": "产品名称", |
| | | "type": "string" |
| | | }, |
| | | "startTime": { |
| | |
| | | } |
| | | } |
| | | }, |
| | | "request.TaskInfo": { |
| | | "model.Procedures": { |
| | | "type": "object", |
| | | "properties": { |
| | | "device": { |
| | | "description": "设备", |
| | | "type": "string" |
| | | }, |
| | | "orderId": { |
| | | "description": "订单号", |
| | | "type": "string" |
| | | }, |
| | | "password": { |
| | | "description": "产品", |
| | | "type": "string" |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "procedure": { |
| | | "description": "工序", |
| | | "description": "request.ProductProcedure 对象", |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/request.ProductProcedure" |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | "request.ProcedureMaterial": { |
| | | "type": "object", |
| | | "properties": { |
| | | "amount": { |
| | | "type": "number" |
| | | }, |
| | | "materialId": { |
| | | "type": "string" |
| | | }, |
| | | "workOrder": { |
| | | "description": "工单", |
| | | "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" |
| | | } |
| | | } |
| | | } |