xieb
2024-10-15 8535de06bea9270bfb30ecaf836b5cfec6796b42
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/mapper/TbProjectMapper.xml
@@ -367,24 +367,26 @@
        </if>
    </select>
    <select id="getStatisticsPie" resultType="cn.gistack.sm.sjztmd.vo.StatisticsPrice">
        SELECT
   sum(
   NVL ( a."center_fund", 0 )+ NVL ( a."local_fund", 0 )) AS sumPrice,
   sum(
   NVL ( b."actual_fund", 0 )) sumPay,
   sum(
      NVL ( a."center_fund", 0 )+ NVL ( a."local_fund", 0 ))- sum(
   NVL ( b."actual_fund", 0 )) noPay
FROM
    SELECT
        sum(
        NVL ( a."center_fund", 0 )+ NVL ( a."local_fund", 0 )) AS sumPrice,
        sum(
        NVL ( b."actual_fund", 0 )) sumPay,
        sum(
            NVL ( a."center_fund", 0 )+ NVL ( a."local_fund", 0 ))- sum(
        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"
    </select>
    <select id="getStatisticsPies" resultType="cn.gistack.sm.sjztmd.vo.StatisticsPrice">