|
@@ -446,54 +446,9 @@
|
|
|
where lr.id = #{id}
|
|
|
</select>
|
|
|
|
|
|
- <update id="updateLawenforcementRecord" parameterType="LawenforcementRecord">
|
|
|
- update lawenforcement_record
|
|
|
- <trim prefix="SET" suffixOverrides=",">
|
|
|
- <if test="jobType != null">job_type = #{jobType},</if>
|
|
|
- <if test="creatorId != null">creator_id = #{creatorId},</if>
|
|
|
- <if test="creatorName != null">creator_name = #{creatorName},</if>
|
|
|
- <if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
- <if test="deptName != null">dept_name = #{deptName},</if>
|
|
|
- <if test="areaId != null">area_id = #{areaId},</if>
|
|
|
- <if test="jobName != null">job_name = #{jobName},</if>
|
|
|
- <if test="checkType != null">check_type = #{checkType},</if>
|
|
|
- <if test="checkObjectType != null">check_object_type = #{checkObjectType},</if>
|
|
|
- <if test="checkObjectId != null">check_object_id = #{checkObjectId},</if>
|
|
|
- <if test="checkObjectCode != null">check_object_code = #{checkObjectCode},</if>
|
|
|
- <if test="checkObjectName != null">check_object_name = #{checkObjectName},</if>
|
|
|
- <if test="checkObjectPhone != null">check_object_phone = #{checkObjectPhone},</if>
|
|
|
- <if test="checkStartTime != null">check_start_time = #{checkStartTime},</if>
|
|
|
- <if test="checkEndTime != null">check_end_time = #{checkEndTime},</if>
|
|
|
- <if test="subitemCount != null">subitem_count = #{subitemCount},</if>
|
|
|
- <if test="remark != null">remark = #{remark},</if>
|
|
|
- <if test="verify != null">verify = #{verify},</if>
|
|
|
- <if test="unableVerifyReason != null">unable_verify_reason = #{unableVerifyReason},</if>
|
|
|
- <if test="scanId != null">scan_id = #{scanId},</if>
|
|
|
- <if test="scanName != null">scan_name = #{scanName},</if>
|
|
|
- <if test="scanTime != null">scan_time = #{scanTime},</if>
|
|
|
- <if test="verifyPeopleId != null">verify_people_id = #{verifyPeopleId},</if>
|
|
|
- <if test="verifyPeopleName != null">verify_people_name = #{verifyPeopleName},</if>
|
|
|
- <if test="verifyTime != null">verify_time = #{verifyTime},</if>
|
|
|
- <if test="evaluation != null">evaluation = #{evaluation},</if>
|
|
|
- <if test="evaluationContent != null">evaluation_content = #{evaluationContent},</if>
|
|
|
- <if test="evaluationTime != null">evaluation_time = #{evaluationTime},</if>
|
|
|
- <if test="result != null">result = #{result},</if>
|
|
|
- <if test="resultTime != null">result_time = #{resultTime},</if>
|
|
|
- <if test="resultPersonId != null">result_person_id = #{resultPersonId},</if>
|
|
|
- <if test="status != null">status = #{status},</if>
|
|
|
- <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
- <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
- <if test="isLast != null">is_last = #{isLast},</if>
|
|
|
- <if test="jobId != null">job_id = #{jobId},</if>
|
|
|
- <if test="lastJobType != null">last_job_type = #{lastJobType},</if>
|
|
|
- <if test="source != null">source = #{source},</if>
|
|
|
- <if test="createMethod != null">create_method = #{createMethod},</if>
|
|
|
- <if test="isCrossDept != null">is_cross_dept = #{isCrossDept},</if>
|
|
|
- <if test="deviceId != null">device_id = #{deviceId},</if>
|
|
|
- <if test="deviceName != null">device_name = #{deviceName},</if>
|
|
|
- <if test="recordStatus != null">record_status = #{recordStatus},</if>
|
|
|
- </trim>
|
|
|
- where id = #{id}
|
|
|
+ <update id="bindDeviceToPerson" parameterType="LawenforcementBindDeviceBO">
|
|
|
+ update lawenforcement_person set device_id = #{deviceId}, device_name = #{deviceName}
|
|
|
+ where record_id = #{recordId} and person_code = #{personCode}
|
|
|
</update>
|
|
|
|
|
|
<select id="getPersonCode" parameterType="string" resultType="map">
|
|
@@ -507,6 +462,7 @@
|
|
|
<if test="personCode != null">person_code,</if>
|
|
|
<if test="recordId != null">record_id,</if>
|
|
|
<if test="deviceId != null">device_id,</if>
|
|
|
+ <if test="deviceName != null">device_name,</if>
|
|
|
<if test="startTime != null">start_time,</if>
|
|
|
<if test="endTime != null">end_time,</if>
|
|
|
</trim>
|
|
@@ -515,6 +471,7 @@
|
|
|
<if test="personCode != null">#{personCode},</if>
|
|
|
<if test="recordId != null">#{recordId},</if>
|
|
|
<if test="deviceId != null">#{deviceId},</if>
|
|
|
+ <if test="deviceName != null">#{deviceName},</if>
|
|
|
<if test="startTime != null">#{startTime},</if>
|
|
|
<if test="endTime != null">#{endTime},</if>
|
|
|
</trim>
|
|
@@ -556,18 +513,75 @@
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
|
|
|
- <update id="updateRecordStatus" parameterType="DeviceBO">
|
|
|
+ <update id="updateRecordStatus" parameterType="LawenforcementBindDeviceBO">
|
|
|
update lawenforcement_record
|
|
|
set record_status = 'lawenforcement_type_2'
|
|
|
- where id = (
|
|
|
- select record_id
|
|
|
- from lawenforcement_record_log
|
|
|
- where device_id = #{code} and end_time is null
|
|
|
- )
|
|
|
+ where id = #{recordId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <update id="updateRecordLogEndTime" parameterType="LawenforcementBindDeviceBO">
|
|
|
+ update lawenforcement_record_log set end_time = NOW()
|
|
|
+ WHERE end_time is null and record_id = #{recordId} and person_code = #{personCode}
|
|
|
</update>
|
|
|
|
|
|
- <update id="updateRecordLogEndTime" parameterType="DeviceBO">
|
|
|
- update lawenforcement_record_log set end_time = NOW() WHERE device_id = #{code} and end_time is null
|
|
|
+ <select id="getIsMainPerson" parameterType="LawenforcementBindDeviceBO" resultType="map">
|
|
|
+ select main_person as mainPerson from lawenforcement_person
|
|
|
+ WHERE person_code = #{personCode} AND record_id = #{recordId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <update id="startRecord" parameterType="LawenforcementBindDeviceBO">
|
|
|
+ update lawenforcement_record set record_status = 'lawenforcement_type_6'
|
|
|
+ where id = #{recordId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <update id="updateLawenforcementRecord" parameterType="LawenforcementRecord">
|
|
|
+ update lawenforcement_record
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="jobType != null">job_type = #{jobType},</if>
|
|
|
+ <if test="creatorId != null">creator_id = #{creatorId},</if>
|
|
|
+ <if test="creatorName != null">creator_name = #{creatorName},</if>
|
|
|
+ <if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
+ <if test="deptName != null">dept_name = #{deptName},</if>
|
|
|
+ <if test="areaId != null">area_id = #{areaId},</if>
|
|
|
+ <if test="jobName != null">job_name = #{jobName},</if>
|
|
|
+ <if test="checkType != null">check_type = #{checkType},</if>
|
|
|
+ <if test="checkObjectType != null">check_object_type = #{checkObjectType},</if>
|
|
|
+ <if test="checkObjectId != null">check_object_id = #{checkObjectId},</if>
|
|
|
+ <if test="checkObjectCode != null">check_object_code = #{checkObjectCode},</if>
|
|
|
+ <if test="checkObjectName != null">check_object_name = #{checkObjectName},</if>
|
|
|
+ <if test="checkObjectPhone != null">check_object_phone = #{checkObjectPhone},</if>
|
|
|
+ <if test="checkStartTime != null">check_start_time = #{checkStartTime},</if>
|
|
|
+ <if test="checkEndTime != null">check_end_time = #{checkEndTime},</if>
|
|
|
+ <if test="subitemCount != null">subitem_count = #{subitemCount},</if>
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
+ <if test="verify != null">verify = #{verify},</if>
|
|
|
+ <if test="unableVerifyReason != null">unable_verify_reason = #{unableVerifyReason},</if>
|
|
|
+ <if test="scanId != null">scan_id = #{scanId},</if>
|
|
|
+ <if test="scanName != null">scan_name = #{scanName},</if>
|
|
|
+ <if test="scanTime != null">scan_time = #{scanTime},</if>
|
|
|
+ <if test="verifyPeopleId != null">verify_people_id = #{verifyPeopleId},</if>
|
|
|
+ <if test="verifyPeopleName != null">verify_people_name = #{verifyPeopleName},</if>
|
|
|
+ <if test="verifyTime != null">verify_time = #{verifyTime},</if>
|
|
|
+ <if test="evaluation != null">evaluation = #{evaluation},</if>
|
|
|
+ <if test="evaluationContent != null">evaluation_content = #{evaluationContent},</if>
|
|
|
+ <if test="evaluationTime != null">evaluation_time = #{evaluationTime},</if>
|
|
|
+ <if test="result != null">result = #{result},</if>
|
|
|
+ <if test="resultTime != null">result_time = #{resultTime},</if>
|
|
|
+ <if test="resultPersonId != null">result_person_id = #{resultPersonId},</if>
|
|
|
+ <if test="status != null">status = #{status},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
+ <if test="isLast != null">is_last = #{isLast},</if>
|
|
|
+ <if test="jobId != null">job_id = #{jobId},</if>
|
|
|
+ <if test="lastJobType != null">last_job_type = #{lastJobType},</if>
|
|
|
+ <if test="source != null">source = #{source},</if>
|
|
|
+ <if test="createMethod != null">create_method = #{createMethod},</if>
|
|
|
+ <if test="isCrossDept != null">is_cross_dept = #{isCrossDept},</if>
|
|
|
+ <if test="deviceId != null">device_id = #{deviceId},</if>
|
|
|
+ <if test="deviceName != null">device_name = #{deviceName},</if>
|
|
|
+ <if test="recordStatus != null">record_status = #{recordStatus},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
</update>
|
|
|
|
|
|
</mapper>
|