Compare commits
2 Commits
branch_fir
...
master
Author | SHA1 | Date | |
---|---|---|---|
7e46ef5b57 | |||
3360613347 |
@ -44,7 +44,7 @@ public class FirePointQo {
|
|||||||
/**
|
/**
|
||||||
* 植被类型
|
* 植被类型
|
||||||
*/
|
*/
|
||||||
private String landtype;
|
private String landType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 置信度
|
* 置信度
|
||||||
@ -64,7 +64,7 @@ public class FirePointQo {
|
|||||||
/**
|
/**
|
||||||
* 乡镇街道区划编码
|
* 乡镇街道区划编码
|
||||||
*/
|
*/
|
||||||
private String towncode;
|
private String townCode;
|
||||||
|
|
||||||
public FirePointQo() {
|
public FirePointQo() {
|
||||||
}
|
}
|
||||||
@ -125,12 +125,12 @@ public class FirePointQo {
|
|||||||
this.satelliteType = satelliteType;
|
this.satelliteType = satelliteType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLandtype() {
|
public String getLandType() {
|
||||||
return landtype;
|
return landType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLandtype(String landtype) {
|
public void setLandType(String landType) {
|
||||||
this.landtype = landtype;
|
this.landType = landType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getConfidence() {
|
public String getConfidence() {
|
||||||
@ -157,16 +157,29 @@ public class FirePointQo {
|
|||||||
this.satelliteImage = satelliteImage;
|
this.satelliteImage = satelliteImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTowncode() {
|
public String getTownCode() {
|
||||||
return towncode;
|
return townCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTowncode(String towncode) {
|
public void setTownCode(String townCode) {
|
||||||
this.towncode = towncode;
|
this.townCode = townCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "FirePointQo{" + "fireCode='" + fireCode + '\'' + ", countyCode=" + countyCode + ", countyName='" + countyName + '\'' + ", satelliteTimeTs=" + satelliteTimeTs + ", longitude=" + longitude + ", latitude=" + latitude + ", satelliteType='" + satelliteType + '\'' + ", landtype='" + landtype + '\'' + ", confidence='" + confidence + '\'' + ", fireImage='" + fireImage + '\'' + ", satelliteImage='" + satelliteImage + '\'' + ", towncode='" + towncode + '\'' + '}';
|
return "FirePointQo{" +
|
||||||
|
"fireCode='" + fireCode + '\'' +
|
||||||
|
", countyCode=" + countyCode +
|
||||||
|
", countyName='" + countyName + '\'' +
|
||||||
|
", satelliteTimeTs=" + satelliteTimeTs +
|
||||||
|
", longitude=" + longitude +
|
||||||
|
", latitude=" + latitude +
|
||||||
|
", satelliteType='" + satelliteType + '\'' +
|
||||||
|
", landType='" + landType + '\'' +
|
||||||
|
", confidence='" + confidence + '\'' +
|
||||||
|
", fireImage='" + fireImage + '\'' +
|
||||||
|
", satelliteImage='" + satelliteImage + '\'' +
|
||||||
|
", townCode='" + townCode + '\'' +
|
||||||
|
'}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package com.xkrs.service.impl;
|
package com.xkrs.service.impl;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import com.xkrs.common.encapsulation.PromptMessageEnum;
|
import com.xkrs.common.encapsulation.PromptMessageEnum;
|
||||||
import com.xkrs.dao.*;
|
import com.xkrs.dao.*;
|
||||||
import com.xkrs.model.entity.CountyCodeWeiXinEntity;
|
import com.xkrs.model.entity.CountyCodeWeiXinEntity;
|
||||||
@ -91,7 +90,7 @@ public class FirePointServiceImpl implements FirePointService {
|
|||||||
@CacheEvict(value = "FirePointServiceCache", allEntries = true)
|
@CacheEvict(value = "FirePointServiceCache", allEntries = true)
|
||||||
@Override
|
@Override
|
||||||
public boolean insertFirePoint(FirePointQo firePointQo) {
|
public boolean insertFirePoint(FirePointQo firePointQo) {
|
||||||
if ("水体".equals(firePointQo.getLandtype())) {
|
if ("水体".equals(firePointQo.getLandType())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ("Himawari 8".equals(firePointQo.getSatelliteType())) {
|
if ("Himawari 8".equals(firePointQo.getSatelliteType())) {
|
||||||
@ -107,7 +106,7 @@ public class FirePointServiceImpl implements FirePointService {
|
|||||||
firePointEntity.setLongitude(firePointQo.getLongitude());
|
firePointEntity.setLongitude(firePointQo.getLongitude());
|
||||||
firePointEntity.setLatitude(firePointQo.getLatitude());
|
firePointEntity.setLatitude(firePointQo.getLatitude());
|
||||||
firePointEntity.setSatelliteType(firePointQo.getSatelliteType());
|
firePointEntity.setSatelliteType(firePointQo.getSatelliteType());
|
||||||
firePointEntity.setLandType(firePointQo.getLandtype());
|
firePointEntity.setLandType(firePointQo.getLandType());
|
||||||
firePointEntity.setConfidence(firePointQo.getConfidence());
|
firePointEntity.setConfidence(firePointQo.getConfidence());
|
||||||
firePointEntity.setAddTime(dateTimeToString(LocalDateTime.now()));
|
firePointEntity.setAddTime(dateTimeToString(LocalDateTime.now()));
|
||||||
firePointEntity.setFireType("0");
|
firePointEntity.setFireType("0");
|
||||||
@ -121,33 +120,7 @@ public class FirePointServiceImpl implements FirePointService {
|
|||||||
}
|
}
|
||||||
log.info("-------发现新火点");
|
log.info("-------发现新火点");
|
||||||
firePointDao.save(firePointEntity);
|
firePointDao.save(firePointEntity);
|
||||||
forwardPoint(firePointEntity);
|
|
||||||
//发送消息通知
|
|
||||||
sendBroadcast(firePointEntity);
|
|
||||||
return true;
|
return true;
|
||||||
// if (firePointEntity.getCountyCode().startsWith("37")) {
|
|
||||||
// //如果开关已打开,就只将未审核的火点添加到山东临时表
|
|
||||||
// log.info("-------发现新山东火点");
|
|
||||||
// ShanDongFirePointEntity shanDongFirePointByFirePoint = getShanDongFirePointByFirePoint(firePointEntity);
|
|
||||||
// ShanDongFirePointEntity savedShanDongFirePoint = shanDongFirePointDao.save(shanDongFirePointByFirePoint);
|
|
||||||
// //微信消息通知火点审核工作组
|
|
||||||
// try {
|
|
||||||
// String messageContent = getMessageContent(savedShanDongFirePoint);
|
|
||||||
// WDWxSendMsgUtil.sendMsg("18447024917@chatroom", messageContent, 0);
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// e.printStackTrace();
|
|
||||||
// }
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
private void forwardPoint(FirePointEntity firePointEntity) {
|
|
||||||
try {
|
|
||||||
String url = "http://121.36.229.60:6811/insertfirepointchannelThree";
|
|
||||||
HttpClientUtils.sendHttpPostTextPlain(url, new ObjectMapper().writeValueAsString(firePointEntity));
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
server.port = 6801
|
server.port = 6801
|
||||||
|
|
||||||
## 数据源配置
|
## 数据源配置
|
||||||
spring.datasource.url = jdbc:postgresql://8.142.26.238:5432/fire_point
|
spring.datasource.url = jdbc:postgresql://118.24.27.47:5432/fire_point
|
||||||
spring.datasource.userName = fire_manage
|
spring.datasource.userName = fire_manage
|
||||||
spring.datasource.password = fire456
|
spring.datasource.password = fire456
|
||||||
spring.datasource.driverClassName = org.postgresql.Driver
|
spring.datasource.driverClassName = org.postgresql.Driver
|
||||||
|
Loading…
Reference in New Issue
Block a user