From c5d0299961f38e55d7ef4a39328480131337f27c Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 18 Jun 2020 16:48:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE-=E9=A1=B9=E7=9B=AE-=E6=9C=BA?= =?UTF-8?q?=E5=85=B3=E6=97=A5=E3=80=81=E6=9C=88=E7=BB=9F=E8=AE=A1-?= =?UTF-8?q?=E9=83=A8=E5=88=86=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/StatsProjectServiceImpl.java | 41 ++++++++++++++++--- .../resources/mapper/project/ProjectDao.xml | 1 + .../mapper/project/ProjectProcessDao.xml | 1 + 3 files changed, 38 insertions(+), 5 deletions(-) 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 433a951a0c..9518447709 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 @@ -93,10 +93,10 @@ public class StatsProjectServiceImpl implements StatsProjectService { //1:查询各维度表Id,方便使用 DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(yesterDay()); - //2:根据客户Id查询项目业务表数据 + //2:根据客户Id查询项目业务表数据(查询当前日期之前的数据不包含当天的) List projectList = projectService.getProjectList(customerId); - //3:查询项目处理进展表中是创建项目和结案两种进展的有效数据(创建日期截取yyyy-mm-dd格式字段值) + //3:查询项目处理进展表中是创建项目和结案两种进展的有效数据(创建日期截取yyyy-mm-dd格式字段值)(查询当前日期之前的数据不包含当天的) List processList = projectProcessService.getProcessList(customerId); //4:遍历统计每个机关各项指标数 @@ -298,14 +298,45 @@ public class StatsProjectServiceImpl implements StatsProjectService { **/ @Override public void statsGridProject(String customerId) { + //1:根据客户Id查询网格维度表数据 + + if (true) { + //2:执行机关日数据统计 + gridDateProjectStats(customerId); + + //3:执行机关月数据统计 + if (Calendar.getInstance().get(Calendar.DATE) == 1) { + gridMonthProjectStats(customerId); + } + } + } + /** + * @param customerId + * @return + * @Author sun + * @Description 数据-项目-网格日统计 + **/ + private String gridDateProjectStats(String customerId){ //1:查询各维度表Id,方便使用 //2:根据客户Id查询网格维度表数据 - //3:根据客户Id查询项目业务表数据 - //4:查询项目处理进展表中是创建项目和结案两种进展的有效数据(创建日期截取yyyy-mm-dd格式字段值) - //5:根据客户Id查询议题表已转项目的议题数据(为了匹配项目所属的网格Id) + //3:根据客户Id查询项目业务表数据(查询当前日期之前的数据不包含当天的) + //4:查询项目处理进展表中是创建项目和结案两种进展的有效数据(创建日期截取yyyy-mm-dd格式字段值)(查询当前日期之前的数据不包含当天的) + //5:根据客户Id查询议题表已转项目的网格项目关系数据 //6:遍历统计每个网格各项指标数据 //7:批量保存网格日统计数据 //8:判断当前日期是否为当月首日,执行网格月数据统计 + + return null; + } + /** + * @param customerId + * @return + * @Author sun + * @Description 数据-项目-网格月统计 + **/ + private String gridMonthProjectStats(String customerId){ + + return null; } /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml index b64db5c5f7..ed2e125d99 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml @@ -13,6 +13,7 @@ AND customer_id = #{customerId} + ORDER BY created_time DESC diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml index 01daae5a72..30f433efb4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml @@ -16,6 +16,7 @@ pro.del_flag = '0' AND p.del_flag = '0' AND p.customer_id = #{customerId} + ORDER BY pro.project_id