首页-装机容量+功率
This commit is contained in:
@ -235,6 +235,14 @@
|
||||
where site_id = #{siteId}
|
||||
</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 sum(a.total_active_power) as totalActivePower,
|
||||
sum(a.total_reactive_power) as totalReactivePower,
|
||||
|
@ -11,6 +11,8 @@
|
||||
<result property="runningTime" column="running_time" />
|
||||
<result property="latitude" column="latitude" />
|
||||
<result property="longitude" column="longitude" />
|
||||
<result property="installCapacity" column="install_capacity" />
|
||||
<result property="installPower" column="install_power" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
@ -19,7 +21,7 @@
|
||||
</resultMap>
|
||||
|
||||
<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>
|
||||
|
||||
<select id="selectEmsSiteSettingList" parameterType="EmsSiteSetting" resultMap="EmsSiteSettingResult">
|
||||
@ -30,6 +32,8 @@
|
||||
<if test="runningTime != null "> and running_time = #{runningTime}</if>
|
||||
<if test="latitude != null "> and latitude = #{latitude}</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>
|
||||
</select>
|
||||
|
||||
@ -46,6 +50,8 @@
|
||||
<if test="runningTime != null">running_time,</if>
|
||||
<if test="latitude != null">latitude,</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="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
@ -58,6 +64,8 @@
|
||||
<if test="runningTime != null">#{runningTime},</if>
|
||||
<if test="latitude != null">#{latitude},</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="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
@ -74,6 +82,8 @@
|
||||
<if test="runningTime != null">running_time = #{runningTime},</if>
|
||||
<if test="latitude != null">latitude = #{latitude},</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="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
@ -96,8 +106,8 @@
|
||||
|
||||
<select id="getSiteTotalInfo" resultType="com.xzzn.ems.domain.vo.SiteTotalInfoVo">
|
||||
select count(DISTINCT s.id) as siteNum,
|
||||
SUM(d.daily_ac_charge_energy) as totalChargedCap,
|
||||
SUM(d.daily_ac_discharge_energy) as totalDischargedCap
|
||||
from ems_site_setting s left join ems_pcs_data d on s.id = d.site_id
|
||||
SUM(s.install_capacity) as installCapacity,
|
||||
SUM(s.install_power) as installPower
|
||||
from ems_site_setting s
|
||||
</select>
|
||||
</mapper>
|
Reference in New Issue
Block a user