|
|
|
@ -1,39 +1,52 @@
|
|
|
|
|
<?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">
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.hw.dms.mapper.DmsRecordShutDownMapper">
|
|
|
|
|
|
|
|
|
|
<resultMap type="DmsRecordShutDown" id="DmsRecordShutDownResult">
|
|
|
|
|
<result property="recordShutDownId" column="record_shut_down_id" />
|
|
|
|
|
<result property="deviceId" column="device_id" />
|
|
|
|
|
<result property="shutType" column="shut_type" />
|
|
|
|
|
<result property="shutReason" column="shut_reason" />
|
|
|
|
|
<result property="shutBeginTime" column="shut_begin_time" />
|
|
|
|
|
<result property="shutEndTime" column="shut_end_time" />
|
|
|
|
|
<result property="shutTime" column="shut_time" />
|
|
|
|
|
<result property="isFlag" column="is_flag" />
|
|
|
|
|
<result property="remark" column="remark" />
|
|
|
|
|
<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="recordShutDownId" column="record_shut_down_id"/>
|
|
|
|
|
<result property="deviceId" column="device_id"/>
|
|
|
|
|
<result property="shutType" column="shut_type"/>
|
|
|
|
|
<result property="shutReason" column="shut_reason"/>
|
|
|
|
|
<result property="shutBeginTime" column="shut_begin_time"/>
|
|
|
|
|
<result property="shutEndTime" column="shut_end_time"/>
|
|
|
|
|
<result property="shutTime" column="shut_time"/>
|
|
|
|
|
<result property="isFlag" column="is_flag"/>
|
|
|
|
|
<result property="remark" column="remark"/>
|
|
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectDmsRecordShutDownVo">
|
|
|
|
|
select record_shut_down_id, device_id, shut_type, shut_reason, shut_begin_time, shut_end_time, shut_time, is_flag, remark, create_by, create_time, update_by, update_time from dms_record_shut_down
|
|
|
|
|
select record_shut_down_id,
|
|
|
|
|
device_id,
|
|
|
|
|
shut_type,
|
|
|
|
|
shut_reason,
|
|
|
|
|
shut_begin_time,
|
|
|
|
|
shut_end_time,
|
|
|
|
|
shut_time,
|
|
|
|
|
is_flag,
|
|
|
|
|
remark,
|
|
|
|
|
create_by,
|
|
|
|
|
create_time,
|
|
|
|
|
update_by,
|
|
|
|
|
update_time
|
|
|
|
|
from dms_record_shut_down
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectDmsRecordShutDownList" parameterType="DmsRecordShutDown" resultMap="DmsRecordShutDownResult">
|
|
|
|
|
<include refid="selectDmsRecordShutDownVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
|
|
|
|
<if test="shutType != null "> and shut_type = #{shutType}</if>
|
|
|
|
|
<if test="shutReason != null and shutReason != ''"> and shut_reason = #{shutReason}</if>
|
|
|
|
|
<if test="shutBeginTime != null "> and shut_begin_time >= #{shutBeginTime}</if>
|
|
|
|
|
<if test="shutEndTime != null "> and #{shutEndTime}>=shut_end_time</if>
|
|
|
|
|
<if test="shutTime != null "> and shut_time = #{shutTime}</if>
|
|
|
|
|
<if test="isFlag != null "> and is_flag = #{isFlag}</if>
|
|
|
|
|
<if test="deviceId != null ">and device_id = #{deviceId}</if>
|
|
|
|
|
<if test="shutType != null ">and shut_type = #{shutType}</if>
|
|
|
|
|
<if test="shutReason != null and shutReason != ''">and shut_reason = #{shutReason}</if>
|
|
|
|
|
<if test="shutBeginTime != null ">and shut_begin_time >= #{shutBeginTime}</if>
|
|
|
|
|
<if test="shutEndTime != null ">and #{shutEndTime}>=shut_end_time</if>
|
|
|
|
|
<if test="shutTime != null ">and shut_time = #{shutTime}</if>
|
|
|
|
|
<if test="isFlag != null ">and is_flag = #{isFlag}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@ -42,7 +55,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
where record_shut_down_id = #{recordShutDownId}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertDmsRecordShutDown" parameterType="DmsRecordShutDown" useGeneratedKeys="true" keyProperty="recordShutDownId">
|
|
|
|
|
<insert id="insertDmsRecordShutDown" parameterType="DmsRecordShutDown" useGeneratedKeys="true"
|
|
|
|
|
keyProperty="recordShutDownId">
|
|
|
|
|
insert into dms_record_shut_down
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="deviceId != null">device_id,</if>
|
|
|
|
@ -94,7 +108,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteDmsRecordShutDownByRecordShutDownId" parameterType="Long">
|
|
|
|
|
delete from dms_record_shut_down where record_shut_down_id = #{recordShutDownId}
|
|
|
|
|
delete
|
|
|
|
|
from dms_record_shut_down
|
|
|
|
|
where record_shut_down_id = #{recordShutDownId}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteDmsRecordShutDownByRecordShutDownIds" parameterType="String">
|
|
|
|
|