<?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="org.springblade.modules.project.mapper.ProjectInvestPlanMapper">

    <select id="getYearAllProject" resultType="org.springblade.modules.project.pojo.vo.ProjectInvestPlanVO2">
        select *,
               (select duty_unit from d_project_info dpi where dpi.id = dpip.project_id) as dutyUnit,
               (select project_type from d_project_info dpi where dpi.id = dpip.project_id) as projectType,
               (select name from d_project_info dpi where dpi.id = dpip.project_id) as name
        from d_project_invest_plan dpip
        where is_deleted = 0 and plan_year = #{year}
    </select>
</mapper>
