如果是山东的非耕地火点,就考虑入库

This commit is contained in:
liuchengqian 2022-10-24 14:12:44 +08:00
parent 3190d71e8a
commit aa4130ad7d

View File

@ -126,31 +126,29 @@ public class FirePointServiceImpl implements FirePointService {
return false; return false;
} }
if (firePointEntity.getCountyCode().startsWith("37")) { if (firePointEntity.getCountyCode().startsWith("37")) {
//如果是山东的点就入库
if (isSwitchStateOpen()) { if (isSwitchStateOpen()) {
//如果开关已打开就只将未审核的火点添加到山东临时表 //如果是山东的非耕地火点就考虑入库
log.info("-------发现新山东火点"); if (!"耕地".equals(firePointEntity.getLandType())) {
ShanDongFirePointEntity shanDongFirePointByFirePoint = getShanDongFirePointByFirePoint(firePointEntity); //如果开关已打开就只将未审核的火点添加到山东临时表
ShanDongFirePointEntity savedShanDongFirePoint = shanDongFirePointDao.save(shanDongFirePointByFirePoint); log.info("-------发现新山东火点");
//微信消息通知火点审核工作组 ShanDongFirePointEntity shanDongFirePointByFirePoint = getShanDongFirePointByFirePoint(firePointEntity);
try { ShanDongFirePointEntity savedShanDongFirePoint = shanDongFirePointDao.save(shanDongFirePointByFirePoint);
String messageContent = getMessageContent(savedShanDongFirePoint); //微信消息通知火点审核工作组
WDWxSendMsgUtil.sendMsg("18447024917@chatroom", messageContent, 0); try {
} catch (Exception e) { String messageContent = getMessageContent(savedShanDongFirePoint);
e.printStackTrace(); WDWxSendMsgUtil.sendMsg("18447024917@chatroom", messageContent, 0);
} catch (Exception e) {
e.printStackTrace();
}
return true;
} }
return true;
} else {
return false;
} }
} else { } else {
log.info("-------发现新火点"); log.info("-------发现新火点");
firePointDao.save(firePointEntity); firePointDao.save(firePointEntity);
return true; return true;
} }
// log.info("-------发现新火点"); return false;
// firePointDao.save(firePointEntity);
// return true;
} }
/** /**