Преглед изворни кода

Merge remote-tracking branch 'origin/master'

82064491C07A712AE32B5B57EC6EF136 пре 2 месеци
родитељ
комит
aa6c4d8c5d

+ 24 - 0
lib/数据更新脚本.txt

@@ -601,3 +601,27 @@ INSERT INTO `cf_menu` (`MENUID`, `APPLICATIONID`, `PARENTMENUID`, `MNUSYSTEM`, `
 INSERT INTO `cf_menu` (`MENUID`, `APPLICATIONID`, `PARENTMENUID`, `MNUSYSTEM`, `MENUORDER`, `MENUNO`, `MENUNAME`, `MENUPROGRAM`, `MENUPIC`, `MENUDESC`, `ISVISIBLE`, `ISLEAF`, `ISBLANK`) VALUES ('a30bc101-0008-0003-0001-557a666c7ff8', 'f0c4fa7f9f3c4fb6bd56aac608b7ad3f', 'a30bc101-0000-0003-0001-557a666c7ff8', NULL, 2, 'home.leaderAssessEdit2', '编辑干部试用期届满考核', '', '', '', 0, 0, NULL);
 INSERT INTO `cf_menu` (`MENUID`, `APPLICATIONID`, `PARENTMENUID`, `MNUSYSTEM`, `MENUORDER`, `MENUNO`, `MENUNAME`, `MENUPROGRAM`, `MENUPIC`, `MENUDESC`, `ISVISIBLE`, `ISLEAF`, `ISBLANK`) VALUES ('a30bc101-0009-0003-0001-557a666c7ff8', 'f0c4fa7f9f3c4fb6bd56aac608b7ad3f', 'a30bc101-0000-0003-0001-557a666c7ff8', NULL, 3, 'home.leaderAssessDetail2', '查看干部试用期届满考核详情', '', '', '', 0, 0, NULL);
 INSERT INTO `cf_menu` (`MENUID`, `APPLICATIONID`, `PARENTMENUID`, `MNUSYSTEM`, `MENUORDER`, `MENUNO`, `MENUNAME`, `MENUPROGRAM`, `MENUPIC`, `MENUDESC`, `ISVISIBLE`, `ISLEAF`, `ISBLANK`) VALUES ('a30bc101-0000-0003-0001-557a666c7ff8', 'f0c4fa7f9f3c4fb6bd56aac608b7ad3f', 'a30bc101-0000-0000-0001-557a666c7ff8', NULL, 3, 'home.leaderAssessList2', '干部试用期届满考核', '', '', '', 1, 0, NULL);
+
+
+-- 年龄计算函数
+set global log_bin_trust_function_creators=TRUE;
+
+DELIMITER $$
+CREATE FUNCTION `calculate_age` (birthdate DATE)
+RETURNS INTEGER
+BEGIN
+
+declare age int;
+set age =0;
+if month(current_date) > MONTH(birthdate) then
+  set age= year(current_date) - YEAR(birthdate) ;
+  elseif month(current_date) = MONTH(birthdate) and day(current_date) > DAY(birthdate) then
+  set age = year(current_date) - YEAR(birthdate);
+  else set age = year(current_date) - YEAR(birthdate) - 1;
+end if;
+
+return age;
+
+END$$
+
+DELIMITER ;

+ 14 - 10
src/main/java/com/ghsc/partybuild/controller/BigDataController.java

@@ -282,20 +282,23 @@ public class BigDataController {
 
     @ResponseBody
     @GetMapping("/getDyxbCount")
-    public List<HashMap<String, Object>> getDyxbCount(@RequestParam(required = false) String dzzdm, @RequestParam(required = false) Integer dwgzzlb, @RequestParam(required = false) Integer isOnduty) {
-        return bigDataService.getDyxbCount(dzzdm, dwgzzlb, isOnduty);
+    public List<HashMap<String, Object>> getDyxbCount(@RequestParam(required = false) String dzzdm, @RequestParam(required = false) Integer dwgzzlb, @RequestParam(required = false) Integer isOnduty
+            , @RequestParam(required = false) Integer is_search_leader) {
+        return bigDataService.getDyxbCount(dzzdm, dwgzzlb, isOnduty, is_search_leader);
     }
 
     @ResponseBody
     @GetMapping("/getDynlCount")
-    public List<HashMap<String, Object>> getDynlCount(@RequestParam(required = false) String dzzdm, @RequestParam(required = false) Integer dwgzzlb, @RequestParam(required = false) Integer isOnduty) {
-        return bigDataService.getDynlCount(dzzdm, dwgzzlb, isOnduty);
+    public List<HashMap<String, Object>> getDynlCount(@RequestParam(required = false) String dzzdm, @RequestParam(required = false) Integer dwgzzlb, @RequestParam(required = false) Integer isOnduty
+            , @RequestParam(required = false) Integer is_search_leader) {
+        return bigDataService.getDynlCount(dzzdm, dwgzzlb, isOnduty, is_search_leader);
     }
 
     @ResponseBody
     @GetMapping("/getDydlCount")
-    public List<HashMap<String, Object>> getDydlCount(@RequestParam(required = false) String dzzdm, @RequestParam(required = false) Integer dwgzzlb, @RequestParam(required = false) Integer isOnduty) {
-        return bigDataService.getDydlCount(dzzdm, dwgzzlb, isOnduty);
+    public List<HashMap<String, Object>> getDydlCount(@RequestParam(required = false) String dzzdm, @RequestParam(required = false) Integer dwgzzlb, @RequestParam(required = false) Integer isOnduty
+            , @RequestParam(required = false) Integer is_search_leader) {
+        return bigDataService.getDydlCount(dzzdm, dwgzzlb, isOnduty, is_search_leader);
     }
 
     @ResponseBody
@@ -320,10 +323,11 @@ public class BigDataController {
 
     @ResponseBody
     @GetMapping("/getUserEducationList")
-    public RequsetData<List<Map<String, Object>>> getUserEducationList(@RequestParam("dzzdm") String dzzdm, @RequestParam(required = false) Integer dwgzzlb, @RequestParam(required = false) Integer isOnduty) {
+    public RequsetData<List<Map<String, Object>>> getUserEducationList(@RequestParam("dzzdm") String dzzdm, @RequestParam(required = false) Integer dwgzzlb, @RequestParam(required = false) Integer isOnduty
+            , @RequestParam(required = false) Integer is_search_leader) {
         RequsetData<List<Map<String, Object>>> res = new RequsetData<>();
         try {
-            res.setItem(bigDataService.getUserEducationList(dzzdm, dwgzzlb, isOnduty));
+            res.setItem(bigDataService.getUserEducationList(dzzdm, dwgzzlb, isOnduty, is_search_leader));
         } catch (Exception ex) {
             res.setSuccess(false);
             res.setMsg(ex.getMessage());
@@ -490,7 +494,7 @@ public class BigDataController {
 
     @ResponseBody
     @GetMapping("/getCGJQTotalList")
-    public List<HashMap<String, Object>> getCgjqotalList(@RequestParam("year") Integer year,@RequestParam(required = false) String dzzdm, @RequestParam(required = false) String ssdzzdm) {
+    public List<HashMap<String, Object>> getCgjqotalList(@RequestParam("year") Integer year, @RequestParam(required = false) String dzzdm, @RequestParam(required = false) String ssdzzdm) {
         return bigDataService.getcgjqtotallist(dzzdm, ssdzzdm, year);
     }
 
@@ -526,7 +530,7 @@ public class BigDataController {
     }
 
     @GetMapping("/getPartyUserStatusTotalList")
-    public List<HashMap<String, Object>> getPartyUserStatusTotalList(){
+    public List<HashMap<String, Object>> getPartyUserStatusTotalList() {
         return bigDataService.getPartyUserStatusTotalList();
     }
 

+ 8 - 4
src/main/java/com/ghsc/partybuild/mapper/BigDataCQuery.java

@@ -55,7 +55,8 @@ public interface BigDataCQuery {
      * @param isOnduty
      * @return
      */
-    List<HashMap<String, Object>> selectDyxbCount(@Param("gddwdm") String gddwdm, @Param("dzzdm") String dzzdm, @Param("dwgzzlb") Integer dwgzzlb, @Param("isOnduty") Integer isOnduty);
+    List<HashMap<String, Object>> selectDyxbCount(@Param("gddwdm") String gddwdm, @Param("dzzdm") String dzzdm, @Param("dwgzzlb") Integer dwgzzlb, @Param("isOnduty") Integer isOnduty
+            , @Param("is_search_leader") Integer is_search_leader);
 
     /**
      * 统计党员年龄
@@ -66,7 +67,8 @@ public interface BigDataCQuery {
      * @param isOnduty
      * @return
      */
-    List<HashMap<String, Object>> selectDynlCount(@Param("gddwdm") String gddwdm, @Param("dzzdm") String dzzdm, @Param("dwgzzlb") Integer dwgzzlb, @Param("isOnduty") Integer isOnduty);
+    List<HashMap<String, Object>> selectDynlCount(@Param("gddwdm") String gddwdm, @Param("dzzdm") String dzzdm, @Param("dwgzzlb") Integer dwgzzlb, @Param("isOnduty") Integer isOnduty
+            , @Param("is_search_leader") Integer is_search_leader);
 
     /**
      * 统计党员党龄
@@ -77,7 +79,8 @@ public interface BigDataCQuery {
      * @param isOnduty
      * @return
      */
-    List<HashMap<String, Object>> selectDydlCount(@Param("gddwdm") String gddwdm, @Param("dzzdm") String dzzdm, @Param("dwgzzlb") Integer dwgzzlb, @Param("isOnduty") Integer isOnduty);
+    List<HashMap<String, Object>> selectDydlCount(@Param("gddwdm") String gddwdm, @Param("dzzdm") String dzzdm, @Param("dwgzzlb") Integer dwgzzlb, @Param("isOnduty") Integer isOnduty
+            , @Param("is_search_leader") Integer is_search_leader);
 
     /**
      * 统计政工职务党员
@@ -105,7 +108,8 @@ public interface BigDataCQuery {
      * @param isOnduty
      * @return
      */
-    List<Map<String, Object>> selectUserEducationList(@Param("dzzdm") String dzzdm, @Param("dwgzzlb") Integer dwgzzlb, @Param("isOnduty") Integer isOnduty);
+    List<Map<String, Object>> selectUserEducationList(@Param("dzzdm") String dzzdm, @Param("dwgzzlb") Integer dwgzzlb, @Param("isOnduty") Integer isOnduty
+            , @Param("is_search_leader") Integer is_search_leader);
 
     /**
      * 统计三会一课

+ 4 - 4
src/main/java/com/ghsc/partybuild/service/BigDataService.java

@@ -164,7 +164,7 @@ public interface BigDataService {
      * @param isOnduty
      * @return
      */
-    List<HashMap<String, Object>> getDyxbCount(String dzzdm, Integer dwgzzlb, Integer isOnduty);
+    List<HashMap<String, Object>> getDyxbCount(String dzzdm, Integer dwgzzlb, Integer isOnduty, Integer is_search_leader);
 
     /**
      * 统计党员年龄
@@ -174,7 +174,7 @@ public interface BigDataService {
      * @param isOnduty
      * @return
      */
-    List<HashMap<String, Object>> getDynlCount(String dzzdm, Integer dwgzzlb, Integer isOnduty);
+    List<HashMap<String, Object>> getDynlCount(String dzzdm, Integer dwgzzlb, Integer isOnduty, Integer is_search_leader);
 
     /**
      * 统计党员党龄
@@ -184,7 +184,7 @@ public interface BigDataService {
      * @param isOnduty
      * @return
      */
-    List<HashMap<String, Object>> getDydlCount(String dzzdm, Integer dwgzzlb, Integer isOnduty);
+    List<HashMap<String, Object>> getDydlCount(String dzzdm, Integer dwgzzlb, Integer isOnduty, Integer is_search_leader);
 
     /**
      * 统计政工职务党员
@@ -213,7 +213,7 @@ public interface BigDataService {
      * @param isOnduty
      * @return
      */
-    List<Map<String, Object>> getUserEducationList(String dzzdm, Integer dwgzzlb, Integer isOnduty);
+    List<Map<String, Object>> getUserEducationList(String dzzdm, Integer dwgzzlb, Integer isOnduty, Integer is_search_leader);
 
     /**
      * 统计三会一课

+ 8 - 8
src/main/java/com/ghsc/partybuild/service/impl/BigDataServiceImpl.java

@@ -322,8 +322,8 @@ public class BigDataServiceImpl implements BigDataService {
      * @Param []
      **/
     @Override
-    public List<HashMap<String, Object>> getDyxbCount(String dzzdm, Integer dwgzzlb, Integer isOnduty) {
-        return bigDataCquery.selectDyxbCount(appConfig.gddwdm, dzzdm, dwgzzlb, isOnduty);
+    public List<HashMap<String, Object>> getDyxbCount(String dzzdm, Integer dwgzzlb, Integer isOnduty, Integer is_search_leader) {
+        return bigDataCquery.selectDyxbCount(appConfig.gddwdm, dzzdm, dwgzzlb, isOnduty,is_search_leader);
     }
 
     /**
@@ -333,8 +333,8 @@ public class BigDataServiceImpl implements BigDataService {
      * @Param []
      **/
     @Override
-    public List<HashMap<String, Object>> getDynlCount(String dzzdm, Integer dwgzzlb, Integer isOnduty) {
-        return bigDataCquery.selectDynlCount(appConfig.gddwdm, dzzdm, dwgzzlb, isOnduty);
+    public List<HashMap<String, Object>> getDynlCount(String dzzdm, Integer dwgzzlb, Integer isOnduty,Integer is_search_leader) {
+        return bigDataCquery.selectDynlCount(appConfig.gddwdm, dzzdm, dwgzzlb, isOnduty,is_search_leader);
     }
 
     /**
@@ -344,8 +344,8 @@ public class BigDataServiceImpl implements BigDataService {
      * @Param [dzzdm]
      **/
     @Override
-    public List<HashMap<String, Object>> getDydlCount(String dzzdm, Integer dwgzzlb, Integer isOnduty) {
-        return bigDataCquery.selectDydlCount(appConfig.gddwdm, dzzdm, dwgzzlb, isOnduty);
+    public List<HashMap<String, Object>> getDydlCount(String dzzdm, Integer dwgzzlb, Integer isOnduty,Integer is_search_leader) {
+        return bigDataCquery.selectDydlCount(appConfig.gddwdm, dzzdm, dwgzzlb, isOnduty,is_search_leader);
     }
 
     /**
@@ -365,8 +365,8 @@ public class BigDataServiceImpl implements BigDataService {
     }
 
     @Override
-    public List<Map<String, Object>> getUserEducationList(String dzzdm, Integer dwgzzlb, Integer isOnduty) {
-        return bigDataCquery.selectUserEducationList(dzzdm, dwgzzlb, isOnduty);
+    public List<Map<String, Object>> getUserEducationList(String dzzdm, Integer dwgzzlb, Integer isOnduty,Integer is_search_leader) {
+        return bigDataCquery.selectUserEducationList(dzzdm, dwgzzlb, isOnduty,is_search_leader);
     }
 
     @Override

+ 4 - 4
src/main/java/com/ghsc/partybuild/service/impl/PartyUserAdmitServiceImpl.java

@@ -205,16 +205,16 @@ public class PartyUserAdmitServiceImpl implements PartyUserAdmitService {
 
             if (stringUtils.IsNullOrEmpty(item.getIsStudent()))
                 errorInfo += "请填写是否学生身份!";
-            if (!stringUtils.IsNullOrEmpty(item.getIsStudent()) && (stringUtils.IsNullOrEmpty(item.getUserName())
+            /*if (!stringUtils.IsNullOrEmpty(item.getIsStudent()) && (stringUtils.IsNullOrEmpty(item.getUserName())
                     || stringUtils.IsNullOrEmpty(item.getUserCode()) || stringUtils.IsNullOrEmpty(item.getPartyName()) || stringUtils.IsNullOrEmpty(item.getBirthDate()) || stringUtils.IsNullOrEmpty(item.getApplyDate())
                     || stringUtils.IsNullOrEmpty(item.getSex()) || stringUtils.IsNullOrEmpty(item.getNational()) || stringUtils.IsNullOrEmpty(item.getNativePlace()) || stringUtils.IsNullOrEmpty(item.getIdCard())
                     || stringUtils.IsNullOrEmpty(item.getEnrollmentDate())
                     || stringUtils.IsNullOrEmpty(item.getGraduateDate()) || stringUtils.IsNullOrEmpty(item.getEducation()) || stringUtils.IsNullOrEmpty(item.getContactMobile())
                     && item.getIsStudent().equals("是") && (stringUtils.IsNullOrEmpty(item.getClassName()) || stringUtils.IsNullOrEmpty(item.getGradeName()))
             ))
-                errorInfo += "信息不全无法导入!";
+                errorInfo += "信息不全无法导入!";*/
 
-            /*if (stringUtils.IsNullOrEmpty(item.getUserName()))
+            if (stringUtils.IsNullOrEmpty(item.getUserName()))
                 errorInfo += "请填写姓名!";
             if (stringUtils.IsNullOrEmpty(item.getUserCode()))
                 errorInfo += "请填写学号/工号!";
@@ -223,7 +223,7 @@ public class PartyUserAdmitServiceImpl implements PartyUserAdmitService {
             if (stringUtils.IsNullOrEmpty(item.getBirthDate()))
                 errorInfo += "请填写出生日期!";
             if (stringUtils.IsNullOrEmpty(item.getApplyDate()))
-                errorInfo += "请填写申请入党时间!";*/
+                errorInfo += "请填写申请入党时间!";
             if (party == null)
                 errorInfo += "所属党支部名称匹配失败!";
             if (!stringUtils.IsNullOrEmpty(item.getBirthDate()) && birthDate == null)

+ 1 - 1
src/main/resources/application.yml

@@ -19,7 +19,7 @@ spring:
       filters: stat
       driver-class-name: com.mysql.cj.jdbc.Driver
       #基本属性
-      url: jdbc:mysql://office.bowintek.com:3306/ghscpartybuild?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&allowPublicKeyRetrieval=true
+      url: jdbc:mysql://office.bowintek.com:3306/ghscpartybuild_0912?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&allowPublicKeyRetrieval=true
       username: root
       password: bowin@123
       #配置初始化大小/最小/最大

+ 75 - 62
src/main/resources/mapping/BigDataCQuery.xml

@@ -136,6 +136,13 @@
         select distinct us.RYJBXXBS,us.RYBM,us.XB SEXTYPE
         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>
         where 1=1 and us.szdzbdm like concat('',#{gddwdm},'%')
         <if test="dzzdm != null and dzzdm != ''">
             and us.SZDZBDM like concat('',#{dzzdm},'%')
@@ -182,10 +189,19 @@
         else 5
         end) AGETYPE
         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
         inner join ZZ_ZZQKXX zz on us.SZDZBDM = zz.DZZDM
         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},'%')
         <if test="dzzdm != null and dzzdm != ''">
             and us.SZDZBDM like concat('',#{dzzdm},'%')
@@ -233,9 +249,17 @@
         else 5
         end) ageType
         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
+        inner join ZZ_DJXX dj on us.RYBM=dj.RYBM
         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},'%')
         <if test="dzzdm != null and dzzdm != ''">
             and us.SZDZBDM like concat('',#{dzzdm},'%')
@@ -303,52 +327,45 @@
 
     <!--学历统计-->
     <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 test="dwgzzlb == 2">
-                and us.ZWMC like '%党委副书记%'
+            where 1=1
+            <if test="dzzdm != null and dzzdm != ''">
+                and us.SZDZBDM like concat('',#{dzzdm},'%')
             </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 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 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>
 
     <!--统计三会一课-->
@@ -523,24 +540,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>
 
     <!--统计创岗建区-->

+ 15 - 5
src/main/resources/static/app/main/bigdata/showDjdsj/dwgzz.js

@@ -121,7 +121,8 @@
                     url: '../../api/bigdata/getDyxbCount',
                     params: {
                         dzzdm: $scope.selectparams.selectdzzdm,
-                        dwgzzlb: $scope.selectparams.navSelected
+                        dwgzzlb: $scope.selectparams.navSelected,
+                        is_search_leader: 1
                     }
                 }).then(function (result) {
                     $scope.dyxb_dataList.length = 0;
@@ -201,7 +202,8 @@
                     url: '../../api/bigdata/getDynlCount',
                     params: {
                         dzzdm: $scope.selectparams.selectdzzdm,
-                        dwgzzlb: $scope.selectparams.navSelected
+                        dwgzzlb: $scope.selectparams.navSelected,
+                        is_search_leader: 1
                     }
                 }).then(function (result) {
                     $scope.dynl_dataList.length = 0;
@@ -281,7 +283,8 @@
                     url: '../../api/bigdata/getDydlCount',
                     params: {
                         dzzdm: $scope.selectparams.selectdzzdm,
-                        dwgzzlb: $scope.selectparams.navSelected
+                        dwgzzlb: $scope.selectparams.navSelected,
+                        is_search_leader: 1
                     }
                 }).then(function (result) {
                     $scope.dydl_dataList.length = 0;
@@ -412,7 +415,13 @@
                         data: $scope.xueli_data,
                         center: ['30%', '50%']
                     }
-                ]
+                ],
+                tooltip: {
+                    trigger: 'item',
+                    formatter: function (data) {
+                        return data.seriesName + "<br/>" + data.name + " : " + data.value + " (" + data.percent.toFixed(0) + "%)";
+                    }
+                }
             };
             $scope.load_dyxl = function () {
                 $scope.xueli_legend_data.length = 0;
@@ -423,7 +432,8 @@
                     url: '../../api/bigdata/getUserEducationList',
                     params: {
                         dzzdm: $scope.selectparams.selectdzzdm,
-                        dwgzzlb: $scope.selectparams.navSelected
+                        dwgzzlb: $scope.selectparams.navSelected,
+                        is_search_leader: 1
                     }
                 }).then(function (result) {
                     $scope.xueli_legend_data.length = 0;