<?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.boman.web.core.mapper.TSampling514Mapper">

    <resultMap type="com.boman.web.core.domain.TSampling514" id="TSampling514Result">
        <result property="oid" column="oid"/>
        <result property="name" column="name"/>
        <result property="idCard" column="id_card"/>
        <result property="tel" column="address"/>
        <result property="collectOid" column="collect_oid"/>
        <result property="collectTime" column="collect_time"/>
        <result property="verifyOid" column="verify_oid"/>
        <result property="verifyFinishTime" column="verify_finish_time"/>
        <result property="verifyResult" column="verify_result"/>
        <result property="mixOid" column="mix_oid"/>
        <result property="type" column="type"/>
        <result property="objectDistrictOid" column="object_district_oid"/>
        <result property="objectDistrictName" column="object_district_name"/>
        <result property="objectAddress" column="object_address"/>
        <result property="createDate" column="create_date"/>
        <result property="modifyDate" column="modify_date"/>
        <result property="source" column="source"/>
        <result property="batchNumber" column="batch_number"/>
        <result property="collectorName" column="collector_name"/>
        <result property="useFlag" column="use_flag"/>
        <result property="verifyPointName" column="verify_point_name"/>
        <result property="certificateNoType" column="certificate_no_type"/>
        <result property="focusPerson" column="focus_person"/>
        <result property="fromCity" column="from_city"/>
        <result property="toCity" column="to_city"/>
        <result property="address" column="address"/>
        <result property="transit" column="transit"/>
    </resultMap>

    <select id="getTSampling514AllData" resultMap="TSampling514Result">
        select id_card,collect_time from t_sampling_514
        where str_to_date(collect_time,'%Y-%m-%d %H:%i:%S') >= #{startTime}
        and #{endTime} > str_to_date(collect_time,'%Y-%m-%d %H:%i:%S')
    </select>

    <select id="getTSampling514AllDataNoTime" resultMap="TSampling514Result">
        select id_card,collect_time FROM t_sampling_514 WHERe collect_time is not true;
    </select>


</mapper>