临时变更:开关开启时,山东省内火点数据通过通道1进入山东临时火点表

This commit is contained in:
liuchengqian 2022-10-24 12:07:34 +08:00
parent c1b14154ad
commit 27b369f4ed

View File

@ -121,16 +121,37 @@ public class FirePointServiceImpl implements FirePointService {
log.info("添加火点信息 逆地理编码请求街道编号失败:" + e.getMessage()); log.info("添加火点信息 逆地理编码请求街道编号失败:" + e.getMessage());
return false; return false;
} }
if (firePointEntity.getCountyCode().startsWith("37")) {
return false;
}
if (checkDuplicatedData(firePointEntity)) { if (checkDuplicatedData(firePointEntity)) {
return false; 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("-------发现新火点"); log.info("-------发现新火点");
firePointDao.save(firePointEntity); firePointDao.save(firePointEntity);
return true; return true;
} }
// log.info("-------发现新火点");
// firePointDao.save(firePointEntity);
// return true;
}
/** /**
* 检查重复数据 * 检查重复数据
@ -278,6 +299,31 @@ public class FirePointServiceImpl implements FirePointService {
return firePoint; 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;
}
/** /**
* 返回开关是否为打开状态 * 返回开关是否为打开状态
* *