das接口文档修改
This commit is contained in:
parent
2e6bbf3b9c
commit
a5587966ba
@ -73,10 +73,10 @@ public class EquipmentController {
|
||||
@PostMapping("/update")
|
||||
public R<SysEquipmentVo> updateSysEquipment(@RequestBody SysEquipmentDto sysEquipmentDto) {
|
||||
//判断是否有权限
|
||||
// boolean hasPermission = StpUtil.hasPermission(SysAuthorityIds.SYS_AUTHORITY_ID_DEVICE_MGR.toString());
|
||||
// if(!hasPermission){
|
||||
// return R.fail("没有设备管理权限");
|
||||
// }
|
||||
boolean hasPermission = StpUtil.hasPermission(SysAuthorityIds.SYS_AUTHORITY_ID_DEVICE_MGR.toString());
|
||||
if(!hasPermission){
|
||||
return R.fail("没有设备管理权限");
|
||||
}
|
||||
|
||||
if (sysEquipmentDto.getOrgId() == null) {
|
||||
throw new ServiceException("参数缺失");
|
||||
|
@ -3,7 +3,7 @@
|
||||
## API接口一览表
|
||||
|
||||
| 接口分类 | 接口描述 | API接口 | 权限 |
|
||||
| ------------- | -------------------------------- | ------------------------------------- | ---------------------------- |
|
||||
| ------------- |------------------------| ------------------------------------- | ---------------------------- |
|
||||
| 2.1设备类型 | 2.1.1获取所有设备类型信息 | /api/equipment/type/list | |
|
||||
| 2.2物模型 | 2.2.1获取物模型列表 | /api/equipment/model/list | |
|
||||
| | 2.2.2物模型新增 | /api/equipment/model/add | SYS_AUTHORITY_ID_ADMIN |
|
||||
@ -26,6 +26,8 @@
|
||||
| | 2.3.5 设备删除 | /api/equipment/delete | SYS_AUTHORITY_ID_DEVICE_MGR |
|
||||
| | 2.3.6 Excel导出设备清单 | /api/equipment/export | SYS_AUTHORITY_ID_DEVICE_VIEW |
|
||||
| | 2.3.7 Excel导入设备清单 | /api/equipment/import | SYS_AUTHORITY_ID_DEVICE_MGR |
|
||||
| | 2.3.8 获取设备树 | /api/equipment/getEquipmentTree | |
|
||||
| | 2.3.9 获取所有设备类型 | /api/equipment/type | |
|
||||
|
||||
### 2.1 设备类型相关接口
|
||||
|
||||
@ -873,6 +875,222 @@ POST请求接口
|
||||
{
|
||||
"code": 200,
|
||||
"success": true,
|
||||
"data": {
|
||||
"revision": 1,
|
||||
"id": "1",
|
||||
"name": "某风电场",
|
||||
"mrid": "111",
|
||||
"province": "江苏省",
|
||||
"city": "南京市",
|
||||
"county": "玄武区",
|
||||
"address": "1",
|
||||
"contactPhone": "1",
|
||||
"parentOrgId": 0,
|
||||
"equipChildren": [
|
||||
{
|
||||
"id": "2",
|
||||
"objectType": 10002,
|
||||
"code": "10002",
|
||||
"name": "机组",
|
||||
"longitude": 0,
|
||||
"latitude": 0,
|
||||
"parentEquipmentId": "0",
|
||||
"equipChildren": [
|
||||
{
|
||||
"createdBy": "测试",
|
||||
"createdTime": "2024-07-08 06:50:32",
|
||||
"updatedBy": "测试",
|
||||
"updatedTime": "2024-07-08 06:50:32",
|
||||
"revision": 1,
|
||||
"id": "1810204805816188930",
|
||||
"objectType": 10002,
|
||||
"code": "",
|
||||
"name": "GGG",
|
||||
"madeinFactory": "",
|
||||
"model": "",
|
||||
"location": "",
|
||||
"longitude": 0,
|
||||
"latitude": 0,
|
||||
"remarks": "",
|
||||
"orgId": "1",
|
||||
"parentEquipmentId": "2"
|
||||
},
|
||||
{
|
||||
"createdBy": "测试",
|
||||
"createdTime": "2024-07-08 06:52:44",
|
||||
"updatedBy": "测试",
|
||||
"updatedTime": "2024-07-08 06:52:44",
|
||||
"revision": 1,
|
||||
"id": "1810205361720852481",
|
||||
"objectType": 10002,
|
||||
"code": "",
|
||||
"name": "RRR",
|
||||
"madeinFactory": "",
|
||||
"model": "",
|
||||
"location": "",
|
||||
"longitude": 0,
|
||||
"latitude": 0,
|
||||
"remarks": "",
|
||||
"orgId": "1",
|
||||
"parentEquipmentId": "2"
|
||||
},
|
||||
{
|
||||
"createdBy": "测试",
|
||||
"createdTime": "2024-07-08 06:53:07",
|
||||
"updatedBy": "测试",
|
||||
"updatedTime": "2024-07-08 15:01:33",
|
||||
"revision": 1,
|
||||
"id": "1810205456222715906",
|
||||
"objectType": 10002,
|
||||
"code": "test1",
|
||||
"name": "test1",
|
||||
"madeinFactory": "test1",
|
||||
"model": "test1",
|
||||
"location": "test1",
|
||||
"longitude": 48.69145,
|
||||
"latitude": 20.6946,
|
||||
"installDate": "2027-07-05 15:30:23",
|
||||
"remarks": "test1",
|
||||
"orgId": "1",
|
||||
"parentEquipmentId": "2"
|
||||
},
|
||||
{
|
||||
"createdBy": "测试",
|
||||
"createdTime": "2024-07-08 07:02:38",
|
||||
"updatedBy": "测试",
|
||||
"updatedTime": "2024-07-08 07:02:38",
|
||||
"revision": 1,
|
||||
"id": "1810207853032570881",
|
||||
"objectType": 10002,
|
||||
"code": "",
|
||||
"name": "12121",
|
||||
"madeinFactory": "",
|
||||
"model": "",
|
||||
"location": "",
|
||||
"longitude": 0,
|
||||
"latitude": 0,
|
||||
"remarks": "",
|
||||
"orgId": "1",
|
||||
"parentEquipmentId": "2"
|
||||
},
|
||||
{
|
||||
"createdBy": "测试",
|
||||
"createdTime": "2024-07-08 07:20:51",
|
||||
"updatedBy": "测试",
|
||||
"updatedTime": "2024-07-08 07:20:51",
|
||||
"revision": 1,
|
||||
"id": "1810212434735071233",
|
||||
"objectType": 10002,
|
||||
"code": "",
|
||||
"name": "儿童",
|
||||
"madeinFactory": "",
|
||||
"model": "",
|
||||
"location": "",
|
||||
"longitude": 0,
|
||||
"latitude": 0,
|
||||
"remarks": "",
|
||||
"orgId": "1",
|
||||
"parentEquipmentId": "2"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "1",
|
||||
"objectType": 10001,
|
||||
"code": "10001",
|
||||
"name": "风电场",
|
||||
"longitude": 0,
|
||||
"latitude": 0,
|
||||
"parentEquipmentId": "0",
|
||||
"equipChildren": [
|
||||
{
|
||||
"createdBy": "测试",
|
||||
"createdTime": "2024-07-08 06:41:56",
|
||||
"updatedBy": "测试",
|
||||
"updatedTime": "2024-07-08 06:41:56",
|
||||
"revision": 1,
|
||||
"id": "1810202642163499009",
|
||||
"objectType": 10001,
|
||||
"code": "",
|
||||
"name": "aaaa",
|
||||
"madeinFactory": "",
|
||||
"model": "",
|
||||
"location": "",
|
||||
"longitude": 0,
|
||||
"latitude": 0,
|
||||
"remarks": "",
|
||||
"orgId": "1",
|
||||
"parentEquipmentId": "1"
|
||||
},
|
||||
{
|
||||
"createdBy": "测试",
|
||||
"createdTime": "2024-07-08 06:45:09",
|
||||
"updatedBy": "测试",
|
||||
"updatedTime": "2024-07-08 06:45:09",
|
||||
"revision": 1,
|
||||
"id": "1810203450657538050",
|
||||
"objectType": 10001,
|
||||
"code": "",
|
||||
"name": "yy",
|
||||
"madeinFactory": "",
|
||||
"model": "",
|
||||
"location": "",
|
||||
"longitude": 0,
|
||||
"latitude": 0,
|
||||
"remarks": "",
|
||||
"orgId": "1",
|
||||
"parentEquipmentId": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"orgChildren": [
|
||||
{
|
||||
"id": "73280038685114368",
|
||||
"name": "test",
|
||||
"mrid": "test",
|
||||
"province": "山西省",
|
||||
"city": "绛县",
|
||||
"county": "运城市",
|
||||
"address": "test",
|
||||
"contactPhone": "13045088888",
|
||||
"remarks": "test",
|
||||
"aliasName": "test",
|
||||
"parentOrgId": "1",
|
||||
"parentOrgName": "某风电场",
|
||||
"revision": 1,
|
||||
"createdTime": "2024-06-28 00:00:00",
|
||||
"updatedTime": "2024-06-28 00:00:00"
|
||||
}
|
||||
]
|
||||
},
|
||||
"msg": "操作成功"
|
||||
}
|
||||
```
|
||||
|
||||
#### 2.3.9 获取所有设备类型
|
||||
|
||||
> /api/equipment/type
|
||||
|
||||
|
||||
请求参数
|
||||
无请求参数
|
||||
|
||||
返回报文
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"success": true,
|
||||
"data": [
|
||||
{
|
||||
"equipmentTypeId": "10001",
|
||||
"equipmentTypeName": "风电场"
|
||||
},
|
||||
{
|
||||
"equipmentTypeId": "10002",
|
||||
"equipmentTypeName": "机组"
|
||||
}
|
||||
],
|
||||
"msg": "操作成功"
|
||||
}
|
||||
```
|
Loading…
Reference in New Issue
Block a user