xieb
2024-10-16 f321a3efb62601c0382626bfc25f1d137f9f10ed
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/mapper/TbProjectMapper.xml
@@ -411,7 +411,8 @@
   NVL ( b."actual_fund", 0 )) noPay
FROM
   sjzt_md."tb_project" a
   LEFT JOIN ( SELECT * FROM sjzt_md."tb_project_schedule"
   LEFT JOIN (
        SELECT "tb_project_id",sum("actual_fund") "actual_fund" FROM sjzt_md."tb_project_schedule"
        WHERE 1=1
        <if test="params.tbYear != null and params.tbYear !=''">
            AND  "year" = #{params.tbYear}
@@ -419,6 +420,7 @@
        <if test="params.tbMonth != null and params.tbMonth !=''">
            AND "month" = #{params.tbMonth}
        </if>
        group by "tb_project_id"
        ) b ON a."guid" = b."tb_project_id"
   LEFT JOIN YWXT."att_ad_base" c ON ( a."city_code" = c."guid" )
   OR ( a."county_code" = c."guid" )
@@ -439,14 +441,16 @@
      NVL ( b."actual_fund", 0 )) noPay
   FROM
      sjzt_md."tb_project" a
      LEFT JOIN  ( SELECT * FROM sjzt_md."tb_project_schedule"
        WHERE 1=1
        <if test="params.tbYear != null and params.tbYear !=''">
            AND  "year" = #{params.tbYear}
        </if>
        <if test="params.tbMonth != null and params.tbMonth !=''">
            AND "month" = #{params.tbMonth}
        </if>
      LEFT JOIN  (
            SELECT "tb_project_id",sum("actual_fund") "actual_fund" FROM sjzt_md."tb_project_schedule"
            WHERE 1=1
            <if test="params.tbYear != null and params.tbYear !=''">
                AND  "year" = #{params.tbYear}
            </if>
            <if test="params.tbMonth != null and params.tbMonth !=''">
                AND "month" = #{params.tbMonth}
            </if>
            group by "tb_project_id"
        ) b ON a."guid" = b."tb_project_id"
      RIGHT JOIN YWXT."att_ad_base" c on c."ad_code" = a."city_code"
      where c."p_ad_code" = #{params.adCode}
@@ -476,14 +480,16 @@
      NVL ( b."actual_fund", 0 )) noPay
   FROM
      sjzt_md."tb_project" a
      LEFT JOIN ( SELECT * FROM sjzt_md."tb_project_schedule"
        WHERE  1=1
        <if test="params.tbYear != null and params.tbYear !=''">
            AND  "year" = #{params.tbYear}
        </if>
        <if test="params.tbMonth != null and params.tbMonth !=''">
            AND "month" = #{params.tbMonth}
        </if>
      LEFT JOIN (
            SELECT "tb_project_id",sum("actual_fund") "actual_fund" FROM sjzt_md."tb_project_schedule"
            WHERE  1=1
            <if test="params.tbYear != null and params.tbYear !=''">
                AND  "year" = #{params.tbYear}
            </if>
            <if test="params.tbMonth != null and params.tbMonth !=''">
                AND "month" = #{params.tbMonth}
            </if>
            group by "tb_project_id"
        ) b ON a."guid" = b."tb_project_id"
   GROUP BY
      a."county_code",