Jelajahi Sumber

大数据-党务工作者统计

pengjing 4 bulan lalu
induk
melakukan
920e638cc4

+ 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

+ 28 - 0
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},'%')
@@ -188,6 +195,13 @@
         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},'%')
@@ -239,6 +253,13 @@
         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},'%')
@@ -314,6 +335,13 @@
             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>
             where 1=1
             <if test="dzzdm != null and dzzdm != ''">
                 and us.SZDZBDM like concat('',#{dzzdm},'%')

+ 8 - 4
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;
@@ -423,7 +426,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;