增加箱门持续打开告警

This commit is contained in:
wyw 2024-08-17 16:14:35 +08:00
parent 5a9d6ae2f0
commit e949f4ea20

View File

@ -238,11 +238,12 @@ public class UploadedPhotosServiceImpl implements IUploadedPhotosService {
if (Integer.parseInt(eventType) == 2) {
temp.put("warnInfo", "箱门打开");
notify = true;
} else {
if (Integer.parseInt(eventType) == 1) {
} else if (Integer.parseInt(eventType) == 1) {
temp.put("warnInfo", "箱门振动");
notify = true;
}
} else if (Integer.parseInt(eventType) == 3) {
temp.put("warnInfo", "箱门持续打开");
notify = true;
}
if (notify) {
DeviceAlertUser deviceAlertUser = new DeviceAlertUser();
@ -282,7 +283,7 @@ public class UploadedPhotosServiceImpl implements IUploadedPhotosService {
if (doorAlertBto.getEventType() == 1) {
shakeState = doorAlertBto.getEventType();
doorState = 0;
} else if (doorAlertBto.getEventType() == 2) {
} else if (doorAlertBto.getEventType() >= 2) {
doorState = 1;
shakeState = 0;
}