Commit 49e81c34 authored by caotao's avatar caotao

集电线返回数据新增风机状态图片url

parent ecd4db47
...@@ -29,12 +29,8 @@ import com.yeejoin.amos.boot.module.jxiop.biz.utils.InfluxDButils; ...@@ -29,12 +29,8 @@ import com.yeejoin.amos.boot.module.jxiop.biz.utils.InfluxDButils;
import com.yeejoin.amos.boot.module.jxiop.biz.service.IMonitorFanIndicator; import com.yeejoin.amos.boot.module.jxiop.biz.service.IMonitorFanIndicator;
import com.yeejoin.amos.component.robot.BadRequest; import com.yeejoin.amos.component.robot.BadRequest;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.velocity.runtime.directive.Break;
import org.eclipse.paho.client.mqttv3.MqttException; import org.eclipse.paho.client.mqttv3.MqttException;
import org.elasticsearch.common.recycler.Recycler;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.Resource; import org.springframework.core.io.Resource;
...@@ -46,13 +42,10 @@ import org.typroject.tyboot.component.emq.EmqKeeper; ...@@ -46,13 +42,10 @@ import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import java.io.File; import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.text.ParseException; import java.text.ParseException;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static com.alibaba.fastjson.JSON.parseArray;
/** /**
* @description: * @description:
...@@ -937,6 +930,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -937,6 +930,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
map.put("title",listDatum.getEquipmentNumber()); map.put("title",listDatum.getEquipmentNumber());
map.put("windSpeed",listDatum.getValue()); map.put("windSpeed",listDatum.getValue());
map.put("power",listDatum.getValueLabel()); map.put("power",listDatum.getValueLabel());
//获取风机状态如果获取到的状态为空-则默认为正常运行状态
String fantStatus = ObjectUtils.isEmpty(fanstatutsHashMap.get(num))?"正常运行":fanstatutsHashMap.get(num); String fantStatus = ObjectUtils.isEmpty(fanstatutsHashMap.get(num))?"正常运行":fanstatutsHashMap.get(num);
map.put("url",fanStatusImagePathPrefix + File.separator + "风机-" + fantStatus + ".gif"); map.put("url",fanStatusImagePathPrefix + File.separator + "风机-" + fantStatus + ".gif");
statusMaps.add(map); statusMaps.add(map);
......
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