Commit 1675c09d authored by 王晓倩's avatar 王晓倩

设备状态字段处理

parent f988dae3
......@@ -397,6 +397,7 @@ public class TDetectorInfoController extends BaseController
for(TDetectorInfoDTO dto : tDetectorInfoDTOList){
TDetectorInfo tDetectorInfo = new TDetectorInfo();
// 家用报警器
if(!StringUtils.isEmpty(dto.getDetectorType()) && dto.getDetectorType().equals("1")){
if(!StringUtils.isEmpty(dto.getDetectorStatus()) && dto.getDetectorStatus().equals("1")){
tDetectorInfo.setDetectorStatus("0");
......@@ -564,6 +565,13 @@ public class TDetectorInfoController extends BaseController
}
List<TDetectorReportData> alarmVO = tDetectorReportDataService.selectRealtimeDataList();
for(TDetectorReportData data : alarmVO){
if("0".equals(data.getDetectorStatus())){
data.setDetectorStatus("正常");
} else {
data.setDetectorStatus("报警");
}
}
map.put("totalNum", totalNum);
map.put("handledNum", handledNum);
......
......@@ -41,7 +41,16 @@ public class TDetectorInfoServiceImpl implements ITDetectorInfoService
@Override
public List<TDetectorInfo> selectTDetectorInfoList(TDetectorInfo tDetectorInfo)
{
return tDetectorInfoMapper.selectTDetectorInfoList(tDetectorInfo);
List<TDetectorInfo> list = tDetectorInfoMapper.selectTDetectorInfoList(tDetectorInfo);
for(TDetectorInfo detector : list){
if("0".equals(detector.getDetectorStatus())){
detector.setDetectorStatus("正常");
} else if("1".equals(detector.getDetectorStatus())){
detector.setDetectorStatus("离线");
}
}
return list;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment