数据中心服务添加
This commit is contained in:
parent
4a263ebb1c
commit
2148619314
|
|
@ -0,0 +1,60 @@
|
|||
package com.bonus.base.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 传感器数据
|
||||
* @author 黑子
|
||||
*/
|
||||
@Data
|
||||
public class CgqInfoDataVo {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 电量
|
||||
*/
|
||||
private String capacity;
|
||||
/**
|
||||
* 电池告警阈值
|
||||
*/
|
||||
private String alarmThreshold;
|
||||
/**
|
||||
* angle_x
|
||||
*/
|
||||
private String angleX;
|
||||
/**
|
||||
* 角度 Y
|
||||
*/
|
||||
private String angleY;
|
||||
|
||||
private String angleZ;
|
||||
/**
|
||||
* 端设备出厂标识
|
||||
*/
|
||||
private String nodeId;
|
||||
/**
|
||||
* 平台注册端设备主键
|
||||
*/
|
||||
private String deviceId;
|
||||
|
||||
/**
|
||||
* 设备模型
|
||||
*/
|
||||
private String model;
|
||||
/**
|
||||
* 服务id
|
||||
*/
|
||||
private String serviceId;
|
||||
/**
|
||||
* 数据采集时间
|
||||
*/
|
||||
private String dataTime;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
package com.bonus.base.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 沉降数据解析实体类
|
||||
* @author 黑子
|
||||
*/
|
||||
@Data
|
||||
public class CjDataVo {
|
||||
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 当前测量值单位:mm
|
||||
*/
|
||||
private String subsideData;
|
||||
/**
|
||||
* 实时变化值单位:mm
|
||||
*/
|
||||
private String realSubsideData;
|
||||
/**
|
||||
* 累加值 单位:mm
|
||||
*/
|
||||
private String accSubsideData;
|
||||
/**
|
||||
* 混凝土基础沉降单位:mm
|
||||
*/
|
||||
private String settlementFoundation;
|
||||
/**
|
||||
* 是否混凝土默认0 不是,1 是混凝土
|
||||
*/
|
||||
private String isConcrete;
|
||||
/**
|
||||
* 端设备出厂标识
|
||||
*/
|
||||
private String nodeId;
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
private String deviceId;
|
||||
/**
|
||||
* 模型id
|
||||
*/
|
||||
private String model;
|
||||
/**
|
||||
* 服务id
|
||||
*/
|
||||
private String serviceId;
|
||||
|
||||
private String dataTime;
|
||||
|
||||
private String remark;
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
package com.bonus.base.entity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
//import static com.oracle.jrockit.jfr.ContentType.Timestamp;
|
||||
|
||||
/**
|
||||
* @author 黑子
|
||||
* 设备检测属性值
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class DevAttributeVo {
|
||||
|
||||
private String id;
|
||||
|
||||
private String devName;
|
||||
|
||||
private String devType;
|
||||
|
||||
private String devId;
|
||||
|
||||
private String jcName;
|
||||
|
||||
private String jcValue;
|
||||
|
||||
private String jcUnit;
|
||||
|
||||
private String relCode;
|
||||
/**
|
||||
* 是否告警
|
||||
*/
|
||||
private String isWarn;
|
||||
/**
|
||||
* 检测时间
|
||||
*/
|
||||
private String jcTime;
|
||||
|
||||
private String devJson;
|
||||
|
||||
private String attributeId;
|
||||
|
||||
private String mergerId;
|
||||
|
||||
public DevAttributeVo(String devId,String devJson,String devName,String devType, String jcName, String jcValue, String jcUnit, String relCode, String isWarn, String jcTime, String mergerId) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
long timestamp = Long.parseLong(jcTime);
|
||||
Date date = new Date(timestamp);
|
||||
String formattedDate = sdf.format(date);
|
||||
this.devId = devId;
|
||||
this.devJson = devJson;
|
||||
this.devName = devName;
|
||||
this.devType = devType;
|
||||
this.jcName = jcName;
|
||||
this.jcValue = jcValue;
|
||||
this.jcUnit = jcUnit;
|
||||
this.relCode = relCode;
|
||||
this.isWarn = isWarn;
|
||||
this.jcTime = formattedDate;
|
||||
this.mergerId = mergerId;
|
||||
}
|
||||
|
||||
public DevAttributeVo(String devId,String devName,String devType, String jcName, String jcValue, String isWarn, String jcTime) {
|
||||
this.devId = devId;
|
||||
this.devName = devName;
|
||||
this.devType = devType;
|
||||
this.jcName = jcName;
|
||||
this.jcValue = jcValue;
|
||||
this.isWarn = isWarn;
|
||||
this.jcTime = jcTime;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
package com.bonus.base.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 设备基础信息
|
||||
* @author 黑子
|
||||
*/
|
||||
@Data
|
||||
public class DevInfoVo implements Serializable {
|
||||
/**
|
||||
* 边带id
|
||||
*/
|
||||
private String bdId;
|
||||
/**
|
||||
* 级联编码
|
||||
*/
|
||||
private String relType;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
private String deviceCode;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String deviceName;
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
private String deviceType;
|
||||
|
||||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
private String deviceProjectName;
|
||||
|
||||
/**
|
||||
* 设备工程编码
|
||||
*/
|
||||
private String deviceProjectCode;
|
||||
|
||||
/**
|
||||
* 设备负责人
|
||||
*/
|
||||
private String deviceFuzeren;
|
||||
|
||||
/**
|
||||
* 设备绑定状态1 绑定0 未绑定
|
||||
*/
|
||||
private String bangdingState;
|
||||
/**
|
||||
* 设备在线状态1:在线,0:离线
|
||||
*/
|
||||
private String deviceOnlineState;
|
||||
/**
|
||||
* 设备故障状态1:故障,0:正常
|
||||
*/
|
||||
private String deviceFailureState;
|
||||
/**
|
||||
* 设备告警状态1:告警,0:正常
|
||||
*/
|
||||
private String deviceAlarmState;
|
||||
/**
|
||||
* 设备出场日期
|
||||
*/
|
||||
private String deviceManuDate;
|
||||
/**
|
||||
* 设备厂商
|
||||
*/
|
||||
private String deviceFactory;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private String updateTime;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.bonus.base.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 设备实体类
|
||||
* @author 黑子
|
||||
*/
|
||||
@Data
|
||||
public class DeviceVo {
|
||||
|
||||
private String devId;
|
||||
|
||||
private String devName;
|
||||
|
||||
private String devType;
|
||||
|
||||
private String proName;
|
||||
|
||||
private String proCode;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package com.bonus.base.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 拉力传感器
|
||||
* @author 黑子
|
||||
*/
|
||||
@Data
|
||||
public class LlgcqDataVo {
|
||||
|
||||
private String id;
|
||||
/**
|
||||
* 电量
|
||||
*/
|
||||
private String capacity;
|
||||
/**
|
||||
* 告警阈值
|
||||
*/
|
||||
private String alarmThreshold;
|
||||
/**
|
||||
* 拉力
|
||||
*/
|
||||
private String tractionData;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 端设备出厂标识
|
||||
*/
|
||||
private String nodeId;
|
||||
/**
|
||||
* 平台注册端设备主键
|
||||
*/
|
||||
private String deviceId;
|
||||
/**
|
||||
* 设备模型
|
||||
*/
|
||||
private String model;
|
||||
/**
|
||||
* 服务 ID
|
||||
*/
|
||||
private String serviceId;
|
||||
/**
|
||||
* 数据监测时间
|
||||
*/
|
||||
private String dataTime;
|
||||
|
||||
private String remark;
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
package com.bonus.base.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author : 阮世耀
|
||||
* @version : 1.0
|
||||
* @PackagePath: com.bonus.data.entity
|
||||
* @CreateTime: 2024-09-23 17:41
|
||||
* @Description: 安全帽监测数据
|
||||
*/
|
||||
@Data
|
||||
public class SafetyHatVo {
|
||||
|
||||
private String id;
|
||||
|
||||
// 设备编码
|
||||
private String deviceCode;
|
||||
|
||||
// 经度
|
||||
private String lon;
|
||||
|
||||
// 纬度
|
||||
private String lat;
|
||||
|
||||
/**
|
||||
* 海拔高度
|
||||
*/
|
||||
private String altitude;
|
||||
|
||||
|
||||
/**
|
||||
* 端设备出厂标识
|
||||
*/
|
||||
private String nodeId;
|
||||
/**
|
||||
* 平台注册端设备主键
|
||||
*/
|
||||
private String deviceId;
|
||||
/**
|
||||
* 设备模型
|
||||
*/
|
||||
private String model;
|
||||
/**
|
||||
* 服务 ID
|
||||
*/
|
||||
private String serviceId;
|
||||
/**
|
||||
* 数据监测时间
|
||||
*/
|
||||
private String dataTime;
|
||||
|
||||
private String remark;
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
package com.bonus.base.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author 黑子
|
||||
* 室外环境 数据
|
||||
*/
|
||||
@Data
|
||||
public class SwhjDataVo {
|
||||
|
||||
private String id;
|
||||
/**
|
||||
* 0.5µm 粒子数个单位:个/m³
|
||||
*/
|
||||
private String grain05;
|
||||
/**
|
||||
* 1.0µm 粒子数单位:个/m³
|
||||
*/
|
||||
private String grain10;
|
||||
/**
|
||||
* 5.0µm 粒子数单位:个/m³
|
||||
*/
|
||||
private String grain50;
|
||||
/**
|
||||
* PM25 单位:μg/m3
|
||||
*/
|
||||
private String pm25;
|
||||
/**
|
||||
* PM10 单位:μg/m3
|
||||
*/
|
||||
private String pm10;
|
||||
/**
|
||||
* 风向
|
||||
*/
|
||||
private String windDirection;
|
||||
/**
|
||||
* 风速 单位:m/s
|
||||
*/
|
||||
private String windForce;
|
||||
/**
|
||||
* 温度
|
||||
*/
|
||||
private String airTemperature;
|
||||
/**
|
||||
* 湿度 单位:%rh
|
||||
*/
|
||||
private String humidity;
|
||||
/**
|
||||
* 微正压 单位:Pa
|
||||
*/
|
||||
private String positivePressure;
|
||||
/**
|
||||
* 端设备出厂标识
|
||||
*/
|
||||
private String nodeId;
|
||||
/**
|
||||
* 平台注册端设备主键
|
||||
*/
|
||||
private String deviceId;
|
||||
/**
|
||||
* 设备模型
|
||||
*/
|
||||
private String model;
|
||||
/**
|
||||
* 服务 ID
|
||||
*/
|
||||
private String serviceId;
|
||||
/**
|
||||
* 噪声
|
||||
*/
|
||||
private String noise;
|
||||
/**
|
||||
* 数据监测时间
|
||||
*/
|
||||
private String dataTime;
|
||||
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
package com.bonus.base.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*系统 预警配置数据
|
||||
* @author 黑子
|
||||
*/
|
||||
@Data
|
||||
public class WarnConfigVo implements Serializable {
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 类型(来源码表-设备类型)
|
||||
*/
|
||||
private Integer configuType;
|
||||
|
||||
/**
|
||||
* 类型(来源码表-设备类型)
|
||||
*/
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 配置名称
|
||||
*/
|
||||
private String configName;
|
||||
|
||||
/**
|
||||
* 阈值1-max
|
||||
*/
|
||||
private BigDecimal configVal1Max;
|
||||
|
||||
/**
|
||||
* 阈值1-min
|
||||
*/
|
||||
private BigDecimal configVal1Min;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String configVal1Str;
|
||||
|
||||
/**
|
||||
* 阈值2-max
|
||||
*/
|
||||
private BigDecimal configVal2Max;
|
||||
|
||||
/**
|
||||
* 阈值2-min
|
||||
*/
|
||||
private BigDecimal configVal2Min;
|
||||
|
||||
private String configVal2Str;
|
||||
|
||||
|
||||
private BigDecimal configVal3Max;
|
||||
|
||||
|
||||
private BigDecimal configVal3Min;
|
||||
|
||||
|
||||
private String configVal3Str;
|
||||
|
||||
private BigDecimal configVal4Max;
|
||||
|
||||
|
||||
private BigDecimal configVal4Min;
|
||||
|
||||
|
||||
private String configVal4Str;
|
||||
|
||||
|
||||
private BigDecimal configVal5Max;
|
||||
|
||||
|
||||
private BigDecimal configVal5Min;
|
||||
|
||||
|
||||
private String configVal5Str;
|
||||
|
||||
|
||||
private BigDecimal configVal6Max;
|
||||
|
||||
|
||||
private BigDecimal configVal6Min;
|
||||
|
||||
|
||||
private String configVal6Str;
|
||||
|
||||
|
||||
private Integer delFlag;
|
||||
|
||||
|
||||
private Date createTime;
|
||||
|
||||
|
||||
private Integer createUser;
|
||||
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
private Integer updateUser;
|
||||
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package com.bonus.base.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 系统设备告警表
|
||||
* @author 黑子
|
||||
*/
|
||||
@Data
|
||||
public class WarnVo {
|
||||
|
||||
private String id;
|
||||
|
||||
private String warnTime;
|
||||
|
||||
private String warnContent;
|
||||
|
||||
private String warnType;
|
||||
|
||||
private String devId;
|
||||
|
||||
private String proId;
|
||||
|
||||
private String proCode;
|
||||
|
||||
private String remarks;
|
||||
|
||||
public WarnVo(String warnTime, String warnContent, String warnType, String devId, String proCode, String remarks) {
|
||||
this.warnTime = warnTime;
|
||||
this.warnContent = warnContent;
|
||||
this.warnType = warnType;
|
||||
this.devId = devId;
|
||||
this.proCode = proCode;
|
||||
this.remarks = remarks;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package com.bonus.base.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 天气预警实体类
|
||||
* @author 黑子
|
||||
*/
|
||||
@Data
|
||||
public class WatherVo {
|
||||
|
||||
private String city;
|
||||
|
||||
private String createTime;
|
||||
|
||||
|
||||
private String content;
|
||||
|
||||
|
||||
private String type;
|
||||
|
||||
|
||||
private String level;
|
||||
|
||||
|
||||
private String province;
|
||||
|
||||
private String day;
|
||||
|
||||
public WatherVo(String city, String createTime, String content, String type, String level, String province, String day) {
|
||||
this.city = city;
|
||||
this.createTime = createTime;
|
||||
this.content = content;
|
||||
this.type = type;
|
||||
this.level = level;
|
||||
this.province = province;
|
||||
this.day = day;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package com.bonus.base.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 有限空间 实体类
|
||||
* @author 黑子
|
||||
*/
|
||||
@Data
|
||||
public class YxkjDataVo {
|
||||
/**
|
||||
* 含氧量
|
||||
*/
|
||||
private String oxygen;
|
||||
/**
|
||||
* 一氧化碳
|
||||
*/
|
||||
private String carbonMonoxide;
|
||||
/**
|
||||
* 可燃气体
|
||||
*/
|
||||
private String combustible;
|
||||
/**
|
||||
* 硫化氢
|
||||
*/
|
||||
private String hydrothion;
|
||||
|
||||
/**
|
||||
* 硫化氢
|
||||
*/
|
||||
private String nodeId;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
private String deviceId;
|
||||
|
||||
/**
|
||||
* 模块
|
||||
*/
|
||||
private String model;
|
||||
|
||||
/**
|
||||
* 服务id
|
||||
*/
|
||||
private String serviceId;
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
private String dataTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
package com.bonus.base.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 智能手环实体类
|
||||
* @author 黑子
|
||||
*/
|
||||
@Data
|
||||
public class ZnshDataVo {
|
||||
|
||||
private String id;
|
||||
/**
|
||||
* 相对坐标-x
|
||||
*
|
||||
*/
|
||||
private String posX;
|
||||
/**
|
||||
* 相对坐标-y
|
||||
*
|
||||
*/
|
||||
private String posY;
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
private String latitude;
|
||||
/**
|
||||
* 维度
|
||||
*/
|
||||
private String longitude;
|
||||
/**
|
||||
* 心率值
|
||||
*/
|
||||
private String heartRateValue;
|
||||
/**
|
||||
* 血氧值
|
||||
*/
|
||||
private String bloodOxygenValue;
|
||||
/**
|
||||
* 血压值
|
||||
*/
|
||||
private String bloodPressureValue;
|
||||
/**
|
||||
* 体温值
|
||||
*/
|
||||
private String bodyTempValue;
|
||||
/**
|
||||
* pressure
|
||||
*/
|
||||
private String pressure;
|
||||
/**
|
||||
* 海拔
|
||||
*/
|
||||
private String altitude;
|
||||
/**
|
||||
*绑定人S
|
||||
*/
|
||||
private String idCard;
|
||||
/**
|
||||
* 人员名称
|
||||
*/
|
||||
private String personName;
|
||||
|
||||
/**
|
||||
* 端设备出厂标识
|
||||
*/
|
||||
private String nodeId;
|
||||
/**
|
||||
* 平台注册端设备主键
|
||||
*/
|
||||
private String deviceId;
|
||||
/**
|
||||
* 设备模型
|
||||
*/
|
||||
private String model;
|
||||
/**
|
||||
* 服务 ID
|
||||
*/
|
||||
private String serviceId;
|
||||
/**
|
||||
* 数据监测时间
|
||||
*/
|
||||
private String dataTime;
|
||||
|
||||
private String remark;
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package com.bonus.screen.mapper;
|
||||
|
||||
import com.bonus.base.domain.TbDevAttribute;
|
||||
import com.bonus.data.entity.DevAttributeVo;
|
||||
import com.bonus.base.entity.DevAttributeVo;
|
||||
import com.bonus.screen.vo.DeviceWarnRecordVo;
|
||||
import com.bonus.screen.vo.WarnPredictionRecordVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.bonus.screen.service.impl;
|
|||
|
||||
import com.alibaba.nacos.common.utils.CollectionUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.data.entity.DevAttributeVo;
|
||||
import com.bonus.base.entity.DevAttributeVo;
|
||||
import com.bonus.screen.mapper.TbDeviceDataRecord;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@
|
|||
where tddr.dev_id = #{devId}
|
||||
</select>
|
||||
|
||||
<select id="getDevAttributeRecordByDevId" resultType="com.bonus.data.entity.DevAttributeVo">
|
||||
<select id="getDevAttributeRecordByDevId" resultType="com.bonus.base.entity.DevAttributeVo">
|
||||
SELECT
|
||||
tddr.dev_id,tddr.dev_name,tddr.dev_type,tddr.attribute_name as jcName,tddr.attribute_val as jcValue,
|
||||
tddr.is_warn,tddr.create_time as jcTime
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
ORDER BY tddr.attribute_name, tddr.create_time DESC;
|
||||
</select>
|
||||
|
||||
<select id="getTowerDevAttributeRecordByDay" resultType="com.bonus.data.entity.DevAttributeVo">
|
||||
<select id="getTowerDevAttributeRecordByDay" resultType="com.bonus.base.entity.DevAttributeVo">
|
||||
SELECT
|
||||
tddr.dev_id as devId,tddr.dev_name as devName,tddr.dev_type as devType,tddr.attribute_name as jcName,tddr.attribute_val as jcValue,
|
||||
tddr.is_warn as isWarn,tddr.create_time as jcTime
|
||||
|
|
@ -96,7 +96,7 @@
|
|||
tddr.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="getTowerDevAttributeWarnRecord" resultType="com.bonus.data.entity.DevAttributeVo">
|
||||
<select id="getTowerDevAttributeWarnRecord" resultType="com.bonus.base.entity.DevAttributeVo">
|
||||
SELECT
|
||||
tddr.dev_id as devId,tddr.dev_name as devName,tddr.dev_type as devType,tddr.attribute_name as jcName,tddr.attribute_val as jcValue,
|
||||
tddr.is_warn as isWarn,tddr.create_time as jcTime
|
||||
|
|
@ -112,7 +112,7 @@
|
|||
limit 10
|
||||
</select>
|
||||
|
||||
<select id="getPitDevAttributeRecordByDeviceId" resultType="com.bonus.data.entity.DevAttributeVo">
|
||||
<select id="getPitDevAttributeRecordByDeviceId" resultType="com.bonus.base.entity.DevAttributeVo">
|
||||
SELECT
|
||||
tddr.dev_id as devId,tddr.dev_name as devName,tddr.dev_type as devType,tddr.attribute_name as jcName,tddr.attribute_val as jcValue,
|
||||
tddr.is_warn as isWarn,tddr.create_time as jcTime
|
||||
|
|
@ -129,7 +129,7 @@
|
|||
ORDER BY tddr.attribute_name, tddr.create_time DESC;
|
||||
</select>
|
||||
|
||||
<select id="getPitDevAttributeWarnRecord" resultType="com.bonus.data.entity.DevAttributeVo">
|
||||
<select id="getPitDevAttributeWarnRecord" resultType="com.bonus.base.entity.DevAttributeVo">
|
||||
SELECT
|
||||
tddr.dev_id as devId,tddr.dev_name as devName,tddr.dev_type as devType,tddr.attribute_name as jcName,tddr.attribute_val as jcValue,
|
||||
tddr.is_warn as isWarn,tddr.create_time as jcTime
|
||||
|
|
@ -145,7 +145,7 @@
|
|||
limit 10
|
||||
</select>
|
||||
|
||||
<select id="getPowerDevAttributeRecordByWarn" resultType="com.bonus.data.entity.DevAttributeVo">
|
||||
<select id="getPowerDevAttributeRecordByWarn" resultType="com.bonus.base.entity.DevAttributeVo">
|
||||
SELECT
|
||||
tddr.dev_id as devId,tddr.dev_name as devName,tddr.dev_type as devType,tddr.attribute_name as jcName,tddr.attribute_val as jcValue,
|
||||
tddr.is_warn as isWarn,tddr.create_time as jcTime
|
||||
|
|
@ -161,7 +161,7 @@
|
|||
limit 20
|
||||
</select>
|
||||
|
||||
<select id="getPitDevAttributeRecordByDay" resultType="com.bonus.data.entity.DevAttributeVo">
|
||||
<select id="getPitDevAttributeRecordByDay" resultType="com.bonus.base.entity.DevAttributeVo">
|
||||
SELECT
|
||||
tddr.dev_id,tddr.dev_name,tddr.dev_type,tddr.attribute_name as jcName,tddr.attribute_val as jcValue,
|
||||
tddr.is_warn,tddr.create_time as jcTime
|
||||
|
|
|
|||
|
|
@ -0,0 +1,130 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.bonus</groupId>
|
||||
<artifactId>bonus-modules</artifactId>
|
||||
<version>24.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>bonus-data</artifactId>
|
||||
|
||||
<description>
|
||||
bonus-modules-data服务
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos Config -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Sentinel -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot Actuator -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- JSON 解析器和生成器 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.fastjson2</groupId>
|
||||
<artifactId>fastjson2</artifactId>
|
||||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- Mysql Connector -->
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- bonus Common DataSource -->
|
||||
<dependency>
|
||||
<groupId>com.bonus</groupId>
|
||||
<artifactId>bonus-common-datasource</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.bonus</groupId>
|
||||
<artifactId>bonus-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- bonus Common DataScope -->
|
||||
<dependency>
|
||||
<groupId>com.bonus</groupId>
|
||||
<artifactId>bonus-common-datascope</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.bonus</groupId>
|
||||
<artifactId>bonus-common-swagger</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.bonus</groupId>
|
||||
<artifactId>bonus-common-log</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- bonus Common Log -->
|
||||
<dependency>
|
||||
<groupId>com.bonus</groupId>
|
||||
<artifactId>bonus-common-log</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- bonus Common Swagger -->
|
||||
<dependency>
|
||||
<groupId>com.bonus</groupId>
|
||||
<artifactId>bonus-common-swagger</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>30.0-jre</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.bonus</groupId>
|
||||
<artifactId>bonus-common-security</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.bonus;
|
||||
|
||||
import com.bonus.common.security.annotation.EnableCustomConfig;
|
||||
import com.bonus.common.security.annotation.EnableRyFeignClients;
|
||||
import com.bonus.common.swagger.annotation.EnableCustomSwagger2;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
|
||||
/**
|
||||
* base基础模块启动服务
|
||||
* @author ma_sh
|
||||
*/
|
||||
|
||||
@EnableCustomConfig
|
||||
@EnableCustomSwagger2
|
||||
@EnableRyFeignClients
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
|
||||
public class BonusDataApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(BonusDataApplication.class, args);
|
||||
System.out.println("(♥◠‿◠)ノ゙ bonus-data数据中心模块启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||
" .-------. ____ __ \n" +
|
||||
" | _ _ \\ \\ \\ / / \n" +
|
||||
" | ( ' ) | \\ _. / ' \n" +
|
||||
" |(_ o _) / _( )_ .' \n" +
|
||||
" | (_,_).' __ ___(_ o _)' \n" +
|
||||
" | |\\ \\ | || |(_,_)' \n" +
|
||||
" | | \\ `' /| `-' / \n" +
|
||||
" | | \\ / \\ / \n" +
|
||||
" ''-' `'-' `-..-' ");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
Spring Boot Version: ${spring-boot.version}
|
||||
Spring Application Name: ${spring.application.name}
|
||||
_ __ _ _
|
||||
(_) / _|(_)| |
|
||||
_ __ _ _ ___ _ _ _ ______ | |_ _ | | ___
|
||||
| '__|| | | | / _ \ | | | || ||______|| _|| || | / _ \
|
||||
| | | |_| || (_) || |_| || | | | | || || __/
|
||||
|_| \__,_| \___/ \__, ||_| |_| |_||_| \___|
|
||||
__/ |
|
||||
|___/
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 21995
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: bonus-data
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
cloud:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: Jjsp@nacos2023
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
namespace: bns-public
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
namespace: bns-public
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="logs/bonus-data" />
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>ERROR</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="com.bonus" level="debug" />
|
||||
<!-- Spring日志级别控制 -->
|
||||
<logger name="org.springframework" level="warn" />
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="file_info" />
|
||||
<appender-ref ref="file_error" />
|
||||
</root>
|
||||
</configuration>
|
||||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue