From 196437f8ba646344cf25c9fa4bd3797ca40e2154 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期三, 13 九月 2023 15:40:54 +0800
Subject: [PATCH] 支持获取多个任务,增加任务数量统计

---
 docs/docs.go |  153 ++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 140 insertions(+), 13 deletions(-)

diff --git a/docs/docs.go b/docs/docs.go
index 1f4a9ab..d76cf46 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -158,7 +158,7 @@
                     "application/json"
                 ],
                 "tags": [
-                    "鑾峰彇鍔ㄦ�佹暟鎹�"
+                    "鐢熶骇鏁伴噺"
                 ],
                 "summary": "鑾峰彇鐢熶骇杩涘害",
                 "responses": {
@@ -178,6 +178,25 @@
                                     }
                                 }
                             ]
+                        }
+                    }
+                }
+            }
+        },
+        "/v1/plc/setProductNumber": {
+            "post": {
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "鐢熶骇鏁伴噺"
+                ],
+                "summary": "璁剧疆鐢熶骇鎬婚噺",
+                "responses": {
+                    "200": {
+                        "description": "鎴愬姛",
+                        "schema": {
+                            "$ref": "#/definitions/contextx.Response"
                         }
                     }
                 }
@@ -305,6 +324,37 @@
                 }
             }
         },
+        "/v1/task/countdown": {
+            "get": {
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "Task"
+                ],
+                "summary": "鏂颁换鍔″�掕鏃�",
+                "responses": {
+                    "200": {
+                        "description": "鎴愬姛",
+                        "schema": {
+                            "allOf": [
+                                {
+                                    "$ref": "#/definitions/contextx.Response"
+                                },
+                                {
+                                    "type": "object",
+                                    "properties": {
+                                        "data": {
+                                            "$ref": "#/definitions/response.TaskCountdown"
+                                        }
+                                    }
+                                }
+                            ]
+                        }
+                    }
+                }
+            }
+        },
         "/v1/task/finish/{id}": {
             "put": {
                 "produces": [
@@ -342,6 +392,20 @@
                     "Task"
                 ],
                 "summary": "鑾峰彇浠诲姟",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "椤电爜",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "姣忛〉澶у皬",
+                        "name": "pageSize",
+                        "in": "query"
+                    }
+                ],
                 "responses": {
                     "200": {
                         "description": "鎴愬姛",
@@ -372,7 +436,7 @@
                 "tags": [
                     "Task"
                 ],
-                "summary": "涓嬪彂宸ヨ壓鍙傛暟",
+                "summary": "涓嬪彂宸ヨ壓鍙傛暟锛堝紑濮嬩换鍔★級",
                 "parameters": [
                     {
                         "type": "integer",
@@ -400,7 +464,7 @@
                 "tags": [
                     "Task"
                 ],
-                "summary": "浠诲姟寮�濮�",
+                "summary": "浠诲姟寮�濮嬶紙鑾峰彇宸ヨ壓鍙傛暟锛�",
                 "parameters": [
                     {
                         "type": "integer",
@@ -535,6 +599,28 @@
                 "PlcMethodSerial"
             ]
         },
+        "constvar.PlcStartAddressType": {
+            "type": "integer",
+            "enum": [
+                1,
+                2
+            ],
+            "x-enum-varnames": [
+                "PlcStartAddressTypeFinishNumber",
+                "PlcStartAddressTypeTotalNumber"
+            ]
+        },
+        "constvar.PlcStartAddressValueType": {
+            "type": "string",
+            "enum": [
+                "string",
+                "int"
+            ],
+            "x-enum-varnames": [
+                "PlcStartAddressValueTypeString",
+                "PlcStartAddressValueTypeInt"
+            ]
+        },
         "contextx.Response": {
             "type": "object",
             "properties": {
@@ -591,7 +677,11 @@
             "properties": {
                 "fieldName": {
                     "description": "瀵瑰簲绯荤粺瀛楁",
-                    "type": "integer"
+                    "allOf": [
+                        {
+                            "$ref": "#/definitions/constvar.PlcStartAddressType"
+                        }
+                    ]
                 },
                 "length": {
                     "description": "鏁版嵁闀垮害",
@@ -603,7 +693,11 @@
                 },
                 "type": {
                     "description": "鏁版嵁绫诲瀷",
-                    "type": "string"
+                    "allOf": [
+                        {
+                            "$ref": "#/definitions/constvar.PlcStartAddressValueType"
+                        }
+                    ]
                 }
             }
         },
@@ -713,10 +807,12 @@
             "type": "integer",
             "enum": [
                 1,
-                2
+                2,
+                3
             ],
             "x-enum-varnames": [
-                "OrderStatusUnFinished",
+                "OrderStatusWaitProcess",
+                "OrderStatusProcessing",
                 "OrderStatusFinished"
             ]
         },
@@ -735,16 +831,21 @@
             "type": "integer",
             "enum": [
                 1,
-                2
+                2,
+                3
             ],
             "x-enum-varnames": [
-                "ProcedureStatusUnFinished",
+                "ProcedureStatusWaitProcess",
+                "ProcedureStatusProcessing",
                 "ProcedureStatusFinished"
             ]
         },
         "model.Procedures": {
             "type": "object",
             "properties": {
+                "deviceId": {
+                    "type": "string"
+                },
                 "endTime": {
                     "type": "integer"
                 },
@@ -758,6 +859,9 @@
                             "$ref": "#/definitions/common.ProductProcedure"
                         }
                     ]
+                },
+                "procedureId": {
+                    "type": "string"
                 },
                 "startTime": {
                     "type": "integer"
@@ -871,17 +975,40 @@
             "properties": {
                 "finishNumber": {
                     "type": "integer"
+                },
+                "totalNumber": {
+                    "type": "integer"
+                }
+            }
+        },
+        "response.TaskCountdown": {
+            "type": "object",
+            "properties": {
+                "countDownHour": {
+                    "description": "鍊掕鏃� 鏃�",
+                    "type": "integer"
+                },
+                "countDownMinute": {
+                    "description": "鍊掕鏃� 鍒�",
+                    "type": "integer"
+                },
+                "showCountDown": {
+                    "description": "鏄惁灞曠ず鍊掕鏃�",
+                    "type": "boolean"
                 }
             }
         },
         "response.TaskData": {
             "type": "object",
             "properties": {
-                "deviceName": {
-                    "type": "string"
+                "allProcedures": {
+                    "type": "array",
+                    "items": {
+                        "type": "string"
+                    }
                 },
-                "deviceStatus": {
-                    "type": "string"
+                "currentProcedureIndex": {
+                    "type": "integer"
                 },
                 "order": {
                     "$ref": "#/definitions/model.Order"

--
Gitblit v1.8.0