获取物模型属性列表修改;
获取设备列表接口修改;
This commit is contained in:
parent
b8655cd351
commit
7fbd133ab8
@ -109,6 +109,9 @@ public class EquipmentController {
|
|||||||
*/
|
*/
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
public R<List<SysEquipmentVo>> queryAllSysEquipmentList(@RequestBody SysEquipmentDto sysEquipmentDto) {
|
public R<List<SysEquipmentVo>> queryAllSysEquipmentList(@RequestBody SysEquipmentDto sysEquipmentDto) {
|
||||||
|
if (sysEquipmentDto.getObjectType() == null) {
|
||||||
|
throw new ServiceException("参数缺失");
|
||||||
|
}
|
||||||
return R.success(sysEquipmentService.queryAllSysEquipmentList(sysEquipmentDto));
|
return R.success(sysEquipmentService.queryAllSysEquipmentList(sysEquipmentDto));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,8 +125,12 @@ public class SysEquipmentServiceImpl implements SysEquipmentService {
|
|||||||
public List<SysEquipmentVo> queryAllSysEquipmentList(SysEquipmentDto sysEquipmentDto) {
|
public List<SysEquipmentVo> queryAllSysEquipmentList(SysEquipmentDto sysEquipmentDto) {
|
||||||
// 查询当前账号机构下的子机构和子设备
|
// 查询当前账号机构下的子机构和子设备
|
||||||
QueryWrapper<SysEquipment> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<SysEquipment> queryWrapper = new QueryWrapper<>();
|
||||||
|
if (sysEquipmentDto.getOrgId() !=null){
|
||||||
queryWrapper.eq("org_id", sysEquipmentDto.getOrgId());
|
queryWrapper.eq("org_id", sysEquipmentDto.getOrgId());
|
||||||
|
}
|
||||||
|
if (sysEquipmentDto.getParentEquipmentId() !=null){
|
||||||
queryWrapper.eq("parent_equipment_id", sysEquipmentDto.getParentEquipmentId());
|
queryWrapper.eq("parent_equipment_id", sysEquipmentDto.getParentEquipmentId());
|
||||||
|
}
|
||||||
queryWrapper.eq("object_type", sysEquipmentDto.getObjectType());
|
queryWrapper.eq("object_type", sysEquipmentDto.getObjectType());
|
||||||
queryWrapper.orderByAsc("name");
|
queryWrapper.orderByAsc("name");
|
||||||
List<SysEquipment> sysEquipmentList = sysEquipmentMapper.selectList(queryWrapper);
|
List<SysEquipment> sysEquipmentList = sysEquipmentMapper.selectList(queryWrapper);
|
||||||
|
@ -28,6 +28,10 @@
|
|||||||
<if test="info.orderColumn != null and info.orderType != ''">
|
<if test="info.orderColumn != null and info.orderType != ''">
|
||||||
order by ${info.orderColumn} ${info.orderType}
|
order by ${info.orderColumn} ${info.orderType}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="info.attributeType != null and info.attributeType != ''">
|
||||||
|
and t.attribute_type = #{info.attributeType}
|
||||||
|
</if>
|
||||||
|
|
||||||
<if test="info.orderColumn == null or info.orderColumn == '' or info.orderType == null or info.orderType == ''">
|
<if test="info.orderColumn == null or info.orderColumn == '' or info.orderType == null or info.orderType == ''">
|
||||||
order by t.porder asc
|
order by t.porder asc
|
||||||
</if>
|
</if>
|
||||||
|
@ -245,15 +245,22 @@ POST 请求接口
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"iotModelId":"123"
|
"iotModelId":"123",
|
||||||
|
"pageNum":1,
|
||||||
|
"pageSize": 30
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
入参描述
|
入参描述
|
||||||
|
|
||||||
| 参数名 | 参数类型 | 可选 | 描述 |
|
| 参数名 | 参数类型 | 可选 | 描述 |
|
||||||
| ---------- | -------- | ---- | -------- |
|
| ---------- | -------- |-----|-------|
|
||||||
| iotModelId | String | No | 物模型ID |
|
| iotModelId | String | yes | 物模型ID |
|
||||||
|
| attributeName | String | yes | 属性名称 |
|
||||||
|
| attributeCode | String | yes | 属性编码 |
|
||||||
|
| attributeType | String | yes | 量测类型 |
|
||||||
|
| pageSize | 数值 | No | 每页显示条数 |
|
||||||
|
| pageNum | 数值 | No | 页码 |
|
||||||
|
|
||||||
返回报文
|
返回报文
|
||||||
|
|
||||||
@ -672,10 +679,10 @@ POST请求接口
|
|||||||
入参描述
|
入参描述
|
||||||
|
|
||||||
| 参数名 | 参数类型 | 可选 | 描述 |
|
| 参数名 | 参数类型 | 可选 | 描述 |
|
||||||
| ----------- | -------- | ---- | -------------------------- |
|
| ----------- | -------- |-----| -------------------------- |
|
||||||
| orgId | 数值 | No | 所属机构ID |
|
| orgId | 数值 | yes | 所属机构ID |
|
||||||
| parentEquipmentId | 数值 | No | 上级设备ID |
|
| parentEquipmentId | 数值 | yes | 上级设备ID |
|
||||||
| iotModelId | 字符串 | No | 所属物模型ID |
|
| iotModelId | 字符串 | yes | 所属物模型ID |
|
||||||
| pageSize | 数值 | No | 每页显示条数 |
|
| pageSize | 数值 | No | 每页显示条数 |
|
||||||
| pageNum | 数值 | No | 页码 |
|
| pageNum | 数值 | No | 页码 |
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user