Commit b6683ab5 authored by chenhao's avatar chenhao

Merge branch 'developer' of http://172.16.10.76/moa/amos-boot-biz into developer

parents 5855a55d f596cff7
...@@ -33,11 +33,13 @@ public class WaterResourceDto extends BaseDto { ...@@ -33,11 +33,13 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty(value = "地址") @ApiModelProperty(value = "地址")
private String address; private String address;
@ExcelIgnore
@ApiModelProperty(value = "经度") @ApiModelProperty(value = "经度")
@ExcelProperty(value = "经度", index = 48)
private Double longitude; private Double longitude;
@ExcelIgnore
@ApiModelProperty(value = "纬度") @ApiModelProperty(value = "纬度")
@ExcelProperty(value = "纬度", index = 49)
private Double latitude; private Double latitude;
@ExcelIgnore @ExcelIgnore
......
...@@ -46,11 +46,11 @@ public class StartLoader implements ApplicationRunner { ...@@ -46,11 +46,11 @@ public class StartLoader implements ApplicationRunner {
emqKeeper.getMqttClient().subscribe(topic, (s, mqttMessage) -> { emqKeeper.getMqttClient().subscribe(topic, (s, mqttMessage) -> {
byte[] payload = mqttMessage.getPayload(); byte[] payload = mqttMessage.getPayload();
try { try {
String obj = new String(payload); String obj = new String(payload,"GB2312");
if (!ValidationUtil.isEmpty(obj)) { if (!ValidationUtil.isEmpty(obj)) {
JSONObject json = JSON.parseObject(obj); JSONObject json = JSON.parseObject(obj);
AlertNewsDto alertNewsDto = new AlertNewsDto( "物联警情", json.get("unitInvolvedName")+","+json.get("address")+",发生警情,请处理。", json.get("id").toString(), obj); AlertNewsDto alertNewsDto = new AlertNewsDto( "物联警情", json.get("unitInvolvedName")+","+json.get("address")+",发生警情,请处理。", json.get("id").toString(), json);
emqKeeper.getMqttClient().publish(topicweb, JSONObject.toJSON(alertNewsDto).toString().getBytes(), RuleConfig.DEFAULT_QOS, true); emqKeeper.getMqttClient().publish(topicweb, JSONObject.toJSON(alertNewsDto).toString().getBytes("UTF-8"), 1, false);
} }
} catch (Exception e) { } catch (Exception e) {
logger.error("系统异常", e); logger.error("系统异常", e);
......
...@@ -63,8 +63,8 @@ mqtt.topic.command.meteorological.notice=meteorological ...@@ -63,8 +63,8 @@ mqtt.topic.command.meteorological.notice=meteorological
mqtt.topic.command.power.deployment=power mqtt.topic.command.power.deployment=power
mqtt.topic.alert.iot=iotnews mqtt.topic.alert.iot=iot-system-alarm
mqtt.topic.alert.iot.web=iotNewsWeb mqtt.topic.alert.iot.web=iot-system-alarm-web
security.systemctl.name=AMOS-API-SYSTEMCTL security.systemctl.name=AMOS-API-SYSTEMCTL
......
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