diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/.gitignore b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/.gitignore
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/constant/ProjectConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/constant/ProjectConstant.java
new file mode 100644
index 0000000000..7a50f4afb0
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/constant/ProjectConstant.java
@@ -0,0 +1,17 @@
+package com.epmet.project.constant;
+
+/**
+ * @Author sun
+ * @Description 数据-项目
+ **/
+public interface ProjectConstant {
+
+ String DATE = "date";
+ String MONTH = "month";
+
+ /**
+ * 根据Token获取组织信息失败
+ */
+ String GET_AGENCYID = "根据Token获取组织信息失败";
+
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/FactAgencyProjectDailyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/FactAgencyProjectDailyDTO.java
new file mode 100644
index 0000000000..ab608a0184
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/FactAgencyProjectDailyDTO.java
@@ -0,0 +1,182 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.project.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 机关下日项目数据统计 存放机关下截止到当前日期的各项总数据以及昨日新增各项数据,每日定时执行,先删后增
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-16
+ */
+@Data
+public class FactAgencyProjectDailyDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 唯一标识
+ */
+ private String id;
+
+ /**
+ * 客户Id 【dim_customer.id】
+ */
+ private String customerId;
+
+ /**
+ * 机关Id 【dim_agency.id】
+ */
+ private String agencyId;
+
+ /**
+ * 上级组织Id【dim_agency.pid】
+ */
+ private String parentId;
+
+ /**
+ * 日维度Id 【dim_date.id】
+ */
+ private String dateId;
+
+ /**
+ * 周维度Id 【dim_week.id】
+ */
+ private String weekId;
+
+ /**
+ * 月维度Id 【dim_month.id】
+ */
+ private String monthId;
+
+ /**
+ * 季ID
+ */
+ private String quarterId;
+
+ /**
+ * 年维度Id 【dim_year.id】
+ */
+ private String yearId;
+
+ /**
+ * 截止当日项目总数 【当前组织及下级项目总数】
+ */
+ private Integer projectTotal;
+
+ /**
+ * 截止当日处理中项目数 【当前组织及下级所有未结案项目总数】
+ */
+ private Integer pendingTotal;
+
+ /**
+ * 截止当日处理中项目占比 【当前组织及下级未结案项目百分比(存百分比数,小数点后两位)】
+ */
+ private BigDecimal pendingRatio;
+
+ /**
+ * 截止当日已结案项目数 【当前组织及下级已结案项目总数】
+ */
+ private Integer closedTotal;
+
+ /**
+ * 截止当日已结案项目占比 【当前组织及下级已结案项目百分比(存百分比数,小数点后两位)】
+ */
+ private BigDecimal closedRatio;
+
+ /**
+ * 截止当日已结案中已解决项目数 【当前组织及下级已结案项目中已解决总数】
+ */
+ private Integer resolvedTotal;
+
+ /**
+ * 截止当日已结案中已解决项目占比 【当前组织及下级已结案项目中已解决占比】
+ */
+ private BigDecimal resolvedRatio;
+
+ /**
+ * 截止当日已结案中未解决项目数 【当前组织及下级已结案项目中未解决总数】
+ */
+ private Integer unresolvedTotal;
+
+ /**
+ * 截止当日已结案中未解决项目占比 【当前组织及下级已结案项目中未解决占比】
+ */
+ private BigDecimal unresolvedRatio;
+
+ /**
+ * 当日项目总数 【当前组织及下级项目总数】
+ */
+ private Integer projectIncr;
+
+ /**
+ * 当日处理中项目数 【当前组织及下级前一日新增处理中项目数】
+ */
+ private Integer pendingIncr;
+
+ /**
+ * 当日已结案项目数 【当前组织及下级前一日新增结案项目数】
+ */
+ private Integer closedIncr;
+
+ /**
+ * 当日已结案项目中已解决数 【当前组织及下级前一日新增结案中已解决项目数】
+ */
+ private Integer resolvedIncr;
+
+ /**
+ * 当日已结案项目组未解决数 【当前组织及下级前一日新增结案中未解决项目数】
+ */
+ private Integer unresolvedIncr;
+
+ /**
+ * 删除标识 【0.未删除 1.已删除】
+ */
+ private Integer delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/ProjectIncrTrendFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/ProjectIncrTrendFormDTO.java
new file mode 100644
index 0000000000..a7364cfac9
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/ProjectIncrTrendFormDTO.java
@@ -0,0 +1,25 @@
+package com.epmet.project.dto.form;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * @Author sun
+ * @Description 数据-项目-日/月数据查询-接口入参
+ */
+@Data
+public class ProjectIncrTrendFormDTO implements Serializable {
+
+ private static final long serialVersionUID = -4929038359220814068L;
+
+ public interface ProjectIncr {
+ }
+
+ /**
+ * 类型 month:代表月 date:代表日
+ */
+ @NotBlank(message = "month / date 类型不能为空", groups = {ProjectIncr.class})
+ private String type;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectIncrTrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectIncrTrendResultDTO.java
new file mode 100644
index 0000000000..b53b2a9f14
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectIncrTrendResultDTO.java
@@ -0,0 +1,31 @@
+package com.epmet.project.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author sun
+ * @Description 数据-项目-获取组织下饼图数据-接口返参
+ **/
+@Data
+public class ProjectIncrTrendResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 8529179932504931368L;
+
+ /**
+ * 日期(2020/1/1;2020/1/2...)
+ */
+ private String date;
+
+ /**
+ * 类型对应数量
+ */
+ private Integer value;
+
+ /**
+ * 类型名称(处理中;已结案)
+ */
+ private String type;
+
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSubAgencyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSubAgencyResultDTO.java
new file mode 100644
index 0000000000..31d25fe6bb
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSubAgencyResultDTO.java
@@ -0,0 +1,36 @@
+package com.epmet.project.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author sun
+ * @Description 数据-项目-获取组织下饼图数据-接口返参
+ **/
+@Data
+public class ProjectSubAgencyResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 8529179932504931368L;
+
+ /**
+ * 机关Id
+ */
+ private String agencyId;
+
+ /**
+ * 机关名称
+ */
+ private String name;
+
+ /**
+ * 不同类型对应数据
+ */
+ private Integer value;
+
+ /**
+ * 类型名称(处理中;已结案)
+ */
+ private String type;
+
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSubGridResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSubGridResultDTO.java
new file mode 100644
index 0000000000..19f1632be0
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSubGridResultDTO.java
@@ -0,0 +1,36 @@
+package com.epmet.project.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author sun
+ * @Description 数据-项目-获取组织下饼图数据-接口返参
+ **/
+@Data
+public class ProjectSubGridResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 8529179932504931368L;
+
+ /**
+ * 机关Id
+ */
+ private String agencyId;
+
+ /**
+ * 机关名称
+ */
+ private String name;
+
+ /**
+ * 不同类型对应数据
+ */
+ private Integer value;
+
+ /**
+ * 类型名称(处理中;已结案)
+ */
+ private String type;
+
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSummaryInfoResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSummaryInfoResultDTO.java
new file mode 100644
index 0000000000..e371fce1f5
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSummaryInfoResultDTO.java
@@ -0,0 +1,31 @@
+package com.epmet.project.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author sun
+ * @Description 数据-项目-获取组织下饼图数据-接口返参
+ **/
+@Data
+public class ProjectSummaryInfoResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 8529179932504931368L;
+
+ /**
+ * 类型名称(处理中;已结案)
+ */
+ private String name;
+
+ /**
+ * 类型对应数量
+ */
+ private Integer value;
+
+ /**
+ * 类型对应百分比(10% 10.1% 10.01%小数点后两位)
+ */
+ private String ratio;
+
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSummaryResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSummaryResultDTO.java
new file mode 100644
index 0000000000..0223644b78
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectSummaryResultDTO.java
@@ -0,0 +1,50 @@
+package com.epmet.project.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author sun
+ * @Description 数据-项目-汇总数据-接口返参
+ **/
+@Data
+public class ProjectSummaryResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 8529179932504931368L;
+
+ /**
+ * 机关Id
+ */
+ private String agencyId;
+
+ /**
+ * 项目总数
+ */
+ private Integer projectTotal;
+
+ /**
+ * 更新日期
+ */
+ private String dateName;
+
+ /**
+ * 处理中总数
+ */
+ private Integer pendingTotal;
+
+ /**
+ * 处理中占比
+ */
+ private String pendingRatio;
+
+ /**
+ * 已结案总数
+ */
+ private Integer closedTotal;
+
+ /**
+ * 已结案占比
+ */
+ private String closedRatio;
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/module/project/controller/.gitignore b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/module/project/controller/.gitignore
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/module/project/controller/ProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/module/project/controller/ProjectController.java
new file mode 100644
index 0000000000..e0a1e26fb3
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/module/project/controller/ProjectController.java
@@ -0,0 +1,76 @@
+package com.epmet.module.project.controller;
+
+import com.epmet.commons.tools.annotation.LoginUser;
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.module.project.service.ProjectService;
+import com.epmet.project.dto.form.ProjectIncrTrendFormDTO;
+import com.epmet.project.dto.result.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @Author sun
+ * @Description 数据-项目
+ **/
+@RestController
+@RequestMapping("project")
+public class ProjectController {
+
+ @Autowired
+ private ProjectService projectService;
+
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取汇总数据
+ **/
+ @PostMapping("projectsummary")
+ public Result projectSummary(@LoginUser TokenDto tokenDto) {
+ return new Result().ok(projectService.getProjectSummary(tokenDto));
+ }
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取组织下饼图数据
+ **/
+ @PostMapping("summaryinfo")
+ public Result> summaryInfo(@LoginUser TokenDto tokenDto) {
+ return new Result>().ok(projectService.getSummaryInfo(tokenDto));
+ }
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取下级组织柱状图数据
+ **/
+ @PostMapping("subagency")
+ public Result> subAgency(@LoginUser TokenDto tokenDto) {
+ return new Result>().ok(projectService.getSubAgency(tokenDto));
+ }
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取机关直属网格项目数据
+ **/
+ @PostMapping("subgrid")
+ public Result> subGrid(@LoginUser TokenDto tokenDto) {
+ return new Result>().ok(projectService.getSubGrid(tokenDto));
+ }
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-日/月数据查询
+ **/
+ @PostMapping("incrtrend")
+ public Result> incrTrend(@LoginUser TokenDto tokenDto, @RequestBody ProjectIncrTrendFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, ProjectIncrTrendFormDTO.ProjectIncr.class);
+ return new Result>().ok(projectService.getProjectIncrTrend(tokenDto,formDTO));
+ }
+
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/module/project/dao/.gitignore b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/module/project/dao/.gitignore
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/module/project/dao/ProjectDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/module/project/dao/ProjectDao.java
new file mode 100644
index 0000000000..09bb4293f0
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/module/project/dao/ProjectDao.java
@@ -0,0 +1,58 @@
+package com.epmet.module.project.dao;
+
+import com.epmet.project.dto.FactAgencyProjectDailyDTO;
+import com.epmet.project.dto.result.*;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @Author sun
+ * @Description 数据-项目
+ **/
+@Mapper
+public interface ProjectDao {
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取汇总数据
+ **/
+ ProjectSummaryResultDTO selectProjectSummary(@Param("agencyId") String agencyId);
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取汇总数据
+ **/
+ List selectSummaryInfo(@Param("agencyId") String agencyId);
+
+ /**
+ * @Author sun
+ * @Description 查询组织最近日期的日统计数据
+ **/
+ FactAgencyProjectDailyDTO selectAgencyProjectDaily(@Param("agencyId") String agencyId);
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取最近日期下级组织柱状图数据(按项目总量降序)
+ **/
+ List selectSubAgency(FactAgencyProjectDailyDTO agencyProjectDailyDTO);
+
+ /**
+ * @Author sun
+ * @Description 查询机关下直属网格最近一天的日统计数据,按项目总数降序
+ **/
+ List selectSubGrid(FactAgencyProjectDailyDTO agencyProjectDailyDTO);
+
+ /**
+ * @Author sun
+ * @Description 查询机关日统计近九十天数据
+ **/
+ List selectIncrTrendDaily(@Param("agencyId") String agencyId);
+
+ /**
+ * @Author sun
+ * @Description 查询机关月统计近十二个月数据
+ **/
+ List selectIncrTrendMonthly(@Param("agencyId") String agencyId);
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/module/project/service/.gitignore b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/module/project/service/.gitignore
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/module/project/service/ProjectService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/module/project/service/ProjectService.java
new file mode 100644
index 0000000000..baa6e664e0
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/module/project/service/ProjectService.java
@@ -0,0 +1,44 @@
+package com.epmet.module.project.service;
+
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.project.dto.form.ProjectIncrTrendFormDTO;
+import com.epmet.project.dto.result.*;
+
+import java.util.List;
+
+/**
+ * @Author sun
+ * @Description 数据-项目
+ **/
+public interface ProjectService {
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取汇总数据
+ **/
+ ProjectSummaryResultDTO getProjectSummary(TokenDto tokenDto);
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取组织下饼图数据
+ **/
+ List getSummaryInfo(TokenDto tokenDto);
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取下级组织柱状图数据
+ **/
+ List getSubAgency(TokenDto tokenDto);
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取机关直属网格项目数据
+ **/
+ List getSubGrid(TokenDto tokenDto);
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-日/月数据查询
+ **/
+ List getProjectIncrTrend(TokenDto tokenDto, ProjectIncrTrendFormDTO formDTO);
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/module/project/service/impl/ProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/module/project/service/impl/ProjectServiceImpl.java
new file mode 100644
index 0000000000..502f613d1c
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/module/project/service/impl/ProjectServiceImpl.java
@@ -0,0 +1,150 @@
+package com.epmet.module.project.service.impl;
+
+import com.epmet.commons.tools.constant.NumConstant;
+import com.epmet.commons.tools.exception.RenException;
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.dto.form.LoginUserDetailsFormDTO;
+import com.epmet.dto.result.LoginUserDetailsResultDTO;
+import com.epmet.feign.EpmetUserOpenFeignClient;
+import com.epmet.module.project.dao.ProjectDao;
+import com.epmet.module.project.service.ProjectService;
+import com.epmet.project.constant.ProjectConstant;
+import com.epmet.project.dto.FactAgencyProjectDailyDTO;
+import com.epmet.project.dto.form.ProjectIncrTrendFormDTO;
+import com.epmet.project.dto.result.*;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Author sun
+ * @Description 数据-项目
+ **/
+@Service
+public class ProjectServiceImpl implements ProjectService {
+
+ @Autowired
+ private ProjectDao projectDao;
+ @Autowired
+ private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取汇总数据
+ **/
+ @Override
+ public ProjectSummaryResultDTO getProjectSummary(TokenDto tokenDto) {
+ //1:根据token获取agencyId
+ String agencyId = getLoginUserDetails(tokenDto);
+
+ //2:根据agencyId查询项目统计数据
+ ProjectSummaryResultDTO resultDTO = projectDao.selectProjectSummary(agencyId);
+ if (null != resultDTO) {
+ resultDTO.setPendingRatio(resultDTO.getPendingRatio() + "%");
+ resultDTO.setClosedRatio(resultDTO.getClosedRatio() + "%");
+ }
+ return resultDTO;
+ }
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取组织下饼图数据
+ **/
+ @Override
+ public List getSummaryInfo(TokenDto tokenDto) {
+ List resultList = new ArrayList<>();
+ //1:根据token获取agencyId
+ String agencyId = getLoginUserDetails(tokenDto);
+
+ //2:根据agencyId查询各状态统计数据
+ resultList = projectDao.selectSummaryInfo(agencyId);
+ if (null != resultList && resultList.size() > NumConstant.ZERO) {
+ resultList.forEach(sum -> {
+ sum.setRatio(sum.getRatio() + "%");
+ });
+ }
+ return resultList;
+ }
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取下级组织柱状图数据
+ **/
+ @Override
+ public List getSubAgency(TokenDto tokenDto) {
+ List resultList = new ArrayList<>();
+ //1:根据token获取agencyId
+ String agencyId = getLoginUserDetails(tokenDto);
+
+ //2:根据机关Id查询最近日期的日统计数据
+ FactAgencyProjectDailyDTO agencyProjectDailyDTO = projectDao.selectAgencyProjectDaily(agencyId);
+ if (null == agencyProjectDailyDTO) {
+ return resultList;
+ }
+ //2:获取当前组织最近日期的直属下级组织项目统计数据,按项目总量降序
+ resultList = projectDao.selectSubAgency(agencyProjectDailyDTO);
+ return resultList;
+ }
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-获取机关直属网格项目数据
+ **/
+ @Override
+ public List getSubGrid(TokenDto tokenDto) {
+ List resultList = new ArrayList<>();
+ //1:根据token获取agencyId
+ String agencyId = getLoginUserDetails(tokenDto);
+
+ //2:根据机关Id查询最近日期的日统计数据
+ FactAgencyProjectDailyDTO agencyProjectDailyDTO = projectDao.selectAgencyProjectDaily(agencyId);
+ if (null == agencyProjectDailyDTO) {
+ return resultList;
+ }
+ //2:获取当前组织最近日期的直属下级组织项目统计数据,按项目总量降序
+ resultList = projectDao.selectSubGrid(agencyProjectDailyDTO);
+ return resultList;
+ }
+
+ /**
+ * @Author sun
+ * @Description 数据-项目-日/月数据查询(日查询进九十天数据,月查询进十二个月数据)
+ **/
+ @Override
+ public List getProjectIncrTrend(TokenDto tokenDto, ProjectIncrTrendFormDTO formDTO) {
+ List resultList = new ArrayList<>();
+ //1:根据token获取agencyId
+ String agencyId = getLoginUserDetails(tokenDto);
+
+ //2:查询机关过去九十天日统计数据(sql降序取前九十条)
+ if (ProjectConstant.DATE.equals(formDTO.getType())){
+ resultList = projectDao.selectIncrTrendDaily(agencyId);
+ }
+
+ //3:查询机关过去十二个月月统计数据
+ if (ProjectConstant.MONTH.equals(formDTO.getType())) {
+ resultList = projectDao.selectIncrTrendMonthly(agencyId);
+ }
+
+ return null;
+ }
+
+ /**
+ * @author sun
+ * @Description 获取机关ID
+ */
+ private String getLoginUserDetails(TokenDto tokenDto) {
+ LoginUserDetailsFormDTO dto = new LoginUserDetailsFormDTO();
+ BeanUtils.copyProperties(tokenDto, dto);
+ LoginUserDetailsResultDTO data = epmetUserOpenFeignClient.getLoginUserDetails(dto).getData();
+ String agencyId = data.getAgencyId();
+ if (null == agencyId || "".equals(agencyId)) {
+ throw new RenException(ProjectConstant.GET_AGENCYID);
+ }
+ return agencyId;
+ }
+
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml
new file mode 100644
index 0000000000..ac9ecd9ad6
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml
@@ -0,0 +1,228 @@
+
+
+
+
+
+
+
+ SELECT
+ agency_id AS "agencyId",
+ project_total AS "projectTotal",
+ DATE_FORMAT(date_id, '%Y.%m.%d') AS "dateName",
+ pending_total AS "pendingTotal",
+ CAST(pending_ratio AS DECIMAL (9, 2)) AS "pendingRatio",
+ closed_total AS "closedTotal",
+ CAST(closed_ratio AS DECIMAL(9, 2)) AS "closedRatio"
+ FROM
+ fact_agency_project_daily
+ WHERE
+ del_flag = '0'
+ AND agency_id = #{agencyId}
+ ORDER BY date_id DESC
+ LIMIT 1
+
+
+
+ (
+ SELECT
+ "处理中" AS "name",
+ pending_total AS "value",
+ CAST(PENDING_RATIO AS DECIMAL (9, 2)) AS "ratio"
+ FROM
+ fact_agency_project_daily
+ WHERE
+ del_flag = '0'
+ AND agency_id = #{agencyId}
+ ORDER BY
+ date_id DESC
+ LIMIT 1
+ )
+ UNION ALL
+ (
+ SELECT
+ "已结案" AS "name",
+ closed_total AS "value",
+ CAST(closed_ratio AS DECIMAL(9, 2)) AS "ratio"
+ FROM
+ fact_agency_project_daily
+ WHERE
+ del_flag = '0'
+ AND agency_id = #{agencyId}
+ ORDER BY
+ date_id DESC
+ LIMIT 1
+ )
+
+
+
+ SELECT
+ id,
+ customer_id,
+ agency_id,
+ parent_id,
+ date_id,
+ week_id,
+ month_id,
+ quarter_id,
+ year_id
+ FROM
+ fact_agency_project_daily fapd
+ WHERE
+ del_flag = '0'
+ AND agency_id = #{agencyId}
+ ORDER BY
+ date_id DESC
+ LIMIT 1
+
+
+
+ SELECT
+ *
+ FROM (
+ (
+ SELECT
+ da.id AS "agencyId",
+ da.agency_name AS "name",
+ fapd.pending_total AS "value",
+ "处理中" AS "type",
+ fapd.project_total
+ FROM
+ fact_agency_project_daily fapd
+ LEFT JOIN dim_agency da ON fapd.agency_id = da.id
+ WHERE
+ fapd.del_flag = '0'
+ AND fapd.parent_id = #{agencyId}
+ AND fapd.date_id = #{dateId}
+ )
+ UNION ALL
+ (
+ SELECT
+ da.id AS "agencyId",
+ da.agency_name AS "name",
+ fapd.closed_total AS "value",
+ "已结案" AS "type",
+ fapd.project_total
+ FROM
+ fact_agency_project_daily fapd
+ LEFT JOIN dim_agency da ON fapd.agency_id = da.id
+ WHERE
+ fapd.del_flag = '0'
+ AND fapd.parent_id = #{agencyId}
+ AND fapd.date_id = #{dateId}
+ )
+ ) a
+ ORDER BY
+ a.project_total DESC
+
+
+
+ SELECT
+ *
+ FROM (
+ (
+ SELECT
+ da.id AS "agencyId",
+ da.agency_name AS "name",
+ fgpd.pending_total AS "value",
+ "处理中" AS "type",
+ fgpd.project_total
+ FROM
+ fact_grid_project_daily fgpd
+ LEFT JOIN dim_agency da ON fgpd.agency_id = da.id
+ WHERE
+ fgpd.del_flag = '0'
+ AND fgpd.agency_id = #{agencyId}
+ AND fgpd.date_id = #{dateId}
+ )
+ UNION ALL
+ (
+ SELECT
+ da.id AS "agencyId",
+ da.agency_name AS "name",
+ fgpd.closed_total AS "value",
+ "已结案" AS "type",
+ fgpd.project_total
+ FROM
+ fact_grid_project_daily fgpd
+ LEFT JOIN dim_agency da ON fgpd.agency_id = da.id
+ WHERE
+ fgpd.del_flag = '0'
+ AND fgpd.agency_id = #{agencyId}
+ AND fgpd.date_id = #{dateId}
+ )
+ ) a
+ ORDER BY
+ a.project_total DESC
+
+
+
+ SELECT * FROM(
+ (
+ SELECT
+ DATE_FORMAT(DATE_ID, "%Y/%m/%d") AS "date",
+ PENDING_INCR AS "value",
+ "处理中" AS "type"
+ FROM
+ fact_agency_project_daily
+ WHERE
+ del_flag = '0'
+ AND agency_id = #{agencyId}
+ ORDER BY
+ date_id DESC
+ LIMIT 90
+ )
+ UNION ALL
+ (
+ SELECT
+ DATE_FORMAT(DATE_ID, "%Y/%m/%d") AS "date",
+ CLOSED_INCR AS "value",
+ "已结案" AS "type"
+ FROM
+ fact_agency_project_daily
+ WHERE
+ del_flag = '0'
+ AND agency_id = #{agencyId}
+ ORDER BY
+ date_id DESC
+ LIMIT 90
+ )
+ ) a ORDER BY a.DATE_ID DESC, a.type ASC
+
+
+
+ SELECT * FROM(
+ (
+ SELECT
+ DATE_FORMAT(CONCAT(month_id,"00"), "%Y/%m") AS "date",
+ pending_incr AS "value",
+ "处理中" AS "type",
+ month_id
+ FROM
+ fact_agency_project_monthly
+ WHERE
+ del_flag = '0'
+ AND agency_id = #{agencyId}
+ ORDER BY
+ month_id DESC
+ LIMIT 12
+ )
+ UNION ALL
+ (
+ SELECT
+ DATE_FORMAT(CONCAT(month_id,"00"), "%Y/%m") AS "date",
+ closed_incr AS "value",
+ "已结案" AS "type",
+ month_id
+ FROM
+ fact_agency_project_monthly
+ WHERE
+ del_flag = '0'
+ AND agency_id = #{agencyId}
+ ORDER BY
+ month_id DESC
+ LIMIT 12
+ )
+ )a ORDER BY a.month_id DESC,a.type ASC
+
+
+
\ No newline at end of file