Jelajahi Sumber

Merge remote-tracking branch 'origin/master'

lizeyu 7 bulan lalu
induk
melakukan
3a29472143

+ 6 - 0
src/main/java/com/ghsc/partybuild/controller/BigDataController.java

@@ -530,4 +530,10 @@ public class BigDataController {
         return bigDataService.getPartyUserStatusTotalList();
     }
 
+    @ResponseBody
+    @GetMapping("/getZzpxqkList")
+    public List<HashMap<String, Object>> getZzpxqkList() {
+        return bigDataService.getZzpxqkList();
+    }
+
 }

+ 2 - 0
src/main/java/com/ghsc/partybuild/mapper/BigDataCQuery.java

@@ -212,4 +212,6 @@ public interface BigDataCQuery {
 
     List<HashMap<String,Object>>selectPartyUserStatusTotalList();
 
+    List<HashMap<String, Object>> selectZzpxqkList();
+
 }

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

@@ -358,4 +358,6 @@ public interface BigDataService {
 
     List<HashMap<String, Object>> getPartyUserStatusTotalList();
 
+    List<HashMap<String, Object>> getZzpxqkList();
+
 }

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

@@ -1,5 +1,6 @@
 package com.ghsc.partybuild.service.impl;
 
+import com.ghsc.partybuild.util.DateUtils;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.ghsc.partybuild.AppConfig;
@@ -9,10 +10,7 @@ import com.ghsc.partybuild.service.BigDataService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
+import java.util.*;
 
 /**
  * 大数据
@@ -44,6 +42,9 @@ public class BigDataServiceImpl implements BigDataService {
     @Autowired
     private DsjDyfzqkMapper dsjDyfzqkMapper;
 
+    @Autowired
+    private DateUtils dateUtils;
+
     /**
      * @return java.util.List<com.ghsc.partybuild.model.DsjDydt>
      * @Description //TODO 查询大数据-党员动态
@@ -315,7 +316,7 @@ public class BigDataServiceImpl implements BigDataService {
     }
 
     /**
-     * @return java.util.HashMap<java.lang.String                               ,                               java.lang.Object>
+     * @return java.util.HashMap<java.lang.String, java.lang.Object>
      * @Description //TODO 统计党员性别
      * @Date 9:49 2019/6/24
      * @Param []
@@ -326,7 +327,7 @@ public class BigDataServiceImpl implements BigDataService {
     }
 
     /**
-     * @return java.util.HashMap<java.lang.String                               ,               java.lang.Object>
+     * @return java.util.HashMap<java.lang.String, java.lang.Object>
      * @Description //TODO 统计党员年龄
      * @Date 9:49 2019/6/24
      * @Param []
@@ -337,7 +338,7 @@ public class BigDataServiceImpl implements BigDataService {
     }
 
     /**
-     * @return java.util.HashMap<java.lang.String                               ,               ava.lang.Object>
+     * @return java.util.HashMap<java.lang.String, ava.lang.Object>
      * @Description //TODO 统计党员党龄
      * @Date 14:39 2019/6/24
      * @Param [dzzdm]
@@ -348,7 +349,7 @@ public class BigDataServiceImpl implements BigDataService {
     }
 
     /**
-     * @return java.util.HashMap<java.lang.String                                                               ,                                                               java.lang.Object>
+     * @return java.util.HashMap<java.lang.String, java.lang.Object>
      * @Description //TODO 统计政工职务党员
      * @Date 10:27 2019/6/25
      * @Param []
@@ -457,8 +458,35 @@ public class BigDataServiceImpl implements BigDataService {
     }
 
     @Override
-    public List<HashMap<String,Object>>getPartyUserStatusTotalList(){
+    public List<HashMap<String, Object>> getPartyUserStatusTotalList() {
         return bigDataCquery.selectPartyUserStatusTotalList();
     }
 
+    @Override
+    public List<HashMap<String, Object>> getZzpxqkList() {
+        List<HashMap<String, Object>> list = bigDataCquery.selectZzpxqkList();
+
+        List<HashMap<String, Object>> result = new ArrayList<>();
+
+        Integer nowYear = dateUtils.dateToLocalDate(new Date()).getYear();
+        Integer startYear = nowYear - 4;
+
+        for (Integer year = startYear; year <= nowYear; year++) {
+            HashMap<String, Object> data = new HashMap<>();
+            data.put("year", year);
+
+            Integer finalYear = year;
+            HashMap<String, Object> dbData = list.stream().filter(e -> e.get("year").toString().equals(finalYear.toString())).findFirst().orElse(null);
+            if (dbData != null) {
+                data.put("count", dbData.get("count"));
+            } else {
+                data.put("count", 0);
+            }
+
+            result.add(data);
+        }
+
+        return result;
+    }
+
 }

+ 4 - 0
src/main/resources/mapping/BigDataCQuery.xml

@@ -754,4 +754,8 @@
         where 1=1 and (usfb.ISARCHIVE is null or usfb.ISARCHIVE = 0)
         group by t.partyCode,t.partyName,fb.zzlb,t.userStatus,t.userStatusName
     </select>
+
+    <select id="selectZzpxqkList" resultType="java.util.HashMap">
+        select year(honourtime) as year,count(1) as count from dj_dnpxxx where pxlx=2 group by year(honourtime)
+    </select>
 </mapper>

+ 9 - 2
src/main/resources/static/app/main/bigdata/showDjdsj/css/style.css

@@ -29,6 +29,13 @@
 	box-shadow:inset 0 0 1px #FFF3B3,inset 0 0 20px rgba(248,181,81,.2);
 	position: relative;
 }
+
+.box-2{
+	width:100%;
+	padding: 10px 5px;
+	position: relative;
+}
+
 .b-1{ height: 500px; overflow: hidden;}
 .b-2{ height: 410px; top:90px; }
 
@@ -43,7 +50,7 @@
 .list-2 table td{ width:33.33%;}
 
 .b-3{ margin-top: 15px; float: left; overflow: hidden;}
-.box h1{  font-size: 22px; color: #fff; float: left; padding-bottom: 10px;}
+.box h1,.box-2 h1{  font-size: 22px; color: #fff; float: left; padding-bottom: 10px;}
 .b-3 p,.b-5 p{ font-size: 16px; margin-bottom: 10px; float: left; margin-left: 10px;margin-top: 5px;}
 .b-3 h2,.b-5 h2{ font-size: 24px; color: #ffc196; line-height: 20px; float: left;margin-top: 5px;}
 .charts,.charts2,.charts3,.charts4,.charts5{ width:100%; float: left; /*background: #333;*/}
@@ -76,7 +83,7 @@
 .nav-number:before{ content: ""; width:15px; height: 1px; background: #FFF3B3; position: absolute; top:50%; left: -15px; margin-top: -1px;}
 .nav-number:after{ content: ""; width:15px; height: 1px; background: #FFF3B3; position: absolute; top:50%; right: -15px; margin-top: -1px;}
 
-.map-content{ width:100%; display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; position: relative; top:-10%;}
+.map-content{ width:100%; display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; position: relative; top:-80px;}
 .map-content .map-box{ width:33.33%; padding: 0 3%; }
 .map-content .map-box h3{ font-size: 18px; text-align: center;}
 .map-content .map-box .map{ width:100%; height: 230px;}

+ 5 - 5
src/main/resources/static/app/main/bigdata/showDjdsj/home.html

@@ -80,10 +80,10 @@
                     </tr>
                 </table>
             </div>-->
-            <div class="box b-3">
+            <div class="box-2 b-3">
                 <h1>组织评先情况</h1>
                 <!-- 图表容器 -->
-                <div e-chart ec-data="dzzfbqk_barOption" class="charts2"></div>
+                <div e-chart ec-data="zzpxqk_barOption" style="height: 200px;"></div>
             </div>
         </div>
         <div class="box b-3" style="height: calc(100% - 510px);">
@@ -113,14 +113,14 @@
             </div>
 
             <div class="map-content">
-                <div class="box">
+                <div class="box-2">
                     <!-- 图表容器 -->
-                    <div e-chart ec-data="dyTotal_barOption" style="height: 300px !important;"></div>
+                    <div e-chart ec-data="dyTotal_barOption" style="height: 340px !important;"></div>
                 </div>
             </div>
         </div>
 
-        <div class="bottom" style="height: calc(100% - 150px);">
+        <div class="bottom" style="height: calc(100% - 90px);">
             <div class="box b-5 b-all" style="width: 100%;margin: 0px;">
                 <h1>发展党员</h1>
                 <div class="text-all">

+ 32 - 76
src/main/resources/static/app/main/bigdata/showDjdsj/home.js

@@ -116,7 +116,6 @@
 
         //图标取数begin
         {
-            //评先评优
             $scope.dyTotal_x_dataList = [];
             $scope.dyTotal_y_dataList = [
                 {
@@ -172,8 +171,10 @@
                 },
                 series: $scope.dyTotal_y_dataList,
                 grid: {
-                    top: 20,
+                    top: 10,
                     bottom: 25,
+                    left:15,
+                    right: 15,
                     containLabel: true
                 }
             };
@@ -225,47 +226,11 @@
             };
             $scope.load_dyTotal();
 
-            //党组织分布情况
-            $scope.dzzfbqk_dataList = [];
-            $scope.dzzfbqk_nameList = [];
-            /* $scope.dzzfbqk_barOption = {
-                 color: ["#4565f4"],
-                 tooltip: {
-                     trigger: 'axis',
-                     axisPointer: {            // 坐标轴指示器,坐标轴触发有效
-                         type: 'shadow'        // 默认为直线,可选为:'line' | 'shadow'
-                     },
-                     formatter: "{a} <br/>{b} : {c}"
-                 },
-                 xAxis: {
-                     type: "category",
-                     axisLabel: {
-                         color: '#597ca4',
-                         rotate: 45
-                     },
-                     data: $scope.dzzfbqk_nameList
-                 },
-                 yAxis: {
-                     type: "value",
-                     axisLabel: {
-                         color: '#597ca4'
-                     }
-                 },
-                 series: [
-                     {
-                         name: '党组织分布情况',
-                         data: $scope.dzzfbqk_dataList,
-                         type: "bar",
-                         barWidth: 30
-                     }
-                 ],
-                 grid: {
-                     top: 20,
-                     bottom: 10,
-                     containLabel: true
-                 }
-             };*/
-            $scope.dzzfbqk_barOption = {
+            //评先评优
+            $scope.zzpxqk_dataList = [];
+            $scope.zzpxqk_nameList = [];
+            $scope.zzpxqk_barOption = {
+                color: ['#F8B551'],
                 tooltip: {
                     trigger: 'axis',
                     axisPointer: {            // 坐标轴指示器,坐标轴触发有效
@@ -274,65 +239,56 @@
                     formatter: "{a} <br/>{b} : {c}"
                 },
                 xAxis: {
-                    type: 'value',
-                    name: '数量',
+                    type: "category",
                     axisLabel: {
-                        formatter: '{value}',
                         color: '#fff'
                     },
-                    axisTick: {       //y轴刻度线
-                        show: false
-                    },
-                    splitLine: {     //网格线
-                        show: false
-                    }
+                    data: $scope.zzpxqk_nameList
                 },
                 yAxis: {
-                    type: 'category',
-                    inverse: true,
+                    type: "value",
                     axisLabel: {
                         color: '#fff'
                     },
-                    data: $scope.dzzfbqk_nameList
+                    axisTick:{       //y轴刻度线
+                        show:false
+                    },
+                    splitLine: {     //网格线
+                        show: false
+                    },
+                    splitNumber: 1
                 },
                 series: [
                     {
-                        name: '党组织分布情况',
-                        data: $scope.dzzfbqk_dataList,
+                        name: '组织评先情况',
+                        data: $scope.zzpxqk_dataList,
                         type: "bar",
-                        barWidth: 15,
-                        itemStyle: {
-                            normal: {
-                                color: function (params) {
-                                    var colorList = ['#F8B551', '#918879', '#EFF0C7', '#91C7AE', '#DCDCDC', '#F0FFFF'];
-                                    return colorList[params.dataIndex];
-                                }
-                            }
-                        }
+                        barWidth: 30
                     }
                 ],
                 grid: {
-                    top: 20,
-                    bottom: 10,
-                    containLabel: true
+                    top: 30,
+                    bottom: 50,
+                    left:18,
+                    right: 10,
                 }
             };
-            $scope.load_dzzfbqk = function () {
+            $scope.load_zzpxqk = function () {
                 $http
                 ({
                     method: 'get',
-                    url: '../../api/bigdata/getDzzfbqkList',
+                    url: '../../api/bigdata/getZzpxqkList',
                     params: {}
                 }).then(function (result) {
                     if (result.data != null && result.data.length > 0) {
                         angular.forEach(result.data, function (val) {
-                            $scope.dzzfbqk_nameList.push(val.ZZFBMC);
-                            $scope.dzzfbqk_dataList.push(val.FBSL);
+                            $scope.zzpxqk_nameList.push(val.year);
+                            $scope.zzpxqk_dataList.push(val.count);
                         });
                     }
                 });
             };
-            $scope.load_dzzfbqk();
+            $scope.load_zzpxqk();
 
             //发展党员情况
             $scope.fzdyqk_dataList = [];
@@ -440,7 +396,7 @@
                             }
                         },
                         data: $scope.dyxb_dataList,
-                        center: ['30%', '50%']
+                        center: ['30%', '55%']
                     }
                 ],
                 tooltip: {
@@ -521,7 +477,7 @@
                             }
                         },
                         data: $scope.shyk_dataList,
-                        center: ['30%', '50%']
+                        center: ['30%', '55%']
                     }
                 ],
                 tooltip: {

+ 1 - 1
src/main/resources/static/app/main/index-dsj.html

@@ -121,7 +121,7 @@
                     var WindoHeit = $(window).height();
 
                     $cbox.css({'height': '' + WindoHeit-775 + 'px'});
-                    $cbox2.css({'height': '' + WindoHeit-776 + 'px'});
+                    $cbox2.css({'height': '' + WindoHeit-706 + 'px'});
                     $cbox3.css({'height': '' + WindoHeit/3-156 + 'px'});
                     $cbox4.css({'height': '' + WindoHeit-750 + 'px'});
                     $cbox5.css({'height': '' + WindoHeit/3-155 + 'px'});