change - 整点数据、能源预览报表添加发电量显示

main
yinq 1 week ago
parent 9ae429f52f
commit 782a8929f6

@ -71,6 +71,10 @@ public class EmsRecordDnbInstant extends BaseEntity
@Excel(name = "正向有功")
private BigDecimal zxyg;
/** 反向有功 */
@Excel(name = "反向有功")
private BigDecimal fxyg;
/** 有功功率 */
@Excel(name = "有功功率")
private BigDecimal activePower;
@ -83,6 +87,14 @@ public class EmsRecordDnbInstant extends BaseEntity
@Excel(name = "采集方式", readConverterExp = "0=自动,1=手动")
private Long collectType;
public BigDecimal getFxyg() {
return fxyg;
}
public void setFxyg(BigDecimal fxyg) {
this.fxyg = fxyg;
}
public String getMonitorName() {
return monitorName;
}

@ -74,6 +74,34 @@ public class EmsReportPointDnb extends BaseEntity {
@Excel(name = "修改标识", readConverterExp = "0=是,1=否")
private String updateFlag;
/**
*
*/
@Excel(name = "发电量")
private BigDecimal powerExpend;
/**
*
*/
@Excel(name = "反向有功仪表值")
private BigDecimal powerValue;
public BigDecimal getPowerExpend() {
return powerExpend;
}
public void setPowerExpend(BigDecimal powerExpend) {
this.powerExpend = powerExpend;
}
public BigDecimal getPowerValue() {
return powerValue;
}
public void setPowerValue(BigDecimal powerValue) {
this.powerValue = powerValue;
}
public String getMonitorName() {
return monitorName;
}

@ -34,6 +34,12 @@ public class EnergyStatisticalReport extends BaseEntity {
@Excel(name = "耗量(kwh)")
private BigDecimal expend;
/**
* (kwh)
*/
@Excel(name = "发电量(kwh)")
private BigDecimal powerExpend;
/**
*
*/
@ -52,6 +58,14 @@ public class EnergyStatisticalReport extends BaseEntity {
@Excel(name = "仪表值(kwh)")
private BigDecimal instrumentValue;
public BigDecimal getPowerExpend() {
return powerExpend;
}
public void setPowerExpend(BigDecimal powerExpend) {
this.powerExpend = powerExpend;
}
public String getWorkUnitCode() {
return workUnitCode;
}

@ -93,15 +93,22 @@ public class EmsReportServiceImpl implements IEmsReportService {
for (EmsBaseWorkUnit unit : workUnits) {
HashMap<String, Object> typeResultMap = new HashMap<>();
typeResultMap.put("objId", unit.getObjId());
typeResultMap.put("parentId", unit.getParentId());
typeResultMap.put("unitName", unit.getWorkUnitName());
selectMap.put("workUnitCode", unit.getWorkUnitCode());
List<EnergyStatisticalReport> reportList = this.energyStatisticalReportList(selectMap);
BigDecimal expendSum = new BigDecimal(0);
BigDecimal powerExpendSum = new BigDecimal(0);
for (EnergyStatisticalReport report : reportList) {
typeResultMap.put("dateData|" + report.getBeginTime(), report.getExpend().add(report.getPowerExpend()));
typeResultMap.put("expend" + report.getBeginTime(), report.getExpend());
expendSum = expendSum.add(report.getExpend());
typeResultMap.put("powerExpend" + report.getBeginTime(), report.getPowerExpend());
powerExpendSum = powerExpendSum.add(report.getPowerExpend());
}
typeResultMap.put("expendSum", expendSum.toPlainString());
typeResultMap.put("powerExpendSum", powerExpendSum.toPlainString());
resultList.add(typeResultMap);
}

@ -37,6 +37,7 @@
rdi.record_time,
rdi.glys,
rdi.zxyg,
rdi.fxyg,
rdi.active_power,
rdi.reactive_power,
rdi.collect_type

@ -12,6 +12,7 @@
WU.WORK_UNIT_NAME workUnitName,
MAX(RPD.INSTRUMENT_VALUE) instrumentValue,
SUM(RPD.EXPEND) expend,
SUM(RPD.power_expend) powerExpend,
SUBSTRING(FORMAT(RPD.BEGIN_TIME, 'yyyy-MM-dd HH:mm:ss'), 1, DT.TIMESUB) beginTime,
SUBSTRING(FORMAT(RPD.BEGIN_TIME, 'yyyy-MM-dd HH:mm:ss'), 1, DT.TIMESUB) endTime
FROM ems_base_work_unit WU

@ -18,6 +18,8 @@
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="powerExpend" column="power_expend"/>
<result property="powerValue" column="power_value"/>
</resultMap>
<sql id="selectEmsReportPointDnbVo">
@ -26,6 +28,8 @@
ebmi.monitor_name,
erpd.instrument_value,
erpd.expend,
erpd.power_expend,
erpd.power_value,
erpd.record_time,
erpd.begin_time,
erpd.end_time,
@ -72,6 +76,8 @@
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="powerExpend != null">power_expend,</if>
<if test="powerValue != null">power_value,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="monitorCode != null">#{monitorCode},</if>
@ -85,6 +91,8 @@
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="powerExpend != null">#{powerExpend},</if>
<if test="powerValue != null">#{powerValue},</if>
</trim>
</insert>
@ -102,6 +110,8 @@
<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="powerExpend != null">power_expend = #{powerExpend},</if>
<if test="powerValue != null">power_value = #{powerValue},</if>
</trim>
where obj_id = #{objId}
</update>

Loading…
Cancel
Save