Commit 60a2c52f authored by tangwei's avatar tangwei

修改bug

parent 27697e1e
......@@ -11,9 +11,13 @@ public class KeySiteDateDto {
@ApiModelProperty(value = "id")
private Long id;
private String key;
@ApiModelProperty(value = "id")
private String value;
@ApiModelProperty(value = "重点部位名称")
private String name;
private String label;
@ApiModelProperty(value = "位置")
private String fireLocation;
@ApiModelProperty(value = "經度")
......@@ -21,20 +25,28 @@ public class KeySiteDateDto {
@ApiModelProperty(value = "緯度")
private String floorLatitude;
public Long getId() {
return id;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setId(Long id) {
this.id = id;
public void setValue(String value) {
this.value = value;
}
public String getName() {
return name;
public String getLabel() {
return label;
}
public void setName(String name) {
this.name = name;
public void setLabel(String label) {
this.label = label;
}
public String getFireLocation() {
......
......@@ -124,8 +124,9 @@
<select id="getKeySiteDate" resultType="com.yeejoin.amos.boot.module.common.api.dto.KeySiteDateDto">
SELECT
c.sequence_nbr AS id,
c.`name` as name,
c.sequence_nbr AS `key`,
c.sequence_nbr AS `value`,
c.`name` as label,
c.address_desc as fireLocation,
c.longitude as floorLongitude,
c.latitude AS floorLatitude
......
......@@ -285,7 +285,7 @@ public class WaterResourceController extends BaseController {
// 查询基本信息
WaterResourceDto waterResourceDto = waterResourceServiceImpl.queryBySeq(sequenceNbr);
waterResourceDto.setRealityImgList(JSONArray.parseArray(waterResourceDto.getRealityImg(), Object.class));
waterResourceDto.setOrientationImgList(JSONArray.parseArray(waterResourceDto.getOrientationImg()));
waterResourceDto.setOrientationImgList(waterResourceDto.getOrientationImg()!=null?JSONArray.parseArray(waterResourceDto.getOrientationImg()):null);
Boolean isDelete = waterResourceDto.getIsDelete();
// 查询属性信息
String resourceType = waterResourceDto.getResourceType();
......
......@@ -45,14 +45,11 @@ public class StartLoader implements ApplicationRunner {
try {
emqKeeper.getMqttClient().subscribe(topic, (s, mqttMessage) -> {
byte[] payload = mqttMessage.getPayload();
try {
String obj = new String(payload);
if (!ValidationUtil.isEmpty(obj)) {
JSONObject json = JSON.parseObject(obj);
JSONObject date = (JSONObject) JSON.toJSON(json.get("data"));
AlertNewsDto alertNewsDto = new AlertNewsDto( "物联警情", date.get("unitInvolvedName")+","+date.get("floorName")+"楼,发生警情,请处理。", date.get("id").toString(), obj);
AlertNewsDto alertNewsDto = new AlertNewsDto( "物联警情", json.get("unitInvolvedName")+","+json.get("address")+",发生警情,请处理。", json.get("id").toString(), obj);
emqKeeper.getMqttClient().publish(topicweb, JSONObject.toJSON(alertNewsDto).toString().getBytes(), RuleConfig.DEFAULT_QOS, true);
}
} catch (Exception e) {
......
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