Browse Source

网格相关:党员参加“三会一课”人次

master
yinzuomei 4 years ago
parent
commit
ca96a3f348
  1. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/PartyMemberInfoResultDTO.java
  2. 20
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/result/PartyJoinThreeMeetDTO.java
  3. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimCustomerPartymemberDao.java
  4. 41
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalGridIndexServiceImpl.java
  5. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimCustomerPartymemberService.java
  6. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerPartymemberServiceImpl.java
  7. 12
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerPartymemberDao.xml

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/PartyMemberInfoResultDTO.java

@ -48,4 +48,9 @@ public class PartyMemberInfoResultDTO implements Serializable {
* 机关名称
*/
private String agencyName;
/**
* 党员的用户id
*/
private String userId;
}

20
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/result/PartyJoinThreeMeetDTO.java

@ -0,0 +1,20 @@
package com.epmet.dto.indexcollect.result;
import lombok.Data;
import java.io.Serializable;
/**
* 网格相关党员参加三会一课人次
*
* @author yinzuomei@elink-cn.com
* @date 2021/5/13 10:50
*/
@Data
public class PartyJoinThreeMeetDTO implements Serializable {
private static final long serialVersionUID = 3027535602832948917L;
private String gridId;
private String userId;
private Integer joinThreeMeetsCount;
}

8
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimCustomerPartymemberDao.java

@ -100,4 +100,12 @@ public interface DimCustomerPartymemberDao extends BaseDao<DimCustomerPartymembe
* @Date 2020/9/24 14:31
**/
List<String> selectPartyMemberUserIdsByPids(@Param("customerId") String customerId, @Param("pids")String pids);
/**
* 查询当前客户下所有注册的党员
*
* @param customerId
* @return 返回网格id用户id
*/
List<PartyMemberInfoResultDTO> selectPartyMemberInfoByCustomerId(@Param("customerId")String customerId);
}

41
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalGridIndexServiceImpl.java

@ -1,6 +1,7 @@
package com.epmet.service.evaluationindex.extract.dataToIndex.impl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.ExtractConstant;
import com.epmet.constant.ProjectEvaluateConstant;
@ -8,7 +9,9 @@ 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.CpcIndexCommonDTO;
import com.epmet.dto.indexcollect.result.GridIndexCommonDTO;
import com.epmet.dto.indexcollect.result.PartyJoinThreeMeetDTO;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity;
import com.epmet.service.evaluationindex.extract.dataToIndex.CalGridIndexService;
import com.epmet.service.evaluationindex.extract.todata.*;
@ -19,6 +22,7 @@ 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.DimCustomerPartymemberService;
import com.epmet.service.stats.FactArticlePublishedGridDailyService;
import com.epmet.service.stats.user.FactRegUserGridMonthlyService;
import com.epmet.service.user.UserService;
@ -78,6 +82,8 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
private ScreenCustomerGridService gridService;
@Autowired
private GroupDataService groupDataService;
@Autowired
private DimCustomerPartymemberService dimCustomerPartymemberService;
/**
* @Description 计算网格指标党建能力
@ -140,7 +146,7 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
// 组织“三会一课”次数 前网格下 满足【未取消的活动 and 签到记录>1 and 活动开始时间在当前时间维度内】 +1
Map<String,Integer> createThreeMeetsCountMap=getCreateThreeMeetsCountMap(customerId,monthId);
// 党员参加“三会一课”人次 :本网格内注册的党员,在本月内活动签到次数
Map<String,Integer> joinThreeMeetsCountMap=getJoinThreeMeetsCountMap(customerId,monthId);
List<PartyJoinThreeMeetDTO> joinThreeMeetsCountList=getJoinThreeMeetsCountMap(customerId,monthId);
String quarterId = DateUtils.getQuarterId(monthId);
String yearId = DateUtils.getYearId(monthId);
@ -234,8 +240,14 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
r.setCreateThreeMeetsCount(createThreeMeetsCountMap.get(r.getGridId()));
}
// 党员参加“三会一课”人次 :本网格内注册的党员,在本月内活动签到次数
if (joinThreeMeetsCountMap.containsKey(r.getGridId())) {
r.setJoinThreeMeetsCount(joinThreeMeetsCountMap.get(r.getGridId()));
if (!CollectionUtils.isEmpty(joinThreeMeetsCountList)) {
Integer joinThreeMeetsCount = NumConstant.ZERO;
for (PartyJoinThreeMeetDTO dto : joinThreeMeetsCountList) {
if (dto.getGridId().equals(r.getGridId())) {
joinThreeMeetsCount += dto.getJoinThreeMeetsCount();
}
}
r.setJoinThreeMeetsCount(joinThreeMeetsCount);
}
});
delPartyAbility(customerId, monthId);
@ -257,13 +269,28 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
return resultMap;
}
private Map<String, Integer> getJoinThreeMeetsCountMap(String customerId, String monthId) {
private List<PartyJoinThreeMeetDTO> getJoinThreeMeetsCountMap(String customerId, String monthId) {
List<PartyJoinThreeMeetDTO> partyJoinThreeMeetDTOList = new ArrayList<>();
// 党员参加“三会一课”人次 :本网格内注册的党员,在本月内活动签到次数
// todo
return null;
//1、查询出当前客户下注册的党员
List<PartyMemberInfoResultDTO> list = dimCustomerPartymemberService.selectPartyMemberInfoByCustomerId(customerId);
if (!CollectionUtils.isEmpty(list)) {
partyJoinThreeMeetDTOList = ConvertUtils.sourceToTarget(list, PartyJoinThreeMeetDTO.class);
//2、查询出所有用户本月签到次数
List<CpcIndexCommonDTO> userList = groupDataService.selectJoinThreeMeetsCount(customerId, monthId);
for (PartyJoinThreeMeetDTO partyJoinThreeMeetDTO : partyJoinThreeMeetDTOList) {
partyJoinThreeMeetDTO.setJoinThreeMeetsCount(NumConstant.ZERO);
for (CpcIndexCommonDTO cpcIndexCommonDTO : userList) {
if (partyJoinThreeMeetDTO.getUserId().equals(cpcIndexCommonDTO.getUserId())) {
partyJoinThreeMeetDTO.setJoinThreeMeetsCount(cpcIndexCommonDTO.getIndexValue());
break;
}
}
}
}
return partyJoinThreeMeetDTOList;
}
/**
* @Description 计算网格指标治理能力
* @param customerId

8
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimCustomerPartymemberService.java

@ -131,4 +131,12 @@ public interface DimCustomerPartymemberService extends BaseService<DimCustomerPa
* @Date 2020/9/23 14:18
**/
List<String> getPartyMemberUserIds(String customerId, String type,String orgId);
/**
* 查询当前客户下所有注册的党员
*
* @param customerId
* @return 返回网格id用户id
*/
List<PartyMemberInfoResultDTO> selectPartyMemberInfoByCustomerId(String customerId);
}

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerPartymemberServiceImpl.java

@ -246,4 +246,15 @@ public class DimCustomerPartymemberServiceImpl extends BaseServiceImpl<DimCustom
}
return partyMemberUserIds;
}
/**
* 查询当前客户下所有注册的党员
*
* @param customerId
* @return 返回网格id用户id
*/
@Override
public List<PartyMemberInfoResultDTO> selectPartyMemberInfoByCustomerId(String customerId) {
return baseDao.selectPartyMemberInfoByCustomerId(customerId);
}
}

12
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerPartymemberDao.xml

@ -140,4 +140,16 @@
AND dcp.CUSTOMER_ID =#{customerId}
and dcp.PIDS LIKE CONCAT(#{pids},'%')
</select>
<!-- 查询当前客户下所有注册的党员 -->
<select id="selectPartyMemberInfoByCustomerId" resultType="com.epmet.dto.extract.result.PartyMemberInfoResultDTO">
SELECT
dcp.GRID_ID,
dcp.USER_ID
FROM dim_customer_partymember dcp
WHERE
dcp.DEL_FLAG = '0'
AND dcp.CUSTOMER_ID = #{customerId}
</select>
</mapper>
Loading…
Cancel
Save