|
@@ -0,0 +1,321 @@
|
|
|
+<?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">
|
|
|
+<mapper namespace="com.sooka.sponest.lawenforcement.record.mapper.LawenforcementRecordMapper">
|
|
|
+
|
|
|
+ <resultMap type="LawenforcementRecord" id="LawenforcementRecordResult">
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <result property="jobType" column="job_type"/>
|
|
|
+ <result property="creatorId" column="creator_id"/>
|
|
|
+ <result property="creatorName" column="creator_name"/>
|
|
|
+ <result property="deptId" column="dept_id"/>
|
|
|
+ <result property="deptName" column="dept_name"/>
|
|
|
+ <result property="areaId" column="area_id"/>
|
|
|
+ <result property="jobName" column="job_name"/>
|
|
|
+ <result property="checkType" column="check_type"/>
|
|
|
+ <result property="checkObjectType" column="check_object_type"/>
|
|
|
+ <result property="checkObjectId" column="check_object_id"/>
|
|
|
+ <result property="checkObjectCode" column="check_object_code"/>
|
|
|
+ <result property="checkObjectName" column="check_object_name"/>
|
|
|
+ <result property="checkObjectPhone" column="check_object_phone"/>
|
|
|
+ <result property="checkStartTime" column="check_start_time"/>
|
|
|
+ <result property="checkEndTime" column="check_end_time"/>
|
|
|
+ <result property="subitemCount" column="subitem_count"/>
|
|
|
+ <result property="remark" column="remark"/>
|
|
|
+ <result property="verify" column="verify"/>
|
|
|
+ <result property="unableVerifyReason" column="unable_verify_reason"/>
|
|
|
+ <result property="scanId" column="scan_id"/>
|
|
|
+ <result property="scanName" column="scan_name"/>
|
|
|
+ <result property="scanTime" column="scan_time"/>
|
|
|
+ <result property="verifyPeopleId" column="verify_people_id"/>
|
|
|
+ <result property="verifyPeopleName" column="verify_people_name"/>
|
|
|
+ <result property="verifyTime" column="verify_time"/>
|
|
|
+ <result property="evaluation" column="evaluation"/>
|
|
|
+ <result property="evaluationContent" column="evaluation_content"/>
|
|
|
+ <result property="evaluationTime" column="evaluation_time"/>
|
|
|
+ <result property="result" column="result"/>
|
|
|
+ <result property="resultTime" column="result_time"/>
|
|
|
+ <result property="resultPersonId" column="result_person_id"/>
|
|
|
+ <result property="status" column="status"/>
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
+ <result property="createBy" column="create_by"/>
|
|
|
+ <result property="isLast" column="is_last"/>
|
|
|
+ <result property="jobId" column="job_id"/>
|
|
|
+ <result property="lastJobType" column="last_job_type"/>
|
|
|
+ <result property="source" column="source"/>
|
|
|
+ <result property="createMethod" column="create_method"/>
|
|
|
+ <result property="isCrossDept" column="is_cross_dept"/>
|
|
|
+ <result property="deviceId" column="device_id"/>
|
|
|
+ <result property="deviceName" column="device_name"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectLawenforcementRecordVo">
|
|
|
+ select id,
|
|
|
+ job_type,
|
|
|
+ creator_id,
|
|
|
+ creator_name,
|
|
|
+ dept_id,
|
|
|
+ dept_name,
|
|
|
+ area_id,
|
|
|
+ job_name,
|
|
|
+ check_type,
|
|
|
+ check_object_type,
|
|
|
+ check_object_id,
|
|
|
+ check_object_code,
|
|
|
+ check_object_name,
|
|
|
+ check_object_phone,
|
|
|
+ check_start_time,
|
|
|
+ check_end_time,
|
|
|
+ subitem_count,
|
|
|
+ remark,
|
|
|
+ verify,
|
|
|
+ unable_verify_reason,
|
|
|
+ scan_id,
|
|
|
+ scan_name,
|
|
|
+ scan_time,
|
|
|
+ verify_people_id,
|
|
|
+ verify_people_name,
|
|
|
+ verify_time,
|
|
|
+ evaluation,
|
|
|
+ evaluation_content,
|
|
|
+ evaluation_time,
|
|
|
+ result,
|
|
|
+ result_time,
|
|
|
+ result_person_id,
|
|
|
+ status,
|
|
|
+ create_time,
|
|
|
+ create_by,
|
|
|
+ is_last,
|
|
|
+ job_id,
|
|
|
+ last_job_type,
|
|
|
+ source,
|
|
|
+ create_method,
|
|
|
+ is_cross_dept,
|
|
|
+ device_id,
|
|
|
+ device_name
|
|
|
+ from lawenforcement_record
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectLawenforcementRecordList" parameterType="LawenforcementRecord"
|
|
|
+ resultMap="LawenforcementRecordResult">
|
|
|
+ <include refid="selectLawenforcementRecordVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="jobType != null and jobType != ''">and job_type = #{jobType}</if>
|
|
|
+ <if test="creatorId != null and creatorId != ''">and creator_id = #{creatorId}</if>
|
|
|
+ <if test="creatorName != null and creatorName != ''">and creator_name like concat('%', #{creatorName},
|
|
|
+ '%')
|
|
|
+ </if>
|
|
|
+ <if test="deptId != null and deptId != ''">and dept_id = #{deptId}</if>
|
|
|
+ <if test="deptName != null and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
|
|
|
+ <if test="areaId != null and areaId != ''">and area_id = #{areaId}</if>
|
|
|
+ <if test="jobName != null and jobName != ''">and job_name like concat('%', #{jobName}, '%')</if>
|
|
|
+ <if test="checkType != null and checkType != ''">and check_type = #{checkType}</if>
|
|
|
+ <if test="checkObjectType != null and checkObjectType != ''">and check_object_type = #{checkObjectType}
|
|
|
+ </if>
|
|
|
+ <if test="checkObjectId != null and checkObjectId != ''">and check_object_id = #{checkObjectId}</if>
|
|
|
+ <if test="checkObjectCode != null and checkObjectCode != ''">and check_object_code = #{checkObjectCode}
|
|
|
+ </if>
|
|
|
+ <if test="checkObjectName != null and checkObjectName != ''">and check_object_name like concat('%',
|
|
|
+ #{checkObjectName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="checkObjectPhone != null and checkObjectPhone != ''">and check_object_phone =
|
|
|
+ #{checkObjectPhone}
|
|
|
+ </if>
|
|
|
+ <if test="checkStartTime != null ">and check_start_time = #{checkStartTime}</if>
|
|
|
+ <if test="checkEndTime != null ">and check_end_time = #{checkEndTime}</if>
|
|
|
+ <if test="subitemCount != null ">and subitem_count = #{subitemCount}</if>
|
|
|
+ <if test="verify != null and verify != ''">and verify = #{verify}</if>
|
|
|
+ <if test="unableVerifyReason != null and unableVerifyReason != ''">and unable_verify_reason =
|
|
|
+ #{unableVerifyReason}
|
|
|
+ </if>
|
|
|
+ <if test="scanId != null and scanId != ''">and scan_id = #{scanId}</if>
|
|
|
+ <if test="scanName != null and scanName != ''">and scan_name like concat('%', #{scanName}, '%')</if>
|
|
|
+ <if test="scanTime != null and scanTime != ''">and scan_time = #{scanTime}</if>
|
|
|
+ <if test="verifyPeopleId != null and verifyPeopleId != ''">and verify_people_id = #{verifyPeopleId}</if>
|
|
|
+ <if test="verifyPeopleName != null and verifyPeopleName != ''">and verify_people_name like concat('%',
|
|
|
+ #{verifyPeopleName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="verifyTime != null and verifyTime != ''">and verify_time = #{verifyTime}</if>
|
|
|
+ <if test="evaluation != null and evaluation != ''">and evaluation = #{evaluation}</if>
|
|
|
+ <if test="evaluationContent != null and evaluationContent != ''">and evaluation_content =
|
|
|
+ #{evaluationContent}
|
|
|
+ </if>
|
|
|
+ <if test="evaluationTime != null and evaluationTime != ''">and evaluation_time = #{evaluationTime}</if>
|
|
|
+ <if test="result != null and result != ''">and result = #{result}</if>
|
|
|
+ <if test="resultTime != null and resultTime != ''">and result_time = #{resultTime}</if>
|
|
|
+ <if test="resultPersonId != null and resultPersonId != ''">and result_person_id = #{resultPersonId}</if>
|
|
|
+ <if test="status != null and status != ''">and status = #{status}</if>
|
|
|
+ <if test="isLast != null ">and is_last = #{isLast}</if>
|
|
|
+ <if test="jobId != null and jobId != ''">and job_id = #{jobId}</if>
|
|
|
+ <if test="lastJobType != null and lastJobType != ''">and last_job_type = #{lastJobType}</if>
|
|
|
+ <if test="source != null and source != ''">and source = #{source}</if>
|
|
|
+ <if test="createMethod != null ">and create_method = #{createMethod}</if>
|
|
|
+ <if test="isCrossDept != null ">and is_cross_dept = #{isCrossDept}</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>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectLawenforcementRecordById" parameterType="String" resultMap="LawenforcementRecordResult">
|
|
|
+ <include refid="selectLawenforcementRecordVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertLawenforcementRecord" parameterType="LawenforcementRecord">
|
|
|
+ insert into lawenforcement_record
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">id,</if>
|
|
|
+ <if test="jobType != null">job_type,</if>
|
|
|
+ <if test="creatorId != null">creator_id,</if>
|
|
|
+ <if test="creatorName != null">creator_name,</if>
|
|
|
+ <if test="deptId != null">dept_id,</if>
|
|
|
+ <if test="deptName != null">dept_name,</if>
|
|
|
+ <if test="areaId != null">area_id,</if>
|
|
|
+ <if test="jobName != null">job_name,</if>
|
|
|
+ <if test="checkType != null">check_type,</if>
|
|
|
+ <if test="checkObjectType != null">check_object_type,</if>
|
|
|
+ <if test="checkObjectId != null">check_object_id,</if>
|
|
|
+ <if test="checkObjectCode != null">check_object_code,</if>
|
|
|
+ <if test="checkObjectName != null">check_object_name,</if>
|
|
|
+ <if test="checkObjectPhone != null">check_object_phone,</if>
|
|
|
+ <if test="checkStartTime != null">check_start_time,</if>
|
|
|
+ <if test="checkEndTime != null">check_end_time,</if>
|
|
|
+ <if test="subitemCount != null">subitem_count,</if>
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
+ <if test="verify != null">verify,</if>
|
|
|
+ <if test="unableVerifyReason != null">unable_verify_reason,</if>
|
|
|
+ <if test="scanId != null">scan_id,</if>
|
|
|
+ <if test="scanName != null">scan_name,</if>
|
|
|
+ <if test="scanTime != null">scan_time,</if>
|
|
|
+ <if test="verifyPeopleId != null">verify_people_id,</if>
|
|
|
+ <if test="verifyPeopleName != null">verify_people_name,</if>
|
|
|
+ <if test="verifyTime != null">verify_time,</if>
|
|
|
+ <if test="evaluation != null">evaluation,</if>
|
|
|
+ <if test="evaluationContent != null">evaluation_content,</if>
|
|
|
+ <if test="evaluationTime != null">evaluation_time,</if>
|
|
|
+ <if test="result != null">result,</if>
|
|
|
+ <if test="resultTime != null">result_time,</if>
|
|
|
+ <if test="resultPersonId != null">result_person_id,</if>
|
|
|
+ <if test="status != null">status,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="isLast != null">is_last,</if>
|
|
|
+ <if test="jobId != null">job_id,</if>
|
|
|
+ <if test="lastJobType != null">last_job_type,</if>
|
|
|
+ <if test="source != null">source,</if>
|
|
|
+ <if test="createMethod != null">create_method,</if>
|
|
|
+ <if test="isCrossDept != null">is_cross_dept,</if>
|
|
|
+ <if test="deviceId != null">device_id,</if>
|
|
|
+ <if test="deviceName != null">device_name,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">#{id},</if>
|
|
|
+ <if test="jobType != null">#{jobType},</if>
|
|
|
+ <if test="creatorId != null">#{creatorId},</if>
|
|
|
+ <if test="creatorName != null">#{creatorName},</if>
|
|
|
+ <if test="deptId != null">#{deptId},</if>
|
|
|
+ <if test="deptName != null">#{deptName},</if>
|
|
|
+ <if test="areaId != null">#{areaId},</if>
|
|
|
+ <if test="jobName != null">#{jobName},</if>
|
|
|
+ <if test="checkType != null">#{checkType},</if>
|
|
|
+ <if test="checkObjectType != null">#{checkObjectType},</if>
|
|
|
+ <if test="checkObjectId != null">#{checkObjectId},</if>
|
|
|
+ <if test="checkObjectCode != null">#{checkObjectCode},</if>
|
|
|
+ <if test="checkObjectName != null">#{checkObjectName},</if>
|
|
|
+ <if test="checkObjectPhone != null">#{checkObjectPhone},</if>
|
|
|
+ <if test="checkStartTime != null">#{checkStartTime},</if>
|
|
|
+ <if test="checkEndTime != null">#{checkEndTime},</if>
|
|
|
+ <if test="subitemCount != null">#{subitemCount},</if>
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
+ <if test="verify != null">#{verify},</if>
|
|
|
+ <if test="unableVerifyReason != null">#{unableVerifyReason},</if>
|
|
|
+ <if test="scanId != null">#{scanId},</if>
|
|
|
+ <if test="scanName != null">#{scanName},</if>
|
|
|
+ <if test="scanTime != null">#{scanTime},</if>
|
|
|
+ <if test="verifyPeopleId != null">#{verifyPeopleId},</if>
|
|
|
+ <if test="verifyPeopleName != null">#{verifyPeopleName},</if>
|
|
|
+ <if test="verifyTime != null">#{verifyTime},</if>
|
|
|
+ <if test="evaluation != null">#{evaluation},</if>
|
|
|
+ <if test="evaluationContent != null">#{evaluationContent},</if>
|
|
|
+ <if test="evaluationTime != null">#{evaluationTime},</if>
|
|
|
+ <if test="result != null">#{result},</if>
|
|
|
+ <if test="resultTime != null">#{resultTime},</if>
|
|
|
+ <if test="resultPersonId != null">#{resultPersonId},</if>
|
|
|
+ <if test="status != null">#{status},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="isLast != null">#{isLast},</if>
|
|
|
+ <if test="jobId != null">#{jobId},</if>
|
|
|
+ <if test="lastJobType != null">#{lastJobType},</if>
|
|
|
+ <if test="source != null">#{source},</if>
|
|
|
+ <if test="createMethod != null">#{createMethod},</if>
|
|
|
+ <if test="isCrossDept != null">#{isCrossDept},</if>
|
|
|
+ <if test="deviceId != null">#{deviceId},</if>
|
|
|
+ <if test="deviceName != null">#{deviceName},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <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>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteLawenforcementRecordById" parameterType="String">
|
|
|
+ delete
|
|
|
+ from lawenforcement_record
|
|
|
+ where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteLawenforcementRecordByIds" parameterType="String">
|
|
|
+ delete from lawenforcement_record where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|