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