塔吊设备页面接口优化

This commit is contained in:
fl 2025-04-18 15:01:12 +08:00
parent a2a202797d
commit 4ea44554cd
3 changed files with 14 additions and 4 deletions

View File

@ -1,5 +1,6 @@
package com.bonus.base.basic.domain;
import com.bonus.base.screen.domain.TowerCraneInfoVo;
import lombok.Data;
/**
@ -70,7 +71,10 @@ public class ConstInfoVo {
private int num;
/**
* 塔吊设备信息
*/
private TowerCraneInfoVo towerCraneInfo;

View File

@ -37,6 +37,12 @@ public class TowerCraneDetectionServiceImpl implements TowerCraneDetectionServic
//设置查询类型
constInfoVo.setTypeCode(TypeCodeUtils.TC_CODE);
List<ConstInfoVo> collectDevVoList = mapper.getConstDeviceList(constInfoVo);
collectDevVoList.forEach(item -> {
if(item != null && item.getConfigData() != null){
JSONObject jsonObject = JsonHelper.jsonStrToJsonObj(item.getConfigData());
item.setTowerCraneInfo(JsonHelper.jsonObjToBean(jsonObject.getJSONObject("deviceDetail"), TowerCraneInfoVo.class));
}
});
return collectDevVoList;
}
@ -47,8 +53,7 @@ public class TowerCraneDetectionServiceImpl implements TowerCraneDetectionServic
*/
@Override
public List<DeviceAlarmVo> getTowerCraneAlarmList(ConstInfoVo constInfoVo) {
List<DeviceAlarmVo> deviceAlarmVoList = mapper.getTowerCraneAlarmList(constInfoVo);
return deviceAlarmVoList;
return mapper.getTowerCraneAlarmList(constInfoVo);
}
/**

View File

@ -11,7 +11,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
tci.`name`,
tci.`code`,
tcd.is_online,
tcd.dev_location
tcd.dev_location,
tci.config_data
FROM
tb_const_info tci
LEFT JOIN tb_collect_device tcd ON tci.id = tcd.const_id