首页-装机容量+功率
This commit is contained in:
@ -42,6 +42,14 @@ public class EmsSiteSetting extends BaseEntity
|
|||||||
@Excel(name = "经度")
|
@Excel(name = "经度")
|
||||||
private BigDecimal longitude;
|
private BigDecimal longitude;
|
||||||
|
|
||||||
|
/** 装机容量 */
|
||||||
|
@Excel(name = "装机容量")
|
||||||
|
private BigDecimal installCapacity;
|
||||||
|
|
||||||
|
/** 装机功率 */
|
||||||
|
@Excel(name = "装机功率")
|
||||||
|
private BigDecimal installPower;
|
||||||
|
|
||||||
public void setId(Long id)
|
public void setId(Long id)
|
||||||
{
|
{
|
||||||
this.id = id;
|
this.id = id;
|
||||||
@ -102,6 +110,26 @@ public class EmsSiteSetting extends BaseEntity
|
|||||||
return longitude;
|
return longitude;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setInstallCapacity(BigDecimal installCapacity)
|
||||||
|
{
|
||||||
|
this.installCapacity = installCapacity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getInstallCapacity()
|
||||||
|
{
|
||||||
|
return installCapacity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInstallPower(BigDecimal installPower)
|
||||||
|
{
|
||||||
|
this.installPower = installPower;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getInstallPower()
|
||||||
|
{
|
||||||
|
return installPower;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
@ -111,6 +139,8 @@ public class EmsSiteSetting extends BaseEntity
|
|||||||
.append("runningTime", getRunningTime())
|
.append("runningTime", getRunningTime())
|
||||||
.append("latitude", getLatitude())
|
.append("latitude", getLatitude())
|
||||||
.append("longitude", getLongitude())
|
.append("longitude", getLongitude())
|
||||||
|
.append("installCapacity", getInstallCapacity())
|
||||||
|
.append("installPower", getInstallPower())
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", getCreateBy())
|
||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", getUpdateBy())
|
||||||
|
@ -15,12 +15,12 @@ public class SiteTotalInfoVo {
|
|||||||
/**
|
/**
|
||||||
* 装机功率(MW)
|
* 装机功率(MW)
|
||||||
*/
|
*/
|
||||||
private BigDecimal installedPower;
|
private BigDecimal installPower;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 装机容量(MW)
|
* 装机容量(MW)
|
||||||
*/
|
*/
|
||||||
private BigDecimal installedCap;
|
private BigDecimal installCapacity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 总充电量(MWH)
|
* 总充电量(MWH)
|
||||||
@ -56,28 +56,28 @@ public class SiteTotalInfoVo {
|
|||||||
this.totalChargedCap = totalChargedCap;
|
this.totalChargedCap = totalChargedCap;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getInstalledCap() {
|
public BigDecimal getInstallCapacity() {
|
||||||
return installedCap;
|
return installCapacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setInstalledCap(BigDecimal installedCap) {
|
public void setInstallCapacity(BigDecimal installCapacity) {
|
||||||
this.installedCap = installedCap;
|
this.installCapacity = installCapacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getInstalledPower() {
|
public BigDecimal getInstallPower() {
|
||||||
return installedPower;
|
return installPower;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setInstalledPower(BigDecimal installedPower) {
|
public void setInstallPower(BigDecimal installPower) {
|
||||||
this.installedPower = installedPower;
|
this.installPower = installPower;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "SiteVo{" +
|
return "SiteVo{" +
|
||||||
"siteNum=" + siteNum +
|
"siteNum=" + siteNum +
|
||||||
", installedPower=" + installedPower +
|
", installedPower=" + installPower +
|
||||||
", installedCap=" + installedCap +
|
", installedCap=" + installCapacity +
|
||||||
", totalChargedCap=" + totalChargedCap +
|
", totalChargedCap=" + totalChargedCap +
|
||||||
", totalDischargedCap=" + totalDischargedCap +
|
", totalDischargedCap=" + totalDischargedCap +
|
||||||
'}';
|
'}';
|
||||||
|
@ -2,6 +2,7 @@ package com.xzzn.ems.mapper;
|
|||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import com.xzzn.ems.domain.EmsPcsData;
|
import com.xzzn.ems.domain.EmsPcsData;
|
||||||
import com.xzzn.ems.domain.vo.ElectricIndexList;
|
import com.xzzn.ems.domain.vo.ElectricIndexList;
|
||||||
@ -98,4 +99,10 @@ public interface EmsPcsDataMapper
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<PcsDetailInfoVo> getPcsDetailInfoBySiteId(Long siteId);
|
public List<PcsDetailInfoVo> getPcsDetailInfoBySiteId(Long siteId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取总充+总放
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Map<String, BigDecimal> getPcsTotalChargeData();
|
||||||
}
|
}
|
||||||
|
@ -13,9 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Calendar;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 首页看板+站点地图 服务层实现
|
* 首页看板+站点地图 服务层实现
|
||||||
@ -36,7 +34,14 @@ public class HomePageServiceImpl implements IHomePageService
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SiteTotalInfoVo getSiteTotalInfo() {
|
public SiteTotalInfoVo getSiteTotalInfo() {
|
||||||
return emsSiteService.getSiteTotalInfo();
|
SiteTotalInfoVo siteTotalInfoVo = new SiteTotalInfoVo();
|
||||||
|
siteTotalInfoVo = emsSiteService.getSiteTotalInfo();
|
||||||
|
// 获取总充+总放
|
||||||
|
Map<String,BigDecimal> pcsMap = new HashMap<>();
|
||||||
|
pcsMap = emsPcsDataMapper.getPcsTotalChargeData();
|
||||||
|
siteTotalInfoVo.setTotalChargedCap(pcsMap.get("totalChargedCap"));
|
||||||
|
siteTotalInfoVo.setTotalDischargedCap(pcsMap.get("totalDischargedCap"));
|
||||||
|
return siteTotalInfoVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 单站点基本信息
|
// 单站点基本信息
|
||||||
@ -48,14 +53,16 @@ public class HomePageServiceImpl implements IHomePageService
|
|||||||
// 站点基本信息
|
// 站点基本信息
|
||||||
EmsSiteSetting emsSite = emsSiteMapper.selectEmsSiteSettingById(siteId);
|
EmsSiteSetting emsSite = emsSiteMapper.selectEmsSiteSettingById(siteId);
|
||||||
if (emsSite != null) {
|
if (emsSite != null) {
|
||||||
|
// 装机功率+装机容量
|
||||||
singleSiteBaseInfo.setSiteName(emsSite.getSiteName());
|
singleSiteBaseInfo.setSiteName(emsSite.getSiteName());
|
||||||
|
singleSiteBaseInfo.setInstalledCap(emsSite.getInstallCapacity());
|
||||||
|
singleSiteBaseInfo.setInstalledPower(emsSite.getInstallPower());
|
||||||
String[] siteLocation = new String[2];
|
String[] siteLocation = new String[2];
|
||||||
siteLocation[0] = emsSite.getLongitude() == null ? "" : emsSite.getLongitude().toString();
|
siteLocation[0] = emsSite.getLongitude() == null ? "" : emsSite.getLongitude().toString();
|
||||||
siteLocation[1] = emsSite.getLatitude() == null ? "" : emsSite.getLatitude().toString();
|
siteLocation[1] = emsSite.getLatitude() == null ? "" : emsSite.getLatitude().toString();
|
||||||
singleSiteBaseInfo.setSiteLocation(siteLocation);//站点位置
|
singleSiteBaseInfo.setSiteLocation(siteLocation);//站点位置
|
||||||
singleSiteBaseInfo.setSiteAddress(emsSite.getSiteAddress());
|
singleSiteBaseInfo.setSiteAddress(emsSite.getSiteAddress());
|
||||||
singleSiteBaseInfo.setRunningTime(DateUtils.parseDateToStr("yyyy-MM-dd",emsSite.getRunningTime()));//投运时间
|
singleSiteBaseInfo.setRunningTime(DateUtils.parseDateToStr("yyyy-MM-dd",emsSite.getRunningTime()));//投运时间
|
||||||
// 装机功率+装机容量 待定
|
|
||||||
// 七天放电数据统计
|
// 七天放电数据统计
|
||||||
List<SiteMonitorDataVo> siteMonitorDataVoList = emsPcsDataMapper.getPcsDataBySiteId(siteId);
|
List<SiteMonitorDataVo> siteMonitorDataVoList = emsPcsDataMapper.getPcsDataBySiteId(siteId);
|
||||||
singleSiteBaseInfo.setSevenDayDisChargeStats(siteMonitorDataVoList);
|
singleSiteBaseInfo.setSevenDayDisChargeStats(siteMonitorDataVoList);
|
||||||
|
@ -235,6 +235,14 @@
|
|||||||
where site_id = #{siteId}
|
where site_id = #{siteId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getPcsTotalChargeData" resultType="map">
|
||||||
|
select SUM(t.daily_ac_charge_energy) as totalChargedCap,
|
||||||
|
SUM(t.daily_ac_discharge_energy) as totalDischargedCap
|
||||||
|
from ems_pcs_data t
|
||||||
|
where t.data_update_time = (select MAX(data_update_time) FROM ems_pcs_data
|
||||||
|
where site_id = t.site_id and device_id = t.device_id and date_month = t.date_month and date_day = t.date_day)
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="getSiteRunningHeadInfo" parameterType="Long" resultType="com.xzzn.ems.domain.vo.SiteMonitorRuningHeadInfoVo">
|
<select id="getSiteRunningHeadInfo" parameterType="Long" resultType="com.xzzn.ems.domain.vo.SiteMonitorRuningHeadInfoVo">
|
||||||
select sum(a.total_active_power) as totalActivePower,
|
select sum(a.total_active_power) as totalActivePower,
|
||||||
sum(a.total_reactive_power) as totalReactivePower,
|
sum(a.total_reactive_power) as totalReactivePower,
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
<result property="runningTime" column="running_time" />
|
<result property="runningTime" column="running_time" />
|
||||||
<result property="latitude" column="latitude" />
|
<result property="latitude" column="latitude" />
|
||||||
<result property="longitude" column="longitude" />
|
<result property="longitude" column="longitude" />
|
||||||
|
<result property="installCapacity" column="install_capacity" />
|
||||||
|
<result property="installPower" column="install_power" />
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark" />
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
@ -19,7 +21,7 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectEmsSiteSettingVo">
|
<sql id="selectEmsSiteSettingVo">
|
||||||
select id, site_name, site_address, running_time, latitude, longitude, remark, create_by, update_by, create_time, update_time from ems_site_setting
|
select id, site_name, site_address, running_time, latitude, longitude, install_capacity, install_power, remark, create_by, update_by, create_time, update_time from ems_site_setting
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectEmsSiteSettingList" parameterType="EmsSiteSetting" resultMap="EmsSiteSettingResult">
|
<select id="selectEmsSiteSettingList" parameterType="EmsSiteSetting" resultMap="EmsSiteSettingResult">
|
||||||
@ -30,6 +32,8 @@
|
|||||||
<if test="runningTime != null "> and running_time = #{runningTime}</if>
|
<if test="runningTime != null "> and running_time = #{runningTime}</if>
|
||||||
<if test="latitude != null "> and latitude = #{latitude}</if>
|
<if test="latitude != null "> and latitude = #{latitude}</if>
|
||||||
<if test="longitude != null "> and longitude = #{longitude}</if>
|
<if test="longitude != null "> and longitude = #{longitude}</if>
|
||||||
|
<if test="installCapacity != null "> and install_capacity = #{installCapacity}</if>
|
||||||
|
<if test="installPower != null "> and install_power = #{installPower}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -46,6 +50,8 @@
|
|||||||
<if test="runningTime != null">running_time,</if>
|
<if test="runningTime != null">running_time,</if>
|
||||||
<if test="latitude != null">latitude,</if>
|
<if test="latitude != null">latitude,</if>
|
||||||
<if test="longitude != null">longitude,</if>
|
<if test="longitude != null">longitude,</if>
|
||||||
|
<if test="installCapacity != null">install_capacity,</if>
|
||||||
|
<if test="installPower != null">install_power,</if>
|
||||||
<if test="remark != null">remark,</if>
|
<if test="remark != null">remark,</if>
|
||||||
<if test="createBy != null">create_by,</if>
|
<if test="createBy != null">create_by,</if>
|
||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
@ -58,6 +64,8 @@
|
|||||||
<if test="runningTime != null">#{runningTime},</if>
|
<if test="runningTime != null">#{runningTime},</if>
|
||||||
<if test="latitude != null">#{latitude},</if>
|
<if test="latitude != null">#{latitude},</if>
|
||||||
<if test="longitude != null">#{longitude},</if>
|
<if test="longitude != null">#{longitude},</if>
|
||||||
|
<if test="installCapacity != null">#{installCapacity},</if>
|
||||||
|
<if test="installPower != null">#{installPower},</if>
|
||||||
<if test="remark != null">#{remark},</if>
|
<if test="remark != null">#{remark},</if>
|
||||||
<if test="createBy != null">#{createBy},</if>
|
<if test="createBy != null">#{createBy},</if>
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
@ -74,6 +82,8 @@
|
|||||||
<if test="runningTime != null">running_time = #{runningTime},</if>
|
<if test="runningTime != null">running_time = #{runningTime},</if>
|
||||||
<if test="latitude != null">latitude = #{latitude},</if>
|
<if test="latitude != null">latitude = #{latitude},</if>
|
||||||
<if test="longitude != null">longitude = #{longitude},</if>
|
<if test="longitude != null">longitude = #{longitude},</if>
|
||||||
|
<if test="installCapacity != null">install_capacity = #{installCapacity},</if>
|
||||||
|
<if test="installPower != null">install_power = #{installPower},</if>
|
||||||
<if test="remark != null">remark = #{remark},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
@ -96,8 +106,8 @@
|
|||||||
|
|
||||||
<select id="getSiteTotalInfo" resultType="com.xzzn.ems.domain.vo.SiteTotalInfoVo">
|
<select id="getSiteTotalInfo" resultType="com.xzzn.ems.domain.vo.SiteTotalInfoVo">
|
||||||
select count(DISTINCT s.id) as siteNum,
|
select count(DISTINCT s.id) as siteNum,
|
||||||
SUM(d.daily_ac_charge_energy) as totalChargedCap,
|
SUM(s.install_capacity) as installCapacity,
|
||||||
SUM(d.daily_ac_discharge_energy) as totalDischargedCap
|
SUM(s.install_power) as installPower
|
||||||
from ems_site_setting s left join ems_pcs_data d on s.id = d.site_id
|
from ems_site_setting s
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
Reference in New Issue
Block a user