map/docs/api/operation.md
2024-11-01 09:29:07 +08:00

4.4 KiB

操作相关模块

API接口一览表

接口分类 接口描述 API接口 权限
2.1操作记录 2.1.1获取相关操作记录 /api/operation/getEventLogList
2.2手动操作 2.2.1设备遥控操作 下令 /api/operation/command SYS_AUTHORITY_ID_DEVICE_CTRL
2.2.2设备遥调操作 下令 /api/operation/setPoint SYS_AUTHORITY_ID_DEVICE_CTRL
2.2.3设备手工至位 不下令 /api/operation/manualCommand SYS_AUTHORITY_ID_DEVICE_CTRL

2.1 操作相关模块接口

2.1.1 获取相关操作记录

POST 请求接口

/api/operation/getEventLogList

请求参数

{
  "startTime": "2024-10-21 23:00:00:00",
  "endTime": "2024-10-31 23:00:00:00",YES
  "attributeCode": "SC-01",
  "userName": "张三",
  "pageNum": 1,
  "pageSize": 10
}

入参描述

参数名 参数类型 可选 描述
startTime String YES 开始时间
endTime String YES 结束时间
attributeCode String YES 风机编号
userName String YES 操作人员
pageNum Integer NO 当前页
pageSize Integer NO 每页显示大小

返回报文

{
  "code": 200,
  "success": true,
  "data": {
    "total": 2,
    "rows": [
      {
        "id": "1851903283326214146",
        "userName": "张三",
        "optTime": "2024-10-31 16:25:24",
        "deviceId": 863256444266222,
        "attributeCode": "testCode",
        "attributeName": "测试遥控2",
        "optDesc": "手动调试2"
      }
    ],
    "code": 200,
    "msg": "查询成功"
  },
  "msg": "操作成功"
}

返参描述

参数名 参数类型 可选 描述
id Long id
optTime String 时间
attributeCode String 风机编号
attributeName String 操作类型
optDesc String 操作详情
userName String 操作员
deviceId Long 操作设备id

2.2 手动操作相关接口

2.2.1 设备遥控操作 下令

POST 请求接口

/api/operation/command

请求参数

{
  "deviceId": 863256444266222,
  "serviceCode": "setTurbineStop",
  "serviceName": "风机停机指令",
  "optDesc": "风机停机",
  "opValue": 0
}

入参描述

参数名 参数类型 可选 描述
deviceId Long NO 设备id
serviceCode String NO 命令编码
serviceName String YES 遥控名称
optDesc String YES 操作描述
opValue Integer NO 遥控值

返回报文

{
  "code": 200,
  "success": true,
  "msg": "操作成功"
}

2.2.2 设备遥调操作 下令

POST 请求接口

/api/operation/setPoint

请求参数

{
  "deviceId": 863256444266222,
  "serviceCode": "setGenSpeedLimitValue",
  "serviceName": "发电机转速给定值",
  "optDesc": "发电机转速给定值:12.45",
  "opValue": 12.45
}

入参描述

参数名 参数类型 可选 描述
deviceId Long NO 设备id
serviceCode String NO 命令编码
serviceName String YES 遥控名称
optDesc String YES 操作描述
opValue Integer NO 遥控值

返回报文

{
  "code": 200,
  "success": true,
  "msg": "操作成功"
}

2.2.3 设备手工至位 不下令

POST 请求接口

/api/operation/manualCommand

请求参数

{
  "deviceId": 863256444266222,
  "serviceCode": "Locked",
  "serviceName": "风机被锁定",
  "optDesc": "风机锁定",
  "opValue": 1
}

入参描述

参数名 参数类型 可选 描述
deviceId Long NO 设备id
serviceCode String NO 命令编码
serviceName String YES 遥控名称
optDesc String YES 操作描述
opValue Integer NO 遥控值

返回报文

{
  "code": 200,
  "success": true,
  "msg": "操作成功"
}