临时变更:开关开启时,山东省内火点数据通过通道1进入山东临时火点表
This commit is contained in:
parent
c1b14154ad
commit
27b369f4ed
@ -121,16 +121,37 @@ public class FirePointServiceImpl implements FirePointService {
|
||||
log.info("添加火点信息 逆地理编码请求街道编号失败:" + e.getMessage());
|
||||
return false;
|
||||
}
|
||||
if (firePointEntity.getCountyCode().startsWith("37")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (checkDuplicatedData(firePointEntity)) {
|
||||
return false;
|
||||
}
|
||||
if (firePointEntity.getCountyCode().startsWith("37")) {
|
||||
//如果是山东的点,就入库
|
||||
if (isSwitchStateOpen()) {
|
||||
//如果开关已打开,就只将未审核的火点添加到山东临时表
|
||||
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;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
log.info("-------发现新火点");
|
||||
firePointDao.save(firePointEntity);
|
||||
return true;
|
||||
}
|
||||
// log.info("-------发现新火点");
|
||||
// firePointDao.save(firePointEntity);
|
||||
// return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查重复数据
|
||||
@ -278,6 +299,31 @@ public class FirePointServiceImpl implements FirePointService {
|
||||
return firePoint;
|
||||
}
|
||||
|
||||
private ShanDongFirePointEntity getShanDongFirePointByFirePoint(FirePointEntity firePoint) {
|
||||
ShanDongFirePointEntity shanDongFirePoint = new ShanDongFirePointEntity();
|
||||
shanDongFirePoint.setId(firePoint.getId());
|
||||
shanDongFirePoint.setFireCode(firePoint.getFireCode());
|
||||
shanDongFirePoint.setLongitude(firePoint.getLongitude());
|
||||
shanDongFirePoint.setLatitude(firePoint.getLatitude());
|
||||
shanDongFirePoint.setCountyCode(firePoint.getCountyCode());
|
||||
shanDongFirePoint.setCountyName(firePoint.getCountyName());
|
||||
shanDongFirePoint.setSatelliteTime(firePoint.getSatelliteTime());
|
||||
shanDongFirePoint.setSatelliteType(firePoint.getSatelliteType());
|
||||
shanDongFirePoint.setLandType(firePoint.getLandType());
|
||||
shanDongFirePoint.setAddTime(firePoint.getAddTime());
|
||||
shanDongFirePoint.setConfidence(firePoint.getConfidence());
|
||||
shanDongFirePoint.setFirePointAddress(firePoint.getFirePointAddress());
|
||||
shanDongFirePoint.setFireType(firePoint.getFireType());
|
||||
shanDongFirePoint.setFireImage(firePoint.getFireImage());
|
||||
shanDongFirePoint.setSatelliteImage(firePoint.getSatelliteImage());
|
||||
shanDongFirePoint.setBeforeFireImage(firePoint.getBeforeFireImage());
|
||||
shanDongFirePoint.setAfterFireImage(firePoint.getAfterFireImage());
|
||||
shanDongFirePoint.setStreetCode(firePoint.getStreetCode());
|
||||
shanDongFirePoint.setStreetName(firePoint.getStreetName());
|
||||
shanDongFirePoint.setVerifyState("0");
|
||||
return shanDongFirePoint;
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回开关是否为打开状态
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user