
    <insert id="insertTrafficLoc" parameterType="com.utic.center.utic.traf.server.dto.LinkTrafAsnTimeDto">
        <![CDATA[
        INSERT /*+ APPEND PARALLEL(TMP_TRAFFIC_LOC 4) */ INTO TMP_TRAFFIC_LOC(LOGDATE, CENTERID, LINKID, LOCALDATE, SPEED)
        SELECT TO_DATE(#{obj.currTime}, 'YYYYMMDDHH24MISS')         AS LOGDATE,
               FROMCENTERID                                         AS CENTERID,
               SUBSTR(MAXDATA, 18, 10)                              AS LINKID,
               TO_DATE(SUBSTR(MAXDATA, 28, 14), 'YYYYMMDDHH24MISS') AS LOCALDATE,
               TO_NUMBER(SUBSTR(MAXDATA, 43, 4))                    AS SPEED
        FROM (
                 SELECT FROMCENTERID,
                        MAX(TO_CHAR(LOGDATE, 'YYYYMMDDHH24MISS')||FROMCENTERID||TO_CHAR(LINKNUMBER)||TO_CHAR(REGDATE, 'YYYYMMDDHH24MISS')||TO_CHAR(SPEEDRATE, '0000')) MAXDATA
                 FROM RCV_LINK_TRAFFIC@ASNDB
                 WHERE LOGDATE  > TO_DATE(#{obj.past10MinTime}, 'YYYYMMDDHH24MISS')
                   AND LOGDATE <= TO_DATE(#{obj.currTime}, 'YYYYMMDDHH24MISS')
                   AND FROMCENTERID IN
                     <foreach item="centerId" collection="obj.inCenterIds" open="("  close=")" separator=",">
                     #{centerId}
                     </foreach>
                   AND LINKNUMBER > '1000000000'
                   AND LINKNUMBER < '4210000000'
                 GROUP BY FROMCENTERID, LINKNUMBER
             )
        ]]>
    </insert>
