From 72c41a8bb4210d9c8f87be7b99ea7c180a5d40e9 Mon Sep 17 00:00:00 2001
From: luoyuanqiao <2376770955@qq.com>
Date: 星期四, 24 二月 2022 16:08:12 +0800
Subject: [PATCH] 党支部统计接口

---
 springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java |   23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java
index c94500d..0b2bfec 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java
@@ -1,5 +1,6 @@
 package com.panzhihua.service_dangjian.service.impl;
 
+import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -763,8 +764,6 @@
                     statisticsOrgVo.setEasyNum(statisticsMap.get("cumulativeEasyNum").toString());
                 }
             }
-
-
         }
         statisticsOrgVo.setCompleteEasyList(completeEasyList);
         statisticsOrgVo.setCompleteWishList(completeWishList);
@@ -773,4 +772,24 @@
         return R.ok(statisticsOrgVo);
     }
 
+    /**
+     * 查询党组织表头统计数据
+     * @param communityId
+     *            社区id
+     * @return  党组织表头统计数据
+     */
+    @Override
+    public R getHeaderOrgDataStatistics(Long communityId) {
+        ComDataStatisticsHeaderOrgVo headerOrgVo = comPbMemberDAO.getHeaderOrgDataStatistics(communityId);
+        if(headerOrgVo != null){
+            if(headerOrgVo.getOrgNum() == null || headerOrgVo.getOrgNum().equals(0)){
+                headerOrgVo.setVillageRate(BigDecimal.ZERO);
+            }else{
+                headerOrgVo.setVillageRate(BigDecimal.valueOf(headerOrgVo.getAreaNum()).divide(BigDecimal.valueOf(headerOrgVo.getOrgNum())
+                        ,4,BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100)));
+            }
+        }
+        return R.ok(headerOrgVo);
+    }
+
 }

--
Gitblit v1.7.1