<?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.xrtygis.custom.mapper.ImportAboutMapper">

    <select id="existDate" resultType="long">
        select ID from ${table}
        <where>
            <if test="mark == 0">
                MARK = #{mark}
                and to_char(up_date,'yyyy-mm-dd') = to_char(#{date},'yyyy-mm-dd')
            </if>
            <if test="mark == 1">
                and mark = #{mark}
                and to_char(up_date,'yyyy-mm') = to_char(#{date},'yyyy-mm')
            </if>
        </where>

    </select>

    <select id="viewPrice" resultType="com.tofly.xrtygis.entity.Costrlprice">
        select pacdj,
               yldj,
               pam_zsdj,
               pam_wndj,
               ftdj,
               cndj,
               gmsjfhydj,
               sydj,
               dlddj_one,
               dlddj_two,
               wnzydj,
               ysfdj,
               szysdj,
               bcsdj,
               pac2dj,
               qbjzgdj,
               otherdj,
               jbdldj_one,
               jbdldj_two
        from TF_YWPN_COSTRLPRICE_W
        where YEAR = #{year}
            and isnew = '1'
    </select>

</mapper>