|
@@ -35,20 +35,20 @@
|
|
<select id="selectFundsUsageSummary" resultType="java.util.HashMap">
|
|
<select id="selectFundsUsageSummary" resultType="java.util.HashMap">
|
|
select *from (
|
|
select *from (
|
|
select zz.DZZDM PARTYCODE,zz.DZZMC,
|
|
select zz.DZZDM PARTYCODE,zz.DZZMC,
|
|
- ut.奖励经费 奖励经费,ut.活动经费 活动经费,ut.总预算 总预算,
|
|
|
|
- ur.奖励支出/10000 奖励支出,ur.活动支出/10000 活动支出,ur.总支出/10000 总支出,
|
|
|
|
- case ur.总支出 when 0 then '0.00' ELSE round((ur.奖励支出/ur.总支出),4)*100 END 奖励支出占比,
|
|
|
|
|
|
+ ut.双创经费 双创经费,ut.活动经费 活动经费,ut.总预算 总预算,
|
|
|
|
+ ur.双创支出/10000 双创支出,ur.活动支出/10000 活动支出,ur.总支出/10000 总支出,
|
|
|
|
+ case ur.总支出 when 0 then '0.00' ELSE round((ur.双创支出/ur.总支出),4)*100 END 双创支出占比,
|
|
case ur.总支出 when 0 then '0.00' ELSE round((ur.活动支出/ur.总支出),4)*100 END 活动支出占比
|
|
case ur.总支出 when 0 then '0.00' ELSE round((ur.活动支出/ur.总支出),4)*100 END 活动支出占比
|
|
from ZZ_ZZQKXX zz
|
|
from ZZ_ZZQKXX zz
|
|
inner join ZZ_ZZQKXXFB fb on zz.DZZDM=fb.DZZDM
|
|
inner join ZZ_ZZQKXXFB fb on zz.DZZDM=fb.DZZDM
|
|
left join (
|
|
left join (
|
|
select z.DZZDM,
|
|
select z.DZZDM,
|
|
ifnull(sum(u.活动经费), 0) 活动经费,
|
|
ifnull(sum(u.活动经费), 0) 活动经费,
|
|
- ifnull(sum(u.奖励经费), 0) 奖励经费,
|
|
|
|
- (ifnull(sum(u.奖励经费), 0)+ ifnull(sum(u.活动经费), 0)) 总预算
|
|
|
|
|
|
+ ifnull(sum(u.双创经费), 0) 双创经费,
|
|
|
|
+ (ifnull(sum(u.双创经费), 0)+ ifnull(sum(u.活动经费), 0)) 总预算
|
|
from ZZ_ZZQKXX z
|
|
from ZZ_ZZQKXX z
|
|
left join(
|
|
left join(
|
|
- select PARTYCODE,sum(ifnull(ACTIVITYFUNDS, 0)) 活动经费,sum(ifnull(REWARDFUNDS, 0)) 奖励经费
|
|
|
|
|
|
+ select PARTYCODE,sum(ifnull(ACTIVITYFUNDS, 0)) 活动经费,sum(ifnull(REWARDFUNDS, 0)) 双创经费
|
|
from DJ_FUNDSBUDGET budget
|
|
from DJ_FUNDSBUDGET budget
|
|
where year = #{year}
|
|
where year = #{year}
|
|
group by budget.PARTYCODE
|
|
group by budget.PARTYCODE
|
|
@@ -58,13 +58,13 @@
|
|
left join (
|
|
left join (
|
|
select z.DZZDM,
|
|
select z.DZZDM,
|
|
ifnull(sum(u.活动经费),0) 活动支出,
|
|
ifnull(sum(u.活动经费),0) 活动支出,
|
|
- ifnull(sum(u.奖励经费),0) 奖励支出,
|
|
|
|
- (ifnull(sum(u.奖励经费),0)+ifnull(sum(u.活动经费),0)) 总支出
|
|
|
|
|
|
+ ifnull(sum(u.双创经费),0) 双创支出,
|
|
|
|
+ (ifnull(sum(u.双创经费),0)+ifnull(sum(u.活动经费),0)) 总支出
|
|
from ZZ_ZZQKXX z
|
|
from ZZ_ZZQKXX z
|
|
left join(
|
|
left join(
|
|
select PARTYCODE,
|
|
select PARTYCODE,
|
|
sum(case EXPENDSCOPE when 1 then EXPENDMONEY ELSE 0 END) as 活动经费,
|
|
sum(case EXPENDSCOPE when 1 then EXPENDMONEY ELSE 0 END) as 活动经费,
|
|
- sum(case EXPENDSCOPE when 2 then EXPENDMONEY ELSE 0 END) as 奖励经费
|
|
|
|
|
|
+ sum(case EXPENDSCOPE when 2 then EXPENDMONEY ELSE 0 END) as 双创经费
|
|
from DJ_FUNDSUSE
|
|
from DJ_FUNDSUSE
|
|
where extract(year from EXPENDTIME) = #{year}
|
|
where extract(year from EXPENDTIME) = #{year}
|
|
group by PARTYCODE
|
|
group by PARTYCODE
|
|
@@ -91,10 +91,10 @@
|
|
<!-- 党组织工作经费使用情况导出-->
|
|
<!-- 党组织工作经费使用情况导出-->
|
|
<select id="selectFundsUsageDetails" resultType="java.util.HashMap">
|
|
<select id="selectFundsUsageDetails" resultType="java.util.HashMap">
|
|
select zz.DZZDM PARTYCODE,zz.DZZMC,
|
|
select zz.DZZDM PARTYCODE,zz.DZZMC,
|
|
- ut.奖励经费 奖励经费,ut.活动经费 活动经费,ut.总预算 总预算,
|
|
|
|
- ur.*,(ur.奖励支出+ur.活动支出) 总支出,
|
|
|
|
- (CASE (ur.奖励支出+ur.活动支出) WHEN 0 THEN 0 ELSE round((ur.奖励支出/(ur.奖励支出+ur.活动支出)),2)*100 END) 奖励支出占比,
|
|
|
|
- (CASE (ur.奖励支出+ur.活动支出) WHEN 0 THEN 0 ELSE round((ur.活动支出/(ur.奖励支出+ur.活动支出)),2)*100 END) 活动支出占比,
|
|
|
|
|
|
+ ut.双创经费 双创经费,ut.活动经费 活动经费,ut.总预算 总预算,
|
|
|
|
+ ur.*,(ur.双创支出+ur.活动支出) 总支出,
|
|
|
|
+ (CASE (ur.双创支出+ur.活动支出) WHEN 0 THEN 0 ELSE round((ur.双创支出/(ur.双创支出+ur.活动支出)),2)*100 END) 双创支出占比,
|
|
|
|
+ (CASE (ur.双创支出+ur.活动支出) WHEN 0 THEN 0 ELSE round((ur.活动支出/(ur.双创支出+ur.活动支出)),2)*100 END) 活动支出占比,
|
|
(CASE ur.活动支出 WHEN 0 THEN 0 ELSE round((ur.学习教育活动/ur.活动支出),2)*100 END) 学习教育活动占比,
|
|
(CASE ur.活动支出 WHEN 0 THEN 0 ELSE round((ur.学习教育活动/ur.活动支出),2)*100 END) 学习教育活动占比,
|
|
(CASE ur.活动支出 WHEN 0 THEN 0 ELSE round((ur.党内主题活动/ur.活动支出),2)*100 END) 党内主题活动占比,
|
|
(CASE ur.活动支出 WHEN 0 THEN 0 ELSE round((ur.党内主题活动/ur.活动支出),2)*100 END) 党内主题活动占比,
|
|
(CASE ur.活动支出 WHEN 0 THEN 0 ELSE round((ur.宣传活动/ur.活动支出),2)*100 END) 宣传活动占比,
|
|
(CASE ur.活动支出 WHEN 0 THEN 0 ELSE round((ur.宣传活动/ur.活动支出),2)*100 END) 宣传活动占比,
|
|
@@ -103,21 +103,21 @@
|
|
(CASE ur.活动支出 WHEN 0 THEN 0 ELSE round((ur.走访慰问活动/ur.活动支出),2)*100 END) 走访慰问活动占比,
|
|
(CASE ur.活动支出 WHEN 0 THEN 0 ELSE round((ur.走访慰问活动/ur.活动支出),2)*100 END) 走访慰问活动占比,
|
|
(CASE ur.活动支出 WHEN 0 THEN 0 ELSE round((ur.设备设施/ur.活动支出),2)*100 END) 设备设施占比,
|
|
(CASE ur.活动支出 WHEN 0 THEN 0 ELSE round((ur.设备设施/ur.活动支出),2)*100 END) 设备设施占比,
|
|
(CASE ur.活动支出 WHEN 0 THEN 0 ELSE round((ur.其他/ur.活动支出),2)*100 END) 其他占比,
|
|
(CASE ur.活动支出 WHEN 0 THEN 0 ELSE round((ur.其他/ur.活动支出),2)*100 END) 其他占比,
|
|
- (CASE ur.奖励支出 WHEN 0 THEN 0 ELSE round((ur.综合考评奖励/ur.奖励支出),2)*100 END) 综合考评奖励占比,
|
|
|
|
- (CASE ur.奖励支出 WHEN 0 THEN 0 ELSE round((ur.七一表彰奖励/ur.奖励支出),2)*100 END) 七一表彰奖励占比,
|
|
|
|
- (CASE ur.奖励支出 WHEN 0 THEN 0 ELSE round((ur.创岗建区表彰奖励/ur.奖励支出),2)*100 END) 创岗建区表彰奖励占比,
|
|
|
|
- (CASE ur.奖励支出 WHEN 0 THEN 0 ELSE round((ur.党建工作成果奖励/ur.奖励支出),2)*100 END) 党建工作成果奖励占比,
|
|
|
|
- (CASE ur.奖励支出 WHEN 0 THEN 0 ELSE round((ur.主题竞赛活动奖励/ur.奖励支出),2)*100 END) 主题竞赛活动奖励占比
|
|
|
|
|
|
+ (CASE ur.双创支出 WHEN 0 THEN 0 ELSE round((ur.培训党员/ur.双创支出),2)*100 END) 培训党员占比,
|
|
|
|
+ (CASE ur.双创支出 WHEN 0 THEN 0 ELSE round((ur.订阅或购买用于开展党员教育的报刊/ur.双创支出),2)*100 END) 订阅或购买用于开展党员教育的报刊占比,
|
|
|
|
+ (CASE ur.双创支出 WHEN 0 THEN 0 ELSE round((ur.资料/ur.双创支出),2)*100 END) 资料占比,
|
|
|
|
+ (CASE ur.双创支出 WHEN 0 THEN 0 ELSE round((ur.音像制品和设备/ur.双创支出),2)*100 END) 音像制品和设备占比,
|
|
|
|
+ (CASE ur.双创支出 WHEN 0 THEN 0 ELSE round((ur.补助生活困难的党员/ur.双创支出),2)*100 END) 补助生活困难的党员占比
|
|
from ZZ_ZZQKXX zz
|
|
from ZZ_ZZQKXX zz
|
|
inner join ZZ_ZZQKXXFB fb on zz.DZZDM=fb.DZZDM
|
|
inner join ZZ_ZZQKXXFB fb on zz.DZZDM=fb.DZZDM
|
|
left join (
|
|
left join (
|
|
select z.DZZDM,
|
|
select z.DZZDM,
|
|
ifnull(sum(u.活动经费), 0) 活动经费,
|
|
ifnull(sum(u.活动经费), 0) 活动经费,
|
|
- ifnull(sum(u.奖励经费), 0) 奖励经费,
|
|
|
|
- (ifnull(sum(u.奖励经费), 0)+ ifnull(sum(u.活动经费), 0)) 总预算
|
|
|
|
|
|
+ ifnull(sum(u.双创经费), 0) 双创经费,
|
|
|
|
+ (ifnull(sum(u.双创经费), 0)+ ifnull(sum(u.活动经费), 0)) 总预算
|
|
from ZZ_ZZQKXX z
|
|
from ZZ_ZZQKXX z
|
|
left join(
|
|
left join(
|
|
- select PARTYCODE,sum(ifnull(ACTIVITYFUNDS, 0)) 活动经费,sum(ifnull(REWARDFUNDS, 0)) 奖励经费
|
|
|
|
|
|
+ select PARTYCODE,sum(ifnull(ACTIVITYFUNDS, 0)) 活动经费,sum(ifnull(REWARDFUNDS, 0)) 双创经费
|
|
from DJ_FUNDSBUDGET budget
|
|
from DJ_FUNDSBUDGET budget
|
|
where year = #{year}
|
|
where year = #{year}
|
|
group by budget.PARTYCODE
|
|
group by budget.PARTYCODE
|
|
@@ -134,14 +134,14 @@
|
|
ifnull(sum(u.走访慰问活动),0)/10000 走访慰问活动,
|
|
ifnull(sum(u.走访慰问活动),0)/10000 走访慰问活动,
|
|
ifnull(sum(u.设备设施),0)/10000 设备设施,
|
|
ifnull(sum(u.设备设施),0)/10000 设备设施,
|
|
ifnull(sum(u.其他),0)/10000 其他,
|
|
ifnull(sum(u.其他),0)/10000 其他,
|
|
- ifnull(sum(u.综合考评奖励),0)/10000 综合考评奖励,
|
|
|
|
- ifnull(sum(u.七一表彰奖励),0)/10000 七一表彰奖励,
|
|
|
|
- ifnull(sum(u.创岗建区表彰奖励),0)/10000 创岗建区表彰奖励,
|
|
|
|
- ifnull(sum(u.党建工作成果奖励),0)/10000 党建工作成果奖励,
|
|
|
|
- ifnull(sum(u.主题竞赛活动奖励),0)/10000 主题竞赛活动奖励,
|
|
|
|
|
|
+ ifnull(sum(u.培训党员),0)/10000 培训党员,
|
|
|
|
+ ifnull(sum(u.订阅或购买用于开展党员教育的报刊),0)/10000 订阅或购买用于开展党员教育的报刊,
|
|
|
|
+ ifnull(sum(u.资料),0)/10000 资料,
|
|
|
|
+ ifnull(sum(u.音像制品和设备),0)/10000 音像制品和设备,
|
|
|
|
+ ifnull(sum(u.补助生活困难的党员,0)/10000 补助生活困难的党员,
|
|
(ifnull(sum(u.学习教育活动),0)+ifnull(sum(u.党内主题活动),0)+ ifnull(sum(u.宣传活动),0)+ ifnull(sum(u.会议活动),0)+ ifnull(sum(u.党建日常工作),0)+ ifnull(sum(u.走访慰问活动),0)+
|
|
(ifnull(sum(u.学习教育活动),0)+ifnull(sum(u.党内主题活动),0)+ ifnull(sum(u.宣传活动),0)+ ifnull(sum(u.会议活动),0)+ ifnull(sum(u.党建日常工作),0)+ ifnull(sum(u.走访慰问活动),0)+
|
|
ifnull(sum(u.设备设施),0)+ ifnull(sum(u.其他),0))/10000 活动支出,
|
|
ifnull(sum(u.设备设施),0)+ ifnull(sum(u.其他),0))/10000 活动支出,
|
|
- (ifnull(sum(u.综合考评奖励),0)+ifnull(sum(u.七一表彰奖励),0)+ifnull(sum(u.创岗建区表彰奖励),0)+ifnull(sum(u.党建工作成果奖励),0)+ifnull(sum(u.主题竞赛活动奖励),0))/10000 奖励支出
|
|
|
|
|
|
+ (ifnull(sum(u.培训党员),0)+ifnull(sum(u.订阅或购买用于开展党员教育的报刊),0)+ifnull(sum(u.资料),0)+ifnull(sum(u.音像制品和设备),0)+ifnull(sum(u.补助生活困难的党员),0))/10000 双创支出
|
|
|
|
|
|
from ZZ_ZZQKXX z
|
|
from ZZ_ZZQKXX z
|
|
left join(
|
|
left join(
|
|
@@ -154,11 +154,11 @@
|
|
sum(CASE EXPENDTYPE WHEN 6 THEN EXPENDMONEY ELSE 0 END )as 走访慰问活动,
|
|
sum(CASE EXPENDTYPE WHEN 6 THEN EXPENDMONEY ELSE 0 END )as 走访慰问活动,
|
|
sum(CASE EXPENDTYPE WHEN 7 THEN EXPENDMONEY ELSE 0 END )as 设备设施,
|
|
sum(CASE EXPENDTYPE WHEN 7 THEN EXPENDMONEY ELSE 0 END )as 设备设施,
|
|
sum(CASE EXPENDTYPE WHEN 8 THEN EXPENDMONEY ELSE 0 END )as 其他,
|
|
sum(CASE EXPENDTYPE WHEN 8 THEN EXPENDMONEY ELSE 0 END )as 其他,
|
|
- sum(CASE EXPENDTYPE WHEN 20 THEN EXPENDMONEY ELSE 0 END )as 综合考评奖励,
|
|
|
|
- sum(CASE EXPENDTYPE WHEN 21 THEN EXPENDMONEY ELSE 0 END )as 七一表彰奖励,
|
|
|
|
- sum(CASE EXPENDTYPE WHEN 22 THEN EXPENDMONEY ELSE 0 END )as 创岗建区表彰奖励,
|
|
|
|
- sum(CASE EXPENDTYPE WHEN 23 THEN EXPENDMONEY ELSE 0 END )as 党建工作成果奖励,
|
|
|
|
- sum(CASE EXPENDTYPE WHEN 24 THEN EXPENDMONEY ELSE 0 END )as 主题竞赛活动奖励
|
|
|
|
|
|
+ sum(CASE EXPENDTYPE WHEN 20 THEN EXPENDMONEY ELSE 0 END )as 培训党员,
|
|
|
|
+ sum(CASE EXPENDTYPE WHEN 21 THEN EXPENDMONEY ELSE 0 END )as 订阅或购买用于开展党员教育的报刊,
|
|
|
|
+ sum(CASE EXPENDTYPE WHEN 22 THEN EXPENDMONEY ELSE 0 END )as 资料,
|
|
|
|
+ sum(CASE EXPENDTYPE WHEN 23 THEN EXPENDMONEY ELSE 0 END )as 音像制品和设备,
|
|
|
|
+ sum(CASE EXPENDTYPE WHEN 24 THEN EXPENDMONEY ELSE 0 END )as 补助生活困难的党员
|
|
from DJ_FUNDSUSE
|
|
from DJ_FUNDSUSE
|
|
where extract(year from EXPENDTIME) = #{year}
|
|
where extract(year from EXPENDTIME) = #{year}
|
|
group by PARTYCODE
|
|
group by PARTYCODE
|