Browse Source

支部建设情况|联建共建情况-折线图

党员志愿服务
两个接口返参新增两个属性,总参与数和总组织数
master
wangchao 5 years ago
parent
commit
2c354ad1af
  1. 11
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildTrendResultDTO.java
  2. 10
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResultDTO.java
  3. 12
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyBranchDataDao.java
  4. 7
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassrootsPartyDevServiceImpl.java
  5. 7
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/PartyMemberLeadServiceImpl.java
  6. 10
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/ModuleConstant.java
  7. 16
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml

11
epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildTrendResultDTO.java

@ -1,5 +1,6 @@
package com.epmet.screen.dto.result;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
@ -28,4 +29,14 @@ public class BranchBuildTrendResultDTO implements Serializable {
private List<BranchTrendSeriesDataResultDTO> seriesData;
/**
* 总组织次数
* */
private Integer totalOrganizationCount = NumConstant.ZERO;
/**
* 总参与人数
* */
private Integer totalJoinUserCount = NumConstant.ZERO;
}

10
epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResultDTO.java

@ -33,4 +33,14 @@ public class VolunteerServiceResultDTO implements Serializable {
* 平均参与人次
*/
private List<Integer> averageJoinUserData;
/**
* 总组织次数
* */
private Integer totalOrganizationCount;
/**
* 总参与人数
* */
private Integer totalJoinUserCount;
}

12
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyBranchDataDao.java

@ -68,4 +68,16 @@ public interface ScreenPartyBranchDataDao {
* @date 2020.08.20 09:46
**/
List<BranchBuildOrderByCountResultDTO> selectBranchDataByTypeOrder(@Param("agencyId")String agencyId,@Param("category")String category,@Param("monthId")String monthId,@Param("bottomMonthId")String bottomMonthId);
/**
* @Description 查询组织总数或者总参与人数
* @param category
* @param type
* @param agencyId
* @param monthId
* @return
* @author wangc
* @date 2020.08.28 17:56
**/
Integer selectTotalOrganizationCount(@Param("category") String category,@Param("type") String type, @Param("agencyId") String agencyId,@Param("monthId") String monthId);
}

7
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassrootsPartyDevServiceImpl.java

@ -155,7 +155,12 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService
result.setSeriesData(dataArray);
result.setLegend(null == result.getLegend() ? new ArrayList<>() : result.getLegend());
//总组织次数
Integer totalOrganizationCount = screenPartyBranchDataDao.selectTotalOrganizationCount(param.getCategory(),ModuleConstant.PARAM_BRANCH_DATA_TYPE_ORGAN,param.getAgencyId(),monthMap.keySet().iterator().next());
//总参与人数
Integer totalJoinUserCount = screenPartyBranchDataDao.selectTotalOrganizationCount(param.getCategory(),ModuleConstant.PARAM_BRANCH_DATA_TYPE_JOIN,param.getAgencyId(),monthMap.keySet().iterator().next());
result.setTotalOrganizationCount(null == totalOrganizationCount ? NumConstant.ZERO : totalOrganizationCount);
result.setTotalJoinUserCount(null == totalJoinUserCount ? NumConstant.ZERO : totalJoinUserCount);
return result;
}

7
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/PartyMemberLeadServiceImpl.java

@ -147,6 +147,13 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
result.setOrganizeData(organizeData);
result.setJoinData(joinData);
result.setAverageJoinUserData(averageJoinUserData);
String bottomMonthId = collect.get(collect.size() - NumConstant.ONE).getMonthId();
//总组织次数
Integer totalOrganizationCount = screenPartyBranchDataDao.selectTotalOrganizationCount(ModuleConstant.KEY_BRANCH_CATEGORY_VOLUNTARY_SERVICE,ModuleConstant.PARAM_BRANCH_DATA_TYPE_ORGAN,volunteerServiceFormDTO.getAgencyId(),bottomMonthId);
//总参与人数
Integer totalJoinUserCount = screenPartyBranchDataDao.selectTotalOrganizationCount(ModuleConstant.KEY_BRANCH_CATEGORY_VOLUNTARY_SERVICE,ModuleConstant.PARAM_BRANCH_DATA_TYPE_JOIN,volunteerServiceFormDTO.getAgencyId(),bottomMonthId);
result.setTotalOrganizationCount(totalOrganizationCount);
result.setTotalJoinUserCount(totalJoinUserCount);
return result;
}

10
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/ModuleConstant.java

@ -21,4 +21,14 @@ public interface ModuleConstant {
String PARAM_DIFFICULTY_TYPE_MOST_DEPTS = "mostdepts";
String PARAM_DIFFICULTY_TYPE_MOST_HANDLED = "mosthandled";
/**
* 支部建设情况折线图 查询数据类型 组织次数
* */
String PARAM_BRANCH_DATA_TYPE_ORGAN = "organize";
/**
* 支部建设情况折线图 查询数据类型 参与人数
* */
String PARAM_BRANCH_DATA_TYPE_JOIN = "joinuser";
}

16
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml

@ -29,7 +29,6 @@
screen_party_branch_data
WHERE
DEL_FLAG = '0'
AND ORG_TYPE = 'agency'
AND ORG_ID = #{agencyId}
AND TYPE = #{category}
AND MONTH_ID <![CDATA[ >= ]]> #{bottomMonthId}
@ -85,4 +84,19 @@
LIMIT 12
</select>
<!-- 查询组织总数或者总参与人数 -->
<select id="selectTotalOrganizationCount" resultType="int">
SELECT
CASE #{type} WHEN 'organize' THEN SUM(ORGANIZE_COUNT)
ELSE SUM(JOIN_USER_COUNT)
END AS data
FROM
screen_party_branch_data
WHERE
DEL_FLAG = '0'
AND ORG_ID = #{agencyId}
AND TYPE = #{category}
AND MONTH_ID <![CDATA[ >= ]]> #{monthId}
</select>
</mapper>
Loading…
Cancel
Save