Commit d90f129f authored by wujiang's avatar wujiang

修改风机状态

parent 6a458722
package com.yeejoin.amos.boot.module.jxiop.api.mapper4;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.EquipmentSpecificIndex;
public interface EquipmentSpecificIndexMapper extends BaseMapper<EquipmentSpecificIndex>{
}
package com.yeejoin.amos.boot.module.jxiop.biz.config;
import com.alibaba.druid.pool.DruidDataSource;
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
import com.github.pagehelper.PageInterceptor;
import org.apache.ibatis.plugin.Interceptor;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import javax.sql.DataSource;
import java.sql.SQLException;
import java.util.Properties;
@Configuration
@MapperScan(basePackages = "com.yeejoin.amos.boot.module.jxiop.api.mapper4", sqlSessionFactoryRef = "forthSqlSessionFactory")
public class ForthDbConfig {
private Logger logger = LoggerFactory.getLogger(ForthDbConfig.class);
// 精确到 master 目录,以便跟其他数据源隔离
private static final String MAPPER_LOCATION = "classpath*:mapper/forth/*.xml";
@Value("${spring.db4.datasource.url}")
private String dbUrl;
@Value("${spring.db4.datasource.username}")
private String username;
@Value("${spring.db4.datasource.password}")
private String password;
@Value("${spring.db4.datasource.driver-class-name}")
private String driverClassName;
@Bean(name="forthDataSource") //声明其为Bean实例
public DataSource masterDataSource() {
DruidDataSource datasource = new DruidDataSource();
datasource.setUrl(this.dbUrl);
datasource.setUsername(username);
datasource.setPassword(password);
datasource.setDriverClassName(driverClassName);
return datasource;
}
@Bean(name = "forthTransactionManager")
public DataSourceTransactionManager masterTransactionManager() {
return new DataSourceTransactionManager(masterDataSource());
}
@Bean(name = "forthSqlSessionFactory")
public SqlSessionFactory masterSqlSessionFactory(@Qualifier("forthDataSource") DataSource masterDataSource)
throws Exception {
final MybatisSqlSessionFactoryBean sessionFactory = new MybatisSqlSessionFactoryBean();
sessionFactory.setDataSource(masterDataSource);
sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver()
.getResources(ForthDbConfig.MAPPER_LOCATION));
sessionFactory.setTypeAliasesPackage("com.yeejoin.amos.boot.module.jxiop.api.entity");
//mybatis 数据库字段与实体类属性驼峰映射配置
sessionFactory.getObject().getConfiguration().setMapUnderscoreToCamelCase(true);
//分页插件
Interceptor interceptor = new PageInterceptor();
Properties properties = new Properties();
properties.setProperty("helperDialect", "mysql");
properties.setProperty("offsetAsPageNum", "true");
properties.setProperty("rowBoundsWithCount", "true");
properties.setProperty("reasonable", "true");
properties.setProperty("supportMethodsArguments","true");
properties.setProperty("params","pageNum=pageNum;pageSize=pageSize" +
"" +
";");
interceptor.setProperties(properties);
sessionFactory.setPlugins(new Interceptor[] {interceptor});
return sessionFactory.getObject();
}
}
package com.yeejoin.amos.boot.module.jxiop.biz.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
@TableName("wl_equipment_specific_index")
public class EquipmentSpecificIndex {
@TableField("id")
private Long id;
@TableField("equipment_specific_id")
private Long address;
@TableField("value")
private String value;
@TableField("create_date")
private Date createDate;
@TableField("equipment_index_id")
private Long equipmentIndexId;
@TableField("update_date")
private Date updateDate;
@TableField("equipment_specific_name")
private String equipmentSpecificName;
@TableField("equipment_index_name")
private String equipmentIndexName;
@TableField("equipment_index_key")
private String equipmentIndexKey;
@TableField("value_label")
private String valueLabel;
@TableField("value_enum")
private String valueEnum;
@TableField("emergency_level_color")
private String emergencyLevelColor;
@TableField("is_alarm")
private boolean isAlarm;
@TableField("emergency_level")
private String emergencyLevel;
@TableField("emergency_level_describe")
private String emergencyLevelDescribe;
@TableField("trace_id")
private String traceId;
@TableField("index_address")
private String indexAddress;
@TableField("station")
private String station;
@TableField("quality")
private boolean quality;
@TableField("data_type")
private String dataType;
@TableField("time_stamp")
private String timeStamp;
@TableField("gateway_id")
private String gatewayId;
@TableField("unit")
private String unit;
}
package com.yeejoin.amos.boot.module.jxiop.biz.service.impl; package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import cn.hutool.core.bean.BeanUtil; import java.io.File;
import cn.hutool.core.date.DateUtil; import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.text.Collator;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.function.Function;
import java.util.stream.Collectors;
import javax.annotation.PostConstruct;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.Resource;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
...@@ -10,10 +47,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; ...@@ -10,10 +47,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.module.jxiop.api.Enum.AlarmDesc; import com.yeejoin.amos.boot.module.jxiop.api.Enum.AlarmDesc;
import com.yeejoin.amos.boot.module.jxiop.api.Enum.ElectricQuantity;
import com.yeejoin.amos.boot.module.jxiop.api.Enum.KGName; import com.yeejoin.amos.boot.module.jxiop.api.Enum.KGName;
import com.yeejoin.amos.boot.module.jxiop.api.dto.IndexDto; import com.yeejoin.amos.boot.module.jxiop.api.dto.IndexDto;
import com.yeejoin.amos.boot.module.jxiop.api.dto.TreeDto; import com.yeejoin.amos.boot.module.jxiop.api.dto.TreeDto;
...@@ -22,39 +58,37 @@ import com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic; ...@@ -22,39 +58,37 @@ import com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.MonitorFanIndicatorMapper; import com.yeejoin.amos.boot.module.jxiop.api.mapper.MonitorFanIndicatorMapper;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.RegionMapper; import com.yeejoin.amos.boot.module.jxiop.api.mapper.RegionMapper;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper; import com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper;
import com.yeejoin.amos.boot.module.jxiop.api.mapper4.EquipmentSpecificIndexMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESEquipments; import com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESEquipments;
import com.yeejoin.amos.boot.module.jxiop.biz.constants.CommonConstans; import com.yeejoin.amos.boot.module.jxiop.biz.constants.CommonConstans;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.*; import com.yeejoin.amos.boot.module.jxiop.biz.dto.AlarmEventDto;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.*; import com.yeejoin.amos.boot.module.jxiop.biz.dto.ColModel;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.*; import com.yeejoin.amos.boot.module.jxiop.biz.dto.DataGridMock;
import com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper; import com.yeejoin.amos.boot.module.jxiop.biz.dto.ESEquipmentsDTO;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.ResultsData;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.StationCacheInfoDto;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.SystemEnumDto;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.AlarmEvent;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.EquipmentSpecificIndex;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IndicatorData;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.SjglZsjZsbtz;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.SystemEnum;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.TemporaryData;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.TpriDmpDatabook;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.AlarmEventMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.EquipAlarmEventMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.SjglZsjZsbtzMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.SwitchPictureMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.SystemEnumMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.TemporaryDataMapper;
//import com.yeejoin.amos.boot.module.jxiop.biz.utils.InfluxDButils; //import com.yeejoin.amos.boot.module.jxiop.biz.utils.InfluxDButils;
import com.yeejoin.amos.boot.module.jxiop.biz.service.IMonitorFanIndicator; import com.yeejoin.amos.boot.module.jxiop.biz.service.IMonitorFanIndicator;
import com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper;
import com.yeejoin.amos.component.robot.BadRequest; import com.yeejoin.amos.component.robot.BadRequest;
import lombok.extern.slf4j.Slf4j;
import net.sf.jsqlparser.expression.DoubleValue;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.Resource;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import javax.ws.rs.HEAD; import cn.hutool.core.bean.BeanUtil;
import java.io.File; import cn.hutool.core.date.DateUtil;
import java.io.IOException; import lombok.extern.slf4j.Slf4j;
import java.nio.charset.StandardCharsets;
import java.text.Collator;
import java.text.DateFormat;
import java.text.ParseException;
import java.util.*;
import java.util.stream.Collectors;
/** /**
...@@ -116,6 +150,11 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -116,6 +150,11 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
private List<Map> list; private List<Map> list;
@Autowired
private EquipmentSpecificIndexMapper equipmentSpecificIndexMapper;
@Autowired
private static Map<String, EquipmentSpecificIndex> map;
@Override @Override
public ResultsData getNationWideInfo(int current, int size, String gateway, String equipmentNumber) { public ResultsData getNationWideInfo(int current, int size, String gateway, String equipmentNumber) {
...@@ -294,45 +333,162 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -294,45 +333,162 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
return stationBasicMapper.selectById(stationId); return stationBasicMapper.selectById(stationId);
} }
public List<ESEquipmentsDTO> getFanStatusList(String stationId) { public List<ESEquipmentsDTO> getFanStatusList(String stationId) {
StationBasic stationBasic = getOneByStationNumber(stationId); StationBasic stationBasic = getOneByStationNumber(stationId);
Map<String, List<String>> queryCondtion = new HashMap<>(); Map<String, List<String>> queryCondtion = new HashMap<>();
queryCondtion.put(CommonConstans.QueryStringEquipmentIndexName, Arrays.asList("发电状态", "报警状态", "停机状态", "故障状态", "待机状态", "维护状态", "正常发电状态", "实时故障22")); queryCondtion.put(CommonConstans.QueryStringEquipmentIndexName,
queryCondtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(stationBasic.getFanGatewayId())); Arrays.asList("风机状态", "有功功率", "发电状态", "报警状态", "停机状态", "故障状态", "待机状态", "维护状态", "发电机转速", "正常发电状态"));
List<ESEquipments> result = commonServiceImpl.getListDataByCondtions(queryCondtion, null, ESEquipments.class); queryCondtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(stationBasic.getFanGatewayId()));
Map<String, List<String>> queryCondtion1 = new HashMap<>(); List<ESEquipments> result = commonServiceImpl.getListDataByCondtions(queryCondtion, null, ESEquipments.class);
queryCondtion1.put(CommonConstans.QueryStringEquipmentIndexName, Arrays.asList("报警状态")); Map<String, List<String>> queryCondtion1 = new HashMap<>();
queryCondtion1.put(CommonConstans.QueryStringGateWayId, Arrays.asList(stationBasic.getFanGatewayId())); queryCondtion1.put(CommonConstans.QueryStringEquipmentIndexName, Arrays.asList("风机状态"));
List<ESEquipments> equipNumList = commonServiceImpl.getListDataByCondtions(queryCondtion1, null, ESEquipments.class); queryCondtion1.put(CommonConstans.QueryStringGateWayId, Arrays.asList(stationBasic.getFanGatewayId()));
Map<String, String> collect = CollectionUtils.isEmpty(result) ? new HashMap<String, String>() : result.stream().collect(Collectors.toMap(ESEquipments::getEquipmentNumber, ESEquipments::getEquipmentIndexName, (item1, item2) -> item1)); List<ESEquipments> equipNumList = commonServiceImpl.getListDataByCondtions(queryCondtion1, null,
ESEquipments.class);
HashMap<String, String> colorMap = new HashMap<>();
colorMap.put("正常运行", "#00aa00"); Map<String, String> likeMap = new HashMap<String, String>();
colorMap.put("报警运行", "#ffc400"); queryCondtion.remove(CommonConstans.QueryStringEquipmentIndexName);
colorMap.put("停机状态", "#a3f5aa"); likeMap.put(CommonConstans.QueryStringEquipmentIndexName, "实时故障");
colorMap.put("故障状态", "#ff0000"); List<ESEquipments> resultWarn = commonServiceImpl.getListDataByCondtions(queryCondtion, null,
colorMap.put("限功率", "#0055ff"); ESEquipments.class, likeMap);
colorMap.put("待机状态", "#00aaff");
colorMap.put("维护状态", "#ff00ff"); result.addAll(resultWarn);
colorMap.put("通讯中断", "#7d8e95");
// list测点转风机map并且计算风机状态
List<ESEquipmentsDTO> resultList = new ArrayList<>(); Map<String, List<ESEquipments>> listMap = result.stream()
if (CollectionUtils.isNotEmpty(equipNumList)) { .collect(Collectors.groupingBy(po -> po.getEquipmentNumber()));
equipNumList.forEach(item -> { Map<String, String> equipMap = new HashMap<>();
String status = ObjectUtils.isEmpty(CommonConstans.fanStatus.get(collect.get(item.getEquipmentNumber()))) ? "通讯中断" : CommonConstans.fanStatus.get(collect.get(item.getEquipmentNumber())); for (Entry<String, List<ESEquipments>> entry : listMap.entrySet()) {
item.setAddress(status); equipMap.put(entry.getKey(), "正常运行");
ESEquipmentsDTO esEquipmentsDTO = new ESEquipmentsDTO(); if (entry.getValue() == null) {
BeanUtil.copyProperties(item, esEquipmentsDTO); continue;
String color = colorMap.get(status); }
esEquipmentsDTO.setState(status); Map<String, String> objMap = entry.getValue().stream()
esEquipmentsDTO.setColor(color); .collect(Collectors.toMap(ESEquipments::getEquipmentIndexName, ESEquipments::getValue));
resultList.add(esEquipmentsDTO); Map<String, Date> timeMap = entry.getValue().stream()
}); .collect(Collectors.toMap(ESEquipments::getEquipmentIndexName, ESEquipments::getCreatedTime));
} Map<String, String> warnMap = entry.getValue().stream()
.filter(i -> i.getEquipmentIndexName().contains("实时故障"))
return resultList; .collect(Collectors.toMap(ESEquipments::getEquipmentSpecificName, ESEquipments::getValue));
String fanStatus = objMap.get("风机状态");
} Double power = Double.valueOf(objMap.get("有功功率"));
String elecStatus = objMap.get("发电状态") != null ? objMap.get("发电状态") : objMap.get("正常发电状态");
String fault22 = objMap.get("实时故障22");
String warnStatus = objMap.get("报警状态");
String standbyStatus = objMap.get("待机状态");
String stopStatus = objMap.get("停机状态");
String faultStatus = objMap.get("故障状态");
String mainStatus = objMap.get("维护状态");
boolean isWarn = isWarn(warnMap);
Double fdjSpeed = Double.valueOf(objMap.get("发电机转速"));
Date fdjTime = timeMap.get("发电机转速");
Long min = null;
if(fdjTime!=null) {
long start = fdjTime.getTime();
//获取当前时间毫秒值
long current = System.currentTimeMillis();
min = (current - start)/ 1000 / 60;
}
//正常运行
//1.发电状态=true(遥信)
//2.风机状态=8(遥测)
//3.有功功率>0(遥测)
//4.实时故障:枚举值匹配不上,以及匹配为备留信号的为正常运行
if(Boolean.TRUE.toString().equalsIgnoreCase(elecStatus)&&"8.0".equals(fanStatus)&&power>0&&!isWarn)
{
equipMap.put(entry.getKey(), "正常运行");
}else if(Boolean.TRUE.toString().equalsIgnoreCase(warnStatus))
{
equipMap.put(entry.getKey(), "报警状态");
}
else if("9.0".equals(fault22))
{
equipMap.put(entry.getKey(), "限功率");
}else if(Boolean.TRUE.toString().equalsIgnoreCase(standbyStatus)&&"3.0".equals(fanStatus))
{
equipMap.put(entry.getKey(), "待机状态");
}else if(Boolean.TRUE.toString().equalsIgnoreCase(stopStatus)&&"1.0".equals(fanStatus))
{
equipMap.put(entry.getKey(), "停机状态");
}else if(Boolean.TRUE.toString().equalsIgnoreCase(stopStatus)&&Boolean.TRUE.toString().equalsIgnoreCase(faultStatus))
{
equipMap.put(entry.getKey(), "故障状态");
}else if(Boolean.TRUE.toString().equalsIgnoreCase(mainStatus)&&"2.0".equals(fanStatus))
{
equipMap.put(entry.getKey(), "维护状态");
}else if(fdjSpeed>0&&min!=null&&min>=10)
{
equipMap.put(entry.getKey(), "通讯中断");
}
}
HashMap<String, String> colorMap = new HashMap<>();
colorMap.put("正常运行", "#00aa00");
colorMap.put("报警状态", "#ffc400");
colorMap.put("停机状态", "#a3f5aa");
colorMap.put("故障状态", "#ff0000");
colorMap.put("限功率", "#0055ff");
colorMap.put("待机状态", "#00aaff");
colorMap.put("维护状态", "#ff00ff");
colorMap.put("通讯中断", "#7d8e95");
List<ESEquipmentsDTO> resultList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(equipNumList)) {
equipNumList.forEach(item -> {
String status =equipMap.get(item.getEquipmentNumber());
item.setAddress(status);
ESEquipmentsDTO esEquipmentsDTO = new ESEquipmentsDTO();
BeanUtil.copyProperties(item, esEquipmentsDTO);
String color = colorMap.get(status);
esEquipmentsDTO.setState(status);
esEquipmentsDTO.setColor(color);
resultList.add(esEquipmentsDTO);
});
}
return resultList;
}
@PostConstruct
public void init() {
QueryWrapper<EquipmentSpecificIndex> wrapper = new QueryWrapper<>();
wrapper.eq("is_alarm", 1);
List<EquipmentSpecificIndex> list = equipmentSpecificIndexMapper.selectList(wrapper);
map = list.stream().collect(Collectors.toMap(EquipmentSpecificIndex::getEquipmentSpecificName,
Function.identity(), (key1, key2) -> key2));
}
private boolean isWarn(Map<String, String> warnMap) {
boolean result = false;
for (Entry<String, String> entry : warnMap.entrySet()) {
EquipmentSpecificIndex equipmentSpecificIndex = map.get(entry.getKey());
if (equipmentSpecificIndex == null || entry.getValue() == null) {
continue;
}
String valueEnum = equipmentSpecificIndex.getValueEnum();
JSONArray arr = JSONObject.parseArray(valueEnum);
if(arr==null)
{
continue;
}
for (Object o : arr) {
JSONObject json = JSONObject.parseObject(JSONObject.toJSONString(o));
if (json.containsKey("key") && entry.getValue().equals(json.get("key"))) {
String warn = json.getString("label");
if (warn.indexOf("备留") == -1) {
result = true;
break;
}
}
}
if (result) {
break;
}
}
return result;
}
public List<IndexDto> getFanStatusStatistics(String stationId) { public List<IndexDto> getFanStatusStatistics(String stationId) {
List<ESEquipmentsDTO> equipNumList = getFanStatusList(stationId); List<ESEquipmentsDTO> equipNumList = getFanStatusList(stationId);
......
...@@ -12,6 +12,13 @@ spring.db2.datasource.username=root ...@@ -12,6 +12,13 @@ spring.db2.datasource.username=root
spring.db2.datasource.password=Yeejoin@2020 spring.db2.datasource.password=Yeejoin@2020
spring.db2.datasource.driver-class-name: com.mysql.cj.jdbc.Driver spring.db2.datasource.driver-class-name: com.mysql.cj.jdbc.Driver
## db4-equip
spring.db4.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db4.datasource.url=jdbc:mysql://139.9.173.44:3306/equipment?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db4.datasource.username=root
spring.db4.datasource.password=Yeejoin@2020
spring.db4.datasource.driver-class-name: com.mysql.cj.jdbc.Driver
## db3-td-engine ## db3-td-engine
#spring.db3.datasource.type: com.alibaba.druid.pool.DruidDataSource #spring.db3.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db3.datasource.url=jdbc:TAOS-RS://139.9.170.47:6041/iot_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true spring.db3.datasource.url=jdbc:TAOS-RS://139.9.170.47:6041/iot_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.jxiop.biz.mapper2.EquipmentSpecificIndexMapper">
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment