<?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.pmProjectInfo.mapper.PmProjectInfoMapper">

    <select id="selectMyPage"
            resultType="com.unis.projectManagement.modular.pmProjectInfo.vo.PmProjectInfoPageVO">
        SELECT
        t1.id,
        t2.project_name,
        t2.project_code,
        t2.project_type,
        t2.project_legal_unit,
        t1.actual_start_time,
        t1.actual_end_time,
        t1.funds_invested,
        t1.expenditure_situation
        FROM
        biz_pm_project_info t1
        LEFT JOIN biz_pm_application t2 ON t1.pm_application_id = t2.id
        <where>
            <if test="projectType!=null">
                and t2.project_type=#{projectType}
            </if>
        <if test="projectName!=null and projectName!=''">
            and t2.project_name like concat("%",#{projectName},"%")
        </if>
        </where>
    </select>
</mapper>