提交代码
parent
eca2a2ee33
commit
d32f40f420
|
|
@ -0,0 +1,14 @@
|
|||
package com.ruoyi.common.constant;
|
||||
|
||||
/**
|
||||
* 接口通讯信息
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class ApiConstants {
|
||||
|
||||
/**
|
||||
* IOT配电箱数据获取HOST&&萨达
|
||||
*/
|
||||
public static final String IOT_SD_HOST = "https://api.e.v1.i-sada.net";
|
||||
}
|
||||
|
|
@ -61,6 +61,14 @@ public class BaseController
|
|||
PageUtils.startPage();
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置请求分页数据
|
||||
*/
|
||||
protected void startPage(Integer pageNum, Integer pageSize)
|
||||
{
|
||||
PageUtils.startPage(pageNum,pageSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置请求排序数据
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -170,6 +170,28 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
|
|||
return (str == null ? "" : str.trim());
|
||||
}
|
||||
|
||||
/**
|
||||
* 参数忽略类型比较
|
||||
*
|
||||
* @param obj1 对象1
|
||||
* @param obj2 对象2
|
||||
* @return value 返回值
|
||||
*/
|
||||
public static boolean eqObj(Object obj1, Object obj2)
|
||||
{
|
||||
if(obj1==null && obj2==null){
|
||||
return true;
|
||||
}else{
|
||||
if(obj1==null){
|
||||
return false;
|
||||
}
|
||||
if(obj2==null){
|
||||
return false;
|
||||
}
|
||||
return obj1.toString().equals(obj2.toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 截取字符串
|
||||
*
|
||||
|
|
|
|||
|
|
@ -0,0 +1,266 @@
|
|||
package com.ruoyi.quartz.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 配电箱配置对象 dev_iot_config_point
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2025-04-04
|
||||
*/
|
||||
public class QuartzDevIotConfigPoint extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 配置主键 */
|
||||
@Excel(name = "配置主键")
|
||||
private Long cfgId;
|
||||
|
||||
/** 公司主键 */
|
||||
@Excel(name = "公司主键")
|
||||
private Long comId;
|
||||
|
||||
/** 项目主键 */
|
||||
@Excel(name = "项目主键")
|
||||
private Long projectId;
|
||||
|
||||
/** 设备序列号 */
|
||||
@Excel(name = "设备序列号")
|
||||
private String deviceSn;
|
||||
|
||||
/** 设备名称 */
|
||||
@Excel(name = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
/** 厂家名称 */
|
||||
@Excel(name = "厂家名称")
|
||||
private String factoryName;
|
||||
|
||||
/** 联系人 */
|
||||
@Excel(name = "联系人")
|
||||
private String contactPerson;
|
||||
|
||||
/** 联系人电话 */
|
||||
@Excel(name = "联系人电话")
|
||||
private String contactPersonPhone;
|
||||
|
||||
/** 配电箱等级 */
|
||||
@Excel(name = "配电箱等级")
|
||||
private String levels;
|
||||
|
||||
/** 漏电电流 */
|
||||
@Excel(name = "漏电电流")
|
||||
private String leakageCurrent;
|
||||
|
||||
/** 额定温度 */
|
||||
@Excel(name = "额定温度")
|
||||
private String ratedTemperature;
|
||||
|
||||
/** 短路电流 */
|
||||
@Excel(name = "短路电流")
|
||||
private String shortCircuitCurrent;
|
||||
|
||||
/** 额定电流 */
|
||||
@Excel(name = "额定电流")
|
||||
private String ratedCurrent;
|
||||
|
||||
/** 额定电压 */
|
||||
@Excel(name = "额定电压")
|
||||
private String ratedVoltage;
|
||||
|
||||
/** 在线状态 */
|
||||
@Excel(name = "在线状态")
|
||||
private String onlineStatus;
|
||||
|
||||
/** 数据状态 */
|
||||
@Excel(name = "数据状态")
|
||||
private String isDel;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCfgId(Long cfgId)
|
||||
{
|
||||
this.cfgId = cfgId;
|
||||
}
|
||||
|
||||
public Long getCfgId()
|
||||
{
|
||||
return cfgId;
|
||||
}
|
||||
public void setComId(Long comId)
|
||||
{
|
||||
this.comId = comId;
|
||||
}
|
||||
|
||||
public Long getComId()
|
||||
{
|
||||
return comId;
|
||||
}
|
||||
public void setProjectId(Long projectId)
|
||||
{
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public Long getProjectId()
|
||||
{
|
||||
return projectId;
|
||||
}
|
||||
public void setDeviceSn(String deviceSn)
|
||||
{
|
||||
this.deviceSn = deviceSn;
|
||||
}
|
||||
|
||||
public String getDeviceSn()
|
||||
{
|
||||
return deviceSn;
|
||||
}
|
||||
public void setDeviceName(String deviceName)
|
||||
{
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getDeviceName()
|
||||
{
|
||||
return deviceName;
|
||||
}
|
||||
public void setFactoryName(String factoryName)
|
||||
{
|
||||
this.factoryName = factoryName;
|
||||
}
|
||||
|
||||
public String getFactoryName()
|
||||
{
|
||||
return factoryName;
|
||||
}
|
||||
public void setContactPerson(String contactPerson)
|
||||
{
|
||||
this.contactPerson = contactPerson;
|
||||
}
|
||||
|
||||
public String getContactPerson()
|
||||
{
|
||||
return contactPerson;
|
||||
}
|
||||
public void setContactPersonPhone(String contactPersonPhone)
|
||||
{
|
||||
this.contactPersonPhone = contactPersonPhone;
|
||||
}
|
||||
|
||||
public String getContactPersonPhone()
|
||||
{
|
||||
return contactPersonPhone;
|
||||
}
|
||||
public void setLevels(String levels)
|
||||
{
|
||||
this.levels = levels;
|
||||
}
|
||||
|
||||
public String getLevels()
|
||||
{
|
||||
return levels;
|
||||
}
|
||||
public void setLeakageCurrent(String leakageCurrent)
|
||||
{
|
||||
this.leakageCurrent = leakageCurrent;
|
||||
}
|
||||
|
||||
public String getLeakageCurrent()
|
||||
{
|
||||
return leakageCurrent;
|
||||
}
|
||||
public void setRatedTemperature(String ratedTemperature)
|
||||
{
|
||||
this.ratedTemperature = ratedTemperature;
|
||||
}
|
||||
|
||||
public String getRatedTemperature()
|
||||
{
|
||||
return ratedTemperature;
|
||||
}
|
||||
public void setShortCircuitCurrent(String shortCircuitCurrent)
|
||||
{
|
||||
this.shortCircuitCurrent = shortCircuitCurrent;
|
||||
}
|
||||
|
||||
public String getShortCircuitCurrent()
|
||||
{
|
||||
return shortCircuitCurrent;
|
||||
}
|
||||
public void setRatedCurrent(String ratedCurrent)
|
||||
{
|
||||
this.ratedCurrent = ratedCurrent;
|
||||
}
|
||||
|
||||
public String getRatedCurrent()
|
||||
{
|
||||
return ratedCurrent;
|
||||
}
|
||||
public void setRatedVoltage(String ratedVoltage)
|
||||
{
|
||||
this.ratedVoltage = ratedVoltage;
|
||||
}
|
||||
|
||||
public String getRatedVoltage()
|
||||
{
|
||||
return ratedVoltage;
|
||||
}
|
||||
public void setOnlineStatus(String onlineStatus)
|
||||
{
|
||||
this.onlineStatus = onlineStatus;
|
||||
}
|
||||
|
||||
public String getOnlineStatus()
|
||||
{
|
||||
return onlineStatus;
|
||||
}
|
||||
public void setIsDel(String isDel)
|
||||
{
|
||||
this.isDel = isDel;
|
||||
}
|
||||
|
||||
public String getIsDel()
|
||||
{
|
||||
return isDel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("cfgId", getCfgId())
|
||||
.append("comId", getComId())
|
||||
.append("projectId", getProjectId())
|
||||
.append("deviceSn", getDeviceSn())
|
||||
.append("deviceName", getDeviceName())
|
||||
.append("factoryName", getFactoryName())
|
||||
.append("contactPerson", getContactPerson())
|
||||
.append("contactPersonPhone", getContactPersonPhone())
|
||||
.append("levels", getLevels())
|
||||
.append("leakageCurrent", getLeakageCurrent())
|
||||
.append("ratedTemperature", getRatedTemperature())
|
||||
.append("shortCircuitCurrent", getShortCircuitCurrent())
|
||||
.append("ratedCurrent", getRatedCurrent())
|
||||
.append("ratedVoltage", getRatedVoltage())
|
||||
.append("onlineStatus", getOnlineStatus())
|
||||
.append("isDel", getIsDel())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,486 @@
|
|||
package com.ruoyi.quartz.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 配电箱数据对象 dev_iot_datas
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2025-04-04
|
||||
*/
|
||||
public class QuartzDevIotDatas extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 配置主键 */
|
||||
@Excel(name = "配置主键")
|
||||
private Long cfgId;
|
||||
|
||||
/** 点位主键 */
|
||||
@Excel(name = "点位主键")
|
||||
private Long pointId;
|
||||
|
||||
/** 公司主键 */
|
||||
@Excel(name = "公司主键")
|
||||
private Long comId;
|
||||
|
||||
/** 项目主键 */
|
||||
@Excel(name = "项目主键")
|
||||
private Long projectId;
|
||||
|
||||
/** 设备序列号 */
|
||||
@Excel(name = "设备序列号")
|
||||
private String deviceSn;
|
||||
|
||||
/** 开关位_交流 */
|
||||
@Excel(name = "开关位_交流")
|
||||
private String switchesAc;
|
||||
|
||||
/** 开关位 */
|
||||
@Excel(name = "开关位")
|
||||
private String switchesSwitch;
|
||||
|
||||
/** 开关位状态 */
|
||||
@Excel(name = "开关位状态")
|
||||
private String switchesSwitches;
|
||||
|
||||
/** 开关位安装状态 */
|
||||
@Excel(name = "开关位安装状态")
|
||||
private String switchesSwitchstatus;
|
||||
|
||||
/** 温度检测数据 */
|
||||
@Excel(name = "温度检测数据")
|
||||
private String temperature;
|
||||
|
||||
/** 漏电检测数据 */
|
||||
@Excel(name = "漏电检测数据")
|
||||
private String leakage;
|
||||
|
||||
/** A相电压 */
|
||||
@Excel(name = "A相电压")
|
||||
private String voltageA;
|
||||
|
||||
/** B相电压 */
|
||||
@Excel(name = "B相电压")
|
||||
private String voltageB;
|
||||
|
||||
/** C相电压 */
|
||||
@Excel(name = "C相电压")
|
||||
private String voltageC;
|
||||
|
||||
/** A相与B相之间的电压 */
|
||||
@Excel(name = "A相与B相之间的电压")
|
||||
private String voltageAb;
|
||||
|
||||
/** B相与C相之间的电压 */
|
||||
@Excel(name = "B相与C相之间的电压")
|
||||
private String voltageBc;
|
||||
|
||||
/** C相与A相之间的电压 */
|
||||
@Excel(name = "C相与A相之间的电压")
|
||||
private String voltageCa;
|
||||
|
||||
/** A相电流 */
|
||||
@Excel(name = "A相电流")
|
||||
private String currentA;
|
||||
|
||||
/** B相电流 */
|
||||
@Excel(name = "B相电流")
|
||||
private String currentB;
|
||||
|
||||
/** C相电流 */
|
||||
@Excel(name = "C相电流")
|
||||
private String currentC;
|
||||
|
||||
/** A相功率 */
|
||||
@Excel(name = "A相功率")
|
||||
private String powerA;
|
||||
|
||||
/** B相功率 */
|
||||
@Excel(name = "B相功率")
|
||||
private String powerB;
|
||||
|
||||
/** C相功率 */
|
||||
@Excel(name = "C相功率")
|
||||
private String powerC;
|
||||
|
||||
/** A相累计能量 */
|
||||
@Excel(name = "A相累计能量")
|
||||
private String energyA;
|
||||
|
||||
/** B相累计能量 */
|
||||
@Excel(name = "B相累计能量")
|
||||
private String energyB;
|
||||
|
||||
/** C相累计能量 */
|
||||
@Excel(name = "C相累计能量")
|
||||
private String energyC;
|
||||
|
||||
/** A相功率因数 */
|
||||
@Excel(name = "A相功率因数")
|
||||
private String factorA;
|
||||
|
||||
/** B相功率因数 */
|
||||
@Excel(name = "B相功率因数")
|
||||
private String factorB;
|
||||
|
||||
/** C相功率因数 */
|
||||
@Excel(name = "C相功率因数")
|
||||
private String factorC;
|
||||
|
||||
/** A相频率 */
|
||||
@Excel(name = "A相频率")
|
||||
private String frequencyA;
|
||||
|
||||
/** B相频率 */
|
||||
@Excel(name = "B相频率")
|
||||
private String frequencyB;
|
||||
|
||||
/** C相频率 */
|
||||
@Excel(name = "C相频率")
|
||||
private String frequencyC;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCfgId(Long cfgId)
|
||||
{
|
||||
this.cfgId = cfgId;
|
||||
}
|
||||
|
||||
public Long getCfgId()
|
||||
{
|
||||
return cfgId;
|
||||
}
|
||||
public void setPointId(Long pointId)
|
||||
{
|
||||
this.pointId = pointId;
|
||||
}
|
||||
|
||||
public Long getPointId()
|
||||
{
|
||||
return pointId;
|
||||
}
|
||||
public void setComId(Long comId)
|
||||
{
|
||||
this.comId = comId;
|
||||
}
|
||||
|
||||
public Long getComId()
|
||||
{
|
||||
return comId;
|
||||
}
|
||||
public void setProjectId(Long projectId)
|
||||
{
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public Long getProjectId()
|
||||
{
|
||||
return projectId;
|
||||
}
|
||||
public void setDeviceSn(String deviceSn)
|
||||
{
|
||||
this.deviceSn = deviceSn;
|
||||
}
|
||||
|
||||
public String getDeviceSn()
|
||||
{
|
||||
return deviceSn;
|
||||
}
|
||||
public void setSwitchesAc(String switchesAc)
|
||||
{
|
||||
this.switchesAc = switchesAc;
|
||||
}
|
||||
|
||||
public String getSwitchesAc()
|
||||
{
|
||||
return switchesAc;
|
||||
}
|
||||
public void setSwitchesSwitch(String switchesSwitch)
|
||||
{
|
||||
this.switchesSwitch = switchesSwitch;
|
||||
}
|
||||
|
||||
public String getSwitchesSwitch()
|
||||
{
|
||||
return switchesSwitch;
|
||||
}
|
||||
public void setSwitchesSwitches(String switchesSwitches)
|
||||
{
|
||||
this.switchesSwitches = switchesSwitches;
|
||||
}
|
||||
|
||||
public String getSwitchesSwitches()
|
||||
{
|
||||
return switchesSwitches;
|
||||
}
|
||||
public void setSwitchesSwitchstatus(String switchesSwitchstatus)
|
||||
{
|
||||
this.switchesSwitchstatus = switchesSwitchstatus;
|
||||
}
|
||||
|
||||
public String getSwitchesSwitchstatus()
|
||||
{
|
||||
return switchesSwitchstatus;
|
||||
}
|
||||
public void setTemperature(String temperature)
|
||||
{
|
||||
this.temperature = temperature;
|
||||
}
|
||||
|
||||
public String getTemperature()
|
||||
{
|
||||
return temperature;
|
||||
}
|
||||
public void setLeakage(String leakage)
|
||||
{
|
||||
this.leakage = leakage;
|
||||
}
|
||||
|
||||
public String getLeakage()
|
||||
{
|
||||
return leakage;
|
||||
}
|
||||
public void setVoltageA(String voltageA)
|
||||
{
|
||||
this.voltageA = voltageA;
|
||||
}
|
||||
|
||||
public String getVoltageA()
|
||||
{
|
||||
return voltageA;
|
||||
}
|
||||
public void setVoltageB(String voltageB)
|
||||
{
|
||||
this.voltageB = voltageB;
|
||||
}
|
||||
|
||||
public String getVoltageB()
|
||||
{
|
||||
return voltageB;
|
||||
}
|
||||
public void setVoltageC(String voltageC)
|
||||
{
|
||||
this.voltageC = voltageC;
|
||||
}
|
||||
|
||||
public String getVoltageC()
|
||||
{
|
||||
return voltageC;
|
||||
}
|
||||
public void setVoltageAb(String voltageAb)
|
||||
{
|
||||
this.voltageAb = voltageAb;
|
||||
}
|
||||
|
||||
public String getVoltageAb()
|
||||
{
|
||||
return voltageAb;
|
||||
}
|
||||
public void setVoltageBc(String voltageBc)
|
||||
{
|
||||
this.voltageBc = voltageBc;
|
||||
}
|
||||
|
||||
public String getVoltageBc()
|
||||
{
|
||||
return voltageBc;
|
||||
}
|
||||
public void setVoltageCa(String voltageCa)
|
||||
{
|
||||
this.voltageCa = voltageCa;
|
||||
}
|
||||
|
||||
public String getVoltageCa()
|
||||
{
|
||||
return voltageCa;
|
||||
}
|
||||
public void setCurrentA(String currentA)
|
||||
{
|
||||
this.currentA = currentA;
|
||||
}
|
||||
|
||||
public String getCurrentA()
|
||||
{
|
||||
return currentA;
|
||||
}
|
||||
public void setCurrentB(String currentB)
|
||||
{
|
||||
this.currentB = currentB;
|
||||
}
|
||||
|
||||
public String getCurrentB()
|
||||
{
|
||||
return currentB;
|
||||
}
|
||||
public void setCurrentC(String currentC)
|
||||
{
|
||||
this.currentC = currentC;
|
||||
}
|
||||
|
||||
public String getCurrentC()
|
||||
{
|
||||
return currentC;
|
||||
}
|
||||
public void setPowerA(String powerA)
|
||||
{
|
||||
this.powerA = powerA;
|
||||
}
|
||||
|
||||
public String getPowerA()
|
||||
{
|
||||
return powerA;
|
||||
}
|
||||
public void setPowerB(String powerB)
|
||||
{
|
||||
this.powerB = powerB;
|
||||
}
|
||||
|
||||
public String getPowerB()
|
||||
{
|
||||
return powerB;
|
||||
}
|
||||
public void setPowerC(String powerC)
|
||||
{
|
||||
this.powerC = powerC;
|
||||
}
|
||||
|
||||
public String getPowerC()
|
||||
{
|
||||
return powerC;
|
||||
}
|
||||
public void setEnergyA(String energyA)
|
||||
{
|
||||
this.energyA = energyA;
|
||||
}
|
||||
|
||||
public String getEnergyA()
|
||||
{
|
||||
return energyA;
|
||||
}
|
||||
public void setEnergyB(String energyB)
|
||||
{
|
||||
this.energyB = energyB;
|
||||
}
|
||||
|
||||
public String getEnergyB()
|
||||
{
|
||||
return energyB;
|
||||
}
|
||||
public void setEnergyC(String energyC)
|
||||
{
|
||||
this.energyC = energyC;
|
||||
}
|
||||
|
||||
public String getEnergyC()
|
||||
{
|
||||
return energyC;
|
||||
}
|
||||
public void setFactorA(String factorA)
|
||||
{
|
||||
this.factorA = factorA;
|
||||
}
|
||||
|
||||
public String getFactorA()
|
||||
{
|
||||
return factorA;
|
||||
}
|
||||
public void setFactorB(String factorB)
|
||||
{
|
||||
this.factorB = factorB;
|
||||
}
|
||||
|
||||
public String getFactorB()
|
||||
{
|
||||
return factorB;
|
||||
}
|
||||
public void setFactorC(String factorC)
|
||||
{
|
||||
this.factorC = factorC;
|
||||
}
|
||||
|
||||
public String getFactorC()
|
||||
{
|
||||
return factorC;
|
||||
}
|
||||
public void setFrequencyA(String frequencyA)
|
||||
{
|
||||
this.frequencyA = frequencyA;
|
||||
}
|
||||
|
||||
public String getFrequencyA()
|
||||
{
|
||||
return frequencyA;
|
||||
}
|
||||
public void setFrequencyB(String frequencyB)
|
||||
{
|
||||
this.frequencyB = frequencyB;
|
||||
}
|
||||
|
||||
public String getFrequencyB()
|
||||
{
|
||||
return frequencyB;
|
||||
}
|
||||
public void setFrequencyC(String frequencyC)
|
||||
{
|
||||
this.frequencyC = frequencyC;
|
||||
}
|
||||
|
||||
public String getFrequencyC()
|
||||
{
|
||||
return frequencyC;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("cfgId", getCfgId())
|
||||
.append("pointId", getPointId())
|
||||
.append("comId", getComId())
|
||||
.append("projectId", getProjectId())
|
||||
.append("deviceSn", getDeviceSn())
|
||||
.append("switchesAc", getSwitchesAc())
|
||||
.append("switchesSwitch", getSwitchesSwitch())
|
||||
.append("switchesSwitches", getSwitchesSwitches())
|
||||
.append("switchesSwitchstatus", getSwitchesSwitchstatus())
|
||||
.append("temperature", getTemperature())
|
||||
.append("leakage", getLeakage())
|
||||
.append("voltageA", getVoltageA())
|
||||
.append("voltageB", getVoltageB())
|
||||
.append("voltageC", getVoltageC())
|
||||
.append("voltageAb", getVoltageAb())
|
||||
.append("voltageBc", getVoltageBc())
|
||||
.append("voltageCa", getVoltageCa())
|
||||
.append("currentA", getCurrentA())
|
||||
.append("currentB", getCurrentB())
|
||||
.append("currentC", getCurrentC())
|
||||
.append("powerA", getPowerA())
|
||||
.append("powerB", getPowerB())
|
||||
.append("powerC", getPowerC())
|
||||
.append("energyA", getEnergyA())
|
||||
.append("energyB", getEnergyB())
|
||||
.append("energyC", getEnergyC())
|
||||
.append("factorA", getFactorA())
|
||||
.append("factorB", getFactorB())
|
||||
.append("factorC", getFactorC())
|
||||
.append("frequencyA", getFrequencyA())
|
||||
.append("frequencyB", getFrequencyB())
|
||||
.append("frequencyC", getFrequencyC())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
package com.ruoyi.quartz.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 配电箱预警对象 dev_iot_warning
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2025-04-04
|
||||
*/
|
||||
public class QuartzDevIotWarning extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 配置主键 */
|
||||
@Excel(name = "配置主键")
|
||||
private Long cfgId;
|
||||
|
||||
/** 点位主键 */
|
||||
@Excel(name = "点位主键")
|
||||
private Long pointId;
|
||||
|
||||
/** 公司主键 */
|
||||
@Excel(name = "公司主键")
|
||||
private Long comId;
|
||||
|
||||
/** 项目主键 */
|
||||
@Excel(name = "项目主键")
|
||||
private Long projectId;
|
||||
|
||||
/** 设备序列号 */
|
||||
@Excel(name = "设备序列号")
|
||||
private String deviceSn;
|
||||
|
||||
/** 预警类型 */
|
||||
@Excel(name = "预警类型")
|
||||
private String warningType;
|
||||
|
||||
/** 预警内容 */
|
||||
@Excel(name = "预警内容")
|
||||
private String warningContent;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCfgId(Long cfgId)
|
||||
{
|
||||
this.cfgId = cfgId;
|
||||
}
|
||||
|
||||
public Long getCfgId()
|
||||
{
|
||||
return cfgId;
|
||||
}
|
||||
public void setPointId(Long pointId)
|
||||
{
|
||||
this.pointId = pointId;
|
||||
}
|
||||
|
||||
public Long getPointId()
|
||||
{
|
||||
return pointId;
|
||||
}
|
||||
public void setComId(Long comId)
|
||||
{
|
||||
this.comId = comId;
|
||||
}
|
||||
|
||||
public Long getComId()
|
||||
{
|
||||
return comId;
|
||||
}
|
||||
public void setProjectId(Long projectId)
|
||||
{
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public Long getProjectId()
|
||||
{
|
||||
return projectId;
|
||||
}
|
||||
public void setDeviceSn(String deviceSn)
|
||||
{
|
||||
this.deviceSn = deviceSn;
|
||||
}
|
||||
|
||||
public String getDeviceSn()
|
||||
{
|
||||
return deviceSn;
|
||||
}
|
||||
public void setWarningType(String warningType)
|
||||
{
|
||||
this.warningType = warningType;
|
||||
}
|
||||
|
||||
public String getWarningType()
|
||||
{
|
||||
return warningType;
|
||||
}
|
||||
public void setWarningContent(String warningContent)
|
||||
{
|
||||
this.warningContent = warningContent;
|
||||
}
|
||||
|
||||
public String getWarningContent()
|
||||
{
|
||||
return warningContent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("cfgId", getCfgId())
|
||||
.append("pointId", getPointId())
|
||||
.append("comId", getComId())
|
||||
.append("projectId", getProjectId())
|
||||
.append("deviceSn", getDeviceSn())
|
||||
.append("warningType", getWarningType())
|
||||
.append("warningContent", getWarningContent())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
package com.ruoyi.quartz.mapper;
|
||||
|
||||
import com.ruoyi.quartz.domain.QuartzDevIotConfigPoint;
|
||||
import com.ruoyi.quartz.domain.QuartzDevIotDatas;
|
||||
import com.ruoyi.quartz.domain.QuartzDevIotWarning;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 萨达配电箱数据
|
||||
*/
|
||||
public interface QuartzDevIotMapper {
|
||||
|
||||
/**
|
||||
* 获取配电箱配置信息
|
||||
*/
|
||||
public List<Map<String,Object>> selectDevIotConfigList();
|
||||
|
||||
/**
|
||||
* 查询配电箱配置列表
|
||||
*
|
||||
* @param devIotConfigPoint 配电箱配置
|
||||
* @return 配电箱配置集合
|
||||
*/
|
||||
public List<QuartzDevIotConfigPoint> selectDevIotConfigPointList(QuartzDevIotConfigPoint devIotConfigPoint);
|
||||
|
||||
/**
|
||||
* 新增配电箱配置
|
||||
*
|
||||
* @param devIotConfigPoint 配电箱配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDevIotConfigPoint(QuartzDevIotConfigPoint devIotConfigPoint);
|
||||
|
||||
/**
|
||||
* 修改配电箱配置
|
||||
*
|
||||
* @param devIotConfigPoint 配电箱配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDevIotConfigPoint(QuartzDevIotConfigPoint devIotConfigPoint);
|
||||
|
||||
/**
|
||||
* 新增配电箱数据
|
||||
*
|
||||
* @param devIotDatas 配电箱数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDevIotDatas(QuartzDevIotDatas devIotDatas);
|
||||
|
||||
/**
|
||||
* 新增配电箱预警
|
||||
*
|
||||
* @param devIotWarning 配电箱预警
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDevIotWarning(QuartzDevIotWarning devIotWarning);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package com.ruoyi.quartz.service;
|
||||
|
||||
import com.ruoyi.quartz.domain.QuartzDevIotConfigPoint;
|
||||
import com.ruoyi.quartz.domain.QuartzDevIotDatas;
|
||||
import com.ruoyi.quartz.domain.QuartzDevIotWarning;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 萨达配电箱数据
|
||||
*/
|
||||
public interface IQuartzDevIotService {
|
||||
|
||||
/**
|
||||
* 获取配电箱配置信息
|
||||
*/
|
||||
public List<Map<String,Object>> selectDevIotConfigList();
|
||||
|
||||
/**
|
||||
* 查询配电箱配置列表
|
||||
*
|
||||
* @param devIotConfigPoint 配电箱配置
|
||||
* @return 配电箱配置集合
|
||||
*/
|
||||
public List<QuartzDevIotConfigPoint> selectDevIotConfigPointList(QuartzDevIotConfigPoint devIotConfigPoint);
|
||||
|
||||
/**
|
||||
* 新增配电箱配置
|
||||
*
|
||||
* @param devIotConfigPoint 配电箱配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDevIotConfigPoint(QuartzDevIotConfigPoint devIotConfigPoint);
|
||||
|
||||
/**
|
||||
* 修改配电箱配置
|
||||
*
|
||||
* @param devIotConfigPoint 配电箱配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDevIotConfigPoint(QuartzDevIotConfigPoint devIotConfigPoint);
|
||||
|
||||
/**
|
||||
* 新增配电箱数据
|
||||
*
|
||||
* @param devIotDatas 配电箱数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDevIotDatas(QuartzDevIotDatas devIotDatas);
|
||||
|
||||
/**
|
||||
* 新增配电箱预警
|
||||
*
|
||||
* @param devIotWarning 配电箱预警
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDevIotWarning(QuartzDevIotWarning devIotWarning);
|
||||
}
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
package com.ruoyi.quartz.service.impl;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.quartz.domain.QuartzDevIotConfigPoint;
|
||||
import com.ruoyi.quartz.domain.QuartzDevIotDatas;
|
||||
import com.ruoyi.quartz.domain.QuartzDevIotWarning;
|
||||
import com.ruoyi.quartz.mapper.QuartzDevIotMapper;
|
||||
import com.ruoyi.quartz.service.IQuartzDevIotService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 萨达配电箱数据
|
||||
*/
|
||||
@Service
|
||||
public class QuartzDevIotServiceImpl implements IQuartzDevIotService {
|
||||
|
||||
@Autowired
|
||||
private QuartzDevIotMapper devIotMapper;
|
||||
|
||||
/**
|
||||
* 获取配电箱配置信息
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> selectDevIotConfigList() {
|
||||
return devIotMapper.selectDevIotConfigList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配电箱配置列表
|
||||
*
|
||||
* @param devIotConfigPoint 配电箱配置
|
||||
* @return 配电箱配置集合
|
||||
*/
|
||||
@Override
|
||||
public List<QuartzDevIotConfigPoint> selectDevIotConfigPointList(QuartzDevIotConfigPoint devIotConfigPoint){
|
||||
return devIotMapper.selectDevIotConfigPointList(devIotConfigPoint);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增配电箱配置
|
||||
*
|
||||
* @param devIotConfigPoint 配电箱配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDevIotConfigPoint(QuartzDevIotConfigPoint devIotConfigPoint)
|
||||
{
|
||||
devIotConfigPoint.setCreateTime(DateUtils.getNowDate());
|
||||
return devIotMapper.insertDevIotConfigPoint(devIotConfigPoint);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改配电箱配置
|
||||
*
|
||||
* @param devIotConfigPoint 配电箱配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDevIotConfigPoint(QuartzDevIotConfigPoint devIotConfigPoint)
|
||||
{
|
||||
devIotConfigPoint.setUpdateTime(DateUtils.getNowDate());
|
||||
return devIotMapper.updateDevIotConfigPoint(devIotConfigPoint);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增配电箱数据
|
||||
*
|
||||
* @param devIotDatas 配电箱数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDevIotDatas(QuartzDevIotDatas devIotDatas)
|
||||
{
|
||||
devIotDatas.setCreateTime(DateUtils.getNowDate());
|
||||
return devIotMapper.insertDevIotDatas(devIotDatas);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增配电箱预警
|
||||
*
|
||||
* @param devIotWarning 配电箱预警
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDevIotWarning(QuartzDevIotWarning devIotWarning)
|
||||
{
|
||||
devIotWarning.setCreateTime(DateUtils.getNowDate());
|
||||
return devIotMapper.insertDevIotWarning(devIotWarning);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,265 @@
|
|||
package com.ruoyi.quartz.task;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.ruoyi.common.constant.ApiConstants;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.http.HttpUtils;
|
||||
import com.ruoyi.quartz.domain.QuartzDevIotConfigPoint;
|
||||
import com.ruoyi.quartz.domain.QuartzDevIotDatas;
|
||||
import com.ruoyi.quartz.domain.QuartzDevIotWarning;
|
||||
import com.ruoyi.quartz.service.IQuartzDevIotService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 萨达配电箱数据定时任务
|
||||
* @Title: SadaHzDataTask
|
||||
* @Package com.yanzhu.job.task
|
||||
* @Author: JiangYuQi
|
||||
* @CreateTime: 2024/10/26 17:05
|
||||
*/
|
||||
@Component("sadaHzDataTask")
|
||||
public class SadaHzDataTask {
|
||||
|
||||
@Autowired
|
||||
private IQuartzDevIotService devIotService;
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(SadaHzDataTask.class);
|
||||
|
||||
/**
|
||||
* 获取配电箱点位
|
||||
*/
|
||||
public void getIotConfigPoint() {
|
||||
List<Map<String,Object>> configs = devIotService.selectDevIotConfigList();
|
||||
if(configs.size()>0){
|
||||
for(Map<String,Object> configMap:configs){
|
||||
// 判断是萨达设备
|
||||
if(StringUtils.eqObj(configMap.get("factory_name"),"SD")){
|
||||
String signalName = Convert.toStr(configMap.get("signal_name"));
|
||||
String signalCode = Convert.toStr(configMap.get("signal_code"));
|
||||
String projectName = Convert.toStr(configMap.get("project_name"));
|
||||
String projectHashId = getSaDaProjectHashIds(signalName,signalCode,projectName);
|
||||
if(StringUtils.isNotEmpty(projectHashId)){
|
||||
// 根据项目主键,查询设备信息
|
||||
findSaDaBoxByProjectHashId(configMap,projectHashId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取配电箱数据/预警
|
||||
*/
|
||||
public void getIotPowerDatas() {
|
||||
QuartzDevIotConfigPoint pointQuery = new QuartzDevIotConfigPoint();
|
||||
pointQuery.setIsDel("0");
|
||||
List<QuartzDevIotConfigPoint> configPoints = devIotService.selectDevIotConfigPointList(pointQuery);
|
||||
if(configPoints.size()>0){
|
||||
for(QuartzDevIotConfigPoint configPoint:configPoints){
|
||||
// 判断是萨达设备
|
||||
if(StringUtils.eqObj(configPoint.getFactoryName(),"SD")){
|
||||
if(StringUtils.isNotEmpty(configPoint.getDeviceSn())){
|
||||
String resStr = HttpUtils.sendGet(ApiConstants.IOT_SD_HOST + "/metric/box/"+configPoint.getDeviceSn());
|
||||
JSONObject result = JSONObject.parseObject(resStr).getJSONObject("result");
|
||||
// 开关检测数据
|
||||
JSONObject switches = result.getJSONObject("switches");
|
||||
// 电能检测数据
|
||||
JSONObject metric = result.getJSONObject("metric");
|
||||
// 温度检测数据
|
||||
JSONArray temperatures = result.getJSONArray("temperatures");
|
||||
// 漏电检测数据
|
||||
JSONArray leakages = result.getJSONArray("leakages");
|
||||
// 智能报警数据
|
||||
JSONObject ticketStatus = result.getJSONObject("ticketStatus");
|
||||
QuartzDevIotDatas devIotDatas = new QuartzDevIotDatas();
|
||||
devIotDatas.setCfgId(configPoint.getCfgId());
|
||||
devIotDatas.setPointId(configPoint.getId());
|
||||
devIotDatas.setComId(configPoint.getComId());
|
||||
devIotDatas.setProjectId(configPoint.getProjectId());
|
||||
devIotDatas.setDeviceSn(configPoint.getDeviceSn());
|
||||
try {
|
||||
devIotDatas.setSwitchesAc(switches.getString("ac"));
|
||||
devIotDatas.setSwitchesSwitch(switches.getString("switch"));
|
||||
devIotDatas.setSwitchesSwitches(switches.getString("switches"));
|
||||
devIotDatas.setSwitchesSwitchstatus(switches.getString("switchStatus"));
|
||||
devIotDatas.setTemperature(temperatures.getJSONObject(0).getString("temperature"));
|
||||
double leakageValue = 0.00;
|
||||
for (int i = 0; i < leakages.size(); i++) {
|
||||
JSONObject leakage = leakages.getJSONObject(i);
|
||||
if(Convert.toDouble(leakage.get("leakage"),0.00)>leakageValue){
|
||||
leakageValue = leakage.getDoubleValue("leakage");
|
||||
}
|
||||
}
|
||||
devIotDatas.setLeakage(Convert.toStr(leakageValue));
|
||||
devIotDatas.setVoltageA(metric.getString("voltage_a"));
|
||||
devIotDatas.setVoltageB(metric.getString("voltage_b"));
|
||||
devIotDatas.setVoltageC(metric.getString("voltage_c"));
|
||||
devIotDatas.setVoltageAb(metric.getString("voltage_ab"));
|
||||
devIotDatas.setVoltageBc(metric.getString("voltage_bc"));
|
||||
devIotDatas.setVoltageCa(metric.getString("voltage_ca"));
|
||||
devIotDatas.setCurrentA(metric.getString("current_a"));
|
||||
devIotDatas.setCurrentB(metric.getString("current_b"));
|
||||
devIotDatas.setCurrentC(metric.getString("current_c"));
|
||||
devIotDatas.setPowerA(metric.getString("power_a"));
|
||||
devIotDatas.setPowerB(metric.getString("power_b"));
|
||||
devIotDatas.setPowerC(metric.getString("power_c"));
|
||||
devIotDatas.setEnergyA(metric.getString("energy_a"));
|
||||
devIotDatas.setEnergyB(metric.getString("energy_b"));
|
||||
devIotDatas.setEnergyC(metric.getString("energy_c"));
|
||||
devIotDatas.setFactorA(metric.getString("factor_a"));
|
||||
devIotDatas.setFactorB(metric.getString("factor_b"));
|
||||
devIotDatas.setFactorC(metric.getString("factor_c"));
|
||||
devIotDatas.setFrequencyA(metric.getString("frequency_a"));
|
||||
devIotDatas.setFrequencyB(metric.getString("frequency_b"));
|
||||
devIotDatas.setFrequencyC(metric.getString("frequency_c"));
|
||||
devIotService.insertDevIotDatas(devIotDatas);
|
||||
|
||||
// 智能预警数据
|
||||
QuartzDevIotWarning devIotWarning = new QuartzDevIotWarning();
|
||||
devIotWarning.setCfgId(configPoint.getCfgId());
|
||||
devIotWarning.setPointId(configPoint.getId());
|
||||
devIotWarning.setComId(configPoint.getComId());
|
||||
devIotWarning.setProjectId(configPoint.getProjectId());
|
||||
devIotWarning.setDeviceSn(devIotDatas.getDeviceSn());
|
||||
if(ticketStatus.getInteger("is_blackout")>0){
|
||||
devIotWarning.setWarningType("断电预警");
|
||||
devIotWarning.setWarningContent("设备触发断电,请排查异常情况");
|
||||
devIotService.insertDevIotWarning(devIotWarning);
|
||||
}
|
||||
if(ticketStatus.getInteger("is_smoke")>0){
|
||||
devIotWarning.setWarningType("烟感报警");
|
||||
devIotWarning.setWarningContent("设备烟感报警,请排查异常情况");
|
||||
devIotService.insertDevIotWarning(devIotWarning);
|
||||
}
|
||||
if(ticketStatus.getInteger("is_overload")>0){
|
||||
devIotWarning.setWarningType("过载报警");
|
||||
devIotWarning.setWarningContent("设备过载报警,请排查异常情况");
|
||||
devIotService.insertDevIotWarning(devIotWarning);
|
||||
}
|
||||
if(ticketStatus.getInteger("is_disconnect")>0){
|
||||
devIotWarning.setWarningType("断开报警");
|
||||
devIotWarning.setWarningContent("设备断开报警,请排查异常情况");
|
||||
devIotService.insertDevIotWarning(devIotWarning);
|
||||
}
|
||||
if(ticketStatus.getInteger("is_overheat")>0){
|
||||
devIotWarning.setWarningType("高温报警");
|
||||
devIotWarning.setWarningContent("设备高温报警,请排查异常情况");
|
||||
devIotService.insertDevIotWarning(devIotWarning);
|
||||
}
|
||||
if(ticketStatus.getInteger("is_leakage")>0){
|
||||
devIotWarning.setWarningType("漏电报警");
|
||||
devIotWarning.setWarningContent("设备漏电报警,请排查异常情况");
|
||||
devIotService.insertDevIotWarning(devIotWarning);
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目配置HashIds
|
||||
* @param signalName 通信账号
|
||||
* @param signalCode 通信密码
|
||||
* @param proName 项目名称
|
||||
* @return
|
||||
*/
|
||||
private static String getSaDaProjectHashIds(String signalName, String signalCode, String proName){
|
||||
try {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("username",signalName);
|
||||
params.put("password",signalCode);
|
||||
String resStr = HttpUtils.sendPost(ApiConstants.IOT_SD_HOST+"/v2/api-token-auth", JSON.toJSONString(params));
|
||||
JSONObject result = JSONObject.parseObject(resStr).getJSONObject("result");
|
||||
JSONObject accountJson = result.getJSONObject("account");
|
||||
if(StringUtils.isNotEmpty(accountJson.getString("canViewProjects"))){
|
||||
JSONArray canProjects = accountJson.getJSONArray("canViewProjects");
|
||||
if(canProjects.size()>0){
|
||||
// 使用 forEach 和 Lambda 遍历
|
||||
for(Object item:canProjects){
|
||||
JSONObject obj = (JSONObject) item;
|
||||
if(StringUtils.eqObj(obj.getString("name"),proName)){
|
||||
return obj.getString("hashId");
|
||||
}
|
||||
}
|
||||
return accountJson.getJSONObject("currentProject").getString("hashId");
|
||||
}else{
|
||||
return accountJson.getJSONObject("currentProject").getString("hashId");
|
||||
}
|
||||
}else{
|
||||
return accountJson.getJSONObject("currentProject").getString("hashId");
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目设备
|
||||
* @param configMap 配置信息
|
||||
* @param proHashId 点位编号
|
||||
*/
|
||||
private void findSaDaBoxByProjectHashId(Map<String,Object> configMap, String proHashId){
|
||||
try {
|
||||
Long cfgId = Convert.toLong(configMap.get("id"));
|
||||
String resStr = HttpUtils.sendGet(ApiConstants.IOT_SD_HOST+"/box/project/"+proHashId);
|
||||
JSONArray result = JSONObject.parseObject(resStr).getJSONArray("result");
|
||||
if(result.size()>0){
|
||||
QuartzDevIotConfigPoint pointQuery = new QuartzDevIotConfigPoint();
|
||||
pointQuery.setCfgId(cfgId);
|
||||
List<QuartzDevIotConfigPoint> pointList = devIotService.selectDevIotConfigPointList(pointQuery);
|
||||
result.forEach(item -> {
|
||||
JSONObject obj = (JSONObject) item;
|
||||
List<QuartzDevIotConfigPoint> pointItems = pointList.stream().filter(point -> StringUtils.eqObj(point.getDeviceSn(),obj.getString("hashId"))).collect(Collectors.toList());
|
||||
if(pointItems.size()>0){
|
||||
QuartzDevIotConfigPoint devIotConfigPoint = pointItems.get(0);
|
||||
devIotConfigPoint.setDeviceName(obj.getString("name"));
|
||||
devIotConfigPoint.setFactoryName(Convert.toStr(configMap.get("factory_name")));
|
||||
devIotConfigPoint.setLevels(obj.getString("level"));
|
||||
devIotConfigPoint.setLeakageCurrent(obj.getString("leakageCurrent"));
|
||||
devIotConfigPoint.setRatedTemperature(obj.getString("ratedTemperature"));
|
||||
devIotConfigPoint.setShortCircuitCurrent(obj.getString("shortCircuitCurrent"));
|
||||
devIotConfigPoint.setRatedCurrent(obj.getString("ratedCurrent"));
|
||||
devIotConfigPoint.setRatedVoltage(obj.getString("ratedVoltage"));
|
||||
devIotConfigPoint.setOnlineStatus(obj.getJSONObject("device").getString("onlineStatus"));
|
||||
devIotService.updateDevIotConfigPoint(devIotConfigPoint);
|
||||
}else{
|
||||
QuartzDevIotConfigPoint devIotConfigPoint = new QuartzDevIotConfigPoint();
|
||||
devIotConfigPoint.setCfgId(cfgId);
|
||||
devIotConfigPoint.setComId(Convert.toLong(configMap.get("com_id")));
|
||||
devIotConfigPoint.setProjectId(Convert.toLong(configMap.get("project_id")));
|
||||
devIotConfigPoint.setDeviceSn(obj.getString("hashId"));
|
||||
devIotConfigPoint.setDeviceName(obj.getString("name"));
|
||||
devIotConfigPoint.setFactoryName(Convert.toStr(configMap.get("factory_name")));
|
||||
devIotConfigPoint.setLevels(obj.getString("level"));
|
||||
devIotConfigPoint.setLeakageCurrent(obj.getString("leakageCurrent"));
|
||||
devIotConfigPoint.setRatedTemperature(obj.getString("ratedTemperature"));
|
||||
devIotConfigPoint.setShortCircuitCurrent(obj.getString("shortCircuitCurrent"));
|
||||
devIotConfigPoint.setRatedCurrent(obj.getString("ratedCurrent"));
|
||||
devIotConfigPoint.setRatedVoltage(obj.getString("ratedVoltage"));
|
||||
devIotConfigPoint.setOnlineStatus(obj.getJSONObject("device").getString("onlineStatus"));
|
||||
devIotService.insertDevIotConfigPoint(devIotConfigPoint);
|
||||
}
|
||||
});
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,229 @@
|
|||
<?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.ruoyi.quartz.mapper.QuartzDevIotMapper">
|
||||
|
||||
<resultMap type="QuartzDevIotConfigPoint" id="DevIotConfigPointResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="cfgId" column="cfg_id" />
|
||||
<result property="comId" column="com_id" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="deviceSn" column="device_sn" />
|
||||
<result property="deviceName" column="device_name" />
|
||||
<result property="factoryName" column="factory_name" />
|
||||
<result property="contactPerson" column="contact_person" />
|
||||
<result property="contactPersonPhone" column="contact_person_phone" />
|
||||
<result property="levels" column="levels" />
|
||||
<result property="leakageCurrent" column="leakage_current" />
|
||||
<result property="ratedTemperature" column="rated_temperature" />
|
||||
<result property="shortCircuitCurrent" column="short_circuit_current" />
|
||||
<result property="ratedCurrent" column="rated_current" />
|
||||
<result property="ratedVoltage" column="rated_voltage" />
|
||||
<result property="onlineStatus" column="online_status" />
|
||||
<result property="isDel" column="is_del" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDevIotConfigPointVo">
|
||||
select id, cfg_id, com_id, project_id, device_sn, device_name, factory_name, contact_person, contact_person_phone, levels, leakage_current, rated_temperature, short_circuit_current, rated_current, rated_voltage, online_status, is_del, create_by, create_time, update_by, update_time, remark from dev_iot_config_point
|
||||
</sql>
|
||||
|
||||
<select id="selectDevIotConfigPointList" parameterType="QuartzDevIotConfigPoint" resultMap="DevIotConfigPointResult">
|
||||
<include refid="selectDevIotConfigPointVo"/>
|
||||
<where>
|
||||
<if test="cfgId != null "> and cfg_id = #{cfgId}</if>
|
||||
<if test="comId != null "> and com_id = #{comId}</if>
|
||||
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertDevIotConfigPoint" parameterType="QuartzDevIotConfigPoint" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into dev_iot_config_point
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgId != null">cfg_id,</if>
|
||||
<if test="comId != null">com_id,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="deviceSn != null">device_sn,</if>
|
||||
<if test="deviceName != null">device_name,</if>
|
||||
<if test="factoryName != null">factory_name,</if>
|
||||
<if test="contactPerson != null">contact_person,</if>
|
||||
<if test="contactPersonPhone != null">contact_person_phone,</if>
|
||||
<if test="levels != null">levels,</if>
|
||||
<if test="leakageCurrent != null">leakage_current,</if>
|
||||
<if test="ratedTemperature != null">rated_temperature,</if>
|
||||
<if test="shortCircuitCurrent != null">short_circuit_current,</if>
|
||||
<if test="ratedCurrent != null">rated_current,</if>
|
||||
<if test="ratedVoltage != null">rated_voltage,</if>
|
||||
<if test="onlineStatus != null">online_status,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgId != null">#{cfgId},</if>
|
||||
<if test="comId != null">#{comId},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="deviceSn != null">#{deviceSn},</if>
|
||||
<if test="deviceName != null">#{deviceName},</if>
|
||||
<if test="factoryName != null">#{factoryName},</if>
|
||||
<if test="contactPerson != null">#{contactPerson},</if>
|
||||
<if test="contactPersonPhone != null">#{contactPersonPhone},</if>
|
||||
<if test="levels != null">#{levels},</if>
|
||||
<if test="leakageCurrent != null">#{leakageCurrent},</if>
|
||||
<if test="ratedTemperature != null">#{ratedTemperature},</if>
|
||||
<if test="shortCircuitCurrent != null">#{shortCircuitCurrent},</if>
|
||||
<if test="ratedCurrent != null">#{ratedCurrent},</if>
|
||||
<if test="ratedVoltage != null">#{ratedVoltage},</if>
|
||||
<if test="onlineStatus != null">#{onlineStatus},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDevIotConfigPoint" parameterType="QuartzDevIotConfigPoint">
|
||||
update dev_iot_config_point
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="cfgId != null">cfg_id = #{cfgId},</if>
|
||||
<if test="comId != null">com_id = #{comId},</if>
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="deviceSn != null">device_sn = #{deviceSn},</if>
|
||||
<if test="deviceName != null">device_name = #{deviceName},</if>
|
||||
<if test="factoryName != null">factory_name = #{factoryName},</if>
|
||||
<if test="contactPerson != null">contact_person = #{contactPerson},</if>
|
||||
<if test="contactPersonPhone != null">contact_person_phone = #{contactPersonPhone},</if>
|
||||
<if test="levels != null">levels = #{levels},</if>
|
||||
<if test="leakageCurrent != null">leakage_current = #{leakageCurrent},</if>
|
||||
<if test="ratedTemperature != null">rated_temperature = #{ratedTemperature},</if>
|
||||
<if test="shortCircuitCurrent != null">short_circuit_current = #{shortCircuitCurrent},</if>
|
||||
<if test="ratedCurrent != null">rated_current = #{ratedCurrent},</if>
|
||||
<if test="ratedVoltage != null">rated_voltage = #{ratedVoltage},</if>
|
||||
<if test="onlineStatus != null">online_status = #{onlineStatus},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="selectDevIotConfigList" resultType="Map">
|
||||
select dic.id, dic.com_id, dic.project_id, pi.projectName as project_name, dic.signal_name, dic.signal_code, dic.factory_name
|
||||
from dev_iot_config dic
|
||||
left join sur_project pi on pi.id = dic.project_id
|
||||
where dic.is_del = '0'
|
||||
</select>
|
||||
|
||||
<insert id="insertDevIotDatas" parameterType="QuartzDevIotDatas" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into dev_iot_datas
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgId != null">cfg_id,</if>
|
||||
<if test="pointId != null">point_id,</if>
|
||||
<if test="comId != null">com_id,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="deviceSn != null">device_sn,</if>
|
||||
<if test="switchesAc != null">switches_ac,</if>
|
||||
<if test="switchesSwitch != null">switches_switch,</if>
|
||||
<if test="switchesSwitches != null">switches_switches,</if>
|
||||
<if test="switchesSwitchstatus != null">switches_switchStatus,</if>
|
||||
<if test="temperature != null">temperature,</if>
|
||||
<if test="leakage != null">leakage,</if>
|
||||
<if test="voltageA != null">voltage_a,</if>
|
||||
<if test="voltageB != null">voltage_b,</if>
|
||||
<if test="voltageC != null">voltage_c,</if>
|
||||
<if test="voltageAb != null">voltage_ab,</if>
|
||||
<if test="voltageBc != null">voltage_bc,</if>
|
||||
<if test="voltageCa != null">voltage_ca,</if>
|
||||
<if test="currentA != null">current_a,</if>
|
||||
<if test="currentB != null">current_b,</if>
|
||||
<if test="currentC != null">current_c,</if>
|
||||
<if test="powerA != null">power_a,</if>
|
||||
<if test="powerB != null">power_b,</if>
|
||||
<if test="powerC != null">power_c,</if>
|
||||
<if test="energyA != null">energy_a,</if>
|
||||
<if test="energyB != null">energy_b,</if>
|
||||
<if test="energyC != null">energy_c,</if>
|
||||
<if test="factorA != null">factor_a,</if>
|
||||
<if test="factorB != null">factor_b,</if>
|
||||
<if test="factorC != null">factor_c,</if>
|
||||
<if test="frequencyA != null">frequency_a,</if>
|
||||
<if test="frequencyB != null">frequency_b,</if>
|
||||
<if test="frequencyC != null">frequency_c,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgId != null">#{cfgId},</if>
|
||||
<if test="pointId != null">#{pointId},</if>
|
||||
<if test="comId != null">#{comId},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="deviceSn != null">#{deviceSn},</if>
|
||||
<if test="switchesAc != null">#{switchesAc},</if>
|
||||
<if test="switchesSwitch != null">#{switchesSwitch},</if>
|
||||
<if test="switchesSwitches != null">#{switchesSwitches},</if>
|
||||
<if test="switchesSwitchstatus != null">#{switchesSwitchstatus},</if>
|
||||
<if test="temperature != null">#{temperature},</if>
|
||||
<if test="leakage != null">#{leakage},</if>
|
||||
<if test="voltageA != null">#{voltageA},</if>
|
||||
<if test="voltageB != null">#{voltageB},</if>
|
||||
<if test="voltageC != null">#{voltageC},</if>
|
||||
<if test="voltageAb != null">#{voltageAb},</if>
|
||||
<if test="voltageBc != null">#{voltageBc},</if>
|
||||
<if test="voltageCa != null">#{voltageCa},</if>
|
||||
<if test="currentA != null">#{currentA},</if>
|
||||
<if test="currentB != null">#{currentB},</if>
|
||||
<if test="currentC != null">#{currentC},</if>
|
||||
<if test="powerA != null">#{powerA},</if>
|
||||
<if test="powerB != null">#{powerB},</if>
|
||||
<if test="powerC != null">#{powerC},</if>
|
||||
<if test="energyA != null">#{energyA},</if>
|
||||
<if test="energyB != null">#{energyB},</if>
|
||||
<if test="energyC != null">#{energyC},</if>
|
||||
<if test="factorA != null">#{factorA},</if>
|
||||
<if test="factorB != null">#{factorB},</if>
|
||||
<if test="factorC != null">#{factorC},</if>
|
||||
<if test="frequencyA != null">#{frequencyA},</if>
|
||||
<if test="frequencyB != null">#{frequencyB},</if>
|
||||
<if test="frequencyC != null">#{frequencyC},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertDevIotWarning" parameterType="QuartzDevIotWarning" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into dev_iot_warning
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgId != null">cfg_id,</if>
|
||||
<if test="pointId != null">point_id,</if>
|
||||
<if test="comId != null">com_id,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="deviceSn != null">device_sn,</if>
|
||||
<if test="warningType != null">warning_type,</if>
|
||||
<if test="warningContent != null">warning_content,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgId != null">#{cfgId},</if>
|
||||
<if test="pointId != null">#{pointId},</if>
|
||||
<if test="comId != null">#{comId},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="deviceSn != null">#{deviceSn},</if>
|
||||
<if test="warningType != null">#{warningType},</if>
|
||||
<if test="warningContent != null">#{warningContent},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 9.4 KiB |
|
|
@ -86,7 +86,6 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
goBigScreen(){
|
||||
//window.open("//szgc.jhncidg.com:808/jhbs/")
|
||||
window.open("/jhbs/")
|
||||
},
|
||||
toggleSideBar() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
package com.ruoyi.api;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
import com.ruoyi.common.annotation.RateLimiter;
|
||||
import com.ruoyi.common.constant.CacheConstants;
|
||||
|
|
@ -13,6 +11,9 @@ import com.ruoyi.common.enums.LimitType;
|
|||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.domain.TowerReqVo;
|
||||
import com.ruoyi.domain.vo.TyTowerRoundReqVO;
|
||||
import com.ruoyi.domain.vo.TyTowerRunReqVO;
|
||||
import com.ruoyi.domain.vo.TyTowerWarningReqVO;
|
||||
import com.ruoyi.emuns.TowerTypeEnums;
|
||||
import com.yanzhu.jh.device.domain.*;
|
||||
import com.yanzhu.jh.device.service.*;
|
||||
|
|
@ -25,7 +26,9 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
|
@ -58,9 +61,19 @@ public class TowerCraneApiController {
|
|||
@Autowired
|
||||
private IDevTowerDataCollideService devTowerDataCollideService;
|
||||
|
||||
@Autowired
|
||||
private IDevTowerDataWarningService devTowerDataWarningService;
|
||||
|
||||
@Autowired
|
||||
private IDevTowerProjectConfigService devTowerProjectConfigService;
|
||||
|
||||
private String YANZHU_DEVICE_TOWER = "device.tower_cfg:";
|
||||
|
||||
/**
|
||||
* 塔机限位数据
|
||||
*/
|
||||
private Map<String, DevTowerDataLimit> staticLimitMap = new HashMap<>();
|
||||
|
||||
/**
|
||||
* 塔吊监测++
|
||||
* 限流规则[60秒内最多请求10次,限流策略IP]
|
||||
|
|
@ -116,7 +129,7 @@ public class TowerCraneApiController {
|
|||
* 塔机上报实时数据
|
||||
* @param req
|
||||
*/
|
||||
private static void pushRunData(DevTowerProjectConfig config,TowerReqVo req){
|
||||
private void pushRunData(DevTowerProjectConfig config,TowerReqVo req){
|
||||
DevTowerDataRun devTowerDataRun = new DevTowerDataRun();
|
||||
Map<String, Object> dataContent = req.getContent().getDataContent();
|
||||
devTowerDataRun.setCfgId(config.getId());
|
||||
|
|
@ -142,26 +155,18 @@ public class TowerCraneApiController {
|
|||
devTowerDataRun.setRangeSensorState(Convert.toStr(dataContent.get("rangeSensorState")));
|
||||
devTowerDataRun.setHeightSensorState(Convert.toStr(dataContent.get("heightSensorState")));
|
||||
devTowerDataRun.setBrakingStatus(Convert.toStr(dataContent.get("brakingStatus")));
|
||||
if(dataContent.get("warnings")!=null){
|
||||
List<String> warnings = (List<String>)dataContent.get("warnings");
|
||||
if (dataContent.get("warnings") != null) {
|
||||
List<String> warnings = (List<String>) dataContent.get("warnings");
|
||||
devTowerDataRun.setWarnings(String.join(",", warnings));
|
||||
for(String warning:warnings){
|
||||
for (String warning : warnings) {
|
||||
pushWarningData(config, warning, devTowerDataRun);
|
||||
Integer alarm = Convert.toInt(warning);
|
||||
if(alarm>100 && alarm<120){
|
||||
if (alarm > 100 && alarm < 120) {
|
||||
devTowerDataRun.setIsAlarm(1L);
|
||||
}
|
||||
}
|
||||
}
|
||||
System.out.println(devTowerDataRun);
|
||||
//devTowerDataRunService.insertDevTowerDataRun(devTowerDataRun);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String str = "{\"type\":111,\"content\":{\"time\":1496263304,\"dataType\":113001,\"deviceKey\":\"jycw6\",\"dataContent\":{\"height\":\"4.1\",\"range\": \"21.9\",\"rotation\": \"171.0\",\"load\": \"0.0\",\"windSpeed\": \"0.0\",\"leanAngleX\":\"0.5\",\"leanAngley\":\"0.0\",\"loadPercent\":\"0\", \"mome ntPercent\":\"0\",\"windSpeedPercent\":\"0\",\"leanAnglePercent\": \"0\", \"warnings\": [\"0\"],\"rate\":\"2\",\"rotationSensorState\":\"1\",\"loadSensorState\": \"1\",\"windSpeedSensorState\": \"1\",\"leanAngleSensorState\":\"1\",\"rangeSensorState\":\"1\",\"heightSensorState\":\"1\",\"bra kingStatus\":\"0\"}}}";
|
||||
TowerReqVo req = JSON.parseObject(str,TowerReqVo.class);
|
||||
System.out.println(req);
|
||||
DevTowerProjectConfig config = new DevTowerProjectConfig();
|
||||
pushRunData(config,req);
|
||||
devTowerDataRunService.insertDevTowerDataRun(devTowerDataRun);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -200,15 +205,16 @@ public class TowerCraneApiController {
|
|||
devTowerDataRound.setEndLeanAngleX(Convert.toStr(dataContent.get("endLeanAngleX")));
|
||||
devTowerDataRound.setStartLeanAngleY(Convert.toStr(dataContent.get("startleanAngleY")));
|
||||
devTowerDataRound.setEndLeanAngleY(Convert.toStr(dataContent.get("endLeanAngleY")));
|
||||
if(dataContent.get("warning")!=null){
|
||||
List<String> warnings = (List<String>)dataContent.get("warning");
|
||||
if (dataContent.get("warning") != null) {
|
||||
List<String> warnings = (List<String>) dataContent.get("warning");
|
||||
devTowerDataRound.setWarnings(String.join(",", warnings));
|
||||
for(String warning:warnings){
|
||||
for (String warning : warnings) {
|
||||
pushWarningData(config, warning,null);
|
||||
Integer alarm = Convert.toInt(warning);
|
||||
if(alarm>6 && alarm<10){
|
||||
if (alarm > 6 && alarm < 10) {
|
||||
devTowerDataRound.setIsOverload(1L);
|
||||
}
|
||||
if(alarm>100 && alarm<120){
|
||||
if (alarm > 100 && alarm < 120) {
|
||||
devTowerDataRound.setIsAlarm(1L);
|
||||
}
|
||||
}
|
||||
|
|
@ -216,6 +222,35 @@ public class TowerCraneApiController {
|
|||
devTowerDataRoundService.insertDevTowerDataRound(devTowerDataRound);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存预警数据
|
||||
*
|
||||
* @param config
|
||||
* @param warning
|
||||
*/
|
||||
private void pushWarningData(DevTowerProjectConfig config, Object warning, DevTowerDataRun devTowerDataRun) {
|
||||
DevTowerDataWarning devTowerDataWarning = new DevTowerDataWarning();
|
||||
devTowerDataWarning.setCfgId(config.getId());
|
||||
devTowerDataWarning.setProjectId(config.getProjectId());
|
||||
devTowerDataWarning.setDeviceKey(config.getDeviceSn());
|
||||
devTowerDataWarning.setWarnType(Convert.toLong(warning));
|
||||
if(devTowerDataRun!=null){
|
||||
devTowerDataWarning.setHeight(devTowerDataRun.getHeight());
|
||||
devTowerDataWarning.setRange(devTowerDataRun.getRange());
|
||||
devTowerDataWarning.setRotation(devTowerDataRun.getRotation());
|
||||
devTowerDataWarning.setLoad(devTowerDataRun.getLoad());
|
||||
devTowerDataWarning.setWindSpeed(devTowerDataRun.getWindSpeed());
|
||||
devTowerDataWarning.setLeanAngleX(devTowerDataRun.getLeanAngleX());
|
||||
devTowerDataWarning.setLeanAngleY(devTowerDataRun.getLeanAngleY());
|
||||
devTowerDataWarning.setMomentPercent(devTowerDataRun.getMomentPercent());
|
||||
devTowerDataWarning.setRate(devTowerDataRun.getRate());
|
||||
}
|
||||
if(devTowerDataWarning.getWarnType()>100){
|
||||
devTowerDataWarning.setAlarmed(1L);
|
||||
}
|
||||
devTowerDataWarningService.insertDevTowerDataWarning(devTowerDataWarning);
|
||||
}
|
||||
|
||||
/**
|
||||
* 塔机上报碰撞信息
|
||||
* @param req
|
||||
|
|
@ -344,4 +379,320 @@ public class TowerCraneApiController {
|
|||
devTowerDataLocalService.insertDevTowerDataLocal(devTowerDataLocal);
|
||||
}
|
||||
|
||||
/**
|
||||
* 塔吊监测++
|
||||
* 限流规则[60秒内最多请求10次,限流策略IP]
|
||||
*
|
||||
* @param req 请求信息
|
||||
* @author JiangYuQi
|
||||
* @date 2024-01-13
|
||||
*/
|
||||
@ApiOperation(value = "山东探越-塔吊监测-实时数据")
|
||||
@RateLimiter(count = 10, limitType = LimitType.IP)
|
||||
@PostMapping("/v2_ty/run/push")
|
||||
public AjaxResult tyPushRunData(@RequestBody @Valid TyTowerRunReqVO req) {
|
||||
log.info("desApi.towerCrane.v2_ty.run.push...{}",req.getEid());
|
||||
DevTowerProjectConfig config = redisCache.getCacheObject(YANZHU_DEVICE_TOWER + req.getEid());
|
||||
if (config == null) {
|
||||
throw new ServiceException(HttpStatusEnum.ERROR.getInfo(), HttpStatusEnum.ERROR.getCode());
|
||||
}
|
||||
String deviceKey = req.getEid().toString();
|
||||
DevTowerDataLimit devTowerDataLimit = staticLimitMap.get(deviceKey);
|
||||
if(devTowerDataLimit==null){
|
||||
DevTowerDataLimit devTowerDataLimitQuery = new DevTowerDataLimit();
|
||||
devTowerDataLimitQuery.setDeviceKey(deviceKey);
|
||||
devTowerDataLimitQuery.setProjectId(config.getProjectId());
|
||||
List<DevTowerDataLimit> limitList = devTowerDataLimitService.selectDevTowerDataLimitList(devTowerDataLimitQuery);
|
||||
if(limitList.size()>0){
|
||||
devTowerDataLimit = limitList.get(0);
|
||||
staticLimitMap.put(deviceKey,devTowerDataLimit);
|
||||
}else{
|
||||
devTowerDataLimit = new DevTowerDataLimit();
|
||||
}
|
||||
}
|
||||
|
||||
DevTowerDataRun devTowerDataRun = new DevTowerDataRun();
|
||||
devTowerDataRun.setCfgId(config.getId());
|
||||
devTowerDataRun.setProjectId(config.getProjectId());
|
||||
devTowerDataRun.setDeviceKey(config.getDeviceSn());
|
||||
devTowerDataRun.setHeight(Convert.toStr(req.getHeight()));
|
||||
devTowerDataRun.setRange(Convert.toStr(req.getRange()));
|
||||
devTowerDataRun.setRotation(Convert.toStr(req.getRotation_angle()));
|
||||
devTowerDataRun.setLoad(String.format("%.2f", req.getLifting_weight()/1000));
|
||||
Double limitLoad = Convert.toDouble(devTowerDataLimit.getLoadAlarm(),50.0);
|
||||
devTowerDataRun.setLoadPercent(String.format("%.2f", (req.getLifting_weight()/10)/limitLoad));
|
||||
devTowerDataRun.setWindSpeed(Convert.toStr(req.getWind_speed()));
|
||||
devTowerDataRun.setLeanAngleX(Convert.toStr(req.getAnteversion_x()));
|
||||
devTowerDataRun.setLeanAngleY(Convert.toStr(req.getAnteversion_y()));
|
||||
devTowerDataRun.setMomentPercent(Convert.toStr(req.getForce_distance()));
|
||||
devTowerDataRun.setRate(Convert.toStr(req.getMagnification()));
|
||||
devTowerDataRunService.insertDevTowerDataRun(devTowerDataRun);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 塔吊监测++
|
||||
* 限流规则[60秒内最多请求10次,限流策略IP]
|
||||
*
|
||||
* @param req 请求信息
|
||||
* @author JiangYuQi
|
||||
* @date 2024-01-13
|
||||
*/
|
||||
@ApiOperation(value = "山东探越-塔吊监测-循环数据")
|
||||
@RateLimiter(count = 10, limitType = LimitType.IP)
|
||||
@PostMapping("/v2_ty/round/push")
|
||||
public AjaxResult tyPushRoundData(@RequestBody @Valid TyTowerRoundReqVO req) {
|
||||
log.info("desApi.towerCrane.v2_ty.round.push...{}",req.getEid());
|
||||
DevTowerProjectConfig config = redisCache.getCacheObject(YANZHU_DEVICE_TOWER + req.getEid());
|
||||
if (config == null) {
|
||||
throw new ServiceException(HttpStatusEnum.ERROR.getInfo(), HttpStatusEnum.ERROR.getCode());
|
||||
}
|
||||
DevTowerDataRound devTowerDataRound = new DevTowerDataRound();
|
||||
devTowerDataRound.setCfgId(config.getId());
|
||||
devTowerDataRound.setProjectId(config.getProjectId());
|
||||
devTowerDataRound.setDeviceKey(config.getDeviceSn());
|
||||
devTowerDataRound.setWorkStartTime(Convert.toStr(req.getStart_time()));
|
||||
devTowerDataRound.setWorkEndTime(Convert.toStr(req.getEnd_time()));
|
||||
devTowerDataRound.setMinHeight(Convert.toStr(req.getStart_height()));
|
||||
devTowerDataRound.setMaxHeight(Convert.toStr(req.getEnd_height()));
|
||||
devTowerDataRound.setMinRange(Convert.toStr(req.getStart_range()));
|
||||
devTowerDataRound.setMaxRange(Convert.toStr(req.getEnd_range()));
|
||||
devTowerDataRound.setStartHeight(Convert.toStr(req.getStart_height()));
|
||||
devTowerDataRound.setEndHeight(Convert.toStr(req.getEnd_height()));
|
||||
devTowerDataRound.setStartRange(Convert.toStr(req.getStart_range()));
|
||||
devTowerDataRound.setEndRange(Convert.toStr(req.getEnd_range()));
|
||||
devTowerDataRound.setStartRotation(Convert.toStr(req.getStart_rotation_angle()));
|
||||
devTowerDataRound.setEndRotation(Convert.toStr(req.getEnd_rotation_angle()));
|
||||
devTowerDataRound.setMaxLoad(String.format("%.2f", req.getWeight()/1000));
|
||||
devTowerDataRound.setMaxMomentPercent(Convert.toStr(req.getMoment_percent()));
|
||||
devTowerDataRoundService.insertDevTowerDataRound(devTowerDataRound);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 塔吊监测++
|
||||
* 限流规则[60秒内最多请求10次,限流策略IP]
|
||||
*
|
||||
* @param req 请求信息
|
||||
* @author JiangYuQi
|
||||
* @date 2024-01-13
|
||||
*/
|
||||
@ApiOperation(value = "山东探越-塔吊监测-预警数据")
|
||||
@RateLimiter(count = 10, limitType = LimitType.IP)
|
||||
@PostMapping("/v2_ty/warning/push")
|
||||
public AjaxResult tyPushWarningData(@RequestBody @Valid TyTowerWarningReqVO req) {
|
||||
log.info("desApi.towerCrane.v2_ty.warning.push...{}",req.getEid());
|
||||
DevTowerProjectConfig config = redisCache.getCacheObject(YANZHU_DEVICE_TOWER + req.getEid());
|
||||
if (config == null) {
|
||||
throw new ServiceException(HttpStatusEnum.ERROR.getInfo(), HttpStatusEnum.ERROR.getCode());
|
||||
}
|
||||
DevTowerDataWarning devTowerDataWarning = new DevTowerDataWarning();
|
||||
devTowerDataWarning.setCfgId(config.getId());
|
||||
devTowerDataWarning.setProjectId(config.getProjectId());
|
||||
devTowerDataWarning.setDeviceKey(config.getDeviceSn());
|
||||
String warningType = convertTyTowerWarningType(req.getType_id().toString());
|
||||
devTowerDataWarning.setWarnType(Convert.toLong(warningType));
|
||||
devTowerDataWarning.setWarnNote(req.getType());
|
||||
devTowerDataWarning.setHeight(Convert.toStr(req.getHeight()));
|
||||
devTowerDataWarning.setRange(Convert.toStr(req.getRange()));
|
||||
devTowerDataWarning.setRotation(Convert.toStr(req.getRotation()));
|
||||
devTowerDataWarning.setLoad(String.format("%.2f", req.getLifting_weight()/1000));
|
||||
devTowerDataWarning.setWindSpeed(Convert.toStr(req.getWind_speed()));
|
||||
devTowerDataWarning.setLeanAngleX(Convert.toStr(req.getAnteversion_x()));
|
||||
devTowerDataWarning.setLeanAngleY(Convert.toStr(req.getAnteversion_y()));
|
||||
devTowerDataWarning.setMomentPercent(Convert.toStr(req.getForce_distance()));
|
||||
devTowerDataWarning.setRate(Convert.toStr(req.getMagnification()));
|
||||
if(devTowerDataWarning.getWarnType()>100){
|
||||
devTowerDataWarning.setAlarmed(1L);
|
||||
}
|
||||
devTowerDataWarningService.insertDevTowerDataWarning(devTowerDataWarning);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换预警类型
|
||||
*
|
||||
* @param warningType
|
||||
* @return
|
||||
*/
|
||||
private String convertTyTowerWarningType(String warningType) {
|
||||
String warningTypeEs;
|
||||
switch (warningType) {
|
||||
case "1":
|
||||
warningTypeEs = "5";
|
||||
break;
|
||||
case "2":
|
||||
warningTypeEs = "6";
|
||||
break;
|
||||
case "3":
|
||||
case "43":
|
||||
warningTypeEs = "1";
|
||||
break;
|
||||
case "4":
|
||||
warningTypeEs = "2";
|
||||
break;
|
||||
case "5":
|
||||
warningTypeEs = "3";
|
||||
break;
|
||||
case "6":
|
||||
warningTypeEs = "4";
|
||||
break;
|
||||
case "7":
|
||||
warningTypeEs = "10";
|
||||
break;
|
||||
case "8":
|
||||
warningTypeEs = "13";
|
||||
break;
|
||||
case "9":
|
||||
case "30":
|
||||
case "36":
|
||||
case "48":
|
||||
warningTypeEs = "104";
|
||||
break;
|
||||
case "10":
|
||||
case "29":
|
||||
case "49":
|
||||
warningTypeEs = "105";
|
||||
break;
|
||||
case "11":
|
||||
case "12":
|
||||
warningTypeEs = "101";
|
||||
break;
|
||||
case "13":
|
||||
warningTypeEs = "102";
|
||||
break;
|
||||
case "14":
|
||||
warningTypeEs = "103";
|
||||
break;
|
||||
case "15":
|
||||
case "44":
|
||||
warningTypeEs = "107";
|
||||
break;
|
||||
case "16":
|
||||
warningTypeEs = "108";
|
||||
break;
|
||||
case "21":
|
||||
warningTypeEs = "88";
|
||||
break;
|
||||
case "27":
|
||||
case "33":
|
||||
warningTypeEs = "188";
|
||||
break;
|
||||
case "17":
|
||||
case "18":
|
||||
case "19":
|
||||
case "20":
|
||||
case "23":
|
||||
case "24":
|
||||
case "45":
|
||||
warningTypeEs = "15";
|
||||
break;
|
||||
case "25":
|
||||
warningTypeEs = "89";
|
||||
break;
|
||||
case "26":
|
||||
warningTypeEs = "90";
|
||||
break;
|
||||
case "31":
|
||||
case "37":
|
||||
warningTypeEs = "189";
|
||||
break;
|
||||
case "32":
|
||||
case "38":
|
||||
warningTypeEs = "190";
|
||||
break;
|
||||
case "40":
|
||||
case "50":
|
||||
warningTypeEs = "106";
|
||||
break;
|
||||
case "41":
|
||||
case "42":
|
||||
case "47":
|
||||
warningTypeEs = "109";
|
||||
break;
|
||||
case "46":
|
||||
warningTypeEs = "108";
|
||||
break;
|
||||
case "51":
|
||||
case "52":
|
||||
case "53":
|
||||
case "54":
|
||||
warningTypeEs = "14";
|
||||
break;
|
||||
default:
|
||||
warningTypeEs = warningType;
|
||||
break;
|
||||
}
|
||||
return warningTypeEs;
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换预警类型【Linux】
|
||||
*
|
||||
* @param warningType
|
||||
* @return
|
||||
*/
|
||||
private String convertTyTowerLinuxWarningType(String warningType) {
|
||||
String warningTypeEs;
|
||||
switch (warningType) {
|
||||
case "1":
|
||||
warningTypeEs = "1";
|
||||
break;
|
||||
case "2":
|
||||
warningTypeEs = "101";
|
||||
break;
|
||||
case "3":
|
||||
warningTypeEs = "4";
|
||||
break;
|
||||
case "4":
|
||||
warningTypeEs = "103";
|
||||
break;
|
||||
case "5":
|
||||
warningTypeEs = "3";
|
||||
break;
|
||||
case "6":
|
||||
warningTypeEs = "102";
|
||||
break;
|
||||
case "7":
|
||||
warningTypeEs = "7";
|
||||
break;
|
||||
case "8":
|
||||
warningTypeEs = "106";
|
||||
break;
|
||||
case "9":
|
||||
warningTypeEs = "10";
|
||||
break;
|
||||
case "10":
|
||||
warningTypeEs = "107";
|
||||
break;
|
||||
case "11":
|
||||
warningTypeEs = "13";
|
||||
break;
|
||||
case "12":
|
||||
warningTypeEs = "108";
|
||||
break;
|
||||
case "13":
|
||||
warningTypeEs = "5";
|
||||
break;
|
||||
case "14":
|
||||
warningTypeEs = "104";
|
||||
break;
|
||||
case "15":
|
||||
warningTypeEs = "6";
|
||||
break;
|
||||
case "16":
|
||||
warningTypeEs = "105";
|
||||
break;
|
||||
case "17":
|
||||
warningTypeEs = "14";
|
||||
break;
|
||||
case "18":
|
||||
warningTypeEs = "109";
|
||||
break;
|
||||
default:
|
||||
warningTypeEs = "0";
|
||||
break;
|
||||
}
|
||||
return warningTypeEs;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
package com.ruoyi.domain.vo;
|
||||
|
||||
import com.yanzhu.manage.domain.TowerContentReqVo;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 塔吊检测推送信息 请求参数
|
||||
*
|
||||
* @author: JiangYuQi
|
||||
* @date: 2024/01/13 12:21
|
||||
*/
|
||||
@Data
|
||||
public class TowerReqVo {
|
||||
|
||||
/**
|
||||
* 上报类型
|
||||
*/
|
||||
@NotNull(message = "上报类型不能为空")
|
||||
private int type;
|
||||
|
||||
/**
|
||||
* 上报内容
|
||||
*/
|
||||
@NotNull(message = "上报内容不能为空")
|
||||
private TowerContentReqVo content;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.ruoyi.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 山东探越塔机请求-循环数据【Linux】
|
||||
*/
|
||||
@Data
|
||||
public class TyTowerLinuxRoundReqVO {
|
||||
|
||||
/** 设备ID */
|
||||
@NotNull
|
||||
private Integer eid;
|
||||
/** 开始高度 */
|
||||
private Float start_height;
|
||||
/** 开始幅度 */
|
||||
private Float start_range;
|
||||
/** 开始回转角度 */
|
||||
private Float start_rotation_angle;
|
||||
/** 结束高度 */
|
||||
private Float end_height;
|
||||
/** 结束幅度 */
|
||||
private Float end_range;
|
||||
/** 结束回转角度 */
|
||||
private Float end_rotation_angle;
|
||||
/** 重量 */
|
||||
private Float weight;
|
||||
/** 力矩百分比 */
|
||||
private Float moment_percent;
|
||||
/** 开始时间 */
|
||||
private String start_time;
|
||||
/** 结束时间 */
|
||||
private String end_time;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package com.ruoyi.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 山东探越塔机请求-实时数据【Linux】
|
||||
*/
|
||||
@Data
|
||||
public class TyTowerLinuxRunReqVO {
|
||||
|
||||
/** 设备ID */
|
||||
@NotNull
|
||||
private Integer eid;
|
||||
/** 高度(米) */
|
||||
private Float height;
|
||||
/** 重量(kg) */
|
||||
private Float weight;
|
||||
/** 回转(°) */
|
||||
private Float round;
|
||||
/** 幅度(°) */
|
||||
private Float amplitude;
|
||||
/** 风速(米/秒) */
|
||||
private Float wind_speed;
|
||||
/** 力矩 */
|
||||
private Float moment;
|
||||
/** 力矩百分比(%) */
|
||||
private Float moment_percent;
|
||||
/** 倍率(正整数) */
|
||||
private Integer override;
|
||||
/** 倾角X(°) */
|
||||
private Float angle_x;
|
||||
/** 倾角Y(°) */
|
||||
private Float angle_y;
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package com.ruoyi.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 山东探越塔机请求-报警数据【Linux】
|
||||
*/
|
||||
@Data
|
||||
public class TyTowerLinuxWarningReqVO {
|
||||
|
||||
/** 设备ID */
|
||||
@NotNull
|
||||
private Integer eid;
|
||||
/** 高度 */
|
||||
private Float height;
|
||||
/** 重量 */
|
||||
private Float weight;
|
||||
/** 回转 */
|
||||
private Float round;
|
||||
/** 幅度 */
|
||||
private Float amplitude;
|
||||
/** 风速 */
|
||||
private Float wind_speed;
|
||||
/** 力矩 */
|
||||
private Float moment;
|
||||
/** 力矩百分比 */
|
||||
private Float moment_percent;
|
||||
/** 倍率 */
|
||||
private Integer override;
|
||||
/** 倾角X */
|
||||
private Float angle_x;
|
||||
/** 倾角Y */
|
||||
private Float angle_y;
|
||||
/** 报警type,报警内容由报警编号决定 */
|
||||
private Integer alarm_type;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.ruoyi.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 山东探越塔机请求-循环数据【Android】
|
||||
*/
|
||||
@Data
|
||||
public class TyTowerRoundReqVO {
|
||||
|
||||
/** 设备ID */
|
||||
@NotNull
|
||||
private Integer eid;
|
||||
/** 开始高度 */
|
||||
private Float start_height;
|
||||
/** 开始幅度 */
|
||||
private Float start_range;
|
||||
/** 开始回转角度 */
|
||||
private Float start_rotation_angle;
|
||||
/** 结束高度 */
|
||||
private Float end_height;
|
||||
/** 结束幅度 */
|
||||
private Float end_range;
|
||||
/** 结束回转角度 */
|
||||
private Float end_rotation_angle;
|
||||
/** 重量 */
|
||||
private Float weight;
|
||||
/** 力矩百分比 */
|
||||
private Float moment_percent;
|
||||
/** 开始时间 */
|
||||
private String start_time;
|
||||
/** 结束时间 */
|
||||
private String end_time;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package com.ruoyi.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 山东探越塔机请求-实时数据【Android】
|
||||
*/
|
||||
@Data
|
||||
public class TyTowerRunReqVO {
|
||||
|
||||
/** 设备ID */
|
||||
@NotNull
|
||||
private Integer eid;
|
||||
/** 高度 */
|
||||
private Float height;
|
||||
/** 幅度 */
|
||||
private Float range;
|
||||
/** 回转角度 */
|
||||
private Float rotation_angle;
|
||||
/** 吊重 */
|
||||
private Float lifting_weight;
|
||||
/** 力距 */
|
||||
private Float force;
|
||||
/** 力距百分比 */
|
||||
private Float force_distance;
|
||||
/** 风速 */
|
||||
private Float wind_speed;
|
||||
/** 倍率 */
|
||||
private String magnification;
|
||||
/** 倾角X */
|
||||
private Float anteversion_x;
|
||||
/** 倾角Y */
|
||||
private Float anteversion_y;
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package com.ruoyi.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 山东探越塔机请求-报警数据【Android】
|
||||
*/
|
||||
@Data
|
||||
public class TyTowerWarningReqVO {
|
||||
|
||||
/** 设备ID */
|
||||
@NotNull
|
||||
private Integer eid;
|
||||
/** 报警内容 */
|
||||
private String type;
|
||||
/** 报警编号 */
|
||||
private Integer type_id;
|
||||
/** 高度 */
|
||||
private Float height;
|
||||
/** 幅度 */
|
||||
private Float range;
|
||||
/** 回转角度 */
|
||||
private Float rotation;
|
||||
/** 吊重 */
|
||||
private Float lifting_weight;
|
||||
/** 力距 */
|
||||
private Float force;
|
||||
/** 力距百分比 */
|
||||
private Float force_distance;
|
||||
/** 风速 */
|
||||
private Float wind_speed;
|
||||
/** 倍率 */
|
||||
private String magnification;
|
||||
/** 倾角X */
|
||||
private Float anteversion_x;
|
||||
/** 倾角Y */
|
||||
private Float anteversion_y;
|
||||
}
|
||||
|
|
@ -0,0 +1,228 @@
|
|||
package com.yanzhu.jh.device.controller;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.constant.ApiConstants;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.enums.ShiFouEnum;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.http.HttpUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.yanzhu.jh.device.domain.DevIotConfig;
|
||||
import com.yanzhu.jh.device.domain.DevIotConfigPoint;
|
||||
import com.yanzhu.jh.device.service.IDevIotConfigPointService;
|
||||
import com.yanzhu.jh.device.service.IDevIotConfigService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 配电箱配置Controller
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2025-04-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/iotConfig")
|
||||
public class DevIotConfigController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDevIotConfigService devIotConfigService;
|
||||
|
||||
@Autowired
|
||||
private IDevIotConfigPointService devIotConfigPointService;
|
||||
|
||||
/**
|
||||
* 查询配电箱配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotConfig:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DevIotConfig devIotConfig)
|
||||
{
|
||||
startPage();
|
||||
List<DevIotConfig> list = devIotConfigService.selectDevIotConfigList(devIotConfig);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出配电箱配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotConfig:export')")
|
||||
@Log(title = "配电箱配置", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DevIotConfig devIotConfig)
|
||||
{
|
||||
List<DevIotConfig> list = devIotConfigService.selectDevIotConfigList(devIotConfig);
|
||||
ExcelUtil<DevIotConfig> util = new ExcelUtil<DevIotConfig>(DevIotConfig.class);
|
||||
util.exportExcel(response, list, "配电箱配置数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取配电箱配置详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotConfig:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(devIotConfigService.selectDevIotConfigById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增配电箱配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotConfig:add')")
|
||||
@Log(title = "配电箱配置", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DevIotConfig devIotConfig)
|
||||
{
|
||||
int res = devIotConfigService.insertDevIotConfig(devIotConfig);
|
||||
if(res>0){
|
||||
return success(devIotConfig);
|
||||
}else{
|
||||
return error();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改配电箱配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotConfig:edit')")
|
||||
@Log(title = "配电箱配置", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DevIotConfig devIotConfig)
|
||||
{
|
||||
return toAjax(devIotConfigService.updateDevIotConfig(devIotConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除配电箱配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotConfig:remove')")
|
||||
@Log(title = "配电箱配置", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(devIotConfigService.deleteDevIotConfigByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取配电箱配的点位信息
|
||||
* @return
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotConfig:query')")
|
||||
@GetMapping(value = "/findIotConfigPoint/{id}")
|
||||
public AjaxResult findIotConfigPoint(@PathVariable("id") Long id) {
|
||||
DevIotConfig devIotConfig = devIotConfigService.selectDevIotConfigById(id);
|
||||
String projectHashId = getSaDaProjectHashIds(devIotConfig.getSignalName(),devIotConfig.getSignalCode(), devIotConfig.getProjectName());
|
||||
if(StringUtils.isNotEmpty(projectHashId)){
|
||||
devIotConfig.setIsDel(ShiFouEnum.FOU.getCode());
|
||||
devIotConfigService.updateDevIotConfig(devIotConfig);
|
||||
// 根据项目主键,查询设备信息
|
||||
findSaDaBoxByProjectHashId(devIotConfig,projectHashId);
|
||||
return success();
|
||||
}else{
|
||||
return error();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目配置HashIds
|
||||
* @param signalName
|
||||
* @param signalCode
|
||||
* @param proName
|
||||
* @return
|
||||
*/
|
||||
private static String getSaDaProjectHashIds(String signalName, String signalCode, String proName){
|
||||
try {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("username",signalName);
|
||||
params.put("password",signalCode);
|
||||
String resStr = HttpUtils.sendPost(ApiConstants.IOT_SD_HOST+"/v2/api-token-auth", JSON.toJSONString(params));
|
||||
JSONObject result = JSONObject.parseObject(resStr).getJSONObject("result");
|
||||
JSONObject accountJson = result.getJSONObject("account");
|
||||
if(StringUtils.isNotEmpty(accountJson.getString("canViewProjects"))){
|
||||
JSONArray canProjects = accountJson.getJSONArray("canViewProjects");
|
||||
if(canProjects.size()>0){
|
||||
// 使用 forEach 和 Lambda 遍历
|
||||
for(Object item:canProjects){
|
||||
JSONObject obj = (JSONObject) item;
|
||||
if(StringUtils.eqObj(obj.getString("name"),proName)){
|
||||
return obj.getString("hashId");
|
||||
}
|
||||
}
|
||||
return accountJson.getJSONObject("currentProject").getString("hashId");
|
||||
}else{
|
||||
return accountJson.getJSONObject("currentProject").getString("hashId");
|
||||
}
|
||||
}else{
|
||||
return accountJson.getJSONObject("currentProject").getString("hashId");
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目设备
|
||||
* @param devIotConfig
|
||||
* @param proHashId
|
||||
*/
|
||||
private void findSaDaBoxByProjectHashId(DevIotConfig devIotConfig, String proHashId){
|
||||
try {
|
||||
String resStr = HttpUtils.sendGet(ApiConstants.IOT_SD_HOST+"/box/project/"+proHashId);
|
||||
JSONArray result = JSONObject.parseObject(resStr).getJSONArray("result");
|
||||
if(result.size()>0){
|
||||
DevIotConfigPoint pointQuery = new DevIotConfigPoint();
|
||||
pointQuery.setCfgId(devIotConfig.getId());
|
||||
List<DevIotConfigPoint> pointList = devIotConfigPointService.selectDevIotConfigPointList(pointQuery);
|
||||
result.forEach(item -> {
|
||||
JSONObject obj = (JSONObject) item;
|
||||
List<DevIotConfigPoint> pointItems = pointList.stream().filter(point -> StringUtils.eqObj(point.getDeviceSn(),obj.getString("hashId"))).collect(Collectors.toList());
|
||||
if(pointItems.size()>0){
|
||||
DevIotConfigPoint devIotConfigPoint = pointItems.get(0);
|
||||
devIotConfigPoint.setDeviceName(obj.getString("name"));
|
||||
devIotConfigPoint.setFactoryName(devIotConfig.getFactoryName());
|
||||
devIotConfigPoint.setLevels(obj.getString("level"));
|
||||
devIotConfigPoint.setLeakageCurrent(obj.getString("leakageCurrent"));
|
||||
devIotConfigPoint.setRatedTemperature(obj.getString("ratedTemperature"));
|
||||
devIotConfigPoint.setShortCircuitCurrent(obj.getString("shortCircuitCurrent"));
|
||||
devIotConfigPoint.setRatedCurrent(obj.getString("ratedCurrent"));
|
||||
devIotConfigPoint.setRatedVoltage(obj.getString("ratedVoltage"));
|
||||
devIotConfigPoint.setOnlineStatus(obj.getJSONObject("device").getString("onlineStatus"));
|
||||
devIotConfigPointService.updateDevIotConfigPoint(devIotConfigPoint);
|
||||
}else{
|
||||
DevIotConfigPoint devIotConfigPoint = new DevIotConfigPoint();
|
||||
devIotConfigPoint.setCfgId(devIotConfig.getId());
|
||||
devIotConfigPoint.setComId(devIotConfig.getComId());
|
||||
devIotConfigPoint.setProjectId(devIotConfig.getProjectId());
|
||||
devIotConfigPoint.setDeviceSn(obj.getString("hashId"));
|
||||
devIotConfigPoint.setDeviceName(obj.getString("name"));
|
||||
devIotConfigPoint.setFactoryName(devIotConfig.getFactoryName());
|
||||
devIotConfigPoint.setLevels(obj.getString("level"));
|
||||
devIotConfigPoint.setLeakageCurrent(obj.getString("leakageCurrent"));
|
||||
devIotConfigPoint.setRatedTemperature(obj.getString("ratedTemperature"));
|
||||
devIotConfigPoint.setShortCircuitCurrent(obj.getString("shortCircuitCurrent"));
|
||||
devIotConfigPoint.setRatedCurrent(obj.getString("ratedCurrent"));
|
||||
devIotConfigPoint.setRatedVoltage(obj.getString("ratedVoltage"));
|
||||
devIotConfigPoint.setOnlineStatus(obj.getJSONObject("device").getString("onlineStatus"));
|
||||
devIotConfigPointService.insertDevIotConfigPoint(devIotConfigPoint);
|
||||
}
|
||||
});
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
package com.yanzhu.jh.device.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.enums.ShiFouEnum;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.yanzhu.jh.device.domain.DevIotConfigPoint;
|
||||
import com.yanzhu.jh.device.service.IDevIotConfigPointService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 配电箱配置Controller
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2025-04-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/iotConfigPoint")
|
||||
public class DevIotConfigPointController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDevIotConfigPointService devIotConfigPointService;
|
||||
|
||||
/**
|
||||
* 查询配电箱配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotConfigPoint:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DevIotConfigPoint devIotConfigPoint)
|
||||
{
|
||||
startPage();
|
||||
List<DevIotConfigPoint> list = devIotConfigPointService.selectDevIotConfigPointList(devIotConfigPoint);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出配电箱配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotConfigPoint:export')")
|
||||
@Log(title = "配电箱配置", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DevIotConfigPoint devIotConfigPoint)
|
||||
{
|
||||
List<DevIotConfigPoint> list = devIotConfigPointService.selectDevIotConfigPointList(devIotConfigPoint);
|
||||
ExcelUtil<DevIotConfigPoint> util = new ExcelUtil<DevIotConfigPoint>(DevIotConfigPoint.class);
|
||||
util.exportExcel(response, list, "配电箱配置数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取配电箱配置详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotConfigPoint:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(devIotConfigPointService.selectDevIotConfigPointById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增配电箱配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotConfigPoint:add')")
|
||||
@Log(title = "配电箱配置", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DevIotConfigPoint devIotConfigPoint)
|
||||
{
|
||||
return toAjax(devIotConfigPointService.insertDevIotConfigPoint(devIotConfigPoint));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改配电箱配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotConfigPoint:edit')")
|
||||
@Log(title = "配电箱配置", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DevIotConfigPoint devIotConfigPoint)
|
||||
{
|
||||
return toAjax(devIotConfigPointService.updateDevIotConfigPoint(devIotConfigPoint));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除配电箱配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotConfigPoint:remove')")
|
||||
@Log(title = "配电箱配置", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(devIotConfigPointService.deleteDevIotConfigPointByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配电箱配置列表
|
||||
*/
|
||||
@GetMapping("/findProAllConfigPoint/{proId}")
|
||||
public AjaxResult findProAllConfigPoint(@PathVariable("proId") Long proId)
|
||||
{
|
||||
DevIotConfigPoint configPointQuery = new DevIotConfigPoint();
|
||||
configPointQuery.setProjectId(proId);
|
||||
configPointQuery.setIsDel(ShiFouEnum.FOU.getCode());
|
||||
List<DevIotConfigPoint> list = devIotConfigPointService.selectDevIotConfigPointList(configPointQuery);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
package com.yanzhu.jh.device.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.yanzhu.jh.device.domain.DevIotDatas;
|
||||
import com.yanzhu.jh.device.service.IDevIotDatasService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDate;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 配电箱数据Controller
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2025-04-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/iotDatas")
|
||||
public class DevIotDatasController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDevIotDatasService devIotDatasService;
|
||||
|
||||
/**
|
||||
* 查询配电箱数据列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotDatas:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DevIotDatas devIotDatas)
|
||||
{
|
||||
startPage();
|
||||
List<DevIotDatas> list = devIotDatasService.selectDevIotDatasList(devIotDatas);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出配电箱数据列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotDatas:export')")
|
||||
@Log(title = "配电箱数据", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DevIotDatas devIotDatas)
|
||||
{
|
||||
List<DevIotDatas> list = devIotDatasService.selectDevIotDatasList(devIotDatas);
|
||||
ExcelUtil<DevIotDatas> util = new ExcelUtil<DevIotDatas>(DevIotDatas.class);
|
||||
util.exportExcel(response, list, "配电箱数据数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取配电箱数据详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotDatas:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(devIotDatasService.selectDevIotDatasById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增配电箱数据
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotDatas:add')")
|
||||
@Log(title = "配电箱数据", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DevIotDatas devIotDatas)
|
||||
{
|
||||
return toAjax(devIotDatasService.insertDevIotDatas(devIotDatas));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改配电箱数据
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotDatas:edit')")
|
||||
@Log(title = "配电箱数据", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DevIotDatas devIotDatas)
|
||||
{
|
||||
return toAjax(devIotDatasService.updateDevIotDatas(devIotDatas));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除配电箱数据
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotDatas:remove')")
|
||||
@Log(title = "配电箱数据", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(devIotDatasService.deleteDevIotDatasByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配电箱数据统计
|
||||
*/
|
||||
@GetMapping("/findIotDatasMonitor/{proId}")
|
||||
public AjaxResult findProAllConfigPoint(@PathVariable("proId") Long proId, Long pointId, Integer date)
|
||||
{
|
||||
// 获取当前日期
|
||||
LocalDate today = LocalDate.now();
|
||||
// 获取最近${X}天的日期
|
||||
LocalDate todayAgo = today.minusDays(date);
|
||||
DevIotDatas datasQuery = new DevIotDatas();
|
||||
datasQuery.setPointId(pointId);
|
||||
datasQuery.setProjectId(proId);
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("beginCreateTime",today);
|
||||
params.put("endCreateTime",todayAgo);
|
||||
List<DevIotDatas> list = devIotDatasService.selectDevIotDatasList(datasQuery);
|
||||
return success(list);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,112 @@
|
|||
package com.yanzhu.jh.device.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.yanzhu.jh.device.domain.DevIotWarning;
|
||||
import com.yanzhu.jh.device.service.IDevIotWarningService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 配电箱预警Controller
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2025-04-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/iotWarning")
|
||||
public class DevIotWarningController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDevIotWarningService devIotWarningService;
|
||||
|
||||
/**
|
||||
* 查询配电箱预警列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotWarning:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DevIotWarning devIotWarning)
|
||||
{
|
||||
startPage();
|
||||
List<DevIotWarning> list = devIotWarningService.selectDevIotWarningList(devIotWarning);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出配电箱预警列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotWarning:export')")
|
||||
@Log(title = "配电箱预警", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DevIotWarning devIotWarning)
|
||||
{
|
||||
List<DevIotWarning> list = devIotWarningService.selectDevIotWarningList(devIotWarning);
|
||||
ExcelUtil<DevIotWarning> util = new ExcelUtil<DevIotWarning>(DevIotWarning.class);
|
||||
util.exportExcel(response, list, "配电箱预警数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取配电箱预警详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotWarning:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(devIotWarningService.selectDevIotWarningById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增配电箱预警
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotWarning:add')")
|
||||
@Log(title = "配电箱预警", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DevIotWarning devIotWarning)
|
||||
{
|
||||
return toAjax(devIotWarningService.insertDevIotWarning(devIotWarning));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改配电箱预警
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotWarning:edit')")
|
||||
@Log(title = "配电箱预警", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DevIotWarning devIotWarning)
|
||||
{
|
||||
return toAjax(devIotWarningService.updateDevIotWarning(devIotWarning));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除配电箱预警
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:iotWarning:remove')")
|
||||
@Log(title = "配电箱预警", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(devIotWarningService.deleteDevIotWarningByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配电箱预警数据
|
||||
*/
|
||||
@GetMapping("/findIotWarnings/{proId}")
|
||||
public AjaxResult findIotWarnings(@PathVariable("proId") Long proId, Long pointId)
|
||||
{
|
||||
startPage(1,20);
|
||||
DevIotWarning warningQuery = new DevIotWarning();
|
||||
warningQuery.setPointId(pointId);
|
||||
warningQuery.setProjectId(proId);
|
||||
List<DevIotWarning> list = devIotWarningService.selectDevIotWarningList(warningQuery);
|
||||
return success(list);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,148 @@
|
|||
package com.yanzhu.jh.device.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 配电箱配置对象 dev_iot_config
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2025-04-04
|
||||
*/
|
||||
public class DevIotConfig extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 公司主键 */
|
||||
private Long comId;
|
||||
|
||||
/** 公司名称 */
|
||||
@Excel(name = "公司名称")
|
||||
private String comName;
|
||||
|
||||
/** 项目主键 */
|
||||
private Long projectId;
|
||||
|
||||
/** 项目名称 */
|
||||
@Excel(name = "项目名称")
|
||||
private String projectName;
|
||||
|
||||
/** 通信账号 */
|
||||
@Excel(name = "通信账号")
|
||||
private String signalName;
|
||||
|
||||
/** 通信密码 */
|
||||
@Excel(name = "通信密码")
|
||||
private String signalCode;
|
||||
|
||||
/** 厂家名称 */
|
||||
@Excel(name = "厂家名称")
|
||||
private String factoryName;
|
||||
|
||||
/** 数据状态 */
|
||||
@Excel(name = "数据状态")
|
||||
private String isDel;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setComId(Long comId)
|
||||
{
|
||||
this.comId = comId;
|
||||
}
|
||||
|
||||
public Long getComId()
|
||||
{
|
||||
return comId;
|
||||
}
|
||||
public void setProjectId(Long projectId)
|
||||
{
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public Long getProjectId()
|
||||
{
|
||||
return projectId;
|
||||
}
|
||||
public void setSignalName(String signalName)
|
||||
{
|
||||
this.signalName = signalName;
|
||||
}
|
||||
|
||||
public String getSignalName()
|
||||
{
|
||||
return signalName;
|
||||
}
|
||||
public void setSignalCode(String signalCode)
|
||||
{
|
||||
this.signalCode = signalCode;
|
||||
}
|
||||
|
||||
public String getSignalCode()
|
||||
{
|
||||
return signalCode;
|
||||
}
|
||||
public void setFactoryName(String factoryName)
|
||||
{
|
||||
this.factoryName = factoryName;
|
||||
}
|
||||
|
||||
public String getFactoryName()
|
||||
{
|
||||
return factoryName;
|
||||
}
|
||||
public void setIsDel(String isDel)
|
||||
{
|
||||
this.isDel = isDel;
|
||||
}
|
||||
|
||||
public String getIsDel()
|
||||
{
|
||||
return isDel;
|
||||
}
|
||||
|
||||
public String getComName() {
|
||||
return comName;
|
||||
}
|
||||
|
||||
public void setComName(String comName) {
|
||||
this.comName = comName;
|
||||
}
|
||||
|
||||
public String getProjectName() {
|
||||
return projectName;
|
||||
}
|
||||
|
||||
public void setProjectName(String projectName) {
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("comId", getComId())
|
||||
.append("projectId", getProjectId())
|
||||
.append("signalName", getSignalName())
|
||||
.append("signalCode", getSignalCode())
|
||||
.append("factoryName", getFactoryName())
|
||||
.append("isDel", getIsDel())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,288 @@
|
|||
package com.yanzhu.jh.device.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 配电箱配置对象 dev_iot_config_point
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2025-04-04
|
||||
*/
|
||||
public class DevIotConfigPoint extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 配置主键 */
|
||||
@Excel(name = "配置主键")
|
||||
private Long cfgId;
|
||||
|
||||
/** 公司主键 */
|
||||
private Long comId;
|
||||
|
||||
/** 公司名称 */
|
||||
@Excel(name = "公司名称")
|
||||
private String comName;
|
||||
|
||||
/** 项目主键 */
|
||||
private Long projectId;
|
||||
|
||||
/** 项目名称 */
|
||||
@Excel(name = "项目名称")
|
||||
private String projectName;
|
||||
|
||||
/** 设备序列号 */
|
||||
@Excel(name = "设备序列号")
|
||||
private String deviceSn;
|
||||
|
||||
/** 设备名称 */
|
||||
@Excel(name = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
/** 厂家名称 */
|
||||
@Excel(name = "厂家名称")
|
||||
private String factoryName;
|
||||
|
||||
/** 联系人 */
|
||||
@Excel(name = "联系人")
|
||||
private String contactPerson;
|
||||
|
||||
/** 联系人电话 */
|
||||
@Excel(name = "联系人电话")
|
||||
private String contactPersonPhone;
|
||||
|
||||
/** 配电箱等级 */
|
||||
@Excel(name = "配电箱等级")
|
||||
private String levels;
|
||||
|
||||
/** 漏电电流 */
|
||||
@Excel(name = "漏电电流")
|
||||
private String leakageCurrent;
|
||||
|
||||
/** 额定温度 */
|
||||
@Excel(name = "额定温度")
|
||||
private String ratedTemperature;
|
||||
|
||||
/** 短路电流 */
|
||||
@Excel(name = "短路电流")
|
||||
private String shortCircuitCurrent;
|
||||
|
||||
/** 额定电流 */
|
||||
@Excel(name = "额定电流")
|
||||
private String ratedCurrent;
|
||||
|
||||
/** 额定电压 */
|
||||
@Excel(name = "额定电压")
|
||||
private String ratedVoltage;
|
||||
|
||||
/** 在线状态 */
|
||||
@Excel(name = "在线状态")
|
||||
private String onlineStatus;
|
||||
|
||||
/** 数据状态 */
|
||||
@Excel(name = "数据状态")
|
||||
private String isDel;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCfgId(Long cfgId)
|
||||
{
|
||||
this.cfgId = cfgId;
|
||||
}
|
||||
|
||||
public Long getCfgId()
|
||||
{
|
||||
return cfgId;
|
||||
}
|
||||
public void setComId(Long comId)
|
||||
{
|
||||
this.comId = comId;
|
||||
}
|
||||
|
||||
public Long getComId()
|
||||
{
|
||||
return comId;
|
||||
}
|
||||
public void setProjectId(Long projectId)
|
||||
{
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public Long getProjectId()
|
||||
{
|
||||
return projectId;
|
||||
}
|
||||
public void setDeviceSn(String deviceSn)
|
||||
{
|
||||
this.deviceSn = deviceSn;
|
||||
}
|
||||
|
||||
public String getDeviceSn()
|
||||
{
|
||||
return deviceSn;
|
||||
}
|
||||
public void setDeviceName(String deviceName)
|
||||
{
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getDeviceName()
|
||||
{
|
||||
return deviceName;
|
||||
}
|
||||
public void setFactoryName(String factoryName)
|
||||
{
|
||||
this.factoryName = factoryName;
|
||||
}
|
||||
|
||||
public String getFactoryName()
|
||||
{
|
||||
return factoryName;
|
||||
}
|
||||
public void setContactPerson(String contactPerson)
|
||||
{
|
||||
this.contactPerson = contactPerson;
|
||||
}
|
||||
|
||||
public String getContactPerson()
|
||||
{
|
||||
return contactPerson;
|
||||
}
|
||||
public void setContactPersonPhone(String contactPersonPhone)
|
||||
{
|
||||
this.contactPersonPhone = contactPersonPhone;
|
||||
}
|
||||
|
||||
public String getContactPersonPhone()
|
||||
{
|
||||
return contactPersonPhone;
|
||||
}
|
||||
public void setLevels(String levels)
|
||||
{
|
||||
this.levels = levels;
|
||||
}
|
||||
|
||||
public String getLevels()
|
||||
{
|
||||
return levels;
|
||||
}
|
||||
public void setLeakageCurrent(String leakageCurrent)
|
||||
{
|
||||
this.leakageCurrent = leakageCurrent;
|
||||
}
|
||||
|
||||
public String getLeakageCurrent()
|
||||
{
|
||||
return leakageCurrent;
|
||||
}
|
||||
public void setRatedTemperature(String ratedTemperature)
|
||||
{
|
||||
this.ratedTemperature = ratedTemperature;
|
||||
}
|
||||
|
||||
public String getRatedTemperature()
|
||||
{
|
||||
return ratedTemperature;
|
||||
}
|
||||
public void setShortCircuitCurrent(String shortCircuitCurrent)
|
||||
{
|
||||
this.shortCircuitCurrent = shortCircuitCurrent;
|
||||
}
|
||||
|
||||
public String getShortCircuitCurrent()
|
||||
{
|
||||
return shortCircuitCurrent;
|
||||
}
|
||||
public void setRatedCurrent(String ratedCurrent)
|
||||
{
|
||||
this.ratedCurrent = ratedCurrent;
|
||||
}
|
||||
|
||||
public String getRatedCurrent()
|
||||
{
|
||||
return ratedCurrent;
|
||||
}
|
||||
public void setRatedVoltage(String ratedVoltage)
|
||||
{
|
||||
this.ratedVoltage = ratedVoltage;
|
||||
}
|
||||
|
||||
public String getRatedVoltage()
|
||||
{
|
||||
return ratedVoltage;
|
||||
}
|
||||
public void setOnlineStatus(String onlineStatus)
|
||||
{
|
||||
this.onlineStatus = onlineStatus;
|
||||
}
|
||||
|
||||
public String getOnlineStatus()
|
||||
{
|
||||
return onlineStatus;
|
||||
}
|
||||
public void setIsDel(String isDel)
|
||||
{
|
||||
this.isDel = isDel;
|
||||
}
|
||||
|
||||
public String getIsDel()
|
||||
{
|
||||
return isDel;
|
||||
}
|
||||
|
||||
public String getComName() {
|
||||
return comName;
|
||||
}
|
||||
|
||||
public void setComName(String comName) {
|
||||
this.comName = comName;
|
||||
}
|
||||
|
||||
public String getProjectName() {
|
||||
return projectName;
|
||||
}
|
||||
|
||||
public void setProjectName(String projectName) {
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("cfgId", getCfgId())
|
||||
.append("comId", getComId())
|
||||
.append("projectId", getProjectId())
|
||||
.append("deviceSn", getDeviceSn())
|
||||
.append("deviceName", getDeviceName())
|
||||
.append("factoryName", getFactoryName())
|
||||
.append("contactPerson", getContactPerson())
|
||||
.append("contactPersonPhone", getContactPersonPhone())
|
||||
.append("levels", getLevels())
|
||||
.append("leakageCurrent", getLeakageCurrent())
|
||||
.append("ratedTemperature", getRatedTemperature())
|
||||
.append("shortCircuitCurrent", getShortCircuitCurrent())
|
||||
.append("ratedCurrent", getRatedCurrent())
|
||||
.append("ratedVoltage", getRatedVoltage())
|
||||
.append("onlineStatus", getOnlineStatus())
|
||||
.append("isDel", getIsDel())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,525 @@
|
|||
package com.yanzhu.jh.device.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 配电箱数据对象 dev_iot_datas
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2025-04-04
|
||||
*/
|
||||
public class DevIotDatas extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 配置主键 */
|
||||
@Excel(name = "配置主键")
|
||||
private Long cfgId;
|
||||
|
||||
/** 点位主键 */
|
||||
@Excel(name = "点位主键")
|
||||
private Long pointId;
|
||||
|
||||
/** 公司主键 */
|
||||
private Long comId;
|
||||
|
||||
/** 公司名称 */
|
||||
@Excel(name = "公司名称")
|
||||
private String comName;
|
||||
|
||||
/** 项目主键 */
|
||||
private Long projectId;
|
||||
|
||||
/** 项目名称 */
|
||||
@Excel(name = "项目名称")
|
||||
private String projectName;
|
||||
|
||||
/** 设备序列号 */
|
||||
@Excel(name = "设备序列号")
|
||||
private String deviceSn;
|
||||
|
||||
/** 开关位_交流 */
|
||||
@Excel(name = "开关位_交流")
|
||||
private String switchesAc;
|
||||
|
||||
/** 开关位 */
|
||||
@Excel(name = "开关位")
|
||||
private String switchesSwitch;
|
||||
|
||||
/** 开关位状态 */
|
||||
@Excel(name = "开关位状态")
|
||||
private String switchesSwitches;
|
||||
|
||||
/** 开关位安装状态 */
|
||||
@Excel(name = "开关位安装状态")
|
||||
private String switchesSwitchstatus;
|
||||
|
||||
/** 温度检测数据 */
|
||||
@Excel(name = "温度检测数据")
|
||||
private String temperature;
|
||||
|
||||
/** 漏电检测数据 */
|
||||
@Excel(name = "漏电检测数据")
|
||||
private String leakage;
|
||||
|
||||
/** A相电压 */
|
||||
@Excel(name = "A相电压")
|
||||
private String voltageA;
|
||||
|
||||
/** B相电压 */
|
||||
@Excel(name = "B相电压")
|
||||
private String voltageB;
|
||||
|
||||
/** C相电压 */
|
||||
@Excel(name = "C相电压")
|
||||
private String voltageC;
|
||||
|
||||
/** A相与B相之间的电压 */
|
||||
@Excel(name = "A相与B相之间的电压")
|
||||
private String voltageAb;
|
||||
|
||||
/** B相与C相之间的电压 */
|
||||
@Excel(name = "B相与C相之间的电压")
|
||||
private String voltageBc;
|
||||
|
||||
/** C相与A相之间的电压 */
|
||||
@Excel(name = "C相与A相之间的电压")
|
||||
private String voltageCa;
|
||||
|
||||
/** A相电流 */
|
||||
@Excel(name = "A相电流")
|
||||
private String currentA;
|
||||
|
||||
/** B相电流 */
|
||||
@Excel(name = "B相电流")
|
||||
private String currentB;
|
||||
|
||||
/** C相电流 */
|
||||
@Excel(name = "C相电流")
|
||||
private String currentC;
|
||||
|
||||
/** A相功率 */
|
||||
@Excel(name = "A相功率")
|
||||
private String powerA;
|
||||
|
||||
/** B相功率 */
|
||||
@Excel(name = "B相功率")
|
||||
private String powerB;
|
||||
|
||||
/** C相功率 */
|
||||
@Excel(name = "C相功率")
|
||||
private String powerC;
|
||||
|
||||
/** A相累计能量 */
|
||||
@Excel(name = "A相累计能量")
|
||||
private String energyA;
|
||||
|
||||
/** B相累计能量 */
|
||||
@Excel(name = "B相累计能量")
|
||||
private String energyB;
|
||||
|
||||
/** C相累计能量 */
|
||||
@Excel(name = "C相累计能量")
|
||||
private String energyC;
|
||||
|
||||
/** A相功率因数 */
|
||||
@Excel(name = "A相功率因数")
|
||||
private String factorA;
|
||||
|
||||
/** B相功率因数 */
|
||||
@Excel(name = "B相功率因数")
|
||||
private String factorB;
|
||||
|
||||
/** C相功率因数 */
|
||||
@Excel(name = "C相功率因数")
|
||||
private String factorC;
|
||||
|
||||
/** A相频率 */
|
||||
@Excel(name = "A相频率")
|
||||
private String frequencyA;
|
||||
|
||||
/** B相频率 */
|
||||
@Excel(name = "B相频率")
|
||||
private String frequencyB;
|
||||
|
||||
/** C相频率 */
|
||||
@Excel(name = "C相频率")
|
||||
private String frequencyC;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
private Date createTime;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCfgId(Long cfgId)
|
||||
{
|
||||
this.cfgId = cfgId;
|
||||
}
|
||||
|
||||
public Long getCfgId()
|
||||
{
|
||||
return cfgId;
|
||||
}
|
||||
public void setPointId(Long pointId)
|
||||
{
|
||||
this.pointId = pointId;
|
||||
}
|
||||
|
||||
public Long getPointId()
|
||||
{
|
||||
return pointId;
|
||||
}
|
||||
public void setComId(Long comId)
|
||||
{
|
||||
this.comId = comId;
|
||||
}
|
||||
|
||||
public Long getComId()
|
||||
{
|
||||
return comId;
|
||||
}
|
||||
public void setProjectId(Long projectId)
|
||||
{
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public Long getProjectId()
|
||||
{
|
||||
return projectId;
|
||||
}
|
||||
public void setDeviceSn(String deviceSn)
|
||||
{
|
||||
this.deviceSn = deviceSn;
|
||||
}
|
||||
|
||||
public String getDeviceSn()
|
||||
{
|
||||
return deviceSn;
|
||||
}
|
||||
public void setSwitchesAc(String switchesAc)
|
||||
{
|
||||
this.switchesAc = switchesAc;
|
||||
}
|
||||
|
||||
public String getSwitchesAc()
|
||||
{
|
||||
return switchesAc;
|
||||
}
|
||||
public void setSwitchesSwitch(String switchesSwitch)
|
||||
{
|
||||
this.switchesSwitch = switchesSwitch;
|
||||
}
|
||||
|
||||
public String getSwitchesSwitch()
|
||||
{
|
||||
return switchesSwitch;
|
||||
}
|
||||
public void setSwitchesSwitches(String switchesSwitches)
|
||||
{
|
||||
this.switchesSwitches = switchesSwitches;
|
||||
}
|
||||
|
||||
public String getSwitchesSwitches()
|
||||
{
|
||||
return switchesSwitches;
|
||||
}
|
||||
public void setSwitchesSwitchstatus(String switchesSwitchstatus)
|
||||
{
|
||||
this.switchesSwitchstatus = switchesSwitchstatus;
|
||||
}
|
||||
|
||||
public String getSwitchesSwitchstatus()
|
||||
{
|
||||
return switchesSwitchstatus;
|
||||
}
|
||||
public void setTemperature(String temperature)
|
||||
{
|
||||
this.temperature = temperature;
|
||||
}
|
||||
|
||||
public String getTemperature()
|
||||
{
|
||||
return temperature;
|
||||
}
|
||||
public void setLeakage(String leakage)
|
||||
{
|
||||
this.leakage = leakage;
|
||||
}
|
||||
|
||||
public String getLeakage()
|
||||
{
|
||||
return leakage;
|
||||
}
|
||||
public void setVoltageA(String voltageA)
|
||||
{
|
||||
this.voltageA = voltageA;
|
||||
}
|
||||
|
||||
public String getVoltageA()
|
||||
{
|
||||
return voltageA;
|
||||
}
|
||||
public void setVoltageB(String voltageB)
|
||||
{
|
||||
this.voltageB = voltageB;
|
||||
}
|
||||
|
||||
public String getVoltageB()
|
||||
{
|
||||
return voltageB;
|
||||
}
|
||||
public void setVoltageC(String voltageC)
|
||||
{
|
||||
this.voltageC = voltageC;
|
||||
}
|
||||
|
||||
public String getVoltageC()
|
||||
{
|
||||
return voltageC;
|
||||
}
|
||||
public void setVoltageAb(String voltageAb)
|
||||
{
|
||||
this.voltageAb = voltageAb;
|
||||
}
|
||||
|
||||
public String getVoltageAb()
|
||||
{
|
||||
return voltageAb;
|
||||
}
|
||||
public void setVoltageBc(String voltageBc)
|
||||
{
|
||||
this.voltageBc = voltageBc;
|
||||
}
|
||||
|
||||
public String getVoltageBc()
|
||||
{
|
||||
return voltageBc;
|
||||
}
|
||||
public void setVoltageCa(String voltageCa)
|
||||
{
|
||||
this.voltageCa = voltageCa;
|
||||
}
|
||||
|
||||
public String getVoltageCa()
|
||||
{
|
||||
return voltageCa;
|
||||
}
|
||||
public void setCurrentA(String currentA)
|
||||
{
|
||||
this.currentA = currentA;
|
||||
}
|
||||
|
||||
public String getCurrentA()
|
||||
{
|
||||
return currentA;
|
||||
}
|
||||
public void setCurrentB(String currentB)
|
||||
{
|
||||
this.currentB = currentB;
|
||||
}
|
||||
|
||||
public String getCurrentB()
|
||||
{
|
||||
return currentB;
|
||||
}
|
||||
public void setCurrentC(String currentC)
|
||||
{
|
||||
this.currentC = currentC;
|
||||
}
|
||||
|
||||
public String getCurrentC()
|
||||
{
|
||||
return currentC;
|
||||
}
|
||||
public void setPowerA(String powerA)
|
||||
{
|
||||
this.powerA = powerA;
|
||||
}
|
||||
|
||||
public String getPowerA()
|
||||
{
|
||||
return powerA;
|
||||
}
|
||||
public void setPowerB(String powerB)
|
||||
{
|
||||
this.powerB = powerB;
|
||||
}
|
||||
|
||||
public String getPowerB()
|
||||
{
|
||||
return powerB;
|
||||
}
|
||||
public void setPowerC(String powerC)
|
||||
{
|
||||
this.powerC = powerC;
|
||||
}
|
||||
|
||||
public String getPowerC()
|
||||
{
|
||||
return powerC;
|
||||
}
|
||||
public void setEnergyA(String energyA)
|
||||
{
|
||||
this.energyA = energyA;
|
||||
}
|
||||
|
||||
public String getEnergyA()
|
||||
{
|
||||
return energyA;
|
||||
}
|
||||
public void setEnergyB(String energyB)
|
||||
{
|
||||
this.energyB = energyB;
|
||||
}
|
||||
|
||||
public String getEnergyB()
|
||||
{
|
||||
return energyB;
|
||||
}
|
||||
public void setEnergyC(String energyC)
|
||||
{
|
||||
this.energyC = energyC;
|
||||
}
|
||||
|
||||
public String getEnergyC()
|
||||
{
|
||||
return energyC;
|
||||
}
|
||||
public void setFactorA(String factorA)
|
||||
{
|
||||
this.factorA = factorA;
|
||||
}
|
||||
|
||||
public String getFactorA()
|
||||
{
|
||||
return factorA;
|
||||
}
|
||||
public void setFactorB(String factorB)
|
||||
{
|
||||
this.factorB = factorB;
|
||||
}
|
||||
|
||||
public String getFactorB()
|
||||
{
|
||||
return factorB;
|
||||
}
|
||||
public void setFactorC(String factorC)
|
||||
{
|
||||
this.factorC = factorC;
|
||||
}
|
||||
|
||||
public String getFactorC()
|
||||
{
|
||||
return factorC;
|
||||
}
|
||||
public void setFrequencyA(String frequencyA)
|
||||
{
|
||||
this.frequencyA = frequencyA;
|
||||
}
|
||||
|
||||
public String getFrequencyA()
|
||||
{
|
||||
return frequencyA;
|
||||
}
|
||||
public void setFrequencyB(String frequencyB)
|
||||
{
|
||||
this.frequencyB = frequencyB;
|
||||
}
|
||||
|
||||
public String getFrequencyB()
|
||||
{
|
||||
return frequencyB;
|
||||
}
|
||||
public void setFrequencyC(String frequencyC)
|
||||
{
|
||||
this.frequencyC = frequencyC;
|
||||
}
|
||||
|
||||
public String getFrequencyC()
|
||||
{
|
||||
return frequencyC;
|
||||
}
|
||||
|
||||
public String getComName() {
|
||||
return comName;
|
||||
}
|
||||
|
||||
public void setComName(String comName) {
|
||||
this.comName = comName;
|
||||
}
|
||||
|
||||
public String getProjectName() {
|
||||
return projectName;
|
||||
}
|
||||
|
||||
public void setProjectName(String projectName) {
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("cfgId", getCfgId())
|
||||
.append("pointId", getPointId())
|
||||
.append("comId", getComId())
|
||||
.append("projectId", getProjectId())
|
||||
.append("deviceSn", getDeviceSn())
|
||||
.append("switchesAc", getSwitchesAc())
|
||||
.append("switchesSwitch", getSwitchesSwitch())
|
||||
.append("switchesSwitches", getSwitchesSwitches())
|
||||
.append("switchesSwitchstatus", getSwitchesSwitchstatus())
|
||||
.append("temperature", getTemperature())
|
||||
.append("leakage", getLeakage())
|
||||
.append("voltageA", getVoltageA())
|
||||
.append("voltageB", getVoltageB())
|
||||
.append("voltageC", getVoltageC())
|
||||
.append("voltageAb", getVoltageAb())
|
||||
.append("voltageBc", getVoltageBc())
|
||||
.append("voltageCa", getVoltageCa())
|
||||
.append("currentA", getCurrentA())
|
||||
.append("currentB", getCurrentB())
|
||||
.append("currentC", getCurrentC())
|
||||
.append("powerA", getPowerA())
|
||||
.append("powerB", getPowerB())
|
||||
.append("powerC", getPowerC())
|
||||
.append("energyA", getEnergyA())
|
||||
.append("energyB", getEnergyB())
|
||||
.append("energyC", getEnergyC())
|
||||
.append("factorA", getFactorA())
|
||||
.append("factorB", getFactorB())
|
||||
.append("factorC", getFactorC())
|
||||
.append("frequencyA", getFrequencyA())
|
||||
.append("frequencyB", getFrequencyB())
|
||||
.append("frequencyC", getFrequencyC())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,158 @@
|
|||
package com.yanzhu.jh.device.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 配电箱预警对象 dev_iot_warning
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2025-04-04
|
||||
*/
|
||||
public class DevIotWarning extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 配置主键 */
|
||||
@Excel(name = "配置主键")
|
||||
private Long cfgId;
|
||||
|
||||
/** 点位主键 */
|
||||
@Excel(name = "点位主键")
|
||||
private Long pointId;
|
||||
|
||||
/** 公司主键 */
|
||||
private Long comId;
|
||||
|
||||
/** 公司名称 */
|
||||
@Excel(name = "公司名称")
|
||||
private String comName;
|
||||
|
||||
/** 项目主键 */
|
||||
private Long projectId;
|
||||
|
||||
/** 项目名称 */
|
||||
@Excel(name = "项目名称")
|
||||
private String projectName;
|
||||
|
||||
/** 设备序列号 */
|
||||
@Excel(name = "设备序列号")
|
||||
private String deviceSn;
|
||||
|
||||
/** 预警类型 */
|
||||
@Excel(name = "预警类型")
|
||||
private String warningType;
|
||||
|
||||
/** 预警内容 */
|
||||
@Excel(name = "预警内容")
|
||||
private String warningContent;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCfgId(Long cfgId)
|
||||
{
|
||||
this.cfgId = cfgId;
|
||||
}
|
||||
|
||||
public Long getCfgId()
|
||||
{
|
||||
return cfgId;
|
||||
}
|
||||
public void setPointId(Long pointId)
|
||||
{
|
||||
this.pointId = pointId;
|
||||
}
|
||||
|
||||
public Long getPointId()
|
||||
{
|
||||
return pointId;
|
||||
}
|
||||
public void setComId(Long comId)
|
||||
{
|
||||
this.comId = comId;
|
||||
}
|
||||
|
||||
public Long getComId()
|
||||
{
|
||||
return comId;
|
||||
}
|
||||
public void setProjectId(Long projectId)
|
||||
{
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public Long getProjectId()
|
||||
{
|
||||
return projectId;
|
||||
}
|
||||
public void setDeviceSn(String deviceSn)
|
||||
{
|
||||
this.deviceSn = deviceSn;
|
||||
}
|
||||
|
||||
public String getDeviceSn()
|
||||
{
|
||||
return deviceSn;
|
||||
}
|
||||
public void setWarningType(String warningType)
|
||||
{
|
||||
this.warningType = warningType;
|
||||
}
|
||||
|
||||
public String getWarningType()
|
||||
{
|
||||
return warningType;
|
||||
}
|
||||
public void setWarningContent(String warningContent)
|
||||
{
|
||||
this.warningContent = warningContent;
|
||||
}
|
||||
|
||||
public String getWarningContent()
|
||||
{
|
||||
return warningContent;
|
||||
}
|
||||
|
||||
public String getComName() {
|
||||
return comName;
|
||||
}
|
||||
|
||||
public void setComName(String comName) {
|
||||
this.comName = comName;
|
||||
}
|
||||
|
||||
public String getProjectName() {
|
||||
return projectName;
|
||||
}
|
||||
|
||||
public void setProjectName(String projectName) {
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("cfgId", getCfgId())
|
||||
.append("pointId", getPointId())
|
||||
.append("comId", getComId())
|
||||
.append("projectId", getProjectId())
|
||||
.append("deviceSn", getDeviceSn())
|
||||
.append("warningType", getWarningType())
|
||||
.append("warningContent", getWarningContent())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -59,13 +59,45 @@ public class DevTowerDataWarning extends BaseEntity
|
|||
@Excel(name = "预警内容")
|
||||
private String warnNote;
|
||||
|
||||
/** 预警值 */
|
||||
@Excel(name = "预警值")
|
||||
private String warnData;
|
||||
/** 当前高度 */
|
||||
@Excel(name = "当前高度")
|
||||
private String height;
|
||||
|
||||
/** 实际值 */
|
||||
@Excel(name = "实际值")
|
||||
private String realData;
|
||||
/** 当前幅度 */
|
||||
@Excel(name = "当前幅度")
|
||||
private String range;
|
||||
|
||||
/** 回转 */
|
||||
@Excel(name = "回转")
|
||||
private String rotation;
|
||||
|
||||
/** 当前吊重 */
|
||||
@Excel(name = "当前吊重")
|
||||
private String load;
|
||||
|
||||
/** 风速 */
|
||||
@Excel(name = "风速")
|
||||
private String windSpeed;
|
||||
|
||||
/** 水平倾角 */
|
||||
@Excel(name = "水平倾角")
|
||||
private String leanAngleX;
|
||||
|
||||
/** 垂直倾角 */
|
||||
@Excel(name = "垂直倾角")
|
||||
private String leanAngleY;
|
||||
|
||||
/** 力矩百分比 */
|
||||
@Excel(name = "力矩百分比")
|
||||
private String momentPercent;
|
||||
|
||||
/** 报警标识 */
|
||||
@Excel(name = "报警标识")
|
||||
private Long alarmed;
|
||||
|
||||
/** 倍率 */
|
||||
@Excel(name = "倍率")
|
||||
private String rate;
|
||||
|
||||
/** 是否有效 */
|
||||
@Excel(name = "是否有效")
|
||||
|
|
@ -161,24 +193,7 @@ public class DevTowerDataWarning extends BaseEntity
|
|||
{
|
||||
return warnNote;
|
||||
}
|
||||
public void setWarnData(String warnData)
|
||||
{
|
||||
this.warnData = warnData;
|
||||
}
|
||||
|
||||
public String getWarnData()
|
||||
{
|
||||
return warnData;
|
||||
}
|
||||
public void setRealData(String realData)
|
||||
{
|
||||
this.realData = realData;
|
||||
}
|
||||
|
||||
public String getRealData()
|
||||
{
|
||||
return realData;
|
||||
}
|
||||
public void setIsDel(Long isDel)
|
||||
{
|
||||
this.isDel = isDel;
|
||||
|
|
@ -205,6 +220,86 @@ public class DevTowerDataWarning extends BaseEntity
|
|||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public String getHeight() {
|
||||
return height;
|
||||
}
|
||||
|
||||
public void setHeight(String height) {
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
public String getRange() {
|
||||
return range;
|
||||
}
|
||||
|
||||
public void setRange(String range) {
|
||||
this.range = range;
|
||||
}
|
||||
|
||||
public String getRotation() {
|
||||
return rotation;
|
||||
}
|
||||
|
||||
public void setRotation(String rotation) {
|
||||
this.rotation = rotation;
|
||||
}
|
||||
|
||||
public String getLoad() {
|
||||
return load;
|
||||
}
|
||||
|
||||
public void setLoad(String load) {
|
||||
this.load = load;
|
||||
}
|
||||
|
||||
public String getWindSpeed() {
|
||||
return windSpeed;
|
||||
}
|
||||
|
||||
public void setWindSpeed(String windSpeed) {
|
||||
this.windSpeed = windSpeed;
|
||||
}
|
||||
|
||||
public String getLeanAngleX() {
|
||||
return leanAngleX;
|
||||
}
|
||||
|
||||
public void setLeanAngleX(String leanAngleX) {
|
||||
this.leanAngleX = leanAngleX;
|
||||
}
|
||||
|
||||
public String getLeanAngleY() {
|
||||
return leanAngleY;
|
||||
}
|
||||
|
||||
public void setLeanAngleY(String leanAngleY) {
|
||||
this.leanAngleY = leanAngleY;
|
||||
}
|
||||
|
||||
public String getMomentPercent() {
|
||||
return momentPercent;
|
||||
}
|
||||
|
||||
public void setMomentPercent(String momentPercent) {
|
||||
this.momentPercent = momentPercent;
|
||||
}
|
||||
|
||||
public Long getAlarmed() {
|
||||
return alarmed;
|
||||
}
|
||||
|
||||
public void setAlarmed(Long alarmed) {
|
||||
this.alarmed = alarmed;
|
||||
}
|
||||
|
||||
public String getRate() {
|
||||
return rate;
|
||||
}
|
||||
|
||||
public void setRate(String rate) {
|
||||
this.rate = rate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
|
@ -217,8 +312,6 @@ public class DevTowerDataWarning extends BaseEntity
|
|||
.append("warnType", getWarnType())
|
||||
.append("warnName", getWarnName())
|
||||
.append("warnNote", getWarnNote())
|
||||
.append("warnData", getWarnData())
|
||||
.append("realData", getRealData())
|
||||
.append("isDel", getIsDel())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
|
|
|
|||
|
|
@ -0,0 +1,62 @@
|
|||
package com.yanzhu.jh.device.mapper;
|
||||
|
||||
import com.yanzhu.jh.device.domain.DevIotConfig;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 配电箱配置Mapper接口
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2025-04-04
|
||||
*/
|
||||
public interface DevIotConfigMapper
|
||||
{
|
||||
/**
|
||||
* 查询配电箱配置
|
||||
*
|
||||
* @param id 配电箱配置主键
|
||||
* @return 配电箱配置
|
||||
*/
|
||||
public DevIotConfig selectDevIotConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 查询配电箱配置列表
|
||||
*
|
||||
* @param devIotConfig 配电箱配置
|
||||
* @return 配电箱配置集合
|
||||
*/
|
||||
public List<DevIotConfig> selectDevIotConfigList(DevIotConfig devIotConfig);
|
||||
|
||||
/**
|
||||
* 新增配电箱配置
|
||||
*
|
||||
* @param devIotConfig 配电箱配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDevIotConfig(DevIotConfig devIotConfig);
|
||||
|
||||
/**
|
||||
* 修改配电箱配置
|
||||
*
|
||||
* @param devIotConfig 配电箱配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDevIotConfig(DevIotConfig devIotConfig);
|
||||
|
||||
/**
|
||||
* 删除配电箱配置
|
||||
*
|
||||
* @param id 配电箱配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDevIotConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除配电箱配置
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDevIotConfigByIds(Long[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.yanzhu.jh.device.mapper;
|
||||
|
||||
import com.yanzhu.jh.device.domain.DevIotConfigPoint;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 配电箱配置Mapper接口
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2025-04-04
|
||||
*/
|
||||
public interface DevIotConfigPointMapper
|
||||
{
|
||||
/**
|
||||
* 查询配电箱配置
|
||||
*
|
||||
* @param id 配电箱配置主键
|
||||
* @return 配电箱配置
|
||||
*/
|
||||
public DevIotConfigPoint selectDevIotConfigPointById(Long id);
|
||||
|
||||
/**
|
||||
* 查询配电箱配置列表
|
||||
*
|
||||
* @param devIotConfigPoint 配电箱配置
|
||||
* @return 配电箱配置集合
|
||||
*/
|
||||
public List<DevIotConfigPoint> selectDevIotConfigPointList(DevIotConfigPoint devIotConfigPoint);
|
||||
|
||||
/**
|
||||
* 新增配电箱配置
|
||||
*
|
||||
* @param devIotConfigPoint 配电箱配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDevIotConfigPoint(DevIotConfigPoint devIotConfigPoint);
|
||||
|
||||
/**
|
||||
* 修改配电箱配置
|
||||
*
|
||||
* @param devIotConfigPoint 配电箱配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDevIotConfigPoint(DevIotConfigPoint devIotConfigPoint);
|
||||
|
||||
/**
|
||||
* 删除配电箱配置
|
||||
*
|
||||
* @param id 配电箱配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDevIotConfigPointById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除配电箱配置
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDevIotConfigPointByIds(Long[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.yanzhu.jh.device.mapper;
|
||||
|
||||
import com.yanzhu.jh.device.domain.DevIotDatas;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 配电箱数据Mapper接口
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2025-04-04
|
||||
*/
|
||||
public interface DevIotDatasMapper
|
||||
{
|
||||
/**
|
||||
* 查询配电箱数据
|
||||
*
|
||||
* @param id 配电箱数据主键
|
||||
* @return 配电箱数据
|
||||
*/
|
||||
public DevIotDatas selectDevIotDatasById(Long id);
|
||||
|
||||
/**
|
||||
* 查询配电箱数据列表
|
||||
*
|
||||
* @param devIotDatas 配电箱数据
|
||||
* @return 配电箱数据集合
|
||||
*/
|
||||
public List<DevIotDatas> selectDevIotDatasList(DevIotDatas devIotDatas);
|
||||
|
||||
/**
|
||||
* 新增配电箱数据
|
||||
*
|
||||
* @param devIotDatas 配电箱数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDevIotDatas(DevIotDatas devIotDatas);
|
||||
|
||||
/**
|
||||
* 修改配电箱数据
|
||||
*
|
||||
* @param devIotDatas 配电箱数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDevIotDatas(DevIotDatas devIotDatas);
|
||||
|
||||
/**
|
||||
* 删除配电箱数据
|
||||
*
|
||||
* @param id 配电箱数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDevIotDatasById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除配电箱数据
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDevIotDatasByIds(Long[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.yanzhu.jh.device.mapper;
|
||||
|
||||
import com.yanzhu.jh.device.domain.DevIotWarning;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 配电箱预警Mapper接口
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2025-04-04
|
||||
*/
|
||||
public interface DevIotWarningMapper
|
||||
{
|
||||
/**
|
||||
* 查询配电箱预警
|
||||
*
|
||||
* @param id 配电箱预警主键
|
||||
* @return 配电箱预警
|
||||
*/
|
||||
public DevIotWarning selectDevIotWarningById(Long id);
|
||||
|
||||
/**
|
||||
* 查询配电箱预警列表
|
||||
*
|
||||
* @param devIotWarning 配电箱预警
|
||||
* @return 配电箱预警集合
|
||||
*/
|
||||
public List<DevIotWarning> selectDevIotWarningList(DevIotWarning devIotWarning);
|
||||
|
||||
/**
|
||||
* 新增配电箱预警
|
||||
*
|
||||
* @param devIotWarning 配电箱预警
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDevIotWarning(DevIotWarning devIotWarning);
|
||||
|
||||
/**
|
||||
* 修改配电箱预警
|
||||
*
|
||||
* @param devIotWarning 配电箱预警
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDevIotWarning(DevIotWarning devIotWarning);
|
||||
|
||||
/**
|
||||
* 删除配电箱预警
|
||||
*
|
||||
* @param id 配电箱预警主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDevIotWarningById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除配电箱预警
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDevIotWarningByIds(Long[] ids);
|
||||
}
|
||||
|
|
@ -58,4 +58,20 @@ public interface DevTowerDataWarningMapper
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteDevTowerDataWarningByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询塔机预警数据
|
||||
*
|
||||
* @param devTowerDataWarning 设备预警信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int findWarningCountByDeviceKey(DevTowerDataWarning devTowerDataWarning);
|
||||
|
||||
/**
|
||||
* 查询塔机超载预警数据
|
||||
*
|
||||
* @param devTowerDataWarning 设备预警信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int findOverloadWarningCountByDeviceKey(DevTowerDataWarning devTowerDataWarning);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,62 @@
|
|||
package com.yanzhu.jh.device.service;
|
||||
|
||||
import com.yanzhu.jh.device.domain.DevIotConfigPoint;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 配电箱配置Service接口
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2025-04-04
|
||||
*/
|
||||
public interface IDevIotConfigPointService
|
||||
{
|
||||
/**
|
||||
* 查询配电箱配置
|
||||
*
|
||||
* @param id 配电箱配置主键
|
||||
* @return 配电箱配置
|
||||
*/
|
||||
public DevIotConfigPoint selectDevIotConfigPointById(Long id);
|
||||
|
||||
/**
|
||||
* 查询配电箱配置列表
|
||||
*
|
||||
* @param devIotConfigPoint 配电箱配置
|
||||
* @return 配电箱配置集合
|
||||
*/
|
||||
public List<DevIotConfigPoint> selectDevIotConfigPointList(DevIotConfigPoint devIotConfigPoint);
|
||||
|
||||
/**
|
||||
* 新增配电箱配置
|
||||
*
|
||||
* @param devIotConfigPoint 配电箱配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDevIotConfigPoint(DevIotConfigPoint devIotConfigPoint);
|
||||
|
||||
/**
|
||||
* 修改配电箱配置
|
||||
*
|
||||
* @param devIotConfigPoint 配电箱配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDevIotConfigPoint(DevIotConfigPoint devIotConfigPoint);
|
||||
|
||||
/**
|
||||
* 批量删除配电箱配置
|
||||
*
|
||||
* @param ids 需要删除的配电箱配置主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDevIotConfigPointByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除配电箱配置信息
|
||||
*
|
||||
* @param id 配电箱配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDevIotConfigPointById(Long id);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.yanzhu.jh.device.service;
|
||||
|
||||
import com.yanzhu.jh.device.domain.DevIotConfig;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 配电箱配置Service接口
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2025-04-04
|
||||
*/
|
||||
public interface IDevIotConfigService
|
||||
{
|
||||
/**
|
||||
* 查询配电箱配置
|
||||
*
|
||||
* @param id 配电箱配置主键
|
||||
* @return 配电箱配置
|
||||
*/
|
||||
public DevIotConfig selectDevIotConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 查询配电箱配置列表
|
||||
*
|
||||
* @param devIotConfig 配电箱配置
|
||||
* @return 配电箱配置集合
|
||||
*/
|
||||
public List<DevIotConfig> selectDevIotConfigList(DevIotConfig devIotConfig);
|
||||
|
||||
/**
|
||||
* 新增配电箱配置
|
||||
*
|
||||
* @param devIotConfig 配电箱配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDevIotConfig(DevIotConfig devIotConfig);
|
||||
|
||||
/**
|
||||
* 修改配电箱配置
|
||||
*
|
||||
* @param devIotConfig 配电箱配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDevIotConfig(DevIotConfig devIotConfig);
|
||||
|
||||
/**
|
||||
* 批量删除配电箱配置
|
||||
*
|
||||
* @param ids 需要删除的配电箱配置主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDevIotConfigByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除配电箱配置信息
|
||||
*
|
||||
* @param id 配电箱配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDevIotConfigById(Long id);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.yanzhu.jh.device.service;
|
||||
|
||||
import com.yanzhu.jh.device.domain.DevIotDatas;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 配电箱数据Service接口
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2025-04-04
|
||||
*/
|
||||
public interface IDevIotDatasService
|
||||
{
|
||||
/**
|
||||
* 查询配电箱数据
|
||||
*
|
||||
* @param id 配电箱数据主键
|
||||
* @return 配电箱数据
|
||||
*/
|
||||
public DevIotDatas selectDevIotDatasById(Long id);
|
||||
|
||||
/**
|
||||
* 查询配电箱数据列表
|
||||
*
|
||||
* @param devIotDatas 配电箱数据
|
||||
* @return 配电箱数据集合
|
||||
*/
|
||||
public List<DevIotDatas> selectDevIotDatasList(DevIotDatas devIotDatas);
|
||||
|
||||
/**
|
||||
* 新增配电箱数据
|
||||
*
|
||||
* @param devIotDatas 配电箱数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDevIotDatas(DevIotDatas devIotDatas);
|
||||
|
||||
/**
|
||||
* 修改配电箱数据
|
||||
*
|
||||
* @param devIotDatas 配电箱数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDevIotDatas(DevIotDatas devIotDatas);
|
||||
|
||||
/**
|
||||
* 批量删除配电箱数据
|
||||
*
|
||||
* @param ids 需要删除的配电箱数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDevIotDatasByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除配电箱数据信息
|
||||
*
|
||||
* @param id 配电箱数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDevIotDatasById(Long id);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.yanzhu.jh.device.service;
|
||||
|
||||
import com.yanzhu.jh.device.domain.DevIotWarning;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 配电箱预警Service接口
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2025-04-04
|
||||
*/
|
||||
public interface IDevIotWarningService
|
||||
{
|
||||
/**
|
||||
* 查询配电箱预警
|
||||
*
|
||||
* @param id 配电箱预警主键
|
||||
* @return 配电箱预警
|
||||
*/
|
||||
public DevIotWarning selectDevIotWarningById(Long id);
|
||||
|
||||
/**
|
||||
* 查询配电箱预警列表
|
||||
*
|
||||
* @param devIotWarning 配电箱预警
|
||||
* @return 配电箱预警集合
|
||||
*/
|
||||
public List<DevIotWarning> selectDevIotWarningList(DevIotWarning devIotWarning);
|
||||
|
||||
/**
|
||||
* 新增配电箱预警
|
||||
*
|
||||
* @param devIotWarning 配电箱预警
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDevIotWarning(DevIotWarning devIotWarning);
|
||||
|
||||
/**
|
||||
* 修改配电箱预警
|
||||
*
|
||||
* @param devIotWarning 配电箱预警
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDevIotWarning(DevIotWarning devIotWarning);
|
||||
|
||||
/**
|
||||
* 批量删除配电箱预警
|
||||
*
|
||||
* @param ids 需要删除的配电箱预警主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDevIotWarningByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除配电箱预警信息
|
||||
*
|
||||
* @param id 配电箱预警主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDevIotWarningById(Long id);
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
package com.yanzhu.jh.device.service.impl;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.yanzhu.jh.device.domain.DevIotConfigPoint;
|
||||
import com.yanzhu.jh.device.mapper.DevIotConfigPointMapper;
|
||||
import com.yanzhu.jh.device.service.IDevIotConfigPointService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 配电箱配置Service业务层处理
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2025-04-04
|
||||
*/
|
||||
@Service
|
||||
public class DevIotConfigPointServiceImpl implements IDevIotConfigPointService
|
||||
{
|
||||
@Autowired
|
||||
private DevIotConfigPointMapper devIotConfigPointMapper;
|
||||
|
||||
/**
|
||||
* 查询配电箱配置
|
||||
*
|
||||
* @param id 配电箱配置主键
|
||||
* @return 配电箱配置
|
||||
*/
|
||||
@Override
|
||||
public DevIotConfigPoint selectDevIotConfigPointById(Long id)
|
||||
{
|
||||
return devIotConfigPointMapper.selectDevIotConfigPointById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配电箱配置列表
|
||||
*
|
||||
* @param devIotConfigPoint 配电箱配置
|
||||
* @return 配电箱配置
|
||||
*/
|
||||
@Override
|
||||
public List<DevIotConfigPoint> selectDevIotConfigPointList(DevIotConfigPoint devIotConfigPoint)
|
||||
{
|
||||
return devIotConfigPointMapper.selectDevIotConfigPointList(devIotConfigPoint);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增配电箱配置
|
||||
*
|
||||
* @param devIotConfigPoint 配电箱配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDevIotConfigPoint(DevIotConfigPoint devIotConfigPoint)
|
||||
{
|
||||
devIotConfigPoint.setCreateBy(SecurityUtils.getUsername());
|
||||
devIotConfigPoint.setCreateTime(DateUtils.getNowDate());
|
||||
return devIotConfigPointMapper.insertDevIotConfigPoint(devIotConfigPoint);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改配电箱配置
|
||||
*
|
||||
* @param devIotConfigPoint 配电箱配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDevIotConfigPoint(DevIotConfigPoint devIotConfigPoint)
|
||||
{
|
||||
devIotConfigPoint.setUpdateBy(SecurityUtils.getUsername());
|
||||
devIotConfigPoint.setUpdateTime(DateUtils.getNowDate());
|
||||
return devIotConfigPointMapper.updateDevIotConfigPoint(devIotConfigPoint);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除配电箱配置
|
||||
*
|
||||
* @param ids 需要删除的配电箱配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDevIotConfigPointByIds(Long[] ids)
|
||||
{
|
||||
return devIotConfigPointMapper.deleteDevIotConfigPointByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除配电箱配置信息
|
||||
*
|
||||
* @param id 配电箱配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDevIotConfigPointById(Long id)
|
||||
{
|
||||
return devIotConfigPointMapper.deleteDevIotConfigPointById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
package com.yanzhu.jh.device.service.impl;
|
||||
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.yanzhu.jh.device.domain.DevIotConfig;
|
||||
import com.yanzhu.jh.device.mapper.DevIotConfigMapper;
|
||||
import com.yanzhu.jh.device.service.IDevIotConfigService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 配电箱配置Service业务层处理
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2025-04-04
|
||||
*/
|
||||
@Service
|
||||
public class DevIotConfigServiceImpl implements IDevIotConfigService
|
||||
{
|
||||
@Autowired
|
||||
private DevIotConfigMapper devIotConfigMapper;
|
||||
|
||||
/**
|
||||
* 查询配电箱配置
|
||||
*
|
||||
* @param id 配电箱配置主键
|
||||
* @return 配电箱配置
|
||||
*/
|
||||
@Override
|
||||
public DevIotConfig selectDevIotConfigById(Long id)
|
||||
{
|
||||
return devIotConfigMapper.selectDevIotConfigById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配电箱配置列表
|
||||
*
|
||||
* @param devIotConfig 配电箱配置
|
||||
* @return 配电箱配置
|
||||
*/
|
||||
@Override
|
||||
public List<DevIotConfig> selectDevIotConfigList(DevIotConfig devIotConfig)
|
||||
{
|
||||
return devIotConfigMapper.selectDevIotConfigList(devIotConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增配电箱配置
|
||||
*
|
||||
* @param devIotConfig 配电箱配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDevIotConfig(DevIotConfig devIotConfig)
|
||||
{
|
||||
// 判断设备是否重复
|
||||
DevIotConfig configQuery = new DevIotConfig();
|
||||
configQuery.setProjectId(devIotConfig.getProjectId());
|
||||
configQuery.setSignalName(devIotConfig.getSignalName());
|
||||
configQuery.setSignalCode(devIotConfig.getSignalCode());
|
||||
List<DevIotConfig> list = devIotConfigMapper.selectDevIotConfigList(configQuery);
|
||||
if(list.size()>0){
|
||||
throw new ServiceException("配置信息重复添加!");
|
||||
}
|
||||
devIotConfig.setIsDel("99");
|
||||
devIotConfig.setCreateBy(SecurityUtils.getUsername());
|
||||
devIotConfig.setCreateTime(DateUtils.getNowDate());
|
||||
return devIotConfigMapper.insertDevIotConfig(devIotConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改配电箱配置
|
||||
*
|
||||
* @param devIotConfig 配电箱配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDevIotConfig(DevIotConfig devIotConfig)
|
||||
{
|
||||
// 判断设备是否重复
|
||||
if(StringUtils.isNotEmpty(devIotConfig.getSignalName()) && StringUtils.isNotEmpty(devIotConfig.getSignalCode())){
|
||||
DevIotConfig configQuery = new DevIotConfig();
|
||||
configQuery.setProjectId(devIotConfig.getProjectId());
|
||||
configQuery.setSignalName(devIotConfig.getSignalName());
|
||||
configQuery.setSignalCode(devIotConfig.getSignalCode());
|
||||
List<DevIotConfig> list = devIotConfigMapper.selectDevIotConfigList(configQuery);
|
||||
if(list.size()>0 && list.get(0).getId()!=devIotConfig.getId()){
|
||||
throw new ServiceException("配置信息重复添加!");
|
||||
}
|
||||
}
|
||||
devIotConfig.setUpdateBy(SecurityUtils.getUsername());
|
||||
devIotConfig.setUpdateTime(DateUtils.getNowDate());
|
||||
return devIotConfigMapper.updateDevIotConfig(devIotConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除配电箱配置
|
||||
*
|
||||
* @param ids 需要删除的配电箱配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDevIotConfigByIds(Long[] ids)
|
||||
{
|
||||
return devIotConfigMapper.deleteDevIotConfigByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除配电箱配置信息
|
||||
*
|
||||
* @param id 配电箱配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDevIotConfigById(Long id)
|
||||
{
|
||||
return devIotConfigMapper.deleteDevIotConfigById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
package com.yanzhu.jh.device.service.impl;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.yanzhu.jh.device.domain.DevIotDatas;
|
||||
import com.yanzhu.jh.device.mapper.DevIotDatasMapper;
|
||||
import com.yanzhu.jh.device.service.IDevIotDatasService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 配电箱数据Service业务层处理
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2025-04-04
|
||||
*/
|
||||
@Service
|
||||
public class DevIotDatasServiceImpl implements IDevIotDatasService
|
||||
{
|
||||
@Autowired
|
||||
private DevIotDatasMapper devIotDatasMapper;
|
||||
|
||||
/**
|
||||
* 查询配电箱数据
|
||||
*
|
||||
* @param id 配电箱数据主键
|
||||
* @return 配电箱数据
|
||||
*/
|
||||
@Override
|
||||
public DevIotDatas selectDevIotDatasById(Long id)
|
||||
{
|
||||
return devIotDatasMapper.selectDevIotDatasById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配电箱数据列表
|
||||
*
|
||||
* @param devIotDatas 配电箱数据
|
||||
* @return 配电箱数据
|
||||
*/
|
||||
@Override
|
||||
public List<DevIotDatas> selectDevIotDatasList(DevIotDatas devIotDatas)
|
||||
{
|
||||
return devIotDatasMapper.selectDevIotDatasList(devIotDatas);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增配电箱数据
|
||||
*
|
||||
* @param devIotDatas 配电箱数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDevIotDatas(DevIotDatas devIotDatas)
|
||||
{
|
||||
devIotDatas.setCreateTime(DateUtils.getNowDate());
|
||||
return devIotDatasMapper.insertDevIotDatas(devIotDatas);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改配电箱数据
|
||||
*
|
||||
* @param devIotDatas 配电箱数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDevIotDatas(DevIotDatas devIotDatas)
|
||||
{
|
||||
return devIotDatasMapper.updateDevIotDatas(devIotDatas);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除配电箱数据
|
||||
*
|
||||
* @param ids 需要删除的配电箱数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDevIotDatasByIds(Long[] ids)
|
||||
{
|
||||
return devIotDatasMapper.deleteDevIotDatasByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除配电箱数据信息
|
||||
*
|
||||
* @param id 配电箱数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDevIotDatasById(Long id)
|
||||
{
|
||||
return devIotDatasMapper.deleteDevIotDatasById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
package com.yanzhu.jh.device.service.impl;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.yanzhu.jh.device.domain.DevIotWarning;
|
||||
import com.yanzhu.jh.device.mapper.DevIotWarningMapper;
|
||||
import com.yanzhu.jh.device.service.IDevIotWarningService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 配电箱预警Service业务层处理
|
||||
*
|
||||
* @author yanzhu
|
||||
* @date 2025-04-04
|
||||
*/
|
||||
@Service
|
||||
public class DevIotWarningServiceImpl implements IDevIotWarningService
|
||||
{
|
||||
@Autowired
|
||||
private DevIotWarningMapper devIotWarningMapper;
|
||||
|
||||
/**
|
||||
* 查询配电箱预警
|
||||
*
|
||||
* @param id 配电箱预警主键
|
||||
* @return 配电箱预警
|
||||
*/
|
||||
@Override
|
||||
public DevIotWarning selectDevIotWarningById(Long id)
|
||||
{
|
||||
return devIotWarningMapper.selectDevIotWarningById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配电箱预警列表
|
||||
*
|
||||
* @param devIotWarning 配电箱预警
|
||||
* @return 配电箱预警
|
||||
*/
|
||||
@Override
|
||||
public List<DevIotWarning> selectDevIotWarningList(DevIotWarning devIotWarning)
|
||||
{
|
||||
return devIotWarningMapper.selectDevIotWarningList(devIotWarning);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增配电箱预警
|
||||
*
|
||||
* @param devIotWarning 配电箱预警
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDevIotWarning(DevIotWarning devIotWarning)
|
||||
{
|
||||
devIotWarning.setCreateTime(DateUtils.getNowDate());
|
||||
return devIotWarningMapper.insertDevIotWarning(devIotWarning);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改配电箱预警
|
||||
*
|
||||
* @param devIotWarning 配电箱预警
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDevIotWarning(DevIotWarning devIotWarning)
|
||||
{
|
||||
return devIotWarningMapper.updateDevIotWarning(devIotWarning);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除配电箱预警
|
||||
*
|
||||
* @param ids 需要删除的配电箱预警主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDevIotWarningByIds(Long[] ids)
|
||||
{
|
||||
return devIotWarningMapper.deleteDevIotWarningByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除配电箱预警信息
|
||||
*
|
||||
* @param id 配电箱预警主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDevIotWarningById(Long id)
|
||||
{
|
||||
return devIotWarningMapper.deleteDevIotWarningById(id);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -5,8 +5,10 @@ import java.util.*;
|
|||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.yanzhu.jh.device.domain.DevTowerDataRound;
|
||||
import com.yanzhu.jh.device.domain.DevTowerDataWarning;
|
||||
import com.yanzhu.jh.device.mapper.DevTowerDataCollideMapper;
|
||||
import com.yanzhu.jh.device.mapper.DevTowerDataRoundMapper;
|
||||
import com.yanzhu.jh.device.mapper.DevTowerDataWarningMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.yanzhu.jh.device.mapper.DevTowerDataRunMapper;
|
||||
|
|
@ -31,6 +33,9 @@ public class DevTowerDataRunServiceImpl implements IDevTowerDataRunService
|
|||
@Autowired
|
||||
private DevTowerDataCollideMapper devTowerDataCollideMapper;
|
||||
|
||||
@Autowired
|
||||
private DevTowerDataWarningMapper devTowerDataWarningMapper;
|
||||
|
||||
/**
|
||||
* 查询塔机实时数据
|
||||
*
|
||||
|
|
@ -118,13 +123,11 @@ public class DevTowerDataRunServiceImpl implements IDevTowerDataRunService
|
|||
devTowerDataRound.setDeviceKey(deviceSn);
|
||||
int a0 = devTowerDataRoundMapper.findRoundCountByDeviceKey(devTowerDataRound);
|
||||
dataMap.put("a0",a0);
|
||||
devTowerDataRound.setActiveName("cz");
|
||||
int b0 = devTowerDataRoundMapper.findRoundCountByDeviceKey(devTowerDataRound);
|
||||
DevTowerDataWarning devTowerDataWarning = new DevTowerDataWarning();
|
||||
devTowerDataWarning.setDeviceKey(deviceSn);
|
||||
int b0 = devTowerDataWarningMapper.findOverloadWarningCountByDeviceKey(devTowerDataWarning);
|
||||
dataMap.put("b0",b0);
|
||||
devTowerDataRound.setActiveName("gj");
|
||||
int c0 = devTowerDataRunMapper.findRunCountByDeviceKey(devTowerDataRound);
|
||||
//int d0 = devTowerDataRoundMapper.findRoundCountByDeviceKey(devTowerDataRound);
|
||||
//int e0 = devTowerDataCollideMapper.findCollideCountByDeviceKey(devTowerDataRound);
|
||||
int c0 = devTowerDataWarningMapper.findWarningCountByDeviceKey(devTowerDataWarning);
|
||||
dataMap.put("c0",c0);
|
||||
Calendar cale = Calendar.getInstance();
|
||||
// 获取当月第一天和最后一天
|
||||
|
|
@ -145,15 +148,12 @@ public class DevTowerDataRunServiceImpl implements IDevTowerDataRunService
|
|||
params.put("beginCreateTime",firstDay);
|
||||
params.put("endCreateTime",lastDay);
|
||||
devTowerDataRound.setParams(params);
|
||||
devTowerDataWarning.setParams(params);
|
||||
int a1 = devTowerDataRoundMapper.findRoundCountByDeviceKey(devTowerDataRound);
|
||||
dataMap.put("a1",a1);
|
||||
devTowerDataRound.setActiveName("cz");
|
||||
int b1 = devTowerDataRoundMapper.findRoundCountByDeviceKey(devTowerDataRound);
|
||||
int b1 = devTowerDataWarningMapper.findOverloadWarningCountByDeviceKey(devTowerDataWarning);
|
||||
dataMap.put("b1",b1);
|
||||
devTowerDataRound.setActiveName("gj");
|
||||
int c1 = devTowerDataRunMapper.findRunCountByDeviceKey(devTowerDataRound);
|
||||
//int d1 = devTowerDataRoundMapper.findRoundCountByDeviceKey(devTowerDataRound);
|
||||
//int e1 = devTowerDataCollideMapper.findCollideCountByDeviceKey(devTowerDataRound);
|
||||
int c1 = devTowerDataWarningMapper.findWarningCountByDeviceKey(devTowerDataWarning);
|
||||
dataMap.put("c1",c1);
|
||||
return dataMap;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,107 @@
|
|||
<?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.yanzhu.jh.device.mapper.DevIotConfigMapper">
|
||||
|
||||
<resultMap type="DevIotConfig" id="DevIotConfigResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="comId" column="com_id" />
|
||||
<result property="comName" column="com_name" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="projectName" column="project_name" />
|
||||
<result property="signalName" column="signal_name" />
|
||||
<result property="signalCode" column="signal_code" />
|
||||
<result property="factoryName" column="factory_name" />
|
||||
<result property="isDel" column="is_del" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDevIotConfigVo">
|
||||
select dic.id, dic.com_id, dic.project_id, sd.dept_name as com_name, pi.projectName as project_name, dic.signal_name, dic.signal_code, dic.factory_name, dic.is_del, dic.create_by, dic.create_time, dic.update_by, dic.update_time, dic.remark from dev_iot_config dic
|
||||
left join sur_project pi on pi.id = dic.project_id
|
||||
left join sys_dept sd on sd.dept_id = dic.com_id
|
||||
</sql>
|
||||
|
||||
<select id="selectDevIotConfigList" parameterType="DevIotConfig" resultMap="DevIotConfigResult">
|
||||
<include refid="selectDevIotConfigVo"/>
|
||||
<where>
|
||||
<if test="comId != null "> and dic.com_id = #{comId}</if>
|
||||
<if test="projectId != null "> and dic.project_id = #{projectId}</if>
|
||||
<if test="signalName != null and signalName != ''"> and dic.signal_name = #{signalName}</if>
|
||||
<if test="signalCode != null and signalCode != ''"> and dic.signal_code = #{signalCode}</if>
|
||||
<if test="factoryName != null and factoryName != ''"> and dic.factory_name = #{factoryName}</if>
|
||||
<if test="isDel != null and isDel != ''"> and dic.is_del = #{isDel}</if>
|
||||
and dic.is_del != '2'
|
||||
</where>
|
||||
order by dic.id desc
|
||||
</select>
|
||||
|
||||
<select id="selectDevIotConfigById" parameterType="Long" resultMap="DevIotConfigResult">
|
||||
<include refid="selectDevIotConfigVo"/>
|
||||
where dic.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDevIotConfig" parameterType="DevIotConfig" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into dev_iot_config
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="comId != null">com_id,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="signalName != null">signal_name,</if>
|
||||
<if test="signalCode != null">signal_code,</if>
|
||||
<if test="factoryName != null">factory_name,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="comId != null">#{comId},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="signalName != null">#{signalName},</if>
|
||||
<if test="signalCode != null">#{signalCode},</if>
|
||||
<if test="factoryName != null">#{factoryName},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDevIotConfig" parameterType="DevIotConfig">
|
||||
update dev_iot_config
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="comId != null">com_id = #{comId},</if>
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="signalName != null">signal_name = #{signalName},</if>
|
||||
<if test="signalCode != null">signal_code = #{signalCode},</if>
|
||||
<if test="factoryName != null">factory_name = #{factoryName},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteDevIotConfigById" parameterType="Long">
|
||||
update dev_iot_config set is_del = '2' where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteDevIotConfigByIds" parameterType="String">
|
||||
update dev_iot_config set is_del = '2' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,150 @@
|
|||
<?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.yanzhu.jh.device.mapper.DevIotConfigPointMapper">
|
||||
|
||||
<resultMap type="DevIotConfigPoint" id="DevIotConfigPointResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="cfgId" column="cfg_id" />
|
||||
<result property="comId" column="com_id" />
|
||||
<result property="comName" column="com_name" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="projectName" column="project_name" />
|
||||
<result property="deviceSn" column="device_sn" />
|
||||
<result property="deviceName" column="device_name" />
|
||||
<result property="factoryName" column="factory_name" />
|
||||
<result property="contactPerson" column="contact_person" />
|
||||
<result property="contactPersonPhone" column="contact_person_phone" />
|
||||
<result property="levels" column="levels" />
|
||||
<result property="leakageCurrent" column="leakage_current" />
|
||||
<result property="ratedTemperature" column="rated_temperature" />
|
||||
<result property="shortCircuitCurrent" column="short_circuit_current" />
|
||||
<result property="ratedCurrent" column="rated_current" />
|
||||
<result property="ratedVoltage" column="rated_voltage" />
|
||||
<result property="onlineStatus" column="online_status" />
|
||||
<result property="isDel" column="is_del" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDevIotConfigPointVo">
|
||||
select dicp.id, dicp.cfg_id, dicp.com_id, dicp.project_id, sd.dept_name as com_name, pi.projectName as project_name, dicp.device_sn, dicp.device_name, dicp.factory_name, dicp.contact_person, dicp.contact_person_phone, dicp.levels, dicp.leakage_current, dicp.rated_temperature,
|
||||
dicp.short_circuit_current, dicp.rated_current, dicp.rated_voltage, dicp.online_status, dicp.is_del, dicp.create_by, dicp.create_time, dicp.update_by, dicp.update_time, dicp.remark from dev_iot_config_point dicp
|
||||
left join sur_project pi on pi.id = dicp.project_id
|
||||
left join sys_dept sd on sd.dept_id = dicp.com_id
|
||||
</sql>
|
||||
|
||||
<select id="selectDevIotConfigPointList" parameterType="DevIotConfigPoint" resultMap="DevIotConfigPointResult">
|
||||
<include refid="selectDevIotConfigPointVo"/>
|
||||
<where>
|
||||
<if test="cfgId != null "> and dicp.cfg_id = #{cfgId}</if>
|
||||
<if test="comId != null "> and dicp.com_id = #{comId}</if>
|
||||
<if test="projectId != null "> and dicp.project_id = #{projectId}</if>
|
||||
<if test="deviceSn != null and deviceSn != ''"> and dicp.device_sn = #{deviceSn}</if>
|
||||
<if test="deviceName != null and deviceName != ''"> and dicp.device_name like concat('%', #{deviceName}, '%')</if>
|
||||
<if test="factoryName != null and factoryName != ''"> and dicp.factory_name = #{factoryName}</if>
|
||||
<if test="onlineStatus != null and onlineStatus != ''"> and dicp.online_status = #{onlineStatus}</if>
|
||||
<if test="isDel != null and isDel != ''"> and dicp.is_del = #{isDel}</if>
|
||||
and dicp.is_del != '2'
|
||||
</where>
|
||||
order by dicp.id desc
|
||||
</select>
|
||||
|
||||
<select id="selectDevIotConfigPointById" parameterType="Long" resultMap="DevIotConfigPointResult">
|
||||
<include refid="selectDevIotConfigPointVo"/>
|
||||
where dicp.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDevIotConfigPoint" parameterType="DevIotConfigPoint" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into dev_iot_config_point
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgId != null">cfg_id,</if>
|
||||
<if test="comId != null">com_id,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="deviceSn != null">device_sn,</if>
|
||||
<if test="deviceName != null">device_name,</if>
|
||||
<if test="factoryName != null">factory_name,</if>
|
||||
<if test="contactPerson != null">contact_person,</if>
|
||||
<if test="contactPersonPhone != null">contact_person_phone,</if>
|
||||
<if test="levels != null">levels,</if>
|
||||
<if test="leakageCurrent != null">leakage_current,</if>
|
||||
<if test="ratedTemperature != null">rated_temperature,</if>
|
||||
<if test="shortCircuitCurrent != null">short_circuit_current,</if>
|
||||
<if test="ratedCurrent != null">rated_current,</if>
|
||||
<if test="ratedVoltage != null">rated_voltage,</if>
|
||||
<if test="onlineStatus != null">online_status,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgId != null">#{cfgId},</if>
|
||||
<if test="comId != null">#{comId},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="deviceSn != null">#{deviceSn},</if>
|
||||
<if test="deviceName != null">#{deviceName},</if>
|
||||
<if test="factoryName != null">#{factoryName},</if>
|
||||
<if test="contactPerson != null">#{contactPerson},</if>
|
||||
<if test="contactPersonPhone != null">#{contactPersonPhone},</if>
|
||||
<if test="levels != null">#{levels},</if>
|
||||
<if test="leakageCurrent != null">#{leakageCurrent},</if>
|
||||
<if test="ratedTemperature != null">#{ratedTemperature},</if>
|
||||
<if test="shortCircuitCurrent != null">#{shortCircuitCurrent},</if>
|
||||
<if test="ratedCurrent != null">#{ratedCurrent},</if>
|
||||
<if test="ratedVoltage != null">#{ratedVoltage},</if>
|
||||
<if test="onlineStatus != null">#{onlineStatus},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDevIotConfigPoint" parameterType="DevIotConfigPoint">
|
||||
update dev_iot_config_point
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="cfgId != null">cfg_id = #{cfgId},</if>
|
||||
<if test="comId != null">com_id = #{comId},</if>
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="deviceSn != null">device_sn = #{deviceSn},</if>
|
||||
<if test="deviceName != null">device_name = #{deviceName},</if>
|
||||
<if test="factoryName != null">factory_name = #{factoryName},</if>
|
||||
<if test="contactPerson != null">contact_person = #{contactPerson},</if>
|
||||
<if test="contactPersonPhone != null">contact_person_phone = #{contactPersonPhone},</if>
|
||||
<if test="levels != null">levels = #{levels},</if>
|
||||
<if test="leakageCurrent != null">leakage_current = #{leakageCurrent},</if>
|
||||
<if test="ratedTemperature != null">rated_temperature = #{ratedTemperature},</if>
|
||||
<if test="shortCircuitCurrent != null">short_circuit_current = #{shortCircuitCurrent},</if>
|
||||
<if test="ratedCurrent != null">rated_current = #{ratedCurrent},</if>
|
||||
<if test="ratedVoltage != null">rated_voltage = #{ratedVoltage},</if>
|
||||
<if test="onlineStatus != null">online_status = #{onlineStatus},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteDevIotConfigPointById" parameterType="Long">
|
||||
update dev_iot_config_point set is_del = '2' where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteDevIotConfigPointByIds" parameterType="String">
|
||||
update dev_iot_config_point set is_del = '2' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
<?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.yanzhu.jh.device.mapper.DevIotDatasMapper">
|
||||
|
||||
<resultMap type="DevIotDatas" id="DevIotDatasResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="cfgId" column="cfg_id" />
|
||||
<result property="pointId" column="point_id" />
|
||||
<result property="comId" column="com_id" />
|
||||
<result property="comName" column="com_name" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="projectName" column="project_name" />
|
||||
<result property="deviceSn" column="device_sn" />
|
||||
<result property="switchesAc" column="switches_ac" />
|
||||
<result property="switchesSwitch" column="switches_switch" />
|
||||
<result property="switchesSwitches" column="switches_switches" />
|
||||
<result property="switchesSwitchstatus" column="switches_switchStatus" />
|
||||
<result property="temperature" column="temperature" />
|
||||
<result property="leakage" column="leakage" />
|
||||
<result property="voltageA" column="voltage_a" />
|
||||
<result property="voltageB" column="voltage_b" />
|
||||
<result property="voltageC" column="voltage_c" />
|
||||
<result property="voltageAb" column="voltage_ab" />
|
||||
<result property="voltageBc" column="voltage_bc" />
|
||||
<result property="voltageCa" column="voltage_ca" />
|
||||
<result property="currentA" column="current_a" />
|
||||
<result property="currentB" column="current_b" />
|
||||
<result property="currentC" column="current_c" />
|
||||
<result property="powerA" column="power_a" />
|
||||
<result property="powerB" column="power_b" />
|
||||
<result property="powerC" column="power_c" />
|
||||
<result property="energyA" column="energy_a" />
|
||||
<result property="energyB" column="energy_b" />
|
||||
<result property="energyC" column="energy_c" />
|
||||
<result property="factorA" column="factor_a" />
|
||||
<result property="factorB" column="factor_b" />
|
||||
<result property="factorC" column="factor_c" />
|
||||
<result property="frequencyA" column="frequency_a" />
|
||||
<result property="frequencyB" column="frequency_b" />
|
||||
<result property="frequencyC" column="frequency_c" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDevIotDatasVo">
|
||||
select did.id, did.cfg_id, did.point_id, did.com_id, did.project_id, sd.dept_name as com_name, pi.projectName as project_name, did.device_sn, did.switches_ac, did.switches_switch, did.switches_switches, did.switches_switchStatus, did.temperature, did.leakage, did.voltage_a, did.voltage_b, did.voltage_c, did.voltage_ab, did.voltage_bc, did.voltage_ca, did.current_a, did.current_b, did.current_c, did.power_a, power_b, power_c,
|
||||
did.energy_a, did.energy_b, did.energy_c, did.factor_a, did.factor_b, did.factor_c, did.frequency_a, did.frequency_b, did.frequency_c, did.create_time from dev_iot_datas did
|
||||
left join sur_project pi on pi.id = did.project_id
|
||||
left join sys_dept sd on sd.dept_id = did.com_id
|
||||
</sql>
|
||||
|
||||
<select id="selectDevIotDatasList" parameterType="DevIotDatas" resultMap="DevIotDatasResult">
|
||||
<include refid="selectDevIotDatasVo"/>
|
||||
<where>
|
||||
<if test="cfgId != null "> and did.cfg_id = #{cfgId}</if>
|
||||
<if test="pointId != null "> and did.point_id = #{pointId}</if>
|
||||
<if test="comId != null "> and did.com_id = #{comId}</if>
|
||||
<if test="projectId != null "> and did.project_id = #{projectId}</if>
|
||||
<if test="activeComId != null "> and did.com_id = #{activeComId}</if>
|
||||
<if test="activeProjectId != null "> and did.project_id = #{activeProjectId}</if>
|
||||
<if test="deviceSn != null and deviceSn != ''"> and did.device_sn = #{deviceSn}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and did.create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
|
||||
</where>
|
||||
order by did.id desc
|
||||
</select>
|
||||
|
||||
<select id="selectDevIotDatasById" parameterType="Long" resultMap="DevIotDatasResult">
|
||||
<include refid="selectDevIotDatasVo"/>
|
||||
where did.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDevIotDatas" parameterType="DevIotDatas" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into dev_iot_datas
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgId != null">cfg_id,</if>
|
||||
<if test="pointId != null">point_id,</if>
|
||||
<if test="comId != null">com_id,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="deviceSn != null">device_sn,</if>
|
||||
<if test="switchesAc != null">switches_ac,</if>
|
||||
<if test="switchesSwitch != null">switches_switch,</if>
|
||||
<if test="switchesSwitches != null">switches_switches,</if>
|
||||
<if test="switchesSwitchstatus != null">switches_switchStatus,</if>
|
||||
<if test="temperature != null">temperature,</if>
|
||||
<if test="leakage != null">leakage,</if>
|
||||
<if test="voltageA != null">voltage_a,</if>
|
||||
<if test="voltageB != null">voltage_b,</if>
|
||||
<if test="voltageC != null">voltage_c,</if>
|
||||
<if test="voltageAb != null">voltage_ab,</if>
|
||||
<if test="voltageBc != null">voltage_bc,</if>
|
||||
<if test="voltageCa != null">voltage_ca,</if>
|
||||
<if test="currentA != null">current_a,</if>
|
||||
<if test="currentB != null">current_b,</if>
|
||||
<if test="currentC != null">current_c,</if>
|
||||
<if test="powerA != null">power_a,</if>
|
||||
<if test="powerB != null">power_b,</if>
|
||||
<if test="powerC != null">power_c,</if>
|
||||
<if test="energyA != null">energy_a,</if>
|
||||
<if test="energyB != null">energy_b,</if>
|
||||
<if test="energyC != null">energy_c,</if>
|
||||
<if test="factorA != null">factor_a,</if>
|
||||
<if test="factorB != null">factor_b,</if>
|
||||
<if test="factorC != null">factor_c,</if>
|
||||
<if test="frequencyA != null">frequency_a,</if>
|
||||
<if test="frequencyB != null">frequency_b,</if>
|
||||
<if test="frequencyC != null">frequency_c,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgId != null">#{cfgId},</if>
|
||||
<if test="pointId != null">#{pointId},</if>
|
||||
<if test="comId != null">#{comId},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="deviceSn != null">#{deviceSn},</if>
|
||||
<if test="switchesAc != null">#{switchesAc},</if>
|
||||
<if test="switchesSwitch != null">#{switchesSwitch},</if>
|
||||
<if test="switchesSwitches != null">#{switchesSwitches},</if>
|
||||
<if test="switchesSwitchstatus != null">#{switchesSwitchstatus},</if>
|
||||
<if test="temperature != null">#{temperature},</if>
|
||||
<if test="leakage != null">#{leakage},</if>
|
||||
<if test="voltageA != null">#{voltageA},</if>
|
||||
<if test="voltageB != null">#{voltageB},</if>
|
||||
<if test="voltageC != null">#{voltageC},</if>
|
||||
<if test="voltageAb != null">#{voltageAb},</if>
|
||||
<if test="voltageBc != null">#{voltageBc},</if>
|
||||
<if test="voltageCa != null">#{voltageCa},</if>
|
||||
<if test="currentA != null">#{currentA},</if>
|
||||
<if test="currentB != null">#{currentB},</if>
|
||||
<if test="currentC != null">#{currentC},</if>
|
||||
<if test="powerA != null">#{powerA},</if>
|
||||
<if test="powerB != null">#{powerB},</if>
|
||||
<if test="powerC != null">#{powerC},</if>
|
||||
<if test="energyA != null">#{energyA},</if>
|
||||
<if test="energyB != null">#{energyB},</if>
|
||||
<if test="energyC != null">#{energyC},</if>
|
||||
<if test="factorA != null">#{factorA},</if>
|
||||
<if test="factorB != null">#{factorB},</if>
|
||||
<if test="factorC != null">#{factorC},</if>
|
||||
<if test="frequencyA != null">#{frequencyA},</if>
|
||||
<if test="frequencyB != null">#{frequencyB},</if>
|
||||
<if test="frequencyC != null">#{frequencyC},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDevIotDatas" parameterType="DevIotDatas">
|
||||
update dev_iot_datas
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="cfgId != null">cfg_id = #{cfgId},</if>
|
||||
<if test="pointId != null">point_id = #{pointId},</if>
|
||||
<if test="comId != null">com_id = #{comId},</if>
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="deviceSn != null">device_sn = #{deviceSn},</if>
|
||||
<if test="switchesAc != null">switches_ac = #{switchesAc},</if>
|
||||
<if test="switchesSwitch != null">switches_switch = #{switchesSwitch},</if>
|
||||
<if test="switchesSwitches != null">switches_switches = #{switchesSwitches},</if>
|
||||
<if test="switchesSwitchstatus != null">switches_switchStatus = #{switchesSwitchstatus},</if>
|
||||
<if test="temperature != null">temperature = #{temperature},</if>
|
||||
<if test="leakage != null">leakage = #{leakage},</if>
|
||||
<if test="voltageA != null">voltage_a = #{voltageA},</if>
|
||||
<if test="voltageB != null">voltage_b = #{voltageB},</if>
|
||||
<if test="voltageC != null">voltage_c = #{voltageC},</if>
|
||||
<if test="voltageAb != null">voltage_ab = #{voltageAb},</if>
|
||||
<if test="voltageBc != null">voltage_bc = #{voltageBc},</if>
|
||||
<if test="voltageCa != null">voltage_ca = #{voltageCa},</if>
|
||||
<if test="currentA != null">current_a = #{currentA},</if>
|
||||
<if test="currentB != null">current_b = #{currentB},</if>
|
||||
<if test="currentC != null">current_c = #{currentC},</if>
|
||||
<if test="powerA != null">power_a = #{powerA},</if>
|
||||
<if test="powerB != null">power_b = #{powerB},</if>
|
||||
<if test="powerC != null">power_c = #{powerC},</if>
|
||||
<if test="energyA != null">energy_a = #{energyA},</if>
|
||||
<if test="energyB != null">energy_b = #{energyB},</if>
|
||||
<if test="energyC != null">energy_c = #{energyC},</if>
|
||||
<if test="factorA != null">factor_a = #{factorA},</if>
|
||||
<if test="factorB != null">factor_b = #{factorB},</if>
|
||||
<if test="factorC != null">factor_c = #{factorC},</if>
|
||||
<if test="frequencyA != null">frequency_a = #{frequencyA},</if>
|
||||
<if test="frequencyB != null">frequency_b = #{frequencyB},</if>
|
||||
<if test="frequencyC != null">frequency_c = #{frequencyC},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDevIotDatasById" parameterType="Long">
|
||||
delete from dev_iot_datas where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDevIotDatasByIds" parameterType="String">
|
||||
delete from dev_iot_datas where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
<?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.yanzhu.jh.device.mapper.DevIotWarningMapper">
|
||||
|
||||
<resultMap type="DevIotWarning" id="DevIotWarningResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="cfgId" column="cfg_id" />
|
||||
<result property="pointId" column="point_id" />
|
||||
<result property="comId" column="com_id" />
|
||||
<result property="comName" column="com_name" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="projectName" column="project_name" />
|
||||
<result property="deviceSn" column="device_sn" />
|
||||
<result property="warningType" column="warning_type" />
|
||||
<result property="warningContent" column="warning_content" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDevIotWarningVo">
|
||||
select diw.id, diw.cfg_id, diw.point_id, diw.com_id, diw.project_id, sd.dept_name as com_name, pi.projectName as project_name, diw.device_sn, diw.warning_type, diw.warning_content, diw.create_time from dev_iot_warning diw
|
||||
left join sur_project pi on pi.id = diw.project_id
|
||||
left join sys_dept sd on sd.dept_id = diw.com_id
|
||||
</sql>
|
||||
|
||||
<select id="selectDevIotWarningList" parameterType="DevIotWarning" resultMap="DevIotWarningResult">
|
||||
<include refid="selectDevIotWarningVo"/>
|
||||
<where>
|
||||
<if test="cfgId != null "> and diw.cfg_id = #{cfgId}</if>
|
||||
<if test="pointId != null "> and diw.point_id = #{pointId}</if>
|
||||
<if test="comId != null "> and diw.com_id = #{comId}</if>
|
||||
<if test="projectId != null "> and diw.project_id = #{projectId}</if>
|
||||
<if test="deviceSn != null and deviceSn != ''"> and diw.device_sn = #{deviceSn}</if>
|
||||
<if test="warningType != null and warningType != ''"> and diw.warning_type = #{warningType}</if>
|
||||
<if test="warningContent != null and warningContent != ''"> and diw.warning_content = #{warningContent}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and diw.create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
|
||||
</where>
|
||||
order by diw.id desc
|
||||
</select>
|
||||
|
||||
<select id="selectDevIotWarningById" parameterType="Long" resultMap="DevIotWarningResult">
|
||||
<include refid="selectDevIotWarningVo"/>
|
||||
where diw.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDevIotWarning" parameterType="DevIotWarning" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into dev_iot_warning
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgId != null">cfg_id,</if>
|
||||
<if test="pointId != null">point_id,</if>
|
||||
<if test="comId != null">com_id,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="deviceSn != null">device_sn,</if>
|
||||
<if test="warningType != null">warning_type,</if>
|
||||
<if test="warningContent != null">warning_content,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgId != null">#{cfgId},</if>
|
||||
<if test="pointId != null">#{pointId},</if>
|
||||
<if test="comId != null">#{comId},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="deviceSn != null">#{deviceSn},</if>
|
||||
<if test="warningType != null">#{warningType},</if>
|
||||
<if test="warningContent != null">#{warningContent},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDevIotWarning" parameterType="DevIotWarning">
|
||||
update dev_iot_warning
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="cfgId != null">cfg_id = #{cfgId},</if>
|
||||
<if test="pointId != null">point_id = #{pointId},</if>
|
||||
<if test="comId != null">com_id = #{comId},</if>
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="deviceSn != null">device_sn = #{deviceSn},</if>
|
||||
<if test="warningType != null">warning_type = #{warningType},</if>
|
||||
<if test="warningContent != null">warning_content = #{warningContent},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDevIotWarningById" parameterType="Long">
|
||||
delete from dev_iot_warning where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDevIotWarningByIds" parameterType="String">
|
||||
delete from dev_iot_warning where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -17,8 +17,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="warnType" column="warn_type" />
|
||||
<result property="warnName" column="warn_name" />
|
||||
<result property="warnNote" column="warn_note" />
|
||||
<result property="warnData" column="warn_data" />
|
||||
<result property="realData" column="real_data" />
|
||||
<result property="height" column="height" />
|
||||
<result property="range" column="range" />
|
||||
<result property="rotation" column="rotation" />
|
||||
<result property="load" column="load" />
|
||||
<result property="windSpeed" column="wind_speed" />
|
||||
<result property="leanAngleX" column="lean_angle_x" />
|
||||
<result property="leanAngleY" column="lean_angle_y" />
|
||||
<result property="momentPercent" column="moment_percent" />
|
||||
<result property="rate" column="rate" />
|
||||
<result property="alarmed" column="alarmed" />
|
||||
<result property="isDel" column="is_del" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
|
|
@ -28,7 +36,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectDevTowerDataWarningVo">
|
||||
select dtdw.id, dtdw.cfg_id, dtdw.project_id, dtdw.dept_id, sp.projectName, sd.dept_name, dtdw.device_key, dtdw.device_source, dtdw.tower_id, dtdw.warn_type, dtdw.warn_name, dtdw.warn_note, dtdw.warn_data, dtdw.real_data, dtdw.is_del, dtdw.create_by, dtdw.create_time, dtdw.update_by, dtdw.update_time, dtdw.remark from dev_tower_data_warning dtdw
|
||||
select dtdw.id, dtdw.cfg_id, dtdw.project_id, dtdw.dept_id, sp.projectName, sd.dept_name,
|
||||
dtdw.device_key,
|
||||
dtdw.device_source,
|
||||
dtdw.tower_id,
|
||||
dtdw.warn_type,
|
||||
dtdw.warn_name,
|
||||
IFNULL(dtdw.warn_note,sdd.dict_label) as warn_note,
|
||||
dtdw.height,
|
||||
dtdw.range,
|
||||
dtdw.rotation,
|
||||
dtdw.load,
|
||||
dtdw.wind_speed,
|
||||
dtdw.lean_angle_x,
|
||||
dtdw.lean_angle_y,
|
||||
dtdw.moment_percent,
|
||||
dtdw.rate,
|
||||
dtdw.alarmed,
|
||||
dtdw.is_del,
|
||||
dtdw.create_by,
|
||||
dtdw.create_time,
|
||||
dtdw.update_by,
|
||||
dtdw.update_time,
|
||||
dtdw.remark
|
||||
from dev_tower_data_warning dtdw
|
||||
left join sur_project sp on sp.id = dtdw.project_id
|
||||
left join sys_dept sd on sd.dept_id = dtdw.dept_id
|
||||
</sql>
|
||||
|
|
@ -46,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="towerId != null and towerId != ''"> and dtdw.tower_id = #{towerId}</if>
|
||||
<if test="warnType != null "> and dtdw.warn_type = #{warnType}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and dtdw.create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
|
||||
and dtdw.is_del=0
|
||||
</where>
|
||||
order by dtdw.id desc
|
||||
</select>
|
||||
|
|
@ -67,8 +99,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="warnType != null">warn_type,</if>
|
||||
<if test="warnName != null">warn_name,</if>
|
||||
<if test="warnNote != null">warn_note,</if>
|
||||
<if test="warnData != null">warn_data,</if>
|
||||
<if test="realData != null">real_data,</if>
|
||||
<if test="height != null">height,</if>
|
||||
<if test="range != null">`range`,</if>
|
||||
<if test="rotation != null">rotation,</if>
|
||||
<if test="load != null">`load`,</if>
|
||||
<if test="windSpeed != null">wind_speed,</if>
|
||||
<if test="leanAngleX != null">lean_angle_x,</if>
|
||||
<if test="leanAngleY != null">lean_angle_y,</if>
|
||||
<if test="momentPercent != null">moment_percent,</if>
|
||||
<if test="rate != null">rate,</if>
|
||||
<if test="alarmed != null">alarmed,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
|
|
@ -86,8 +126,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="warnType != null">#{warnType},</if>
|
||||
<if test="warnName != null">#{warnName},</if>
|
||||
<if test="warnNote != null">#{warnNote},</if>
|
||||
<if test="warnData != null">#{warnData},</if>
|
||||
<if test="realData != null">#{realData},</if>
|
||||
<if test="height != null">#{height},</if>
|
||||
<if test="range != null">#{range},</if>
|
||||
<if test="rotation != null">#{rotation},</if>
|
||||
<if test="load != null">#{load},</if>
|
||||
<if test="windSpeed != null">#{windSpeed},</if>
|
||||
<if test="leanAngleX != null">#{leanAngleX},</if>
|
||||
<if test="leanAngleY != null">#{leanAngleY},</if>
|
||||
<if test="momentPercent != null">#{momentPercent},</if>
|
||||
<if test="rate != null">#{rate},</if>
|
||||
<if test="alarmed != null">#{alarmed},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
|
|
@ -109,8 +157,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="warnType != null">warn_type = #{warnType},</if>
|
||||
<if test="warnName != null">warn_name = #{warnName},</if>
|
||||
<if test="warnNote != null">warn_note = #{warnNote},</if>
|
||||
<if test="warnData != null">warn_data = #{warnData},</if>
|
||||
<if test="realData != null">real_data = #{realData},</if>
|
||||
<if test="height != null">height = #{height},</if>
|
||||
<if test="range != null">`range` = #{range},</if>
|
||||
<if test="rotation != null">rotation = #{rotation},</if>
|
||||
<if test="load != null">`load` = #{load},</if>
|
||||
<if test="windSpeed != null">wind_speed = #{windSpeed},</if>
|
||||
<if test="leanAngleX != null">lean_angle_x = #{leanAngleX},</if>
|
||||
<if test="leanAngleY != null">lean_angle_y = #{leanAngleY},</if>
|
||||
<if test="momentPercent != null">moment_percent = #{momentPercent},</if>
|
||||
<if test="rate != null">rate = #{rate},</if>
|
||||
<if test="alarmed != null">alarmed = #{alarmed},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
|
|
@ -131,4 +187,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="findWarningCountByDeviceKey" parameterType="DevTowerDataWarning" resultType="Int">
|
||||
select count(1) as total from dev_tower_data_warning
|
||||
<where>
|
||||
<if test="deviceKey != null and deviceKey != ''">and device_key = #{deviceKey}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and date(create_time) between #{params.beginCreateTime} and #{params.endCreateTime}</if>
|
||||
and is_del=0
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="findOverloadWarningCountByDeviceKey" parameterType="DevTowerDataWarning" resultType="Int">
|
||||
select count(1) as total from dev_tower_data_warning
|
||||
<where>
|
||||
<if test="deviceKey != null and deviceKey != ''">and device_key = #{deviceKey}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and date(create_time) between #{params.beginCreateTime} and #{params.endCreateTime}</if>
|
||||
and warn_type in (7,8,9,106) and is_del=0
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue