111
parent
5615b138ae
commit
a41793dc50
|
|
@ -166,7 +166,12 @@ public class RadarRealTimeDataServiceImpl implements RadarRealTimeDataService, I
|
||||||
// if (sysRadar != null) { // 雷达数据返回封装类赋值
|
// if (sysRadar != null) { // 雷达数据返回封装类赋值
|
||||||
if (modbusResponse != null) {
|
if (modbusResponse != null) {
|
||||||
String tag = modbusResponse.getTagId();
|
String tag = modbusResponse.getTagId();
|
||||||
timeMap.put("start", data.getTime());
|
if (readCount1 == 2) {
|
||||||
|
timeMap.put("start1", data.getTime());
|
||||||
|
}
|
||||||
|
if (readCount2 == 2) {
|
||||||
|
timeMap.put("start2", data.getTime());
|
||||||
|
}
|
||||||
// 雷达原始数据对象
|
// 雷达原始数据对象
|
||||||
PrimaryRadarData primaryRadarData = new PrimaryRadarData();
|
PrimaryRadarData primaryRadarData = new PrimaryRadarData();
|
||||||
// 拷贝封装类属性到雷达原始数据对象
|
// 拷贝封装类属性到雷达原始数据对象
|
||||||
|
|
@ -220,9 +225,9 @@ public class RadarRealTimeDataServiceImpl implements RadarRealTimeDataService, I
|
||||||
+ "此次雷达ip为:====" + primaryRadarData.getRadarIp() + "上次雷达ip为 =====" + dataList.get(dataList.size() - 1).getRadarIp()
|
+ "此次雷达ip为:====" + primaryRadarData.getRadarIp() + "上次雷达ip为 =====" + dataList.get(dataList.size() - 1).getRadarIp()
|
||||||
+ "此次雷达标签号为:====" + modbusResponse.getTagId() + "此次雷达标签号为:====" + dataList.get(dataList.size() - 1).getTagId()
|
+ "此次雷达标签号为:====" + modbusResponse.getTagId() + "此次雷达标签号为:====" + dataList.get(dataList.size() - 1).getTagId()
|
||||||
+ data.getTime() + "结束时间为:" + currentTimeMillis);
|
+ data.getTime() + "结束时间为:" + currentTimeMillis);
|
||||||
saveData(radar, map, readCount1, timeMap.get("noDataStart1"), currentTimeMillis, modbusResponse.getNumber());
|
saveData(radar, map, readCount1, timeMap.get("start1"), currentTimeMillis, modbusResponse.getNumber());
|
||||||
dataList.clear();
|
dataList.clear();
|
||||||
timeMap.put("noDataStart1", System.currentTimeMillis());
|
timeMap.put("start1", System.currentTimeMillis());
|
||||||
map.remove(getMapKey(radar, 1));
|
map.remove(getMapKey(radar, 1));
|
||||||
dataList.add(primaryRadarData);
|
dataList.add(primaryRadarData);
|
||||||
readCount1 = 1;
|
readCount1 = 1;
|
||||||
|
|
@ -243,6 +248,7 @@ public class RadarRealTimeDataServiceImpl implements RadarRealTimeDataService, I
|
||||||
saveData(radar, map, readCount1, timeMap.get("zero1"), noDataStart1, modbusResponse.getNumber());
|
saveData(radar, map, readCount1, timeMap.get("zero1"), noDataStart1, modbusResponse.getNumber());
|
||||||
readCount1 = 1;
|
readCount1 = 1;
|
||||||
map.remove(getMapKey(radar, modbusResponse.getNumber()));
|
map.remove(getMapKey(radar, modbusResponse.getNumber()));
|
||||||
|
timeMap.put("zero1",System.currentTimeMillis());
|
||||||
timeMap.put("noDataStart1", System.currentTimeMillis());
|
timeMap.put("noDataStart1", System.currentTimeMillis());
|
||||||
consecutiveZeros1 = 0;
|
consecutiveZeros1 = 0;
|
||||||
if (CollectionUtils.isNotEmpty(dataList)) {
|
if (CollectionUtils.isNotEmpty(dataList)) {
|
||||||
|
|
@ -288,9 +294,9 @@ public class RadarRealTimeDataServiceImpl implements RadarRealTimeDataService, I
|
||||||
+ "此次雷达ip为:====" + primaryRadarData.getRadarIp() + "上次雷达ip为 =====" + dataList.get(dataList.size() - 1).getRadarIp()
|
+ "此次雷达ip为:====" + primaryRadarData.getRadarIp() + "上次雷达ip为 =====" + dataList.get(dataList.size() - 1).getRadarIp()
|
||||||
+ "此次雷达标签号为:====" + modbusResponse.getTagId() + "此次雷达标签号为:====" + dataList.get(dataList.size() - 1).getTagId()
|
+ "此次雷达标签号为:====" + modbusResponse.getTagId() + "此次雷达标签号为:====" + dataList.get(dataList.size() - 1).getTagId()
|
||||||
+ data.getTime() + "结束时间为:" + currentTimeMillis);
|
+ data.getTime() + "结束时间为:" + currentTimeMillis);
|
||||||
saveData(radar, map, readCount2, timeMap.get("noDataStart2"), currentTimeMillis, modbusResponse.getNumber());
|
saveData(radar, map, readCount2, timeMap.get("start2"), currentTimeMillis, modbusResponse.getNumber());
|
||||||
dataList.clear();
|
dataList.clear();
|
||||||
timeMap.put("noDataStart2", System.currentTimeMillis());
|
timeMap.put("start2", System.currentTimeMillis());
|
||||||
map.remove(getMapKey(radar, 2));
|
map.remove(getMapKey(radar, 2));
|
||||||
dataList.add(primaryRadarData);
|
dataList.add(primaryRadarData);
|
||||||
readCount2 = 1;
|
readCount2 = 1;
|
||||||
|
|
@ -314,6 +320,7 @@ public class RadarRealTimeDataServiceImpl implements RadarRealTimeDataService, I
|
||||||
readCount2 = 1;
|
readCount2 = 1;
|
||||||
map.remove(getMapKey(radar, modbusResponse.getNumber()));
|
map.remove(getMapKey(radar, modbusResponse.getNumber()));
|
||||||
timeMap.put("noDataStart2", System.currentTimeMillis());
|
timeMap.put("noDataStart2", System.currentTimeMillis());
|
||||||
|
timeMap.put("zero2", System.currentTimeMillis());
|
||||||
consecutiveZeros2 = 0;
|
consecutiveZeros2 = 0;
|
||||||
if (CollectionUtils.isNotEmpty(dataList)) {
|
if (CollectionUtils.isNotEmpty(dataList)) {
|
||||||
dataList.clear();
|
dataList.clear();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue