From 2d6875c93b25d0b7336c7fa11e066d213259fe2e Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期四, 25 四月 2024 10:02:01 +0800 Subject: [PATCH] 更改定时任务时区设置 --- docs/docs.go | 1283 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 1,263 insertions(+), 20 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index 307d0b1..b9d034b 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -152,8 +152,130 @@ } } }, - "/v1/plc/productProgress": { + "/v1/dashboard/dashboard": { "get": { + "produces": [ + "application/json" + ], + "tags": [ + "椹鹃┒鑸�" + ], + "summary": "椹鹃┒鑸�", + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/contextx.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/model.Dashboard" + } + } + } + ] + } + } + } + } + }, + "/v1/device/config": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "璁惧" + ], + "summary": "璁剧疆璁惧涓�浜涢厤缃�", + "parameters": [ + { + "description": "鏌ヨ鍙傛暟", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.DeviceConfig" + } + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/contextx.Response" + } + } + } + } + }, + "/v1/device/list": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "璁惧" + ], + "summary": "鑾峰彇褰撳墠闈㈡澘缁戝畾鐨勮澶囧垪琛�", + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/contextx.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/response.DeviceListResponse" + } + } + } + ] + } + } + } + } + }, + "/v1/device/setCurrentDeviceId": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "璁惧" + ], + "summary": "璁剧疆褰撳墠璁惧id", + "parameters": [ + { + "description": "鏌ヨ鍙傛暟", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.SetCurrentDevice" + } + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/contextx.Response" + } + } + } + } + }, + "/v1/plc/productProgress": { + "post": { "produces": [ "application/json" ], @@ -168,7 +290,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.SendProcessParams" + "$ref": "#/definitions/request.GetProductProgress" } } ], @@ -335,6 +457,180 @@ } } }, + "/v1/processModel/list": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "宸ヨ壓妯″瀷" + ], + "summary": "鑾峰彇宸ヨ壓妯″瀷鍒楄〃", + "parameters": [ + { + "type": "integer", + "description": "椤电爜", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "姣忛〉澶у皬", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "褰撳墠鐨勫伐搴廼d", + "name": "procedureId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/contextx.Response" + }, + { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/model.ProcessModel" + } + } + } + } + ] + } + } + } + } + }, + "/v1/reportWork/list": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "鎶ュ伐" + ], + "summary": "鎶ュ伐鍒楄〃", + "parameters": [ + { + "type": "integer", + "description": "椤电爜", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "姣忛〉澶у皬", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "宸ュ簭id", + "name": "procedureId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/contextx.ResponseList" + }, + { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/model.ReportWork" + } + } + } + } + ] + } + } + } + } + }, + "/v1/reportWork/report": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "鎶ュ伐" + ], + "summary": "涓婃姤", + "parameters": [ + { + "description": "鏌ヨ鍙傛暟", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.ReportWork" + } + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/contextx.Response" + } + } + } + } + }, + "/v1/system/problemList": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "绯荤粺" + ], + "summary": "闂璇婃柇/闂鍒楄〃", + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/contextx.Response" + }, + { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/problem.CheckResult" + } + } + } + } + ] + } + } + } + } + }, "/v1/task/countdown": { "get": { "produces": [ @@ -415,6 +711,26 @@ "description": "姣忛〉澶у皬", "name": "pageSize", "in": "query" + }, + { + "enum": [ + 1, + 2, + 3 + ], + "type": "integer", + "x-enum-comments": { + "TaskModeCurrent": "鏈紑濮嬬殑鍜岃繘琛屼腑鐨�", + "TaskModeLastFinished": "涓婁竴涓粨鏉熺殑", + "TaskModeUnStarted": "鏈紑濮嬬殑" + }, + "x-enum-varnames": [ + "TaskModeUnStarted", + "TaskModeCurrent", + "TaskModeLastFinished" + ], + "name": "taskMode", + "in": "query" } ], "responses": { @@ -429,7 +745,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/definitions/response.TaskData" + "$ref": "#/definitions/response.TaskResponse" } } } @@ -439,7 +755,82 @@ } } }, - "/v1/task/sendProcessParams/{id}": { + "/v1/task/list": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Task" + ], + "summary": "鑾峰彇浠诲姟鍒楄〃2", + "parameters": [ + { + "type": "integer", + "description": "閫氶亾鍙枫�備笉浼犲彇鍏ㄩ儴鐨�", + "name": "channel", + "in": "query" + }, + { + "type": "string", + "name": "deviceID", + "in": "query" + }, + { + "type": "integer", + "description": "榛樿3", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "description": "榛樿0", + "name": "offset", + "in": "query" + }, + { + "enum": [ + 1, + 2, + 3 + ], + "type": "integer", + "x-enum-varnames": [ + "QueryTypeUnFinish", + "QueryTypeToday", + "QueryTypeFinished" + ], + "description": "1 鏈畬鎴� 2 浠婂ぉ鏈畬鎴� 3 宸插畬鎴�", + "name": "type", + "in": "query" + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/contextx.Response" + }, + { + "type": "object", + "properties": { + "data": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/response.TaskResponse" + } + } + } + } + ] + } + } + } + } + }, + "/v1/task/sendProcessParams": { "post": { "produces": [ "application/json" @@ -508,6 +899,36 @@ } } } + }, + "/v1/task/updateProcessParams": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Task" + ], + "summary": "鏇存柊宸ヨ壓鍙傛暟锛堣繘琛屼腑鐨勪换鍔★級", + "parameters": [ + { + "description": "鏌ヨ鍙傛暟", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.SendProcessParams" + } + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/contextx.Response" + } + } + } + } } }, "definitions": { @@ -551,6 +972,17 @@ "common.ProductProcedure": { "type": "object", "properties": { + "allProcedureNames": { + "description": "鎵�灞炲伐鍗曞伐搴忓垪琛�", + "type": "array", + "items": { + "type": "string" + } + }, + "channel": { + "description": "閫氶亾搴忓彿", + "type": "integer" + }, "deviceId": { "type": "string" }, @@ -586,6 +1018,9 @@ "procedureName": { "type": "string" }, + "productProcedureID": { + "type": "string" + }, "startTime": { "type": "integer" }, @@ -601,15 +1036,50 @@ } } }, + "conf.Prompt": { + "type": "object", + "properties": { + "plcNotConnected": { + "type": "string" + }, + "safeProduce": { + "type": "string" + } + } + }, + "constvar.Parity": { + "type": "integer", + "enum": [ + 1, + 2, + 3 + ], + "x-enum-comments": { + "ParityEven": "濂囨牎楠�", + "ParityNull": "鏃犳牎楠�", + "ParityOdd": "鍋舵牎楠�" + }, + "x-enum-varnames": [ + "ParityEven", + "ParityOdd", + "ParityNull" + ] + }, "constvar.PlcMethod": { "type": "string", "enum": [ "modbusTCP", - "serial" + "modbusRTU", + "serial", + "缃戠粶", + "涓插彛" ], "x-enum-varnames": [ "PlcMethodModbusTCP", - "PlcMethodSerial" + "PlcMethodModbusRTU", + "PlcMethodSerial", + "PlcMethodModbusTCPChinese", + "PlcMethodSerialChinese" ] }, "constvar.PlcStartAddressType": { @@ -627,11 +1097,73 @@ "type": "string", "enum": [ "string", - "int" + "int16", + "int32" ], "x-enum-varnames": [ "PlcStartAddressValueTypeString", - "PlcStartAddressValueTypeInt" + "PlcStartAddressValueTypeInt16", + "PlcStartAddressValueTypeInt32" + ] + }, + "constvar.ProblemCode": { + "type": "string", + "enum": [ + "service", + "network", + "db", + "serf", + "cloud", + "device", + "process_model", + "plc_config", + "plc_address_list", + "plc_process_model_address_list", + "plc_connect" + ], + "x-enum-comments": { + "ProblemCodeCloud": "鏈繛鎺ヤ簯绔�", + "ProblemCodeDB": "鏁版嵁搴撹繛鎺ラ敊璇�", + "ProblemCodeDevice": "鏈粦瀹氳澶�", + "ProblemCodeNetwork": "缃戠粶閿欒", + "ProblemCodePlcAddressList": "plc鍦板潃琛ㄧ己澶�", + "ProblemCodePlcConfig": "plc閰嶇疆缂哄け", + "ProblemCodePlcConnect": "plc杩炴帴澶辫触", + "ProblemCodePlcProcessModelAddressList": "plc鍦板潃琛ㄧ己澶�", + "ProblemCodeProcessModel": "宸ヨ壓鍙傛暟缂哄け", + "ProblemCodeSerf": "鏈姞鍏erf闆嗙兢", + "ProblemCodeService": "鏈嶅姟涓嶅彲鐢�" + }, + "x-enum-varnames": [ + "ProblemCodeService", + "ProblemCodeNetwork", + "ProblemCodeDB", + "ProblemCodeSerf", + "ProblemCodeCloud", + "ProblemCodeDevice", + "ProblemCodeProcessModel", + "ProblemCodePlcConfig", + "ProblemCodePlcAddressList", + "ProblemCodePlcProcessModelAddressList", + "ProblemCodePlcConnect" + ] + }, + "constvar.TaskMode": { + "type": "integer", + "enum": [ + 1, + 2, + 3 + ], + "x-enum-comments": { + "TaskModeCurrent": "鏈紑濮嬬殑鍜岃繘琛屼腑鐨�", + "TaskModeLastFinished": "涓婁竴涓粨鏉熺殑", + "TaskModeUnStarted": "鏈紑濮嬬殑" + }, + "x-enum-varnames": [ + "TaskModeUnStarted", + "TaskModeCurrent", + "TaskModeLastFinished" ] }, "contextx.Response": { @@ -646,11 +1178,209 @@ } } }, + "contextx.ResponseList": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "data": {}, + "msg": { + "type": "string" + }, + "total": { + "type": "integer" + } + } + }, + "model.CommonStats": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "model.Dashboard": { + "type": "object", + "properties": { + "createdAt": { + "type": "string" + }, + "delayWorkOrderAmount": { + "description": "寤舵湡浜や粯宸ュ崟鏁�", + "type": "integer" + }, + "deletedAt": { + "type": "string" + }, + "deviceLoad": { + "description": "璁惧璐熻嵎瀵规瘮鍒嗘瀽", + "type": "array", + "items": { + "$ref": "#/definitions/model.CommonStats" + } + }, + "deviceLoadData": { + "description": "璁惧璐熻嵎瀵规瘮鍒嗘瀽", + "type": "string" + }, + "deviceRunningAmount": { + "description": "寮�鏈哄彴鏁�", + "type": "integer" + }, + "externalDeviceRunningAmount": { + "description": "澶栧姞宸ュ彴鏁�", + "type": "integer" + }, + "id": { + "type": "integer" + }, + "inMaintenanceDeviceAmount": { + "description": "缁翠慨涓澶囨暟", + "type": "integer" + }, + "internalDeviceRunningAmount": { + "description": "鑷湁寮�鏈哄彴鏁�", + "type": "integer" + }, + "materialMissWorkOrderAmount": { + "description": "鐗╂枡涓嶈冻宸ュ崟鏁�", + "type": "integer" + }, + "materialRequirement": { + "description": "鐗╂枡闇�姹傜粺璁�", + "type": "array", + "items": { + "$ref": "#/definitions/model.CommonStats" + } + }, + "materialRequirementData": { + "description": "鐗╂枡闇�姹傜粺璁�", + "type": "string" + }, + "orderFinishRate": { + "description": "璁㈠崟瀹屾垚姣旂巼", + "type": "array", + "items": { + "$ref": "#/definitions/model.CommonStats" + } + }, + "orderFinishRateData": { + "description": "璁㈠崟瀹屾垚姣旂巼", + "type": "string" + }, + "outPlanProductionAmount": { + "description": "璁″垝澶栧姞宸ユ暟", + "type": "integer" + }, + "personnelProductivity": { + "description": "浜哄憳鐢熶骇鏁堢巼", + "type": "array", + "items": { + "$ref": "#/definitions/model.CommonStats" + } + }, + "personnelProductivityData": { + "description": "浜哄憳鐢熶骇鏁堢巼", + "type": "string" + }, + "personnelSkillPercent": { + "description": "浜哄憳鎶�鑳藉崰姣�", + "type": "array", + "items": { + "$ref": "#/definitions/model.CommonStats" + } + }, + "personnelSkillPercentData": { + "description": "浜哄憳鎶�鑳藉崰姣�", + "type": "string" + }, + "planOrderFinishRate": { + "description": "璁″垝杈炬垚鐜�", + "type": "integer" + }, + "planProductionAmount": { + "description": "璁″垝鍔犲伐鏁�", + "type": "integer" + }, + "realExternalProductionAmount": { + "description": "瀹為檯澶栧姞宸ユ暟", + "type": "integer" + }, + "realProductionAmount": { + "description": "瀹為檯鐢熶骇鏁�", + "type": "integer" + }, + "todayFinishAmount": { + "description": "杞﹂棿褰撴棩鍚堣鐢熶骇", + "type": "integer" + }, + "todayQualifiedRate": { + "description": "杞﹂棿褰撴棩姝e搧鐜�", + "type": "string" + }, + "totalDeviceAmount": { + "description": "鎬昏澶囨暟", + "type": "integer" + }, + "totalProductionAmount": { + "description": "鎬讳骇閲�", + "type": "integer" + }, + "updatedAt": { + "type": "string" + }, + "version": { + "type": "string" + }, + "workOrderAmount": { + "description": "鐢熶骇宸ュ崟鏁�", + "type": "integer" + }, + "workOrderStats": { + "description": "宸ュ崟杩涘害缁熻", + "type": "array", + "items": { + "$ref": "#/definitions/model.WorkOrderStats" + } + }, + "workOrderStatsData": { + "description": "宸ュ崟杩涘害缁熻", + "type": "string" + }, + "workerTypeStats": { + "description": "浜哄憳宸ョ鍒嗘瀽", + "type": "array", + "items": { + "$ref": "#/definitions/model.CommonStats" + } + }, + "workerTypeStatsData": { + "description": "浜哄憳宸ョ鍒嗘瀽", + "type": "string" + }, + "workshopStats": { + "description": "杞﹂棿缁熻", + "type": "array", + "items": { + "$ref": "#/definitions/model.WorkshopStats" + } + }, + "workshopStatsData": { + "description": "杞﹂棿缁熻", + "type": "string" + } + } + }, "model.DevicePlc": { "type": "object", "properties": { "address": { - "description": "PortName string ` + "`" + `gorm:\"type:varchar(191);comment:绔彛鍚嶇О\" json:\"portName\"` + "`" + `\nFrequency int ` + "`" + `gorm:\"type:int(11);comment:鏁版嵁鏇存柊棰戠巼 0-瀹炴椂鏇存柊 1-1娆�/绉抃" json:\"frequency\"` + "`" + `", + "description": "plc ip鍦板潃锛� method = modbusTCP鐢�", "type": "string" }, "baudRate": { @@ -660,11 +1390,25 @@ "brand": { "type": "string" }, + "createdAt": { + "type": "string" + }, + "dataBit": { + "description": "鏁版嵁浣嶏紝method = modbusRTU 鐢�", + "type": "integer" + }, + "deletedAt": { + "type": "string" + }, "details": { "type": "array", "items": { "$ref": "#/definitions/model.DevicePlcAddress" } + }, + "deviceID": { + "description": "璁惧缂栧彿", + "type": "string" }, "id": { "type": "integer" @@ -675,6 +1419,14 @@ "method": { "$ref": "#/definitions/constvar.PlcMethod" }, + "parity": { + "description": "鏍¢獙鏂瑰紡锛宮ethod = modbusRTU 鐢�", + "allOf": [ + { + "$ref": "#/definitions/constvar.Parity" + } + ] + }, "port": { "description": "plc 绔彛鍙凤紝 method = modbusTCP鐢�", "type": "integer" @@ -682,12 +1434,23 @@ "serialName": { "description": "涓插彛鍚嶇О锛宮ethod = serial鏃� 鐢�", "type": "string" + }, + "stopBit": { + "description": "鍋滄浣嶏紝method = modbusRTU 鐢�", + "type": "integer" + }, + "updatedAt": { + "type": "string" } } }, "model.DevicePlcAddress": { "type": "object", "properties": { + "channel": { + "description": "鏁版嵁璧峰鍦板潃", + "type": "integer" + }, "fieldName": { "description": "瀵瑰簲绯荤粺瀛楁", "allOf": [ @@ -723,6 +1486,12 @@ "networkCard" ], "properties": { + "createdAt": { + "type": "string" + }, + "deletedAt": { + "type": "string" + }, "dns": { "description": "dns", "type": "string" @@ -753,6 +1522,9 @@ "$ref": "#/definitions/model.NetConfigStatus" } ] + }, + "updatedAt": { + "type": "string" } } }, @@ -777,13 +1549,22 @@ "amount": { "type": "number" }, + "createdAt": { + "type": "string" + }, "customer": { + "type": "string" + }, + "deletedAt": { "type": "string" }, "deliverDate": { "type": "string" }, "endTime": { + "type": "integer" + }, + "id": { "type": "integer" }, "orderAttr": { @@ -811,6 +1592,9 @@ "unit": { "type": "string" }, + "updatedAt": { + "type": "string" + }, "workOrderId": { "type": "string" } @@ -832,10 +1616,19 @@ "model.PlcBrand": { "type": "object", "properties": { + "createdAt": { + "type": "string" + }, + "deletedAt": { + "type": "string" + }, "id": { "type": "integer" }, "name": { + "type": "string" + }, + "updatedAt": { "type": "string" } } @@ -856,17 +1649,26 @@ "model.Procedures": { "type": "object", "properties": { + "channel": { + "description": "閫氶亾", + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "deletedAt": { + "type": "string" + }, "deviceId": { "type": "string" }, "endTime": { "type": "integer" }, - "id": { + "finishedQuantity": { "type": "integer" }, - "position": { - "description": "姣忎釜璁惧鍙兘鏈夊涓満浣嶅悓鏃剁敓浜э紝鐢╬osition琛ㄧず浣嶇疆", + "id": { "type": "integer" }, "procedure": { @@ -880,21 +1682,300 @@ "procedureId": { "type": "string" }, + "processModelNumber": { + "description": "宸ヨ壓妯″瀷缂栧彿", + "type": "string" + }, + "productProcedureID": { + "description": "浜у搧宸ュ簭id", + "type": "string" + }, + "realEndTime": { + "type": "integer" + }, + "realStartTime": { + "type": "integer" + }, "startTime": { "type": "integer" }, "status": { "$ref": "#/definitions/model.ProcedureStatus" + }, + "updatedAt": { + "type": "string" + } + } + }, + "model.ProcessModel": { + "type": "object", + "properties": { + "createdAt": { + "type": "string" + }, + "deletedAt": { + "type": "string" + }, + "deviceId": { + "description": "鐢ㄤ簬杩囨护鑾峰彇nsq娑堟伅", + "type": "string" + }, + "id": { + "type": "integer" + }, + "isUpdate": { + "description": "鍓嶇鐢�", + "type": "boolean" + }, + "newNumber": { + "type": "string" + }, + "newParamsMap": { + "type": "object", + "additionalProperties": true + }, + "number": { + "description": "宸ヨ壓妯″瀷缂栧彿", + "type": "string" + }, + "params": { + "type": "string" + }, + "paramsMap": { + "type": "object", + "additionalProperties": true + }, + "procedure": { + "description": "宸ュ簭", + "type": "string" + }, + "product": { + "description": "浜у搧鍚嶇О", + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + }, + "model.ReportWork": { + "type": "object", + "properties": { + "barCode": { + "description": "鏉″舰鐮�", + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "deletedAt": { + "type": "string" + }, + "deviceId": { + "type": "string" + }, + "deviceName": { + "type": "string" + }, + "endTime": { + "type": "integer" + }, + "finishAmount": { + "description": "鏈鎶ュ伐 - 涓婃鎶ュ伐", + "type": "integer" + }, + "id": { + "type": "integer" + }, + "procedureId": { + "type": "string" + }, + "proceduresId": { + "description": "procedures琛ㄧ殑id", + "type": "integer" + }, + "productProcedureID": { + "description": "浜у搧宸ュ簭id", + "type": "string" + }, + "reportAmount": { + "description": "鎶ュ伐鏁伴噺", + "type": "integer" + }, + "startTime": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + }, + "workOrderId": { + "type": "string" + }, + "workerID": { + "description": "鎶ュ伐浜篿d", + "type": "string" + }, + "workerName": { + "description": "鎶ュ伐浜哄鍚�", + "type": "string" + }, + "workerTime": { + "description": "宸ユ椂锛屽崟浣嶇", + "type": "integer" + } + } + }, + "model.WorkOrderStats": { + "type": "object", + "properties": { + "amount": { + "description": "鐢熶骇鏁伴噺", + "type": "integer" + }, + "delayDays": { + "description": "寤舵湡澶╂暟", + "type": "integer" + }, + "finishProcedureNum": { + "description": "宸插畬鎴愬伐搴忔暟閲�", + "type": "integer" + }, + "number": { + "description": "缂栧彿", + "type": "string" + }, + "planTime": { + "description": "璁″垝鏃堕棿", + "type": "string" + }, + "procedureNum": { + "description": "宸ュ簭鏁伴噺", + "type": "integer" + }, + "processingProcedureNum": { + "description": "杩涜涓伐搴忔暟閲�", + "type": "integer" + }, + "product": { + "description": "浜у搧", + "type": "string" + }, + "scale": { + "description": "瑙勬牸", + "type": "string" + } + } + }, + "model.WorkshopStats": { + "type": "object", + "properties": { + "defective": { + "description": "娆″搧鏁伴噺", + "type": "integer" + }, + "name": { + "description": "杞﹂棿鍚嶇О", + "type": "string" + }, + "percent": { + "description": "姝e搧鐜�", + "type": "integer" + }, + "qualified": { + "description": "姝e搧鏁伴噺", + "type": "integer" + }, + "total": { + "description": "鐢熶骇鎬绘暟", + "type": "integer" + } + } + }, + "problem.CheckResult": { + "type": "object", + "properties": { + "checkResult": { + "type": "boolean" + }, + "itemCode": { + "$ref": "#/definitions/constvar.ProblemCode" + }, + "itemName": { + "type": "string" } } }, "request.AddPlcBrand": { "type": "object", "properties": { + "createdAt": { + "type": "string" + }, + "deletedAt": { + "type": "string" + }, "id": { "type": "integer" }, "name": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + }, + "request.DeviceConfig": { + "type": "object", + "properties": { + "needSetProcessParams": { + "description": "鏄惁闇�瑕佽缃伐鑹哄弬鏁�", + "type": "boolean" + } + } + }, + "request.GetProductProgress": { + "type": "object", + "properties": { + "channel": { + "type": "integer" + }, + "procedureId": { + "type": "integer" + } + } + }, + "request.QueryType": { + "type": "integer", + "enum": [ + 1, + 2, + 3 + ], + "x-enum-varnames": [ + "QueryTypeUnFinish", + "QueryTypeToday", + "QueryTypeFinished" + ] + }, + "request.ReportWork": { + "type": "object", + "required": [ + "procedureId", + "reportAmount", + "workerID" + ], + "properties": { + "procedureId": { + "description": "宸ュ簭id", + "type": "integer" + }, + "reportAmount": { + "description": "鎶ュ伐鏁伴噺", + "type": "integer" + }, + "workerID": { + "description": "鎶ュ憡鑰卛d", "type": "string" } } @@ -905,11 +1986,17 @@ "procedureId" ], "properties": { - "position": { - "type": "integer" - }, "procedureId": { "type": "integer" + } + } + }, + "request.SetCurrentDevice": { + "type": "object", + "properties": { + "currentDeviceID": { + "description": "褰撳墠閫夊畾鐨勭敓浜ц澶�", + "type": "string" } } }, @@ -917,7 +2004,7 @@ "type": "object", "properties": { "address": { - "description": "PortName string ` + "`" + `gorm:\"type:varchar(191);comment:绔彛鍚嶇О\" json:\"portName\"` + "`" + `\nFrequency int ` + "`" + `gorm:\"type:int(11);comment:鏁版嵁鏇存柊棰戠巼 0-瀹炴椂鏇存柊 1-1娆�/绉抃" json:\"frequency\"` + "`" + `", + "description": "plc ip鍦板潃锛� method = modbusTCP鐢�", "type": "string" }, "baudRate": { @@ -927,11 +2014,25 @@ "brand": { "type": "string" }, + "createdAt": { + "type": "string" + }, + "dataBit": { + "description": "鏁版嵁浣嶏紝method = modbusRTU 鐢�", + "type": "integer" + }, + "deletedAt": { + "type": "string" + }, "details": { "type": "array", "items": { "$ref": "#/definitions/model.DevicePlcAddress" } + }, + "deviceID": { + "description": "璁惧缂栧彿", + "type": "string" }, "id": { "type": "integer" @@ -942,6 +2043,14 @@ "method": { "$ref": "#/definitions/constvar.PlcMethod" }, + "parity": { + "description": "鏍¢獙鏂瑰紡锛宮ethod = modbusRTU 鐢�", + "allOf": [ + { + "$ref": "#/definitions/constvar.Parity" + } + ] + }, "port": { "description": "plc 绔彛鍙凤紝 method = modbusTCP鐢�", "type": "integer" @@ -949,17 +2058,88 @@ "serialName": { "description": "涓插彛鍚嶇О锛宮ethod = serial鏃� 鐢�", "type": "string" + }, + "stopBit": { + "description": "鍋滄浣嶏紝method = modbusRTU 鐢�", + "type": "integer" + }, + "updatedAt": { + "type": "string" } } }, "request.UpdatePlcBrand": { "type": "object", "properties": { + "createdAt": { + "type": "string" + }, + "deletedAt": { + "type": "string" + }, "id": { "type": "integer" }, "name": { "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + }, + "response.Device": { + "type": "object", + "properties": { + "deviceID": { + "type": "string" + }, + "deviceName": { + "type": "string" + }, + "needSetProcessParams": { + "description": "鏄惁闇�瑕佽缃伐鑹哄弬鏁�", + "type": "boolean" + } + } + }, + "response.DeviceListResponse": { + "type": "object", + "properties": { + "clusterNodeQuantity": { + "description": "闆嗙兢鑺傜偣鏁伴噺", + "type": "integer" + }, + "clusterStatus": { + "description": "闆嗙兢鐘舵��", + "type": "string" + }, + "currentDeviceID": { + "description": "褰撳墠閫夊畾鐨勭敓浜ц澶�", + "type": "string" + }, + "deviceList": { + "description": "鐢熶骇璁惧id鍒楄〃", + "type": "array", + "items": { + "$ref": "#/definitions/response.Device" + } + }, + "systemDeviceID": { + "description": "宸ユ帶鏈鸿澶嘔D", + "type": "string" + }, + "systemDeviceRunSince": { + "description": "绯荤粺杩愯寮�濮嬫椂闂存埑", + "type": "integer" + }, + "systemDeviceStatus": { + "description": "璁惧鐘舵��", + "allOf": [ + { + "$ref": "#/definitions/response.SystemDeviceStatus" + } + ] } } }, @@ -1004,13 +2184,37 @@ "response.ProductProgress": { "type": "object", "properties": { + "RealEndTime": { + "type": "integer" + }, + "RealStartTime": { + "type": "integer" + }, "finishNumber": { + "type": "integer" + }, + "plcStatus": { "type": "integer" }, "totalNumber": { "type": "integer" } } + }, + "response.SystemDeviceStatus": { + "type": "integer", + "enum": [ + 1, + 2 + ], + "x-enum-comments": { + "SystemDeviceStatusNormal": "姝e父", + "SystemDeviceStatusUnNormal": "寮傚父" + }, + "x-enum-varnames": [ + "SystemDeviceStatusNormal", + "SystemDeviceStatusUnNormal" + ] }, "response.TaskCountdown": { "type": "object", @@ -1038,20 +2242,59 @@ "type": "string" } }, + "canStarted": { + "description": "鏄惁鍙互寮�濮嬬敓浜�", + "type": "boolean" + }, + "channel": { + "description": "褰撳墠浠诲姟鍦ㄨ澶囩鍑犱釜閫氶亾", + "type": "integer" + }, "currentProcedureIndex": { "type": "integer" }, "order": { "$ref": "#/definitions/model.Order" }, - "position": { - "description": "褰撳墠浠诲姟鍦ㄨ澶囩鍑犱釜浣嶇疆", - "type": "integer" - }, "procedure": { "$ref": "#/definitions/model.Procedures" } } + }, + "response.TaskResponse": { + "type": "object", + "properties": { + "channelAmount": { + "description": "閫氶亾鏁伴噺", + "type": "integer" + }, + "prompt": { + "description": "鎻愮ず璇�", + "allOf": [ + { + "$ref": "#/definitions/conf.Prompt" + } + ] + }, + "taskCount": { + "description": "浠诲姟鏁伴噺", + "type": "integer" + }, + "tasks": { + "description": "浠诲姟鍒楄〃", + "type": "array", + "items": { + "$ref": "#/definitions/response.TaskData" + } + }, + "workers": { + "description": "浜哄憳鍒楄〃", + "type": "array", + "items": { + "$ref": "#/definitions/common.ProcedureWorker" + } + } + } } } }` -- Gitblit v1.8.0