|
@@ -10,6 +10,8 @@ import com.gyee.alarm.util.DateUtils;
|
|
|
import com.gyee.alarm.util.StringUtils;
|
|
|
import com.gyee.alarm.util.realtimesource.IEdosUtil;
|
|
|
|
|
|
+import com.gyee.common.model.PointData;
|
|
|
+import groovy.util.logging.Slf4j;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -40,9 +42,6 @@ public class AlarmWtService {
|
|
|
@Resource
|
|
|
private PushDataSevice pushDataSevice;
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
@Value("${read-rows}")
|
|
|
private Integer readRows;
|
|
|
|
|
@@ -131,7 +130,6 @@ public class AlarmWtService {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
public List<AlarmVo> initalAlarmVo() throws Exception {
|
|
|
|
|
|
List<AlarmVo> alarmVoList = new ArrayList<>();
|
|
@@ -164,7 +162,7 @@ public class AlarmWtService {
|
|
|
for (ProEconAlarmConfiguration alarm : alarmls) {
|
|
|
|
|
|
|
|
|
- if (pointMap.containsKey(alarm.getUniformCode()) && alarm.getDeviceId().equals(wt.getId())) {
|
|
|
+ if (pointMap.containsKey(alarm.getUniformCode()) && StringUtils.notEmp(alarm.getDeviceId() ) && alarm.getDeviceId().equals(wt.getId())) {
|
|
|
ProBasicEquipmentPoint equipmentPoint = pointMap.get(alarm.getUniformCode());
|
|
|
|
|
|
if (StringUtils.notEmp(initialcode) &&
|
|
@@ -503,6 +501,7 @@ public class AlarmWtService {
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
Map<String, AlarmSimpleVo> map = new HashMap<>();
|
|
|
for (AlarmTag alarm : ls) {
|
|
|
+
|
|
|
if (CacheContext.alarmWtMap.containsKey(alarm.getId().toUpperCase())) {
|
|
|
AlarmVo vo = CacheContext.alarmWtMap.get(alarm.getId().toUpperCase());
|
|
|
if (vo.getAlarmtype().equals(AlarmTypeValue.WT.getCode())) {
|
|
@@ -531,7 +530,7 @@ public class AlarmWtService {
|
|
|
|
|
|
if (map.containsKey(alarm.getId().toLowerCase())) {
|
|
|
AlarmSimpleVo tag = map.get(alarm.getId().toLowerCase());
|
|
|
-
|
|
|
+ logger.info("ts"+tag.getTs()+"_endts_"+tag.getEndts()+"_alarmId_"+alarm.getId());
|
|
|
if (null != tag.getTs()) {
|
|
|
alarm.setTs(tag.getTs());
|
|
|
Date begin = new Date(alarm.getEndts());
|