
###设备列表
POST {{baseUrl}}/device/list
Content-Type: application/json

{
  "page": 1,
  "size": 100
}


###设备更新与保存
POST {{baseUrl}}/device/stopOrStartComsumeQueue
Authorization: {{authToken}}
Content-Type: application/json

{
  "id": 60,
  "enabled": 0

}

###设备更新与保存
POST {{baseUrl}}/device/save
Authorization: {{authToken}}
Content-Type: application/json

{
  "deviceName": "gosxaj11",
  "deviceCode": "ksdmo711",
  "deviceType": 1,
  "deviceMac": "a3ku15",
  "ip": "5ffz2e",
  "centernum": "pcou8p",
  "port": "0ujj4h",
  "siteNum": "8aw47p",
  "deviceFirmId": 922,
  "deviceFirmname": "cwzu1n",
  "deviceOnlineStatus": 0,
  "status": 0,
  "deviceRemark": "plxklr",
  "onlineTime": "1646755200000",
  "offlineTime": "1646755200000"
}

> {%
client.global.set("Device_id", JSON.parse(response.body).data.id);
%}

###设备查看
POST {{baseUrl}}/device/info
Accept: application/json
Content-Type: application/json

{
  "id": "3"
}



###设备编辑
GET {{baseUrl}}/device/edit?id={{Device_id}}
Accept: application/json


###设备删除
GET {{baseUrl}}/device/delete?id={{Device_id}}
Accept: application/json




###getToken
POST {{baseUrl}}/api/getToken
Content-Type: application/json

{
  "loginName": "admin",
  "password": "admin"
}

> {%
client.global.set("authToken", JSON.parse(response.body).data);
%}



###注册设备
POST {{baseUrl}}/api/register
Content-Type: application/json

{
  "deviceCode": "a109"
}

> {%
client.global.set("content", JSON.parse(response.body).data.content);
%}

###获取产品与
GET {{baseUrl}}/api/deviceInit
Accept: application/json

###设备新增或更新
POST {{baseUrl}}/api/deviceUpdate
Content-Type: application/json

{
  "deviceName":"测试设备2",
  "deviceCode":"a109",
  "siteId":2,
  "siteCode":"513400000000-0001",
  "siteName":"凉山州行政审批局",
  "productId":1,
  "deviceFirmId":1,
  "lon":"33",
  "lati":"44",
  "deviceInBuilding":13,
  "deviceInFloor":22,
  "defectsLiabilityPeriod":"2022-06-30 15:00:01",
  "leadingOfficial":"张三",
  "leadingOfficialTelephone":"13281114856",
  "source":1
}

###设备新增
POST {{baseUrl}}/api/receive
Authorization: {{authToken}}
Content-Type: application/json

{
  "receiveMethod": 1,
  "deviceName": "测试接口创建设备3",
  "deviceCode": "a1234567899",
  "siteId": 123,
  "siteCode": "adfasfdasfdasf",
  "siteName": "测试站点",
  "platformCode": "phxt",
  "productCode": "pdj",
  "deviceRemark": "车是是是打发斯蒂芬"
}


###设备上报
POST {{baseUrl}}/api/upload
Content-Type: application/json
Authorization: {{authToken}}

{
  "deviceCode": "94-DE-80-D5-3D-63",
  "action": "upload"
}


###设备消息
POST {{baseUrl}}/api/callback
Content-Type: application/json

[
  {
    "data":"{xxxx}",
    "deviceCode":"a102",
    "messageType":"aaaa",
    "timestamp":1654656951795
  },
  {
    "data":"{bbbbbb}",
    "deviceCode":"a102",
    "messageType":"bbbb",
    "timestamp":1654656951795
  }
]



###设备上报
POST {{baseUrl}}/test/upload?deviceId=2
Content-Type: application/json

{
  "req": 1
}


###siteTree
POST {{baseUrl}}/test/siteTree
Content-Type: application/json

{}
