<?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.trs.ggzyexchange.mapper.GcPerformanceMapper">

    <select id="queryGcBidcandidateAllList" resultType="com.trs.ggzyexchange.entity.TenderDetailsVo">
        select
            gcpe.SOURCE_DATA_KEY sourceDataKey,
            gcp.PROJECT_CODE projectCode,
            gcp.PROJECT_NAME projectName,
            gcpe.TENDER_PROJECT_CODE tenderProjectCode,
            gcpe.CONTRACT_NAME noticeName,
            gcpe.PERFORM_INFO noticeContent,
            gcpe.COMMIT_TIME noticeSendTime,
            gct.REGION_CODE regionCode,
            gcp.INDUSTRIES_TYPE industriesTypeCode,
            gcpe.PLATFORM_CODE platformCode,
            gcpe.ACCEPTER bulletinDuty,
            gcpe.DATA_SOURCE_CODE dataSourceCode,
            gcpe.BID_SECTION_CODE bidSectionCodes,
            gcpe.CONTRACTSIGN_TIME docGetStartTime,
            gcpe.FINISH_TIME docGetEndTime
        from
            GC_PERFORMANCE gcpe
                left join GC_TENDERPROJECT gct
                          on gct.TENDER_PROJECT_CODE = gcpe.TENDER_PROJECT_CODE
                left join GC_PROJECT gcp
                          on gct.PROJECT_CODE = gcp.PROJECT_CODE

    </select>

    <select id="maxDataTimeStamp" resultType="java.lang.Long">
        select max(DATA_TIMESTAMP) from "ggzyexchange"."GC_PERFORMANCE";
    </select>


    <select id="queryGcBidcandidateAllListByTime" resultType="com.trs.ggzyexchange.entity.TenderDetailsVo">
        select
            gcpe.SOURCE_DATA_KEY sourceDataKey,
            gcp.PROJECT_CODE projectCode,
            gcp.PROJECT_NAME projectName,
            gcpe.TENDER_PROJECT_CODE tenderProjectCode,
            gcpe.CONTRACT_NAME noticeName,
            gcpe.PERFORM_INFO noticeContent,
            gcpe.COMMIT_TIME noticeSendTime,
            gct.REGION_CODE regionCode,
            gcp.INDUSTRIES_TYPE industriesTypeCode,
            gcpe.PLATFORM_CODE platformCode,
            gcpe.ACCEPTER bulletinDuty,
            gcpe.DATA_SOURCE_CODE dataSourceCode,
            gcpe.BID_SECTION_CODE bidSectionCodes,
            gcpe.CONTRACTSIGN_TIME docGetStartTime,
            gcpe.FINISH_TIME docGetEndTime
        from
            GC_PERFORMANCE gcpe
                left join GC_TENDERPROJECT gct
                          on gct.TENDER_PROJECT_CODE = gcpe.TENDER_PROJECT_CODE
                left join GC_PROJECT gcp
                          on gct.PROJECT_CODE = gcp.PROJECT_CODE
        where gcpe.DATA_TIMESTAMP &gt; #{time}
    </select>

</mapper>
