Browse Source

网格相关:组织”三会一课“次数

dev_shibei_match
yinzuomei 4 years ago
parent
commit
3b9ca27d03
  1. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/group/GroupDataDao.java
  2. 26
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalGridIndexServiceImpl.java
  3. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/group/GroupDataService.java
  4. 13
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/group/impl/GroupDataServiceImpl.java
  5. 18
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/group/GroupDataDao.xml

10
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<CpcIndexCommonDTO> 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<GridIndexCommonDTO> selectCountGridCreateThreeMeets(@Param("customerId")String customerId, @Param("monthId")String monthId);
}

26
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<String,Integer> createThreeMeetsCountMap=getCreateThreeMeetsCountMap(customerId,monthId);
// 党员参加“三会一课”人次 :本网格内注册的党员,在本月内活动签到次数
Map<String,Integer> joinThreeMeetsCountMap=getJoinThreeMeetsCountMap(customerId,monthId);
String quarterId = DateUtils.getQuarterId(monthId);
@ -239,19 +246,24 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
return true;
}
private Map<String, Integer> getJoinThreeMeetsCountMap(String customerId, String monthId) {
private Map<String, Integer> getCreateThreeMeetsCountMap(String customerId, String monthId) {
// 组织“三会一课”次数 前网格下 满足【未取消的活动 and 签到记录>1 and 活动开始时间在当前时间维度内】 +1
// todo
return null;
//查询小组活动签到表,计算用户在本月内签到的活动次数
List<GridIndexCommonDTO> list=groupDataService.selectCountGridCreateThreeMeets(customerId,monthId);
Map<String, Integer> resultMap = new HashMap<>();
for (GridIndexCommonDTO gridIndexCommonDTO : list) {
resultMap.put(gridIndexCommonDTO.getGridId(), gridIndexCommonDTO.getIndexValue());
}
return resultMap;
}
private Map<String, Integer> getCreateThreeMeetsCountMap(String customerId, String monthId) {
private Map<String, Integer> getJoinThreeMeetsCountMap(String customerId, String monthId) {
// 党员参加“三会一课”人次 :本网格内注册的党员,在本月内活动签到次数
// todo
return null;
}
/**
* @Description 计算网格指标治理能力
* @param customerId

10
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<CpcIndexCommonDTO> selectJoinThreeMeetsCount(String customerId, String monthId);
/**
* 网格相关组织三会一课次数 当前网格下 满足未取消的活动 and 签到记录>1 and 活动开始时间在当前时间维度内 +1
*
* @param customerId
* @param monthId
* @return com.epmet.dto.indexcollect.result.CpcIndexCommonDTO
*/
List<GridIndexCommonDTO> selectCountGridCreateThreeMeets(String customerId, String monthId);
}

13
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<GridIndexCommonDTO> selectCountGridCreateThreeMeets(String customerId, String monthId) {
return groupDataDao.selectCountGridCreateThreeMeets(customerId,monthId);
}
}

18
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/group/GroupDataDao.xml

@ -234,4 +234,22 @@
GROUP BY
m.SIGN_USER_ID
</select>
<!-- 网格相关:组织三会一课次数 -->
<select id="selectCountGridCreateThreeMeets" parameterType="map" resultType="com.epmet.dto.indexcollect.result.GridIndexCommonDTO">
SELECT
ga.GRID_ID as gridId,
count( 1 ) as indexValue
FROM
group_act_info ga
WHERE
ga.DEL_FLAG = '0'
AND ga.`STATUS` != 'canceled'
AND ga.CUSTOMER_ID = #{customerId}
AND DATE_FORMAT( ga.START_TIME, '%Y%m' )= #{monthId}
AND ga.SIGNED_IN_NUM > 0
AND ga.CATEGORY_CODE = '100001'
GROUP BY
ga.GRID_ID
</select>
</mapper>
Loading…
Cancel
Save