|
@@ -34,7 +34,7 @@ public class TsDataService {
|
|
|
public Map<String, PointData> getLatest(List<String> tagNames) {
|
|
|
Map<String, PointData> latest = new HashMap<>();
|
|
|
if(CollUtil.isEmpty(tagNames)) return latest;
|
|
|
- Map<Boolean, List<String>> nxFgs = tagNames.stream().collect(Collectors.groupingBy(tn -> tn.startsWith("NX_FGS_")));
|
|
|
+ Map<Boolean, List<String>> nxFgs = tagNames.stream().collect(Collectors.groupingBy(tn -> tn.startsWith("NX")));
|
|
|
try {
|
|
|
latest = historyDao.getLatest(nxFgs.get(true));
|
|
|
} catch (Exception e) {
|
|
@@ -65,7 +65,7 @@ public class TsDataService {
|
|
|
|
|
|
public List<PointData> getHistoryRaw(String tagName, Date startTime, Date endTime) {
|
|
|
try {
|
|
|
- if (tagName.startsWith("NX_FGS_")) {
|
|
|
+ if (tagName.startsWith("NX")) {
|
|
|
return historyDao.getHistoryRaw(tagName, startTime, endTime);
|
|
|
} else {
|
|
|
startTime = DateUtil.offsetHour(startTime, -8);
|
|
@@ -90,7 +90,7 @@ public class TsDataService {
|
|
|
public List<PointData> getHistorySnap(String tagName, Date startTime, Date endTime, Integer interval) {
|
|
|
if (interval == null || interval == 0) interval = 60;
|
|
|
try {
|
|
|
- if (tagName.startsWith("NX_FGS_")) {
|
|
|
+ if (tagName.startsWith("NX")) {
|
|
|
return historyDao.getHistorySnap(tagName, startTime, endTime, interval);
|
|
|
} else {
|
|
|
return adapterService.getPointData(startTime, endTime, 0, interval, tagName);
|
|
@@ -113,7 +113,7 @@ public class TsDataService {
|
|
|
if (interval == null || interval == 0) interval = 60;
|
|
|
if (type == null || type < 2 || type > 4) type = 4;
|
|
|
try {
|
|
|
- if (tagName.startsWith("NX_FGS_") || tagName.startsWith("NXFGS_")) {
|
|
|
+ if (tagName.startsWith("NX") || tagName.startsWith("NXFGS_")) {
|
|
|
return historyDao.getHistoryStat(tagName, startTime, endTime, interval, type);
|
|
|
} else {
|
|
|
return adapterService.getPointData(startTime, endTime, type, interval, tagName);
|
|
@@ -129,7 +129,7 @@ public class TsDataService {
|
|
|
public List<PointData> getHistoryStat2(String tagName, Date startTime, Date endTime, Integer type) {
|
|
|
if (type == null || type < 2 || type > 4) type = 4;
|
|
|
try {
|
|
|
- if (tagName.startsWith("NX_FGS_") || tagName.startsWith("NXFGS_")) {
|
|
|
+ if (tagName.startsWith("NX") || tagName.startsWith("NXFGS_")) {
|
|
|
return historyDao.getHistoryStat2(tagName, startTime, endTime, type);
|
|
|
} else {
|
|
|
return adapterService.getPointData2(startTime, endTime, type, tagName);
|
|
@@ -142,7 +142,7 @@ public class TsDataService {
|
|
|
}
|
|
|
|
|
|
public PointData getHistoryStat0(String tagName, Date startTime, Date endTime, Integer type) {
|
|
|
- if (tagName.startsWith("NX_FGS_")) {
|
|
|
+ if (tagName.startsWith("NX")) {
|
|
|
try {
|
|
|
return historyDao.getHistoryStat0(tagName, startTime, endTime, type);
|
|
|
} catch (Exception e) {
|
|
@@ -172,7 +172,7 @@ public class TsDataService {
|
|
|
Map<String, PointData> result = new HashMap<>();
|
|
|
if(StrUtil.isBlank(tagNames)) return result;
|
|
|
Map<Boolean, List<String>> nxFgs = Arrays.stream(tagNames.split(",")).collect(
|
|
|
- Collectors.groupingBy(tn -> tn.toUpperCase().startsWith("NX_FGS_")));
|
|
|
+ Collectors.groupingBy(tn -> tn.toUpperCase().startsWith("NX")));
|
|
|
try {
|
|
|
Map<String, PointData> latest = historyDao.getHistorySection(time, nxFgs.get(true));
|
|
|
result.putAll(latest);
|
|
@@ -197,7 +197,7 @@ public class TsDataService {
|
|
|
Map<String, PointData> result = new HashMap<>();
|
|
|
if(StrUtil.isBlank(tagNames)) return result;
|
|
|
Map<Boolean, List<String>> nxFgs = Arrays.stream(tagNames.split(",")).collect(
|
|
|
- Collectors.groupingBy(tn -> tn.toUpperCase().startsWith("NX_FGS_")));
|
|
|
+ Collectors.groupingBy(tn -> tn.toUpperCase().startsWith("NX")));
|
|
|
try {
|
|
|
Map<String, PointData> latest = historyDao.getHistorySection(time, nxFgs.get(true));
|
|
|
result.putAll(latest);
|