xieb
2024-10-16 e3c0736a4bd1f93dbdf3a70c15eda98aff0ebebf
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/mapper/TbProjectMapper.xml
@@ -48,10 +48,21 @@
    <select id="getList" resultType="cn.gistack.sm.sjztmd.vo.TbProjectVO">
        SELECT
            *
            tb.*,b."actual_fund"
        FROM SJZT_MD."tb_project" tb
        left join (
            SELECT "tb_project_id",sum("actual_fund") as "actual_fund" from SJZT_MD."tb_project_schedule"
            <if test="vo.tbYear != null and vo.tbYear != ''">
                where "year" = #{vo.tbYear}
            </if>
            group by "tb_project_id"
        ) b
        on (tb."guid" = b."tb_project_id")
        where
            tb."is_deleted" = 0
        <if test="vo.tbYear != null and vo.tbYear != ''">
            and tb."tb_year" = #{vo.tbYear}
        </if>
        <if test="vo.cityCode != null and vo.cityCode != ''">
            and tb."city_code" = #{vo.cityCode}
        </if>