Browse Source

Merge remote-tracking branch 'origin/dev'

dev_shibei_match
yinzuomei 5 years ago
parent
commit
222e8fd1b5
  1. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenan/ScreenAnGrassRootsGovernMonthlyDao.java
  2. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenan/ScreenAnGrassRootsOrgMonthlyDao.java
  3. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenan/ScreenAnGrassRootsPmTotalMonthlyDao.java
  4. 22
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AnScreenServiceImpl.java
  5. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml
  6. 23
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsGovernMonthlyDao.xml
  7. 23
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsOrgMonthlyDao.xml
  8. 27
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsPmTotalMonthlyDao.xml

4
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenan/ScreenAnGrassRootsGovernMonthlyDao.java

@ -48,12 +48,12 @@ public interface ScreenAnGrassRootsGovernMonthlyDao {
* 基层治理-指标月度趋势 * 基层治理-指标月度趋势
* *
* @param agencyId * @param agencyId
* @param yearId * @param curDate
* @return java.util.List<com.epmet.evaluationindex.screen.dto.result.GrassRootsGovernTrendDTO> * @return java.util.List<com.epmet.evaluationindex.screen.dto.result.GrassRootsGovernTrendDTO>
* @author zhaoqifeng * @author zhaoqifeng
* @date 2020/10/9 16:49 * @date 2020/10/9 16:49
*/ */
List<GrassRootsGovernTrendDTO> selectGrassRootsGovernTrend(@Param("agencyId") String agencyId, @Param("yearId") String yearId); List<GrassRootsGovernTrendDTO> selectGrassRootsGovernTrend(@Param("agencyId") String agencyId, @Param("curDate") String curDate);
/** /**
* 基层治理-治理排行 * 基层治理-治理排行

4
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenan/ScreenAnGrassRootsOrgMonthlyDao.java

@ -49,12 +49,12 @@ public interface ScreenAnGrassRootsOrgMonthlyDao {
* 基层组织-指标月度趋势 * 基层组织-指标月度趋势
* *
* @param agencyId * @param agencyId
* @param yearId * @param curDate
* @return java.util.List<com.epmet.evaluationindex.screen.dto.result.GrassRootsOrgTrendDTO> * @return java.util.List<com.epmet.evaluationindex.screen.dto.result.GrassRootsOrgTrendDTO>
* @author zhaoqifeng * @author zhaoqifeng
* @date 2020/10/9 16:32 * @date 2020/10/9 16:32
*/ */
List<GrassRootsOrgTrendDTO> selectGrassRootsOrgTrend(@Param("agencyId") String agencyId, @Param("yearId") String yearId); List<GrassRootsOrgTrendDTO> selectGrassRootsOrgTrend(@Param("agencyId") String agencyId, @Param("curDate") String curDate);
/** /**
* 基层组织-组织排行榜单 * 基层组织-组织排行榜单

4
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenan/ScreenAnGrassRootsPmTotalMonthlyDao.java

@ -47,12 +47,12 @@ public interface ScreenAnGrassRootsPmTotalMonthlyDao {
* 基层党员-指标月度趋势 * 基层党员-指标月度趋势
* *
* @param agencyId * @param agencyId
* @param monthId * @param curDate
* @return java.util.List<com.epmet.evaluationindex.screen.dto.result.PmTotalTrendDTO> * @return java.util.List<com.epmet.evaluationindex.screen.dto.result.PmTotalTrendDTO>
* @author zhaoqifeng * @author zhaoqifeng
* @date 2020/10/9 15:12 * @date 2020/10/9 15:12
*/ */
List<PmTotalTrendDTO> selectPmTotalTrend(@Param("agencyId") String agencyId, @Param("monthId") String monthId); List<PmTotalTrendDTO> selectPmTotalTrend(@Param("agencyId") String agencyId, @Param("curDate") String curDate);
} }

22
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AnScreenServiceImpl.java

@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -38,6 +39,8 @@ public class AnScreenServiceImpl implements AnScreenService {
private ScreenAnGrassRootsGovernMonthlyDao screenAnGrassRootsGovernMonthlyDao; private ScreenAnGrassRootsGovernMonthlyDao screenAnGrassRootsGovernMonthlyDao;
@Autowired @Autowired
private ScreenAnCommunityProjectProfileDao screenAnCommunityProjectProfileDao; private ScreenAnCommunityProjectProfileDao screenAnCommunityProjectProfileDao;
@Autowired
private PartyMemberLeadServiceImpl partyMemberLeadServiceImpl;
/** /**
* 基层党员-各类总数 * 基层党员-各类总数
@ -65,7 +68,10 @@ public class AnScreenServiceImpl implements AnScreenService {
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
public PmTotalTrendResultDTO pmTotalTrend(AnScreenTrendFormDTO formDTO) { public PmTotalTrendResultDTO pmTotalTrend(AnScreenTrendFormDTO formDTO) {
PmTotalTrendResultDTO resultDTO = new PmTotalTrendResultDTO(); PmTotalTrendResultDTO resultDTO = new PmTotalTrendResultDTO();
List<PmTotalTrendDTO> list = screenAnGrassRootsPmTotalMonthlyDao.selectPmTotalTrend(formDTO.getAgencyId(), formDTO.getMonthId()); String monthId = StringUtils.isNotBlank(formDTO.getMonthId()) ? formDTO.getMonthId() : DateUtils.format(new Date(), DateUtils.DATE_PATTERN_YYYYMM);
String curDate = monthId.substring(0, 4) + "-" + monthId.substring(4, 6) + "-" + "01";
// 查询近一年的指数值【包括本月】
List<PmTotalTrendDTO> list = screenAnGrassRootsPmTotalMonthlyDao.selectPmTotalTrend(formDTO.getAgencyId(), curDate);
List<String> xAxis = list.stream().map(item -> getMonth(item.getMonthId())).collect(Collectors.toList()); List<String> xAxis = list.stream().map(item -> getMonth(item.getMonthId())).collect(Collectors.toList());
List<Integer> groupMemberTotalList = list.stream().map(PmTotalTrendDTO::getGroupMemberTotal).collect(Collectors.toList()); List<Integer> groupMemberTotalList = list.stream().map(PmTotalTrendDTO::getGroupMemberTotal).collect(Collectors.toList());
List<Integer> topicTotalList = list.stream().map(PmTotalTrendDTO::getTopicTotal).collect(Collectors.toList()); List<Integer> topicTotalList = list.stream().map(PmTotalTrendDTO::getTopicTotal).collect(Collectors.toList());
@ -123,8 +129,11 @@ public class AnScreenServiceImpl implements AnScreenService {
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
public GrassRootsOrgTrendResultDTO grassRootsOrgTrend(AnScreenTrendFormDTO formDTO) { public GrassRootsOrgTrendResultDTO grassRootsOrgTrend(AnScreenTrendFormDTO formDTO) {
GrassRootsOrgTrendResultDTO resultDTO = new GrassRootsOrgTrendResultDTO(); GrassRootsOrgTrendResultDTO resultDTO = new GrassRootsOrgTrendResultDTO();
String yearId = DateUtils.format(new Date(), DateUtils.DATE_PATTERN_YYYY);
List<GrassRootsOrgTrendDTO> list = screenAnGrassRootsOrgMonthlyDao.selectGrassRootsOrgTrend(formDTO.getAgencyId(), yearId); String monthId = StringUtils.isNotBlank(formDTO.getMonthId()) ? formDTO.getMonthId() : DateUtils.format(new Date(), DateUtils.DATE_PATTERN_YYYYMM);
String curDate = monthId.substring(0, 4) + "-" + monthId.substring(4, 6) + "-" + "01";
// 查询近一年的指数值【包括本月】
List<GrassRootsOrgTrendDTO> list = screenAnGrassRootsOrgMonthlyDao.selectGrassRootsOrgTrend(formDTO.getAgencyId(), curDate);
List<String> xAxis = list.stream().map(item -> getMonth(item.getMonthId())).collect(Collectors.toList()); List<String> xAxis = list.stream().map(item -> getMonth(item.getMonthId())).collect(Collectors.toList());
List<Integer> groupTotalList = list.stream().map(GrassRootsOrgTrendDTO::getGroupTotal).collect(Collectors.toList()); List<Integer> groupTotalList = list.stream().map(GrassRootsOrgTrendDTO::getGroupTotal).collect(Collectors.toList());
List<Integer> issueTotalList = list.stream().map(GrassRootsOrgTrendDTO::getIssueTotal).collect(Collectors.toList()); List<Integer> issueTotalList = list.stream().map(GrassRootsOrgTrendDTO::getIssueTotal).collect(Collectors.toList());
@ -176,8 +185,11 @@ public class AnScreenServiceImpl implements AnScreenService {
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
public GrassRootsGovernTrendResultDTO grassRootsGovernTrend(AnScreenTrendFormDTO formDTO) { public GrassRootsGovernTrendResultDTO grassRootsGovernTrend(AnScreenTrendFormDTO formDTO) {
GrassRootsGovernTrendResultDTO resultDTO = new GrassRootsGovernTrendResultDTO(); GrassRootsGovernTrendResultDTO resultDTO = new GrassRootsGovernTrendResultDTO();
String yearId = DateUtils.format(new Date(), DateUtils.DATE_PATTERN_YYYY);
List<GrassRootsGovernTrendDTO> list = screenAnGrassRootsGovernMonthlyDao.selectGrassRootsGovernTrend(formDTO.getAgencyId(), yearId); String monthId = StringUtils.isNotBlank(formDTO.getMonthId()) ? formDTO.getMonthId() : DateUtils.format(new Date(), DateUtils.DATE_PATTERN_YYYYMM);
String curDate = monthId.substring(0, 4) + "-" + monthId.substring(4, 6) + "-" + "01";
// 查询近一年的指数值【包括本月】
List<GrassRootsGovernTrendDTO> list = screenAnGrassRootsGovernMonthlyDao.selectGrassRootsGovernTrend(formDTO.getAgencyId(), curDate);
List<String> xAxis = list.stream().map(item -> getMonth(item.getMonthId())).collect(Collectors.toList()); List<String> xAxis = list.stream().map(item -> getMonth(item.getMonthId())).collect(Collectors.toList());
List<Integer> partiProjectTotalList = list.stream().map(GrassRootsGovernTrendDTO::getPartiProjectTotal).collect(Collectors.toList()); List<Integer> partiProjectTotalList = list.stream().map(GrassRootsGovernTrendDTO::getPartiProjectTotal).collect(Collectors.toList());
List<Integer> closedProjectTotalList = list.stream().map(GrassRootsGovernTrendDTO::getClosedProjectTotal).collect(Collectors.toList()); List<Integer> closedProjectTotalList = list.stream().map(GrassRootsGovernTrendDTO::getClosedProjectTotal).collect(Collectors.toList());

3
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml

@ -160,7 +160,8 @@
bo.ORG_ID AS agencyId, bo.ORG_ID AS agencyId,
sca.agency_name AS name, sca.agency_name AS name,
IFNULL(sca.area_marks,'') AS areaMarks, IFNULL(sca.area_marks,'') AS areaMarks,
sca.level AS level sca.level AS level,
sca.level as agencyLevel
FROM FROM
screen_customer_agency sca screen_customer_agency sca
LEFT JOIN screen_customer_biz_org bo ON bo.ORG_ID = sca.AGENCY_ID LEFT JOIN screen_customer_biz_org bo ON bo.ORG_ID = sca.AGENCY_ID

23
epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsGovernMonthlyDao.xml

@ -16,6 +16,27 @@
AND MONTH_ID = #{monthId} AND MONTH_ID = #{monthId}
</select> </select>
<select id="selectGrassRootsGovernTrend" resultType="com.epmet.evaluationindex.screen.dto.result.GrassRootsGovernTrendDTO"> <select id="selectGrassRootsGovernTrend" resultType="com.epmet.evaluationindex.screen.dto.result.GrassRootsGovernTrendDTO">
SELECT
d.`month` MONTH_ID,
IFNULL(s.PARTI_PROJECT_TOTAL, 0) PARTI_PROJECT_TOTAL,
IFNULL(s.CLOSED_PROJECT_TOTAL, 0) CLOSED_PROJECT_TOTAL,
IFNULL(s.projectResponseRatio, 0) projectResponseRatio,
IFNULL(s.projectSatisRatio, 0) projectSatisRatio,
IFNULL(s.closedProjectRatio, 0) closedProjectRatio
FROM(
SELECT DATE_FORMAT(#{curDate}, '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 1 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 2 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 3 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 4 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 5 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 6 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 7 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 8 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 9 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 10 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 11 MONTH), '%Y%m') AS `month`
) d LEFT JOIN (
SELECT MONTH_ID, SELECT MONTH_ID,
PARTI_PROJECT_TOTAL, PARTI_PROJECT_TOTAL,
CLOSED_PROJECT_TOTAL, CLOSED_PROJECT_TOTAL,
@ -25,7 +46,7 @@
FROM screen_an_grass_roots_govern_monthly FROM screen_an_grass_roots_govern_monthly
WHERE DEL_FLAG = 0 WHERE DEL_FLAG = 0
AND ORG_ID = #{agencyId} AND ORG_ID = #{agencyId}
AND YEAR_ID = #{yearId} ) s ON d.`month` = s.MONTH_ID
ORDER BY MONTH_ID ORDER BY MONTH_ID
</select> </select>
<select id="selectGrassRootsGovernRank" resultType="com.epmet.evaluationindex.screen.dto.result.GrassRootsGovernRankResultDTO"> <select id="selectGrassRootsGovernRank" resultType="com.epmet.evaluationindex.screen.dto.result.GrassRootsGovernRankResultDTO">

23
epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsOrgMonthlyDao.xml

@ -14,14 +14,33 @@
AND MONTH_ID = #{monthId} AND MONTH_ID = #{monthId}
</select> </select>
<select id="selectGrassRootsOrgTrend" resultType="com.epmet.evaluationindex.screen.dto.result.GrassRootsOrgTrendDTO"> <select id="selectGrassRootsOrgTrend" resultType="com.epmet.evaluationindex.screen.dto.result.GrassRootsOrgTrendDTO">
SELECT MONTH_ID, SELECT d.`month` MONTH_ID,
IFNULL(s.GROUP_TOTAL, 0) GROUP_TOTAL,
IFNULL(s.ISSUE_TOTAL, 0) ISSUE_TOTAL,
IFNULL(s.PROJECT_TOTAL, 0) PROJECT_TOTAL
FROM(
SELECT DATE_FORMAT(#{curDate}, '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 1 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 2 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 3 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 4 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 5 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 6 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 7 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 8 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 9 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 10 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 11 MONTH), '%Y%m') AS `month`
) d LEFT JOIN (
SELECT
MONTH_ID,
GROUP_TOTAL, GROUP_TOTAL,
ISSUE_TOTAL, ISSUE_TOTAL,
PROJECT_TOTAL PROJECT_TOTAL
FROM screen_an_grass_roots_org_monthly FROM screen_an_grass_roots_org_monthly
WHERE DEL_FLAG = 0 WHERE DEL_FLAG = 0
AND ORG_ID = #{agencyId} AND ORG_ID = #{agencyId}
AND YEAR_ID = #{yearId} ) s ON d.`month` = s.MONTH_ID
ORDER BY MONTH_ID ORDER BY MONTH_ID
</select> </select>
<select id="selectGrassRootsOrgRank" resultType="com.epmet.evaluationindex.screen.dto.result.GrassRootsOrgRankResultDTO"> <select id="selectGrassRootsOrgRank" resultType="com.epmet.evaluationindex.screen.dto.result.GrassRootsOrgRankResultDTO">

27
epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsPmTotalMonthlyDao.xml

@ -14,6 +14,26 @@
AND MONTH_ID = #{monthId} AND MONTH_ID = #{monthId}
</select> </select>
<select id="selectPmTotalTrend" resultType="com.epmet.evaluationindex.screen.dto.result.PmTotalTrendDTO"> <select id="selectPmTotalTrend" resultType="com.epmet.evaluationindex.screen.dto.result.PmTotalTrendDTO">
SELECT
d.`month` MONTH_ID,
IFNULL(s.GROUP_MEMBER_TOTAL, 0) GROUP_MEMBER_TOTAL,
IFNULL(s.TOPIC_TOTAL, 0) TOPIC_TOTAL,
IFNULL(s.TOPIC_PARTI_USER_TOTAL, 0) TOPIC_PARTI_USER_TOTAL,
IFNULL(s.ISSUE_TOTAL, 0) ISSUE_TOTAL
FROM(
SELECT DATE_FORMAT(#{curDate}, '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 1 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 2 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 3 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 4 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 5 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 6 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 7 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 8 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 9 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 10 MONTH), '%Y%m') AS `month`
UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 11 MONTH), '%Y%m') AS `month`
) d LEFT JOIN (
SELECT SELECT
MONTH_ID, MONTH_ID,
GROUP_MEMBER_TOTAL, GROUP_MEMBER_TOTAL,
@ -25,10 +45,7 @@
WHERE WHERE
DEL_FLAG = '0' DEL_FLAG = '0'
AND ORG_ID = #{agencyId} AND ORG_ID = #{agencyId}
<if test="monthId != null and monthId.trim() != ''"> ) s ON d.`month` = s.MONTH_ID
AND MONTH_ID &lt;= #{monthId} ORDER BY MONTH_ID
</if>
ORDER BY MONTH_ID ASC
LIMIT 12
</select> </select>
</mapper> </mapper>
Loading…
Cancel
Save