PCS+BMS总览+BMS电池簇-框架
This commit is contained in:
@ -0,0 +1,151 @@
|
||||
<?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.EmsBatteryStackMapper">
|
||||
|
||||
<resultMap type="EmsBatteryStack" id="EmsBatteryStackResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="workStatus" column="work_status" />
|
||||
<result property="pcsCommunicationStatus" column="pcs_communication_status" />
|
||||
<result property="emsCommunicationStatus" column="ems_communication_status" />
|
||||
<result property="totalVoltage" column="total_voltage" />
|
||||
<result property="chargeableCapacity" column="chargeable_capacity" />
|
||||
<result property="totalChargedCapacity" column="total_charged_capacity" />
|
||||
<result property="totalCurrent" column="total_current" />
|
||||
<result property="dischargeableCapacity" column="dischargeable_capacity" />
|
||||
<result property="totalDischargedCapacity" column="total_discharged_capacity" />
|
||||
<result property="soh" column="soh" />
|
||||
<result property="averageTemperature" column="average_temperature" />
|
||||
<result property="insulationResistance" column="insulation_resistance" />
|
||||
<result property="currentSoc" column="current_soc" />
|
||||
<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="selectEmsBatteryStackVo">
|
||||
select id, work_status, pcs_communication_status, ems_communication_status, total_voltage, chargeable_capacity, total_charged_capacity, total_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 from ems_battery_stack
|
||||
</sql>
|
||||
|
||||
<select id="selectEmsBatteryStackList" parameterType="EmsBatteryStack" resultMap="EmsBatteryStackResult">
|
||||
<include refid="selectEmsBatteryStackVo"/>
|
||||
<where>
|
||||
<if test="workStatus != null and workStatus != ''"> and work_status = #{workStatus}</if>
|
||||
<if test="pcsCommunicationStatus != null and pcsCommunicationStatus != ''"> and pcs_communication_status = #{pcsCommunicationStatus}</if>
|
||||
<if test="emsCommunicationStatus != null and emsCommunicationStatus != ''"> and ems_communication_status = #{emsCommunicationStatus}</if>
|
||||
<if test="totalVoltage != null "> and total_voltage = #{totalVoltage}</if>
|
||||
<if test="chargeableCapacity != null "> and chargeable_capacity = #{chargeableCapacity}</if>
|
||||
<if test="totalChargedCapacity != null "> and total_charged_capacity = #{totalChargedCapacity}</if>
|
||||
<if test="totalCurrent != null "> and total_current = #{totalCurrent}</if>
|
||||
<if test="dischargeableCapacity != null "> and dischargeable_capacity = #{dischargeableCapacity}</if>
|
||||
<if test="totalDischargedCapacity != null "> and total_discharged_capacity = #{totalDischargedCapacity}</if>
|
||||
<if test="soh != null "> and soh = #{soh}</if>
|
||||
<if test="averageTemperature != null "> and average_temperature = #{averageTemperature}</if>
|
||||
<if test="insulationResistance != null "> and insulation_resistance = #{insulationResistance}</if>
|
||||
<if test="currentSoc != null "> and current_soc = #{currentSoc}</if>
|
||||
<if test="siteId != null "> and site_id = #{siteId}</if>
|
||||
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEmsBatteryStackById" parameterType="Long" resultMap="EmsBatteryStackResult">
|
||||
<include refid="selectEmsBatteryStackVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEmsBatteryStack" parameterType="EmsBatteryStack" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into ems_battery_stack
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="workStatus != null">work_status,</if>
|
||||
<if test="pcsCommunicationStatus != null">pcs_communication_status,</if>
|
||||
<if test="emsCommunicationStatus != null">ems_communication_status,</if>
|
||||
<if test="totalVoltage != null">total_voltage,</if>
|
||||
<if test="chargeableCapacity != null">chargeable_capacity,</if>
|
||||
<if test="totalChargedCapacity != null">total_charged_capacity,</if>
|
||||
<if test="totalCurrent != null">total_current,</if>
|
||||
<if test="dischargeableCapacity != null">dischargeable_capacity,</if>
|
||||
<if test="totalDischargedCapacity != null">total_discharged_capacity,</if>
|
||||
<if test="soh != null">soh,</if>
|
||||
<if test="averageTemperature != null">average_temperature,</if>
|
||||
<if test="insulationResistance != null">insulation_resistance,</if>
|
||||
<if test="currentSoc != null">current_soc,</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">device_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="workStatus != null">#{workStatus},</if>
|
||||
<if test="pcsCommunicationStatus != null">#{pcsCommunicationStatus},</if>
|
||||
<if test="emsCommunicationStatus != null">#{emsCommunicationStatus},</if>
|
||||
<if test="totalVoltage != null">#{totalVoltage},</if>
|
||||
<if test="chargeableCapacity != null">#{chargeableCapacity},</if>
|
||||
<if test="totalChargedCapacity != null">#{totalChargedCapacity},</if>
|
||||
<if test="totalCurrent != null">#{totalCurrent},</if>
|
||||
<if test="dischargeableCapacity != null">#{dischargeableCapacity},</if>
|
||||
<if test="totalDischargedCapacity != null">#{totalDischargedCapacity},</if>
|
||||
<if test="soh != null">#{soh},</if>
|
||||
<if test="averageTemperature != null">#{averageTemperature},</if>
|
||||
<if test="insulationResistance != null">#{insulationResistance},</if>
|
||||
<if test="currentSoc != null">#{currentSoc},</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">#{deviceId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEmsBatteryStack" parameterType="EmsBatteryStack">
|
||||
update ems_battery_stack
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="workStatus != null">work_status = #{workStatus},</if>
|
||||
<if test="pcsCommunicationStatus != null">pcs_communication_status = #{pcsCommunicationStatus},</if>
|
||||
<if test="emsCommunicationStatus != null">ems_communication_status = #{emsCommunicationStatus},</if>
|
||||
<if test="totalVoltage != null">total_voltage = #{totalVoltage},</if>
|
||||
<if test="chargeableCapacity != null">chargeable_capacity = #{chargeableCapacity},</if>
|
||||
<if test="totalChargedCapacity != null">total_charged_capacity = #{totalChargedCapacity},</if>
|
||||
<if test="totalCurrent != null">total_current = #{totalCurrent},</if>
|
||||
<if test="dischargeableCapacity != null">dischargeable_capacity = #{dischargeableCapacity},</if>
|
||||
<if test="totalDischargedCapacity != null">total_discharged_capacity = #{totalDischargedCapacity},</if>
|
||||
<if test="soh != null">soh = #{soh},</if>
|
||||
<if test="averageTemperature != null">average_temperature = #{averageTemperature},</if>
|
||||
<if test="insulationResistance != null">insulation_resistance = #{insulationResistance},</if>
|
||||
<if test="currentSoc != null">current_soc = #{currentSoc},</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">device_id = #{deviceId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEmsBatteryStackById" parameterType="Long">
|
||||
delete from ems_battery_stack where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmsBatteryStackByIds" parameterType="String">
|
||||
delete from ems_battery_stack where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectEmsBatteryStackBySiteId" parameterType="Long" resultMap="EmsBatteryStackResult">
|
||||
<include refid="selectEmsBatteryStackVo"/>
|
||||
where site_id = #{siteId} order by update_time desc limit 1
|
||||
</select>
|
||||
</mapper>
|
Reference in New Issue
Block a user