Browse Source

基层组织/基层治理 指标,接口修改: 如果传了monthId,返回的数据是截止到当前monthId的近12月,

master
zhangyongzhangyong 5 years ago
parent
commit
672a5041c6
  1. 6
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenan/ScreenAnGrassRootsGovernMonthlyDao.java
  2. 6
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenan/ScreenAnGrassRootsOrgMonthlyDao.java
  3. 12
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AnScreenServiceImpl.java
  4. 6
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsGovernMonthlyDao.xml
  5. 6
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsOrgMonthlyDao.xml

6
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 yearId
* @param monthId
* @return java.util.List<com.epmet.evaluationindex.screen.dto.result.GrassRootsGovernTrendDTO>
* @author zhaoqifeng
* @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("monthId") String monthId);
/**
* 基层治理-治理排行
@ -66,4 +66,4 @@ public interface ScreenAnGrassRootsGovernMonthlyDao {
*/
List<GrassRootsGovernRankResultDTO> selectGrassRootsGovernRank(@Param("agencyId") String agencyId, @Param("monthId") String monthId);
}
}

6
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 yearId
* @param monthId
* @return java.util.List<com.epmet.evaluationindex.screen.dto.result.GrassRootsOrgTrendDTO>
* @author zhaoqifeng
* @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("monthId") String monthId);
/**
* 基层组织-组织排行榜单
@ -67,4 +67,4 @@ public interface ScreenAnGrassRootsOrgMonthlyDao {
*/
List<GrassRootsOrgRankResultDTO> selectGrassRootsOrgRank(@Param("agencyId") String agencyId, @Param("monthId") String monthId);
}
}

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

@ -123,8 +123,10 @@ public class AnScreenServiceImpl implements AnScreenService {
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
public GrassRootsOrgTrendResultDTO grassRootsOrgTrend(AnScreenTrendFormDTO formDTO) {
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);
// 查询近一年的指数值【包括本月】
List<GrassRootsOrgTrendDTO> list = screenAnGrassRootsOrgMonthlyDao.selectGrassRootsOrgTrend(formDTO.getAgencyId(), monthId);
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> issueTotalList = list.stream().map(GrassRootsOrgTrendDTO::getIssueTotal).collect(Collectors.toList());
@ -176,8 +178,10 @@ public class AnScreenServiceImpl implements AnScreenService {
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
public GrassRootsGovernTrendResultDTO grassRootsGovernTrend(AnScreenTrendFormDTO formDTO) {
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);
// 查询近一年的指数值【包括本月】
List<GrassRootsGovernTrendDTO> list = screenAnGrassRootsGovernMonthlyDao.selectGrassRootsGovernTrend(formDTO.getAgencyId(), monthId);
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> closedProjectTotalList = list.stream().map(GrassRootsGovernTrendDTO::getClosedProjectTotal).collect(Collectors.toList());

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

@ -25,7 +25,9 @@
FROM screen_an_grass_roots_govern_monthly
WHERE DEL_FLAG = 0
AND ORG_ID = #{agencyId}
AND YEAR_ID = #{yearId}
<if test="monthId != null and monthId.trim() != ''">
AND MONTH_ID &lt;= #{monthId}
</if>
ORDER BY MONTH_ID
</select>
<select id="selectGrassRootsGovernRank" resultType="com.epmet.evaluationindex.screen.dto.result.GrassRootsGovernRankResultDTO">
@ -41,4 +43,4 @@
AND MONTH_ID = #{monthId}
ORDER BY PARTI_PROJECT_TOTAL DESC
</select>
</mapper>
</mapper>

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

@ -21,7 +21,9 @@
FROM screen_an_grass_roots_org_monthly
WHERE DEL_FLAG = 0
AND ORG_ID = #{agencyId}
AND YEAR_ID = #{yearId}
<if test="monthId != null and monthId.trim() != ''">
AND MONTH_ID &lt;= #{monthId}
</if>
ORDER BY MONTH_ID
</select>
<select id="selectGrassRootsOrgRank" resultType="com.epmet.evaluationindex.screen.dto.result.GrassRootsOrgRankResultDTO">
@ -35,4 +37,4 @@
AND MONTH_ID = #{monthId}
ORDER BY GROUP_TOTAL DESC
</select>
</mapper>
</mapper>

Loading…
Cancel
Save