|
@@ -523,24 +523,20 @@
|
|
|
|
|
|
<!--统计党员总数 在岗职工数 职工人数-->
|
|
|
<select id="selectPartyUserTotalList" resultType="java.util.HashMap">
|
|
|
- select t.DZZDM,t.TOTAL,t.ZGCOUNT,fb.ZGRS,t.LTXCOUNT
|
|
|
- from (
|
|
|
- select DZZDM,sum(total) TOTAL,sum(zgcount) ZGCOUNT,sum(ltxcount) LTXCOUNT
|
|
|
- from (
|
|
|
- select substr(z.DZZDM, 1, length(#{dzzdm})) as DZZDM,
|
|
|
- count(1) as total,
|
|
|
- (sum(case when (us.GZGW not in('0500','0501','0502','0504') or us.GZGW is null) then 1 else 0 end)) zgcount,
|
|
|
- (sum(case when us.GZGW in('0500','0501','0502','0504') then 1 else 0 end)) as ltxcount
|
|
|
- from ZZ_ZZQKXX z
|
|
|
- left join ZZ_ZZQKXXFB fb on z.DZZDM = fb.DZZDM
|
|
|
- inner join VM_RYJBXX us on z.DZZDM = us.SZDZBDM
|
|
|
- left join RS_RYJBXXFB usfb on us.RYBM = usfb.RYBM
|
|
|
- where z.DZZDM like concat('',#{dzzdm},'%')
|
|
|
- group by z.DZZDM
|
|
|
- ) t1
|
|
|
- group by DZZDM
|
|
|
- ) t
|
|
|
- left join ZZ_ZZQKXXFB fb on t.DZZDM = fb.DZZDM
|
|
|
+ select t.DZZDM, t.TOTAL, t.ZGCOUNT, fb.ZGRS, t.LTXCOUNT
|
|
|
+ from (select DZZDM, sum(total) TOTAL, sum(zgcount) ZGCOUNT, sum(ltxcount) LTXCOUNT
|
|
|
+ from (select substr(z.DZZDM, 1, length(#{dzzdm})) as DZZDM,
|
|
|
+ count(1) as total,
|
|
|
+ count(1) - sum(case when fb.ZZLB = '400' and fb.JCZZFL = '400' then 1 else 0 end) as zgcount,
|
|
|
+ sum(case when fb.ZZLB = '400' and fb.JCZZFL = '400' then 1 else 0 end) as ltxcount
|
|
|
+ from ZZ_ZZQKXX z
|
|
|
+ left join ZZ_ZZQKXXFB fb on z.DZZDM = fb.DZZDM
|
|
|
+ inner join VM_RYJBXX us on z.DZZDM = us.SZDZBDM
|
|
|
+ left join RS_RYJBXXFB usfb on us.RYBM = usfb.RYBM
|
|
|
+ where z.DZZDM like concat('', #{dzzdm}, '%')
|
|
|
+ group by z.DZZDM) t1
|
|
|
+ group by DZZDM) t
|
|
|
+ left join ZZ_ZZQKXXFB fb on t.DZZDM = fb.DZZDM
|
|
|
</select>
|
|
|
|
|
|
<!--统计创岗建区-->
|