奉贤电表数据接入

This commit is contained in:
2025-07-04 12:37:18 +08:00
parent 126b637932
commit 4bb23a7c75
9 changed files with 2093 additions and 124 deletions

View File

@ -1,6 +1,7 @@
package com.xzzn.web.controller.ems;
import com.xzzn.common.core.controller.BaseController;
import com.xzzn.common.core.domain.AjaxResult;
import com.xzzn.common.core.page.TableDataInfo;
import com.xzzn.ems.domain.EmsDevicesSetting;
import com.xzzn.ems.domain.EmsSiteSetting;
@ -56,8 +57,8 @@ public class EmsSiteConfigController extends BaseController{
* 获取设备详细信息
*/
@GetMapping("/getDeviceDetailInfo")
public EmsDevicesSetting getDeviceDetailInfo(@RequestParam String deviceId)
public AjaxResult getDeviceDetailInfo(@RequestParam String deviceId)
{
return iEmsDeviceSettingService.getDeviceDetailInfo(deviceId);
return success(iEmsDeviceSettingService.getDeviceDetailInfo(deviceId));
}
}

View File

@ -31,4 +31,9 @@ public class RedisKeyConstants
* battery单体电池数据 redis key
*/
public static final String BATTERY = "BATTERY_";
/**
* 电表数据 redis key
*/
public static final String AMMETER = "AMMETER_";
}

View File

@ -22,8 +22,8 @@ public class EmsPcsData extends BaseEntity
private Long id;
/** 数据更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "数据更新时间", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "数据更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date dataUpdateTime;
/** 工作状态 */

View File

@ -12,19 +12,19 @@ public class AmmeterDataDetailInfo
private String category;
/** 总 (kWh) */
private BigDecimal totalKwh;
private BigDecimal totalKwh = BigDecimal.ZERO;
/** 尖 (kWh) */
private BigDecimal sharpKwh;
private BigDecimal sharpKwh = BigDecimal.ZERO;
/** 峰 (kWh) */
private BigDecimal peakKwh;
private BigDecimal peakKwh = BigDecimal.ZERO;
/** 平 (kWh) */
private BigDecimal flatKwh;
private BigDecimal flatKwh = BigDecimal.ZERO;
/** 谷 (kWh) */
private BigDecimal valleyKwh;
private BigDecimal valleyKwh = BigDecimal.ZERO;
/** 总表设备Id */
private String deviceId;

View File

@ -9,7 +9,7 @@ import org.apache.ibatis.annotations.Param;
* 总数据Mapper接口
*
* @author xzzn
* @date 2025-06-27
* @date 2025-07-03
*/
public interface EmsAmmeterDataMapper
{

View File

@ -17,7 +17,6 @@ import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.*;
@Service
@ -43,7 +42,10 @@ public class FXXDataProcessServiceImpl implements IFXXDataProcessService {
private RedisCache redisCache;
@Autowired
private EmsDevicesSettingMapper emsDevicesSettingMapper;;
private EmsDevicesSettingMapper emsDevicesSettingMapper;
@Autowired
private EmsAmmeterDataMapper emsAmmeterDataMapper;;
@Override
public void handleFxData(String message) {
@ -61,15 +63,20 @@ public class FXXDataProcessServiceImpl implements IFXXDataProcessService {
} else if (deviceId.contains("BMSC")) {
log.info("BMSC data:"+ jsonData);
batteryCluserDataProcess(deviceId, jsonData);
batteryClusterDataProcess(deviceId, jsonData);
batteryDataProcess(deviceId, jsonData);
} else if (deviceId.contains("PCS")) {
pcsDataProcess(deviceId, jsonData);
pcsBranchDataProcess(deviceId, jsonData);
} else if (deviceId.contains("LOAD")) {
loadDataProcess(deviceId, jsonData);
} else if (deviceId.contains("METE")) {
meteDataProcess(deviceId, jsonData);
}
}
}
private void batteryStackDataProcess(String deviceId, String dataJson) {
//电池堆
@ -151,7 +158,7 @@ public class FXXDataProcessServiceImpl implements IFXXDataProcessService {
}
private void batteryCluserDataProcess(String deviceId, String dataJson) {
private void batteryClusterDataProcess(String deviceId, String dataJson) {
Map<String, Object> obj = JSON.parseObject(dataJson, new TypeReference<Map<String, Object>>() {
});
@ -161,7 +168,7 @@ public class FXXDataProcessServiceImpl implements IFXXDataProcessService {
String stackDeviceId = "";
if (up != null && up.size() >0) {
stackDeviceId = up.get(0).getParentId();
if (stackDeviceId != null || stackDeviceId.isEmpty()) {
if (stackDeviceId == null || stackDeviceId.isEmpty()) {
stackDeviceId = "1";
}
}
@ -239,7 +246,7 @@ public class FXXDataProcessServiceImpl implements IFXXDataProcessService {
String stackDeviceId = "";
if (up != null && up.size() >0) {
stackDeviceId = up.get(0).getParentId();
if (stackDeviceId != null || stackDeviceId.isEmpty()) {
if (stackDeviceId == null || stackDeviceId.isEmpty()) {
stackDeviceId = "1";
}
}
@ -346,7 +353,6 @@ public class FXXDataProcessServiceImpl implements IFXXDataProcessService {
}
private void pcsBranchDataProcess(String deviceId, String dataJson) {
Map<String, Map<String, Object>> records = processDataPrefix(JSON.parseObject(dataJson, new TypeReference<Map<String, Object>>() {}));
@ -394,7 +400,192 @@ public class FXXDataProcessServiceImpl implements IFXXDataProcessService {
}
private void loadDataProcess(String deviceId, String dataJson) {
//总表
Map<String, Object> obj = JSON.parseObject(dataJson, new TypeReference<Map<String, Object>>() {
});
EmsAmmeterData dataLoad = new EmsAmmeterData();
// 更新时间
dataLoad.setDataUpdateTime(new Date());
// 电能设置-组合有功
dataLoad.setCurrentCombActiveTotal(StringUtils.getBigDecimal(obj.get("DQZHYGZDN")));
dataLoad.setCurrentCombActivePeak(StringUtils.getBigDecimal(obj.get("DQZHYGJDN")));
dataLoad.setCurrentCombActiveHigh(StringUtils.getBigDecimal(obj.get("DQZHYGFDN")));
dataLoad.setCurrentCombActiveFlat(StringUtils.getBigDecimal(obj.get("DQZHYGPDN")));
dataLoad.setCurrentCombActiveValley(StringUtils.getBigDecimal(obj.get("DQZHYGGDN")));
// 电能设置-正向有功
dataLoad.setCurrentForwardActiveTotal(StringUtils.getBigDecimal(obj.get("DQZXYGZDN")));
dataLoad.setCurrentForwardActivePeak(StringUtils.getBigDecimal(obj.get("DQZXYGJDN")));
dataLoad.setCurrentForwardActiveHigh(StringUtils.getBigDecimal(obj.get("DQZXYGFDN")));
dataLoad.setCurrentForwardActiveFlat(StringUtils.getBigDecimal(obj.get("DQZXYGPDN")));
dataLoad.setCurrentForwardActiveValley(StringUtils.getBigDecimal(obj.get("DQZXYGGDN")));
// 电能设置-反向有功
dataLoad.setCurrentReverseActiveTotal(StringUtils.getBigDecimal(obj.get("DQFXYGZDN")));
dataLoad.setCurrentReverseActivePeak(StringUtils.getBigDecimal(obj.get("DQFXYGJDN")));
dataLoad.setCurrentReverseActiveHigh(StringUtils.getBigDecimal(obj.get("DQFXYGFDN")));
dataLoad.setCurrentReverseActiveFlat(StringUtils.getBigDecimal(obj.get("DQFXYGPDN")));
dataLoad.setCurrentReverseActiveValley(StringUtils.getBigDecimal(obj.get("DQFXYGGDN")));
// 电能设置-组合无功
dataLoad.setCurrentCombReactiveTotal(StringUtils.getBigDecimal(obj.get("DQZHWGZDN")));
dataLoad.setCurrentCombReactivePeak(StringUtils.getBigDecimal(obj.get("DQZHWGJDN")));
dataLoad.setCurrentCombReactiveHigh(StringUtils.getBigDecimal(obj.get("DQZHWGFDN")));
dataLoad.setCurrentCombReactiveFlat(StringUtils.getBigDecimal(obj.get("DQZHWGPDN")));
dataLoad.setCurrentCombReactiveValley(StringUtils.getBigDecimal(obj.get("DQZHWGGDN")));
// 电能设置-正向无功
dataLoad.setCurrentForwardReactiveTotal(StringUtils.getBigDecimal(obj.get("DQZXWGZDN")));
dataLoad.setCurrentForwardReactivePeak(StringUtils.getBigDecimal(obj.get("DQZXWGJDN")));
dataLoad.setCurrentForwardReactiveHigh(StringUtils.getBigDecimal(obj.get("DQZXWGFDN")));
dataLoad.setCurrentForwardReactiveFlat(StringUtils.getBigDecimal(obj.get("DQZXWGPDN")));
dataLoad.setCurrentForwardReactiveValley(StringUtils.getBigDecimal(obj.get("DQZXWGGDN")));
// 电能设置-反向无功
dataLoad.setCurrentReverseReactiveTotal(StringUtils.getBigDecimal(obj.get("DQFXWGZDN")));
dataLoad.setCurrentReverseReactivePeak(StringUtils.getBigDecimal(obj.get("DQFXWGJDN")));
dataLoad.setCurrentReverseReactiveHigh(StringUtils.getBigDecimal(obj.get("DQFXWGFDN")));
dataLoad.setCurrentReverseReactiveFlat(StringUtils.getBigDecimal(obj.get("DQFXWGPDN")));
dataLoad.setCurrentReverseReactiveValley(StringUtils.getBigDecimal(obj.get("DQFXWGGDN")));
// 电压+电流
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")));
dataLoad.setAbLineVoltage(StringUtils.getBigDecimal(obj.get("ABXDY")));
dataLoad.setCbLineVoltage(StringUtils.getBigDecimal(obj.get("CBXDY")));
dataLoad.setAcLineVoltage(StringUtils.getBigDecimal(obj.get("ACXDY")));
// 频率
dataLoad.setFrequency(StringUtils.getBigDecimal(obj.get("PL")));
// 功率 有功+总+无功+无总+视在
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")));
dataLoad.setPhaseAApparentPower(StringUtils.getBigDecimal(obj.get("AXSZGL")));
dataLoad.setPhaseBApparentPower(StringUtils.getBigDecimal(obj.get("BXSZGL")));
dataLoad.setPhaseCApparentPower(StringUtils.getBigDecimal(obj.get("CXSZGL")));
dataLoad.setTotalApparentPower(StringUtils.getBigDecimal(obj.get("ZSZGL")));
// 功率因数
dataLoad.setPhaseAPowerFactor(StringUtils.getBigDecimal(obj.get("AXGLYS")));
dataLoad.setPhaseBPowerFactor(StringUtils.getBigDecimal(obj.get("BXGLYS")));
dataLoad.setPhaseCPowerFactor(StringUtils.getBigDecimal(obj.get("CXGLYS")));
dataLoad.setTotalPowerFactor(StringUtils.getBigDecimal(obj.get("ZGLYS")));
// 需量
dataLoad.setForwardAcMaxDemand(StringUtils.getBigDecimal(obj.get("ZXYGZDXL")));
dataLoad.setReverseAcMaxDemand(StringUtils.getBigDecimal(obj.get("FXYGZDXL")));
dataLoad.setDailyForwardMaxDemand(StringUtils.getBigDecimal(obj.get("DRZXYGZDXL")));
dataLoad.setCreateBy("system");
dataLoad.setCreateTime(DateUtils.getNowDate());
dataLoad.setUpdateBy("system");
dataLoad.setUpdateTime(DateUtils.getNowDate());
dataLoad.setSiteId(SITE_ID);
dataLoad.setDeviceId(deviceId);
emsAmmeterDataMapper.insertEmsAmmeterData(dataLoad);
redisCache.setCacheObject(RedisKeyConstants.AMMETER + SITE_ID + "_" +deviceId, dataLoad);
}
private void meteDataProcess(String deviceId, String dataJson) {
//总表
Map<String, Object> obj = JSON.parseObject(dataJson, new TypeReference<Map<String, Object>>() {
});
EmsAmmeterData dataLoad = new EmsAmmeterData();
// 更新时间
dataLoad.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")));
dataLoad.setAbLineVoltage(StringUtils.getBigDecimal(obj.get("ABXDY")));
dataLoad.setCbLineVoltage(StringUtils.getBigDecimal(obj.get("BCXDY")));
dataLoad.setAcLineVoltage(StringUtils.getBigDecimal(obj.get("CAXDY")));
// 频率
dataLoad.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")));
dataLoad.setTotalApparentPower(StringUtils.getBigDecimal(obj.get("ZSZGL")));
dataLoad.setTotalPowerFactor(StringUtils.getBigDecimal(obj.get("ZGLYS")));
// 二次相关数据
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")));
// 需量
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")));
dataLoad.setCreateBy("system");
dataLoad.setCreateTime(DateUtils.getNowDate());
dataLoad.setUpdateBy("system");
dataLoad.setUpdateTime(DateUtils.getNowDate());
dataLoad.setSiteId(SITE_ID);
dataLoad.setDeviceId(deviceId);
emsAmmeterDataMapper.insertEmsAmmeterData(dataLoad);
redisCache.setCacheObject(RedisKeyConstants.AMMETER + SITE_ID + "_" +deviceId, dataLoad);
}
// 数据分组处理
private static Map<String, Map<String, Object>> processData(Map<String, Object> rawData) {
Map<String, Map<String, Object>> records = new HashMap<>();

View File

@ -2,6 +2,7 @@ package com.xzzn.ems.service.impl;
import com.xzzn.common.constant.RedisKeyConstants;
import com.xzzn.common.core.redis.RedisCache;
import com.xzzn.common.enums.AmmeterCategoryStatus;
import com.xzzn.common.enums.DeviceCategory;
import com.xzzn.common.utils.StringUtils;
import com.xzzn.ems.domain.*;
@ -334,25 +335,56 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
List<AmmeterDataVo> ammeterDataVos = new ArrayList<>();
if (!StringUtils.isEmpty(siteId)) {
// 先获取所有电表设备
List<EmsDevicesSetting> devicesList = emsDevicesSettingMapper.getAllBatteryDeviceBySiteId(siteId);
if (!CollectionUtils.isEmpty(devicesList)) {
for (EmsDevicesSetting devicesSetting : devicesList) {
// 先获取表设备
List<Map<String, Object>> ammeterIdList = emsDevicesSettingMapper.getDeviceInfosBySiteIdAndCategory(siteId, DeviceCategory.AMMETER.getCode());
for (Map<String, Object> ammeterDevice : ammeterIdList) {
AmmeterDataVo ammeterDataVo = new AmmeterDataVo();
ammeterDataVo.setDeviceName(devicesSetting.getDeviceName());
ammeterDataVo.setEmsCommunicationStatus(devicesSetting.getCommunicationStatus());
String deviceId = devicesSetting.getDeviceId();
// 获取类别数据
List<AmmeterDataDetailInfo> ammeterDataDetailInfos = emsAmmeterDataMapper.getAmmeterDetailInfo(siteId,deviceId);
ammeterDataVo.setDeviceName(ammeterDevice.get("deviceName").toString());
ammeterDataVo.setEmsCommunicationStatus(ammeterDevice.get("communicationStatus").toString());
// 从redis取总表详细数据
String ammeterId = ammeterDevice.get("id").toString();
EmsAmmeterData ammeterData = redisCache.getCacheObject(RedisKeyConstants.AMMETER + siteId + "_" +ammeterId);
if (ammeterData != null) {
ammeterDataVo.setDataUpdateTime(ammeterData.getDataUpdateTime());
// 处理类别数据
List<AmmeterDataDetailInfo> ammeterDataDetailInfos = new ArrayList<>();
dealAmmeterCategoryDataInfo(ammeterData,ammeterDataDetailInfos);
ammeterDataVo.setAmmeterDataDetailInfos(ammeterDataDetailInfos);
// 数据更新时间
ammeterDataVo.setDataUpdateTime(ammeterDataDetailInfos.get(0).getUpdateTime());
}
ammeterDataVos.add(ammeterDataVo);
}
}
}
return ammeterDataVos;
}
private void dealAmmeterCategoryDataInfo(EmsAmmeterData ammeterData, List<AmmeterDataDetailInfo> ammeterDataDetailInfos) {
// 累计放电量
AmmeterDataDetailInfo ammeterDataDetailInfo1 = new AmmeterDataDetailInfo();
ammeterDataDetailInfo1.setCategory(AmmeterCategoryStatus.TOTAL_CHARGE.getInfo());
ammeterDataDetailInfo1.setTotalKwh(ammeterData.getCurrentCombActiveTotal());
ammeterDataDetailInfo1.setSharpKwh(ammeterData.getCurrentCombActivePeak());
ammeterDataDetailInfo1.setPeakKwh(ammeterData.getCurrentCombActiveHigh());
ammeterDataDetailInfo1.setFlatKwh(ammeterData.getCurrentCombActiveFlat());
ammeterDataDetailInfo1.setValleyKwh(ammeterData.getCurrentCombActiveValley());
ammeterDataDetailInfos.add(ammeterDataDetailInfo1);
// 累计放电量
AmmeterDataDetailInfo ammeterDataDetailInfo2 = new AmmeterDataDetailInfo();
ammeterDataDetailInfo2.setCategory(AmmeterCategoryStatus.TOTAL_DISCHARGE.getInfo());
ammeterDataDetailInfo2.setTotalKwh(ammeterData.getCurrentCombReactiveTotal());
ammeterDataDetailInfo2.setSharpKwh(ammeterData.getCurrentCombReactivePeak());
ammeterDataDetailInfo2.setPeakKwh(ammeterData.getCurrentCombReactiveHigh());
ammeterDataDetailInfo2.setFlatKwh(ammeterData.getCurrentCombReactiveFlat());
ammeterDataDetailInfo2.setValleyKwh(ammeterData.getCurrentCombReactiveValley());
ammeterDataDetailInfos.add(ammeterDataDetailInfo2);
// 日放电量
AmmeterDataDetailInfo ammeterDataDetailInfo3 = new AmmeterDataDetailInfo();
ammeterDataDetailInfo3.setCategory(AmmeterCategoryStatus.DAILY_CHARGE.getInfo());
ammeterDataDetailInfos.add(ammeterDataDetailInfo3);
// 日充电量
AmmeterDataDetailInfo ammeterDataDetailInfo4 = new AmmeterDataDetailInfo();
ammeterDataDetailInfo4.setCategory(AmmeterCategoryStatus.DAILY_DISCHARGE.getInfo());
ammeterDataDetailInfos.add(ammeterDataDetailInfo4);
}
}

View File

@ -7,37 +7,211 @@
<resultMap type="EmsAmmeterData" id="EmsAmmeterDataResult">
<result property="id" column="id" />
<result property="dataUpdateTime" column="data_update_time" />
<result property="category" column="category" />
<result property="totalKwh" column="total_kwh" />
<result property="sharpKwh" column="sharp_kwh" />
<result property="peakKwh" column="peak_kwh" />
<result property="flatKwh" column="flat_kwh" />
<result property="valleyKwh" column="valley_kwh" />
<result property="currentCombActiveTotal" column="current_comb_active_total" />
<result property="currentCombActivePeak" column="current_comb_active_peak" />
<result property="currentCombActiveHigh" column="current_comb_active_high" />
<result property="currentCombActiveFlat" column="current_comb_active_flat" />
<result property="currentCombActiveValley" column="current_comb_active_valley" />
<result property="currentForwardActiveTotal" column="current_forward_active_total" />
<result property="currentForwardActivePeak" column="current_forward_active_peak" />
<result property="currentForwardActiveHigh" column="current_forward_active_high" />
<result property="currentForwardActiveFlat" column="current_forward_active_flat" />
<result property="currentForwardActiveValley" column="current_forward_active_valley" />
<result property="currentReverseActiveTotal" column="current_reverse_active_total" />
<result property="currentReverseActivePeak" column="current_reverse_active_peak" />
<result property="currentReverseActiveHigh" column="current_reverse_active_high" />
<result property="currentReverseActiveFlat" column="current_reverse_active_flat" />
<result property="currentReverseActiveValley" column="current_reverse_active_valley" />
<result property="currentCombReactiveTotal" column="current_comb_reactive_total" />
<result property="currentCombReactivePeak" column="current_comb_reactive_peak" />
<result property="currentCombReactiveHigh" column="current_comb_reactive_high" />
<result property="currentCombReactiveFlat" column="current_comb_reactive_flat" />
<result property="currentCombReactiveValley" column="current_comb_reactive_valley" />
<result property="currentForwardReactiveTotal" column="current_forward_reactive_total" />
<result property="currentForwardReactivePeak" column="current_forward_reactive_peak" />
<result property="currentForwardReactiveHigh" column="current_forward_reactive_high" />
<result property="currentForwardReactiveFlat" column="current_forward_reactive_flat" />
<result property="currentForwardReactiveValley" column="current_forward_reactive_valley" />
<result property="currentReverseReactiveTotal" column="current_reverse_reactive_total" />
<result property="currentReverseReactivePeak" column="current_reverse_reactive_peak" />
<result property="currentReverseReactiveHigh" column="current_reverse_reactive_high" />
<result property="currentReverseReactiveFlat" column="current_reverse_reactive_flat" />
<result property="currentReverseReactiveValley" column="current_reverse_reactive_valley" />
<result property="phaseAVoltage" column="phase_a_voltage" />
<result property="phaseBVoltage" column="phase_b_voltage" />
<result property="phaseCVoltage" column="phase_c_voltage" />
<result property="phaseACurrent" column="phase_a_current" />
<result property="phaseBCurrent" column="phase_b_current" />
<result property="phaseCCurrent" column="phase_c_current" />
<result property="frequency" column="frequency" />
<result property="abLineVoltage" column="ab_line_voltage" />
<result property="cbLineVoltage" column="cb_line_voltage" />
<result property="acLineVoltage" column="ac_line_voltage" />
<result property="forwardAcMaxDemand" column="forward_ac_max_demand" />
<result property="reverseAcMaxDemand" column="reverse_ac_max_demand" />
<result property="phaseAActivePower" column="phase_a_active_power" />
<result property="phaseBActivePower" column="phase_b_active_power" />
<result property="phaseCActivePower" column="phase_c_active_power" />
<result property="totalActivePower" column="total_active_power" />
<result property="phaseAReactivePower" column="phase_a_reactive_power" />
<result property="phaseBReactivePower" column="phase_b_reactive_power" />
<result property="phaseCReactivePower" column="phase_c_reactive_power" />
<result property="totalReactivePower" column="total_reactive_power" />
<result property="phaseAApparentPower" column="phase_a_apparent_power" />
<result property="phaseBApparentPower" column="phase_b_apparent_power" />
<result property="phaseCApparentPower" column="phase_c_apparent_power" />
<result property="totalApparentPower" column="total_apparent_power" />
<result property="phaseAPowerFactor" column="phase_a_power_factor" />
<result property="phaseBPowerFactor" column="phase_b_power_factor" />
<result property="phaseCPowerFactor" column="phase_c_power_factor" />
<result property="totalPowerFactor" column="total_power_factor" />
<result property="dailyForwardMaxDemand" column="daily_forward_max_demand" />
<result property="siteId" column="site_id" />
<result property="deviceId" column="device_id" />
<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" />
<result property="secondaryAbLineVoltage" column="secondary_ab_line_voltage" />
<result property="secondaryAPhaseCurrent" column="secondary_a_phase_current" />
<result property="secondaryAPhaseVoltage" column="secondary_a_phase_voltage" />
<result property="secondaryAPowerFactor" column="secondary_a_power_factor" />
<result property="secondaryAApparentPower" column="secondary_a_apparent_power" />
<result property="secondaryAReactivePower" column="secondary_a_reactive_power" />
<result property="secondaryAActivePower" column="secondary_a_active_power" />
<result property="secondaryBcLineVoltage" column="secondary_bc_line_voltage" />
<result property="secondaryBPhaseCurrent" column="secondary_b_phase_current" />
<result property="secondaryBPhaseVoltage" column="secondary_b_phase_voltage" />
<result property="secondaryBPowerFactor" column="secondary_b_power_factor" />
<result property="secondaryBApparentPower" column="secondary_b_apparent_power" />
<result property="secondaryBReactivePower" column="secondary_b_reactive_power" />
<result property="secondaryBActivePower" column="secondary_b_active_power" />
<result property="secondaryCaLineVoltage" column="secondary_ca_line_voltage" />
<result property="secondaryCPhaseCurrent" column="secondary_c_phase_current" />
<result property="secondaryCPhaseVoltage" column="secondary_c_phase_voltage" />
<result property="secondaryCPowerFactor" column="secondary_c_power_factor" />
<result property="secondaryCApparentPower" column="secondary_c_apparent_power" />
<result property="secondaryCReactivePower" column="secondary_c_reactive_power" />
<result property="secondaryCActivePower" column="secondary_c_active_power" />
<result property="secondaryGridFrequency" column="secondary_grid_frequency" />
<result property="secondaryReverseReactiveEnergy" column="secondary_reverse_reactive_energy" />
<result property="secondaryNegativeActiveEnergy" column="secondary_negative_active_energy" />
<result property="secondaryTotalPowerFactor" column="secondary_total_power_factor" />
<result property="secondaryTotalApparentPower" column="secondary_total_apparent_power" />
<result property="secondaryTotalReactivePower" column="secondary_total_reactive_power" />
<result property="secondaryPositiveReactiveEnergy" column="secondary_positive_reactive_energy" />
<result property="secondaryPositiveActiveEnergy" column="secondary_positive_active_energy" />
<result property="secondaryTotalActivePower" column="secondary_total_active_power" />
<result property="reverseReactiveEnergyEqMinus" column="reverse_reactive_energy_eq_minus" />
<result property="reverseActiveEnergyEpMinus" column="reverse_active_energy_ep_minus" />
<result property="positiveReactiveEnergyEqPlus" column="positive_reactive_energy_eq_plus" />
<result property="positiveActiveEnergyEpPlus" column="positive_active_energy_ep_plus" />
</resultMap>
<sql id="selectEmsAmmeterDataVo">
select id, data_update_time, category, total_kwh, sharp_kwh, peak_kwh, flat_kwh, valley_kwh, create_by, create_time, update_by, update_time, remark, site_id, device_id 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 from ems_ammeter_data
</sql>
<select id="selectEmsAmmeterDataList" parameterType="EmsAmmeterData" resultMap="EmsAmmeterDataResult">
<include refid="selectEmsAmmeterDataVo"/>
<where>
<if test="dataUpdateTime != null "> and data_update_time = #{dataUpdateTime}</if>
<if test="category != null and category != ''"> and category = #{category}</if>
<if test="totalKwh != null "> and total_kwh = #{totalKwh}</if>
<if test="sharpKwh != null "> and sharp_kwh = #{sharpKwh}</if>
<if test="peakKwh != null "> and peak_kwh = #{peakKwh}</if>
<if test="flatKwh != null "> and flat_kwh = #{flatKwh}</if>
<if test="valleyKwh != null "> and valley_kwh = #{valleyKwh}</if>
<if test="currentCombActiveTotal != null "> and current_comb_active_total = #{currentCombActiveTotal}</if>
<if test="currentCombActivePeak != null "> and current_comb_active_peak = #{currentCombActivePeak}</if>
<if test="currentCombActiveHigh != null "> and current_comb_active_high = #{currentCombActiveHigh}</if>
<if test="currentCombActiveFlat != null "> and current_comb_active_flat = #{currentCombActiveFlat}</if>
<if test="currentCombActiveValley != null "> and current_comb_active_valley = #{currentCombActiveValley}</if>
<if test="currentForwardActiveTotal != null "> and current_forward_active_total = #{currentForwardActiveTotal}</if>
<if test="currentForwardActivePeak != null "> and current_forward_active_peak = #{currentForwardActivePeak}</if>
<if test="currentForwardActiveHigh != null "> and current_forward_active_high = #{currentForwardActiveHigh}</if>
<if test="currentForwardActiveFlat != null "> and current_forward_active_flat = #{currentForwardActiveFlat}</if>
<if test="currentForwardActiveValley != null "> and current_forward_active_valley = #{currentForwardActiveValley}</if>
<if test="currentReverseActiveTotal != null "> and current_reverse_active_total = #{currentReverseActiveTotal}</if>
<if test="currentReverseActivePeak != null "> and current_reverse_active_peak = #{currentReverseActivePeak}</if>
<if test="currentReverseActiveHigh != null "> and current_reverse_active_high = #{currentReverseActiveHigh}</if>
<if test="currentReverseActiveFlat != null "> and current_reverse_active_flat = #{currentReverseActiveFlat}</if>
<if test="currentReverseActiveValley != null "> and current_reverse_active_valley = #{currentReverseActiveValley}</if>
<if test="currentCombReactiveTotal != null "> and current_comb_reactive_total = #{currentCombReactiveTotal}</if>
<if test="currentCombReactivePeak != null "> and current_comb_reactive_peak = #{currentCombReactivePeak}</if>
<if test="currentCombReactiveHigh != null "> and current_comb_reactive_high = #{currentCombReactiveHigh}</if>
<if test="currentCombReactiveFlat != null "> and current_comb_reactive_flat = #{currentCombReactiveFlat}</if>
<if test="currentCombReactiveValley != null "> and current_comb_reactive_valley = #{currentCombReactiveValley}</if>
<if test="currentForwardReactiveTotal != null "> and current_forward_reactive_total = #{currentForwardReactiveTotal}</if>
<if test="currentForwardReactivePeak != null "> and current_forward_reactive_peak = #{currentForwardReactivePeak}</if>
<if test="currentForwardReactiveHigh != null "> and current_forward_reactive_high = #{currentForwardReactiveHigh}</if>
<if test="currentForwardReactiveFlat != null "> and current_forward_reactive_flat = #{currentForwardReactiveFlat}</if>
<if test="currentForwardReactiveValley != null "> and current_forward_reactive_valley = #{currentForwardReactiveValley}</if>
<if test="currentReverseReactiveTotal != null "> and current_reverse_reactive_total = #{currentReverseReactiveTotal}</if>
<if test="currentReverseReactivePeak != null "> and current_reverse_reactive_peak = #{currentReverseReactivePeak}</if>
<if test="currentReverseReactiveHigh != null "> and current_reverse_reactive_high = #{currentReverseReactiveHigh}</if>
<if test="currentReverseReactiveFlat != null "> and current_reverse_reactive_flat = #{currentReverseReactiveFlat}</if>
<if test="currentReverseReactiveValley != null "> and current_reverse_reactive_valley = #{currentReverseReactiveValley}</if>
<if test="phaseAVoltage != null "> and phase_a_voltage = #{phaseAVoltage}</if>
<if test="phaseBVoltage != null "> and phase_b_voltage = #{phaseBVoltage}</if>
<if test="phaseCVoltage != null "> and phase_c_voltage = #{phaseCVoltage}</if>
<if test="phaseACurrent != null "> and phase_a_current = #{phaseACurrent}</if>
<if test="phaseBCurrent != null "> and phase_b_current = #{phaseBCurrent}</if>
<if test="phaseCCurrent != null "> and phase_c_current = #{phaseCCurrent}</if>
<if test="frequency != null "> and frequency = #{frequency}</if>
<if test="abLineVoltage != null "> and ab_line_voltage = #{abLineVoltage}</if>
<if test="cbLineVoltage != null "> and cb_line_voltage = #{cbLineVoltage}</if>
<if test="acLineVoltage != null "> and ac_line_voltage = #{acLineVoltage}</if>
<if test="forwardAcMaxDemand != null "> and forward_ac_max_demand = #{forwardAcMaxDemand}</if>
<if test="reverseAcMaxDemand != null "> and reverse_ac_max_demand = #{reverseAcMaxDemand}</if>
<if test="phaseAActivePower != null "> and phase_a_active_power = #{phaseAActivePower}</if>
<if test="phaseBActivePower != null "> and phase_b_active_power = #{phaseBActivePower}</if>
<if test="phaseCActivePower != null "> and phase_c_active_power = #{phaseCActivePower}</if>
<if test="totalActivePower != null "> and total_active_power = #{totalActivePower}</if>
<if test="phaseAReactivePower != null "> and phase_a_reactive_power = #{phaseAReactivePower}</if>
<if test="phaseBReactivePower != null "> and phase_b_reactive_power = #{phaseBReactivePower}</if>
<if test="phaseCReactivePower != null "> and phase_c_reactive_power = #{phaseCReactivePower}</if>
<if test="totalReactivePower != null "> and total_reactive_power = #{totalReactivePower}</if>
<if test="phaseAApparentPower != null "> and phase_a_apparent_power = #{phaseAApparentPower}</if>
<if test="phaseBApparentPower != null "> and phase_b_apparent_power = #{phaseBApparentPower}</if>
<if test="phaseCApparentPower != null "> and phase_c_apparent_power = #{phaseCApparentPower}</if>
<if test="totalApparentPower != null "> and total_apparent_power = #{totalApparentPower}</if>
<if test="phaseAPowerFactor != null "> and phase_a_power_factor = #{phaseAPowerFactor}</if>
<if test="phaseBPowerFactor != null "> and phase_b_power_factor = #{phaseBPowerFactor}</if>
<if test="phaseCPowerFactor != null "> and phase_c_power_factor = #{phaseCPowerFactor}</if>
<if test="totalPowerFactor != null "> and total_power_factor = #{totalPowerFactor}</if>
<if test="dailyForwardMaxDemand != null "> and daily_forward_max_demand = #{dailyForwardMaxDemand}</if>
<if test="siteId != null and siteId != ''"> and site_id = #{siteId}</if>
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
<if test="secondaryAbLineVoltage != null "> and secondary_ab_line_voltage = #{secondaryAbLineVoltage}</if>
<if test="secondaryAPhaseCurrent != null "> and secondary_a_phase_current = #{secondaryAPhaseCurrent}</if>
<if test="secondaryAPhaseVoltage != null "> and secondary_a_phase_voltage = #{secondaryAPhaseVoltage}</if>
<if test="secondaryAPowerFactor != null "> and secondary_a_power_factor = #{secondaryAPowerFactor}</if>
<if test="secondaryAApparentPower != null "> and secondary_a_apparent_power = #{secondaryAApparentPower}</if>
<if test="secondaryAReactivePower != null "> and secondary_a_reactive_power = #{secondaryAReactivePower}</if>
<if test="secondaryAActivePower != null "> and secondary_a_active_power = #{secondaryAActivePower}</if>
<if test="secondaryBcLineVoltage != null "> and secondary_bc_line_voltage = #{secondaryBcLineVoltage}</if>
<if test="secondaryBPhaseCurrent != null "> and secondary_b_phase_current = #{secondaryBPhaseCurrent}</if>
<if test="secondaryBPhaseVoltage != null "> and secondary_b_phase_voltage = #{secondaryBPhaseVoltage}</if>
<if test="secondaryBPowerFactor != null "> and secondary_b_power_factor = #{secondaryBPowerFactor}</if>
<if test="secondaryBApparentPower != null "> and secondary_b_apparent_power = #{secondaryBApparentPower}</if>
<if test="secondaryBReactivePower != null "> and secondary_b_reactive_power = #{secondaryBReactivePower}</if>
<if test="secondaryBActivePower != null "> and secondary_b_active_power = #{secondaryBActivePower}</if>
<if test="secondaryCaLineVoltage != null "> and secondary_ca_line_voltage = #{secondaryCaLineVoltage}</if>
<if test="secondaryCPhaseCurrent != null "> and secondary_c_phase_current = #{secondaryCPhaseCurrent}</if>
<if test="secondaryCPhaseVoltage != null "> and secondary_c_phase_voltage = #{secondaryCPhaseVoltage}</if>
<if test="secondaryCPowerFactor != null "> and secondary_c_power_factor = #{secondaryCPowerFactor}</if>
<if test="secondaryCApparentPower != null "> and secondary_c_apparent_power = #{secondaryCApparentPower}</if>
<if test="secondaryCReactivePower != null "> and secondary_c_reactive_power = #{secondaryCReactivePower}</if>
<if test="secondaryCActivePower != null "> and secondary_c_active_power = #{secondaryCActivePower}</if>
<if test="secondaryGridFrequency != null "> and secondary_grid_frequency = #{secondaryGridFrequency}</if>
<if test="secondaryReverseReactiveEnergy != null "> and secondary_reverse_reactive_energy = #{secondaryReverseReactiveEnergy}</if>
<if test="secondaryNegativeActiveEnergy != null "> and secondary_negative_active_energy = #{secondaryNegativeActiveEnergy}</if>
<if test="secondaryTotalPowerFactor != null "> and secondary_total_power_factor = #{secondaryTotalPowerFactor}</if>
<if test="secondaryTotalApparentPower != null "> and secondary_total_apparent_power = #{secondaryTotalApparentPower}</if>
<if test="secondaryTotalReactivePower != null "> and secondary_total_reactive_power = #{secondaryTotalReactivePower}</if>
<if test="secondaryPositiveReactiveEnergy != null "> and secondary_positive_reactive_energy = #{secondaryPositiveReactiveEnergy}</if>
<if test="secondaryPositiveActiveEnergy != null "> and secondary_positive_active_energy = #{secondaryPositiveActiveEnergy}</if>
<if test="secondaryTotalActivePower != null "> and secondary_total_active_power = #{secondaryTotalActivePower}</if>
<if test="reverseReactiveEnergyEqMinus != null "> and reverse_reactive_energy_eq_minus = #{reverseReactiveEnergyEqMinus}</if>
<if test="reverseActiveEnergyEpMinus != null "> and reverse_active_energy_ep_minus = #{reverseActiveEnergyEpMinus}</if>
<if test="positiveReactiveEnergyEqPlus != null "> and positive_reactive_energy_eq_plus = #{positiveReactiveEnergyEqPlus}</if>
<if test="positiveActiveEnergyEpPlus != null "> and positive_active_energy_ep_plus = #{positiveActiveEnergyEpPlus}</if>
</where>
</select>
@ -50,35 +224,209 @@
insert into ems_ammeter_data
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="dataUpdateTime != null">data_update_time,</if>
<if test="category != null">category,</if>
<if test="totalKwh != null">total_kwh,</if>
<if test="sharpKwh != null">sharp_kwh,</if>
<if test="peakKwh != null">peak_kwh,</if>
<if test="flatKwh != null">flat_kwh,</if>
<if test="valleyKwh != null">valley_kwh,</if>
<if test="currentCombActiveTotal != null">current_comb_active_total,</if>
<if test="currentCombActivePeak != null">current_comb_active_peak,</if>
<if test="currentCombActiveHigh != null">current_comb_active_high,</if>
<if test="currentCombActiveFlat != null">current_comb_active_flat,</if>
<if test="currentCombActiveValley != null">current_comb_active_valley,</if>
<if test="currentForwardActiveTotal != null">current_forward_active_total,</if>
<if test="currentForwardActivePeak != null">current_forward_active_peak,</if>
<if test="currentForwardActiveHigh != null">current_forward_active_high,</if>
<if test="currentForwardActiveFlat != null">current_forward_active_flat,</if>
<if test="currentForwardActiveValley != null">current_forward_active_valley,</if>
<if test="currentReverseActiveTotal != null">current_reverse_active_total,</if>
<if test="currentReverseActivePeak != null">current_reverse_active_peak,</if>
<if test="currentReverseActiveHigh != null">current_reverse_active_high,</if>
<if test="currentReverseActiveFlat != null">current_reverse_active_flat,</if>
<if test="currentReverseActiveValley != null">current_reverse_active_valley,</if>
<if test="currentCombReactiveTotal != null">current_comb_reactive_total,</if>
<if test="currentCombReactivePeak != null">current_comb_reactive_peak,</if>
<if test="currentCombReactiveHigh != null">current_comb_reactive_high,</if>
<if test="currentCombReactiveFlat != null">current_comb_reactive_flat,</if>
<if test="currentCombReactiveValley != null">current_comb_reactive_valley,</if>
<if test="currentForwardReactiveTotal != null">current_forward_reactive_total,</if>
<if test="currentForwardReactivePeak != null">current_forward_reactive_peak,</if>
<if test="currentForwardReactiveHigh != null">current_forward_reactive_high,</if>
<if test="currentForwardReactiveFlat != null">current_forward_reactive_flat,</if>
<if test="currentForwardReactiveValley != null">current_forward_reactive_valley,</if>
<if test="currentReverseReactiveTotal != null">current_reverse_reactive_total,</if>
<if test="currentReverseReactivePeak != null">current_reverse_reactive_peak,</if>
<if test="currentReverseReactiveHigh != null">current_reverse_reactive_high,</if>
<if test="currentReverseReactiveFlat != null">current_reverse_reactive_flat,</if>
<if test="currentReverseReactiveValley != null">current_reverse_reactive_valley,</if>
<if test="phaseAVoltage != null">phase_a_voltage,</if>
<if test="phaseBVoltage != null">phase_b_voltage,</if>
<if test="phaseCVoltage != null">phase_c_voltage,</if>
<if test="phaseACurrent != null">phase_a_current,</if>
<if test="phaseBCurrent != null">phase_b_current,</if>
<if test="phaseCCurrent != null">phase_c_current,</if>
<if test="frequency != null">frequency,</if>
<if test="abLineVoltage != null">ab_line_voltage,</if>
<if test="cbLineVoltage != null">cb_line_voltage,</if>
<if test="acLineVoltage != null">ac_line_voltage,</if>
<if test="forwardAcMaxDemand != null">forward_ac_max_demand,</if>
<if test="reverseAcMaxDemand != null">reverse_ac_max_demand,</if>
<if test="phaseAActivePower != null">phase_a_active_power,</if>
<if test="phaseBActivePower != null">phase_b_active_power,</if>
<if test="phaseCActivePower != null">phase_c_active_power,</if>
<if test="totalActivePower != null">total_active_power,</if>
<if test="phaseAReactivePower != null">phase_a_reactive_power,</if>
<if test="phaseBReactivePower != null">phase_b_reactive_power,</if>
<if test="phaseCReactivePower != null">phase_c_reactive_power,</if>
<if test="totalReactivePower != null">total_reactive_power,</if>
<if test="phaseAApparentPower != null">phase_a_apparent_power,</if>
<if test="phaseBApparentPower != null">phase_b_apparent_power,</if>
<if test="phaseCApparentPower != null">phase_c_apparent_power,</if>
<if test="totalApparentPower != null">total_apparent_power,</if>
<if test="phaseAPowerFactor != null">phase_a_power_factor,</if>
<if test="phaseBPowerFactor != null">phase_b_power_factor,</if>
<if test="phaseCPowerFactor != null">phase_c_power_factor,</if>
<if test="totalPowerFactor != null">total_power_factor,</if>
<if test="dailyForwardMaxDemand != null">daily_forward_max_demand,</if>
<if test="siteId != null">site_id,</if>
<if test="deviceId != null and deviceId != ''">device_id,</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>
<if test="secondaryAbLineVoltage != null">secondary_ab_line_voltage,</if>
<if test="secondaryAPhaseCurrent != null">secondary_a_phase_current,</if>
<if test="secondaryAPhaseVoltage != null">secondary_a_phase_voltage,</if>
<if test="secondaryAPowerFactor != null">secondary_a_power_factor,</if>
<if test="secondaryAApparentPower != null">secondary_a_apparent_power,</if>
<if test="secondaryAReactivePower != null">secondary_a_reactive_power,</if>
<if test="secondaryAActivePower != null">secondary_a_active_power,</if>
<if test="secondaryBcLineVoltage != null">secondary_bc_line_voltage,</if>
<if test="secondaryBPhaseCurrent != null">secondary_b_phase_current,</if>
<if test="secondaryBPhaseVoltage != null">secondary_b_phase_voltage,</if>
<if test="secondaryBPowerFactor != null">secondary_b_power_factor,</if>
<if test="secondaryBApparentPower != null">secondary_b_apparent_power,</if>
<if test="secondaryBReactivePower != null">secondary_b_reactive_power,</if>
<if test="secondaryBActivePower != null">secondary_b_active_power,</if>
<if test="secondaryCaLineVoltage != null">secondary_ca_line_voltage,</if>
<if test="secondaryCPhaseCurrent != null">secondary_c_phase_current,</if>
<if test="secondaryCPhaseVoltage != null">secondary_c_phase_voltage,</if>
<if test="secondaryCPowerFactor != null">secondary_c_power_factor,</if>
<if test="secondaryCApparentPower != null">secondary_c_apparent_power,</if>
<if test="secondaryCReactivePower != null">secondary_c_reactive_power,</if>
<if test="secondaryCActivePower != null">secondary_c_active_power,</if>
<if test="secondaryGridFrequency != null">secondary_grid_frequency,</if>
<if test="secondaryReverseReactiveEnergy != null">secondary_reverse_reactive_energy,</if>
<if test="secondaryNegativeActiveEnergy != null">secondary_negative_active_energy,</if>
<if test="secondaryTotalPowerFactor != null">secondary_total_power_factor,</if>
<if test="secondaryTotalApparentPower != null">secondary_total_apparent_power,</if>
<if test="secondaryTotalReactivePower != null">secondary_total_reactive_power,</if>
<if test="secondaryPositiveReactiveEnergy != null">secondary_positive_reactive_energy,</if>
<if test="secondaryPositiveActiveEnergy != null">secondary_positive_active_energy,</if>
<if test="secondaryTotalActivePower != null">secondary_total_active_power,</if>
<if test="reverseReactiveEnergyEqMinus != null">reverse_reactive_energy_eq_minus,</if>
<if test="reverseActiveEnergyEpMinus != null">reverse_active_energy_ep_minus,</if>
<if test="positiveReactiveEnergyEqPlus != null">positive_reactive_energy_eq_plus,</if>
<if test="positiveActiveEnergyEpPlus != null">positive_active_energy_ep_plus,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="dataUpdateTime != null">#{dataUpdateTime},</if>
<if test="category != null">#{category},</if>
<if test="totalKwh != null">#{totalKwh},</if>
<if test="sharpKwh != null">#{sharpKwh},</if>
<if test="peakKwh != null">#{peakKwh},</if>
<if test="flatKwh != null">#{flatKwh},</if>
<if test="valleyKwh != null">#{valleyKwh},</if>
<if test="currentCombActiveTotal != null">#{currentCombActiveTotal},</if>
<if test="currentCombActivePeak != null">#{currentCombActivePeak},</if>
<if test="currentCombActiveHigh != null">#{currentCombActiveHigh},</if>
<if test="currentCombActiveFlat != null">#{currentCombActiveFlat},</if>
<if test="currentCombActiveValley != null">#{currentCombActiveValley},</if>
<if test="currentForwardActiveTotal != null">#{currentForwardActiveTotal},</if>
<if test="currentForwardActivePeak != null">#{currentForwardActivePeak},</if>
<if test="currentForwardActiveHigh != null">#{currentForwardActiveHigh},</if>
<if test="currentForwardActiveFlat != null">#{currentForwardActiveFlat},</if>
<if test="currentForwardActiveValley != null">#{currentForwardActiveValley},</if>
<if test="currentReverseActiveTotal != null">#{currentReverseActiveTotal},</if>
<if test="currentReverseActivePeak != null">#{currentReverseActivePeak},</if>
<if test="currentReverseActiveHigh != null">#{currentReverseActiveHigh},</if>
<if test="currentReverseActiveFlat != null">#{currentReverseActiveFlat},</if>
<if test="currentReverseActiveValley != null">#{currentReverseActiveValley},</if>
<if test="currentCombReactiveTotal != null">#{currentCombReactiveTotal},</if>
<if test="currentCombReactivePeak != null">#{currentCombReactivePeak},</if>
<if test="currentCombReactiveHigh != null">#{currentCombReactiveHigh},</if>
<if test="currentCombReactiveFlat != null">#{currentCombReactiveFlat},</if>
<if test="currentCombReactiveValley != null">#{currentCombReactiveValley},</if>
<if test="currentForwardReactiveTotal != null">#{currentForwardReactiveTotal},</if>
<if test="currentForwardReactivePeak != null">#{currentForwardReactivePeak},</if>
<if test="currentForwardReactiveHigh != null">#{currentForwardReactiveHigh},</if>
<if test="currentForwardReactiveFlat != null">#{currentForwardReactiveFlat},</if>
<if test="currentForwardReactiveValley != null">#{currentForwardReactiveValley},</if>
<if test="currentReverseReactiveTotal != null">#{currentReverseReactiveTotal},</if>
<if test="currentReverseReactivePeak != null">#{currentReverseReactivePeak},</if>
<if test="currentReverseReactiveHigh != null">#{currentReverseReactiveHigh},</if>
<if test="currentReverseReactiveFlat != null">#{currentReverseReactiveFlat},</if>
<if test="currentReverseReactiveValley != null">#{currentReverseReactiveValley},</if>
<if test="phaseAVoltage != null">#{phaseAVoltage},</if>
<if test="phaseBVoltage != null">#{phaseBVoltage},</if>
<if test="phaseCVoltage != null">#{phaseCVoltage},</if>
<if test="phaseACurrent != null">#{phaseACurrent},</if>
<if test="phaseBCurrent != null">#{phaseBCurrent},</if>
<if test="phaseCCurrent != null">#{phaseCCurrent},</if>
<if test="frequency != null">#{frequency},</if>
<if test="abLineVoltage != null">#{abLineVoltage},</if>
<if test="cbLineVoltage != null">#{cbLineVoltage},</if>
<if test="acLineVoltage != null">#{acLineVoltage},</if>
<if test="forwardAcMaxDemand != null">#{forwardAcMaxDemand},</if>
<if test="reverseAcMaxDemand != null">#{reverseAcMaxDemand},</if>
<if test="phaseAActivePower != null">#{phaseAActivePower},</if>
<if test="phaseBActivePower != null">#{phaseBActivePower},</if>
<if test="phaseCActivePower != null">#{phaseCActivePower},</if>
<if test="totalActivePower != null">#{totalActivePower},</if>
<if test="phaseAReactivePower != null">#{phaseAReactivePower},</if>
<if test="phaseBReactivePower != null">#{phaseBReactivePower},</if>
<if test="phaseCReactivePower != null">#{phaseCReactivePower},</if>
<if test="totalReactivePower != null">#{totalReactivePower},</if>
<if test="phaseAApparentPower != null">#{phaseAApparentPower},</if>
<if test="phaseBApparentPower != null">#{phaseBApparentPower},</if>
<if test="phaseCApparentPower != null">#{phaseCApparentPower},</if>
<if test="totalApparentPower != null">#{totalApparentPower},</if>
<if test="phaseAPowerFactor != null">#{phaseAPowerFactor},</if>
<if test="phaseBPowerFactor != null">#{phaseBPowerFactor},</if>
<if test="phaseCPowerFactor != null">#{phaseCPowerFactor},</if>
<if test="totalPowerFactor != null">#{totalPowerFactor},</if>
<if test="dailyForwardMaxDemand != null">#{dailyForwardMaxDemand},</if>
<if test="siteId != null">#{siteId},</if>
<if test="deviceId != null and deviceId != ''">#{deviceId},</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>
<if test="secondaryAbLineVoltage != null">#{secondaryAbLineVoltage},</if>
<if test="secondaryAPhaseCurrent != null">#{secondaryAPhaseCurrent},</if>
<if test="secondaryAPhaseVoltage != null">#{secondaryAPhaseVoltage},</if>
<if test="secondaryAPowerFactor != null">#{secondaryAPowerFactor},</if>
<if test="secondaryAApparentPower != null">#{secondaryAApparentPower},</if>
<if test="secondaryAReactivePower != null">#{secondaryAReactivePower},</if>
<if test="secondaryAActivePower != null">#{secondaryAActivePower},</if>
<if test="secondaryBcLineVoltage != null">#{secondaryBcLineVoltage},</if>
<if test="secondaryBPhaseCurrent != null">#{secondaryBPhaseCurrent},</if>
<if test="secondaryBPhaseVoltage != null">#{secondaryBPhaseVoltage},</if>
<if test="secondaryBPowerFactor != null">#{secondaryBPowerFactor},</if>
<if test="secondaryBApparentPower != null">#{secondaryBApparentPower},</if>
<if test="secondaryBReactivePower != null">#{secondaryBReactivePower},</if>
<if test="secondaryBActivePower != null">#{secondaryBActivePower},</if>
<if test="secondaryCaLineVoltage != null">#{secondaryCaLineVoltage},</if>
<if test="secondaryCPhaseCurrent != null">#{secondaryCPhaseCurrent},</if>
<if test="secondaryCPhaseVoltage != null">#{secondaryCPhaseVoltage},</if>
<if test="secondaryCPowerFactor != null">#{secondaryCPowerFactor},</if>
<if test="secondaryCApparentPower != null">#{secondaryCApparentPower},</if>
<if test="secondaryCReactivePower != null">#{secondaryCReactivePower},</if>
<if test="secondaryCActivePower != null">#{secondaryCActivePower},</if>
<if test="secondaryGridFrequency != null">#{secondaryGridFrequency},</if>
<if test="secondaryReverseReactiveEnergy != null">#{secondaryReverseReactiveEnergy},</if>
<if test="secondaryNegativeActiveEnergy != null">#{secondaryNegativeActiveEnergy},</if>
<if test="secondaryTotalPowerFactor != null">#{secondaryTotalPowerFactor},</if>
<if test="secondaryTotalApparentPower != null">#{secondaryTotalApparentPower},</if>
<if test="secondaryTotalReactivePower != null">#{secondaryTotalReactivePower},</if>
<if test="secondaryPositiveReactiveEnergy != null">#{secondaryPositiveReactiveEnergy},</if>
<if test="secondaryPositiveActiveEnergy != null">#{secondaryPositiveActiveEnergy},</if>
<if test="secondaryTotalActivePower != null">#{secondaryTotalActivePower},</if>
<if test="reverseReactiveEnergyEqMinus != null">#{reverseReactiveEnergyEqMinus},</if>
<if test="reverseActiveEnergyEpMinus != null">#{reverseActiveEnergyEpMinus},</if>
<if test="positiveReactiveEnergyEqPlus != null">#{positiveReactiveEnergyEqPlus},</if>
<if test="positiveActiveEnergyEpPlus != null">#{positiveActiveEnergyEpPlus},</if>
</trim>
</insert>
@ -86,19 +434,106 @@
update ems_ammeter_data
<trim prefix="SET" suffixOverrides=",">
<if test="dataUpdateTime != null">data_update_time = #{dataUpdateTime},</if>
<if test="category != null">category = #{category},</if>
<if test="totalKwh != null">total_kwh = #{totalKwh},</if>
<if test="sharpKwh != null">sharp_kwh = #{sharpKwh},</if>
<if test="peakKwh != null">peak_kwh = #{peakKwh},</if>
<if test="flatKwh != null">flat_kwh = #{flatKwh},</if>
<if test="valleyKwh != null">valley_kwh = #{valleyKwh},</if>
<if test="currentCombActiveTotal != null">current_comb_active_total = #{currentCombActiveTotal},</if>
<if test="currentCombActivePeak != null">current_comb_active_peak = #{currentCombActivePeak},</if>
<if test="currentCombActiveHigh != null">current_comb_active_high = #{currentCombActiveHigh},</if>
<if test="currentCombActiveFlat != null">current_comb_active_flat = #{currentCombActiveFlat},</if>
<if test="currentCombActiveValley != null">current_comb_active_valley = #{currentCombActiveValley},</if>
<if test="currentForwardActiveTotal != null">current_forward_active_total = #{currentForwardActiveTotal},</if>
<if test="currentForwardActivePeak != null">current_forward_active_peak = #{currentForwardActivePeak},</if>
<if test="currentForwardActiveHigh != null">current_forward_active_high = #{currentForwardActiveHigh},</if>
<if test="currentForwardActiveFlat != null">current_forward_active_flat = #{currentForwardActiveFlat},</if>
<if test="currentForwardActiveValley != null">current_forward_active_valley = #{currentForwardActiveValley},</if>
<if test="currentReverseActiveTotal != null">current_reverse_active_total = #{currentReverseActiveTotal},</if>
<if test="currentReverseActivePeak != null">current_reverse_active_peak = #{currentReverseActivePeak},</if>
<if test="currentReverseActiveHigh != null">current_reverse_active_high = #{currentReverseActiveHigh},</if>
<if test="currentReverseActiveFlat != null">current_reverse_active_flat = #{currentReverseActiveFlat},</if>
<if test="currentReverseActiveValley != null">current_reverse_active_valley = #{currentReverseActiveValley},</if>
<if test="currentCombReactiveTotal != null">current_comb_reactive_total = #{currentCombReactiveTotal},</if>
<if test="currentCombReactivePeak != null">current_comb_reactive_peak = #{currentCombReactivePeak},</if>
<if test="currentCombReactiveHigh != null">current_comb_reactive_high = #{currentCombReactiveHigh},</if>
<if test="currentCombReactiveFlat != null">current_comb_reactive_flat = #{currentCombReactiveFlat},</if>
<if test="currentCombReactiveValley != null">current_comb_reactive_valley = #{currentCombReactiveValley},</if>
<if test="currentForwardReactiveTotal != null">current_forward_reactive_total = #{currentForwardReactiveTotal},</if>
<if test="currentForwardReactivePeak != null">current_forward_reactive_peak = #{currentForwardReactivePeak},</if>
<if test="currentForwardReactiveHigh != null">current_forward_reactive_high = #{currentForwardReactiveHigh},</if>
<if test="currentForwardReactiveFlat != null">current_forward_reactive_flat = #{currentForwardReactiveFlat},</if>
<if test="currentForwardReactiveValley != null">current_forward_reactive_valley = #{currentForwardReactiveValley},</if>
<if test="currentReverseReactiveTotal != null">current_reverse_reactive_total = #{currentReverseReactiveTotal},</if>
<if test="currentReverseReactivePeak != null">current_reverse_reactive_peak = #{currentReverseReactivePeak},</if>
<if test="currentReverseReactiveHigh != null">current_reverse_reactive_high = #{currentReverseReactiveHigh},</if>
<if test="currentReverseReactiveFlat != null">current_reverse_reactive_flat = #{currentReverseReactiveFlat},</if>
<if test="currentReverseReactiveValley != null">current_reverse_reactive_valley = #{currentReverseReactiveValley},</if>
<if test="phaseAVoltage != null">phase_a_voltage = #{phaseAVoltage},</if>
<if test="phaseBVoltage != null">phase_b_voltage = #{phaseBVoltage},</if>
<if test="phaseCVoltage != null">phase_c_voltage = #{phaseCVoltage},</if>
<if test="phaseACurrent != null">phase_a_current = #{phaseACurrent},</if>
<if test="phaseBCurrent != null">phase_b_current = #{phaseBCurrent},</if>
<if test="phaseCCurrent != null">phase_c_current = #{phaseCCurrent},</if>
<if test="frequency != null">frequency = #{frequency},</if>
<if test="abLineVoltage != null">ab_line_voltage = #{abLineVoltage},</if>
<if test="cbLineVoltage != null">cb_line_voltage = #{cbLineVoltage},</if>
<if test="acLineVoltage != null">ac_line_voltage = #{acLineVoltage},</if>
<if test="forwardAcMaxDemand != null">forward_ac_max_demand = #{forwardAcMaxDemand},</if>
<if test="reverseAcMaxDemand != null">reverse_ac_max_demand = #{reverseAcMaxDemand},</if>
<if test="phaseAActivePower != null">phase_a_active_power = #{phaseAActivePower},</if>
<if test="phaseBActivePower != null">phase_b_active_power = #{phaseBActivePower},</if>
<if test="phaseCActivePower != null">phase_c_active_power = #{phaseCActivePower},</if>
<if test="totalActivePower != null">total_active_power = #{totalActivePower},</if>
<if test="phaseAReactivePower != null">phase_a_reactive_power = #{phaseAReactivePower},</if>
<if test="phaseBReactivePower != null">phase_b_reactive_power = #{phaseBReactivePower},</if>
<if test="phaseCReactivePower != null">phase_c_reactive_power = #{phaseCReactivePower},</if>
<if test="totalReactivePower != null">total_reactive_power = #{totalReactivePower},</if>
<if test="phaseAApparentPower != null">phase_a_apparent_power = #{phaseAApparentPower},</if>
<if test="phaseBApparentPower != null">phase_b_apparent_power = #{phaseBApparentPower},</if>
<if test="phaseCApparentPower != null">phase_c_apparent_power = #{phaseCApparentPower},</if>
<if test="totalApparentPower != null">total_apparent_power = #{totalApparentPower},</if>
<if test="phaseAPowerFactor != null">phase_a_power_factor = #{phaseAPowerFactor},</if>
<if test="phaseBPowerFactor != null">phase_b_power_factor = #{phaseBPowerFactor},</if>
<if test="phaseCPowerFactor != null">phase_c_power_factor = #{phaseCPowerFactor},</if>
<if test="totalPowerFactor != null">total_power_factor = #{totalPowerFactor},</if>
<if test="dailyForwardMaxDemand != null">daily_forward_max_demand = #{dailyForwardMaxDemand},</if>
<if test="siteId != null">site_id = #{siteId},</if>
<if test="deviceId != null and deviceId != ''">device_id = #{deviceId},</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>
<if test="secondaryAbLineVoltage != null">secondary_ab_line_voltage = #{secondaryAbLineVoltage},</if>
<if test="secondaryAPhaseCurrent != null">secondary_a_phase_current = #{secondaryAPhaseCurrent},</if>
<if test="secondaryAPhaseVoltage != null">secondary_a_phase_voltage = #{secondaryAPhaseVoltage},</if>
<if test="secondaryAPowerFactor != null">secondary_a_power_factor = #{secondaryAPowerFactor},</if>
<if test="secondaryAApparentPower != null">secondary_a_apparent_power = #{secondaryAApparentPower},</if>
<if test="secondaryAReactivePower != null">secondary_a_reactive_power = #{secondaryAReactivePower},</if>
<if test="secondaryAActivePower != null">secondary_a_active_power = #{secondaryAActivePower},</if>
<if test="secondaryBcLineVoltage != null">secondary_bc_line_voltage = #{secondaryBcLineVoltage},</if>
<if test="secondaryBPhaseCurrent != null">secondary_b_phase_current = #{secondaryBPhaseCurrent},</if>
<if test="secondaryBPhaseVoltage != null">secondary_b_phase_voltage = #{secondaryBPhaseVoltage},</if>
<if test="secondaryBPowerFactor != null">secondary_b_power_factor = #{secondaryBPowerFactor},</if>
<if test="secondaryBApparentPower != null">secondary_b_apparent_power = #{secondaryBApparentPower},</if>
<if test="secondaryBReactivePower != null">secondary_b_reactive_power = #{secondaryBReactivePower},</if>
<if test="secondaryBActivePower != null">secondary_b_active_power = #{secondaryBActivePower},</if>
<if test="secondaryCaLineVoltage != null">secondary_ca_line_voltage = #{secondaryCaLineVoltage},</if>
<if test="secondaryCPhaseCurrent != null">secondary_c_phase_current = #{secondaryCPhaseCurrent},</if>
<if test="secondaryCPhaseVoltage != null">secondary_c_phase_voltage = #{secondaryCPhaseVoltage},</if>
<if test="secondaryCPowerFactor != null">secondary_c_power_factor = #{secondaryCPowerFactor},</if>
<if test="secondaryCApparentPower != null">secondary_c_apparent_power = #{secondaryCApparentPower},</if>
<if test="secondaryCReactivePower != null">secondary_c_reactive_power = #{secondaryCReactivePower},</if>
<if test="secondaryCActivePower != null">secondary_c_active_power = #{secondaryCActivePower},</if>
<if test="secondaryGridFrequency != null">secondary_grid_frequency = #{secondaryGridFrequency},</if>
<if test="secondaryReverseReactiveEnergy != null">secondary_reverse_reactive_energy = #{secondaryReverseReactiveEnergy},</if>
<if test="secondaryNegativeActiveEnergy != null">secondary_negative_active_energy = #{secondaryNegativeActiveEnergy},</if>
<if test="secondaryTotalPowerFactor != null">secondary_total_power_factor = #{secondaryTotalPowerFactor},</if>
<if test="secondaryTotalApparentPower != null">secondary_total_apparent_power = #{secondaryTotalApparentPower},</if>
<if test="secondaryTotalReactivePower != null">secondary_total_reactive_power = #{secondaryTotalReactivePower},</if>
<if test="secondaryPositiveReactiveEnergy != null">secondary_positive_reactive_energy = #{secondaryPositiveReactiveEnergy},</if>
<if test="secondaryPositiveActiveEnergy != null">secondary_positive_active_energy = #{secondaryPositiveActiveEnergy},</if>
<if test="secondaryTotalActivePower != null">secondary_total_active_power = #{secondaryTotalActivePower},</if>
<if test="reverseReactiveEnergyEqMinus != null">reverse_reactive_energy_eq_minus = #{reverseReactiveEnergyEqMinus},</if>
<if test="reverseActiveEnergyEpMinus != null">reverse_active_energy_ep_minus = #{reverseActiveEnergyEpMinus},</if>
<if test="positiveReactiveEnergyEqPlus != null">positive_reactive_energy_eq_plus = #{positiveReactiveEnergyEqPlus},</if>
<if test="positiveActiveEnergyEpPlus != null">positive_active_energy_ep_plus = #{positiveActiveEnergyEpPlus},</if>
</trim>
where id = #{id}
</update>