Browse Source

数据统计修改

master
zxc 5 years ago
parent
commit
dfc78dea27
  1. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/group/GroupDao.java
  2. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/topic/TopicDao.java
  3. 5
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/impl/GroupServiceImpl.java
  4. 6
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java
  5. 1
      epmet-module/data-report/data-report-server/src/main/resources/mapper/group/GroupDao.xml
  6. 2
      epmet-module/data-report/data-report-server/src/main/resources/mapper/topic/TopicDao.xml
  7. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/group/GroupDataService.java

2
epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/group/GroupDao.java

@ -32,7 +32,7 @@ public interface GroupDao {
* @param
* @author zxc
*/
List<GroupSubAgencyResultDTO> getSubGroupCount();
List<GroupSubAgencyResultDTO> getSubGroupCount(@Param("customerId") String customerId);
/**
* @Description 获取直属网格下的小组数

4
epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/topic/TopicDao.java

@ -54,7 +54,7 @@ public interface TopicDao {
* @param
* @author zxc
*/
List<TopicSubAgencyResultDTO> getAllTopicShiftedInfoLastDay();
List<TopicSubAgencyResultDTO> getAllTopicShiftedInfoLastDay(@Param("customerId") String customerId);
/**
* @Description 校验机关下是否存在直属网格
@ -75,7 +75,7 @@ public interface TopicDao {
* @param
* @author zxc
*/
List<TopicSubGridResultDTO> getGridAllTopicShiftedInfoLastDay();
List<TopicSubGridResultDTO> getGridAllTopicShiftedInfoLastDay(@Param("customerId")String customerId);
/**
* @Description 话题日增长

5
epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/impl/GroupServiceImpl.java

@ -50,9 +50,12 @@ public class GroupServiceImpl implements GroupService {
@Override
public List<GroupSubAgencyResultDTO> subAgency(TokenDto tokenDto) {
String agencyId = this.getLoginUserDetails(tokenDto);
String customerId = tokenDto.getCustomerId();
List<GroupSubAgencyResultDTO> result = new ArrayList<>();
//获取下级机关
List<SubAgencyResultDTO> subAgencyList = groupDao.getSubAgencyList(agencyId);
List<GroupSubAgencyResultDTO> subGroupCount = groupDao.getSubGroupCount();
//查询客户下
List<GroupSubAgencyResultDTO> subGroupCount = groupDao.getSubGroupCount(customerId);
if (subAgencyList.size()!= NumConstant.ZERO){
subGroupCount.forEach(group -> {
subAgencyList.forEach(subAgency -> {

6
epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java

@ -94,12 +94,13 @@ public class TopicServiceImpl implements TopicService {
@Override
public List<TopicSubGridResultDTO> topicSubGrid(TokenDto tokenDto) {
String agencyId = this.getLoginUserDetails(tokenDto);
String customerId = tokenDto.getCustomerId();
List<TopicSubGridResultDTO> result = new ArrayList<>();
List<TopicSubGridResultDTO> resultAll = new ArrayList<>();
List<String> subGridIdList = topicDao.getSubGridIdList(agencyId);
if (subGridIdList.size() != NumConstant.ZERO){
List<TopicSubGridResultDTO> gridAllTopicInfoLastDay = topicDao.getGridAllTopicInfoLastDay();
List<TopicSubGridResultDTO> gridAllTopicShiftedInfoLastDay = topicDao.getGridAllTopicShiftedInfoLastDay();
List<TopicSubGridResultDTO> gridAllTopicShiftedInfoLastDay = topicDao.getGridAllTopicShiftedInfoLastDay(customerId);
subGridIdList.forEach(gridId -> {
gridAllTopicInfoLastDay.forEach(gridTopic -> {
if (gridId.equals(gridTopic.getGridId())){
@ -135,13 +136,14 @@ public class TopicServiceImpl implements TopicService {
@Override
public List<TopicSubAgencyResultDTO> topicSubAgency(TokenDto tokenDto) {
String agencyId = this.getLoginUserDetails(tokenDto);
String customerId = tokenDto.getCustomerId();
List<TopicSubAgencyResultDTO> result = new ArrayList<>();
List<TopicSubAgencyResultDTO> resultAll = new ArrayList<>();
List<String> subAgencyIdList = topicDao.getSubAgencyIdList(agencyId);
//存在下级机关
if (subAgencyIdList.size() != NumConstant.ZERO){
List<TopicSubAgencyResultDTO> allTopicInfoLastDay = topicDao.getAllTopicInfoLastDay();
List<TopicSubAgencyResultDTO> allTopicShiftedInfoLastDay = topicDao.getAllTopicShiftedInfoLastDay();
List<TopicSubAgencyResultDTO> allTopicShiftedInfoLastDay = topicDao.getAllTopicShiftedInfoLastDay(customerId);
//话题状态为 已关闭、讨论中、已屏蔽
subAgencyIdList.forEach(agencyIdOne -> {
allTopicInfoLastDay.forEach(agency -> {

1
epmet-module/data-report/data-report-server/src/main/resources/mapper/group/GroupDao.xml

@ -43,6 +43,7 @@
AND da.del_flag = '0'
WHERE
fgad.del_flag = '0'
AND fgad.customer_id = #{customerId}
AND fgad.date_id = (SELECT MAX(date_id) FROM fact_group_agency_daily WHERE del_flag = '0')
</select>

2
epmet-module/data-report/data-report-server/src/main/resources/mapper/topic/TopicDao.xml

@ -94,6 +94,7 @@
LEFT JOIN dim_agency da ON da.id = ftiad.agency_id AND da.del_flag = '0'
WHERE
ftiad.del_flag = '0'
AND ftiad.customer_id = #{customerId}
AND ftiad.date_id = (SELECT MAX(date_id) AS dateId FROM fact_topic_issue_agency_daily WHERE del_flag = '0')
</select>
@ -138,6 +139,7 @@
LEFT JOIN dim_grid da ON da.id = ftiad.grid_id AND da.del_flag = '0'
WHERE
ftiad.del_flag = '0'
AND ftiad.customer_id = #{customerId}
AND ftiad.date_id = (SELECT MAX(date_id) AS dateId FROM fact_topic_issue_grid_daily WHERE del_flag = '0')
</select>

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/group/GroupDataService.java

@ -21,24 +21,24 @@ public interface GroupDataService {
/**
* @Description 获取同级机关下网格下的小组数量
* @param allGrid
* @param
* @author zxc
*/
List<AgencyGroupTotalCountResultDTO> getAgencyGroupTotalCount(List<String> allGrid,String dateId);
List<AgencyGroupTotalCountResultDTO> getAgencyGroupTotalCount(String customerId,String dateId);
/**
* @Description 查询机关下网格内的小组人数
* @param
* @author zxc
*/
List<AgencyGridGroupPeopleTotalResultDTO> selectAgencyGridGroupPeopleTotal(List<String> allGrid,String dateId);
List<AgencyGridGroupPeopleTotalResultDTO> selectAgencyGridGroupPeopleTotal(String customerId,String dateId);
/**
* @Description 查询机关下每个小组的人数
* @param
* @author zxc
*/
List<AgencyGridGroupPeopleResultDTO> selectAgencyEveryGroupPeopleCount(List<String> allGrid,String dateId);
List<AgencyGridGroupPeopleResultDTO> selectAgencyEveryGroupPeopleCount(String customerId,String dateId);
/**
* @Description 查询机关下的小组日增数
@ -46,7 +46,7 @@ public interface GroupDataService {
* @param yesterday
* @author zxc
*/
List<AgencyGroupIncrResultDTO> selectAgencyGroupIncr(List<String> allGrid,String yesterday);
List<AgencyGroupIncrResultDTO> selectAgencyGroupIncr(String customerId,String yesterday);
/**
* @Description 查询机关下所有网格小组人数

Loading…
Cancel
Save