From fcc5eaccffbbd0980077cf3fc4707566546f879a Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期四, 17 八月 2023 17:31:18 +0800
Subject: [PATCH] 增加plc pkg, 增加获取任务,完成任务,开始任务接口

---
 docs/docs.go |  198 +++++++++++++++++++++++++++++++++++-------------
 1 files changed, 143 insertions(+), 55 deletions(-)

diff --git a/docs/docs.go b/docs/docs.go
index be67e6e..91eb01b 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -16,24 +16,22 @@
     "host": "{{.Host}}",
     "basePath": "{{.BasePath}}",
     "paths": {
-        "/v1/notice/task/start": {
-            "post": {
+        "/v1/task/finish/{id}": {
+            "put": {
                 "produces": [
                     "application/json"
                 ],
                 "tags": [
                     "Base"
                 ],
-                "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": {
@@ -46,29 +44,15 @@
                 }
             }
         },
-        "/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": "鎴愬姛",
@@ -81,14 +65,39 @@
                                     "type": "object",
                                     "properties": {
                                         "data": {
-                                            "type": "array",
-                                            "items": {
-                                                "$ref": "#/definitions/model.ScheduleTask"
-                                            }
+                                            "$ref": "#/definitions/response.TaskData"
                                         }
                                     }
                                 }
                             ]
+                        }
+                    }
+                }
+            }
+        },
+        "/v1/task/start/{id}": {
+            "get": {
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "Base"
+                ],
+                "summary": "浠诲姟寮�濮�",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "宸ュ簭id",
+                        "name": "id",
+                        "in": "path",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "鎴愬姛",
+                        "schema": {
+                            "$ref": "#/definitions/contextx.Response"
                         }
                     }
                 }
@@ -108,33 +117,35 @@
                 }
             }
         },
-        "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": {
@@ -145,28 +156,105 @@
                 }
             }
         },
-        "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"
                 }
             }
         }

--
Gitblit v1.8.0