<?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.unis.projectManagement.modular.pmPerformance.mapper.PmPerformanceMapper">
    <select id="pageList" parameterType="com.baomidou.mybatisplus.core.conditions.Wrapper" resultType="com.unis.projectManagement.modular.pmPerformance.entity.PmPerformance">
        SELECT
            bpp.*,
            bpa.project_code projectCode,
            bpb.id budgetId,
            bpb.pm_project_info_id pmProjectInfoId,
            bpb.pm_application_id pmApplicationId,
            bpa.project_name projectName,
            bpb.leading_department leadingDepartment,
            bpb.applicant applicant,
            bpb.reviewer reviewer,
            bpb.construction_period constructionPeriod,
            bpb.funds_scale fundsScale,
            bpb.declaration_time declarationTime,
            bpb.performance_standard performanceStandard,
            bpb.construction_content_summary constructionContentSummary,
            bpb.proposal_design_or_construction_scheme proposalDesignOrConstructionScheme,
            bpb.remark remark
        FROM
            biz_pm_performance bpp
        LEFT JOIN biz_pm_budget bpb ON bpp.pm_budget_id = bpb.id
        LEFT JOIN biz_pm_application bpa ON bpb.pm_application_id = bpa.id
        ${ew.customSqlSegment}
    </select>
    <select id="getProjectNameList" resultType="map">
        SELECT
            bpa.id pmApplicationId,
            bpa.project_code projectCode,
            bpa.project_name projectName,
            bpb.id budgetId
        FROM
            biz_pm_budget bpb
        LEFT JOIN biz_pm_application bpa ON bpb.pm_application_id = bpa.id
        WHERE
            bpb. STATUS = 3
    </select>
</mapper>