|
@@ -660,9 +660,14 @@ public class WebAccessService {
|
|
if (param.getTagName() != null && !"".equals(param.getTagName())) {
|
|
if (param.getTagName() != null && !"".equals(param.getTagName())) {
|
|
JSONObject js = new JSONObject();
|
|
JSONObject js = new JSONObject();
|
|
Bwanalogtable bwanalogtable = (Bwanalogtable) redisUtil.get(GuanCommonConstant.GUAN_TAGVALUE_PREFIX + param.getTagName());
|
|
Bwanalogtable bwanalogtable = (Bwanalogtable) redisUtil.get(GuanCommonConstant.GUAN_TAGVALUE_PREFIX + param.getTagName());
|
|
- js.put("Name", param.getTagName());
|
|
|
|
- js.put("Value", bwanalogtable.getAvgvalue());
|
|
|
|
- js.put("Quality", 1);
|
|
|
|
|
|
+ if (bwanalogtable != null) {
|
|
|
|
+ js.put("Name", param.getTagName());
|
|
|
|
+ js.put("Value", bwanalogtable.getAvgvalue());
|
|
|
|
+ js.put("Quality", 1);
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ log.info("此点位未配置:", param.getTagName());
|
|
|
|
+ }
|
|
|
|
|
|
resJsonArray.add(js);
|
|
resJsonArray.add(js);
|
|
}
|
|
}
|
|
@@ -1178,7 +1183,7 @@ public class WebAccessService {
|
|
* 获取预制曲线
|
|
* 获取预制曲线
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public List<CirculateDTO> getYzcx(List<String> duans) {
|
|
|
|
|
|
+ public List<CirculateDTO> getYzqx(List<String> duans) {
|
|
List<CirculateDTO> circulates = new ArrayList<>();
|
|
List<CirculateDTO> circulates = new ArrayList<>();
|
|
|
|
|
|
// 先获取 运行方式设定
|
|
// 先获取 运行方式设定
|
|
@@ -1511,7 +1516,7 @@ public class WebAccessService {
|
|
* 获取预制曲线
|
|
* 获取预制曲线
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public List<CirculateDTO> getYzcxCache(List<String> duans) {
|
|
|
|
|
|
+ public List<CirculateDTO> getYzqxCache(List<String> duans) {
|
|
List<CirculateDTO> circulates = new ArrayList<>();
|
|
List<CirculateDTO> circulates = new ArrayList<>();
|
|
|
|
|
|
// 先获取 运行方式设定
|
|
// 先获取 运行方式设定
|
|
@@ -2031,7 +2036,7 @@ public class WebAccessService {
|
|
// 预制曲线在缓存中不存在,则获取预制曲线并存入缓存中,否则不做处理
|
|
// 预制曲线在缓存中不存在,则获取预制曲线并存入缓存中,否则不做处理
|
|
if (!redisUtil.hasKey(GuanCommonConstant.GUAN_PREPARE_CURVE)) {
|
|
if (!redisUtil.hasKey(GuanCommonConstant.GUAN_PREPARE_CURVE)) {
|
|
List<String> duans = new ArrayList<>();
|
|
List<String> duans = new ArrayList<>();
|
|
- List<CirculateDTO> yzqxList = getYzcx(duans);
|
|
|
|
|
|
+ List<CirculateDTO> yzqxList = getYzqx(duans);
|
|
jsonObject.put("预制曲线", yzqxList);
|
|
jsonObject.put("预制曲线", yzqxList);
|
|
jsonObject.put("预制曲线线段", duans);
|
|
jsonObject.put("预制曲线线段", duans);
|
|
redisUtil.set(GuanCommonConstant.GUAN_PREPARE_CURVE, yzqxList);
|
|
redisUtil.set(GuanCommonConstant.GUAN_PREPARE_CURVE, yzqxList);
|
|
@@ -2127,7 +2132,7 @@ public class WebAccessService {
|
|
*/
|
|
*/
|
|
public void loadCacheData(Boolean isRefresh) {
|
|
public void loadCacheData(Boolean isRefresh) {
|
|
|
|
|
|
- log.info(String.format("缓存信息! 开始时间 ↓↓↓↓↓↓↓↓↓↓:" + DateUtils.getTimestamp()));
|
|
|
|
|
|
+// log.info(String.format("缓存信息! 开始时间 ↓↓↓↓↓↓↓↓↓↓:" + DateUtils.getTimestamp()));
|
|
|
|
|
|
// 1 获取设备状态
|
|
// 1 获取设备状态
|
|
if (!redisUtil.hasKey(GuanCommonConstant.GUAN_EQUIPMENT_STATUS) || isRefresh) {
|
|
if (!redisUtil.hasKey(GuanCommonConstant.GUAN_EQUIPMENT_STATUS) || isRefresh) {
|
|
@@ -2138,7 +2143,7 @@ public class WebAccessService {
|
|
// 重新获取预制曲线
|
|
// 重新获取预制曲线
|
|
if (!redisUtil.hasKey(GuanCommonConstant.GUAN_PREPARE_CURVE) || isRefresh) {
|
|
if (!redisUtil.hasKey(GuanCommonConstant.GUAN_PREPARE_CURVE) || isRefresh) {
|
|
List<String> duans = new ArrayList<>();
|
|
List<String> duans = new ArrayList<>();
|
|
- List<CirculateDTO> yzqxList = getYzcxCache(duans);
|
|
|
|
|
|
+ List<CirculateDTO> yzqxList = getYzqxCache(duans);
|
|
redisUtil.set(GuanCommonConstant.GUAN_PREPARE_CURVE, yzqxList);
|
|
redisUtil.set(GuanCommonConstant.GUAN_PREPARE_CURVE, yzqxList);
|
|
redisUtil.set(GuanCommonConstant.GUAN_PREPARE_CURVE_SECTION, duans);
|
|
redisUtil.set(GuanCommonConstant.GUAN_PREPARE_CURVE_SECTION, duans);
|
|
}
|
|
}
|
|
@@ -2161,7 +2166,7 @@ public class WebAccessService {
|
|
redisUtil.set(GuanCommonConstant.GUAN_ALARMS_24H, alarmList);
|
|
redisUtil.set(GuanCommonConstant.GUAN_ALARMS_24H, alarmList);
|
|
}
|
|
}
|
|
|
|
|
|
- log.info(String.format("缓存信息! 结束时间 ↑↑↑↑↑↑↑↑↑↑:" + DateUtils.getTimestamp()));
|
|
|
|
|
|
+// log.info(String.format("缓存信息! 结束时间 ↑↑↑↑↑↑↑↑↑↑:" + DateUtils.getTimestamp()));
|
|
}
|
|
}
|
|
//endregion
|
|
//endregion
|
|
|
|
|
|
@@ -2173,7 +2178,7 @@ public class WebAccessService {
|
|
*/
|
|
*/
|
|
public String loadRealtimeDataCache() {
|
|
public String loadRealtimeDataCache() {
|
|
|
|
|
|
- log.info(String.format(" 获取设备实时信息! 开始时间 ↓↓↓↓↓↓↓↓↓↓:" + DateUtils.getTimestamp()));
|
|
|
|
|
|
+// log.info(String.format(" 获取设备实时信息! 开始时间 ↓↓↓↓↓↓↓↓↓↓:" + DateUtils.getTimestamp()));
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
|
@@ -2181,7 +2186,7 @@ public class WebAccessService {
|
|
JSONArray tagArray = getDashboardCache();
|
|
JSONArray tagArray = getDashboardCache();
|
|
jsonObject.put("设备实时值", tagArray);
|
|
jsonObject.put("设备实时值", tagArray);
|
|
|
|
|
|
- log.info(String.format(" 获取设备实时信息! 结束时间 ↑↑↑↑↑↑↑↑↑↑:" + DateUtils.getTimestamp()));
|
|
|
|
|
|
+// log.info(String.format(" 获取设备实时信息! 结束时间 ↑↑↑↑↑↑↑↑↑↑:" + DateUtils.getTimestamp()));
|
|
|
|
|
|
return jsonObject.toString();
|
|
return jsonObject.toString();
|
|
}
|
|
}
|
|
@@ -2192,7 +2197,7 @@ public class WebAccessService {
|
|
*/
|
|
*/
|
|
public String loadCurveDataCache() {
|
|
public String loadCurveDataCache() {
|
|
|
|
|
|
- log.info(String.format(" 获取设备曲线信息! 开始时间 ↓↓↓↓↓↓↓↓↓↓:" + DateUtils.getTimestamp()));
|
|
|
|
|
|
+// log.info(String.format(" 获取设备曲线信息! 开始时间 ↓↓↓↓↓↓↓↓↓↓:" + DateUtils.getTimestamp()));
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
|
@@ -2263,7 +2268,7 @@ public class WebAccessService {
|
|
// 预制曲线在缓存中不存在,则获取预制曲线并存入缓存中,否则不做处理
|
|
// 预制曲线在缓存中不存在,则获取预制曲线并存入缓存中,否则不做处理
|
|
if (!redisUtil.hasKey(GuanCommonConstant.GUAN_PREPARE_CURVE)) {
|
|
if (!redisUtil.hasKey(GuanCommonConstant.GUAN_PREPARE_CURVE)) {
|
|
List<String> duans = new ArrayList<>();
|
|
List<String> duans = new ArrayList<>();
|
|
- List<CirculateDTO> yzqxList = getYzcxCache(duans);
|
|
|
|
|
|
+ List<CirculateDTO> yzqxList = getYzqxCache(duans);
|
|
jsonObject.put("预制曲线", yzqxList);
|
|
jsonObject.put("预制曲线", yzqxList);
|
|
jsonObject.put("预制曲线线段", duans);
|
|
jsonObject.put("预制曲线线段", duans);
|
|
redisUtil.set(GuanCommonConstant.GUAN_PREPARE_CURVE, yzqxList);
|
|
redisUtil.set(GuanCommonConstant.GUAN_PREPARE_CURVE, yzqxList);
|
|
@@ -2277,7 +2282,7 @@ public class WebAccessService {
|
|
redisUtil.set(GuanCommonConstant.GUAN_ALARMS_24H, alarmList);
|
|
redisUtil.set(GuanCommonConstant.GUAN_ALARMS_24H, alarmList);
|
|
}
|
|
}
|
|
|
|
|
|
- log.info(String.format(" 获取设备曲线信息! 结束时间 ↑↑↑↑↑↑↑↑↑↑:" + DateUtils.getTimestamp()));
|
|
|
|
|
|
+// log.info(String.format(" 获取设备曲线信息! 结束时间 ↑↑↑↑↑↑↑↑↑↑:" + DateUtils.getTimestamp()));
|
|
|
|
|
|
return jsonObject.toString();
|
|
return jsonObject.toString();
|
|
}
|
|
}
|
|
@@ -2288,7 +2293,7 @@ public class WebAccessService {
|
|
*/
|
|
*/
|
|
public String loadIncrementCurveDataCache() {
|
|
public String loadIncrementCurveDataCache() {
|
|
|
|
|
|
- log.info(String.format(" 获取设备曲线信息(增量)! 开始时间 ↓↓↓↓↓↓↓↓↓↓:" + DateUtils.getTimestamp()));
|
|
|
|
|
|
+// log.info(String.format(" 获取设备曲线信息(增量)! 开始时间 ↓↓↓↓↓↓↓↓↓↓:" + DateUtils.getTimestamp()));
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
|
@@ -2353,7 +2358,7 @@ public class WebAccessService {
|
|
redisUtil.set(GuanCommonConstant.GUAN_WHOLE_CURE, wholeCurveList);
|
|
redisUtil.set(GuanCommonConstant.GUAN_WHOLE_CURE, wholeCurveList);
|
|
jsonObject.put("全程曲线", incrementWholeCurveList.toString());
|
|
jsonObject.put("全程曲线", incrementWholeCurveList.toString());
|
|
|
|
|
|
- log.info(String.format(" 获取设备曲线信息(增量)! 结束时间 ↑↑↑↑↑↑↑↑↑↑:" + DateUtils.getTimestamp()));
|
|
|
|
|
|
+// log.info(String.format(" 获取设备曲线信息(增量)! 结束时间 ↑↑↑↑↑↑↑↑↑↑:" + DateUtils.getTimestamp()));
|
|
|
|
|
|
return jsonObject.toString();
|
|
return jsonObject.toString();
|
|
}
|
|
}
|
|
@@ -2366,7 +2371,7 @@ public class WebAccessService {
|
|
*/
|
|
*/
|
|
public String firstLoadData() {
|
|
public String firstLoadData() {
|
|
|
|
|
|
- log.info(String.format(" 前端首次加载值! 开始时间 ↓↓↓↓↓↓↓↓↓↓:" + DateUtils.getTimestamp()));
|
|
|
|
|
|
+// log.info(String.format(" 前端首次加载值! 开始时间 ↓↓↓↓↓↓↓↓↓↓:" + DateUtils.getTimestamp()));
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
|
@@ -2396,7 +2401,7 @@ public class WebAccessService {
|
|
jsonObject.put("最近24H报警信息", alarmList.toString());
|
|
jsonObject.put("最近24H报警信息", alarmList.toString());
|
|
}
|
|
}
|
|
|
|
|
|
- log.info(String.format(" 前端首次加载值! 结束时间 ↑↑↑↑↑↑↑↑↑↑:" + DateUtils.getTimestamp()));
|
|
|
|
|
|
+// log.info(String.format(" 前端首次加载值! 结束时间 ↑↑↑↑↑↑↑↑↑↑:" + DateUtils.getTimestamp()));
|
|
|
|
|
|
return jsonObject.toString();
|
|
return jsonObject.toString();
|
|
}
|
|
}
|