<?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.unis.crk.cplbusiness.mapper.DispatcPersonnelManagementMapper">

        <!-- 通用查询映射结果 -->
        <resultMap id="BaseResultMap" type="com.unis.crk.cplbusiness.entity.DispatcPersonnelManagement">
                    <id column="dataId" property="dataId" />
                    <result column="unitid" property="unitid" />
                    <result column="builder" property="builder" />
                    <result column="builderDate" property="builderDate" />
                    <result column="editor" property="editor" />
                    <result column="modifyDate" property="modifyDate" />
                    <result column="updateTime" property="updateTime" />
                    <result column="person_name" property="personName" />
                    <result column="sex" property="sex" />
                    <result column="nation" property="nation" />
                    <result column="health" property="health" />
                    <result column="date_of_birth" property="dateOfBirth" />
                    <result column="age" property="age" />
                    <result column="native_place" property="nativePlace" />
                    <result column="degree_of_education" property="degreeOfEducation" />
                    <result column="id_number" property="idNumber" />
                    <result column="contact_number" property="contactNumber" />
                    <result column="contact_address" property="contactAddress" />
                    <result column="license_type" property="licenseType" />
                    <result column="drivers_license_number" property="driversLicenseNumber" />
                    <result column="Initial_collection_time" property="initialCollectionTime" />
                    <result column="quasi_driving" property="quasiDriving" />
                    <result column="river_photos" property="riverPhotos" />
        </resultMap>

    <select id="getPerData" resultType="java.util.Map">
        SELECT *   FROM  dispatc_personnel_management
        <if test="ew.sqlSegment != null and ew.sqlSegment != ''">
            where  ${ew.sqlSegment}
        </if>
    </select>
    <select id="selectMyMapsPage" resultType="java.util.Map">
        SELECT
               dataId,
               person_name,
               sex,
               id_number,
               date_of_birth,
               contact_address,
               drivers_license_number,
               contact_number
        FROM  dispatc_personnel_management
        <if test="ew.sqlSegment != null and ew.sqlSegment != ''">
            where  ${ew.sqlSegment}
        </if>
        ORDER BY
        builderDate DESC
    </select>
</mapper>
