diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/group/GroupDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/group/GroupDataDao.java index fae2cfd223..80776d8798 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/group/GroupDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/group/GroupDataDao.java @@ -7,6 +7,7 @@ import com.epmet.dto.group.form.GridGroupTotalFormDTO; import com.epmet.dto.group.form.GroupIncrFormDTO; import com.epmet.dto.group.result.*; import com.epmet.dto.indexcollect.result.CpcIndexCommonDTO; +import com.epmet.dto.indexcollect.result.GridIndexCommonDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -100,4 +101,13 @@ public interface GroupDataDao { * @return com.epmet.dto.indexcollect.result.CpcIndexCommonDTO */ List selectUserSignedCount(@Param("customerId")String customerId, @Param("monthId")String monthId); + + /** + * 网格相关:组织“三会一课”次数: 当前网格下 满足【未取消的活动 and 签到记录>1 and 活动开始时间在当前时间维度内】 +1 + * + * @param customerId + * @param monthId + * @return com.epmet.dto.indexcollect.result.CpcIndexCommonDTO + */ + List selectCountGridCreateThreeMeets(@Param("customerId")String customerId, @Param("monthId")String monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalGridIndexServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalGridIndexServiceImpl.java index 474456ec41..ef869f7941 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalGridIndexServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalGridIndexServiceImpl.java @@ -8,6 +8,7 @@ import com.epmet.dto.extract.form.GovernAbilityGridMonthlyFormDTO; import com.epmet.dto.extract.form.GridIssueCountResultDTO; import com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO; import com.epmet.dto.extract.result.*; +import com.epmet.dto.indexcollect.result.GridIndexCommonDTO; import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity; import com.epmet.service.evaluationindex.extract.dataToIndex.CalGridIndexService; import com.epmet.service.evaluationindex.extract.todata.*; @@ -15,6 +16,7 @@ import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthl import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyService; import com.epmet.service.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyService; import com.epmet.service.evaluationindex.screen.ScreenCustomerGridService; +import com.epmet.service.group.GroupDataService; import com.epmet.service.heart.ActInfoService; import com.epmet.service.partymember.PartyMemberService; import com.epmet.service.stats.FactArticlePublishedGridDailyService; @@ -29,7 +31,10 @@ import org.springframework.util.CollectionUtils; import java.math.BigDecimal; import java.text.NumberFormat; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; @@ -71,6 +76,8 @@ public class CalGridIndexServiceImpl implements CalGridIndexService { private PartyMemberService partyMemberService; @Autowired private ScreenCustomerGridService gridService; + @Autowired + private GroupDataService groupDataService; /** * @Description 计算网格指标党建能力 @@ -131,8 +138,8 @@ public class CalGridIndexServiceImpl implements CalGridIndexService { } // 组织“三会一课”次数 前网格下 满足【未取消的活动 and 签到记录>1 and 活动开始时间在当前时间维度内】 +1 - // 党员参加“三会一课”人次 :本网格内注册的党员,在本月内活动签到次数 Map createThreeMeetsCountMap=getCreateThreeMeetsCountMap(customerId,monthId); + // 党员参加“三会一课”人次 :本网格内注册的党员,在本月内活动签到次数 Map joinThreeMeetsCountMap=getJoinThreeMeetsCountMap(customerId,monthId); String quarterId = DateUtils.getQuarterId(monthId); @@ -239,19 +246,24 @@ public class CalGridIndexServiceImpl implements CalGridIndexService { return true; } - - private Map getJoinThreeMeetsCountMap(String customerId, String monthId) { + private Map getCreateThreeMeetsCountMap(String customerId, String monthId) { // 组织“三会一课”次数 前网格下 满足【未取消的活动 and 签到记录>1 and 活动开始时间在当前时间维度内】 +1 - // todo - return null; + //查询小组活动签到表,计算用户在本月内签到的活动次数 + List list=groupDataService.selectCountGridCreateThreeMeets(customerId,monthId); + Map resultMap = new HashMap<>(); + for (GridIndexCommonDTO gridIndexCommonDTO : list) { + resultMap.put(gridIndexCommonDTO.getGridId(), gridIndexCommonDTO.getIndexValue()); + } + return resultMap; } - private Map getCreateThreeMeetsCountMap(String customerId, String monthId) { + private Map getJoinThreeMeetsCountMap(String customerId, String monthId) { // 党员参加“三会一课”人次 :本网格内注册的党员,在本月内活动签到次数 // todo return null; } + /** * @Description 计算网格指标治理能力 * @param customerId diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/group/GroupDataService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/group/GroupDataService.java index 6be5b22324..b1a07d9941 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/group/GroupDataService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/group/GroupDataService.java @@ -3,6 +3,7 @@ package com.epmet.service.group; import com.epmet.dto.extract.FactOriginGroupMainDailyDTO; import com.epmet.dto.group.result.*; import com.epmet.dto.indexcollect.result.CpcIndexCommonDTO; +import com.epmet.dto.indexcollect.result.GridIndexCommonDTO; import com.epmet.util.DimIdGenerator; import org.apache.ibatis.annotations.Param; @@ -75,4 +76,13 @@ public interface GroupDataService { * @return com.epmet.dto.indexcollect.result.CpcIndexCommonDTO */ List selectJoinThreeMeetsCount(String customerId, String monthId); + + /** + * 网格相关:组织“三会一课”次数: 当前网格下 满足【未取消的活动 and 签到记录>1 and 活动开始时间在当前时间维度内】 +1 + * + * @param customerId + * @param monthId + * @return com.epmet.dto.indexcollect.result.CpcIndexCommonDTO + */ + List selectCountGridCreateThreeMeets(String customerId, String monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/group/impl/GroupDataServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/group/impl/GroupDataServiceImpl.java index 550c0d73e8..d0a87ed295 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/group/impl/GroupDataServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/group/impl/GroupDataServiceImpl.java @@ -11,6 +11,7 @@ import com.epmet.dto.group.form.GridGroupTotalFormDTO; import com.epmet.dto.group.form.GroupIncrFormDTO; import com.epmet.dto.group.result.*; import com.epmet.dto.indexcollect.result.CpcIndexCommonDTO; +import com.epmet.dto.indexcollect.result.GridIndexCommonDTO; import com.epmet.service.group.GroupDataService; import com.epmet.util.DimIdGenerator; import org.springframework.beans.BeanUtils; @@ -222,5 +223,17 @@ public class GroupDataServiceImpl implements GroupDataService { return groupDataDao.selectUserSignedCount(customerId,monthId); } + /** + * 网格相关:组织“三会一课”次数: 当前网格下 满足【未取消的活动 and 签到记录>1 and 活动开始时间在当前时间维度内】 +1 + * + * @param customerId + * @param monthId + * @return com.epmet.dto.indexcollect.result.CpcIndexCommonDTO + */ + @Override + public List selectCountGridCreateThreeMeets(String customerId, String monthId) { + return groupDataDao.selectCountGridCreateThreeMeets(customerId,monthId); + } + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/group/GroupDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/group/GroupDataDao.xml index a5de0e01ab..d8ed5a56df 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/group/GroupDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/group/GroupDataDao.xml @@ -234,4 +234,22 @@ GROUP BY m.SIGN_USER_ID + + + \ No newline at end of file