DDS数据同步
This commit is contained in:
@ -36,4 +36,14 @@ public class RedisKeyConstants
|
||||
* 电表数据 redis key
|
||||
*/
|
||||
public static final String AMMETER = "AMMETER_";
|
||||
|
||||
/**
|
||||
* 动环数据 redis key
|
||||
*/
|
||||
public static final String DH = "DH_";
|
||||
|
||||
/**
|
||||
* 电池组 redis key
|
||||
*/
|
||||
public static final String GROUP = "GROUP_";
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@ import com.xzzn.common.annotation.Excel;
|
||||
* 总数据对象 ems_ammeter_data
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-07-27
|
||||
* @date 2025-07-29
|
||||
*/
|
||||
public class EmsAmmeterData extends BaseEntity
|
||||
{
|
||||
@ -418,6 +418,242 @@ public class EmsAmmeterData extends BaseEntity
|
||||
@Excel(name = "平均电流")
|
||||
private BigDecimal avgCurrent;
|
||||
|
||||
/** 总正向有功电能2 */
|
||||
@Excel(name = "总正向有功电能2")
|
||||
private BigDecimal totalForwardActiveTwo;
|
||||
|
||||
/** 总尖正向有功电能 */
|
||||
@Excel(name = "总尖正向有功电能")
|
||||
private BigDecimal totalPeakForwardActive;
|
||||
|
||||
/** 总峰正向有功电能 */
|
||||
@Excel(name = "总峰正向有功电能")
|
||||
private BigDecimal totalHighForwardActive;
|
||||
|
||||
/** 总平正向有功电能 */
|
||||
@Excel(name = "总平正向有功电能")
|
||||
private BigDecimal totalFlatForwardActive;
|
||||
|
||||
/** 总谷正向有功电能 */
|
||||
@Excel(name = "总谷正向有功电能")
|
||||
private BigDecimal totalValleyForwardActive;
|
||||
|
||||
/** 总反向有功电能2 */
|
||||
@Excel(name = "总反向有功电能2")
|
||||
private BigDecimal totalReverseActiveTwo;
|
||||
|
||||
/** 总尖反向有功电能 */
|
||||
@Excel(name = "总尖反向有功电能")
|
||||
private BigDecimal totalPeakReverseActive;
|
||||
|
||||
/** 总峰反向有功电能 */
|
||||
@Excel(name = "总峰反向有功电能")
|
||||
private BigDecimal totalHighReverseActive;
|
||||
|
||||
/** 总平反向有功电能 */
|
||||
@Excel(name = "总平反向有功电能")
|
||||
private BigDecimal totalFlatReverseActive;
|
||||
|
||||
/** 总谷反向有功电能 */
|
||||
@Excel(name = "总谷反向有功电能")
|
||||
private BigDecimal totalValleyReverseActive;
|
||||
|
||||
/** 断线检测指示 */
|
||||
@Excel(name = "断线检测指示")
|
||||
private String disconnectDetectionIndication;
|
||||
|
||||
/** 额定一次电流值 */
|
||||
@Excel(name = "额定一次电流值")
|
||||
private BigDecimal ratedPrimaryCurrentValue;
|
||||
|
||||
/** 开关量输入输出状态 */
|
||||
@Excel(name = "开关量输入输出状态")
|
||||
private String switchInputOutputStatus;
|
||||
|
||||
/** 报警状态 */
|
||||
@Excel(name = "报警状态")
|
||||
private String alarmStatus;
|
||||
|
||||
/** 当前总电压百分比 */
|
||||
@Excel(name = "当前总电压百分比")
|
||||
private BigDecimal currentTotalVoltagePercent;
|
||||
|
||||
/** 电压直流含量百分比 */
|
||||
@Excel(name = "电压直流含量百分比")
|
||||
private BigDecimal voltageContentPercent;
|
||||
|
||||
/** 电压交流含量百分比 */
|
||||
@Excel(name = "电压交流含量百分比")
|
||||
private BigDecimal voltageAcPercent;
|
||||
|
||||
/** 当前总电流百分比 */
|
||||
@Excel(name = "当前总电流百分比")
|
||||
private BigDecimal currentTotalCurrentPercent;
|
||||
|
||||
/** 电流直流含量百分比 */
|
||||
@Excel(name = "电流直流含量百分比")
|
||||
private BigDecimal currentContentPercent;
|
||||
|
||||
/** 电流交流含量百分比 */
|
||||
@Excel(name = "电流交流含量百分比")
|
||||
private BigDecimal currentAcPercent;
|
||||
|
||||
/** 当前总功率百分比 */
|
||||
@Excel(name = "当前总功率百分比")
|
||||
private BigDecimal currentTotalPowerPercent;
|
||||
|
||||
/** 功率直流含量百分比 */
|
||||
@Excel(name = "功率直流含量百分比")
|
||||
private BigDecimal powerContentPercent;
|
||||
|
||||
/** 功率交流含量百分比 */
|
||||
@Excel(name = "功率交流含量百分比")
|
||||
private BigDecimal powerAcPercent;
|
||||
|
||||
/** 日期时间设置(年月) */
|
||||
@Excel(name = "日期时间设置", readConverterExp = "年=月")
|
||||
private String dataSettingYearMonth;
|
||||
|
||||
/** 日期时间设置(日时) */
|
||||
@Excel(name = "日期时间设置", readConverterExp = "日=时")
|
||||
private String dataSettingDayHour;
|
||||
|
||||
/** 日期时间设置(分秒) */
|
||||
@Excel(name = "日期时间设置", readConverterExp = "分=秒")
|
||||
private String dataSettingMinutesSeconds;
|
||||
|
||||
/** 当前抄表日(高)、当前费率(低) */
|
||||
@Excel(name = "当前抄表日", readConverterExp = "高=")
|
||||
private BigDecimal currentRate;
|
||||
|
||||
/** 软件版本号 */
|
||||
@Excel(name = "软件版本号")
|
||||
private String versionNumber;
|
||||
|
||||
/** 电压 */
|
||||
@Excel(name = "电压")
|
||||
private BigDecimal voltage;
|
||||
|
||||
/** 电流 */
|
||||
@Excel(name = "电流")
|
||||
private BigDecimal current;
|
||||
|
||||
/** 功率 */
|
||||
@Excel(name = "功率")
|
||||
private BigDecimal power;
|
||||
|
||||
/** 内部温度 */
|
||||
@Excel(name = "内部温度")
|
||||
private BigDecimal internalTemp;
|
||||
|
||||
/** 总正向有功电能1 */
|
||||
@Excel(name = "总正向有功电能1")
|
||||
private BigDecimal totalForwardActiveOne;
|
||||
|
||||
/** 总反向有功电能1 */
|
||||
@Excel(name = "总反向有功电能1")
|
||||
private BigDecimal totalReverseActiveOne;
|
||||
|
||||
/** 正向无功最大需量 */
|
||||
@Excel(name = "正向无功最大需量")
|
||||
private BigDecimal forwardReactiveMaxDemand;
|
||||
|
||||
/** 反向无功最大需量 */
|
||||
@Excel(name = "反向无功最大需量")
|
||||
private BigDecimal reverseReactiveMaxDemand;
|
||||
|
||||
/** A 相正向有功电能 */
|
||||
@Excel(name = "A 相正向有功电能")
|
||||
private BigDecimal aForwardActiveEnergy;
|
||||
|
||||
/** B 相正向有功电能 */
|
||||
@Excel(name = "B 相正向有功电能")
|
||||
private BigDecimal bForwardActiveEnergy;
|
||||
|
||||
/** C 相正向有功电能 */
|
||||
@Excel(name = "C 相正向有功电能")
|
||||
private BigDecimal cForwardActiveEnergy;
|
||||
|
||||
/** DIDO 状态、失压状态 */
|
||||
@Excel(name = "DIDO 状态、失压状态")
|
||||
private String didoStatus;
|
||||
|
||||
/** 运行状态 1(高 8 位)/运行状态 2(低 8 位) */
|
||||
@Excel(name = "运行状态 1", readConverterExp = "高=,8=,位=")
|
||||
private String runningStatus;
|
||||
|
||||
/** 零序电流 */
|
||||
@Excel(name = "零序电流")
|
||||
private BigDecimal zeroSeqCurrent;
|
||||
|
||||
/** 电压不平衡度 */
|
||||
@Excel(name = "电压不平衡度")
|
||||
private BigDecimal voltageUnbalanceDegree;
|
||||
|
||||
/** 电流不平衡度 */
|
||||
@Excel(name = "电流不平衡度")
|
||||
private BigDecimal currentUnbalanceDegree;
|
||||
|
||||
/** 当日反向有功最大需量 */
|
||||
@Excel(name = "当日反向有功最大需量")
|
||||
private BigDecimal dailyReverseAcMaxDemand;
|
||||
|
||||
/** 当日正向无功最大需量 */
|
||||
@Excel(name = "当日正向无功最大需量")
|
||||
private BigDecimal dailyForwardReacMaxDemand;
|
||||
|
||||
/** 当日反向无功最大需量 */
|
||||
@Excel(name = "当日反向无功最大需量")
|
||||
private BigDecimal dailyReverseReacMaxDemand;
|
||||
|
||||
/** 上 1 日正向有功最大需量 */
|
||||
@Excel(name = "上 1 日正向有功最大需量")
|
||||
private BigDecimal preDayForwardAcMaxDemand;
|
||||
|
||||
/** 上 1 日反向有功最大需量 */
|
||||
@Excel(name = "上 1 日反向有功最大需量")
|
||||
private BigDecimal preDayReverseAcMaxDemand;
|
||||
|
||||
/** 上 1 日正向无功最大需量 */
|
||||
@Excel(name = "上 1 日正向无功最大需量")
|
||||
private BigDecimal preDayForwardReacMaxDemand;
|
||||
|
||||
/** 上 1 日反向无功最大需量 */
|
||||
@Excel(name = "上 1 日反向无功最大需量")
|
||||
private BigDecimal preDayReverseReacMaxDemand;
|
||||
|
||||
/** 上 2 日正向有功最大需量 */
|
||||
@Excel(name = "上 2 日正向有功最大需量")
|
||||
private BigDecimal pre2dForwardAcMaxDemand;
|
||||
|
||||
/** 上 2 日反向有功最大需量 */
|
||||
@Excel(name = "上 2 日反向有功最大需量")
|
||||
private BigDecimal pre2dReverseAcMaxDemand;
|
||||
|
||||
/** 上 2 日正向无功最大需量 */
|
||||
@Excel(name = "上 2 日正向无功最大需量")
|
||||
private BigDecimal pre2dForwardReacMaxDemand;
|
||||
|
||||
/** 上 2 日反向无功最大需量 */
|
||||
@Excel(name = "上 2 日反向无功最大需量")
|
||||
private BigDecimal pre2dReverseReacMaxDemand;
|
||||
|
||||
/** 当前正向有功需量 */
|
||||
@Excel(name = "当前正向有功需量")
|
||||
private BigDecimal currentForwardAcDemand;
|
||||
|
||||
/** 当前反向有功需量 */
|
||||
@Excel(name = "当前反向有功需量")
|
||||
private BigDecimal currentReverseAcDemand;
|
||||
|
||||
/** 当前正向无功需量 */
|
||||
@Excel(name = "当前正向无功需量")
|
||||
private BigDecimal currentForwardReacDemand;
|
||||
|
||||
/** 当前反向无功需量 */
|
||||
@Excel(name = "当前反向无功需量")
|
||||
private BigDecimal currentReverseReacDemand;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
@ -1418,6 +1654,596 @@ public class EmsAmmeterData extends BaseEntity
|
||||
return avgCurrent;
|
||||
}
|
||||
|
||||
public void setTotalForwardActiveTwo(BigDecimal totalForwardActiveTwo)
|
||||
{
|
||||
this.totalForwardActiveTwo = totalForwardActiveTwo;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalForwardActiveTwo()
|
||||
{
|
||||
return totalForwardActiveTwo;
|
||||
}
|
||||
|
||||
public void setTotalPeakForwardActive(BigDecimal totalPeakForwardActive)
|
||||
{
|
||||
this.totalPeakForwardActive = totalPeakForwardActive;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalPeakForwardActive()
|
||||
{
|
||||
return totalPeakForwardActive;
|
||||
}
|
||||
|
||||
public void setTotalHighForwardActive(BigDecimal totalHighForwardActive)
|
||||
{
|
||||
this.totalHighForwardActive = totalHighForwardActive;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalHighForwardActive()
|
||||
{
|
||||
return totalHighForwardActive;
|
||||
}
|
||||
|
||||
public void setTotalFlatForwardActive(BigDecimal totalFlatForwardActive)
|
||||
{
|
||||
this.totalFlatForwardActive = totalFlatForwardActive;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalFlatForwardActive()
|
||||
{
|
||||
return totalFlatForwardActive;
|
||||
}
|
||||
|
||||
public void setTotalValleyForwardActive(BigDecimal totalValleyForwardActive)
|
||||
{
|
||||
this.totalValleyForwardActive = totalValleyForwardActive;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalValleyForwardActive()
|
||||
{
|
||||
return totalValleyForwardActive;
|
||||
}
|
||||
|
||||
public void setTotalReverseActiveTwo(BigDecimal totalReverseActiveTwo)
|
||||
{
|
||||
this.totalReverseActiveTwo = totalReverseActiveTwo;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalReverseActiveTwo()
|
||||
{
|
||||
return totalReverseActiveTwo;
|
||||
}
|
||||
|
||||
public void setTotalPeakReverseActive(BigDecimal totalPeakReverseActive)
|
||||
{
|
||||
this.totalPeakReverseActive = totalPeakReverseActive;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalPeakReverseActive()
|
||||
{
|
||||
return totalPeakReverseActive;
|
||||
}
|
||||
|
||||
public void setTotalHighReverseActive(BigDecimal totalHighReverseActive)
|
||||
{
|
||||
this.totalHighReverseActive = totalHighReverseActive;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalHighReverseActive()
|
||||
{
|
||||
return totalHighReverseActive;
|
||||
}
|
||||
|
||||
public void setTotalFlatReverseActive(BigDecimal totalFlatReverseActive)
|
||||
{
|
||||
this.totalFlatReverseActive = totalFlatReverseActive;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalFlatReverseActive()
|
||||
{
|
||||
return totalFlatReverseActive;
|
||||
}
|
||||
|
||||
public void setTotalValleyReverseActive(BigDecimal totalValleyReverseActive)
|
||||
{
|
||||
this.totalValleyReverseActive = totalValleyReverseActive;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalValleyReverseActive()
|
||||
{
|
||||
return totalValleyReverseActive;
|
||||
}
|
||||
|
||||
public void setDisconnectDetectionIndication(String disconnectDetectionIndication)
|
||||
{
|
||||
this.disconnectDetectionIndication = disconnectDetectionIndication;
|
||||
}
|
||||
|
||||
public String getDisconnectDetectionIndication()
|
||||
{
|
||||
return disconnectDetectionIndication;
|
||||
}
|
||||
|
||||
public void setRatedPrimaryCurrentValue(BigDecimal ratedPrimaryCurrentValue)
|
||||
{
|
||||
this.ratedPrimaryCurrentValue = ratedPrimaryCurrentValue;
|
||||
}
|
||||
|
||||
public BigDecimal getRatedPrimaryCurrentValue()
|
||||
{
|
||||
return ratedPrimaryCurrentValue;
|
||||
}
|
||||
|
||||
public void setSwitchInputOutputStatus(String switchInputOutputStatus)
|
||||
{
|
||||
this.switchInputOutputStatus = switchInputOutputStatus;
|
||||
}
|
||||
|
||||
public String getSwitchInputOutputStatus()
|
||||
{
|
||||
return switchInputOutputStatus;
|
||||
}
|
||||
|
||||
public void setAlarmStatus(String alarmStatus)
|
||||
{
|
||||
this.alarmStatus = alarmStatus;
|
||||
}
|
||||
|
||||
public String getAlarmStatus()
|
||||
{
|
||||
return alarmStatus;
|
||||
}
|
||||
|
||||
public void setCurrentTotalVoltagePercent(BigDecimal currentTotalVoltagePercent)
|
||||
{
|
||||
this.currentTotalVoltagePercent = currentTotalVoltagePercent;
|
||||
}
|
||||
|
||||
public BigDecimal getCurrentTotalVoltagePercent()
|
||||
{
|
||||
return currentTotalVoltagePercent;
|
||||
}
|
||||
|
||||
public void setVoltageContentPercent(BigDecimal voltageContentPercent)
|
||||
{
|
||||
this.voltageContentPercent = voltageContentPercent;
|
||||
}
|
||||
|
||||
public BigDecimal getVoltageContentPercent()
|
||||
{
|
||||
return voltageContentPercent;
|
||||
}
|
||||
|
||||
public void setVoltageAcPercent(BigDecimal voltageAcPercent)
|
||||
{
|
||||
this.voltageAcPercent = voltageAcPercent;
|
||||
}
|
||||
|
||||
public BigDecimal getVoltageAcPercent()
|
||||
{
|
||||
return voltageAcPercent;
|
||||
}
|
||||
|
||||
public void setCurrentTotalCurrentPercent(BigDecimal currentTotalCurrentPercent)
|
||||
{
|
||||
this.currentTotalCurrentPercent = currentTotalCurrentPercent;
|
||||
}
|
||||
|
||||
public BigDecimal getCurrentTotalCurrentPercent()
|
||||
{
|
||||
return currentTotalCurrentPercent;
|
||||
}
|
||||
|
||||
public void setCurrentContentPercent(BigDecimal currentContentPercent)
|
||||
{
|
||||
this.currentContentPercent = currentContentPercent;
|
||||
}
|
||||
|
||||
public BigDecimal getCurrentContentPercent()
|
||||
{
|
||||
return currentContentPercent;
|
||||
}
|
||||
|
||||
public void setCurrentAcPercent(BigDecimal currentAcPercent)
|
||||
{
|
||||
this.currentAcPercent = currentAcPercent;
|
||||
}
|
||||
|
||||
public BigDecimal getCurrentAcPercent()
|
||||
{
|
||||
return currentAcPercent;
|
||||
}
|
||||
|
||||
public void setCurrentTotalPowerPercent(BigDecimal currentTotalPowerPercent)
|
||||
{
|
||||
this.currentTotalPowerPercent = currentTotalPowerPercent;
|
||||
}
|
||||
|
||||
public BigDecimal getCurrentTotalPowerPercent()
|
||||
{
|
||||
return currentTotalPowerPercent;
|
||||
}
|
||||
|
||||
public void setPowerContentPercent(BigDecimal powerContentPercent)
|
||||
{
|
||||
this.powerContentPercent = powerContentPercent;
|
||||
}
|
||||
|
||||
public BigDecimal getPowerContentPercent()
|
||||
{
|
||||
return powerContentPercent;
|
||||
}
|
||||
|
||||
public void setPowerAcPercent(BigDecimal powerAcPercent)
|
||||
{
|
||||
this.powerAcPercent = powerAcPercent;
|
||||
}
|
||||
|
||||
public BigDecimal getPowerAcPercent()
|
||||
{
|
||||
return powerAcPercent;
|
||||
}
|
||||
|
||||
public void setDataSettingYearMonth(String dataSettingYearMonth)
|
||||
{
|
||||
this.dataSettingYearMonth = dataSettingYearMonth;
|
||||
}
|
||||
|
||||
public String getDataSettingYearMonth()
|
||||
{
|
||||
return dataSettingYearMonth;
|
||||
}
|
||||
|
||||
public void setDataSettingDayHour(String dataSettingDayHour)
|
||||
{
|
||||
this.dataSettingDayHour = dataSettingDayHour;
|
||||
}
|
||||
|
||||
public String getDataSettingDayHour()
|
||||
{
|
||||
return dataSettingDayHour;
|
||||
}
|
||||
|
||||
public void setDataSettingMinutesSeconds(String dataSettingMinutesSeconds)
|
||||
{
|
||||
this.dataSettingMinutesSeconds = dataSettingMinutesSeconds;
|
||||
}
|
||||
|
||||
public String getDataSettingMinutesSeconds()
|
||||
{
|
||||
return dataSettingMinutesSeconds;
|
||||
}
|
||||
|
||||
public void setCurrentRate(BigDecimal currentRate)
|
||||
{
|
||||
this.currentRate = currentRate;
|
||||
}
|
||||
|
||||
public BigDecimal getCurrentRate()
|
||||
{
|
||||
return currentRate;
|
||||
}
|
||||
|
||||
public void setVersionNumber(String versionNumber)
|
||||
{
|
||||
this.versionNumber = versionNumber;
|
||||
}
|
||||
|
||||
public String getVersionNumber()
|
||||
{
|
||||
return versionNumber;
|
||||
}
|
||||
|
||||
public void setVoltage(BigDecimal voltage)
|
||||
{
|
||||
this.voltage = voltage;
|
||||
}
|
||||
|
||||
public BigDecimal getVoltage()
|
||||
{
|
||||
return voltage;
|
||||
}
|
||||
|
||||
public void setCurrent(BigDecimal current)
|
||||
{
|
||||
this.current = current;
|
||||
}
|
||||
|
||||
public BigDecimal getCurrent()
|
||||
{
|
||||
return current;
|
||||
}
|
||||
|
||||
public void setPower(BigDecimal power)
|
||||
{
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
public BigDecimal getPower()
|
||||
{
|
||||
return power;
|
||||
}
|
||||
|
||||
public void setInternalTemp(BigDecimal internalTemp)
|
||||
{
|
||||
this.internalTemp = internalTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getInternalTemp()
|
||||
{
|
||||
return internalTemp;
|
||||
}
|
||||
|
||||
public void setTotalForwardActiveOne(BigDecimal totalForwardActiveOne)
|
||||
{
|
||||
this.totalForwardActiveOne = totalForwardActiveOne;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalForwardActiveOne()
|
||||
{
|
||||
return totalForwardActiveOne;
|
||||
}
|
||||
|
||||
public void setTotalReverseActiveOne(BigDecimal totalReverseActiveOne)
|
||||
{
|
||||
this.totalReverseActiveOne = totalReverseActiveOne;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalReverseActiveOne()
|
||||
{
|
||||
return totalReverseActiveOne;
|
||||
}
|
||||
|
||||
public void setForwardReactiveMaxDemand(BigDecimal forwardReactiveMaxDemand)
|
||||
{
|
||||
this.forwardReactiveMaxDemand = forwardReactiveMaxDemand;
|
||||
}
|
||||
|
||||
public BigDecimal getForwardReactiveMaxDemand()
|
||||
{
|
||||
return forwardReactiveMaxDemand;
|
||||
}
|
||||
|
||||
public void setReverseReactiveMaxDemand(BigDecimal reverseReactiveMaxDemand)
|
||||
{
|
||||
this.reverseReactiveMaxDemand = reverseReactiveMaxDemand;
|
||||
}
|
||||
|
||||
public BigDecimal getReverseReactiveMaxDemand()
|
||||
{
|
||||
return reverseReactiveMaxDemand;
|
||||
}
|
||||
|
||||
public void setaForwardActiveEnergy(BigDecimal aForwardActiveEnergy)
|
||||
{
|
||||
this.aForwardActiveEnergy = aForwardActiveEnergy;
|
||||
}
|
||||
|
||||
public BigDecimal getaForwardActiveEnergy()
|
||||
{
|
||||
return aForwardActiveEnergy;
|
||||
}
|
||||
|
||||
public void setbForwardActiveEnergy(BigDecimal bForwardActiveEnergy)
|
||||
{
|
||||
this.bForwardActiveEnergy = bForwardActiveEnergy;
|
||||
}
|
||||
|
||||
public BigDecimal getbForwardActiveEnergy()
|
||||
{
|
||||
return bForwardActiveEnergy;
|
||||
}
|
||||
|
||||
public void setcForwardActiveEnergy(BigDecimal cForwardActiveEnergy)
|
||||
{
|
||||
this.cForwardActiveEnergy = cForwardActiveEnergy;
|
||||
}
|
||||
|
||||
public BigDecimal getcForwardActiveEnergy()
|
||||
{
|
||||
return cForwardActiveEnergy;
|
||||
}
|
||||
|
||||
public void setDidoStatus(String didoStatus)
|
||||
{
|
||||
this.didoStatus = didoStatus;
|
||||
}
|
||||
|
||||
public String getDidoStatus()
|
||||
{
|
||||
return didoStatus;
|
||||
}
|
||||
|
||||
public void setRunningStatus(String runningStatus)
|
||||
{
|
||||
this.runningStatus = runningStatus;
|
||||
}
|
||||
|
||||
public String getRunningStatus()
|
||||
{
|
||||
return runningStatus;
|
||||
}
|
||||
|
||||
public void setZeroSeqCurrent(BigDecimal zeroSeqCurrent)
|
||||
{
|
||||
this.zeroSeqCurrent = zeroSeqCurrent;
|
||||
}
|
||||
|
||||
public BigDecimal getZeroSeqCurrent()
|
||||
{
|
||||
return zeroSeqCurrent;
|
||||
}
|
||||
|
||||
public void setVoltageUnbalanceDegree(BigDecimal voltageUnbalanceDegree)
|
||||
{
|
||||
this.voltageUnbalanceDegree = voltageUnbalanceDegree;
|
||||
}
|
||||
|
||||
public BigDecimal getVoltageUnbalanceDegree()
|
||||
{
|
||||
return voltageUnbalanceDegree;
|
||||
}
|
||||
|
||||
public void setCurrentUnbalanceDegree(BigDecimal currentUnbalanceDegree)
|
||||
{
|
||||
this.currentUnbalanceDegree = currentUnbalanceDegree;
|
||||
}
|
||||
|
||||
public BigDecimal getCurrentUnbalanceDegree()
|
||||
{
|
||||
return currentUnbalanceDegree;
|
||||
}
|
||||
|
||||
public void setDailyReverseAcMaxDemand(BigDecimal dailyReverseAcMaxDemand)
|
||||
{
|
||||
this.dailyReverseAcMaxDemand = dailyReverseAcMaxDemand;
|
||||
}
|
||||
|
||||
public BigDecimal getDailyReverseAcMaxDemand()
|
||||
{
|
||||
return dailyReverseAcMaxDemand;
|
||||
}
|
||||
|
||||
public void setDailyForwardReacMaxDemand(BigDecimal dailyForwardReacMaxDemand)
|
||||
{
|
||||
this.dailyForwardReacMaxDemand = dailyForwardReacMaxDemand;
|
||||
}
|
||||
|
||||
public BigDecimal getDailyForwardReacMaxDemand()
|
||||
{
|
||||
return dailyForwardReacMaxDemand;
|
||||
}
|
||||
|
||||
public void setDailyReverseReacMaxDemand(BigDecimal dailyReverseReacMaxDemand)
|
||||
{
|
||||
this.dailyReverseReacMaxDemand = dailyReverseReacMaxDemand;
|
||||
}
|
||||
|
||||
public BigDecimal getDailyReverseReacMaxDemand()
|
||||
{
|
||||
return dailyReverseReacMaxDemand;
|
||||
}
|
||||
|
||||
public void setPreDayForwardAcMaxDemand(BigDecimal preDayForwardAcMaxDemand)
|
||||
{
|
||||
this.preDayForwardAcMaxDemand = preDayForwardAcMaxDemand;
|
||||
}
|
||||
|
||||
public BigDecimal getPreDayForwardAcMaxDemand()
|
||||
{
|
||||
return preDayForwardAcMaxDemand;
|
||||
}
|
||||
|
||||
public void setPreDayReverseAcMaxDemand(BigDecimal preDayReverseAcMaxDemand)
|
||||
{
|
||||
this.preDayReverseAcMaxDemand = preDayReverseAcMaxDemand;
|
||||
}
|
||||
|
||||
public BigDecimal getPreDayReverseAcMaxDemand()
|
||||
{
|
||||
return preDayReverseAcMaxDemand;
|
||||
}
|
||||
|
||||
public void setPreDayForwardReacMaxDemand(BigDecimal preDayForwardReacMaxDemand)
|
||||
{
|
||||
this.preDayForwardReacMaxDemand = preDayForwardReacMaxDemand;
|
||||
}
|
||||
|
||||
public BigDecimal getPreDayForwardReacMaxDemand()
|
||||
{
|
||||
return preDayForwardReacMaxDemand;
|
||||
}
|
||||
|
||||
public void setPreDayReverseReacMaxDemand(BigDecimal preDayReverseReacMaxDemand)
|
||||
{
|
||||
this.preDayReverseReacMaxDemand = preDayReverseReacMaxDemand;
|
||||
}
|
||||
|
||||
public BigDecimal getPreDayReverseReacMaxDemand()
|
||||
{
|
||||
return preDayReverseReacMaxDemand;
|
||||
}
|
||||
|
||||
public void setPre2dForwardAcMaxDemand(BigDecimal pre2dForwardAcMaxDemand)
|
||||
{
|
||||
this.pre2dForwardAcMaxDemand = pre2dForwardAcMaxDemand;
|
||||
}
|
||||
|
||||
public BigDecimal getPre2dForwardAcMaxDemand()
|
||||
{
|
||||
return pre2dForwardAcMaxDemand;
|
||||
}
|
||||
|
||||
public void setPre2dReverseAcMaxDemand(BigDecimal pre2dReverseAcMaxDemand)
|
||||
{
|
||||
this.pre2dReverseAcMaxDemand = pre2dReverseAcMaxDemand;
|
||||
}
|
||||
|
||||
public BigDecimal getPre2dReverseAcMaxDemand()
|
||||
{
|
||||
return pre2dReverseAcMaxDemand;
|
||||
}
|
||||
|
||||
public void setPre2dForwardReacMaxDemand(BigDecimal pre2dForwardReacMaxDemand)
|
||||
{
|
||||
this.pre2dForwardReacMaxDemand = pre2dForwardReacMaxDemand;
|
||||
}
|
||||
|
||||
public BigDecimal getPre2dForwardReacMaxDemand()
|
||||
{
|
||||
return pre2dForwardReacMaxDemand;
|
||||
}
|
||||
|
||||
public void setPre2dReverseReacMaxDemand(BigDecimal pre2dReverseReacMaxDemand)
|
||||
{
|
||||
this.pre2dReverseReacMaxDemand = pre2dReverseReacMaxDemand;
|
||||
}
|
||||
|
||||
public BigDecimal getPre2dReverseReacMaxDemand()
|
||||
{
|
||||
return pre2dReverseReacMaxDemand;
|
||||
}
|
||||
|
||||
public void setCurrentForwardAcDemand(BigDecimal currentForwardAcDemand)
|
||||
{
|
||||
this.currentForwardAcDemand = currentForwardAcDemand;
|
||||
}
|
||||
|
||||
public BigDecimal getCurrentForwardAcDemand()
|
||||
{
|
||||
return currentForwardAcDemand;
|
||||
}
|
||||
|
||||
public void setCurrentReverseAcDemand(BigDecimal currentReverseAcDemand)
|
||||
{
|
||||
this.currentReverseAcDemand = currentReverseAcDemand;
|
||||
}
|
||||
|
||||
public BigDecimal getCurrentReverseAcDemand()
|
||||
{
|
||||
return currentReverseAcDemand;
|
||||
}
|
||||
|
||||
public void setCurrentForwardReacDemand(BigDecimal currentForwardReacDemand)
|
||||
{
|
||||
this.currentForwardReacDemand = currentForwardReacDemand;
|
||||
}
|
||||
|
||||
public BigDecimal getCurrentForwardReacDemand()
|
||||
{
|
||||
return currentForwardReacDemand;
|
||||
}
|
||||
|
||||
public void setCurrentReverseReacDemand(BigDecimal currentReverseReacDemand)
|
||||
{
|
||||
this.currentReverseReacDemand = currentReverseReacDemand;
|
||||
}
|
||||
|
||||
public BigDecimal getCurrentReverseReacDemand()
|
||||
{
|
||||
return currentReverseReacDemand;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
@ -1526,6 +2352,65 @@ public class EmsAmmeterData extends BaseEntity
|
||||
.append("currentPercent", getCurrentPercent())
|
||||
.append("voltagePercent", getVoltagePercent())
|
||||
.append("avgCurrent", getAvgCurrent())
|
||||
.append("totalForwardActiveTwo", getTotalForwardActiveTwo())
|
||||
.append("totalPeakForwardActive", getTotalPeakForwardActive())
|
||||
.append("totalHighForwardActive", getTotalHighForwardActive())
|
||||
.append("totalFlatForwardActive", getTotalFlatForwardActive())
|
||||
.append("totalValleyForwardActive", getTotalValleyForwardActive())
|
||||
.append("totalReverseActiveTwo", getTotalReverseActiveTwo())
|
||||
.append("totalPeakReverseActive", getTotalPeakReverseActive())
|
||||
.append("totalHighReverseActive", getTotalHighReverseActive())
|
||||
.append("totalFlatReverseActive", getTotalFlatReverseActive())
|
||||
.append("totalValleyReverseActive", getTotalValleyReverseActive())
|
||||
.append("disconnectDetectionIndication", getDisconnectDetectionIndication())
|
||||
.append("ratedPrimaryCurrentValue", getRatedPrimaryCurrentValue())
|
||||
.append("switchInputOutputStatus", getSwitchInputOutputStatus())
|
||||
.append("alarmStatus", getAlarmStatus())
|
||||
.append("currentTotalVoltagePercent", getCurrentTotalVoltagePercent())
|
||||
.append("voltageContentPercent", getVoltageContentPercent())
|
||||
.append("voltageAcPercent", getVoltageAcPercent())
|
||||
.append("currentTotalCurrentPercent", getCurrentTotalCurrentPercent())
|
||||
.append("currentContentPercent", getCurrentContentPercent())
|
||||
.append("currentAcPercent", getCurrentAcPercent())
|
||||
.append("currentTotalPowerPercent", getCurrentTotalPowerPercent())
|
||||
.append("powerContentPercent", getPowerContentPercent())
|
||||
.append("powerAcPercent", getPowerAcPercent())
|
||||
.append("dataSettingYearMonth", getDataSettingYearMonth())
|
||||
.append("dataSettingDayHour", getDataSettingDayHour())
|
||||
.append("dataSettingMinutesSeconds", getDataSettingMinutesSeconds())
|
||||
.append("currentRate", getCurrentRate())
|
||||
.append("versionNumber", getVersionNumber())
|
||||
.append("voltage", getVoltage())
|
||||
.append("current", getCurrent())
|
||||
.append("power", getPower())
|
||||
.append("internalTemp", getInternalTemp())
|
||||
.append("totalForwardActiveOne", getTotalForwardActiveOne())
|
||||
.append("totalReverseActiveOne", getTotalReverseActiveOne())
|
||||
.append("forwardReactiveMaxDemand", getForwardReactiveMaxDemand())
|
||||
.append("reverseReactiveMaxDemand", getReverseReactiveMaxDemand())
|
||||
.append("aForwardActiveEnergy", getaForwardActiveEnergy())
|
||||
.append("bForwardActiveEnergy", getbForwardActiveEnergy())
|
||||
.append("cForwardActiveEnergy", getcForwardActiveEnergy())
|
||||
.append("didoStatus", getDidoStatus())
|
||||
.append("runningStatus", getRunningStatus())
|
||||
.append("zeroSeqCurrent", getZeroSeqCurrent())
|
||||
.append("voltageUnbalanceDegree", getVoltageUnbalanceDegree())
|
||||
.append("currentUnbalanceDegree", getCurrentUnbalanceDegree())
|
||||
.append("dailyReverseAcMaxDemand", getDailyReverseAcMaxDemand())
|
||||
.append("dailyForwardReacMaxDemand", getDailyForwardReacMaxDemand())
|
||||
.append("dailyReverseReacMaxDemand", getDailyReverseReacMaxDemand())
|
||||
.append("preDayForwardAcMaxDemand", getPreDayForwardAcMaxDemand())
|
||||
.append("preDayReverseAcMaxDemand", getPreDayReverseAcMaxDemand())
|
||||
.append("preDayForwardReacMaxDemand", getPreDayForwardReacMaxDemand())
|
||||
.append("preDayReverseReacMaxDemand", getPreDayReverseReacMaxDemand())
|
||||
.append("pre2dForwardAcMaxDemand", getPre2dForwardAcMaxDemand())
|
||||
.append("pre2dReverseAcMaxDemand", getPre2dReverseAcMaxDemand())
|
||||
.append("pre2dForwardReacMaxDemand", getPre2dForwardReacMaxDemand())
|
||||
.append("pre2dReverseReacMaxDemand", getPre2dReverseReacMaxDemand())
|
||||
.append("currentForwardAcDemand", getCurrentForwardAcDemand())
|
||||
.append("currentReverseAcDemand", getCurrentReverseAcDemand())
|
||||
.append("currentForwardReacDemand", getCurrentForwardReacDemand())
|
||||
.append("currentReverseReacDemand", getCurrentReverseReacDemand())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ import com.xzzn.common.annotation.Excel;
|
||||
* 电池簇数据对象 ems_battery_cluster
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-07-27
|
||||
* @date 2025-07-29
|
||||
*/
|
||||
public class EmsBatteryCluster extends BaseEntity
|
||||
{
|
||||
@ -212,94 +212,6 @@ public class EmsBatteryCluster extends BaseEntity
|
||||
@Excel(name = "单次累计放电电量")
|
||||
private BigDecimal totalDischargeEnergy;
|
||||
|
||||
/** 断线检测指示 */
|
||||
@Excel(name = "断线检测指示")
|
||||
private String disconnectDetectionIndication;
|
||||
|
||||
/** 电压变比 */
|
||||
@Excel(name = "电压变比")
|
||||
private BigDecimal voltageTransforRatio;
|
||||
|
||||
/** 额定一次电流值 */
|
||||
@Excel(name = "额定一次电流值")
|
||||
private BigDecimal ratedPrimaryCurrentValue;
|
||||
|
||||
/** 开关量输入输出状态 */
|
||||
@Excel(name = "开关量输入输出状态")
|
||||
private String switchInputOutputStatus;
|
||||
|
||||
/** 报警状态 */
|
||||
@Excel(name = "报警状态")
|
||||
private String alarmStatus;
|
||||
|
||||
/** 当前总电压百分比 */
|
||||
@Excel(name = "当前总电压百分比")
|
||||
private BigDecimal currentTotalVoltagePercent;
|
||||
|
||||
/** 电压直流含量百分比 */
|
||||
@Excel(name = "电压直流含量百分比")
|
||||
private BigDecimal voltageContentPercent;
|
||||
|
||||
/** 电压交流含量百分比 */
|
||||
@Excel(name = "电压交流含量百分比")
|
||||
private BigDecimal voltageAcPercent;
|
||||
|
||||
/** 当前总电流百分比 */
|
||||
@Excel(name = "当前总电流百分比")
|
||||
private BigDecimal currentTotalCurrentPercent;
|
||||
|
||||
/** 电流直流含量百分比 */
|
||||
@Excel(name = "电流直流含量百分比")
|
||||
private BigDecimal currentContentPercent;
|
||||
|
||||
/** 电流交流含量百分比 */
|
||||
@Excel(name = "电流交流含量百分比")
|
||||
private BigDecimal currentAcPercent;
|
||||
|
||||
/** 当前总功率百分比 */
|
||||
@Excel(name = "当前总功率百分比")
|
||||
private BigDecimal currentTotalPowerPercent;
|
||||
|
||||
/** 功率直流含量百分比 */
|
||||
@Excel(name = "功率直流含量百分比")
|
||||
private BigDecimal powerContentPercent;
|
||||
|
||||
/** 功率交流含量百分比 */
|
||||
@Excel(name = "功率交流含量百分比")
|
||||
private BigDecimal powerAcPercent;
|
||||
|
||||
/** 日期时间设置(年月) */
|
||||
@Excel(name = "日期时间设置", readConverterExp = "年=月")
|
||||
private String dataSettingYearMonth;
|
||||
|
||||
/** 日期时间设置(日时) */
|
||||
@Excel(name = "日期时间设置", readConverterExp = "日=时")
|
||||
private String dataSettingDayHour;
|
||||
|
||||
/** 日期时间设置(分秒) */
|
||||
@Excel(name = "日期时间设置", readConverterExp = "分=秒")
|
||||
private String dataSettingMinutesSeconds;
|
||||
|
||||
/** 当前抄表日(高)、当前费率(低) */
|
||||
@Excel(name = "当前抄表日", readConverterExp = "高=")
|
||||
private BigDecimal currentRate;
|
||||
|
||||
/** 软件版本号 */
|
||||
@Excel(name = "软件版本号")
|
||||
private String versionNumber;
|
||||
|
||||
/** 电压 */
|
||||
@Excel(name = "电压")
|
||||
private BigDecimal voltage;
|
||||
|
||||
/** 电流 */
|
||||
@Excel(name = "电流")
|
||||
private BigDecimal current;
|
||||
|
||||
/** 功率 */
|
||||
@Excel(name = "功率")
|
||||
private BigDecimal power;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
@ -790,226 +702,6 @@ public class EmsBatteryCluster extends BaseEntity
|
||||
return totalDischargeEnergy;
|
||||
}
|
||||
|
||||
public void setDisconnectDetectionIndication(String disconnectDetectionIndication)
|
||||
{
|
||||
this.disconnectDetectionIndication = disconnectDetectionIndication;
|
||||
}
|
||||
|
||||
public String getDisconnectDetectionIndication()
|
||||
{
|
||||
return disconnectDetectionIndication;
|
||||
}
|
||||
|
||||
public void setVoltageTransforRatio(BigDecimal voltageTransforRatio)
|
||||
{
|
||||
this.voltageTransforRatio = voltageTransforRatio;
|
||||
}
|
||||
|
||||
public BigDecimal getVoltageTransforRatio()
|
||||
{
|
||||
return voltageTransforRatio;
|
||||
}
|
||||
|
||||
public void setRatedPrimaryCurrentValue(BigDecimal ratedPrimaryCurrentValue)
|
||||
{
|
||||
this.ratedPrimaryCurrentValue = ratedPrimaryCurrentValue;
|
||||
}
|
||||
|
||||
public BigDecimal getRatedPrimaryCurrentValue()
|
||||
{
|
||||
return ratedPrimaryCurrentValue;
|
||||
}
|
||||
|
||||
public void setSwitchInputOutputStatus(String switchInputOutputStatus)
|
||||
{
|
||||
this.switchInputOutputStatus = switchInputOutputStatus;
|
||||
}
|
||||
|
||||
public String getSwitchInputOutputStatus()
|
||||
{
|
||||
return switchInputOutputStatus;
|
||||
}
|
||||
|
||||
public void setAlarmStatus(String alarmStatus)
|
||||
{
|
||||
this.alarmStatus = alarmStatus;
|
||||
}
|
||||
|
||||
public String getAlarmStatus()
|
||||
{
|
||||
return alarmStatus;
|
||||
}
|
||||
|
||||
public void setCurrentTotalVoltagePercent(BigDecimal currentTotalVoltagePercent)
|
||||
{
|
||||
this.currentTotalVoltagePercent = currentTotalVoltagePercent;
|
||||
}
|
||||
|
||||
public BigDecimal getCurrentTotalVoltagePercent()
|
||||
{
|
||||
return currentTotalVoltagePercent;
|
||||
}
|
||||
|
||||
public void setVoltageContentPercent(BigDecimal voltageContentPercent)
|
||||
{
|
||||
this.voltageContentPercent = voltageContentPercent;
|
||||
}
|
||||
|
||||
public BigDecimal getVoltageContentPercent()
|
||||
{
|
||||
return voltageContentPercent;
|
||||
}
|
||||
|
||||
public void setVoltageAcPercent(BigDecimal voltageAcPercent)
|
||||
{
|
||||
this.voltageAcPercent = voltageAcPercent;
|
||||
}
|
||||
|
||||
public BigDecimal getVoltageAcPercent()
|
||||
{
|
||||
return voltageAcPercent;
|
||||
}
|
||||
|
||||
public void setCurrentTotalCurrentPercent(BigDecimal currentTotalCurrentPercent)
|
||||
{
|
||||
this.currentTotalCurrentPercent = currentTotalCurrentPercent;
|
||||
}
|
||||
|
||||
public BigDecimal getCurrentTotalCurrentPercent()
|
||||
{
|
||||
return currentTotalCurrentPercent;
|
||||
}
|
||||
|
||||
public void setCurrentContentPercent(BigDecimal currentContentPercent)
|
||||
{
|
||||
this.currentContentPercent = currentContentPercent;
|
||||
}
|
||||
|
||||
public BigDecimal getCurrentContentPercent()
|
||||
{
|
||||
return currentContentPercent;
|
||||
}
|
||||
|
||||
public void setCurrentAcPercent(BigDecimal currentAcPercent)
|
||||
{
|
||||
this.currentAcPercent = currentAcPercent;
|
||||
}
|
||||
|
||||
public BigDecimal getCurrentAcPercent()
|
||||
{
|
||||
return currentAcPercent;
|
||||
}
|
||||
|
||||
public void setCurrentTotalPowerPercent(BigDecimal currentTotalPowerPercent)
|
||||
{
|
||||
this.currentTotalPowerPercent = currentTotalPowerPercent;
|
||||
}
|
||||
|
||||
public BigDecimal getCurrentTotalPowerPercent()
|
||||
{
|
||||
return currentTotalPowerPercent;
|
||||
}
|
||||
|
||||
public void setPowerContentPercent(BigDecimal powerContentPercent)
|
||||
{
|
||||
this.powerContentPercent = powerContentPercent;
|
||||
}
|
||||
|
||||
public BigDecimal getPowerContentPercent()
|
||||
{
|
||||
return powerContentPercent;
|
||||
}
|
||||
|
||||
public void setPowerAcPercent(BigDecimal powerAcPercent)
|
||||
{
|
||||
this.powerAcPercent = powerAcPercent;
|
||||
}
|
||||
|
||||
public BigDecimal getPowerAcPercent()
|
||||
{
|
||||
return powerAcPercent;
|
||||
}
|
||||
|
||||
public void setDataSettingYearMonth(String dataSettingYearMonth)
|
||||
{
|
||||
this.dataSettingYearMonth = dataSettingYearMonth;
|
||||
}
|
||||
|
||||
public String getDataSettingYearMonth()
|
||||
{
|
||||
return dataSettingYearMonth;
|
||||
}
|
||||
|
||||
public void setDataSettingDayHour(String dataSettingDayHour)
|
||||
{
|
||||
this.dataSettingDayHour = dataSettingDayHour;
|
||||
}
|
||||
|
||||
public String getDataSettingDayHour()
|
||||
{
|
||||
return dataSettingDayHour;
|
||||
}
|
||||
|
||||
public void setDataSettingMinutesSeconds(String dataSettingMinutesSeconds)
|
||||
{
|
||||
this.dataSettingMinutesSeconds = dataSettingMinutesSeconds;
|
||||
}
|
||||
|
||||
public String getDataSettingMinutesSeconds()
|
||||
{
|
||||
return dataSettingMinutesSeconds;
|
||||
}
|
||||
|
||||
public void setCurrentRate(BigDecimal currentRate)
|
||||
{
|
||||
this.currentRate = currentRate;
|
||||
}
|
||||
|
||||
public BigDecimal getCurrentRate()
|
||||
{
|
||||
return currentRate;
|
||||
}
|
||||
|
||||
public void setVersionNumber(String versionNumber)
|
||||
{
|
||||
this.versionNumber = versionNumber;
|
||||
}
|
||||
|
||||
public String getVersionNumber()
|
||||
{
|
||||
return versionNumber;
|
||||
}
|
||||
|
||||
public void setVoltage(BigDecimal voltage)
|
||||
{
|
||||
this.voltage = voltage;
|
||||
}
|
||||
|
||||
public BigDecimal getVoltage()
|
||||
{
|
||||
return voltage;
|
||||
}
|
||||
|
||||
public void setCurrent(BigDecimal current)
|
||||
{
|
||||
this.current = current;
|
||||
}
|
||||
|
||||
public BigDecimal getCurrent()
|
||||
{
|
||||
return current;
|
||||
}
|
||||
|
||||
public void setPower(BigDecimal power)
|
||||
{
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
public BigDecimal getPower()
|
||||
{
|
||||
return power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
@ -1067,28 +759,6 @@ public class EmsBatteryCluster extends BaseEntity
|
||||
.append("minCellSohId", getMinCellSohId())
|
||||
.append("totalChargeEnergy", getTotalChargeEnergy())
|
||||
.append("totalDischargeEnergy", getTotalDischargeEnergy())
|
||||
.append("disconnectDetectionIndication", getDisconnectDetectionIndication())
|
||||
.append("voltageTransforRatio", getVoltageTransforRatio())
|
||||
.append("ratedPrimaryCurrentValue", getRatedPrimaryCurrentValue())
|
||||
.append("switchInputOutputStatus", getSwitchInputOutputStatus())
|
||||
.append("alarmStatus", getAlarmStatus())
|
||||
.append("currentTotalVoltagePercent", getCurrentTotalVoltagePercent())
|
||||
.append("voltageContentPercent", getVoltageContentPercent())
|
||||
.append("voltageAcPercent", getVoltageAcPercent())
|
||||
.append("currentTotalCurrentPercent", getCurrentTotalCurrentPercent())
|
||||
.append("currentContentPercent", getCurrentContentPercent())
|
||||
.append("currentAcPercent", getCurrentAcPercent())
|
||||
.append("currentTotalPowerPercent", getCurrentTotalPowerPercent())
|
||||
.append("powerContentPercent", getPowerContentPercent())
|
||||
.append("powerAcPercent", getPowerAcPercent())
|
||||
.append("dataSettingYearMonth", getDataSettingYearMonth())
|
||||
.append("dataSettingDayHour", getDataSettingDayHour())
|
||||
.append("dataSettingMinutesSeconds", getDataSettingMinutesSeconds())
|
||||
.append("currentRate", getCurrentRate())
|
||||
.append("versionNumber", getVersionNumber())
|
||||
.append("voltage", getVoltage())
|
||||
.append("current", getCurrent())
|
||||
.append("power", getPower())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@ import com.xzzn.common.annotation.Excel;
|
||||
* 单体电池实时数据对象 ems_battery_data
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-29
|
||||
* @date 2025-07-29
|
||||
*/
|
||||
public class EmsBatteryData extends BaseEntity
|
||||
{
|
||||
@ -66,6 +66,10 @@ public class EmsBatteryData extends BaseEntity
|
||||
@Excel(name = "簇设备id")
|
||||
private String clusterDeviceId;
|
||||
|
||||
/** 单体电池内阻 */
|
||||
@Excel(name = "单体电池内阻")
|
||||
private BigDecimal interResistance;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
@ -186,6 +190,16 @@ public class EmsBatteryData extends BaseEntity
|
||||
return clusterDeviceId;
|
||||
}
|
||||
|
||||
public void setInterResistance(BigDecimal interResistance)
|
||||
{
|
||||
this.interResistance = interResistance;
|
||||
}
|
||||
|
||||
public BigDecimal getInterResistance()
|
||||
{
|
||||
return interResistance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
@ -206,6 +220,7 @@ public class EmsBatteryData extends BaseEntity
|
||||
.append("siteId", getSiteId())
|
||||
.append("deviceId", getDeviceId())
|
||||
.append("clusterDeviceId", getClusterDeviceId())
|
||||
.append("interResistance", getInterResistance())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,164 @@
|
||||
package com.xzzn.ems.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.xzzn.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.xzzn.common.annotation.Excel;
|
||||
|
||||
/**
|
||||
* 电池组数据对象 ems_battery_group
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-07-29
|
||||
*/
|
||||
public class EmsBatteryGroup extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 电池组状态 */
|
||||
@Excel(name = "电池组状态")
|
||||
private String status;
|
||||
|
||||
/** 电压 (V) */
|
||||
@Excel(name = "电压 (V)")
|
||||
private BigDecimal voltage;
|
||||
|
||||
/** 电流 (A) */
|
||||
@Excel(name = "电流 (A)")
|
||||
private BigDecimal current;
|
||||
|
||||
/** SOC (%) */
|
||||
@Excel(name = "SOC (%)")
|
||||
private BigDecimal soc;
|
||||
|
||||
/** SOH (%) */
|
||||
@Excel(name = "SOH (%)")
|
||||
private BigDecimal soh;
|
||||
|
||||
/** 备电预估时长 */
|
||||
@Excel(name = "备电预估时长")
|
||||
private BigDecimal estimatedBackupDuration;
|
||||
|
||||
/** 站点id */
|
||||
@Excel(name = "站点id")
|
||||
private String siteId;
|
||||
|
||||
/** 设备唯一标识符 */
|
||||
@Excel(name = "设备唯一标识符")
|
||||
private String deviceId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setVoltage(BigDecimal voltage)
|
||||
{
|
||||
this.voltage = voltage;
|
||||
}
|
||||
|
||||
public BigDecimal getVoltage()
|
||||
{
|
||||
return voltage;
|
||||
}
|
||||
|
||||
public void setCurrent(BigDecimal current)
|
||||
{
|
||||
this.current = current;
|
||||
}
|
||||
|
||||
public BigDecimal getCurrent()
|
||||
{
|
||||
return current;
|
||||
}
|
||||
|
||||
public void setSoc(BigDecimal soc)
|
||||
{
|
||||
this.soc = soc;
|
||||
}
|
||||
|
||||
public BigDecimal getSoc()
|
||||
{
|
||||
return soc;
|
||||
}
|
||||
|
||||
public void setSoh(BigDecimal soh)
|
||||
{
|
||||
this.soh = soh;
|
||||
}
|
||||
|
||||
public BigDecimal getSoh()
|
||||
{
|
||||
return soh;
|
||||
}
|
||||
|
||||
public void setEstimatedBackupDuration(BigDecimal estimatedBackupDuration)
|
||||
{
|
||||
this.estimatedBackupDuration = estimatedBackupDuration;
|
||||
}
|
||||
|
||||
public BigDecimal getEstimatedBackupDuration()
|
||||
{
|
||||
return estimatedBackupDuration;
|
||||
}
|
||||
|
||||
public void setSiteId(String siteId)
|
||||
{
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public String getSiteId()
|
||||
{
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId)
|
||||
{
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getDeviceId()
|
||||
{
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("status", getStatus())
|
||||
.append("voltage", getVoltage())
|
||||
.append("current", getCurrent())
|
||||
.append("soc", getSoc())
|
||||
.append("soh", getSoh())
|
||||
.append("estimatedBackupDuration", getEstimatedBackupDuration())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.append("siteId", getSiteId())
|
||||
.append("deviceId", getDeviceId())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
104
ems-system/src/main/java/com/xzzn/ems/domain/EmsDhData.java
Normal file
104
ems-system/src/main/java/com/xzzn/ems/domain/EmsDhData.java
Normal file
@ -0,0 +1,104 @@
|
||||
package com.xzzn.ems.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.xzzn.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.xzzn.common.annotation.Excel;
|
||||
|
||||
/**
|
||||
* 动环数据对象 ems_dh_data
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-07-28
|
||||
*/
|
||||
public class EmsDhData extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 湿度 */
|
||||
@Excel(name = "湿度")
|
||||
private BigDecimal humidity;
|
||||
|
||||
/** 温度 */
|
||||
@Excel(name = "温度")
|
||||
private BigDecimal temperature;
|
||||
|
||||
/** 站点id */
|
||||
@Excel(name = "站点id")
|
||||
private String siteId;
|
||||
|
||||
/** 设备唯一标识符 */
|
||||
@Excel(name = "设备唯一标识符")
|
||||
private String deviceId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setHumidity(BigDecimal humidity)
|
||||
{
|
||||
this.humidity = humidity;
|
||||
}
|
||||
|
||||
public BigDecimal getHumidity()
|
||||
{
|
||||
return humidity;
|
||||
}
|
||||
|
||||
public void setTemperature(BigDecimal temperature)
|
||||
{
|
||||
this.temperature = temperature;
|
||||
}
|
||||
|
||||
public BigDecimal getTemperature()
|
||||
{
|
||||
return temperature;
|
||||
}
|
||||
|
||||
public void setSiteId(String siteId)
|
||||
{
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public String getSiteId()
|
||||
{
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId)
|
||||
{
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getDeviceId()
|
||||
{
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("humidity", getHumidity())
|
||||
.append("temperature", getTemperature())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.append("siteId", getSiteId())
|
||||
.append("deviceId", getDeviceId())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
package com.xzzn.ems.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsBatteryGroup;
|
||||
|
||||
/**
|
||||
* 电池组数据Mapper接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-07-29
|
||||
*/
|
||||
public interface EmsBatteryGroupMapper
|
||||
{
|
||||
/**
|
||||
* 查询电池组数据
|
||||
*
|
||||
* @param id 电池组数据主键
|
||||
* @return 电池组数据
|
||||
*/
|
||||
public EmsBatteryGroup selectEmsBatteryGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 查询电池组数据列表
|
||||
*
|
||||
* @param emsBatteryGroup 电池组数据
|
||||
* @return 电池组数据集合
|
||||
*/
|
||||
public List<EmsBatteryGroup> selectEmsBatteryGroupList(EmsBatteryGroup emsBatteryGroup);
|
||||
|
||||
/**
|
||||
* 新增电池组数据
|
||||
*
|
||||
* @param emsBatteryGroup 电池组数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmsBatteryGroup(EmsBatteryGroup emsBatteryGroup);
|
||||
|
||||
/**
|
||||
* 修改电池组数据
|
||||
*
|
||||
* @param emsBatteryGroup 电池组数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmsBatteryGroup(EmsBatteryGroup emsBatteryGroup);
|
||||
|
||||
/**
|
||||
* 删除电池组数据
|
||||
*
|
||||
* @param id 电池组数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsBatteryGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除电池组数据
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsBatteryGroupByIds(Long[] ids);
|
||||
|
||||
// 批量插入
|
||||
void batchInsertGroupData(List<EmsBatteryGroup> emsBatteryGroups);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.xzzn.ems.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsDhData;
|
||||
|
||||
/**
|
||||
* 动环数据Mapper接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-07-28
|
||||
*/
|
||||
public interface EmsDhDataMapper
|
||||
{
|
||||
/**
|
||||
* 查询动环数据
|
||||
*
|
||||
* @param id 动环数据主键
|
||||
* @return 动环数据
|
||||
*/
|
||||
public EmsDhData selectEmsDhDataById(Long id);
|
||||
|
||||
/**
|
||||
* 查询动环数据列表
|
||||
*
|
||||
* @param emsDhData 动环数据
|
||||
* @return 动环数据集合
|
||||
*/
|
||||
public List<EmsDhData> selectEmsDhDataList(EmsDhData emsDhData);
|
||||
|
||||
/**
|
||||
* 新增动环数据
|
||||
*
|
||||
* @param emsDhData 动环数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmsDhData(EmsDhData emsDhData);
|
||||
|
||||
/**
|
||||
* 修改动环数据
|
||||
*
|
||||
* @param emsDhData 动环数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmsDhData(EmsDhData emsDhData);
|
||||
|
||||
/**
|
||||
* 删除动环数据
|
||||
*
|
||||
* @param id 动环数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsDhDataById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除动环数据
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsDhDataByIds(Long[] ids);
|
||||
}
|
||||
@ -1,7 +1,6 @@
|
||||
package com.xzzn.ems.service.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.alibaba.fastjson2.TypeReference;
|
||||
import com.xzzn.common.constant.RedisKeyConstants;
|
||||
@ -17,13 +16,22 @@ import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@Service
|
||||
public class DDSDataProcessServiceImpl implements IDDSDataProcessService {
|
||||
private static final Log log = LogFactory.getLog(DDSDataProcessServiceImpl.class);
|
||||
private static final String SITE_ID = "021_DDS_01";
|
||||
// 正则表达式匹配BMS设备编号和属性
|
||||
private static final Pattern PATTERN = Pattern.compile("(BMSD\\d{2})(ZT|SOC|SOH|DL|DY|BDSC)");
|
||||
// 匹配DTDC+数字格式的正则(提取序号)
|
||||
private static final Pattern DTDC_PATTERN = Pattern.compile("DTDC(\\d+)([A-Za-z]*)");
|
||||
|
||||
@Autowired
|
||||
private EmsBatteryClusterMapper emsBatteryClusterMapper;
|
||||
|
||||
@ -49,6 +57,10 @@ public class DDSDataProcessServiceImpl implements IDDSDataProcessService {
|
||||
private EmsAmmeterDataMapper emsAmmeterDataMapper;
|
||||
@Autowired
|
||||
private EmsBatteryDailyLatestServiceImpl emsBatteryDailyLatestServiceImpl;
|
||||
@Autowired
|
||||
private EmsDhDataMapper emsDhDataMapper;
|
||||
@Autowired
|
||||
private EmsBatteryGroupMapper emsBatteryGroupMapper;
|
||||
|
||||
@Override
|
||||
public void handleDdsData(String message) {
|
||||
@ -58,34 +70,74 @@ public class DDSDataProcessServiceImpl implements IDDSDataProcessService {
|
||||
String jsonData = obj.get("Data").toString();
|
||||
|
||||
log.info("deviceId:" + deviceId);
|
||||
if (StringUtils.isEmpty(jsonData)) {
|
||||
return;
|
||||
}
|
||||
if (deviceId.contains("BMSD")) {
|
||||
batteryStackDataProcess(deviceId, jsonData);
|
||||
|
||||
} else if (deviceId.contains("BMSC")) {
|
||||
batteryClusterDataProcess(deviceId, jsonData);
|
||||
batteryGroupDataProcess(deviceId, jsonData);
|
||||
batteryDataProcess(deviceId, jsonData);
|
||||
|
||||
} else if (deviceId.contains("PCS")) {
|
||||
pcsDataProcess(deviceId, jsonData);
|
||||
pcsBranchDataProcess(deviceId, jsonData);
|
||||
batteryClusterDataProcess(deviceId, jsonData);
|
||||
} else if (deviceId.contains("LOAD")) {
|
||||
loadDataProcess(deviceId, jsonData);
|
||||
} else if (deviceId.contains("METEGF")) {
|
||||
log.info("METEGF DATA PROCESS");
|
||||
meteGFDataProcess(deviceId, jsonData);
|
||||
} else if (deviceId.contains("METE")) {
|
||||
log.info("OTHER METE DATA PROCESS");
|
||||
} else if (deviceId.equals("METE")) {
|
||||
meteDataProcess(deviceId, jsonData);
|
||||
} else if (deviceId.contains("METE0")) {
|
||||
meteBranchDataProcess(deviceId, jsonData);
|
||||
} else if (deviceId.contains("XF")) {
|
||||
meteXFProcess(deviceId, jsonData);
|
||||
} else if (deviceId.contains("DH")) {
|
||||
meteDHProcess(deviceId, jsonData);
|
||||
}
|
||||
}
|
||||
|
||||
private void meteDHProcess(String deviceId, String dataJson) {
|
||||
//动环
|
||||
Map<String, Object> obj = JSON.parseObject(dataJson, new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
|
||||
//DH
|
||||
EmsDhData dhData = new EmsDhData();
|
||||
|
||||
dhData.setHumidity(StringUtils.getBigDecimal(obj.get("SD")));
|
||||
dhData.setTemperature(StringUtils.getBigDecimal(obj.get("WD")));
|
||||
|
||||
dhData.setCreateBy("system");
|
||||
dhData.setCreateTime(DateUtils.getNowDate());
|
||||
dhData.setUpdateBy("system");
|
||||
dhData.setUpdateTime(DateUtils.getNowDate());
|
||||
dhData.setSiteId(SITE_ID);
|
||||
dhData.setDeviceId(deviceId);
|
||||
emsDhDataMapper.insertEmsDhData(dhData);
|
||||
|
||||
redisCache.setCacheObject(RedisKeyConstants.DH + SITE_ID + "_" +deviceId, dhData);
|
||||
}
|
||||
|
||||
private void meteXFProcess(String deviceId, String dataJson) {
|
||||
//消防
|
||||
Map<String, Object> obj = JSON.parseObject(dataJson, new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
|
||||
// 暂时只更新设备表的设备状态 ZDYBYDCZT-主电源备用电池状态
|
||||
// 状态枚举还没有提供
|
||||
EmsDevicesSetting emsDevicesSetting = emsDevicesSettingMapper.getDeviceBySiteAndDeviceId(deviceId, SITE_ID);
|
||||
emsDevicesSetting.setCommunicationStatus(StringUtils.getString(obj.get("ZDYBYDCZT")));
|
||||
emsDevicesSetting.setUpdatedAt(DateUtils.getNowDate());
|
||||
emsDevicesSettingMapper.updateEmsDevicesSetting(emsDevicesSetting);
|
||||
}
|
||||
|
||||
private void batteryStackDataProcess(String deviceId, String dataJson) {
|
||||
|
||||
//电池堆
|
||||
Map<String, Object> obj = JSON.parseObject(dataJson, new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
|
||||
//BMS 电池簇
|
||||
//BMS 电池堆
|
||||
EmsBatteryStack dataStack = new EmsBatteryStack();
|
||||
|
||||
// 其他非 BigDecimal 字段
|
||||
@ -133,13 +185,199 @@ public class DDSDataProcessServiceImpl implements IDDSDataProcessService {
|
||||
redisCache.setCacheObject(RedisKeyConstants.STACK + SITE_ID + "_" +deviceId, dataStack);
|
||||
}
|
||||
|
||||
private void batteryGroupDataProcess(String deviceId, String jsonData) {
|
||||
//电池组
|
||||
Map<String, Object> obj = JSON.parseObject(jsonData, new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
|
||||
Map<String, EmsBatteryGroup> groupMap = new HashMap<>();
|
||||
for (Map.Entry<String, Object> entry : obj.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
// 跳过空键
|
||||
if (key == null || key.trim().isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
Matcher matcher = PATTERN.matcher(key);
|
||||
if (matcher.matches()) {
|
||||
String groupDeviceId = matcher.group(1);
|
||||
String property = matcher.group(2);
|
||||
EmsBatteryGroup dataGroup = groupMap.getOrDefault(groupDeviceId, new EmsBatteryGroup());
|
||||
dataGroup.setDeviceId(groupDeviceId);
|
||||
dataGroup.setSiteId(SITE_ID);
|
||||
dataGroup.setCreateBy("system");
|
||||
dataGroup.setCreateTime(DateUtils.getNowDate());
|
||||
dataGroup.setUpdateBy("system");
|
||||
dataGroup.setUpdateTime(DateUtils.getNowDate());
|
||||
|
||||
setPropertyValue(dataGroup, property, entry.getValue());
|
||||
groupMap.put(groupDeviceId, dataGroup);
|
||||
}
|
||||
}
|
||||
|
||||
// 批量插入数据库
|
||||
log.info("批量插入");
|
||||
if (!CollectionUtils.isEmpty(groupMap)) {
|
||||
List<EmsBatteryGroup> batteryGroupList = new ArrayList<>(groupMap.values());
|
||||
emsBatteryGroupMapper.batchInsertGroupData(batteryGroupList);
|
||||
redisCache.setCacheObject(RedisKeyConstants.GROUP + SITE_ID + "_" +deviceId, batteryGroupList);
|
||||
}
|
||||
|
||||
}
|
||||
//根据属性名设置对应的值
|
||||
private static void setPropertyValue(EmsBatteryGroup groupData, String property, Object value) {
|
||||
BigDecimal numberValue = null;
|
||||
if (value instanceof Number) {
|
||||
numberValue = new BigDecimal(value.toString());
|
||||
}
|
||||
|
||||
switch (property) {
|
||||
case "ZT":
|
||||
if (numberValue != null) {
|
||||
groupData.setStatus(numberValue.toString());
|
||||
}
|
||||
break;
|
||||
case "SOC":
|
||||
groupData.setSoc(numberValue);
|
||||
break;
|
||||
case "SOH":
|
||||
groupData.setSoh(numberValue);
|
||||
break;
|
||||
case "DL":
|
||||
groupData.setCurrent(numberValue);
|
||||
break;
|
||||
case "DY":
|
||||
groupData.setVoltage(numberValue);
|
||||
break;
|
||||
case "BDSC":
|
||||
groupData.setEstimatedBackupDuration(numberValue);
|
||||
break;
|
||||
}
|
||||
}
|
||||
private void batteryDataProcess(String deviceId, String dataJson) {
|
||||
//电池组
|
||||
Map<String, Object> obj = JSON.parseObject(dataJson, new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
List<EmsBatteryDataDailyLatest> dailyList = new ArrayList<>();
|
||||
Map<String, EmsBatteryData> dataMap = new HashMap<>();
|
||||
for (Map.Entry<String, Object> entry : obj.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
|
||||
if (key.startsWith("DTDC")) {
|
||||
Matcher matcher = DTDC_PATTERN.matcher(key);
|
||||
if (matcher.matches()) {
|
||||
String batteryCellId = matcher.group(1);
|
||||
String property = matcher.group(2);
|
||||
|
||||
EmsBatteryData data = dataMap.getOrDefault(batteryCellId, new EmsBatteryData());
|
||||
if (StringUtils.isNotEmpty(batteryCellId)) {
|
||||
data.setDataTimestamp(DateUtils.getNowDate());
|
||||
data.setBatteryPack(deviceId);
|
||||
data.setBatteryCluster("BMSC01");// 写死
|
||||
data.setClusterDeviceId("BMSC01");
|
||||
data.setBatteryCellId(batteryCellId);
|
||||
data.setSiteId(SITE_ID);
|
||||
data.setDeviceId(batteryCellId);
|
||||
data.setCreateBy("system");
|
||||
data.setCreateTime(DateUtils.getNowDate());
|
||||
data.setUpdateBy("system");
|
||||
data.setUpdateTime(DateUtils.getNowDate());
|
||||
}
|
||||
// 根据后缀设置对应属性
|
||||
setDTDCPropertyValue(data, property, entry.getValue());
|
||||
dataMap.put(batteryCellId, data);
|
||||
|
||||
// 每日最新数据
|
||||
EmsBatteryDataDailyLatest daily = new EmsBatteryDataDailyLatest();
|
||||
BeanUtils.copyProperties(data, daily);
|
||||
daily.setDateDay(DateUtils.getNowDate());
|
||||
dailyList.add(daily);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(dataMap)) {
|
||||
List<EmsBatteryData> dataList = new ArrayList<>(dataMap.values());
|
||||
emsBatteryDataMapper.insertEmsBatteryDataList(new ArrayList<>(dataList));
|
||||
|
||||
redisCache.deleteList(RedisKeyConstants.BATTERY + SITE_ID + "_" +deviceId);
|
||||
redisCache.setCacheList(RedisKeyConstants.BATTERY + SITE_ID + "_" +deviceId, dataList);
|
||||
}
|
||||
// 批量处理每日最新数据
|
||||
if (dailyList != null && dailyList.size() > 0) {
|
||||
emsBatteryDailyLatestServiceImpl.batchProcessBatteryData(dailyList);
|
||||
}
|
||||
}
|
||||
|
||||
private void setDTDCPropertyValue(EmsBatteryData data, String property, Object value) {
|
||||
BigDecimal numberValue = null;
|
||||
if (value instanceof Number) {
|
||||
numberValue = new BigDecimal(value.toString());
|
||||
}
|
||||
switch (property) {
|
||||
case "DY":
|
||||
data.setVoltage(numberValue);
|
||||
break;
|
||||
case "WD":
|
||||
data.setTemperature(numberValue);
|
||||
break;
|
||||
case "NZ":
|
||||
data.setInterResistance(numberValue);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void batteryClusterDataProcess(String deviceId, String dataJson) {
|
||||
|
||||
Map<String, Object> obj = JSON.parseObject(dataJson, new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
EmsDevicesSetting joken = new EmsDevicesSetting();
|
||||
|
||||
//BMSC 电池簇
|
||||
EmsBatteryCluster data = new EmsBatteryCluster();
|
||||
// 其他非 BigDecimal 字段
|
||||
data.setWorkStatus(WorkStatus.NORMAL.getCode()); // 或其他默认值
|
||||
data.setPcsCommunicationStatus(CommunicationStatus.OK.getCode());
|
||||
data.setEmsCommunicationStatus(CommunicationStatus.OK.getCode());
|
||||
data.setCreateBy("system");
|
||||
data.setCreateTime(DateUtils.getNowDate());
|
||||
data.setUpdateBy("system");
|
||||
data.setUpdateTime(DateUtils.getNowDate());
|
||||
data.setSiteId(SITE_ID);
|
||||
// BMSC01 电流电压功率
|
||||
deviceId = "BMSC01";
|
||||
String stackDeviceId = getDeviceParent(deviceId, SITE_ID);
|
||||
if (StringUtils.isNotBlank(stackDeviceId)) {
|
||||
data.setStackDeviceId(stackDeviceId);
|
||||
} else {
|
||||
data.setStackDeviceId("1");
|
||||
}
|
||||
data.setDeviceId(deviceId);
|
||||
data.setClusterVoltage(StringUtils.getBigDecimal(obj.get("BMSC01ZLDY")));
|
||||
data.setClusterCurrent(StringUtils.getBigDecimal(obj.get("BMSC01ZLDL")));
|
||||
data.setMaxAllowedChargePower(StringUtils.getBigDecimal(obj.get("BMSC01ZLSCGL")));
|
||||
emsBatteryClusterMapper.insertEmsBatteryCluster(data);
|
||||
redisCache.setCacheObject(RedisKeyConstants.CLUSTER + SITE_ID + "_" +deviceId, data);
|
||||
|
||||
// BMSC02 电流电压功率
|
||||
deviceId = "BMSC02";
|
||||
stackDeviceId = getDeviceParent(deviceId, SITE_ID);
|
||||
if (StringUtils.isNotBlank(stackDeviceId)) {
|
||||
data.setStackDeviceId(stackDeviceId);
|
||||
} else {
|
||||
data.setStackDeviceId("1");
|
||||
}
|
||||
data.setDeviceId(deviceId);
|
||||
data.setClusterVoltage(StringUtils.getBigDecimal(obj.get("BMSC02ZLDY")));
|
||||
data.setClusterCurrent(StringUtils.getBigDecimal(obj.get("BMSC02ZLDL")));
|
||||
data.setMaxAllowedChargePower(StringUtils.getBigDecimal(obj.get("BMSC02ZLSCGL")));
|
||||
emsBatteryClusterMapper.insertEmsBatteryCluster(data);
|
||||
redisCache.setCacheObject(RedisKeyConstants.CLUSTER + SITE_ID + "_" +deviceId, data);
|
||||
}
|
||||
|
||||
private String getDeviceParent(String deviceId,String siteId) {
|
||||
EmsDevicesSetting joken = new EmsDevicesSetting();
|
||||
joken.setDeviceId(deviceId);
|
||||
joken.setSiteId(siteId);
|
||||
List<EmsDevicesSetting> up = emsDevicesSettingMapper.selectEmsDevicesSettingList(joken);
|
||||
String stackDeviceId = "";
|
||||
if (up != null && up.size() >0) {
|
||||
@ -148,18 +386,44 @@ public class DDSDataProcessServiceImpl implements IDDSDataProcessService {
|
||||
stackDeviceId = "1";
|
||||
}
|
||||
}
|
||||
//BMS 电池簇
|
||||
EmsBatteryCluster data = new EmsBatteryCluster();
|
||||
// 电流电压功率
|
||||
data.setClusterVoltage(StringUtils.getBigDecimal(obj.get("ZLDYZ")));
|
||||
data.setClusterCurrent(StringUtils.getBigDecimal(obj.get("ZLDLZ")));
|
||||
data.setMaxAllowedChargePower(StringUtils.getBigDecimal(obj.get("GLZ")));
|
||||
data.setTotalChargeEnergy(StringUtils.getBigDecimal(obj.get("ZZXYGDN1")));
|
||||
data.setTotalDischargeEnergy(StringUtils.getBigDecimal(obj.get("ZFXYGDN1")));
|
||||
return stackDeviceId;
|
||||
}
|
||||
|
||||
// 特殊字段
|
||||
private void meteBranchDataProcess(String deviceId, String dataJson) {
|
||||
Map<String, Object> obj = JSON.parseObject(dataJson, new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
//pcs电表数据
|
||||
EmsAmmeterData data = new EmsAmmeterData();
|
||||
// 更新时间
|
||||
data.setDataUpdateTime(new Date());
|
||||
|
||||
// 当月有功电能
|
||||
data.setCurrentForwardActiveTotal(StringUtils.getBigDecimal(obj.get("DQYZZXYGDN")));
|
||||
data.setCurrentForwardActivePeak(StringUtils.getBigDecimal(obj.get("DQYJZXYGDN")));
|
||||
data.setCurrentForwardActiveHigh(StringUtils.getBigDecimal(obj.get("DQYFZXYGDN")));
|
||||
data.setCurrentForwardActiveFlat(StringUtils.getBigDecimal(obj.get("DQYPZXYGDN")));
|
||||
data.setCurrentForwardActiveValley(StringUtils.getBigDecimal(obj.get("DQYGZXYGDN")));
|
||||
data.setCurrentReverseActiveTotal(StringUtils.getBigDecimal(obj.get("DQYZFXYGDN")));
|
||||
data.setCurrentReverseActivePeak(StringUtils.getBigDecimal(obj.get("DQYJFXYGDN")));
|
||||
data.setCurrentReverseActiveHigh(StringUtils.getBigDecimal(obj.get("DQYFFXYGDN")));
|
||||
data.setCurrentReverseActiveFlat(StringUtils.getBigDecimal(obj.get("DQYPFXYGDN")));
|
||||
data.setCurrentReverseActiveValley(StringUtils.getBigDecimal(obj.get("DQYGFXYGDN")));
|
||||
|
||||
// 总有功电能
|
||||
data.setTotalForwardActiveTwo(StringUtils.getBigDecimal(obj.get("ZZXYGDN2")));
|
||||
data.setTotalPeakForwardActive(StringUtils.getBigDecimal(obj.get("ZJZXYGDN")));
|
||||
data.setTotalHighForwardActive(StringUtils.getBigDecimal(obj.get("ZFZXYGDN")));
|
||||
data.setTotalFlatForwardActive(StringUtils.getBigDecimal(obj.get("ZPZXYGDN")));
|
||||
data.setTotalValleyForwardActive(StringUtils.getBigDecimal(obj.get("ZGZXYGDN")));
|
||||
data.setTotalReverseActiveTwo(StringUtils.getBigDecimal(obj.get("ZFXYGDN2")));
|
||||
data.setTotalPeakReverseActive(StringUtils.getBigDecimal(obj.get("ZJFXYGDN")));
|
||||
data.setTotalHighReverseActive(StringUtils.getBigDecimal(obj.get("ZFFXYGDN")));
|
||||
data.setTotalFlatReverseActive(StringUtils.getBigDecimal(obj.get("ZPFXYGDN")));
|
||||
data.setTotalValleyReverseActive(StringUtils.getBigDecimal(obj.get("ZGFXYGDN")));
|
||||
|
||||
// 其他字段
|
||||
data.setVoltagePercent(StringUtils.getBigDecimal(obj.get("DYBB")));
|
||||
data.setDisconnectDetectionIndication(StringUtils.getString(obj.get("DXJCZS")));
|
||||
data.setVoltageTransforRatio(StringUtils.getBigDecimal(obj.get("DYBB")));
|
||||
data.setRatedPrimaryCurrentValue(StringUtils.getBigDecimal(obj.get("EDYCDLZ")));
|
||||
data.setSwitchInputOutputStatus(StringUtils.getString(obj.get("KGLSRSCZT")));
|
||||
data.setAlarmStatus(StringUtils.getString(obj.get("BJZT")));
|
||||
@ -180,88 +444,20 @@ public class DDSDataProcessServiceImpl implements IDDSDataProcessService {
|
||||
data.setVoltage(StringUtils.getBigDecimal(obj.get("DY")));
|
||||
data.setCurrent(StringUtils.getBigDecimal(obj.get("DL")));
|
||||
data.setPower(StringUtils.getBigDecimal(obj.get("GL")));
|
||||
data.setInternalTemp(StringUtils.getBigDecimal(obj.get("NBWD")));
|
||||
data.setTotalForwardActiveOne(StringUtils.getBigDecimal(obj.get("ZZXYGDN1")));
|
||||
data.setTotalReverseActiveOne(StringUtils.getBigDecimal(obj.get("ZFXYGDN1")));
|
||||
|
||||
// 其他非 BigDecimal 字段
|
||||
data.setBatteryPackTemp(StringUtils.getBigDecimal(obj.get("NBWD")));
|
||||
data.setWorkStatus(WorkStatus.NORMAL.getCode()); // 或其他默认值
|
||||
data.setPcsCommunicationStatus(CommunicationStatus.OK.getCode());
|
||||
data.setEmsCommunicationStatus(CommunicationStatus.OK.getCode());
|
||||
data.setCreateBy("system");
|
||||
data.setCreateTime(DateUtils.getNowDate());
|
||||
data.setUpdateBy("system");
|
||||
data.setUpdateTime(DateUtils.getNowDate());
|
||||
data.setSiteId(SITE_ID);
|
||||
data.setDeviceId(deviceId);
|
||||
if (StringUtils.isNotBlank(stackDeviceId)) {
|
||||
data.setStackDeviceId(stackDeviceId);
|
||||
} else {
|
||||
data.setStackDeviceId("1");
|
||||
}
|
||||
emsBatteryClusterMapper.insertEmsBatteryCluster(data);
|
||||
|
||||
redisCache.setCacheObject(RedisKeyConstants.CLUSTER + SITE_ID + "_" +deviceId, data);
|
||||
|
||||
emsAmmeterDataMapper.insertEmsAmmeterData(data);
|
||||
redisCache.setCacheObject(RedisKeyConstants.AMMETER + SITE_ID + "_" +deviceId, data);
|
||||
}
|
||||
|
||||
private void batteryDataProcess(String deviceId, String dataJson) {
|
||||
EmsDevicesSetting joken = new EmsDevicesSetting();
|
||||
joken.setDeviceId(deviceId);
|
||||
List<EmsDevicesSetting> up = emsDevicesSettingMapper.selectEmsDevicesSettingList(joken);
|
||||
String stackDeviceId = "";
|
||||
if (up != null && up.size() >0) {
|
||||
stackDeviceId = up.get(0).getParentId();
|
||||
if (stackDeviceId == null || stackDeviceId.isEmpty()) {
|
||||
stackDeviceId = "1";
|
||||
}
|
||||
}
|
||||
//单体电池
|
||||
Map<String, Map<String, Object>> records = processData(JSON.parseObject(dataJson, new TypeReference<Map<String, Object>>() {}));
|
||||
List<EmsBatteryData> list = new ArrayList<>();
|
||||
List<EmsBatteryDataDailyLatest> dailyList = new ArrayList<>();
|
||||
//单体电池
|
||||
for (Map.Entry<String, Map<String, Object>> record : records.entrySet()) {
|
||||
String recordId = record.getKey();
|
||||
Map<String, Object> fields = record.getValue();
|
||||
|
||||
EmsBatteryData batteryData = new EmsBatteryData();
|
||||
batteryData.setDeviceId(recordId);
|
||||
batteryData.setBatteryCellId(recordId);
|
||||
batteryData.setSoc(StringUtils.getBigDecimal(fields.get("DTSOC")));
|
||||
batteryData.setSoh(StringUtils.getBigDecimal(fields.get("DTSOH")));
|
||||
batteryData.setTemperature(StringUtils.getBigDecimal(fields.get("DTWD")));
|
||||
batteryData.setVoltage(StringUtils.getBigDecimal(fields.get("DTDY")));
|
||||
|
||||
batteryData.setBatteryCluster(deviceId);
|
||||
batteryData.setBatteryPack(stackDeviceId);
|
||||
|
||||
// 时间戳
|
||||
batteryData.setDataTimestamp(new Date());
|
||||
|
||||
// ID字段
|
||||
batteryData.setSiteId(SITE_ID);
|
||||
batteryData.setClusterDeviceId(deviceId);
|
||||
|
||||
list.add(batteryData);
|
||||
|
||||
// 每日最新数据
|
||||
EmsBatteryDataDailyLatest daily = new EmsBatteryDataDailyLatest();
|
||||
BeanUtils.copyProperties(batteryData, daily);
|
||||
daily.setDateDay(DateUtils.getNowDate());
|
||||
dailyList.add(daily);
|
||||
}
|
||||
if (list.size() > 0 ) {
|
||||
emsBatteryDataMapper.insertEmsBatteryDataList(list);
|
||||
|
||||
redisCache.deleteList(RedisKeyConstants.BATTERY + SITE_ID + "_" +deviceId);
|
||||
redisCache.setCacheList(RedisKeyConstants.BATTERY + SITE_ID + "_" +deviceId, list);
|
||||
}
|
||||
// 批量处理每日最新数据
|
||||
if (dailyList != null && dailyList.size() > 0) {
|
||||
emsBatteryDailyLatestServiceImpl.batchProcessBatteryData(dailyList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void pcsDataProcess(String deviceId, String dataJson) {
|
||||
Map<String, Object> obj = JSON.parseObject(dataJson, new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
@ -334,9 +530,6 @@ public class DDSDataProcessServiceImpl implements IDDSDataProcessService {
|
||||
EmsPcsBranchData data = new EmsPcsBranchData();
|
||||
data.setDeviceId(deviceId);
|
||||
data.setGridStatus(GridStatus.GRID.getCode());
|
||||
data.setDcPower(StringUtils.getBigDecimal(fields.get("BMSC01ZLSCGL")));
|
||||
data.setDcVoltage(StringUtils.getBigDecimal(fields.get("BMSC01ZLDY")));
|
||||
data.setDcCurrent(StringUtils.getBigDecimal(fields.get("BMSC01ZLDL")));
|
||||
|
||||
data.setGridUVoltage(StringUtils.getBigDecimal(fields.get("DWXDYUAB")));
|
||||
data.setGridVVoltage(StringUtils.getBigDecimal(fields.get("DWXDYUBC")));
|
||||
@ -494,86 +687,129 @@ public class DDSDataProcessServiceImpl implements IDDSDataProcessService {
|
||||
Map<String, Object> obj = JSON.parseObject(dataJson, new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
|
||||
EmsAmmeterData dataLoad = new EmsAmmeterData();
|
||||
EmsAmmeterData dataMete = new EmsAmmeterData();
|
||||
// 更新时间
|
||||
dataLoad.setDataUpdateTime(new Date());
|
||||
dataMete.setDataUpdateTime(new Date());
|
||||
|
||||
// 电压+电流
|
||||
dataLoad.setPhaseAVoltage(StringUtils.getBigDecimal(obj.get("AXDY")));
|
||||
dataLoad.setPhaseBVoltage(StringUtils.getBigDecimal(obj.get("BXDY")));
|
||||
dataLoad.setPhaseCVoltage(StringUtils.getBigDecimal(obj.get("CXDY")));
|
||||
dataLoad.setPhaseACurrent(StringUtils.getBigDecimal(obj.get("AXDL")));
|
||||
dataLoad.setPhaseBCurrent(StringUtils.getBigDecimal(obj.get("BXDL")));
|
||||
dataLoad.setPhaseCCurrent(StringUtils.getBigDecimal(obj.get("CXDL")));
|
||||
dataMete.setPhaseAVoltage(StringUtils.getBigDecimal(obj.get("AXDY")));
|
||||
dataMete.setPhaseBVoltage(StringUtils.getBigDecimal(obj.get("BXDY")));
|
||||
dataMete.setPhaseCVoltage(StringUtils.getBigDecimal(obj.get("CXDY")));
|
||||
dataMete.setPhaseACurrent(StringUtils.getBigDecimal(obj.get("AXDL")));
|
||||
dataMete.setPhaseBCurrent(StringUtils.getBigDecimal(obj.get("BXDL")));
|
||||
dataMete.setPhaseCCurrent(StringUtils.getBigDecimal(obj.get("CXDL")));
|
||||
|
||||
dataLoad.setAbLineVoltage(StringUtils.getBigDecimal(obj.get("ABXDY")));
|
||||
dataLoad.setCbLineVoltage(StringUtils.getBigDecimal(obj.get("BCXDY")));
|
||||
dataLoad.setAcLineVoltage(StringUtils.getBigDecimal(obj.get("CAXDY")));
|
||||
dataMete.setAbLineVoltage(StringUtils.getBigDecimal(obj.get("ABXDY")));
|
||||
dataMete.setCbLineVoltage(StringUtils.getBigDecimal(obj.get("BCXDY")));
|
||||
dataMete.setAcLineVoltage(StringUtils.getBigDecimal(obj.get("CAXDY")));
|
||||
|
||||
// 频率
|
||||
dataLoad.setFrequency(StringUtils.getBigDecimal(obj.get("DWPL")));
|
||||
dataMete.setFrequency(StringUtils.getBigDecimal(obj.get("DWPL")));
|
||||
|
||||
// 功率
|
||||
dataLoad.setPhaseAActivePower(StringUtils.getBigDecimal(obj.get("AXYGGL")));
|
||||
dataLoad.setPhaseBActivePower(StringUtils.getBigDecimal(obj.get("BXYGGL")));
|
||||
dataLoad.setPhaseCActivePower(StringUtils.getBigDecimal(obj.get("CXYGGL")));
|
||||
dataLoad.setTotalActivePower(StringUtils.getBigDecimal(obj.get("ZYGGL")));
|
||||
dataLoad.setPhaseAReactivePower(StringUtils.getBigDecimal(obj.get("AXWGGL")));
|
||||
dataLoad.setPhaseBReactivePower(StringUtils.getBigDecimal(obj.get("BXWGGL")));
|
||||
dataLoad.setPhaseCReactivePower(StringUtils.getBigDecimal(obj.get("CXWGGL")));
|
||||
dataLoad.setTotalReactivePower(StringUtils.getBigDecimal(obj.get("ZWGGL")));
|
||||
dataMete.setPhaseAActivePower(StringUtils.getBigDecimal(obj.get("AXYGGL")));
|
||||
dataMete.setPhaseBActivePower(StringUtils.getBigDecimal(obj.get("BXYGGL")));
|
||||
dataMete.setPhaseCActivePower(StringUtils.getBigDecimal(obj.get("CXYGGL")));
|
||||
dataMete.setTotalActivePower(StringUtils.getBigDecimal(obj.get("ZYGGL")));
|
||||
dataMete.setPhaseAReactivePower(StringUtils.getBigDecimal(obj.get("AXWGGL")));
|
||||
dataMete.setPhaseBReactivePower(StringUtils.getBigDecimal(obj.get("BXWGGL")));
|
||||
dataMete.setPhaseCReactivePower(StringUtils.getBigDecimal(obj.get("CXWGGL")));
|
||||
dataMete.setTotalReactivePower(StringUtils.getBigDecimal(obj.get("ZWGGL")));
|
||||
dataMete.setPhaseAApparentPower(StringUtils.getBigDecimal(obj.get("AXSZGL")));
|
||||
dataMete.setPhaseBApparentPower(StringUtils.getBigDecimal(obj.get("BXSZGL")));
|
||||
dataMete.setPhaseCApparentPower(StringUtils.getBigDecimal(obj.get("CXSZGL")));
|
||||
dataMete.setTotalApparentPower(StringUtils.getBigDecimal(obj.get("ZSZGL")));
|
||||
dataMete.setPhaseAPowerFactor(StringUtils.getBigDecimal(obj.get("AXGLYS")));
|
||||
dataMete.setPhaseBPowerFactor(StringUtils.getBigDecimal(obj.get("BXGLYS")));
|
||||
dataMete.setPhaseCPowerFactor(StringUtils.getBigDecimal(obj.get("CXGLYS")));
|
||||
dataMete.setTotalPowerFactor(StringUtils.getBigDecimal(obj.get("ZGLYS")));
|
||||
|
||||
dataLoad.setTotalApparentPower(StringUtils.getBigDecimal(obj.get("ZSZGL")));
|
||||
dataLoad.setTotalPowerFactor(StringUtils.getBigDecimal(obj.get("ZGLYS")));
|
||||
// 电能设置-组合有功
|
||||
dataMete.setCurrentCombActiveTotal(StringUtils.getBigDecimal(obj.get("DQZHYGZDN")));
|
||||
dataMete.setCurrentCombActivePeak(StringUtils.getBigDecimal(obj.get("DQZHYGJDN")));
|
||||
dataMete.setCurrentCombActiveHigh(StringUtils.getBigDecimal(obj.get("DQZHYGFDN")));
|
||||
dataMete.setCurrentCombActiveFlat(StringUtils.getBigDecimal(obj.get("DQZHYGPDN")));
|
||||
dataMete.setCurrentCombActiveValley(StringUtils.getBigDecimal(obj.get("DQZHYGGDN")));
|
||||
// 电能设置-正向有功
|
||||
dataMete.setCurrentForwardActiveTotal(StringUtils.getBigDecimal(obj.get("DQZXYGZDN")));
|
||||
dataMete.setCurrentForwardActivePeak(StringUtils.getBigDecimal(obj.get("DQZXYGJDN")));
|
||||
dataMete.setCurrentForwardActiveHigh(StringUtils.getBigDecimal(obj.get("DQZXYGFDN")));
|
||||
dataMete.setCurrentForwardActiveFlat(StringUtils.getBigDecimal(obj.get("DQZXYGPDN")));
|
||||
dataMete.setCurrentForwardActiveValley(StringUtils.getBigDecimal(obj.get("DQZXYGGDN")));
|
||||
// 电能设置-反向有功
|
||||
dataMete.setCurrentReverseActiveTotal(StringUtils.getBigDecimal(obj.get("DQFXYGZDN")));
|
||||
dataMete.setCurrentReverseActivePeak(StringUtils.getBigDecimal(obj.get("DQFXYGJDN")));
|
||||
dataMete.setCurrentReverseActiveHigh(StringUtils.getBigDecimal(obj.get("DQFXYGFDN")));
|
||||
dataMete.setCurrentReverseActiveFlat(StringUtils.getBigDecimal(obj.get("DQFXYGPDN")));
|
||||
dataMete.setCurrentReverseActiveValley(StringUtils.getBigDecimal(obj.get("DQFXYGGDN")));
|
||||
// 电能设置-组合无功
|
||||
dataMete.setCurrentCombReactiveTotal(StringUtils.getBigDecimal(obj.get("DQZHWGZDN")));
|
||||
dataMete.setCurrentCombReactivePeak(StringUtils.getBigDecimal(obj.get("DQZHWGJDN")));
|
||||
dataMete.setCurrentCombReactiveHigh(StringUtils.getBigDecimal(obj.get("DQZHWGFDN")));
|
||||
dataMete.setCurrentCombReactiveFlat(StringUtils.getBigDecimal(obj.get("DQZHWGPDN")));
|
||||
dataMete.setCurrentCombReactiveValley(StringUtils.getBigDecimal(obj.get("DQZHWGGDN")));
|
||||
// 电能设置-正向无功
|
||||
dataMete.setCurrentForwardReactiveTotal(StringUtils.getBigDecimal(obj.get("DQZXWGZDN")));
|
||||
dataMete.setCurrentForwardReactivePeak(StringUtils.getBigDecimal(obj.get("DQZXWGJDN")));
|
||||
dataMete.setCurrentForwardReactiveHigh(StringUtils.getBigDecimal(obj.get("DQZXWGFDN")));
|
||||
dataMete.setCurrentForwardReactiveFlat(StringUtils.getBigDecimal(obj.get("DQZXWGPDN")));
|
||||
dataMete.setCurrentForwardReactiveValley(StringUtils.getBigDecimal(obj.get("DQZXWGGDN")));
|
||||
// 电能设置-反向无功
|
||||
dataMete.setCurrentReverseReactiveTotal(StringUtils.getBigDecimal(obj.get("DQFXWGZDN")));
|
||||
dataMete.setCurrentReverseReactivePeak(StringUtils.getBigDecimal(obj.get("DQFXWGJDN")));
|
||||
dataMete.setCurrentReverseReactiveHigh(StringUtils.getBigDecimal(obj.get("DQFXWGFDN")));
|
||||
dataMete.setCurrentReverseReactiveFlat(StringUtils.getBigDecimal(obj.get("DQFXWGPDN")));
|
||||
dataMete.setCurrentReverseReactiveValley(StringUtils.getBigDecimal(obj.get("DQFXWGGDN")));
|
||||
// abc相
|
||||
dataMete.setaForwardActiveEnergy(StringUtils.getBigDecimal(obj.get("AXZXYGDN")));
|
||||
dataMete.setbForwardActiveEnergy(StringUtils.getBigDecimal(obj.get("BXZXYGDN")));
|
||||
dataMete.setcForwardActiveEnergy(StringUtils.getBigDecimal(obj.get("CXZXYGDN")));
|
||||
|
||||
// 二次相关数据
|
||||
dataLoad.setSecondaryAbLineVoltage(StringUtils.getBigDecimal(obj.get("ECABXDY")));
|
||||
dataLoad.setSecondaryAPhaseCurrent(StringUtils.getBigDecimal(obj.get("ECAXDL")));
|
||||
dataLoad.setSecondaryAPhaseVoltage(StringUtils.getBigDecimal(obj.get("ECAXDY")));
|
||||
dataLoad.setSecondaryAPowerFactor(StringUtils.getBigDecimal(obj.get("ECAXGLYS")));
|
||||
dataLoad.setSecondaryAApparentPower(StringUtils.getBigDecimal(obj.get("ECAXSZGL")));
|
||||
dataLoad.setSecondaryAReactivePower(StringUtils.getBigDecimal(obj.get("ECAXWGGL")));
|
||||
dataLoad.setSecondaryAActivePower(StringUtils.getBigDecimal(obj.get("ECAXYGGL")));
|
||||
dataLoad.setSecondaryBcLineVoltage(StringUtils.getBigDecimal(obj.get("ECBCXDY")));
|
||||
dataLoad.setSecondaryBPhaseCurrent(StringUtils.getBigDecimal(obj.get("ECBXDL")));
|
||||
dataLoad.setSecondaryBPhaseVoltage(StringUtils.getBigDecimal(obj.get("ECBXDY")));
|
||||
dataLoad.setSecondaryBPowerFactor(StringUtils.getBigDecimal(obj.get("ECBXGLYS")));
|
||||
dataLoad.setSecondaryBApparentPower(StringUtils.getBigDecimal(obj.get("ECBXSZGL")));
|
||||
dataLoad.setSecondaryBReactivePower(StringUtils.getBigDecimal(obj.get("ECBXWGGL")));
|
||||
dataLoad.setSecondaryBActivePower(StringUtils.getBigDecimal(obj.get("ECBXYGGL")));
|
||||
dataLoad.setSecondaryCaLineVoltage(StringUtils.getBigDecimal(obj.get("ECCAXDY")));
|
||||
dataLoad.setSecondaryCPhaseCurrent(StringUtils.getBigDecimal(obj.get("ECCXDL")));
|
||||
dataLoad.setSecondaryCPhaseVoltage(StringUtils.getBigDecimal(obj.get("ECCXDY")));
|
||||
dataLoad.setSecondaryCPowerFactor(StringUtils.getBigDecimal(obj.get("ECCXGLYS")));
|
||||
dataLoad.setSecondaryCApparentPower(StringUtils.getBigDecimal(obj.get("ECCXSZGL")));
|
||||
dataLoad.setSecondaryCReactivePower(StringUtils.getBigDecimal(obj.get("ECCXWGGL")));
|
||||
dataLoad.setSecondaryCActivePower(StringUtils.getBigDecimal(obj.get("ECCXYGGL")));
|
||||
dataLoad.setSecondaryGridFrequency(StringUtils.getBigDecimal(obj.get("ECDWPL")));
|
||||
dataLoad.setSecondaryReverseReactiveEnergy(StringUtils.getBigDecimal(obj.get("ECFXWGDN")));
|
||||
dataLoad.setSecondaryNegativeActiveEnergy(StringUtils.getBigDecimal(obj.get("ECFXYGDN")));
|
||||
dataLoad.setSecondaryTotalPowerFactor(StringUtils.getBigDecimal(obj.get("ECZGLYS")));
|
||||
dataLoad.setSecondaryTotalApparentPower(StringUtils.getBigDecimal(obj.get("ECZSZFL")));
|
||||
dataLoad.setSecondaryTotalReactivePower(StringUtils.getBigDecimal(obj.get("ECZWGGL")));
|
||||
dataLoad.setSecondaryPositiveReactiveEnergy(StringUtils.getBigDecimal(obj.get("ECZXWGDN")));
|
||||
dataLoad.setSecondaryPositiveActiveEnergy(StringUtils.getBigDecimal(obj.get("ECZXYGDN")));
|
||||
dataLoad.setSecondaryTotalActivePower(StringUtils.getBigDecimal(obj.get("ECZYGGL")));
|
||||
// 变比
|
||||
dataMete.setCurrentPercent(StringUtils.getBigDecimal(obj.get("DLBBCT")));
|
||||
dataMete.setVoltagePercent(StringUtils.getBigDecimal(obj.get("DYBBPT")));
|
||||
|
||||
// 需量
|
||||
dataLoad.setReverseReactiveEnergyEqMinus(StringUtils.getBigDecimal(obj.get("FXWGDN")));
|
||||
dataLoad.setReverseActiveEnergyEpMinus(StringUtils.getBigDecimal(obj.get("FXYGDN")));
|
||||
dataLoad.setPositiveReactiveEnergyEqPlus(StringUtils.getBigDecimal(obj.get("ZXWGDN")));
|
||||
dataLoad.setPositiveActiveEnergyEpPlus(StringUtils.getBigDecimal(obj.get("ZXYGDN")));
|
||||
dataMete.setForwardAcMaxDemand(StringUtils.getBigDecimal(obj.get("ZXYGZDXL")));
|
||||
dataMete.setReverseAcMaxDemand(StringUtils.getBigDecimal(obj.get("FXYGZDXL")));
|
||||
dataMete.setDailyForwardMaxDemand(StringUtils.getBigDecimal(obj.get("DRZXYGZDXL")));
|
||||
dataMete.setForwardReactiveMaxDemand(StringUtils.getBigDecimal(obj.get("ZXWGZDXL")));
|
||||
dataMete.setReverseReactiveMaxDemand(StringUtils.getBigDecimal(obj.get("FXWGZDXL")));
|
||||
dataMete.setDailyReverseAcMaxDemand(StringUtils.getBigDecimal(obj.get("DRFXYGZDXL")));
|
||||
dataMete.setDailyForwardReacMaxDemand(StringUtils.getBigDecimal(obj.get("DRZXWGZDXL")));
|
||||
dataMete.setDailyReverseReacMaxDemand(StringUtils.getBigDecimal(obj.get("DRFXWGZDXL")));
|
||||
|
||||
dataLoad.setCreateBy("system");
|
||||
dataLoad.setCreateTime(DateUtils.getNowDate());
|
||||
dataLoad.setUpdateBy("system");
|
||||
dataLoad.setUpdateTime(DateUtils.getNowDate());
|
||||
dataLoad.setSiteId(SITE_ID);
|
||||
dataLoad.setDeviceId(deviceId);
|
||||
dataMete.setPreDayForwardAcMaxDemand(StringUtils.getBigDecimal(obj.get("S1RZXYGZDXL")));
|
||||
dataMete.setPreDayReverseAcMaxDemand(StringUtils.getBigDecimal(obj.get("S1RFXYGZDXL")));
|
||||
dataMete.setPreDayForwardReacMaxDemand(StringUtils.getBigDecimal(obj.get("S1RZXWGZDX")));
|
||||
dataMete.setPreDayReverseReacMaxDemand(StringUtils.getBigDecimal(obj.get("S1RFXWGZDX")));
|
||||
dataMete.setPre2dForwardAcMaxDemand(StringUtils.getBigDecimal(obj.get("S2RZXYGZDXL")));
|
||||
dataMete.setPre2dReverseAcMaxDemand(StringUtils.getBigDecimal(obj.get("S2RFXYGZDXL")));
|
||||
dataMete.setPre2dForwardReacMaxDemand(StringUtils.getBigDecimal(obj.get("S2RZXWGZDXL")));
|
||||
dataMete.setPre2dReverseReacMaxDemand(StringUtils.getBigDecimal(obj.get("S2RFXWGZDXL")));
|
||||
|
||||
emsAmmeterDataMapper.insertEmsAmmeterData(dataLoad);
|
||||
dataMete.setCurrentForwardAcDemand(StringUtils.getBigDecimal(obj.get("DQZXYGXL")));
|
||||
dataMete.setCurrentReverseAcDemand(StringUtils.getBigDecimal(obj.get("DQFXYGXL")));
|
||||
dataMete.setCurrentForwardReacDemand(StringUtils.getBigDecimal(obj.get("DQZXWGXL")));
|
||||
dataMete.setCurrentReverseReacDemand(StringUtils.getBigDecimal(obj.get("DQFXWGXL")));
|
||||
|
||||
redisCache.setCacheObject(RedisKeyConstants.AMMETER + SITE_ID + "_" +deviceId, dataLoad);
|
||||
// 其他字段
|
||||
dataMete.setDidoStatus(StringUtils.getString(obj.get("DIDOZTSYZT")));
|
||||
dataMete.setRunningStatus(StringUtils.getString(obj.get("YXZT")));
|
||||
dataMete.setZeroSeqCurrent(StringUtils.getBigDecimal(obj.get("LXDL")));
|
||||
dataMete.setVoltageUnbalanceDegree(StringUtils.getBigDecimal(obj.get("DYBPHD")));
|
||||
dataMete.setCurrentUnbalanceDegree(StringUtils.getBigDecimal(obj.get("DLBPHD")));
|
||||
|
||||
dataMete.setCreateBy("system");
|
||||
dataMete.setCreateTime(DateUtils.getNowDate());
|
||||
dataMete.setUpdateBy("system");
|
||||
dataMete.setUpdateTime(DateUtils.getNowDate());
|
||||
dataMete.setSiteId(SITE_ID);
|
||||
dataMete.setDeviceId(deviceId);
|
||||
|
||||
emsAmmeterDataMapper.insertEmsAmmeterData(dataMete);
|
||||
|
||||
redisCache.setCacheObject(RedisKeyConstants.AMMETER + SITE_ID + "_" +deviceId, dataMete);
|
||||
}
|
||||
// 数据分组处理
|
||||
private static Map<String, Map<String, Object>> processData(Map<String, Object> rawData) {
|
||||
|
||||
@ -110,10 +110,69 @@
|
||||
<result property="currentPercent" column="current_percent" />
|
||||
<result property="voltagePercent" column="voltage_percent" />
|
||||
<result property="avgCurrent" column="avg_current" />
|
||||
<result property="totalForwardActiveTwo" column="total_forward_active_two" />
|
||||
<result property="totalPeakForwardActive" column="total_peak_forward_active" />
|
||||
<result property="totalHighForwardActive" column="total_high_forward_active" />
|
||||
<result property="totalFlatForwardActive" column="total_flat_forward_active" />
|
||||
<result property="totalValleyForwardActive" column="total_valley_forward_active" />
|
||||
<result property="totalReverseActiveTwo" column="total_reverse_active_two" />
|
||||
<result property="totalPeakReverseActive" column="total_peak_reverse_active" />
|
||||
<result property="totalHighReverseActive" column="total_high_reverse_active" />
|
||||
<result property="totalFlatReverseActive" column="total_flat_reverse_active" />
|
||||
<result property="totalValleyReverseActive" column="total_valley_reverse_active" />
|
||||
<result property="disconnectDetectionIndication" column="disconnect_detection_indication" />
|
||||
<result property="ratedPrimaryCurrentValue" column="rated_primary_current_value" />
|
||||
<result property="switchInputOutputStatus" column="switch_input_output_status" />
|
||||
<result property="alarmStatus" column="alarm_status" />
|
||||
<result property="currentTotalVoltagePercent" column="current_total_voltage_percent" />
|
||||
<result property="voltageContentPercent" column="voltage_content_percent" />
|
||||
<result property="voltageAcPercent" column="voltage_ac_percent" />
|
||||
<result property="currentTotalCurrentPercent" column="current_total_current_percent" />
|
||||
<result property="currentContentPercent" column="current_content_percent" />
|
||||
<result property="currentAcPercent" column="current_ac_percent" />
|
||||
<result property="currentTotalPowerPercent" column="current_total_power_percent" />
|
||||
<result property="powerContentPercent" column="power_content_percent" />
|
||||
<result property="powerAcPercent" column="power_ac_percent" />
|
||||
<result property="dataSettingYearMonth" column="data_setting_year_month" />
|
||||
<result property="dataSettingDayHour" column="data_setting_day_hour" />
|
||||
<result property="dataSettingMinutesSeconds" column="data_setting_minutes_seconds" />
|
||||
<result property="currentRate" column="current_rate" />
|
||||
<result property="versionNumber" column="version_number" />
|
||||
<result property="voltage" column="voltage" />
|
||||
<result property="current" column="current" />
|
||||
<result property="power" column="power" />
|
||||
<result property="internalTemp" column="internal_temp" />
|
||||
<result property="totalForwardActiveOne" column="total_forward_active_one" />
|
||||
<result property="totalReverseActiveOne" column="total_reverse_active_one" />
|
||||
<result property="forwardReactiveMaxDemand" column="forward_reactive_max_demand" />
|
||||
<result property="reverseReactiveMaxDemand" column="reverse_reactive_max_demand" />
|
||||
<result property="aForwardActiveEnergy" column="a_forward_active_energy" />
|
||||
<result property="bForwardActiveEnergy" column="b_forward_active_energy" />
|
||||
<result property="cForwardActiveEnergy" column="c_forward_active_energy" />
|
||||
<result property="didoStatus" column="dido_status" />
|
||||
<result property="runningStatus" column="running_status" />
|
||||
<result property="zeroSeqCurrent" column="zero_seq_current" />
|
||||
<result property="voltageUnbalanceDegree" column="voltage_unbalance_degree" />
|
||||
<result property="currentUnbalanceDegree" column="current_unbalance_degree" />
|
||||
<result property="dailyReverseAcMaxDemand" column="daily_reverse_ac_max_demand" />
|
||||
<result property="dailyForwardReacMaxDemand" column="daily_forward_reac_max_demand" />
|
||||
<result property="dailyReverseReacMaxDemand" column="daily_reverse_reac_max_demand" />
|
||||
<result property="preDayForwardAcMaxDemand" column="pre_day_forward_ac_max_demand" />
|
||||
<result property="preDayReverseAcMaxDemand" column="pre_day_reverse_ac_max_demand" />
|
||||
<result property="preDayForwardReacMaxDemand" column="pre_day_forward_reac_max_demand" />
|
||||
<result property="preDayReverseReacMaxDemand" column="pre_day_reverse_reac_max_demand" />
|
||||
<result property="pre2dForwardAcMaxDemand" column="pre_2d_forward_ac_max_demand" />
|
||||
<result property="pre2dReverseAcMaxDemand" column="pre_2d_reverse_ac_max_demand" />
|
||||
<result property="pre2dForwardReacMaxDemand" column="pre_2d_forward_reac_max_demand" />
|
||||
<result property="pre2dReverseReacMaxDemand" column="pre_2d_reverse_reac_max_demand" />
|
||||
<result property="currentForwardAcDemand" column="current_forward_ac_demand" />
|
||||
<result property="currentReverseAcDemand" column="current_reverse_ac_demand" />
|
||||
<result property="currentForwardReacDemand" column="current_forward_reac_demand" />
|
||||
<result property="currentReverseReacDemand" column="current_reverse_reac_demand" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmsAmmeterDataVo">
|
||||
select id, data_update_time, current_comb_active_total, current_comb_active_peak, current_comb_active_high, current_comb_active_flat, current_comb_active_valley, current_forward_active_total, current_forward_active_peak, current_forward_active_high, current_forward_active_flat, current_forward_active_valley, current_reverse_active_total, current_reverse_active_peak, current_reverse_active_high, current_reverse_active_flat, current_reverse_active_valley, current_comb_reactive_total, current_comb_reactive_peak, current_comb_reactive_high, current_comb_reactive_flat, current_comb_reactive_valley, current_forward_reactive_total, current_forward_reactive_peak, current_forward_reactive_high, current_forward_reactive_flat, current_forward_reactive_valley, current_reverse_reactive_total, current_reverse_reactive_peak, current_reverse_reactive_high, current_reverse_reactive_flat, current_reverse_reactive_valley, phase_a_voltage, phase_b_voltage, phase_c_voltage, phase_a_current, phase_b_current, phase_c_current, frequency, ab_line_voltage, cb_line_voltage, ac_line_voltage, forward_ac_max_demand, reverse_ac_max_demand, phase_a_active_power, phase_b_active_power, phase_c_active_power, total_active_power, phase_a_reactive_power, phase_b_reactive_power, phase_c_reactive_power, total_reactive_power, phase_a_apparent_power, phase_b_apparent_power, phase_c_apparent_power, total_apparent_power, phase_a_power_factor, phase_b_power_factor, phase_c_power_factor, total_power_factor, daily_forward_max_demand, site_id, device_id, create_by, create_time, update_by, update_time, remark, secondary_ab_line_voltage, secondary_a_phase_current, secondary_a_phase_voltage, secondary_a_power_factor, secondary_a_apparent_power, secondary_a_reactive_power, secondary_a_active_power, secondary_bc_line_voltage, secondary_b_phase_current, secondary_b_phase_voltage, secondary_b_power_factor, secondary_b_apparent_power, secondary_b_reactive_power, secondary_b_active_power, secondary_ca_line_voltage, secondary_c_phase_current, secondary_c_phase_voltage, secondary_c_power_factor, secondary_c_apparent_power, secondary_c_reactive_power, secondary_c_active_power, secondary_grid_frequency, secondary_reverse_reactive_energy, secondary_negative_active_energy, secondary_total_power_factor, secondary_total_apparent_power, secondary_total_reactive_power, secondary_positive_reactive_energy, secondary_positive_active_energy, secondary_total_active_power, reverse_reactive_energy_eq_minus, reverse_active_energy_ep_minus, positive_reactive_energy_eq_plus, positive_active_energy_ep_plus, current_percent, voltage_percent, avg_current from ems_ammeter_data
|
||||
select id, data_update_time, current_comb_active_total, current_comb_active_peak, current_comb_active_high, current_comb_active_flat, current_comb_active_valley, current_forward_active_total, current_forward_active_peak, current_forward_active_high, current_forward_active_flat, current_forward_active_valley, current_reverse_active_total, current_reverse_active_peak, current_reverse_active_high, current_reverse_active_flat, current_reverse_active_valley, current_comb_reactive_total, current_comb_reactive_peak, current_comb_reactive_high, current_comb_reactive_flat, current_comb_reactive_valley, current_forward_reactive_total, current_forward_reactive_peak, current_forward_reactive_high, current_forward_reactive_flat, current_forward_reactive_valley, current_reverse_reactive_total, current_reverse_reactive_peak, current_reverse_reactive_high, current_reverse_reactive_flat, current_reverse_reactive_valley, phase_a_voltage, phase_b_voltage, phase_c_voltage, phase_a_current, phase_b_current, phase_c_current, frequency, ab_line_voltage, cb_line_voltage, ac_line_voltage, forward_ac_max_demand, reverse_ac_max_demand, phase_a_active_power, phase_b_active_power, phase_c_active_power, total_active_power, phase_a_reactive_power, phase_b_reactive_power, phase_c_reactive_power, total_reactive_power, phase_a_apparent_power, phase_b_apparent_power, phase_c_apparent_power, total_apparent_power, phase_a_power_factor, phase_b_power_factor, phase_c_power_factor, total_power_factor, daily_forward_max_demand, site_id, device_id, create_by, create_time, update_by, update_time, remark, secondary_ab_line_voltage, secondary_a_phase_current, secondary_a_phase_voltage, secondary_a_power_factor, secondary_a_apparent_power, secondary_a_reactive_power, secondary_a_active_power, secondary_bc_line_voltage, secondary_b_phase_current, secondary_b_phase_voltage, secondary_b_power_factor, secondary_b_apparent_power, secondary_b_reactive_power, secondary_b_active_power, secondary_ca_line_voltage, secondary_c_phase_current, secondary_c_phase_voltage, secondary_c_power_factor, secondary_c_apparent_power, secondary_c_reactive_power, secondary_c_active_power, secondary_grid_frequency, secondary_reverse_reactive_energy, secondary_negative_active_energy, secondary_total_power_factor, secondary_total_apparent_power, secondary_total_reactive_power, secondary_positive_reactive_energy, secondary_positive_active_energy, secondary_total_active_power, reverse_reactive_energy_eq_minus, reverse_active_energy_ep_minus, positive_reactive_energy_eq_plus, positive_active_energy_ep_plus, current_percent, voltage_percent, avg_current, total_forward_active_two, total_peak_forward_active, total_high_forward_active, total_flat_forward_active, total_valley_forward_active, total_reverse_active_two, total_peak_reverse_active, total_high_reverse_active, total_flat_reverse_active, total_valley_reverse_active, disconnect_detection_indication, rated_primary_current_value, switch_input_output_status, alarm_status, current_total_voltage_percent, voltage_content_percent, voltage_ac_percent, current_total_current_percent, current_content_percent, current_ac_percent, current_total_power_percent, power_content_percent, power_ac_percent, data_setting_year_month, data_setting_day_hour, data_setting_minutes_seconds, current_rate, version_number, voltage, current, power, internal_temp, total_forward_active_one, total_reverse_active_one, forward_reactive_max_demand, reverse_reactive_max_demand, a_forward_active_energy, b_forward_active_energy, c_forward_active_energy, dido_status, running_status, zero_seq_current, voltage_unbalance_degree, current_unbalance_degree, daily_reverse_ac_max_demand, daily_forward_reac_max_demand, daily_reverse_reac_max_demand, pre_day_forward_ac_max_demand, pre_day_reverse_ac_max_demand, pre_day_forward_reac_max_demand, pre_day_reverse_reac_max_demand, pre_2d_forward_ac_max_demand, pre_2d_reverse_ac_max_demand, pre_2d_forward_reac_max_demand, pre_2d_reverse_reac_max_demand, current_forward_ac_demand, current_reverse_ac_demand, current_forward_reac_demand, current_reverse_reac_demand from ems_ammeter_data
|
||||
</sql>
|
||||
|
||||
<select id="selectEmsAmmeterDataList" parameterType="EmsAmmeterData" resultMap="EmsAmmeterDataResult">
|
||||
@ -218,6 +277,65 @@
|
||||
<if test="currentPercent != null "> and current_percent = #{currentPercent}</if>
|
||||
<if test="voltagePercent != null "> and voltage_percent = #{voltagePercent}</if>
|
||||
<if test="avgCurrent != null "> and avg_current = #{avgCurrent}</if>
|
||||
<if test="totalForwardActiveTwo != null "> and total_forward_active_two = #{totalForwardActiveTwo}</if>
|
||||
<if test="totalPeakForwardActive != null "> and total_peak_forward_active = #{totalPeakForwardActive}</if>
|
||||
<if test="totalHighForwardActive != null "> and total_high_forward_active = #{totalHighForwardActive}</if>
|
||||
<if test="totalFlatForwardActive != null "> and total_flat_forward_active = #{totalFlatForwardActive}</if>
|
||||
<if test="totalValleyForwardActive != null "> and total_valley_forward_active = #{totalValleyForwardActive}</if>
|
||||
<if test="totalReverseActiveTwo != null "> and total_reverse_active_two = #{totalReverseActiveTwo}</if>
|
||||
<if test="totalPeakReverseActive != null "> and total_peak_reverse_active = #{totalPeakReverseActive}</if>
|
||||
<if test="totalHighReverseActive != null "> and total_high_reverse_active = #{totalHighReverseActive}</if>
|
||||
<if test="totalFlatReverseActive != null "> and total_flat_reverse_active = #{totalFlatReverseActive}</if>
|
||||
<if test="totalValleyReverseActive != null "> and total_valley_reverse_active = #{totalValleyReverseActive}</if>
|
||||
<if test="disconnectDetectionIndication != null and disconnectDetectionIndication != ''"> and disconnect_detection_indication = #{disconnectDetectionIndication}</if>
|
||||
<if test="ratedPrimaryCurrentValue != null "> and rated_primary_current_value = #{ratedPrimaryCurrentValue}</if>
|
||||
<if test="switchInputOutputStatus != null and switchInputOutputStatus != ''"> and switch_input_output_status = #{switchInputOutputStatus}</if>
|
||||
<if test="alarmStatus != null and alarmStatus != ''"> and alarm_status = #{alarmStatus}</if>
|
||||
<if test="currentTotalVoltagePercent != null "> and current_total_voltage_percent = #{currentTotalVoltagePercent}</if>
|
||||
<if test="voltageContentPercent != null "> and voltage_content_percent = #{voltageContentPercent}</if>
|
||||
<if test="voltageAcPercent != null "> and voltage_ac_percent = #{voltageAcPercent}</if>
|
||||
<if test="currentTotalCurrentPercent != null "> and current_total_current_percent = #{currentTotalCurrentPercent}</if>
|
||||
<if test="currentContentPercent != null "> and current_content_percent = #{currentContentPercent}</if>
|
||||
<if test="currentAcPercent != null "> and current_ac_percent = #{currentAcPercent}</if>
|
||||
<if test="currentTotalPowerPercent != null "> and current_total_power_percent = #{currentTotalPowerPercent}</if>
|
||||
<if test="powerContentPercent != null "> and power_content_percent = #{powerContentPercent}</if>
|
||||
<if test="powerAcPercent != null "> and power_ac_percent = #{powerAcPercent}</if>
|
||||
<if test="dataSettingYearMonth != null and dataSettingYearMonth != ''"> and data_setting_year_month = #{dataSettingYearMonth}</if>
|
||||
<if test="dataSettingDayHour != null and dataSettingDayHour != ''"> and data_setting_day_hour = #{dataSettingDayHour}</if>
|
||||
<if test="dataSettingMinutesSeconds != null and dataSettingMinutesSeconds != ''"> and data_setting_minutes_seconds = #{dataSettingMinutesSeconds}</if>
|
||||
<if test="currentRate != null "> and current_rate = #{currentRate}</if>
|
||||
<if test="versionNumber != null and versionNumber != ''"> and version_number = #{versionNumber}</if>
|
||||
<if test="voltage != null "> and voltage = #{voltage}</if>
|
||||
<if test="current != null "> and current = #{current}</if>
|
||||
<if test="power != null "> and power = #{power}</if>
|
||||
<if test="internalTemp != null "> and internal_temp = #{internalTemp}</if>
|
||||
<if test="totalForwardActiveOne != null "> and total_forward_active_one = #{totalForwardActiveOne}</if>
|
||||
<if test="totalReverseActiveOne != null "> and total_reverse_active_one = #{totalReverseActiveOne}</if>
|
||||
<if test="forwardReactiveMaxDemand != null and forwardReactiveMaxDemand != ''"> and forward_reactive_max_demand = #{forwardReactiveMaxDemand}</if>
|
||||
<if test="reverseReactiveMaxDemand != null "> and reverse_reactive_max_demand = #{reverseReactiveMaxDemand}</if>
|
||||
<if test="aForwardActiveEnergy != null and aForwardActiveEnergy != ''"> and a_forward_active_energy = #{aForwardActiveEnergy}</if>
|
||||
<if test="bForwardActiveEnergy != null and bForwardActiveEnergy != ''"> and b_forward_active_energy = #{bForwardActiveEnergy}</if>
|
||||
<if test="cForwardActiveEnergy != null "> and c_forward_active_energy = #{cForwardActiveEnergy}</if>
|
||||
<if test="didoStatus != null "> and dido_status = #{didoStatus}</if>
|
||||
<if test="runningStatus != null "> and running_status = #{runningStatus}</if>
|
||||
<if test="zeroSeqCurrent != null "> and zero_seq_current = #{zeroSeqCurrent}</if>
|
||||
<if test="voltageUnbalanceDegree != null "> and voltage_unbalance_degree = #{voltageUnbalanceDegree}</if>
|
||||
<if test="currentUnbalanceDegree != null "> and current_unbalance_degree = #{currentUnbalanceDegree}</if>
|
||||
<if test="dailyReverseAcMaxDemand != null "> and daily_reverse_ac_max_demand = #{dailyReverseAcMaxDemand}</if>
|
||||
<if test="dailyForwardReacMaxDemand != null "> and daily_forward_reac_max_demand = #{dailyForwardReacMaxDemand}</if>
|
||||
<if test="dailyReverseReacMaxDemand != null "> and daily_reverse_reac_max_demand = #{dailyReverseReacMaxDemand}</if>
|
||||
<if test="preDayForwardAcMaxDemand != null and preDayForwardAcMaxDemand != ''"> and pre_day_forward_ac_max_demand = #{preDayForwardAcMaxDemand}</if>
|
||||
<if test="preDayReverseAcMaxDemand != null and preDayReverseAcMaxDemand != ''"> and pre_day_reverse_ac_max_demand = #{preDayReverseAcMaxDemand}</if>
|
||||
<if test="preDayForwardReacMaxDemand != null and preDayForwardReacMaxDemand != ''"> and pre_day_forward_reac_max_demand = #{preDayForwardReacMaxDemand}</if>
|
||||
<if test="preDayReverseReacMaxDemand != null and preDayReverseReacMaxDemand != ''"> and pre_day_reverse_reac_max_demand = #{preDayReverseReacMaxDemand}</if>
|
||||
<if test="pre2dForwardAcMaxDemand != null and pre2dForwardAcMaxDemand != ''"> and pre_2d_forward_ac_max_demand = #{pre2dForwardAcMaxDemand}</if>
|
||||
<if test="pre2dReverseAcMaxDemand != null and pre2dReverseAcMaxDemand != ''"> and pre_2d_reverse_ac_max_demand = #{pre2dReverseAcMaxDemand}</if>
|
||||
<if test="pre2dForwardReacMaxDemand != null and pre2dForwardReacMaxDemand != ''"> and pre_2d_forward_reac_max_demand = #{pre2dForwardReacMaxDemand}</if>
|
||||
<if test="pre2dReverseReacMaxDemand != null and pre2dReverseReacMaxDemand != ''"> and pre_2d_reverse_reac_max_demand = #{pre2dReverseReacMaxDemand}</if>
|
||||
<if test="currentForwardAcDemand != null and currentForwardAcDemand != ''"> and current_forward_ac_demand = #{currentForwardAcDemand}</if>
|
||||
<if test="currentReverseAcDemand != null "> and current_reverse_ac_demand = #{currentReverseAcDemand}</if>
|
||||
<if test="currentForwardReacDemand != null and currentForwardReacDemand != ''"> and current_forward_reac_demand = #{currentForwardReacDemand}</if>
|
||||
<if test="currentReverseReacDemand != null "> and current_reverse_reac_demand = #{currentReverseReacDemand}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -333,6 +451,65 @@
|
||||
<if test="currentPercent != null">current_percent,</if>
|
||||
<if test="voltagePercent != null">voltage_percent,</if>
|
||||
<if test="avgCurrent != null">avg_current,</if>
|
||||
<if test="totalForwardActiveTwo != null">total_forward_active_two,</if>
|
||||
<if test="totalPeakForwardActive != null">total_peak_forward_active,</if>
|
||||
<if test="totalHighForwardActive != null">total_high_forward_active,</if>
|
||||
<if test="totalFlatForwardActive != null">total_flat_forward_active,</if>
|
||||
<if test="totalValleyForwardActive != null">total_valley_forward_active,</if>
|
||||
<if test="totalReverseActiveTwo != null">total_reverse_active_two,</if>
|
||||
<if test="totalPeakReverseActive != null">total_peak_reverse_active,</if>
|
||||
<if test="totalHighReverseActive != null">total_high_reverse_active,</if>
|
||||
<if test="totalFlatReverseActive != null">total_flat_reverse_active,</if>
|
||||
<if test="totalValleyReverseActive != null">total_valley_reverse_active,</if>
|
||||
<if test="disconnectDetectionIndication != null">disconnect_detection_indication,</if>
|
||||
<if test="ratedPrimaryCurrentValue != null">rated_primary_current_value,</if>
|
||||
<if test="switchInputOutputStatus != null">switch_input_output_status,</if>
|
||||
<if test="alarmStatus != null">alarm_status,</if>
|
||||
<if test="currentTotalVoltagePercent != null">current_total_voltage_percent,</if>
|
||||
<if test="voltageContentPercent != null">voltage_content_percent,</if>
|
||||
<if test="voltageAcPercent != null">voltage_ac_percent,</if>
|
||||
<if test="currentTotalCurrentPercent != null">current_total_current_percent,</if>
|
||||
<if test="currentContentPercent != null">current_content_percent,</if>
|
||||
<if test="currentAcPercent != null">current_ac_percent,</if>
|
||||
<if test="currentTotalPowerPercent != null">current_total_power_percent,</if>
|
||||
<if test="powerContentPercent != null">power_content_percent,</if>
|
||||
<if test="powerAcPercent != null">power_ac_percent,</if>
|
||||
<if test="dataSettingYearMonth != null">data_setting_year_month,</if>
|
||||
<if test="dataSettingDayHour != null">data_setting_day_hour,</if>
|
||||
<if test="dataSettingMinutesSeconds != null">data_setting_minutes_seconds,</if>
|
||||
<if test="currentRate != null">current_rate,</if>
|
||||
<if test="versionNumber != null">version_number,</if>
|
||||
<if test="voltage != null">voltage,</if>
|
||||
<if test="current != null">current,</if>
|
||||
<if test="power != null">power,</if>
|
||||
<if test="internalTemp != null">internal_temp,</if>
|
||||
<if test="totalForwardActiveOne != null">total_forward_active_one,</if>
|
||||
<if test="totalReverseActiveOne != null">total_reverse_active_one,</if>
|
||||
<if test="forwardReactiveMaxDemand != null">forward_reactive_max_demand,</if>
|
||||
<if test="reverseReactiveMaxDemand != null">reverse_reactive_max_demand,</if>
|
||||
<if test="aForwardActiveEnergy != null">a_forward_active_energy,</if>
|
||||
<if test="bForwardActiveEnergy != null">b_forward_active_energy,</if>
|
||||
<if test="cForwardActiveEnergy != null">c_forward_active_energy,</if>
|
||||
<if test="didoStatus != null">dido_status,</if>
|
||||
<if test="runningStatus != null">running_status,</if>
|
||||
<if test="zeroSeqCurrent != null">zero_seq_current,</if>
|
||||
<if test="voltageUnbalanceDegree != null">voltage_unbalance_degree,</if>
|
||||
<if test="currentUnbalanceDegree != null">current_unbalance_degree,</if>
|
||||
<if test="dailyReverseAcMaxDemand != null">daily_reverse_ac_max_demand,</if>
|
||||
<if test="dailyForwardReacMaxDemand != null">daily_forward_reac_max_demand,</if>
|
||||
<if test="dailyReverseReacMaxDemand != null">daily_reverse_reac_max_demand,</if>
|
||||
<if test="preDayForwardAcMaxDemand != null">pre_day_forward_ac_max_demand,</if>
|
||||
<if test="preDayReverseAcMaxDemand != null">pre_day_reverse_ac_max_demand,</if>
|
||||
<if test="preDayForwardReacMaxDemand != null">pre_day_forward_reac_max_demand,</if>
|
||||
<if test="preDayReverseReacMaxDemand != null">pre_day_reverse_reac_max_demand,</if>
|
||||
<if test="pre2dForwardAcMaxDemand != null">pre_2d_forward_ac_max_demand,</if>
|
||||
<if test="pre2dReverseAcMaxDemand != null">pre_2d_reverse_ac_max_demand,</if>
|
||||
<if test="pre2dForwardReacMaxDemand != null">pre_2d_forward_reac_max_demand,</if>
|
||||
<if test="pre2dReverseReacMaxDemand != null">pre_2d_reverse_reac_max_demand,</if>
|
||||
<if test="currentForwardAcDemand != null">current_forward_ac_demand,</if>
|
||||
<if test="currentReverseAcDemand != null">current_reverse_ac_demand,</if>
|
||||
<if test="currentForwardReacDemand != null">current_forward_reac_demand,</if>
|
||||
<if test="currentReverseReacDemand != null">current_reverse_reac_demand,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="dataUpdateTime != null">#{dataUpdateTime},</if>
|
||||
@ -439,6 +616,65 @@
|
||||
<if test="currentPercent != null">#{currentPercent},</if>
|
||||
<if test="voltagePercent != null">#{voltagePercent},</if>
|
||||
<if test="avgCurrent != null">#{avgCurrent},</if>
|
||||
<if test="totalForwardActiveTwo != null">#{totalForwardActiveTwo},</if>
|
||||
<if test="totalPeakForwardActive != null">#{totalPeakForwardActive},</if>
|
||||
<if test="totalHighForwardActive != null">#{totalHighForwardActive},</if>
|
||||
<if test="totalFlatForwardActive != null">#{totalFlatForwardActive},</if>
|
||||
<if test="totalValleyForwardActive != null">#{totalValleyForwardActive},</if>
|
||||
<if test="totalReverseActiveTwo != null">#{totalReverseActiveTwo},</if>
|
||||
<if test="totalPeakReverseActive != null">#{totalPeakReverseActive},</if>
|
||||
<if test="totalHighReverseActive != null">#{totalHighReverseActive},</if>
|
||||
<if test="totalFlatReverseActive != null">#{totalFlatReverseActive},</if>
|
||||
<if test="totalValleyReverseActive != null">#{totalValleyReverseActive},</if>
|
||||
<if test="disconnectDetectionIndication != null">#{disconnectDetectionIndication},</if>
|
||||
<if test="ratedPrimaryCurrentValue != null">#{ratedPrimaryCurrentValue},</if>
|
||||
<if test="switchInputOutputStatus != null">#{switchInputOutputStatus},</if>
|
||||
<if test="alarmStatus != null">#{alarmStatus},</if>
|
||||
<if test="currentTotalVoltagePercent != null">#{currentTotalVoltagePercent},</if>
|
||||
<if test="voltageContentPercent != null">#{voltageContentPercent},</if>
|
||||
<if test="voltageAcPercent != null">#{voltageAcPercent},</if>
|
||||
<if test="currentTotalCurrentPercent != null">#{currentTotalCurrentPercent},</if>
|
||||
<if test="currentContentPercent != null">#{currentContentPercent},</if>
|
||||
<if test="currentAcPercent != null">#{currentAcPercent},</if>
|
||||
<if test="currentTotalPowerPercent != null">#{currentTotalPowerPercent},</if>
|
||||
<if test="powerContentPercent != null">#{powerContentPercent},</if>
|
||||
<if test="powerAcPercent != null">#{powerAcPercent},</if>
|
||||
<if test="dataSettingYearMonth != null">#{dataSettingYearMonth},</if>
|
||||
<if test="dataSettingDayHour != null">#{dataSettingDayHour},</if>
|
||||
<if test="dataSettingMinutesSeconds != null">#{dataSettingMinutesSeconds},</if>
|
||||
<if test="currentRate != null">#{currentRate},</if>
|
||||
<if test="versionNumber != null">#{versionNumber},</if>
|
||||
<if test="voltage != null">#{voltage},</if>
|
||||
<if test="current != null">#{current},</if>
|
||||
<if test="power != null">#{power},</if>
|
||||
<if test="internalTemp != null">#{internalTemp},</if>
|
||||
<if test="totalForwardActiveOne != null">#{totalForwardActiveOne},</if>
|
||||
<if test="totalReverseActiveOne != null">#{totalReverseActiveOne},</if>
|
||||
<if test="forwardReactiveMaxDemand != null">#{forwardReactiveMaxDemand},</if>
|
||||
<if test="reverseReactiveMaxDemand != null">#{reverseReactiveMaxDemand},</if>
|
||||
<if test="aForwardActiveEnergy != null">#{aForwardActiveEnergy},</if>
|
||||
<if test="bForwardActiveEnergy != null">#{bForwardActiveEnergy},</if>
|
||||
<if test="cForwardActiveEnergy != null">#{cForwardActiveEnergy},</if>
|
||||
<if test="didoStatus != null">#{didoStatus},</if>
|
||||
<if test="runningStatus != null">#{runningStatus},</if>
|
||||
<if test="zeroSeqCurrent != null">#{zeroSeqCurrent},</if>
|
||||
<if test="voltageUnbalanceDegree != null">#{voltageUnbalanceDegree},</if>
|
||||
<if test="currentUnbalanceDegree != null">#{currentUnbalanceDegree},</if>
|
||||
<if test="dailyReverseAcMaxDemand != null">#{dailyReverseAcMaxDemand},</if>
|
||||
<if test="dailyForwardReacMaxDemand != null">#{dailyForwardReacMaxDemand},</if>
|
||||
<if test="dailyReverseReacMaxDemand != null">#{dailyReverseReacMaxDemand},</if>
|
||||
<if test="preDayForwardAcMaxDemand != null">#{preDayForwardAcMaxDemand},</if>
|
||||
<if test="preDayReverseAcMaxDemand != null">#{preDayReverseAcMaxDemand},</if>
|
||||
<if test="preDayForwardReacMaxDemand != null">#{preDayForwardReacMaxDemand},</if>
|
||||
<if test="preDayReverseReacMaxDemand != null">#{preDayReverseReacMaxDemand},</if>
|
||||
<if test="pre2dForwardAcMaxDemand != null">#{pre2dForwardAcMaxDemand},</if>
|
||||
<if test="pre2dReverseAcMaxDemand != null">#{pre2dReverseAcMaxDemand},</if>
|
||||
<if test="pre2dForwardReacMaxDemand != null">#{pre2dForwardReacMaxDemand},</if>
|
||||
<if test="pre2dReverseReacMaxDemand != null">#{pre2dReverseReacMaxDemand},</if>
|
||||
<if test="currentForwardAcDemand != null">#{currentForwardAcDemand},</if>
|
||||
<if test="currentReverseAcDemand != null">#{currentReverseAcDemand},</if>
|
||||
<if test="currentForwardReacDemand != null">#{currentForwardReacDemand},</if>
|
||||
<if test="currentReverseReacDemand != null">#{currentReverseReacDemand},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -549,6 +785,65 @@
|
||||
<if test="currentPercent != null">current_percent = #{currentPercent},</if>
|
||||
<if test="voltagePercent != null">voltage_percent = #{voltagePercent},</if>
|
||||
<if test="avgCurrent != null">avg_current = #{avgCurrent},</if>
|
||||
<if test="totalForwardActiveTwo != null">total_forward_active_two = #{totalForwardActiveTwo},</if>
|
||||
<if test="totalPeakForwardActive != null">total_peak_forward_active = #{totalPeakForwardActive},</if>
|
||||
<if test="totalHighForwardActive != null">total_high_forward_active = #{totalHighForwardActive},</if>
|
||||
<if test="totalFlatForwardActive != null">total_flat_forward_active = #{totalFlatForwardActive},</if>
|
||||
<if test="totalValleyForwardActive != null">total_valley_forward_active = #{totalValleyForwardActive},</if>
|
||||
<if test="totalReverseActiveTwo != null">total_reverse_active_two = #{totalReverseActiveTwo},</if>
|
||||
<if test="totalPeakReverseActive != null">total_peak_reverse_active = #{totalPeakReverseActive},</if>
|
||||
<if test="totalHighReverseActive != null">total_high_reverse_active = #{totalHighReverseActive},</if>
|
||||
<if test="totalFlatReverseActive != null">total_flat_reverse_active = #{totalFlatReverseActive},</if>
|
||||
<if test="totalValleyReverseActive != null">total_valley_reverse_active = #{totalValleyReverseActive},</if>
|
||||
<if test="disconnectDetectionIndication != null">disconnect_detection_indication = #{disconnectDetectionIndication},</if>
|
||||
<if test="ratedPrimaryCurrentValue != null">rated_primary_current_value = #{ratedPrimaryCurrentValue},</if>
|
||||
<if test="switchInputOutputStatus != null">switch_input_output_status = #{switchInputOutputStatus},</if>
|
||||
<if test="alarmStatus != null">alarm_status = #{alarmStatus},</if>
|
||||
<if test="currentTotalVoltagePercent != null">current_total_voltage_percent = #{currentTotalVoltagePercent},</if>
|
||||
<if test="voltageContentPercent != null">voltage_content_percent = #{voltageContentPercent},</if>
|
||||
<if test="voltageAcPercent != null">voltage_ac_percent = #{voltageAcPercent},</if>
|
||||
<if test="currentTotalCurrentPercent != null">current_total_current_percent = #{currentTotalCurrentPercent},</if>
|
||||
<if test="currentContentPercent != null">current_content_percent = #{currentContentPercent},</if>
|
||||
<if test="currentAcPercent != null">current_ac_percent = #{currentAcPercent},</if>
|
||||
<if test="currentTotalPowerPercent != null">current_total_power_percent = #{currentTotalPowerPercent},</if>
|
||||
<if test="powerContentPercent != null">power_content_percent = #{powerContentPercent},</if>
|
||||
<if test="powerAcPercent != null">power_ac_percent = #{powerAcPercent},</if>
|
||||
<if test="dataSettingYearMonth != null">data_setting_year_month = #{dataSettingYearMonth},</if>
|
||||
<if test="dataSettingDayHour != null">data_setting_day_hour = #{dataSettingDayHour},</if>
|
||||
<if test="dataSettingMinutesSeconds != null">data_setting_minutes_seconds = #{dataSettingMinutesSeconds},</if>
|
||||
<if test="currentRate != null">current_rate = #{currentRate},</if>
|
||||
<if test="versionNumber != null">version_number = #{versionNumber},</if>
|
||||
<if test="voltage != null">voltage = #{voltage},</if>
|
||||
<if test="current != null">current = #{current},</if>
|
||||
<if test="power != null">power = #{power},</if>
|
||||
<if test="internalTemp != null">internal_temp = #{internalTemp},</if>
|
||||
<if test="totalForwardActiveOne != null">total_forward_active_one = #{totalForwardActiveOne},</if>
|
||||
<if test="totalReverseActiveOne != null">total_reverse_active_one = #{totalReverseActiveOne},</if>
|
||||
<if test="forwardReactiveMaxDemand != null">forward_reactive_max_demand = #{forwardReactiveMaxDemand},</if>
|
||||
<if test="reverseReactiveMaxDemand != null">reverse_reactive_max_demand = #{reverseReactiveMaxDemand},</if>
|
||||
<if test="aForwardActiveEnergy != null">a_forward_active_energy = #{aForwardActiveEnergy},</if>
|
||||
<if test="bForwardActiveEnergy != null">b_forward_active_energy = #{bForwardActiveEnergy},</if>
|
||||
<if test="cForwardActiveEnergy != null">c_forward_active_energy = #{cForwardActiveEnergy},</if>
|
||||
<if test="didoStatus != null">dido_status = #{didoStatus},</if>
|
||||
<if test="runningStatus != null">running_status = #{runningStatus},</if>
|
||||
<if test="zeroSeqCurrent != null">zero_seq_current = #{zeroSeqCurrent},</if>
|
||||
<if test="voltageUnbalanceDegree != null">voltage_unbalance_degree = #{voltageUnbalanceDegree},</if>
|
||||
<if test="currentUnbalanceDegree != null">current_unbalance_degree = #{currentUnbalanceDegree},</if>
|
||||
<if test="dailyReverseAcMaxDemand != null">daily_reverse_ac_max_demand = #{dailyReverseAcMaxDemand},</if>
|
||||
<if test="dailyForwardReacMaxDemand != null">daily_forward_reac_max_demand = #{dailyForwardReacMaxDemand},</if>
|
||||
<if test="dailyReverseReacMaxDemand != null">daily_reverse_reac_max_demand = #{dailyReverseReacMaxDemand},</if>
|
||||
<if test="preDayForwardAcMaxDemand != null">pre_day_forward_ac_max_demand = #{preDayForwardAcMaxDemand},</if>
|
||||
<if test="preDayReverseAcMaxDemand != null">pre_day_reverse_ac_max_demand = #{preDayReverseAcMaxDemand},</if>
|
||||
<if test="preDayForwardReacMaxDemand != null">pre_day_forward_reac_max_demand = #{preDayForwardReacMaxDemand},</if>
|
||||
<if test="preDayReverseReacMaxDemand != null">pre_day_reverse_reac_max_demand = #{preDayReverseReacMaxDemand},</if>
|
||||
<if test="pre2dForwardAcMaxDemand != null">pre_2d_forward_ac_max_demand = #{pre2dForwardAcMaxDemand},</if>
|
||||
<if test="pre2dReverseAcMaxDemand != null">pre_2d_reverse_ac_max_demand = #{pre2dReverseAcMaxDemand},</if>
|
||||
<if test="pre2dForwardReacMaxDemand != null">pre_2d_forward_reac_max_demand = #{pre2dForwardReacMaxDemand},</if>
|
||||
<if test="pre2dReverseReacMaxDemand != null">pre_2d_reverse_reac_max_demand = #{pre2dReverseReacMaxDemand},</if>
|
||||
<if test="currentForwardAcDemand != null">current_forward_ac_demand = #{currentForwardAcDemand},</if>
|
||||
<if test="currentReverseAcDemand != null">current_reverse_ac_demand = #{currentReverseAcDemand},</if>
|
||||
<if test="currentForwardReacDemand != null">current_forward_reac_demand = #{currentForwardReacDemand},</if>
|
||||
<if test="currentReverseReacDemand != null">current_reverse_reac_demand = #{currentReverseReacDemand},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
@ -59,32 +59,10 @@
|
||||
<result property="minCellSohId" column="min_cell_soh_id" />
|
||||
<result property="totalChargeEnergy" column="total_charge_energy" />
|
||||
<result property="totalDischargeEnergy" column="total_discharge_energy" />
|
||||
<result property="disconnectDetectionIndication" column="disconnect_detection_indication" />
|
||||
<result property="voltageTransforRatio" column="voltage_transfor_ratio" />
|
||||
<result property="ratedPrimaryCurrentValue" column="rated_primary_current_value" />
|
||||
<result property="switchInputOutputStatus" column="switch_input_output_status" />
|
||||
<result property="alarmStatus" column="alarm_status" />
|
||||
<result property="currentTotalVoltagePercent" column="current_total_voltage_percent" />
|
||||
<result property="voltageContentPercent" column="voltage_content_percent" />
|
||||
<result property="voltageAcPercent" column="voltage_ac_percent" />
|
||||
<result property="currentTotalCurrentPercent" column="current_total_current_percent" />
|
||||
<result property="currentContentPercent" column="current_content_percent" />
|
||||
<result property="currentAcPercent" column="current_ac_percent" />
|
||||
<result property="currentTotalPowerPercent" column="current_total_power_percent" />
|
||||
<result property="powerContentPercent" column="power_content_percent" />
|
||||
<result property="powerAcPercent" column="power_ac_percent" />
|
||||
<result property="dataSettingYearMonth" column="data_setting_year_month" />
|
||||
<result property="dataSettingDayHour" column="data_setting_day_hour" />
|
||||
<result property="dataSettingMinutesSeconds" column="data_setting_minutes_seconds" />
|
||||
<result property="currentRate" column="current_rate" />
|
||||
<result property="versionNumber" column="version_number" />
|
||||
<result property="voltage" column="voltage" />
|
||||
<result property="current" column="current" />
|
||||
<result property="power" column="power" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmsBatteryClusterVo">
|
||||
select id, work_status, pcs_communication_status, ems_communication_status, cluster_voltage, chargeable_capacity, total_charged_capacity, cluster_current, dischargeable_capacity, total_discharged_capacity, soh, average_temperature, insulation_resistance, current_soc, create_by, create_time, update_by, update_time, remark, site_id, device_id, stack_device_id, max_allowed_charge_power, max_allowed_discharge_power, max_allowed_charge_voltage, max_allowed_discharge_voltage, max_allowed_charge_current, max_allowed_discharge_current, battery_pack_voltage, battery_pack_current, battery_pack_temp, battery_pack_soc, battery_pack_soh, battery_pack_insulation_resistance, avg_cell_voltage, avg_cell_temp, max_cell_voltage, max_cell_voltage_id, min_cell_voltage, min_cell_voltage_id, max_cell_temp, max_cell_temp_id, min_cell_temp, min_cell_temp_id, max_cell_soc, max_cell_soc_id, min_cell_soc, min_cell_soc_id, max_cell_soh, max_cell_soh_id, min_cell_soh, min_cell_soh_id, total_charge_energy, total_discharge_energy, disconnect_detection_indication, voltage_transfor_ratio, rated_primary_current_value, switch_input_output_status, alarm_status, current_total_voltage_percent, voltage_content_percent, voltage_ac_percent, current_total_current_percent, current_content_percent, current_ac_percent, current_total_power_percent, power_content_percent, power_ac_percent, data_setting_year_month, data_setting_day_hour, data_setting_minutes_seconds, current_rate, version_number, voltage, current, power from ems_battery_cluster
|
||||
select id, work_status, pcs_communication_status, ems_communication_status, cluster_voltage, chargeable_capacity, total_charged_capacity, cluster_current, dischargeable_capacity, total_discharged_capacity, soh, average_temperature, insulation_resistance, current_soc, create_by, create_time, update_by, update_time, remark, site_id, device_id, stack_device_id, max_allowed_charge_power, max_allowed_discharge_power, max_allowed_charge_voltage, max_allowed_discharge_voltage, max_allowed_charge_current, max_allowed_discharge_current, battery_pack_voltage, battery_pack_current, battery_pack_temp, battery_pack_soc, battery_pack_soh, battery_pack_insulation_resistance, avg_cell_voltage, avg_cell_temp, max_cell_voltage, max_cell_voltage_id, min_cell_voltage, min_cell_voltage_id, max_cell_temp, max_cell_temp_id, min_cell_temp, min_cell_temp_id, max_cell_soc, max_cell_soc_id, min_cell_soc, min_cell_soc_id, max_cell_soh, max_cell_soh_id, min_cell_soh, min_cell_soh_id, total_charge_energy, total_discharge_energy from ems_battery_cluster
|
||||
</sql>
|
||||
|
||||
<select id="selectEmsBatteryClusterList" parameterType="EmsBatteryCluster" resultMap="EmsBatteryClusterResult">
|
||||
@ -138,28 +116,6 @@
|
||||
<if test="minCellSohId != null "> and min_cell_soh_id = #{minCellSohId}</if>
|
||||
<if test="totalChargeEnergy != null "> and total_charge_energy = #{totalChargeEnergy}</if>
|
||||
<if test="totalDischargeEnergy != null "> and total_discharge_energy = #{totalDischargeEnergy}</if>
|
||||
<if test="disconnectDetectionIndication != null and disconnectDetectionIndication != ''"> and disconnect_detection_indication = #{disconnectDetectionIndication}</if>
|
||||
<if test="voltageTransforRatio != null "> and voltage_transfor_ratio = #{voltageTransforRatio}</if>
|
||||
<if test="ratedPrimaryCurrentValue != null "> and rated_primary_current_value = #{ratedPrimaryCurrentValue}</if>
|
||||
<if test="switchInputOutputStatus != null and switchInputOutputStatus != ''"> and switch_input_output_status = #{switchInputOutputStatus}</if>
|
||||
<if test="alarmStatus != null and alarmStatus != ''"> and alarm_status = #{alarmStatus}</if>
|
||||
<if test="currentTotalVoltagePercent != null "> and current_total_voltage_percent = #{currentTotalVoltagePercent}</if>
|
||||
<if test="voltageContentPercent != null "> and voltage_content_percent = #{voltageContentPercent}</if>
|
||||
<if test="voltageAcPercent != null "> and voltage_ac_percent = #{voltageAcPercent}</if>
|
||||
<if test="currentTotalCurrentPercent != null "> and current_total_current_percent = #{currentTotalCurrentPercent}</if>
|
||||
<if test="currentContentPercent != null "> and current_content_percent = #{currentContentPercent}</if>
|
||||
<if test="currentAcPercent != null "> and current_ac_percent = #{currentAcPercent}</if>
|
||||
<if test="currentTotalPowerPercent != null "> and current_total_power_percent = #{currentTotalPowerPercent}</if>
|
||||
<if test="powerContentPercent != null "> and power_content_percent = #{powerContentPercent}</if>
|
||||
<if test="powerAcPercent != null "> and power_ac_percent = #{powerAcPercent}</if>
|
||||
<if test="dataSettingYearMonth != null and dataSettingYearMonth != ''"> and data_setting_year_month = #{dataSettingYearMonth}</if>
|
||||
<if test="dataSettingDayHour != null and dataSettingDayHour != ''"> and data_setting_day_hour = #{dataSettingDayHour}</if>
|
||||
<if test="dataSettingMinutesSeconds != null and dataSettingMinutesSeconds != ''"> and data_setting_minutes_seconds = #{dataSettingMinutesSeconds}</if>
|
||||
<if test="currentRate != null "> and current_rate = #{currentRate}</if>
|
||||
<if test="versionNumber != null and versionNumber != ''"> and version_number = #{versionNumber}</if>
|
||||
<if test="voltage != null "> and voltage = #{voltage}</if>
|
||||
<if test="current != null "> and current = #{current}</if>
|
||||
<if test="power != null "> and power = #{power}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -224,28 +180,6 @@
|
||||
<if test="minCellSohId != null">min_cell_soh_id,</if>
|
||||
<if test="totalChargeEnergy != null">total_charge_energy,</if>
|
||||
<if test="totalDischargeEnergy != null">total_discharge_energy,</if>
|
||||
<if test="disconnectDetectionIndication != null">disconnect_detection_indication,</if>
|
||||
<if test="voltageTransforRatio != null">voltage_transfor_ratio,</if>
|
||||
<if test="ratedPrimaryCurrentValue != null">rated_primary_current_value,</if>
|
||||
<if test="switchInputOutputStatus != null">switch_input_output_status,</if>
|
||||
<if test="alarmStatus != null">alarm_status,</if>
|
||||
<if test="currentTotalVoltagePercent != null">current_total_voltage_percent,</if>
|
||||
<if test="voltageContentPercent != null">voltage_content_percent,</if>
|
||||
<if test="voltageAcPercent != null">voltage_ac_percent,</if>
|
||||
<if test="currentTotalCurrentPercent != null">current_total_current_percent,</if>
|
||||
<if test="currentContentPercent != null">current_content_percent,</if>
|
||||
<if test="currentAcPercent != null">current_ac_percent,</if>
|
||||
<if test="currentTotalPowerPercent != null">current_total_power_percent,</if>
|
||||
<if test="powerContentPercent != null">power_content_percent,</if>
|
||||
<if test="powerAcPercent != null">power_ac_percent,</if>
|
||||
<if test="dataSettingYearMonth != null">data_setting_year_month,</if>
|
||||
<if test="dataSettingDayHour != null">data_setting_day_hour,</if>
|
||||
<if test="dataSettingMinutesSeconds != null">data_setting_minutes_seconds,</if>
|
||||
<if test="currentRate != null">current_rate,</if>
|
||||
<if test="versionNumber != null">version_number,</if>
|
||||
<if test="voltage != null">voltage,</if>
|
||||
<if test="current != null">current,</if>
|
||||
<if test="power != null">power,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="workStatus != null">#{workStatus},</if>
|
||||
@ -301,28 +235,6 @@
|
||||
<if test="minCellSohId != null">#{minCellSohId},</if>
|
||||
<if test="totalChargeEnergy != null">#{totalChargeEnergy},</if>
|
||||
<if test="totalDischargeEnergy != null">#{totalDischargeEnergy},</if>
|
||||
<if test="disconnectDetectionIndication != null">#{disconnectDetectionIndication},</if>
|
||||
<if test="voltageTransforRatio != null">#{voltageTransforRatio},</if>
|
||||
<if test="ratedPrimaryCurrentValue != null">#{ratedPrimaryCurrentValue},</if>
|
||||
<if test="switchInputOutputStatus != null">#{switchInputOutputStatus},</if>
|
||||
<if test="alarmStatus != null">#{alarmStatus},</if>
|
||||
<if test="currentTotalVoltagePercent != null">#{currentTotalVoltagePercent},</if>
|
||||
<if test="voltageContentPercent != null">#{voltageContentPercent},</if>
|
||||
<if test="voltageAcPercent != null">#{voltageAcPercent},</if>
|
||||
<if test="currentTotalCurrentPercent != null">#{currentTotalCurrentPercent},</if>
|
||||
<if test="currentContentPercent != null">#{currentContentPercent},</if>
|
||||
<if test="currentAcPercent != null">#{currentAcPercent},</if>
|
||||
<if test="currentTotalPowerPercent != null">#{currentTotalPowerPercent},</if>
|
||||
<if test="powerContentPercent != null">#{powerContentPercent},</if>
|
||||
<if test="powerAcPercent != null">#{powerAcPercent},</if>
|
||||
<if test="dataSettingYearMonth != null">#{dataSettingYearMonth},</if>
|
||||
<if test="dataSettingDayHour != null">#{dataSettingDayHour},</if>
|
||||
<if test="dataSettingMinutesSeconds != null">#{dataSettingMinutesSeconds},</if>
|
||||
<if test="currentRate != null">#{currentRate},</if>
|
||||
<if test="versionNumber != null">#{versionNumber},</if>
|
||||
<if test="voltage != null">#{voltage},</if>
|
||||
<if test="current != null">#{current},</if>
|
||||
<if test="power != null">#{power},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -382,28 +294,6 @@
|
||||
<if test="minCellSohId != null">min_cell_soh_id = #{minCellSohId},</if>
|
||||
<if test="totalChargeEnergy != null">total_charge_energy = #{totalChargeEnergy},</if>
|
||||
<if test="totalDischargeEnergy != null">total_discharge_energy = #{totalDischargeEnergy},</if>
|
||||
<if test="disconnectDetectionIndication != null">disconnect_detection_indication = #{disconnectDetectionIndication},</if>
|
||||
<if test="voltageTransforRatio != null">voltage_transfor_ratio = #{voltageTransforRatio},</if>
|
||||
<if test="ratedPrimaryCurrentValue != null">rated_primary_current_value = #{ratedPrimaryCurrentValue},</if>
|
||||
<if test="switchInputOutputStatus != null">switch_input_output_status = #{switchInputOutputStatus},</if>
|
||||
<if test="alarmStatus != null">alarm_status = #{alarmStatus},</if>
|
||||
<if test="currentTotalVoltagePercent != null">current_total_voltage_percent = #{currentTotalVoltagePercent},</if>
|
||||
<if test="voltageContentPercent != null">voltage_content_percent = #{voltageContentPercent},</if>
|
||||
<if test="voltageAcPercent != null">voltage_ac_percent = #{voltageAcPercent},</if>
|
||||
<if test="currentTotalCurrentPercent != null">current_total_current_percent = #{currentTotalCurrentPercent},</if>
|
||||
<if test="currentContentPercent != null">current_content_percent = #{currentContentPercent},</if>
|
||||
<if test="currentAcPercent != null">current_ac_percent = #{currentAcPercent},</if>
|
||||
<if test="currentTotalPowerPercent != null">current_total_power_percent = #{currentTotalPowerPercent},</if>
|
||||
<if test="powerContentPercent != null">power_content_percent = #{powerContentPercent},</if>
|
||||
<if test="powerAcPercent != null">power_ac_percent = #{powerAcPercent},</if>
|
||||
<if test="dataSettingYearMonth != null">data_setting_year_month = #{dataSettingYearMonth},</if>
|
||||
<if test="dataSettingDayHour != null">data_setting_day_hour = #{dataSettingDayHour},</if>
|
||||
<if test="dataSettingMinutesSeconds != null">data_setting_minutes_seconds = #{dataSettingMinutesSeconds},</if>
|
||||
<if test="currentRate != null">current_rate = #{currentRate},</if>
|
||||
<if test="versionNumber != null">version_number = #{versionNumber},</if>
|
||||
<if test="voltage != null">voltage = #{voltage},</if>
|
||||
<if test="current != null">current = #{current},</if>
|
||||
<if test="power != null">power = #{power},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
@ -22,10 +22,11 @@
|
||||
<result property="siteId" column="site_id" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="clusterDeviceId" column="cluster_device_id" />
|
||||
<result property="interResistance" column="inter_resistance" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmsBatteryDataVo">
|
||||
select id, battery_pack, battery_cluster, battery_cell_id, voltage, temperature, soc, soh, data_timestamp, create_by, create_time, update_by, update_time, remark, site_id, device_id, cluster_device_id from ems_battery_data
|
||||
select id, battery_pack, battery_cluster, battery_cell_id, voltage, temperature, soc, soh, data_timestamp, create_by, create_time, update_by, update_time, remark, site_id, device_id, cluster_device_id, inter_resistance from ems_battery_data
|
||||
</sql>
|
||||
|
||||
<select id="selectEmsBatteryDataList" parameterType="EmsBatteryData" resultMap="EmsBatteryDataResult">
|
||||
@ -42,6 +43,7 @@
|
||||
<if test="siteId != null and siteId != ''"> and site_id = #{siteId}</if>
|
||||
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
|
||||
<if test="clusterDeviceId != null and clusterDeviceId != ''"> and cluster_device_id = #{clusterDeviceId}</if>
|
||||
<if test="interResistance != null "> and inter_resistance = #{interResistance}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -69,6 +71,7 @@
|
||||
<if test="siteId != null">site_id,</if>
|
||||
<if test="deviceId != null and deviceId != ''">device_id,</if>
|
||||
<if test="clusterDeviceId != null and clusterDeviceId != ''">cluster_device_id,</if>
|
||||
<if test="interResistance != null">inter_resistance,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="batteryPack != null">#{batteryPack},</if>
|
||||
@ -87,6 +90,7 @@
|
||||
<if test="siteId != null">#{siteId},</if>
|
||||
<if test="deviceId != null and deviceId != ''">#{deviceId},</if>
|
||||
<if test="clusterDeviceId != null and clusterDeviceId != ''">#{clusterDeviceId},</if>
|
||||
<if test="interResistance != null">#{interResistance},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -109,6 +113,7 @@
|
||||
<if test="siteId != null">site_id = #{siteId},</if>
|
||||
<if test="deviceId != null and deviceId != ''">device_id = #{deviceId},</if>
|
||||
<if test="clusterDeviceId != null and clusterDeviceId != ''">cluster_device_id = #{clusterDeviceId},</if>
|
||||
<if test="interResistance != null">inter_resistance = #{interResistance},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@ -202,14 +207,14 @@
|
||||
battery_pack, battery_cluster, battery_cell_id,
|
||||
voltage, temperature, soc, soh, data_timestamp,
|
||||
create_by, create_time, update_by, update_time,
|
||||
remark, site_id, device_id, cluster_device_id
|
||||
remark, site_id, device_id, cluster_device_id, inter_resistance
|
||||
) VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.batteryPack}, #{item.batteryCluster}, #{item.batteryCellId},
|
||||
#{item.voltage}, #{item.temperature}, #{item.soc}, #{item.soh}, #{item.dataTimestamp},
|
||||
#{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime},
|
||||
#{item.remark}, #{item.siteId}, #{item.deviceId}, #{item.clusterDeviceId}
|
||||
#{item.remark}, #{item.siteId}, #{item.deviceId}, #{item.clusterDeviceId},#{item.interResistance}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
@ -0,0 +1,148 @@
|
||||
<?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.xzzn.ems.mapper.EmsBatteryGroupMapper">
|
||||
|
||||
<resultMap type="EmsBatteryGroup" id="EmsBatteryGroupResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="voltage" column="voltage" />
|
||||
<result property="current" column="current" />
|
||||
<result property="soc" column="soc" />
|
||||
<result property="soh" column="soh" />
|
||||
<result property="estimatedBackupDuration" column="estimated_backup_duration" />
|
||||
<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" />
|
||||
<result property="siteId" column="site_id" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmsBatteryGroupVo">
|
||||
select id, status, voltage, current, soc, soh, estimated_backup_duration, create_by, create_time, update_by, update_time, remark, site_id, device_id from ems_battery_group
|
||||
</sql>
|
||||
|
||||
<select id="selectEmsBatteryGroupList" parameterType="EmsBatteryGroup" resultMap="EmsBatteryGroupResult">
|
||||
<include refid="selectEmsBatteryGroupVo"/>
|
||||
<where>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="voltage != null "> and voltage = #{voltage}</if>
|
||||
<if test="current != null "> and current = #{current}</if>
|
||||
<if test="soc != null "> and soc = #{soc}</if>
|
||||
<if test="soh != null "> and soh = #{soh}</if>
|
||||
<if test="estimatedBackupDuration != null "> and estimated_backup_duration = #{estimatedBackupDuration}</if>
|
||||
<if test="siteId != null and siteId != ''"> and site_id = #{siteId}</if>
|
||||
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEmsBatteryGroupById" parameterType="Long" resultMap="EmsBatteryGroupResult">
|
||||
<include refid="selectEmsBatteryGroupVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEmsBatteryGroup" parameterType="EmsBatteryGroup" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into ems_battery_group
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="status != null">status,</if>
|
||||
<if test="voltage != null">voltage,</if>
|
||||
<if test="current != null">current,</if>
|
||||
<if test="soc != null">soc,</if>
|
||||
<if test="soh != null">soh,</if>
|
||||
<if test="estimatedBackupDuration != null">estimated_backup_duration,</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>
|
||||
<if test="siteId != null">site_id,</if>
|
||||
<if test="deviceId != null and deviceId != ''">device_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="voltage != null">#{voltage},</if>
|
||||
<if test="current != null">#{current},</if>
|
||||
<if test="soc != null">#{soc},</if>
|
||||
<if test="soh != null">#{soh},</if>
|
||||
<if test="estimatedBackupDuration != null">#{estimatedBackupDuration},</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>
|
||||
<if test="siteId != null">#{siteId},</if>
|
||||
<if test="deviceId != null and deviceId != ''">#{deviceId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEmsBatteryGroup" parameterType="EmsBatteryGroup">
|
||||
update ems_battery_group
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="voltage != null">voltage = #{voltage},</if>
|
||||
<if test="current != null">current = #{current},</if>
|
||||
<if test="soc != null">soc = #{soc},</if>
|
||||
<if test="soh != null">soh = #{soh},</if>
|
||||
<if test="estimatedBackupDuration != null">estimated_backup_duration = #{estimatedBackupDuration},</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>
|
||||
<if test="siteId != null">site_id = #{siteId},</if>
|
||||
<if test="deviceId != null and deviceId != ''">device_id = #{deviceId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEmsBatteryGroupById" parameterType="Long">
|
||||
delete from ems_battery_group where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmsBatteryGroupByIds" parameterType="String">
|
||||
delete from ems_battery_group where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchInsertGroupData" parameterType="java.util.List">
|
||||
INSERT INTO ems_battery_group (
|
||||
status,
|
||||
voltage,
|
||||
current,
|
||||
soc,
|
||||
soh,
|
||||
estimated_backup_duration,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
remark,
|
||||
site_id,
|
||||
device_id
|
||||
) VALUES
|
||||
<!-- 遍历集合生成多条记录,注意separator和括号闭合 -->
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.status},
|
||||
#{item.voltage},
|
||||
#{item.current},
|
||||
#{item.soc},
|
||||
#{item.soh},
|
||||
#{item.estimatedBackupDuration},
|
||||
#{item.createBy},
|
||||
#{item.createTime},
|
||||
#{item.updateBy},
|
||||
#{item.updateTime},
|
||||
#{item.remark},
|
||||
#{item.siteId},
|
||||
#{item.deviceId}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
91
ems-system/src/main/resources/mapper/ems/EmsDhDataMapper.xml
Normal file
91
ems-system/src/main/resources/mapper/ems/EmsDhDataMapper.xml
Normal file
@ -0,0 +1,91 @@
|
||||
<?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.xzzn.ems.mapper.EmsDhDataMapper">
|
||||
|
||||
<resultMap type="EmsDhData" id="EmsDhDataResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="humidity" column="humidity" />
|
||||
<result property="temperature" column="temperature" />
|
||||
<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" />
|
||||
<result property="siteId" column="site_id" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmsDhDataVo">
|
||||
select id, humidity, temperature, create_by, create_time, update_by, update_time, remark, site_id, device_id from ems_dh_data
|
||||
</sql>
|
||||
|
||||
<select id="selectEmsDhDataList" parameterType="EmsDhData" resultMap="EmsDhDataResult">
|
||||
<include refid="selectEmsDhDataVo"/>
|
||||
<where>
|
||||
<if test="humidity != null "> and humidity = #{humidity}</if>
|
||||
<if test="temperature != null "> and temperature = #{temperature}</if>
|
||||
<if test="siteId != null and siteId != ''"> and site_id = #{siteId}</if>
|
||||
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEmsDhDataById" parameterType="Long" resultMap="EmsDhDataResult">
|
||||
<include refid="selectEmsDhDataVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEmsDhData" parameterType="EmsDhData" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into ems_dh_data
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="humidity != null">humidity,</if>
|
||||
<if test="temperature != null">temperature,</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>
|
||||
<if test="siteId != null">site_id,</if>
|
||||
<if test="deviceId != null and deviceId != ''">device_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="humidity != null">#{humidity},</if>
|
||||
<if test="temperature != null">#{temperature},</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>
|
||||
<if test="siteId != null">#{siteId},</if>
|
||||
<if test="deviceId != null and deviceId != ''">#{deviceId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEmsDhData" parameterType="EmsDhData">
|
||||
update ems_dh_data
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="humidity != null">humidity = #{humidity},</if>
|
||||
<if test="temperature != null">temperature = #{temperature},</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>
|
||||
<if test="siteId != null">site_id = #{siteId},</if>
|
||||
<if test="deviceId != null and deviceId != ''">device_id = #{deviceId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEmsDhDataById" parameterType="Long">
|
||||
delete from ems_dh_data where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmsDhDataByIds" parameterType="String">
|
||||
delete from ems_dh_data where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user