运行策略防逆流逻辑修改
This commit is contained in:
@ -16,6 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="chargeStatus" column="charge_status" />
|
||||
<result property="executionDate" column="execution_date" />
|
||||
<result property="antiReverse" column="anti_reverse" />
|
||||
<result property="powerDownType" column="power_down_type" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
@ -24,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmsStrategyLogVo">
|
||||
select id, strategy_id, template_id, site_id, device_id, start_time, end_time, charge_discharge_power, charge_status, execution_date, anti_reverse, create_by, create_time, update_by, update_time, remark from ems_strategy_log
|
||||
select id, strategy_id, template_id, site_id, device_id, start_time, end_time, charge_discharge_power, charge_status, execution_date, anti_reverse, power_down_type, create_by, create_time, update_by, update_time, remark from ems_strategy_log
|
||||
</sql>
|
||||
|
||||
<select id="selectEmsStrategyLogList" parameterType="EmsStrategyLog" resultMap="EmsStrategyLogResult">
|
||||
@ -40,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="chargeStatus != null and chargeStatus != ''"> and charge_status = #{chargeStatus}</if>
|
||||
<if test="executionDate != null "> and execution_date = #{executionDate}</if>
|
||||
<if test="antiReverse != null "> and anti_reverse = #{antiReverse}</if>
|
||||
<if test="powerDownType != null "> and power_down_type = #{powerDownType}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
@ -62,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="chargeStatus != null">charge_status,</if>
|
||||
<if test="executionDate != null">execution_date,</if>
|
||||
<if test="antiReverse != null">anti_reverse,</if>
|
||||
<if test="powerDownType != null">power_down_type,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
@ -79,6 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="chargeStatus != null">#{chargeStatus},</if>
|
||||
<if test="executionDate != null">#{executionDate},</if>
|
||||
<if test="antiReverse != null">#{antiReverse},</if>
|
||||
<if test="powerDownType != null">#{powerDownType},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
@ -100,6 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="chargeStatus != null">charge_status = #{chargeStatus},</if>
|
||||
<if test="executionDate != null">execution_date = #{executionDate},</if>
|
||||
<if test="antiReverse != null">anti_reverse = #{antiReverse},</if>
|
||||
<if test="powerDownType != null">power_down_type = #{powerDownType},</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>
|
||||
@ -119,4 +124,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getLastStrategyLog" parameterType="EmsStrategyLog" resultMap="EmsStrategyLogResult">
|
||||
<include refid="selectEmsStrategyLogVo"/>
|
||||
<where>
|
||||
<if test="strategyId != null "> and strategy_id = #{strategyId}</if>
|
||||
<if test="templateId != null and templateId != ''"> and template_id = #{templateId}</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="startTime != null "> and start_time = #{startTime}</if>
|
||||
<if test="endTime != null "> and end_time = #{endTime}</if>
|
||||
<if test="chargeDischargePower != null "> and charge_discharge_power = #{chargeDischargePower}</if>
|
||||
<if test="chargeStatus != null and chargeStatus != ''"> and charge_status = #{chargeStatus}</if>
|
||||
<if test="executionDate != null "> and execution_date = #{executionDate}</if>
|
||||
<if test="antiReverse != null "> and anti_reverse = #{antiReverse}</if>
|
||||
<if test="powerDownType != null "> and power_down_type = #{powerDownType}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
limit 1
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user