工单管理优化
This commit is contained in:
@ -20,10 +20,11 @@
|
||||
<result property="siteId" column="site_id" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="deviceName" column="device_name" />
|
||||
<result property="ticketNo" column="ticket_no" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmsAlarmRecordsVo">
|
||||
select id, device_type, alarm_level, alarm_content, alarm_start_time, alarm_end_time, status, create_by, create_time, update_by, update_time, remark, site_id, device_id, device_name from ems_alarm_records
|
||||
select id, device_type, alarm_level, alarm_content, alarm_start_time, alarm_end_time, status, create_by, create_time, update_by, update_time, remark, site_id, device_id, device_name, ticket_no from ems_alarm_records
|
||||
</sql>
|
||||
|
||||
<select id="selectEmsAlarmRecordsList" parameterType="EmsAlarmRecords" resultMap="EmsAlarmRecordsResult">
|
||||
@ -38,6 +39,7 @@
|
||||
<if test="siteId != null and siteId != ''"> and site_id = #{siteId}</if>
|
||||
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
|
||||
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
|
||||
<if test="ticketNo != null and ticketNo != ''"> and ticket_no = #{ticketNo}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -63,6 +65,7 @@
|
||||
<if test="siteId != null">site_id,</if>
|
||||
<if test="deviceId != null and deviceId != ''">device_id,</if>
|
||||
<if test="deviceName != null and deviceName != ''">device_name,</if>
|
||||
<if test="ticketNo != null">ticket_no,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="deviceType != null">#{deviceType},</if>
|
||||
@ -79,6 +82,7 @@
|
||||
<if test="siteId != null">#{siteId},</if>
|
||||
<if test="deviceId != null and deviceId != ''">#{deviceId},</if>
|
||||
<if test="deviceName != null and deviceName != ''">#{deviceName},</if>
|
||||
<if test="ticketNo != null">#{ticketNo},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -99,6 +103,7 @@
|
||||
<if test="siteId != null">site_id = #{siteId},</if>
|
||||
<if test="deviceId != null and deviceId != ''">device_id = #{deviceId},</if>
|
||||
<if test="deviceName != null and deviceName != ''">device_name = #{deviceName},</if>
|
||||
<if test="ticketNo != null">ticket_no = #{ticketNo},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@ -116,7 +121,10 @@
|
||||
|
||||
<select id="getAlarmRecordsBySiteId" parameterType="String" resultType="com.xzzn.ems.domain.vo.SiteMonitorHomeAlarmVo">
|
||||
select device_name as deviceName,
|
||||
status,alarm_content as alarmContent
|
||||
status,
|
||||
alarm_content as alarmContent,
|
||||
ticket_no as ticketNo,
|
||||
id
|
||||
from ems_alarm_records
|
||||
where site_id = #{siteId}
|
||||
</select>
|
||||
@ -140,7 +148,9 @@
|
||||
<select id="getAlarmRecordDetailList" parameterType="AlarmRecordListRequestVo" resultType="com.xzzn.ems.domain.vo.AlarmRecordListResponseVo">
|
||||
select t.device_name as deviceName,t.alarm_level as alarmLevel,
|
||||
t.alarm_content as alarmContent,t.status as status,
|
||||
t.alarm_start_time as alarmStartTime,t.alarm_end_time as alarmEndTime
|
||||
t.alarm_start_time as alarmStartTime,t.alarm_end_time as alarmEndTime,
|
||||
t.ticket_no as ticketNo,
|
||||
t.id
|
||||
from ems_alarm_records t
|
||||
where t.site_id = #{siteId}
|
||||
<if test="deviceType != null and deviceType != ''">
|
||||
|
||||
@ -18,15 +18,17 @@
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="workUserId" column="work_user_id" />
|
||||
<result property="isDelete" column="isDelete" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmsTicketVo">
|
||||
select id, ticket_no, user_id, title, content, images, status, create_time, complete_time, create_by, update_by, update_time, work_user_id from ems_ticket
|
||||
select id, ticket_no, user_id, title, content, images, status, create_time, complete_time, create_by, update_by, update_time, work_user_id, isDelete from ems_ticket
|
||||
</sql>
|
||||
|
||||
<select id="selectEmsTicketList" parameterType="EmsTicket" resultMap="EmsTicketResult">
|
||||
<include refid="selectEmsTicketVo"/>
|
||||
<where>
|
||||
isDelete = 1
|
||||
<if test="ticketNo != null and ticketNo != ''"> and ticket_no = #{ticketNo}</if>
|
||||
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
|
||||
<if test="title != null and title != ''"> and title = #{title}</if>
|
||||
@ -41,6 +43,7 @@
|
||||
<select id="selectEmsTicketById" parameterType="String" resultMap="EmsTicketResult">
|
||||
<include refid="selectEmsTicketVo"/>
|
||||
where id = #{id}
|
||||
and isDelete = 1
|
||||
</select>
|
||||
|
||||
<insert id="insertEmsTicket" parameterType="EmsTicket" useGeneratedKeys="true" keyProperty="id">
|
||||
@ -58,6 +61,7 @@
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="workUserId != null">work_user_id,</if>
|
||||
<if test="isDelete != null">isDelete,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="ticketNo != null and ticketNo != ''">#{ticketNo},</if>
|
||||
@ -72,6 +76,7 @@
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="workUserId != null">#{workUserId},</if>
|
||||
<if test="isDelete != null">#{isDelete},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -90,6 +95,7 @@
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="workUserId != null">work_user_id = #{workUserId},</if>
|
||||
<if test="isDelete != null">isDelete = #{isDelete},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@ -104,4 +110,8 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="dropEmsTicketById" parameterType="String">
|
||||
update ems_ticket set isDelete = 0 where id = #{id}
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user