增加箱门持续打开告警
This commit is contained in:
parent
5a9d6ae2f0
commit
e949f4ea20
@ -213,7 +213,7 @@ public class UploadedPhotosServiceImpl implements IUploadedPhotosService {
|
||||
|
||||
|
||||
@Override
|
||||
public void sendAlarmMessage(String sn, String doorState, String shakeState,String eventType) {
|
||||
public void sendAlarmMessage(String sn, String doorState, String shakeState, String eventType) {
|
||||
//
|
||||
boolean notify = false;
|
||||
SendParams sendParams = new SendParams();
|
||||
@ -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) {
|
||||
temp.put("warnInfo", "箱门振动");
|
||||
notify = true;
|
||||
}
|
||||
} 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,19 +283,19 @@ 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;
|
||||
}
|
||||
sendAlarmMessage(device.getSerialNumber(), doorState + "", shakeState + "",eventType+"");
|
||||
sendAlarmMessage(device.getSerialNumber(), doorState + "", shakeState + "", eventType + "");
|
||||
}
|
||||
//抓拍监控,并返回路径
|
||||
String monitorPath = captureMonitorPhoto(device.getSerialNumber());
|
||||
UploadedPhotos uploadedPhotos = new UploadedPhotos(
|
||||
null, "", monitorPath, "", device.getSerialNumber(),
|
||||
device.getLatitude()!= null ? device.getLatitude().doubleValue():0d,
|
||||
device.getLongitude()!= null ? device.getLatitude().doubleValue():0d,
|
||||
18.23d, doorState + "", shakeState + "",32.3,doorAlertBto.getEventType().toString(), new Date()
|
||||
device.getLatitude() != null ? device.getLatitude().doubleValue() : 0d,
|
||||
device.getLongitude() != null ? device.getLatitude().doubleValue() : 0d,
|
||||
18.23d, doorState + "", shakeState + "", 32.3, doorAlertBto.getEventType().toString(), new Date()
|
||||
);
|
||||
int count = insertUploadedPhotos(uploadedPhotos);
|
||||
if (count > 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user