|
|
@ -7,6 +7,7 @@ import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthly |
|
|
|
import com.epmet.service.evaluationindex.extract.dataToIndex.CalCpcIndexService; |
|
|
|
import com.epmet.service.evaluationindex.extract.todata.*; |
|
|
|
import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyService; |
|
|
|
import com.epmet.service.group.GroupDataService; |
|
|
|
import com.epmet.service.stats.DimCustomerPartymemberService; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
@ -43,6 +44,8 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService { |
|
|
|
private FactIndexPartyAblityCpcMonthlyService factIndexPartyAblityCpcMonthlyService; |
|
|
|
@Autowired |
|
|
|
private FactOriginGroupMainDailyService factOriginGroupMainDailyService; |
|
|
|
@Autowired |
|
|
|
private GroupDataService groupDataService; |
|
|
|
|
|
|
|
/** |
|
|
|
* @param customerId 客户id |
|
|
@ -54,7 +57,7 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService { |
|
|
|
**/ |
|
|
|
@Override |
|
|
|
public void calCpcPartyAbility(String customerId, String monthId) { |
|
|
|
//1、构造初始值
|
|
|
|
//1、构造初始值 当前客户下所有的党员
|
|
|
|
List<FactIndexPartyAblityCpcMonthlyEntity> indexPartyAblityCpcList = dimCustomerPartymemberService.selectPartyMemberList(customerId); |
|
|
|
if (CollectionUtils.isEmpty(indexPartyAblityCpcList)) { |
|
|
|
log.info("dim_customer_partymember do not any records customerId="+customerId); |
|
|
@ -71,7 +74,8 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService { |
|
|
|
Map<String, Integer> shiftIssueCountMap = calShiftIssueCount(customerId, monthId); |
|
|
|
//4、党员提出的议题转项目数
|
|
|
|
Map<String, Integer> shiftProjectCountMap = calShiftProjectCount(customerId, monthId); |
|
|
|
//5、参加“三会一课”次数 默认0
|
|
|
|
//5、参加“三会一课”次数 默认0 :当前用户在本月内活动签到次数 限制活动分类编码100001 三会一课
|
|
|
|
Map<String,Integer> joinThreeMeetsCountMap=calJoinThreeMeetsCount(customerId,monthId); |
|
|
|
|
|
|
|
//可以先查询出每个党员的 自建群
|
|
|
|
Map<String, List<String>> userCreatedGroups = queryUserCreatedGroups(customerId, indexPartyAblityCpcList); |
|
|
@ -105,7 +109,10 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService { |
|
|
|
if (shiftProjectCountMap.containsKey(indexPartyAblityCpcEntity.getUserId())) { |
|
|
|
indexPartyAblityCpcEntity.setShiftProjectCount(shiftProjectCountMap.get(indexPartyAblityCpcEntity.getUserId())); |
|
|
|
} |
|
|
|
//5、参加“三会一课”次数 目前没有此业务,默认0
|
|
|
|
//5、参加“三会一课”次数 目前没有此业务,默认0 : 当前用户在本月内活动签到次数 限制活动分类编码100001 三会一课
|
|
|
|
if(joinThreeMeetsCountMap.containsKey(indexPartyAblityCpcEntity.getUserId())){ |
|
|
|
indexPartyAblityCpcEntity.setJoinThreeMeetsCount(joinThreeMeetsCountMap.get(indexPartyAblityCpcEntity.getUserId())); |
|
|
|
} |
|
|
|
//6、党员自建群群众人数
|
|
|
|
if (groupUserCountMap.containsKey(indexPartyAblityCpcEntity.getUserId())) { |
|
|
|
indexPartyAblityCpcEntity.setGroupUserCount(groupUserCountMap.get(indexPartyAblityCpcEntity.getUserId())); |
|
|
@ -220,6 +227,24 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService { |
|
|
|
return resultMap; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @return java.util.Map<java.lang.String,java.lang.Integer> |
|
|
|
* @param customerId |
|
|
|
* @param monthId |
|
|
|
* @author yinzuomei |
|
|
|
* @description 5:参加“三会一课”次数 : 当前用户在本月内活动签到次数 限制活动分类编码100001 三会一课 |
|
|
|
* @Date 2021/5/12 13:38 |
|
|
|
**/ |
|
|
|
private Map<String, Integer> calJoinThreeMeetsCount(String customerId, String monthId) { |
|
|
|
//查询小组活动签到表,计算用户在本月内签到的活动次数
|
|
|
|
List<CpcIndexCommonDTO> list=groupDataService.selectJoinThreeMeetsCount(customerId,monthId); |
|
|
|
Map<String, Integer> resultMap = new HashMap<>(); |
|
|
|
for (CpcIndexCommonDTO cpcIndexCommonDTO : list) { |
|
|
|
resultMap.put(cpcIndexCommonDTO.getUserId(), cpcIndexCommonDTO.getIndexValue()); |
|
|
|
} |
|
|
|
return resultMap; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @param customerId |
|
|
|
* @param monthId |
|
|
|