| | |
| | | LEFT JOIN YWXT."att_ad_base" city ON city."ad_code" = county."p_ad_code" |
| | | LEFT JOIN YWXT."att_ad_base" province ON province."ad_code" = city."p_ad_code" |
| | | </sql> |
| | | <update id="updateallcheck"> |
| | | update SJZT_MD."tb_project" set set "is_fill" ='', "check_state" =''; |
| | | </update> |
| | | <update id="updateFill"> |
| | | update SJZT_MD."tb_project_fill" set "isFil" = #{params.isFil}, "start_time" = #{params.stratTime},"end_time"= #{params.endTime} |
| | | </update> |
| | | |
| | | <select id="getList" resultType="cn.gistack.sm.sjztmd.vo.TbProjectVO"> |
| | | |
| | |
| | | <if test="vo.isGovPurchase != null and vo.isGovPurchase != ''"> |
| | | and tb."is_gov_purchase" = #{vo.isGovPurchase} |
| | | </if> |
| | | <if test="vo.contractDate != null and vo.contractDate != ''"> |
| | | and tb."contract_date" = #{vo.contractDate} |
| | | <if test="vo.contractDateQuery != null and vo.contractDateQuery != ''"> |
| | | and tb."contract_date" = #{vo.contractDateQuery} |
| | | </if> |
| | | <if test="vo.startTime!=null and vo.startTime!=''"> |
| | | and tb."check_date">= #{vo.startTime} |
| | |
| | | <if test="vo.endTime!=null and vo.endTime!=''"> |
| | | and tb."check_date" <= #{vo.endTime} |
| | | </if> |
| | | order by city_code,county_code asc |
| | | order by CAST(city_code AS number) asc,CAST(county_code AS number) asc,CAST(guid AS number) desc |
| | | </select> |
| | | |
| | | <resultMap id="dto" type="cn.gistack.sm.sjztmd.dto.TbProjectDTO"> |
| | |
| | | <result property="cityName" column="city_name"/> |
| | | <result property="countyCode" column="county_code"/> |
| | | <result property="countyName" column="county_name"/> |
| | | |
| | | <result property="other" column="other"/> |
| | | <result property="centerFund" column="center_fund"/> |
| | | <result property="localFund" column="local_fund"/> |
| | | <result property="isEstablishPlan" column="is_establish_plan"/> |
| | |
| | | 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" and a."check_state" = 3 |
| | | </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 |
| | | <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" and a."check_state" = 3 |
| | | 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" and a."check_state" = 3 |
| | | 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" and a."check_state" = 3 |
| | | 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> |
| | | <select id="getfill" resultType="cn.gistack.sm.sjztmd.vo.TbProjectIsfillVO"> |
| | | select "isFil","end_time" endTime, "start_time" stratTime from SJZT_MD."tb_project_fill" |
| | | </select> |
| | | </mapper> |