Commit ac51888c authored by tangwei's avatar tangwei

解决冲突

parents 66c1ffc3 ee6dc2b6
......@@ -9,6 +9,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
......@@ -56,7 +57,9 @@ import java.net.InetAddress;
public class AmosJxiopAnalyseApplication {
@Autowired
private EmqKeeper emqKeeper;
//本地是否执行健康指数算法开关
@Value("${openHealth:true}")
Boolean openHealth;
@Autowired
private SyncESDataToTdengineMqttListener syncESDataToTdengineMqttListener;
......@@ -76,7 +79,9 @@ public class AmosJxiopAnalyseApplication {
@Bean
public void initMqtt() throws Exception {
//订阅固化周期性数据成功的消息
emqKeeper.subscript("sync_esdata_to_tdengine_notice", 1,syncESDataToTdengineMqttListener );
if (!openHealth) {
//订阅固化周期性数据成功的消息
emqKeeper.subscript("sync_esdata_to_tdengine_notice", 1, syncESDataToTdengineMqttListener);
}
}
}
package com.yeejoin.amos.boot.module.jxiop.biz.config;
import com.alibaba.druid.pool.DruidDataSource;
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
import org.apache.ibatis.session.SqlSessionFactory;
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.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import javax.sql.DataSource;
import java.sql.SQLException;
/**
* 从数据源配置
* 若需要配置更多数据源 , 直接在yml中添加数据源配置再增加相应的新的数据源配置类即可
*/
@Configuration
@MapperScan(basePackages = "com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2", sqlSessionFactoryRef = "taosSqlSessionFactory2")
public class TdEngineConfig2 {
private Logger logger = LoggerFactory.getLogger(TdEngineConfig2.class);
// 精确到 cluster 目录,以便跟其他数据源隔离
private static final String MAPPER_LOCATION = "classpath*:mapper/tdengine2/*.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 = "taosDataSource2") //声明其为Bean实例
public DataSource clusterDataSource() {
DruidDataSource datasource = new DruidDataSource();
datasource.setUrl(this.dbUrl);
datasource.setUsername(username);
datasource.setPassword(password);
datasource.setDriverClassName(driverClassName);
datasource.setInitialSize(100); // 初始连接数
datasource.setMaxActive(200); // 最大连接数
datasource.setMaxWait(60000); // 最大等待时间
datasource.setMinIdle(5); // 最小空闲连接数
datasource.setValidationQuery("SELECT 1"); // 验证查询
try {
datasource.setFilters("stat");
} catch (SQLException throwables) {
throwables.printStackTrace();
}
datasource.setQueryTimeout(30); // 查询超时时间
datasource.setConnectionProperties("useUnicode=true;characterEncoding=UTF-8"); // 连接属性
return datasource;
}
@Bean(name = "taosTransactionManager2")
public DataSourceTransactionManager clusterTransactionManager() {
return new DataSourceTransactionManager(clusterDataSource());
}
@Bean(name = "taosSqlSessionFactory2")
public SqlSessionFactory clusterSqlSessionFactory(@Qualifier("taosDataSource2") DataSource culsterDataSource)
throws Exception {
final MybatisSqlSessionFactoryBean sessionFactory = new MybatisSqlSessionFactoryBean();
sessionFactory.setDataSource(culsterDataSource);
sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver()
.getResources(MAPPER_LOCATION));
sessionFactory.setTypeAliasesPackage("com.yeejoin.amos.boot.module.jxiop.biz.entity");
//mybatis 数据库字段与实体类属性驼峰映射配置
sessionFactory.getObject().getConfiguration().setMapUnderscoreToCamelCase(true);
return sessionFactory.getObject();
}
}
......@@ -99,4 +99,13 @@ public class CommonConstans {
public static final String Twodecimalplaces= "%.2f";
public static final String Fourdecimalplaces = "%.4f";
public static final String QueryStringFrontMoudleNotKeyWord = "frontModule";
public static final HashMap<String, String> waringPeriodS = new HashMap<String, String>() {
{
put("按时刻", "按10分钟周期");
put("按小时", "按1小时周期");
put("按天", "按1天周期");
}
};
}
......@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthIndex;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvPointProcessVariableClassification;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanHealthIndexMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.service.IAlarmInfoDetailService;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -39,6 +40,9 @@ public class AnalyseController extends BaseController {
@Autowired
IdxBizFanHealthIndexMapper idxBizFanHealthIndexMapper;
@Autowired
IAlarmInfoDetailService iAlarmInfoDetailService;
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "工况测点区间划分-风机", notes = "工况测点区间划分-风机")
@GetMapping(value = "/getFanConditionVariablesByTime")
......@@ -230,5 +234,16 @@ public class AnalyseController extends BaseController {
}
return ResponseHelper.buildResponse(commonServiceImpl.getInfluxdbDataByConditon(stationType,pointId,startTime, endTime)) ;
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "post", value = "预警详情信息-风机", notes = "预警详情信息-风机")
@PostMapping(value = "/getAlramInfoDetailOfFan")
public ResponseModel<Map<String, Object>> getAlramInfoDetailOfFan(@RequestParam(required = true) String id){
return ResponseHelper.buildResponse(iAlarmInfoDetailService.getAlramInfoDetailOfFan(id));
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "post", value = "预警详情信息-光伏", notes = "预警详情信息-光伏")
@PostMapping(value = "/getAlramInfoDetailOfPv")
public ResponseModel<Map<String, Object>> getAlramInfoDetailOfPv(@RequestParam(required = true) String id){
return ResponseHelper.buildResponse(iAlarmInfoDetailService.getAlramInfoDetailOfPv(id));
}
}
package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IndicatorData;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl;
import com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.FanHealthIndexMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex;
import com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
......@@ -48,4 +48,44 @@ public class TestController extends BaseController {
commonService.healthWarningMinuteByFan();
}
@Autowired
FanHealthIndexMapper fanHealthIndexMapper;
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@ApiOperation(httpMethod = "POST", value = "saveTest", notes = "saveTest")
@PostMapping("/saveTest")
public void saveTest () {
QueryWrapper<FanHealthIndex> fanHealthIndexQueryWrapper = new QueryWrapper<>();
List<FanHealthIndex> fanHealthIndices = fanHealthIndexMapper.selectList(fanHealthIndexQueryWrapper);
FanHealthIndex fanHealthIndex = new FanHealthIndex();
fanHealthIndex.setHealthIndex(2.0);
fanHealthIndex.setTs(System.currentTimeMillis());
fanHealthIndex.setArea("区域");
fanHealthIndex.setAnalysisEndTime(DateUtil.now());
fanHealthIndex.setAnalysisObjSeq("2");
fanHealthIndex.setHealthLevel("2321");
fanHealthIndex.setHealthIndex(25.0);
fanHealthIndex.setAnalysisStartTime(DateUtil.now());
fanHealthIndex.setAnalysisObjType("21");
fanHealthIndex.setAnalysisTime("21");
fanHealthIndex.setAnomaly(2.0);
fanHealthIndex.setEquipmentName("21");
fanHealthIndex.setGatewayId("213412");
fanHealthIndex.setPointName("21312");
fanHealthIndex.setNumber("213");
fanHealthIndex.setKks("213");
fanHealthIndex.setRecDate(DateUtil.now());
fanHealthIndex.setSubSystem("213421");
fanHealthIndex.setWeight(2.2);
fanHealthIndex.setAnalysisType("21");
fanHealthIndex.setStation("rwwrrw");
fanHealthIndex.setIndexAddress("2321");
// commonService.healthWarningMinuteByFJ();
fanHealthIndexMapper.insert(fanHealthIndex);
}
}
package com.yeejoin.amos.boot.module.jxiop.biz.service;
import java.util.Map;
public interface IAlarmInfoDetailService {
Map<String,Object> getAlramInfoDetailOfFan(String id);
Map<String,Object> getAlramInfoDetailOfPv(String id);
}
package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.*;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.*;
import com.yeejoin.amos.boot.module.jxiop.biz.service.IAlarmInfoDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
@Service
public class AlarmInfoDetailServiceImpl implements IAlarmInfoDetailService {
@Autowired
IdxBizFanWarningRecordMapper idxBizFanWarningRecordMapper;
@Autowired
IdxBizFanHealthIndexMapper idxBizFanHealthIndexMapper;
@Autowired
IdxBizFanPointVarCentralValueMapper idxBizFanPointVarCentralValueMapper;
@Autowired
IdxBizFanPointProcessVariableClassificationMapper idxBizFanPointProcessVariableClassificationMapper;
@Autowired
IdxBizPvWarningRecordMapper idxBizPvWarningRecordMapper;
@Override
public Map<String, Object> getAlramInfoDetailOfFan(String id) {
Map<String, Object> result = new HashMap<>();
IdxBizFanWarningRecord idxBizFanWarningRecord = idxBizFanWarningRecordMapper.selectById(id);
//------------预警信息
HashMap<String, String> alarmInfoMap = new HashMap<>();
//测点名称
alarmInfoMap.put("pointName", idxBizFanWarningRecord.getPointName());
//告警周期
alarmInfoMap.put("waringPeriod", idxBizFanWarningRecord.getWarningPeriod());
//告警时间
alarmInfoMap.put("waringTime", idxBizFanWarningRecord.getRecDate().toString());
//预警等级
alarmInfoMap.put("waringLevel", idxBizFanWarningRecord.getWarningName());
//预警触发规则
alarmInfoMap.put("waringRule", idxBizFanWarningRecord.getCONTENT());
result.put("warningInfo", alarmInfoMap);
// -----------预警趋势
HashMap<String, List<String>> alarmTrendMap = new HashMap<>();
List<HashMap<String,String>> alarmAbnormalityList = new ArrayList<>();
Long analysisDate = idxBizFanWarningRecord.getRecDate().getTime()+1000*60;
List<IdxBizFanHealthIndex> idxBizFanHealthIndexList = idxBizFanHealthIndexMapper.selectList(new QueryWrapper<IdxBizFanHealthIndex>()
.eq("GATEWAY_ID", idxBizFanWarningRecord.getGatewayId())
.eq("INDEX_ADDRESS", idxBizFanWarningRecord.getIndexAddress())
.le("ANALYSIS_TIME", DateUtil.formatDateTime(new Date(analysisDate)))
.orderByDesc("ANALYSIS_TIME")
.last("limit 30"));
List<String> xDatas = new ArrayList<>();
List<String> yDatas = new ArrayList<>();
for (int i = idxBizFanHealthIndexList.size() - 1; i > 0; i--) {
HashMap<String,String> alarmAbnormalityItem = new HashMap<>();
IdxBizFanHealthIndex idxBizFanHealthIndex = idxBizFanHealthIndexList.get(i);
xDatas.add(idxBizFanHealthIndex.getANALYSISTIME());
yDatas.add(String.valueOf(idxBizFanHealthIndex.getHealthIndex()));
alarmAbnormalityItem.put("time",idxBizFanHealthIndex.getANALYSISTIME());
alarmAbnormalityItem.put("abnormal", String.valueOf(idxBizFanHealthIndex.getANOMALY()));
alarmAbnormalityItem.put("healthValue",String.valueOf(idxBizFanHealthIndex.getHealthIndex()));
alarmAbnormalityList.add(alarmAbnormalityItem);
}
alarmTrendMap.put("xDatas",xDatas);
alarmTrendMap.put("yDatas",yDatas);
result.put("alarmTrend",alarmTrendMap);
// 异常度 alarmAbnormality
result.put("alarmAbnormalityList",alarmAbnormalityList.subList(alarmAbnormalityList.size()-3,alarmAbnormalityList.size()));
//----健康指数来源
List<IdxBizFanPointVarCentralValue> idxBizFanPointVarCentralValueList = idxBizFanPointVarCentralValueMapper.selectList(new QueryWrapper<IdxBizFanPointVarCentralValue>().eq("ANALYSIS_POINT_ID",idxBizFanWarningRecord.getAnalysisPointId()));
IdxBizFanPointVarCentralValue idxBizFanPointVarCentralValue =new IdxBizFanPointVarCentralValue();
if(idxBizFanPointVarCentralValueList.size()<=0){
return result;
}
idxBizFanPointVarCentralValue = idxBizFanPointVarCentralValueList.get(0);
//健康指数来源测点信息
HashMap<String,String> healthPointInfoMap = new HashMap<>();
healthPointInfoMap.put("analysisPointName",idxBizFanPointVarCentralValue.getAnalysisPointName());
healthPointInfoMap.put("processPoint1Name",idxBizFanPointVarCentralValue.getProcessPoint1Name());
healthPointInfoMap.put("processPoint2Name",idxBizFanPointVarCentralValue.getProcessPoint2Name());
healthPointInfoMap.put("processPoint3Name",idxBizFanPointVarCentralValue.getProcessPoint3Name());
result.put("healthPointInfo",healthPointInfoMap);
List<IdxBizFanPointProcessVariableClassification> idxBizFanPointProcessVariableClassificationList = idxBizFanPointProcessVariableClassificationMapper.selectList(new QueryWrapper<IdxBizFanPointProcessVariableClassification>().in("SEQUENCE_NBR",Arrays.asList(idxBizFanPointVarCentralValue.getAnalysisPointId(),idxBizFanPointVarCentralValue.getProcessPoint1Id(),idxBizFanPointVarCentralValue.getProcessPoint2Id(),idxBizFanPointVarCentralValue.getProcessPoint3Id())));
// List<IndicatorData> indicatorDataList =
//当前值
//训练值
//异常度
return result;
}
@Override
public Map<String, Object> getAlramInfoDetailOfPv(String id) {
return null;
}
}
package com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndexDay;
public interface FanHealthIndexDayMapper extends BaseMapper<FanHealthIndexDay> {
}
package com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndexHour;
public interface FanHealthIndexHourMapper extends BaseMapper<FanHealthIndexHour> {
}
package com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex;
public interface FanHealthIndexMapper extends BaseMapper<FanHealthIndex> {
}
package com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndexMoment;
public interface FanHealthIndexMomentMapper extends BaseMapper<FanHealthIndexMoment> {
}
package com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvHealthIndexDay;
public interface PvHealthIndexDayMapper extends BaseMapper<PvHealthIndexDay> {
}
package com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvHealthIndexHour;
public interface PvHealthIndexHourMapper extends BaseMapper<PvHealthIndexHour> {
}
package com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvHealthIndex;
public interface PvHealthIndexMapper extends BaseMapper<PvHealthIndex> {
}
package com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvHealthIndexMoment;
public interface PvHealthIndexMomentMapper extends BaseMapper<PvHealthIndexMoment> {
}
package com.yeejoin.amos.boot.module.jxiop.biz.tdengine;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
@TableName(value = "fan_health_index", autoResultMap = true)
public class FanHealthIndex implements Serializable {
private Long ts;
private String recDate;
private String analysisObjType;
private String analysisObjSeq;
private Double weight;
private Double healthIndex;
private String healthLevel;
private String analysisType;
private String analysisStartTime;
private String analysisEndTime;
private String area;
private String station;
private String subSystem;
private String number;
private String equipmentName;
private String gatewayId;
private String indexAddress;
private Double anomaly;
private String pointName;
private String analysisTime;
private String kks;
}
package com.yeejoin.amos.boot.module.jxiop.biz.tdengine;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
@Data
@TableName(value = "fan_health_index_day", autoResultMap = true)
public class FanHealthIndexDay implements Serializable {
private Long ts;
private String recDate;
private String analysisObjType;
private String analysisObjSeq;
private Double weight;
private Double healthIndex;
private String healthLevel;
private String analysisType;
private String analysisStartTime;
private String analysisEndTime;
private String area;
private String station;
private String subSystem;
private String number;
private String equipmentName;
private String gatewayId;
private String indexAddress;
private Double anomaly;
private String pointName;
private String analysisTime;
private String kks;
}
package com.yeejoin.amos.boot.module.jxiop.biz.tdengine;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
@Data
@TableName(value = "fan_health_index_hour", autoResultMap = true)
public class FanHealthIndexHour implements Serializable {
private Long ts;
private String recDate;
private String analysisObjType;
private String analysisObjSeq;
private Double weight;
private Double healthIndex;
private String healthLevel;
private String analysisType;
private String analysisStartTime;
private String analysisEndTime;
private String area;
private String station;
private String subSystem;
private String number;
private String equipmentName;
private String gatewayId;
private String indexAddress;
private Double anomaly;
private String pointName;
private String analysisTime;
private String kks;
}
package com.yeejoin.amos.boot.module.jxiop.biz.tdengine;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
@Data
@TableName(value = "fan_health_index_moment", autoResultMap = true)
public class FanHealthIndexMoment implements Serializable {
private Long ts;
private String recDate;
private String analysisObjType;
private String analysisObjSeq;
private Double weight;
private Double healthIndex;
private String healthLevel;
private String analysisType;
private String analysisStartTime;
private String analysisEndTime;
private String area;
private String station;
private String subSystem;
private String number;
private String equipmentName;
private String gatewayId;
private String indexAddress;
private Double anomaly;
private String pointName;
private String analysisTime;
private String kks;
}
package com.yeejoin.amos.boot.module.jxiop.biz.tdengine;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
*
*
* @author system_generator
* @date 2023-08-15
*/
@Data
@TableName(value = "pv_health_index", autoResultMap = true)
public class PvHealthIndex {
private Long ts;
private String recDate;
private String analysisObjType;
private String analysisObjSeq;
private Double weight;
private Double healthIndex;
private String healthLevel;
private String analysisType;
private String analysisStartTime;
private String analysisEndTime;
private String area;
private String station;
private String subarray;
private String manufacturer;
private String deviceType;
private String gatewayId;
private String indexAddress;
private String equipmentName;
private Double anomaly;
private String pointName;
private String analysisTime;
private String kks;
}
package com.yeejoin.amos.boot.module.jxiop.biz.tdengine;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
*
*
* @author system_generator
* @date 2023-08-15
*/
@Data
@TableName(value = "pv_health_index_day", autoResultMap = true)
public class PvHealthIndexDay {
private Long ts;
private String recDate;
private String analysisObjType;
private String analysisObjSeq;
private Double weight;
private Double healthIndex;
private String healthLevel;
private String analysisType;
private String analysisStartTime;
private String analysisEndTime;
private String area;
private String station;
private String subarray;
private String manufacturer;
private String deviceType;
private String gatewayId;
private String indexAddress;
private String equipmentName;
private Double anomaly;
private String pointName;
private String analysisTime;
private String kks;
}
package com.yeejoin.amos.boot.module.jxiop.biz.tdengine;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
*
*
* @author system_generator
* @date 2023-08-15
*/
@Data
@TableName(value = "pv_health_index_hour", autoResultMap = true)
public class PvHealthIndexHour {
private Long ts;
private String recDate;
private String analysisObjType;
private String analysisObjSeq;
private Double weight;
private Double healthIndex;
private String healthLevel;
private String analysisType;
private String analysisStartTime;
private String analysisEndTime;
private String area;
private String station;
private String subarray;
private String manufacturer;
private String deviceType;
private String gatewayId;
private String indexAddress;
private String equipmentName;
private Double anomaly;
private String pointName;
private String analysisTime;
private String kks;
}
package com.yeejoin.amos.boot.module.jxiop.biz.tdengine;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
*
*
* @author system_generator
* @date 2023-08-15
*/
@Data
@TableName(value = "pv_health_index_moment", autoResultMap = true)
public class PvHealthIndexMoment {
private Long ts;
private String recDate;
private String analysisObjType;
private String analysisObjSeq;
private Double weight;
private Double healthIndex;
private String healthLevel;
private String analysisType;
private String analysisStartTime;
private String analysisEndTime;
private String area;
private String station;
private String subarray;
private String manufacturer;
private String deviceType;
private String gatewayId;
private String indexAddress;
private String equipmentName;
private Double anomaly;
private String pointName;
private String analysisTime;
private String kks;
}
......@@ -75,6 +75,16 @@ spring.db3.datasource.url=jdbc:TAOS-RS://139.9.170.47:6041/iot_data?user=root&pa
spring.db3.datasource.username=root
spring.db3.datasource.password=taosdata
spring.db3.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
# 分析专用td数据库 analyse_data
#spring.db4.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db4.datasource.url=jdbc:TAOS-RS://139.9.170.47:6041/analyse_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db4.datasource.username=root
spring.db4.datasource.password=taosdata
spring.db4.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
## influxDB
#spring.influx.url= http://172.16.3.155:18186
#spring.influx.password=Yeejoin@2020
......
<?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.tdMapper2.FanHealthIndexMapper">
</mapper>
<?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.tdMapper2.FanHealthIndexDayMapper">
</mapper>
<?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.tdMapper2.FanHealthIndexHourMapper">
</mapper>
<?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.tdMapper2.FanHealthIndexMomentMapper">
</mapper>
<?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.tdMapper2.PvHealthIndexMapper">
</mapper>
<?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.tdMapper2.PvHealthIndexDayMapper">
</mapper>
<?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.tdMapper2.PvHealthIndexHourMapper">
</mapper>
<?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.tdMapper2.PvHealthIndexMomentMapper">
</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