|
@@ -136,6 +136,13 @@
|
|
select distinct us.RYJBXXBS,us.RYBM,us.XB SEXTYPE
|
|
select distinct us.RYJBXXBS,us.RYBM,us.XB SEXTYPE
|
|
from VM_RYJBXX us
|
|
from VM_RYJBXX us
|
|
inner join ZZ_ZZQKXX zz on us.SZDZBDM = zz.DZZDM
|
|
inner join ZZ_ZZQKXX zz on us.SZDZBDM = zz.DZZDM
|
|
|
|
+ <if test="is_search_leader==1">
|
|
|
|
+ inner join (
|
|
|
|
+ select distinct c.RYBM from ZZ_BZCYXX c
|
|
|
|
+ inner join ZZ_ZZQKXX z on c.dzzdm= z.dzzdm
|
|
|
|
+ inner join VM_RYJBXX u on c.RYBM=u.RYBM
|
|
|
|
+ ) leader on us.RYBM = leader.RYBM
|
|
|
|
+ </if>
|
|
where 1=1 and us.szdzbdm like concat('',#{gddwdm},'%')
|
|
where 1=1 and us.szdzbdm like concat('',#{gddwdm},'%')
|
|
<if test="dzzdm != null and dzzdm != ''">
|
|
<if test="dzzdm != null and dzzdm != ''">
|
|
and us.SZDZBDM like concat('',#{dzzdm},'%')
|
|
and us.SZDZBDM like concat('',#{dzzdm},'%')
|
|
@@ -182,10 +189,19 @@
|
|
else 5
|
|
else 5
|
|
end) AGETYPE
|
|
end) AGETYPE
|
|
from (
|
|
from (
|
|
- select distinct us.RYJBXXBS,us.RYBM,fb.NL AS AGE
|
|
|
|
|
|
+ select distinct us.RYJBXXBS,us.RYBM
|
|
|
|
+ -- ,fb.NL AS AGE
|
|
|
|
+ ,calculate_age(STR_TO_DATE(us.csrq, '%Y%m%d')) as AGE
|
|
from VM_RYJBXX us
|
|
from VM_RYJBXX us
|
|
inner join ZZ_ZZQKXX zz on us.SZDZBDM = zz.DZZDM
|
|
inner join ZZ_ZZQKXX zz on us.SZDZBDM = zz.DZZDM
|
|
inner join RS_RYJBXXFB fb on us.RYBM = fb.RYBM
|
|
inner join RS_RYJBXXFB fb on us.RYBM = fb.RYBM
|
|
|
|
+ <if test="is_search_leader==1">
|
|
|
|
+ inner join (
|
|
|
|
+ select distinct c.RYBM from ZZ_BZCYXX c
|
|
|
|
+ inner join ZZ_ZZQKXX z on c.dzzdm= z.dzzdm
|
|
|
|
+ inner join VM_RYJBXX u on c.RYBM=u.RYBM
|
|
|
|
+ ) leader on us.RYBM = leader.RYBM
|
|
|
|
+ </if>
|
|
where 1=1 and us.SZDZBDM like concat('',#{gddwdm},'%')
|
|
where 1=1 and us.SZDZBDM like concat('',#{gddwdm},'%')
|
|
<if test="dzzdm != null and dzzdm != ''">
|
|
<if test="dzzdm != null and dzzdm != ''">
|
|
and us.SZDZBDM like concat('',#{dzzdm},'%')
|
|
and us.SZDZBDM like concat('',#{dzzdm},'%')
|
|
@@ -233,9 +249,17 @@
|
|
else 5
|
|
else 5
|
|
end) ageType
|
|
end) ageType
|
|
from (
|
|
from (
|
|
- select distinct us.RYJBXXBS,us.RYBM,(date_format(sysdate(),'%Y%m%d') - us.sqrdrq) /10000 AS age
|
|
|
|
|
|
+ select distinct us.RYJBXXBS,us.RYBM,calculate_age(STR_TO_DATE(dj.JRZGZZRQ, '%Y%m%d')) AS age
|
|
from VM_RYJBXX us
|
|
from VM_RYJBXX us
|
|
|
|
+ inner join ZZ_DJXX dj on us.RYBM=dj.RYBM
|
|
inner join ZZ_ZZQKXX zz on us.SZDZBDM = zz.DZZDM
|
|
inner join ZZ_ZZQKXX zz on us.SZDZBDM = zz.DZZDM
|
|
|
|
+ <if test="is_search_leader==1">
|
|
|
|
+ inner join (
|
|
|
|
+ select distinct c.RYBM from ZZ_BZCYXX c
|
|
|
|
+ inner join ZZ_ZZQKXX z on c.dzzdm= z.dzzdm
|
|
|
|
+ inner join VM_RYJBXX u on c.RYBM=u.RYBM
|
|
|
|
+ ) leader on us.RYBM = leader.RYBM
|
|
|
|
+ </if>
|
|
where 1=1 and us.SZDZBDM like concat('',#{gddwdm},'%')
|
|
where 1=1 and us.SZDZBDM like concat('',#{gddwdm},'%')
|
|
<if test="dzzdm != null and dzzdm != ''">
|
|
<if test="dzzdm != null and dzzdm != ''">
|
|
and us.SZDZBDM like concat('',#{dzzdm},'%')
|
|
and us.SZDZBDM like concat('',#{dzzdm},'%')
|
|
@@ -303,52 +327,45 @@
|
|
|
|
|
|
<!--学历统计-->
|
|
<!--学历统计-->
|
|
<select id="selectUserEducationList" resultType="java.util.Map">
|
|
<select id="selectUserEducationList" resultType="java.util.Map">
|
|
- select t1.EDUCATIONTYPE
|
|
|
|
- ,(case t1.EDUCATIONTYPE
|
|
|
|
- when 1 then '研究生'
|
|
|
|
- when 2 then '大学本科'
|
|
|
|
- when 3 then '大学专科'
|
|
|
|
- when 4 then '中专'
|
|
|
|
- when 5 then '高中、中技'
|
|
|
|
- when 6 then '其他'
|
|
|
|
- else '' end) EDUCATIONNAME
|
|
|
|
- ,ifnull(t2.num,0) NUM
|
|
|
|
- from (select dic.DICKEY as EDUCATIONTYPE from cf_dictionary dic where dic.DICTYPEKEY='monthType' and dic.DICKEY <![CDATA[ <= ]]> 6) t1
|
|
|
|
- left join (select EDUCATIONTYPE,count(*) num from (
|
|
|
|
- select distinct us.RYBM,us.SZDZBDM,
|
|
|
|
- (case when xl.HZMC in('研究生教育','博士研究生','硕士研究生','中央党校在职研究生','省(区、市)委党校在职研究生','研究生其他','研究生班') then 1
|
|
|
|
- when xl.HZMC in('本科教育','大学本科') then 2
|
|
|
|
- when xl.HZMC in('专科教育','大学专科') then 3
|
|
|
|
- when xl.HZMC in('中等职业教育','中专') then 4
|
|
|
|
- when xl.HZMC in('技校','高中及以下','高中') then 5
|
|
|
|
- else 6 end) EDUCATIONTYPE
|
|
|
|
- from VM_RYJBXX us
|
|
|
|
- inner join ZZ_ZZQKXX zz on us.SZDZBDM = zz.DZZDM
|
|
|
|
- left join zd_whcddm1 xl on us.XL=xl.BM -- 学历
|
|
|
|
- where 1=1
|
|
|
|
- <if test="dzzdm != null and dzzdm != ''">
|
|
|
|
- and us.SZDZBDM like concat('',#{dzzdm},'%')
|
|
|
|
- </if>
|
|
|
|
- <if test="dwgzzlb !=null">
|
|
|
|
- <if test="dwgzzlb == 1">
|
|
|
|
- and us.ZWMC like '%党委书记%'
|
|
|
|
|
|
+ select xl.BM as EDUCATIONTYPE
|
|
|
|
+ ,xl.HZMC as EDUCATIONNAME
|
|
|
|
+ ,ifnull(us.NUM,0) as NUM
|
|
|
|
+ from zd_whcddm1 xl
|
|
|
|
+ left join (
|
|
|
|
+ select us.XL,sum(case when us.rybm is not null then 1 else 0 end) as NUM
|
|
|
|
+ from VM_RYJBXX us
|
|
|
|
+ inner join ZZ_ZZQKXX zz on us.SZDZBDM = zz.DZZDM
|
|
|
|
+ <if test="is_search_leader==1">
|
|
|
|
+ inner join (
|
|
|
|
+ select distinct c.RYBM from ZZ_BZCYXX c
|
|
|
|
+ inner join ZZ_ZZQKXX z on c.dzzdm= z.dzzdm
|
|
|
|
+ inner join VM_RYJBXX u on c.RYBM=u.RYBM
|
|
|
|
+ ) leader on us.RYBM = leader.RYBM
|
|
</if>
|
|
</if>
|
|
- <if test="dwgzzlb == 2">
|
|
|
|
- and us.ZWMC like '%党委副书记%'
|
|
|
|
|
|
+ where 1=1
|
|
|
|
+ <if test="dzzdm != null and dzzdm != ''">
|
|
|
|
+ and us.SZDZBDM like concat('',#{dzzdm},'%')
|
|
</if>
|
|
</if>
|
|
- <if test="dwgzzlb == 3">
|
|
|
|
- and (us.ZWMC like '%支部书记%' or us.ZWMC like '%总支书记%')
|
|
|
|
|
|
+ <if test="dwgzzlb !=null">
|
|
|
|
+ <if test="dwgzzlb == 1">
|
|
|
|
+ and us.ZWMC like '%党委书记%'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dwgzzlb == 2">
|
|
|
|
+ and us.ZWMC like '%党委副书记%'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dwgzzlb == 3">
|
|
|
|
+ and (us.ZWMC like '%支部书记%' or us.ZWMC like '%总支书记%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dwgzzlb == 4">
|
|
|
|
+ and (us.ZWMC like '%支部副书记%' or us.ZWMC like '%总支副书记%')
|
|
|
|
+ </if>
|
|
</if>
|
|
</if>
|
|
- <if test="dwgzzlb == 4">
|
|
|
|
- and (us.ZWMC like '%支部副书记%' or us.ZWMC like '%总支副书记%')
|
|
|
|
|
|
+ <if test="isOnduty!=null and isOnduty==1">
|
|
|
|
+ and (us.GZGW not in('0500','0501','0502','0504') or us.GZGW is null)-- 在岗人员
|
|
</if>
|
|
</if>
|
|
- </if>
|
|
|
|
- <if test="isOnduty!=null and isOnduty==1">
|
|
|
|
- and (us.GZGW not in('0500','0501','0502','0504') or us.GZGW is null)-- 在岗人员
|
|
|
|
- </if>
|
|
|
|
- ) tt1 group by EDUCATIONTYPE
|
|
|
|
- ) t2 on t1.EDUCATIONTYPE=t2.EDUCATIONTYPE
|
|
|
|
- order by t1.EDUCATIONTYPE
|
|
|
|
|
|
+ group by us.XL
|
|
|
|
+ ) us on us.XL=xl.BM
|
|
|
|
+ order by xl.XH
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!--统计三会一课-->
|
|
<!--统计三会一课-->
|
|
@@ -523,24 +540,20 @@
|
|
|
|
|
|
<!--统计党员总数 在岗职工数 职工人数-->
|
|
<!--统计党员总数 在岗职工数 职工人数-->
|
|
<select id="selectPartyUserTotalList" resultType="java.util.HashMap">
|
|
<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>
|
|
</select>
|
|
|
|
|
|
<!--统计创岗建区-->
|
|
<!--统计创岗建区-->
|