diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/impl/PublicityServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/impl/PublicityServiceImpl.java index 990cc97916..234e4afeee 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/impl/PublicityServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/impl/PublicityServiceImpl.java @@ -46,6 +46,8 @@ public class PublicityServiceImpl implements PublicityService { @Autowired private EpmetUserOpenFeignClient epmetUserOpenFeignClient; + + /** * @param tokenDto * @Description 宣传能力—工作端—当前机关累计发文和当前发文 @@ -66,16 +68,16 @@ public class PublicityServiceImpl implements PublicityService { @Override public List tagviewed(TokenDto tokenDto, Integer pageSize, String type) { String agencyId = this.getLoginUserDetails(tokenDto); - Date date = new Date(); - String strDate = DateUtils.format(date, DateUtils.DATE_PATTERN); + Date dateFact = DateUtils.addDateDays( new Date(),-1); + String strDate = DateUtils.format(dateFact, DateUtils.DATE_PATTERN_YYYYMMDD); String yearId = strDate.substring(0, 4); + String monthId = strDate.substring(0, 6); if (StringUtils.equals("month", type)) {//当月 - String monthId = strDate.substring(0, 4) + strDate.substring(5, 7); return publicityDao.getViewedMonthlyCountByTag(agencyId, monthId, pageSize); } else if (StringUtils.equals("quarter", type)) {//当季 - String quarterId = yearId + "Q" + DateUtils.getQuarterIndex(date); + String quarterId = yearId + "Q" + DateUtils.getQuarterIndex(dateFact); return publicityDao.getViewedQuarterlyCountByTag(agencyId, quarterId, pageSize); } else if (StringUtils.equals("year", type)) {//当年 @@ -94,16 +96,16 @@ public class PublicityServiceImpl implements PublicityService { @Override public List tagused(TokenDto tokenDto, Integer pageSize, String type) { String agencyId = this.getLoginUserDetails(tokenDto); - Date date = new Date(); - String strDate = DateUtils.format(date, DateUtils.DATE_PATTERN); + Date dateFact = DateUtils.addDateDays( new Date(),-1); + String strDate = DateUtils.format(dateFact, DateUtils.DATE_PATTERN_YYYYMMDD); String yearId = strDate.substring(0, 4); + String monthId = strDate.substring(0, 6); if (StringUtils.equals("month", type)) {//当月 - String monthId = strDate.substring(0, 4) + strDate.substring(5, 7); return publicityDao.getUsedMonthlyCountByTag(agencyId, monthId, pageSize); } else if (StringUtils.equals("quarter", type)) {//当季 - String quarterId = yearId + "Q" + DateUtils.getQuarterIndex(date); + String quarterId = yearId + "Q" + DateUtils.getQuarterIndex(dateFact); return publicityDao.getUsedQuarterlyCountByTag(agencyId, quarterId, pageSize); } else if (StringUtils.equals("year", type)) {//当年 @@ -122,8 +124,8 @@ public class PublicityServiceImpl implements PublicityService { @Override public List subagencyPublishedarticle(TokenDto tokenDto, String type) { String agencyId = this.getLoginUserDetails(tokenDto); - Date date = new Date(); - String strDate = DateUtils.format(date, DateUtils.DATE_PATTERN_YYYYMMDD); + Date dateFact = DateUtils.addDateDays( new Date(),-1); + String strDate = DateUtils.format(dateFact, DateUtils.DATE_PATTERN_YYYYMMDD); String yearId = strDate.substring(0, 4); String monthId = strDate.substring(0, 6); @@ -131,7 +133,7 @@ public class PublicityServiceImpl implements PublicityService { return publicityDao.getSubAgencyPublishedMonth(agencyId, monthId); } else if (StringUtils.equals("quarter", type)) {//当季 - String quarterId = yearId + "Q" + DateUtils.getQuarterIndex(date); + String quarterId = yearId + "Q" + DateUtils.getQuarterIndex(dateFact); return publicityDao.getSubAgencyPublishedQuarter(agencyId, quarterId); } else if (StringUtils.equals("year", type)) {//当年 @@ -150,8 +152,8 @@ public class PublicityServiceImpl implements PublicityService { @Override public List departmentPublishedarticle(TokenDto tokenDto, String type) { String agencyId = this.getLoginUserDetails(tokenDto); - Date date = new Date(); - String strDate = DateUtils.format(date, DateUtils.DATE_PATTERN_YYYYMMDD); + Date dateFact = DateUtils.addDateDays( new Date(),-1); + String strDate = DateUtils.format(dateFact, DateUtils.DATE_PATTERN_YYYYMMDD); String yearId = strDate.substring(0, 4); String monthId = strDate.substring(0, 6); @@ -159,7 +161,7 @@ public class PublicityServiceImpl implements PublicityService { return publicityDao.getSubDepartPublishedMonth(agencyId, monthId); } else if (StringUtils.equals("quarter", type)) {//当季 - String quarterId = yearId + "Q" + DateUtils.getQuarterIndex(date); + String quarterId = yearId + "Q" + DateUtils.getQuarterIndex(dateFact); return publicityDao.getSubDepartPublishedQuarter(agencyId, quarterId); } else if (StringUtils.equals("year", type)) {//当年 @@ -178,8 +180,8 @@ public class PublicityServiceImpl implements PublicityService { @Override public List subgridPublishedarticle(TokenDto tokenDto, String type) { String agencyId = this.getLoginUserDetails(tokenDto); - Date date = new Date(); - String strDate = DateUtils.format(date, DateUtils.DATE_PATTERN_YYYYMMDD); + Date dateFact = DateUtils.addDateDays( new Date(),-1); + String strDate = DateUtils.format(dateFact, DateUtils.DATE_PATTERN_YYYYMMDD); String yearId = strDate.substring(0, 4); String monthId = strDate.substring(0, 6); @@ -187,7 +189,7 @@ public class PublicityServiceImpl implements PublicityService { return publicityDao.getSubGridPublishedMonth(agencyId, monthId); } else if (StringUtils.equals("quarter", type)) {//当季 - String quarterId = yearId + "Q" + DateUtils.getQuarterIndex(date); + String quarterId = yearId + "Q" + DateUtils.getQuarterIndex(dateFact); return publicityDao.getSubGridPublishedQuarter(agencyId, quarterId); } else if (StringUtils.equals("year", type)) {//当年 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsGroupServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsGroupServiceImpl.java index b9735e489c..1571c6b3fe 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsGroupServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsGroupServiceImpl.java @@ -154,7 +154,7 @@ public class StatsGroupServiceImpl implements StatsGroupService { //机关下的所有网格(包括直属网格) List allGrid = this.getAllGrid(agencyId,customerId); if (allGrid.size() != NumConstant.ZERO) { - // 1. 机关下有多少网格 + // 1. 机关下有多少网格 (this.getAllGrid拿的是当前机关下所有网格,以下方法是根据“dateId”来拿的,两者过滤) List customerGridIdList = customerGridService.getCustomerGridIdList(customerId, dateId); AtomicReference gridSize = new AtomicReference<>(NumConstant.ZERO); if (customerGridIdList.size() != NumConstant.ZERO) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsIssueServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsIssueServiceImpl.java index 8fc548d4c2..a4d845ab90 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsIssueServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsIssueServiceImpl.java @@ -227,6 +227,7 @@ public class StatsIssueServiceImpl implements StatsIssueService { FactIssueAgencyMonthlyDTO dto = issueAgencyMonthlyIncList.get(i); if (agency.getId().equals(dto.getAgencyId())) { monthly.setIssueIncr(dto.getIssueIncr()); + monthly.setVotingIncr(dto.getVotingIncr()); monthly.setShiftProjectIncr(dto.getShiftProjectIncr()); monthly.setClosedIncr(dto.getClosedIncr()); monthly.setClosedResolvedIncr(dto.getClosedResolvedIncr()); @@ -430,6 +431,7 @@ public class StatsIssueServiceImpl implements StatsIssueService { FactIssueGridMonthlyDTO dto = gridMonthlyIncListList.get(i); if (grid.getId().equals(dto.getGridId())) { monthly.setIssueIncr(dto.getIssueIncr()); + monthly.setVotingIncr(dto.getVotingIncr()); monthly.setShiftProjectIncr(dto.getShiftProjectIncr()); monthly.setClosedIncr(dto.getClosedIncr()); monthly.setClosedResolvedIncr(dto.getClosedResolvedIncr()); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueAgencyMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueAgencyMonthlyDao.xml index 430abbd36c..45f53d10cc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueAgencyMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueAgencyMonthlyDao.xml @@ -51,6 +51,7 @@ SELECT da.ID AS "agencyId", SUM(IFNULL(ISSUE_INCR, 0)) AS "issueIncr", + SUM(IFNULL(VOTING_INCR, 0)) AS "votingIncr", SUM(IFNULL(SHIFT_PROJECT_INCR, 0)) AS "shiftProjectIncr", SUM(IFNULL(CLOSED_INCR, 0)) AS "closedIncr", SUM(IFNULL(CLOSED_RESOLVED_INCR, 0)) AS "closedResolvedIncr", @@ -64,6 +65,7 @@ AND MONTH_ID = #{monthId} WHERE da.DEL_FLAG = '0' + AND da.AGENCY_DIM_TYPE= 'all' AND da.CUSTOMER_ID = #{customerId} GROUP BY da.ID diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueGridMonthlyDao.xml index cbcc5b4276..35ca051fa1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueGridMonthlyDao.xml @@ -57,6 +57,7 @@ dg.AGENCY_ID AS "agencyId", dg.ID AS "gridId", SUM(IFNULL(ISSUE_INCR, 0)) AS "issueIncr", + SUM(IFNULL(VOTING_INCR, 0)) AS "votingIncr", SUM(IFNULL(SHIFT_PROJECT_INCR, 0)) AS "shiftProjectIncr", SUM(IFNULL(CLOSED_INCR, 0)) AS "closedIncr", SUM(IFNULL(CLOSED_RESOLVED_INCR, 0)) AS "closedResolvedIncr",