diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityResultDTO.java index 0c96a83129..dd2c09cd94 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityResultDTO.java @@ -3,6 +3,7 @@ package com.epmet.screen.dto.result; import lombok.Data; import java.io.Serializable; +import java.math.BigDecimal; /** * @Description 治理能力查询结果dto @@ -22,20 +23,20 @@ public class GovernCapacityResultDTO implements Serializable { /** * 响应率 * */ - private Integer responseRatio; + private BigDecimal responseRatio; /** * 解决率 * */ - private Integer resolvedRatio; + private BigDecimal resolvedRatio; /** * 自治率 * */ - private Integer governRatio; + private BigDecimal governRatio; /** * 满意率 * */ - private Integer satisfactionRatio; + private BigDecimal satisfactionRatio; } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java index 4aaac7a152..7c536869e9 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java @@ -3,7 +3,6 @@ package com.epmet.datareport.controller.screen; import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.datareport.dao.screen.ScreenUserTotalDataDao; import com.epmet.datareport.service.screen.GrassrootsPartyDevService; import com.epmet.screen.dto.form.BranchBuildRankFormDTO; import com.epmet.screen.dto.form.BranchBuildTrendFormDTO; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassRootsGovernServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassRootsGovernServiceImpl.java index 13366615a6..7a41593d68 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassRootsGovernServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassRootsGovernServiceImpl.java @@ -144,10 +144,10 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { orderList.forEach(o -> { GovernCapacityRankResultDTO rank = new GovernCapacityRankResultDTO(); rank.setAgencyName(o.getAgencyName()); - rank.setGovernRatio(convertPercentStr(new BigDecimal(o.getGovernRatio()))); - rank.setResolvedRatio(convertPercentStr(new BigDecimal(o.getResolvedRatio()))); - rank.setResponseRatio(convertPercentStr(new BigDecimal(o.getResponseRatio()))); - rank.setSatisfactionRatio(convertPercentStr(new BigDecimal(o.getSatisfactionRatio()))); + rank.setGovernRatio(convertPercentStr(o.getGovernRatio(),NumConstant.ONE)); + rank.setResolvedRatio(convertPercentStr(o.getResolvedRatio(),NumConstant.ONE)); + rank.setResponseRatio(convertPercentStr(o.getResponseRatio(),NumConstant.ONE)); + rank.setSatisfactionRatio(convertPercentStr(o.getSatisfactionRatio(),NumConstant.ONE)); result.add(rank); }); return result; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassrootsPartyDevServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassrootsPartyDevServiceImpl.java index 74fae27854..f37a0e7e99 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassrootsPartyDevServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassrootsPartyDevServiceImpl.java @@ -63,7 +63,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService if(null == result.getPlatFormTotal() || NumConstant.ZERO == result.getPlatFormTotal()){ result.setPercentInPlatForm(convertPercentStr(BigDecimal.ZERO)); }else{ - result.setPercentInPlatForm(convertPercentStr(new BigDecimal(result.getPartyMemberTotal()/result.getPlatFormTotal()))); + result.setPercentInPlatForm(convertPercentStr(new BigDecimal((result.getPartyMemberTotal().doubleValue()/result.getPlatFormTotal().doubleValue())))); } return result; } @@ -124,7 +124,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService List numArray = new LinkedList<>(); BranchTrendSeriesDataResultDTO data = new BranchTrendSeriesDataResultDTO(); data.setName(issue); - if(null != issueYearlyDataList && issueYearlyDataList.isEmpty()){ + if(null != issueYearlyDataList && !issueYearlyDataList.isEmpty()){ monthMap.keySet().forEach( monthId ->{ Optional optional = issueYearlyDataList.stream().filter(yearly -> StringUtils.equals(monthId,yearly.getMonthId())).findAny(); @@ -139,6 +139,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService numArray.add(NumConstant.ZERO); } } + data.setData(numArray); dataArray.add(data); }); } @@ -237,51 +238,6 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService } - public static void main(String[] args) { - SimpleDateFormat format = new SimpleDateFormat("yyyyMM"); - Calendar calendar = Calendar.getInstance(); - calendar.setTime(new Date()); // 设置为当前时间 - calendar.set(Calendar.MONTH, calendar.get(Calendar.MONTH) - 1); // 设置为上一个月 - String currentMonth = format.format(calendar.getTime()); - Integer monthCounter = Integer.parseInt(currentMonth); - Map monthMap = new HashMap<>(); - int i = NumConstant.ONE; - while(i <= NumConstant.TWELVE){ - - if(monthCounter.toString().endsWith("00")){ - monthCounter -= NumConstant.EIGHTY_EIGHT; - } - - String abscissa = monthCounter.toString().substring(monthCounter.toString().length() - NumConstant.TWO); - if(abscissa.startsWith("0")) { - abscissa = abscissa.replace("0","").concat("月"); - }else{ - abscissa = abscissa.concat("月"); - } - monthMap.put(monthCounter.toString(),abscissa); - monthCounter-- ; - i++; - } - - Map result = Maps.newLinkedHashMap(); - monthMap.entrySet().stream().sorted(Map.Entry.comparingByKey()) - .forEachOrdered((e -> result.put(e.getKey(),e.getValue()))); - - result.forEach((k,v) -> { - System.out.print(k); - System.out.print(" -> "); - System.out.print(v); - System.out.println(); - }); - - List xLine = result.values().stream().collect(Collectors.toList()); - xLine.forEach(x -> { - System.out.println(x); - }); - - result.keySet().forEach(key -> System.out.println(key)); - } - /** * @Description 得到上个月的monthId * @param diff --git a/epmet-module/data-report/data-report-server/src/main/resources/logback-spring.xml b/epmet-module/data-report/data-report-server/src/main/resources/logback-spring.xml index bfbabc6259..08a6a198d1 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/logback-spring.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/logback-spring.xml @@ -144,6 +144,7 @@ + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml index d772ebb7e2..ab381cebba 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml @@ -22,12 +22,13 @@ AND eve.DEL_FLAG = '0' WHERE diff.DEL_FLAG = '0' - AND diff.ORG_TYPE = 'agencyId' + AND diff.ORG_TYPE = 'agency' AND diff.ORG_ID = #{agencyId} ORDER BY - CASE #{type} WHEN 'timelongest' THEN diff.EVENT_COST_TIME DESC - WHEN 'mosthandled' THEN diff.EVENT_HANDLED_COUNT DESC - ELSE diss.EVENT_RE_ORG DESC END + CASE #{type} WHEN 'timelongest' THEN diff.EVENT_COST_TIME + WHEN 'mosthandled' THEN diff.EVENT_HANDLED_COUNT + ELSE diff.EVENT_RE_ORG END + DESC \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml index a8af55a171..8fbf102170 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml @@ -6,7 +6,7 @@ SELECT MONTH_ID, - ISSUE_CATEGORY_NAME AS issue, + MEET_CATEGORY_NAME AS issue, CASE #{type} WHEN 'organize' THEN ORGANIZE_COUNT WHEN 'joinuser' THEN JOIN_USER_COUNT WHEN 'averagejoinuser' THEN AVERAGE_JOIN_USER_COUNT @@ -35,7 +35,7 @@ AND MONTH_ID = ]]> #{bottomMonthId} ORDER BY MONTH_ID DESC , - ISSUE_CATEGORY_NAME + MEET_CATEGORY_NAME @@ -50,7 +50,7 @@ DEL_FLAG = '0' AND ORG_TYPE = 'agency' - AND ORG_ID = #{agencyId} + AND PARENT_ID = #{agencyId} AND TYPE = #{category} diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml index d798990b6b..66fb4d6a80 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml @@ -6,7 +6,7 @@ SELECT USER_ID, - concat( SURNAME, '*' ) AS NAME, + concat( surname, CASE char_length( NAME ) WHEN 1 THEN '*' WHEN 2 THEN '**' ELSE '***' END ) AS name, POINT_TOTAL AS point FROM screen_party_user_rank_data diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml index cb10ed2c0e..8f17dc796a 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml @@ -7,7 +7,7 @@ \ No newline at end of file