<?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.tofly.gpsboot.mapper.plan.PlantypeMapper">

    <resultMap id="plantypeMap" type="com.tofly.pojo.plan.Plantype">
        <id property="id" column="ID"/>
        <result property="planId" column="PLAN_ID"/>
        <result property="typeId" column="TYPE_ID"/>
        <result property="completionRate" column="COMPLETION_RATE"/>
        <result property="percentRate" column="PERCENT_RATE"/>
        <result property="overCount" column="OVER_COUNT"/>
        <result property="totalCount" column="TOTAL_COUNT"/>
        <result property="overLength" column="OVER_LENGTH"/>
        <result property="totalLength" column="TOTAL_LENGTH"/>
        <result property="leakageRate" column="LEAKAGE_RATE"/>
        <association property="typeName" column="TYPE_ID" select="getInspectTypeName"/>
    </resultMap>
    <select id="getInspectTypeName" resultType="string">
        select name from TF_YWPN_INSPECTTYPE_W where ID = #{id}
    </select>
</mapper>
