|
|
@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="id" column="id" />
|
|
|
<result property="trappedPersonTel" column="trapped_person_tel" />
|
|
|
<result property="region" column="region" />
|
|
|
+ <result property="regionCode" column="region_code" />
|
|
|
<result property="community" column="community" />
|
|
|
<result property="building" column="building" />
|
|
|
<result property="elevatorName" column="elevator_name" />
|
|
|
@@ -33,19 +34,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="remark" column="remark" />
|
|
|
<result property="callId" column="call_id" />
|
|
|
<result property="failNum" column="fail_num" />
|
|
|
+ <result property="deviceSn" column="device_sn" />
|
|
|
+ <result property="deviceNo" column="device_no" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectElevatorWorkOrderVo">
|
|
|
select id, trapped_person_tel, region, community, building, elevator_name, security_code, status, create_date, recording_duration, call_recording, maint_company, maint_frist_person, maintfrist_tel,
|
|
|
maint_second_person, maint_second_tel, tenement_person, tenement_tel, handler, handle_contact_tel, handle_depart, handle_time, del_flag,
|
|
|
- create_time, update_time, remark,fail_num,call_id
|
|
|
+ create_time, update_time, remark,fail_num,call_id, device_sn,device_no, region_code
|
|
|
from ELEVATOR_EMERGENCY.elevator_work_order
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectElevatorWorkOrderList" parameterType="com.inspur.domain.ElevatorWorkOrder" resultMap="ElevatorWorkOrderResult">
|
|
|
<include refid="selectElevatorWorkOrderVo"/>
|
|
|
<where>
|
|
|
- <if test="elevatorName != null and elevatorName != ''"> and (elevator_name like concat('%', #{elevatorName}, '%') or security_code like concat('%', #{elevatorName}, '%'))</if>
|
|
|
+ <if test="elevatorName != null and elevatorName != ''"> and elevator_name like concat('%', #{elevatorName}, '%')</if>
|
|
|
<if test="securityCode != null and securityCode != ''"> and security_code like concat('%', #{securityCode}, '%')</if>
|
|
|
<if test="region != null and region != ''"> and region like concat('%', #{region}, '%')</if>
|
|
|
<if test="status != null "> and status = #{status}</if>
|
|
|
@@ -56,6 +59,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="createDateEnd != null"><!-- 结束时间检索 -->
|
|
|
AND date_format(create_time,'%Y%m%d') <= date_format(#{createDateEnd},'%Y%m%d')
|
|
|
</if>
|
|
|
+ <if test="deviceSn != null and deviceSn != ''"> and device_sn = #{deviceSn}</if>
|
|
|
+ <if test="deviceNo != null and deviceNo != ''"> and device_no = #{deviceNo}</if>
|
|
|
+ <if test="trappedPersonTel != null and trappedPersonTel != ''"> and trapped_person_tel = #{trappedPersonTel}</if>
|
|
|
+ <if test="regionCode != null and regionCode != ''"> and region_code = #{regionCode}</if>
|
|
|
+ <if test="community != null and community != ''"> and community = #{community}</if>
|
|
|
+ <if test="building != null and building != ''"> and building = #{building}</if>
|
|
|
+ <if test="createDate != null "> and create_date = #{createDate}</if>
|
|
|
+ <if test="recordingDuration != null "> and recording_duration = #{recordingDuration}</if>
|
|
|
+ <if test="callRecording != null and callRecording != ''"> and call_recording = #{callRecording}</if>
|
|
|
+ <if test="maintCompany != null and maintCompany != ''"> and maint_company = #{maintCompany}</if>
|
|
|
+ <if test="maintFristPerson != null and maintFristPerson != ''"> and maint_frist_person = #{maintFristPerson}</if>
|
|
|
+ <if test="maintfristTel != null and maintfristTel != ''"> and maintfrist_tel = #{maintfristTel}</if>
|
|
|
+ <if test="maintSecondPerson != null and maintSecondPerson != ''"> and maint_second_person = #{maintSecondPerson}</if>
|
|
|
+ <if test="maintSecondTel != null and maintSecondTel != ''"> and maint_second_tel = #{maintSecondTel}</if>
|
|
|
+ <if test="tenementPerson != null and tenementPerson != ''"> and tenement_person = #{tenementPerson}</if>
|
|
|
+ <if test="tenementTel != null and tenementTel != ''"> and tenement_tel = #{tenementTel}</if>
|
|
|
+ <if test="handler != null and handler != ''"> and handler = #{handler}</if>
|
|
|
+ <if test="handleContactTel != null and handleContactTel != ''"> and handle_contact_tel = #{handleContactTel}</if>
|
|
|
+ <if test="handleDepart != null and handleDepart != ''"> and handle_depart = #{handleDepart}</if>
|
|
|
+ <if test="handleTime != null "> and handle_time = #{handleTime}</if>
|
|
|
</where>
|
|
|
order by create_time desc
|
|
|
</select>
|
|
|
@@ -100,6 +123,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="remark != null">remark,</if>
|
|
|
<if test="callId != null">call_id,</if>
|
|
|
<if test="failNum != null">fail_num,</if>
|
|
|
+ <if test="deviceSn != null">device_sn,</if>
|
|
|
+ <if test="deviceNo != null">device_no,</if>
|
|
|
+ <if test="regionCode != null">region_code,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="trappedPersonTel != null">#{trappedPersonTel},</if>
|
|
|
@@ -129,6 +155,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
<if test="callId != null">#{callId},</if>
|
|
|
<if test="failNum != null">#{failNum},</if>
|
|
|
+ <if test="deviceSn != null">#{deviceSn},</if>
|
|
|
+ <if test="deviceNo != null">#{deviceNo},</if>
|
|
|
+ <if test="regionCode != null">#{regionCode},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
@@ -161,6 +190,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
<if test="failNum != null">fail_num = #{failNum},</if>
|
|
|
+ <if test="deviceSn != null">device_sn = #{deviceSn},</if>
|
|
|
+ <if test="deviceNo != null">device_no = #{deviceNo},</if>
|
|
|
</trim>
|
|
|
where id = #{id}
|
|
|
</update>
|