|
@@ -14,9 +14,6 @@ import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.web.socket.TextMessage;
|
|
import org.springframework.web.socket.TextMessage;
|
|
|
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
|
-import java.util.Date;
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* @author laowo
|
|
* @author laowo
|
|
* @version v1.0
|
|
* @version v1.0
|
|
@@ -93,10 +90,8 @@ public class MqttServiceImpl extends BaseDaoImpl implements MqttService {
|
|
deviceAlarmsDTO.setStatus((Integer) devDp.get("status"));
|
|
deviceAlarmsDTO.setStatus((Integer) devDp.get("status"));
|
|
deviceAlarmsDTO.setCreateTime(TimeUtil.getTime());
|
|
deviceAlarmsDTO.setCreateTime(TimeUtil.getTime());
|
|
//告警存储
|
|
//告警存储
|
|
-
|
|
|
|
Session session = getSession();
|
|
Session session = getSession();
|
|
//webSocket告警推送
|
|
//webSocket告警推送
|
|
-
|
|
|
|
session.save(deviceAlarmsDTO);
|
|
session.save(deviceAlarmsDTO);
|
|
session.flush();
|
|
session.flush();
|
|
session.clear();
|
|
session.clear();
|