| | |
| | | SELECT |
| | | aab."guid" adCode, |
| | | aab."ad_name" adName, |
| | | aab."ad_grad" AS adGrad, |
| | | paab."guid" padCode, |
| | | paab."ad_name" padName, |
| | | tps.curMonthActualFund, |
| | |
| | | and "tb_year" = #{params.tbYear} |
| | | </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 |
| | | 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> |
| | | ) b ON a."guid" = b."tb_project_id" |
| | | </select> |
| | | <select id="getStatisticsPies" 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 |
| | | 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> |
| | | ) 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" ) |
| | | WHERE |
| | | c."guid" = #{params.adCode} |
| | | </select> |
| | | <select id="getStatisticsPieBar" resultType="cn.gistack.sm.sjztmd.vo.StatisticsPriceVO"> |
| | | SELECT |
| | | c."ad_code" adCode, |
| | | c."ad_name" adName, |
| | | |
| | | 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> |
| | | ) 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} |
| | | GROUP BY |
| | | c."ad_code" , |
| | | c."ad_name" |
| | | </select> |
| | | <select id="getStatisticsPieBars" resultType="cn.gistack.sm.sjztmd.vo.StatisticsPriceVO"> |
| | | SELECT |
| | | b."ad_name" adName, |
| | | b."ad_code" adCode, |
| | | a.sumPrice sumPrice, |
| | | a.noPay noPay, |
| | | a.sumPay sumPay |
| | | FROM |
| | | ( |
| | | SELECT |
| | | a."county_code", |
| | | a."county_name", |
| | | a."city_code", |
| | | 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> |
| | | ) b ON a."guid" = b."tb_project_id" |
| | | GROUP BY |
| | | a."county_code", |
| | | a."county_name", |
| | | a."city_code" |
| | | ) a |
| | | RIGHT JOIN YWXT."att_ad_base" b ON ( b."guid" = a."city_code" ) |
| | | OR ( b."guid" = a."county_code" ) |
| | | WHERE |
| | | b."p_ad_code" = #{params.adCode} |
| | | </select> |
| | | </mapper> |