Browse Source

feat: 民主评议统计

zhangying 2 weeks ago
parent
commit
9f6fb0a0ea

+ 8 - 0
src/main/java/com/ghsc/partybuild/controller/PartyTwoController.java

@@ -1339,6 +1339,14 @@ public class PartyTwoController {
         return res;
     }
 
+    @ResponseBody
+    @GetMapping("/getMzpyTotalList")
+    public RequsetData<List<HashMap<String, Object>> > getMzpyTotalList(@RequestParam(required = false) String dzzdm) {
+        RequsetData<List<HashMap<String, Object>> > result = new RequsetData<>();
+        result.setItem(partyTwoService.getMzpyTotalList(dzzdm));
+        return result;
+    }
+
     @ResponseBody
     @GetMapping("/getleaderUserList")
     public RequsetData<PageInfo<HashMap<String, Object>> > getleaderUserList(@RequestParam("pageindex") int pageIndex, @RequestParam("pagesize") int pageSize,@RequestParam(required = false) String username,@RequestParam(required = false) Integer usertype) {

+ 5 - 0
src/main/java/com/ghsc/partybuild/mapper/PartyTwoCQuery.java

@@ -94,4 +94,9 @@ public interface PartyTwoCQuery {
     int batchInsertDnghbf(@Param("dnghbfList") List<DjDnghbf> dnghbfList);
 
     int batchInsertDnghbfmx(@Param("dnghbfmxList") List<DjDnghbfmx> dnghbfmxList);
+
+    /**
+     * 查询民主评议结果统计数据
+     */
+    List<HashMap<String, Object>> selectMzpyjgCountList(@Param("dzzdm") String dzzdm);
 }

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

@@ -117,6 +117,8 @@ public interface PartyTwoService {
     int deleteMzpyById(String id);
     // 导入民主评议
     List<ZzMzpyxxVo> importMzpy(List<ZzMzpyxxVo> dataList) throws Exception;
+    // 查询民主评议统计报表数据
+    List<HashMap<String,Object>> getMzpyTotalList(String dzzdm);
 
     PageInfo<HashMap<String, Object>> getleaderUserList(int page, int rows, String username, Integer usertype);
 

+ 30 - 0
src/main/java/com/ghsc/partybuild/service/impl/PartyTwoServiceImpl.java

@@ -1032,6 +1032,36 @@ public class PartyTwoServiceImpl implements PartyTwoService {
         return errorList;
     }
 
+    @Override
+    public List<HashMap<String, Object>> getMzpyTotalList(String dzzdm) {
+        // 查询计数统计
+        List<HashMap<String, Object>> hashMaps = partyTwoCquery.selectMzpyjgCountList(dzzdm);
+        HashMap<String, Object> countMap = new HashMap<>();
+        // 初始化 countMap 中的累加字段
+        if (!hashMaps.isEmpty()) {
+            // 初始化countMap的字段,假设所有map中的字段名是一致的
+            hashMaps.get(0).forEach((key, value) -> {
+                if (value instanceof Number) {
+                    countMap.put(key, 0); // 初始化为0
+                }
+            });
+            countMap.put("DZZMC", "合计");
+        }
+        // 计算合计数据
+        hashMaps.forEach(map -> {
+            map.forEach((key, value) -> {
+                if (value instanceof Number) {
+                    // 获取countMap中当前累加的值
+                    int currentCount = (int) countMap.getOrDefault(key, 0);
+                    // 将当前值累加到countMap中
+                    countMap.put(key, currentCount + ((Number) value).intValue());
+                }
+            });
+        });
+        hashMaps.add(countMap);
+        return hashMaps;
+    }
+
     @Override
     public PageInfo<HashMap<String, Object>> getleaderUserList(int page, int rows, String username, Integer usertype) {
         PageHelper.startPage(page, rows);

+ 40 - 0
src/main/resources/mapping/PartyTwoCQuery.xml

@@ -565,4 +565,44 @@
             select #{c.id},#{c.dnghbfid},#{c.caredate},#{c.carecontent},#{c.helpformtype},#{c.amount} FROM DUAL
         </foreach>
     </insert>
+
+    <select id="selectMzpyjgCountList" resultType="java.util.HashMap">
+        SELECT
+            zzqk.ZZQKXXBS,
+            zzqk.DZZDM,
+            zzqk.DZZMC,
+            COUNT( yxpy.MZPYXXBS ) AS yxCount,
+            COUNT( hgpy.MZPYXXBS ) AS hgCount,
+            COUNT( jbhgpy.MZPYXXBS ) AS jbhgCount,
+            COUNT( bhgpy.MZPYXXBS ) AS bhgCount,
+            COUNT( kcdjcf.MZPYXXBS ) AS kcdjcfCount,
+            COUNT( qqtdcf.MZPYXXBS ) AS qqtdcfCount,
+            COUNT( qxgzcf.MZPYXXBS ) AS qxgzcfCount,
+            COUNT( dncmcf.MZPYXXBS ) AS dncmcfCount,
+            COUNT( qtdjcf.MZPYXXBS ) AS qtdjcfCount,
+            COUNT( qtcf.MZPYXXBS ) AS qtcfCount,
+            GROUP_CONCAT( yxry.XM SEPARATOR ', ' ) AS yxmd,
+            GROUP_CONCAT( hgry.XM SEPARATOR ', ' ) AS hgmd
+        FROM
+            zz_zzqkxx zzqk
+                LEFT JOIN zz_mzpyxx yxpy ON zzqk.DZZDM = yxpy.SZDZBDM AND yxpy.PYJG = 10
+                LEFT JOIN zz_mzpyxx hgpy ON zzqk.DZZDM = hgpy.SZDZBDM AND hgpy.PYJG = 20
+                LEFT JOIN zz_mzpyxx bhgpy ON zzqk.DZZDM = bhgpy.SZDZBDM AND bhgpy.PYJG = 30
+                LEFT JOIN zz_mzpyxx jbhgpy ON zzqk.DZZDM = jbhgpy.SZDZBDM AND jbhgpy.PYJG = 40
+                LEFT JOIN zz_mzpyxx kcdjcf ON zzqk.DZZDM = kcdjcf.SZDZBDM AND kcdjcf.PYJCQK = 10
+                LEFT JOIN zz_mzpyxx qqtdcf ON zzqk.DZZDM = qqtdcf.SZDZBDM AND qqtdcf.PYJCQK = 20
+                LEFT JOIN zz_mzpyxx qxgzcf ON zzqk.DZZDM = qxgzcf.SZDZBDM AND qxgzcf.PYJCQK = 30
+                LEFT JOIN zz_mzpyxx dncmcf ON zzqk.DZZDM = dncmcf.SZDZBDM AND dncmcf.PYJCQK = 40
+                LEFT JOIN zz_mzpyxx qtdjcf ON zzqk.DZZDM = qtdjcf.SZDZBDM AND qtdjcf.PYJCQK = 50
+                LEFT JOIN zz_mzpyxx qtcf ON zzqk.DZZDM = qtcf.SZDZBDM AND qtcf.PYJCQK = 60
+                LEFT JOIN vm_ryjbxx_all yxry ON yxpy.RYBM = yxry.RYBM
+                LEFT JOIN vm_ryjbxx_all hgry ON hgpy.RYBM = hgry.RYBM
+        WHERE ZZQKXXBS != '9991000222'
+        and zzqk.DZZDM like concat('',#{dzzdm},'%')
+        GROUP BY
+            zzqk.ZZQKXXBS,
+            zzqk.DZZDM,
+            zzqk.DZZMC
+        ORDER BY DZZDM
+    </select>
 </mapper>

+ 9 - 0
src/main/resources/static/app/main/app.js

@@ -1725,6 +1725,15 @@
                     return $ocLazyLoad.load(['../main/partyTwoExt/mzpyxx/list.js?' + window.sysVersion]);
                 }]
             }
+        }).state("home.mzpxyTotalList", {
+            url: "mzpxyTotalList?dzzdm",
+            templateUrl: "../main/partyTwoExt/mzpyxx/mzpyTotal.html?" + window.sysVersion,
+            controller: "mzpxyTotalCtrl",
+            resolve: {
+                load: ['$ocLazyLoad', function ($ocLazyLoad) {
+                    return $ocLazyLoad.load(['../main/partyTwoExt/mzpyxx/mzpyTotal.js?' + window.sysVersion]);
+                }]
+            }
         }).state("home.dnghbf", {
             url: "dnghbf",
             templateUrl: "../main/partyTwoExt/dnghbf/list.html?" + window.sysVersion,

+ 100 - 0
src/main/resources/static/app/main/partyTwoExt/mzpyxx/mzpyTotal.html

@@ -0,0 +1,100 @@
+<titlemenu></titlemenu>
+<div class="dj-list">
+    <div class="dj-list-body">
+        <div party-tree data-selectdzzdm="treeparams.selectdzzdm" data-selectdzzmc="treeparams.selectdzzmc"
+             data-defaultselected="treeparams.defaultselected" data-isunfold="treeparams.isunfold"
+             data-showdxz="treeparams.showdxz"></div>
+        <div class="dj-list-content">
+            <div class="card">
+                <div activate-input activate-select class="header search-header">
+                    <div fold-partytree data-isunfold="treeparams.isunfold"></div>
+                    <div class="search-param-panel">
+                        <div class="search-input">
+                            <form class="form-horizontal">
+                                <div class="row clearfix form-inline">
+                                    <div class="col-lg-2 col-md-2 dj-label">
+                                        <label>当前选中组织</label>
+                                    </div>
+                                    <div class="col-lg-2 col-md-2">
+                                        <div class="form-group">
+                                            <div class="form-line">
+                                                <div class="input-group input-group-search">
+                                                    <input name="selectdzzmc" type="text" style="min-width: 90px"
+                                                           ng-model="treeparams.selectdzzmc" class="form-control"
+                                                           ng-disabled="true"/>
+                                                    <span class="input-group-addon"
+                                                          ng-click="setisunfold()">选择</span>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                            </form>
+                        </div>
+                        <div class="search-btn" style="margin-right: 20px;">
+                            <div style="min-width: 13em">
+                                <button class="btn btn-default1"
+                                        ng-click="search()">查询
+                                </button>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="search-btn" style="margin-right: 20px;">
+                        <div style="float: right">
+
+                        </div>
+                    </div>
+                </div>
+                <div class="body">
+                    <div class="zero-list-table-panel">
+                        <div class="zero-source-table-div">
+                            <table class="table table-bordered table-striped table-hover js-basic-example dataTable text-nowrap">
+                                <thead>
+                                <tr>
+                                    <!-- 第一行 -->
+                                    <th rowspan="2">序号</th>
+                                    <th rowspan="2">基层党组织</th>
+                                    <th colspan="6">党员评议结果</th>
+                                    <th rowspan="2">不合格党员处理情况</th>
+                                </tr>
+                                <tr>
+                                    <!-- 第二行 -->
+                                    <th>优秀名额</th>
+                                    <th>优秀名单</th>
+                                    <th>合格名额</th>
+                                    <th>合格名单</th>
+                                    <th>基本合格名额</th>
+                                    <th>不合格名额</th>
+                                </tr>
+                                </thead>
+                                <tbody>
+                                    <tr ng-repeat="it in dataList">
+                                        <th>{{$index + 1}}</th>
+                                        <th>{{it.DZZMC}}</th>
+                                        <th>{{it.yxCount}}</th>
+                                        <th>{{it.yxmd}}</th>
+                                        <th>{{it.hgCount}}</th>
+                                        <th>{{it.hgmd}}</th>
+                                        <th>{{it.jbhgCount}}</th>
+                                        <th>{{it.bhgCount}}</th>
+                                        <th>
+                                            <p>开除党籍{{it.kcdjcfCount}}人</p>
+                                            <p>劝其退党{{it.qqtdcfCount}}人</p>
+                                            <p>限期改正{{it.qxgzcfCount}}人</p>
+                                            <p>党内除名{{it.dncmcfCount}}人</p>
+                                            <p>受其他党纪处分{{it.qtdjcfCount}}人</p>
+                                            <p>受其他处置{{it.qtcfCount}}人</p>
+                                        </th>
+                                    </tr>
+                                    <tr ng-if="dataList.length==0">
+                                        <td colspan="13" style="text-align:center">暂无数据</td>
+                                    </tr>
+                                </tbody>
+                            </table>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>

+ 91 - 0
src/main/resources/static/app/main/partyTwoExt/mzpyxx/mzpyTotal.js

@@ -0,0 +1,91 @@
+(function ($app) {
+    $app.module('gtPartyApp').controller('mzpxyTotalCtrl', function ($scope, $http, $modal, $ocLazyLoad, $alert, $loading, $state, $bsRouterState, AuthUser) {
+        $state.params = $bsRouterState.$params($scope);
+        $scope.isShow = false;
+        $scope.moreTxt = "更多";
+
+        //定义数据集合
+        $scope.loginUserId = AuthUser.getUser().Id;
+        $scope.dataList = []; //列表数据
+
+        //组织树参数
+        $scope.treeparams = {
+            isunfold: false,//组织结构树展开收缩
+            selectdzzdm: "",
+            selectdzzmc: "",
+            defaultselected: $state.params.dzzdm,
+            showdxz: 0
+        };
+
+        //查询参数
+        $scope.selectparams = {
+            pageindex: 1,
+            pagesize: 10,
+            dzzdm: '',//党组织代码
+        };
+        $scope.resetparams = {};
+        angular.extend($scope.resetparams, $scope.selectparams);
+
+        $scope.$watch("treeparams.selectdzzdm", function (newVal, oldVal) {
+            if (newVal != "") {
+
+                if ($scope.treeparams.defaultselected != "" && $scope.treeparams.defaultselected != null &&
+                    $scope.treeparams.defaultselected != $scope.treeparams.selectdzzdm)
+                    return;
+
+                $scope.selectparams.dzzdm = $scope.treeparams.selectdzzdm;
+                $scope.resetparams.dzzdm = $scope.treeparams.selectdzzdm;
+
+                $scope.loadData();
+            }
+        });
+
+        //查询
+        $scope.search = function () {
+            $scope.loadData();
+        };
+
+        //加载列表数据
+        $scope.loadData = function () {
+            $http
+            ({
+                method: 'get', url: '../../api/partyTowExt/getMzpyTotalList', params: $scope.selectparams
+            }).then(function (result) {
+                $scope.dataList = result.data.item;
+            });
+        };
+
+        $scope.showMsg = function (title, content) {
+            $alert({
+                title: title + ':',
+                content: content,
+                placement: 'top',
+                type: 'info',
+                show: true,
+                duration: 3
+            });
+
+        };
+
+        $scope.isShowClick = function () {
+            $scope.isShow = !$scope.isShow;
+            if ($scope.moreTxt == "更多") {
+                $scope.moreTxt = "收起";
+            } else if ($scope.moreTxt == "收起") {
+                $scope.moreTxt = "更多";
+            }
+        };
+        $scope.setisunfold = function () {
+            $scope.treeparams.isunfold = !$scope.treeparams.isunfold;
+            $scope.$emit('menudatas.toggle', !$scope.treeparams.isunfold);
+        };
+        $scope.resetSearch = function () {
+            $scope.selectparams = {};
+
+            angular.extend($scope.selectparams, $scope.resetparams);
+            $scope.loadData();
+        }
+
+        $scope.search();
+    });
+})(angular);