From 9c580dff2ce17110fd08e9f4eadf9c23ca7e1e85 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 16 Jun 2020 16:11:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9C=BA=E5=85=B3=E3=80=81?= =?UTF-8?q?=E6=97=A5=E7=BB=B4=E5=BA=A6=E8=A1=A8=E6=9F=A5=E8=AF=A2=E5=85=B1?= =?UTF-8?q?=E7=94=A8=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/StatsProjectController.java | 19 +++++++++--- .../com/epmet/dao/stats/DimAgencyDao.java | 12 ++++++- .../java/com/epmet/dao/stats/DimDateDao.java | 12 ++++++- .../epmet/service/StatsProjectService.java | 7 +++++ .../service/impl/StatsProjectServiceImpl.java | 31 +++++++++++++++++++ .../epmet/service/stats/DimAgencyService.java | 8 +++++ .../epmet/service/stats/DimDateService.java | 8 +++++ .../stats/impl/DimAgencyServiceImpl.java | 11 +++++++ .../stats/impl/DimDateServiceImpl.java | 11 +++++++ .../resources/mapper/stats/DimAgencyDao.xml | 12 ++++++- .../resources/mapper/stats/DimDateDao.xml | 13 +++++++- 11 files changed, 135 insertions(+), 9 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/StatsProjectController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/StatsProjectController.java index 2c9f83f70a..6c7c907c15 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/StatsProjectController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/StatsProjectController.java @@ -1,23 +1,32 @@ package com.epmet.controller; +import com.epmet.commons.tools.utils.Result; import com.epmet.service.StatsDemoService; import com.epmet.service.StatsProjectService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; /** * 数据统计-项目 * @author sun */ -@RequestMapping("statsProject") +@RequestMapping("statsproject") @RestController public class StatsProjectController { @Autowired private StatsProjectService statsProjectService; - + /** + * @param customerId + * @return + * @Author sun + * @Description 数据-项目-机关日(月)统计 + **/ + @PostMapping("agencyproject/{customerId}") + public Result statsAgencyProject(@PathVariable("customerId") String customerId) { + statsProjectService.statsAgencyProject(customerId); + return new Result(); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimAgencyDao.java index a451b9e19f..9ead9c7114 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimAgencyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimAgencyDao.java @@ -19,9 +19,12 @@ package com.epmet.dao.stats; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.stats.DimAgencyDTO; import com.epmet.entity.stats.DimAgencyEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 机关维度 * @@ -30,5 +33,12 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface DimAgencyDao extends BaseDao { - + + /** + * @param dto + * @return + * @Author sun + * @Description 根据客户Id查询机关维度列表数据 + **/ + List selectDimAgencyList(DimAgencyDTO dto); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimDateDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimDateDao.java index f07e5fab41..b5716a6108 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimDateDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimDateDao.java @@ -18,9 +18,12 @@ package com.epmet.dao.stats; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.stats.DimDateDTO; import com.epmet.entity.stats.DimDateEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 日期维度表 * @@ -29,5 +32,12 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface DimDateDao extends BaseDao { - + + /** + * @param dto + * @return + * @Author sun + * @Description 根据创建时间查询日维度信息 + **/ + List selectDimDate(DimDateDTO dto); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsProjectService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsProjectService.java index 06066f976b..c2d837d172 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsProjectService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsProjectService.java @@ -7,4 +7,11 @@ package com.epmet.service; public interface StatsProjectService { + /** + * @param customerId + * @return + * @Author sun + * @Description 数据-项目-机关日(月)统计 + **/ + void statsAgencyProject(String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java index 7427ba994d..24214d1262 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java @@ -2,6 +2,7 @@ package com.epmet.service.impl; import com.epmet.service.StatsProjectService; import com.epmet.service.project.ProjectService; +import com.epmet.service.stats.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -12,7 +13,37 @@ import org.springframework.stereotype.Service; @Service public class StatsProjectServiceImpl implements StatsProjectService { + @Autowired + private DimAgencyService dimAgencyService; + @Autowired + private DimDateService dimDateService; + @Autowired + private DimWeekService dimWeekService; + @Autowired + private DimMonthService dimMonthService; + @Autowired + private DimQuarterService dimQuarterService; + @Autowired + private DimYearService dimYearService; @Autowired private ProjectService projectService; + @Autowired + private FactAgencyProjectDailyService factAgencyProjectDailyService; + @Autowired + private FactAgencyProjectMonthlyService factAgencyProjectMonthlyService; + @Autowired + private FactGridProjectDailyService factGridProjectDailyService; + @Autowired + private FactGridProjectMonthlyService factGridProjectMonthlyService; + + /** + * @param customerId + * @return + * @Author sun + * @Description 数据-项目-机关日(月)统计 + **/ + @Override + public void statsAgencyProject(String customerId) { + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimAgencyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimAgencyService.java index 7cb47dbcf6..87fcd68627 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimAgencyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimAgencyService.java @@ -92,4 +92,12 @@ public interface DimAgencyService extends BaseService { * @date 2020-06-16 */ void delete(String[] ids); + + /** + * @param dto + * @return + * @Author sun + * @Description 根据客户Id查询机关维度列表数据 + **/ + List getDimAgencyList(DimAgencyDTO dto); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimDateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimDateService.java index b191da62f7..4960ea3629 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimDateService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimDateService.java @@ -92,4 +92,12 @@ public interface DimDateService extends BaseService { * @date 2020-06-16 */ void delete(String[] ids); + + /** + * @param dto + * @return + * @Author sun + * @Description 根据创建时间查询日维度信息 + **/ + List getDimDate(DimDateDTO dto); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java index 817c3b774f..c9de98bb4f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java @@ -97,4 +97,15 @@ public class DimAgencyServiceImpl extends BaseServiceImpl getDimAgencyList(DimAgencyDTO dto) { + return baseDao.selectDimAgencyList(dto); + } + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDateServiceImpl.java index 7cd094209a..a52e25c05b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDateServiceImpl.java @@ -98,4 +98,15 @@ public class DimDateServiceImpl extends BaseServiceImpl getDimDate(DimDateDTO dto) { + return baseDao.selectDimDate(dto); + } + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimAgencyDao.xml index c819753376..5ca1ddca1c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimAgencyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimAgencyDao.xml @@ -4,6 +4,16 @@ - + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimDateDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimDateDao.xml index 899d853e10..c79644a662 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimDateDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimDateDao.xml @@ -3,6 +3,17 @@ - + \ No newline at end of file