From e0e674c5c8544c5a2fb10e8d84e7b3c47e7eddac Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 1 Feb 2021 22:42:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=88=86=E6=9E=90=EF=BC=9A?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E7=BB=9F=E8=AE=A1=E3=80=81=E6=9C=88=E5=BA=A6?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E5=88=86=E6=9E=90=E3=80=81=E6=95=88=E7=8E=87?= =?UTF-8?q?=E5=88=86=E6=9E=90=E6=9F=A5=E8=AF=A2api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/utils/DateUtils.java | 34 ++++++ .../ScreenProjectQuantityOrgMonthlyDTO.java | 59 ++++++++++ .../screen/EfficiencyAnalysisFormDTO.java | 20 ++++ .../screen/QueryQuantityMonthlyFormDTO.java | 28 +++++ .../dto/form/screen/ScreenCommonFormDTO.java | 24 +++++ .../dto/result/ScreenCustomerAgencyDTO.java | 45 ++++++++ .../screen/EfficiencyAnalysisResultDTO.java | 40 +++++++ .../screen/ProjectQuantityResultDTO.java | 40 +++++++ .../screen/QueryQuantityMonthlyResultDTO.java | 27 +++++ .../screen/constant/ScreenConstant.java | 17 +++ .../controller/project/ProjectController.java | 60 ++++++++++- .../screen/ScreenCustomerAgencyDao.java | 8 ++ .../ScreenProjectCategoryGridDailyDao.java | 31 ++++++ .../ScreenProjectCategoryOrgDailyDao.java | 32 ++++++ .../screen/ScreenProjectGridDailyDao.java | 43 ++++++++ .../screen/ScreenProjectOrgDailyDao.java | 48 +++++++++ .../ScreenProjectQuantityGridMonthlyDao.java | 32 ++++++ .../ScreenProjectQuantityOrgMonthlyDao.java | 44 ++++++++ ...ScreenProjectCategoryGridDailyService.java | 29 +++++ .../ScreenProjectCategoryOrgDailyService.java | 29 +++++ .../screen/ScreenProjectGridDailyService.java | 38 +++++++ .../screen/ScreenProjectOrgDailyService.java | 47 ++++++++ ...reenProjectQuantityGridMonthlyService.java | 28 +++++ ...creenProjectQuantityOrgMonthlyService.java | 37 +++++++ ...enProjectCategoryGridDailyServiceImpl.java | 37 +++++++ ...eenProjectCategoryOrgDailyServiceImpl.java | 35 ++++++ .../ScreenProjectGridDailyServiceImpl.java | 53 +++++++++ .../ScreenProjectOrgDailyServiceImpl.java | 101 ++++++++++++++++++ ...ProjectQuantityGridMonthlyServiceImpl.java | 36 +++++++ ...nProjectQuantityOrgMonthlyServiceImpl.java | 97 +++++++++++++++++ .../mapper/screen/ScreenCustomerAgencyDao.xml | 9 ++ .../ScreenProjectCategoryGridDailyDao.xml | 6 ++ .../ScreenProjectCategoryOrgDailyDao.xml | 8 ++ .../screen/ScreenProjectGridDailyDao.xml | 32 ++++++ .../screen/ScreenProjectOrgDailyDao.xml | 55 ++++++++++ .../ScreenProjectQuantityGridMonthlyDao.xml | 8 ++ .../ScreenProjectQuantityOrgMonthlyDao.xml | 25 +++++ .../migration/V0.0.9__add_event_analysis.sql | 4 +- 38 files changed, 1339 insertions(+), 7 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectQuantityOrgMonthlyDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/EfficiencyAnalysisFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/QueryQuantityMonthlyFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/ScreenCommonFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/ScreenCustomerAgencyDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/EfficiencyAnalysisResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/ProjectQuantityResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/QueryQuantityMonthlyResultDTO.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectGridDailyDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectOrgDailyDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectQuantityGridMonthlyDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectGridDailyService.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectOrgDailyService.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectQuantityGridMonthlyService.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyService.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryGridDailyDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryOrgDailyDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectGridDailyDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectOrgDailyDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectQuantityGridMonthlyDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectQuantityOrgMonthlyDao.xml diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java index e4a6cf94cb..8c6432aadd 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java @@ -729,4 +729,38 @@ public class DateUtils { LocalDate ldn = new LocalDate(date); return ldn.dayOfMonth().withMaximumValue().toDate(); } + + /** + * @return ["202002","202003","202004","202005","202006","202007","202008","202009","202010","202011","202012","202101"] + * @param monthId 202101 + * @param num 11 + * @description 截止到当前monthId,近12个月的坐标 + * @Date 2021/2/1 17:20 + **/ + public static List getMonthIdList(String monthId,int num) { + List monthIdList = new ArrayList<>(); + for (int i = num; i >= NumConstant.ZERO; i--) { + Calendar c = Calendar.getInstance(); + c.setTime(com.epmet.commons.tools.utils.DateUtils.stringToDate(monthId.concat("01"), com.epmet.commons.tools.utils.DateUtils.DATE_PATTERN_YYYYMMDD)); + c.add(Calendar.MONTH, -i); + Date date = c.getTime(); + String month = com.epmet.commons.tools.utils.DateUtils.format(date, com.epmet.commons.tools.utils.DateUtils.DATE_PATTERN_YYYYMM); + // monthIdList.add(month.substring(4, 6).concat("月")); + monthIdList.add(month); + } + return monthIdList; + } + + /** + * @author yinzuomei + * @description 获取当前时间的山个月monthId + * @Date 2021/2/1 17:41 + **/ + public static String getCurrentTimeBeforeMonthId(){ + Calendar c = Calendar.getInstance(); + c.setTime(new Date()); + c.add(Calendar.MONTH, -1); + Date nowDate = c.getTime(); + return com.epmet.commons.tools.utils.DateUtils.format(nowDate, com.epmet.commons.tools.utils.DateUtils.DATE_PATTERN_YYYYMM); + } } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectQuantityOrgMonthlyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectQuantityOrgMonthlyDTO.java new file mode 100644 index 0000000000..0019aed057 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectQuantityOrgMonthlyDTO.java @@ -0,0 +1,59 @@ +/** + * 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.dto; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 项目(事件)数量分析按组织_按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Data +public class ScreenProjectQuantityOrgMonthlyDTO implements Serializable { + private static final long serialVersionUID = 6821188282305837207L; + /** + * 客户ID + */ + private String customerId; + + /** + * 日期yyyyMMdd + */ + private String monthId; + + /** + * 组织id + */ + private String orgId; + + /** + * 当前组织内,本月新增的项目数量:转项目日期在当前月份内 + */ + private Integer projectIncr; + + /** + * 截止到当前月份:累计项目总数 + */ + private Integer projectTotal; + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/EfficiencyAnalysisFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/EfficiencyAnalysisFormDTO.java new file mode 100644 index 0000000000..0bf1c1556f --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/EfficiencyAnalysisFormDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.form.screen; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * 【事件分析】效率分析 入参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/1 18:27 + */ +@Data +public class EfficiencyAnalysisFormDTO extends ScreenCommonFormDTO{ + /** + * 网格:grid; 街道:street + */ + @NotBlank(message = "type不能为空:网格:grid; 街道:street") + private String type; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/QueryQuantityMonthlyFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/QueryQuantityMonthlyFormDTO.java new file mode 100644 index 0000000000..7ee3cade33 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/QueryQuantityMonthlyFormDTO.java @@ -0,0 +1,28 @@ +package com.epmet.dto.form.screen; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * 近12个月【事件分析】月度数量分析 入参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/1 16:34 + */ +@Data +public class QueryQuantityMonthlyFormDTO extends ScreenCommonFormDTO{ + private static final long serialVersionUID = 8848067533647648347L; + + /** + * 每月项目增量:incr;累计项目数量:sum + */ + @NotBlank(message = "type不能为空:每月项目增量:incr;累计项目数量:sum") + private String type ; + + /** + * 截止到某月格式:yyyyMM;可为空 + */ + private String endMonthId; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/ScreenCommonFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/ScreenCommonFormDTO.java new file mode 100644 index 0000000000..f2e4e45533 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/ScreenCommonFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.dto.form.screen; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 大屏通用入参 + * + * @author yinzuomei@elink-cn.com + */ +@Data +public class ScreenCommonFormDTO implements Serializable { + private static final long serialVersionUID = -5959152175751211940L; + /** + * 来源于请求头中的customerId + */ + private String customerId; + /** + * 当前要查询的组织id + */ + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/ScreenCustomerAgencyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/ScreenCustomerAgencyDTO.java new file mode 100644 index 0000000000..c78858001d --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/ScreenCustomerAgencyDTO.java @@ -0,0 +1,45 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 组织机构信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-21 + */ +@Data +public class ScreenCustomerAgencyDTO implements Serializable { + private static final long serialVersionUID = 6328123559936824470L; + /** + * 客户id + */ + private String customerId; + + /** + * 组织id + */ + private String agencyId; + + /** + * 组织名称 + */ + private String agencyName; + + /** + * 机关级别(社区级:community, + 乡(镇、街道)级:street, + 区县级: district, + 市级: city + 省级:province) + */ + private String level; + + /** + * 行政地区编码 + */ + private String areaCode; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/EfficiencyAnalysisResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/EfficiencyAnalysisResultDTO.java new file mode 100644 index 0000000000..9924e7f041 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/EfficiencyAnalysisResultDTO.java @@ -0,0 +1,40 @@ +package com.epmet.dto.result.screen; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 【事件分析】效率分析 返参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/1 18:23 + */ +@Data +public class EfficiencyAnalysisResultDTO implements Serializable { + private static final long serialVersionUID = 7291513498972998552L; + + /** + * 可能是网格名,也可能是组织名 + */ + private String name; + + /** + * 解决率: 带%:90.74% + */ + private String resolvedRatioStr; + + /** + * 解决率数值 90.74 + */ + private BigDecimal resolvedRatio; + + /** + * 方便查找日志 + */ + private String customerId; + private String agencyId; + private String gridId; + private String dateId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/ProjectQuantityResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/ProjectQuantityResultDTO.java new file mode 100644 index 0000000000..89f55620cc --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/ProjectQuantityResultDTO.java @@ -0,0 +1,40 @@ +package com.epmet.dto.result.screen; + +import lombok.Data; + +/** + * 【事件分析】数量统计查询 + * + * @author yinzuomei@elink-cn.com + * @date 2021/1/29 16:39 + */ +@Data +public class ProjectQuantityResultDTO { + /** + * 事件总数 + */ + private Integer projectTotal; + + /** + * 已解决数 + */ + private Integer resolvedNum; + + /** + * 解决率,带%号的字符串 + */ + private String resolvedRatio; + + /** + * 事件总数,带%号的字符串 + */ + private String satisfactionRatio; + + /** + * 方便查找日志 + */ + private String customerId; + private String agencyId; + private String dateId; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/QueryQuantityMonthlyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/QueryQuantityMonthlyResultDTO.java new file mode 100644 index 0000000000..283c24a977 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/QueryQuantityMonthlyResultDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.result.screen; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 近12个月【事件分析】月度数量分析 返参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2021/2/1 16:57 + */ +@Data +public class QueryQuantityMonthlyResultDTO implements Serializable { + private static final long serialVersionUID = -9214182002720799008L; + + /** + * 横坐标集合 + */ + private List xAxis; + + /** + * 每个月的项目增量或者累计数量,根据入参type决定 + */ + private List yAxis; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/constant/ScreenConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/constant/ScreenConstant.java index e9729e7a23..2da4370f64 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/constant/ScreenConstant.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/constant/ScreenConstant.java @@ -24,4 +24,21 @@ public interface ScreenConstant { String GET_AREA_TREE_FAILURE = "查询行政地区编码树失败......"; + String STREET = "street"; + + String DISTRICT = "district"; + + String CITY = "city"; + + String PROVINCE = "province"; + + String LEVEL = "level"; + + String STR_NULL = ""; + + String ENGLISH_COMMA = ","; + + String GRID = "grid"; + + String AGENCY = "agency"; } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java index 94186e7336..1e75eab9f7 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java @@ -5,17 +5,21 @@ import com.epmet.commons.tools.exception.RenException; 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.datareport.service.evaluationindex.screen.*; import com.epmet.datareport.service.project.ProjectService; import com.epmet.dto.form.ProcessListFormDTO; +import com.epmet.dto.form.screen.EfficiencyAnalysisFormDTO; +import com.epmet.dto.form.screen.QueryQuantityMonthlyFormDTO; +import com.epmet.dto.form.screen.ScreenCommonFormDTO; +import com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO; +import com.epmet.dto.result.screen.ProjectQuantityResultDTO; +import com.epmet.dto.result.screen.QueryQuantityMonthlyResultDTO; import com.epmet.project.constant.ProjectConstant; import com.epmet.project.dto.form.DifficultyRankFormDTO; 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 org.springframework.web.bind.annotation.*; import java.util.List; @@ -29,7 +33,18 @@ public class ProjectController { @Autowired private ProjectService projectService; - + @Autowired + private ScreenProjectCategoryGridDailyService projectCategoryGridDailyService; + @Autowired + private ScreenProjectCategoryOrgDailyService projectCategoryOrgDailyService; + @Autowired + private ScreenProjectGridDailyService projectGridDailyService; + @Autowired + private ScreenProjectOrgDailyService projectOrgDailyService; + @Autowired + private ScreenProjectQuantityGridMonthlyService projectQuantityGridMonthlyService; + @Autowired + private ScreenProjectQuantityOrgMonthlyService projectQuantityOrgMonthlyService; /** * @Author sun @@ -119,6 +134,41 @@ public class ProjectController { return new Result>().ok(projectService.getMyNextAgency(tokenDto)); } + /** + * @param customerId + * @param formDTO + * @description 【事件分析】数量统计查询 + **/ + @PostMapping("queryquantity") + public Result queryQuantity(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCommonFormDTO formDTO){ + formDTO.setCustomerId(customerId); + return new Result().ok(projectOrgDailyService.queryQuantity(formDTO)); + } + + /** + * @param customerId + * @param formDTO + * @author yinzuomei + * @description 近12个月【事件分析】月度数量分析 + **/ + @PostMapping("queryquantity-monthly") + public Result queryQuantityMonthly(@RequestHeader("CustomerId") String customerId, @RequestBody QueryQuantityMonthlyFormDTO formDTO) { + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO); + return new Result().ok(projectQuantityOrgMonthlyService.queryQuantityMonthly(formDTO)); + } + /** + * @param customerId + * @param formDTO + * @author yinzuomei + * @description 【事件分析】效率分析 + **/ + @PostMapping("efficiency-analysis") + public Result> efficiencyAnalysis(@RequestHeader("CustomerId") String customerId, @RequestBody EfficiencyAnalysisFormDTO formDTO){ + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO); + return new Result>().ok(projectOrgDailyService.efficiencyAnalysis(formDTO)); + } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index 52ddea4bd0..60c3f1b3cd 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -17,6 +17,7 @@ package com.epmet.datareport.dao.evaluationindex.screen; +import com.epmet.dto.result.ScreenCustomerAgencyDTO; import com.epmet.evaluationindex.screen.dto.result.*; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -112,4 +113,11 @@ public interface ScreenCustomerAgencyDao { * @date 2020/10/28 10:33 上午 */ List selectSubAgencyId(@Param("agencyId") String agencyId); + + /** + * @param agencyId + * @author yinzuomei + * @description 查询组织基本信息 + **/ + ScreenCustomerAgencyDTO selectByAgencyId(@Param("agencyId") String agencyId); } \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.java new file mode 100644 index 0000000000..e5d92af056 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.java @@ -0,0 +1,31 @@ +/** + * 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.datareport.dao.evaluationindex.screen; + +import org.apache.ibatis.annotations.Mapper; + +/** + * 项目(事件)分类按网格_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Mapper +public interface ScreenProjectCategoryGridDailyDao{ + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java new file mode 100644 index 0000000000..c9403d83ad --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java @@ -0,0 +1,32 @@ +/** + * 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.datareport.dao.evaluationindex.screen; + +import org.apache.ibatis.annotations.Mapper; + +/** + * 项目(事件)分类按组织_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Mapper +public interface ScreenProjectCategoryOrgDailyDao { + + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectGridDailyDao.java new file mode 100644 index 0000000000..1eada75ab4 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectGridDailyDao.java @@ -0,0 +1,43 @@ +/** + * 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.datareport.dao.evaluationindex.screen; + +import com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + + +/** + * 项目(事件)分析按网格_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Mapper +public interface ScreenProjectGridDailyDao{ + + /** + * @param customerId + * @param areaCode + * @author yinzuomei + * @description 下级网格的效率(解决率)列表 + **/ + List queryGridEfficiencyAnalysis(@Param("customerId") String customerId, @Param("areaCode") String areaCode); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectOrgDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectOrgDailyDao.java new file mode 100644 index 0000000000..2a26119d9c --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectOrgDailyDao.java @@ -0,0 +1,48 @@ +/** + * 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.datareport.dao.evaluationindex.screen; + +import com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO; +import com.epmet.dto.result.screen.ProjectQuantityResultDTO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 项目(事件)分析按组织_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Mapper +public interface ScreenProjectOrgDailyDao { + + /** + * @author yinzuomei + * @description 【事件分析】数量统计查询 + **/ + ProjectQuantityResultDTO queryQuantity(@Param("customerId") String customerId, @Param("agencyId")String agencyId); + + /** + * @param areaCode + * @author yinzuomei + * @description 下级组织的效率(解决率)列表 + **/ + List queryEfficiencyAnalysis(@Param("customerId")String customerId,@Param("areaCode") String areaCode); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectQuantityGridMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectQuantityGridMonthlyDao.java new file mode 100644 index 0000000000..02c9545001 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectQuantityGridMonthlyDao.java @@ -0,0 +1,32 @@ +/** + * 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.datareport.dao.evaluationindex.screen; + +import org.apache.ibatis.annotations.Mapper; + +/** + * 项目(事件)数量分析按网格_按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Mapper +public interface ScreenProjectQuantityGridMonthlyDao { + + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.java new file mode 100644 index 0000000000..205c648f36 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.java @@ -0,0 +1,44 @@ +/** + * 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.datareport.dao.evaluationindex.screen; + +import com.epmet.dto.ScreenProjectQuantityOrgMonthlyDTO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 项目(事件)数量分析按组织_按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Mapper +public interface ScreenProjectQuantityOrgMonthlyDao { + + /** + * @return java.util.List + * @param customerId 当前客户id + * @param agencyId 当前要查询的组织 + * @param endMonthId 截止月份yyyyMM + * @author yinzuomei + * @description 近12个月【事件分析】月度数量分析 + **/ + List selectList(@Param("customerId") String customerId, @Param("agencyId")String agencyId, @Param("endMonthId")String endMonthId); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java new file mode 100644 index 0000000000..6fa3939479 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java @@ -0,0 +1,29 @@ +/** + * 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.datareport.service.evaluationindex.screen; + +/** + * 项目(事件)分类按网格_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +public interface ScreenProjectCategoryGridDailyService{ + + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java new file mode 100644 index 0000000000..ea6bbd3bbc --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java @@ -0,0 +1,29 @@ +/** + * 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.datareport.service.evaluationindex.screen; + + +/** + * 项目(事件)分类按组织_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +public interface ScreenProjectCategoryOrgDailyService{ + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectGridDailyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectGridDailyService.java new file mode 100644 index 0000000000..d9eb13c55f --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectGridDailyService.java @@ -0,0 +1,38 @@ +/** + * 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.datareport.service.evaluationindex.screen; + +import com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO; + +import java.util.List; + +/** + * 项目(事件)分析按网格_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +public interface ScreenProjectGridDailyService { + /** + * @param customerId + * @param areaCode + * @author yinzuomei + * @description 【事件分析】效率分析 网格的解决率 + **/ + List efficiencyAnalysis(String customerId, String areaCode); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectOrgDailyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectOrgDailyService.java new file mode 100644 index 0000000000..ee1c9e85fb --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectOrgDailyService.java @@ -0,0 +1,47 @@ +/** + * 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.datareport.service.evaluationindex.screen; + +import com.epmet.dto.form.screen.EfficiencyAnalysisFormDTO; +import com.epmet.dto.form.screen.ScreenCommonFormDTO; +import com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO; +import com.epmet.dto.result.screen.ProjectQuantityResultDTO; + +import java.util.List; + +/** + * 项目(事件)分析按组织_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +public interface ScreenProjectOrgDailyService { + /** + * @param formDTO + * @author yinzuomei + * @description 【事件分析】数量统计查询 + **/ + ProjectQuantityResultDTO queryQuantity(ScreenCommonFormDTO formDTO); + + /** + * @param formDTO + * @author yinzuomei + * @description 【事件分析】效率分析 + **/ + List efficiencyAnalysis(EfficiencyAnalysisFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectQuantityGridMonthlyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectQuantityGridMonthlyService.java new file mode 100644 index 0000000000..2e965971f5 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectQuantityGridMonthlyService.java @@ -0,0 +1,28 @@ +/** + * 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.datareport.service.evaluationindex.screen; + +/** + * 项目(事件)数量分析按网格_按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +public interface ScreenProjectQuantityGridMonthlyService { + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyService.java new file mode 100644 index 0000000000..182feb83bd --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyService.java @@ -0,0 +1,37 @@ +/** + * 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.datareport.service.evaluationindex.screen; + +import com.epmet.dto.form.screen.QueryQuantityMonthlyFormDTO; +import com.epmet.dto.result.screen.QueryQuantityMonthlyResultDTO; + +/** + * 项目(事件)数量分析按组织_按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +public interface ScreenProjectQuantityOrgMonthlyService { + + /** + * @param formDTO + * @author yinzuomei + * @description 近12个月【事件分析】月度数量分析 + **/ + QueryQuantityMonthlyResultDTO queryQuantityMonthly(QueryQuantityMonthlyFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java new file mode 100644 index 0000000000..0aa3731bc9 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java @@ -0,0 +1,37 @@ +/** + * 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.datareport.service.evaluationindex.screen.impl; + + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectCategoryGridDailyService; +import org.springframework.stereotype.Service; + +/** + * 项目(事件)分类按网格_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@DataSource(DataSourceConstant.EVALUATION_INDEX) +@Service +public class ScreenProjectCategoryGridDailyServiceImpl implements ScreenProjectCategoryGridDailyService { + + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java new file mode 100644 index 0000000000..91ff2640b6 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java @@ -0,0 +1,35 @@ +/** + * 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.datareport.service.evaluationindex.screen.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectCategoryOrgDailyService; +import org.springframework.stereotype.Service; + +/** + * 项目(事件)分类按组织_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@DataSource(DataSourceConstant.EVALUATION_INDEX) +@Service +public class ScreenProjectCategoryOrgDailyServiceImpl implements ScreenProjectCategoryOrgDailyService { + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java new file mode 100644 index 0000000000..a1f8a0c9fd --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java @@ -0,0 +1,53 @@ +/** + * 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.datareport.service.evaluationindex.screen.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenProjectGridDailyDao; +import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectGridDailyService; +import com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 项目(事件)分析按网格_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@DataSource(DataSourceConstant.EVALUATION_INDEX) +@Service +public class ScreenProjectGridDailyServiceImpl implements ScreenProjectGridDailyService { + @Autowired + private ScreenProjectGridDailyDao screenProjectGridDailyDao; + + /** + * @param customerId + * @param areaCode + * @author yinzuomei + * @description 【事件分析】效率分析 网格的解决率 + **/ + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + public List efficiencyAnalysis(String customerId, String areaCode) { + return screenProjectGridDailyDao.queryGridEfficiencyAnalysis(customerId,areaCode); + } +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java new file mode 100644 index 0000000000..b4518096dc --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java @@ -0,0 +1,101 @@ +/** + * 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.datareport.service.evaluationindex.screen.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerAgencyDao; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenProjectOrgDailyDao; +import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectGridDailyService; +import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectOrgDailyService; +import com.epmet.dto.form.screen.EfficiencyAnalysisFormDTO; +import com.epmet.dto.form.screen.ScreenCommonFormDTO; +import com.epmet.dto.result.ScreenCustomerAgencyDTO; +import com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO; +import com.epmet.dto.result.screen.ProjectQuantityResultDTO; +import com.epmet.evaluationindex.screen.constant.ScreenConstant; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +/** + * 项目(事件)分析按组织_按天统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@Slf4j +@Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class ScreenProjectOrgDailyServiceImpl implements ScreenProjectOrgDailyService { + @Autowired + private ScreenProjectOrgDailyDao baseDao; + @Autowired + private ScreenCustomerAgencyDao screenCustomerAgencyDao; + @Autowired + private ScreenProjectGridDailyService screenProjectGridDailyService; + /** + * @param formDTO + * @author yinzuomei + * @description 【事件分析】数量统计查询 + **/ + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + public ProjectQuantityResultDTO queryQuantity(ScreenCommonFormDTO formDTO) { + //客户id、agencyId都不能为空 + ProjectQuantityResultDTO resultDTO = baseDao.queryQuantity(formDTO.getCustomerId(), formDTO.getAgencyId()); + if (null != resultDTO) { + return resultDTO; + } + log.warn("【事件分析】数量统计查询 结果为空"); + ProjectQuantityResultDTO defaultDto = new ProjectQuantityResultDTO(); + defaultDto.setCustomerId(formDTO.getCustomerId()); + defaultDto.setAgencyId(formDTO.getAgencyId()); + defaultDto.setProjectTotal(NumConstant.ZERO); + defaultDto.setResolvedNum(NumConstant.ZERO); + defaultDto.setResolvedRatio("0%"); + defaultDto.setSatisfactionRatio("0%"); + return defaultDto; + } + + /** + * @param formDTO + * @author yinzuomei + * @description 【事件分析】效率分析 + **/ + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + public List efficiencyAnalysis(EfficiencyAnalysisFormDTO formDTO) { + ScreenCustomerAgencyDTO agencyDTO = screenCustomerAgencyDao.selectByAgencyId(formDTO.getAgencyId()); + if (null != agencyDTO) { + if (ScreenConstant.STREET.equals(formDTO.getType())) { + // 查询当前入参的下一级 + // type=street查询screen_project_org_daily + return baseDao.queryEfficiencyAnalysis(formDTO.getCustomerId(), agencyDTO.getAreaCode()); + } else if (ScreenConstant.GRID.equals(formDTO.getType())) { + // type=grid查询组织下的网格 + return screenProjectGridDailyService.efficiencyAnalysis(formDTO.getCustomerId(), agencyDTO.getAreaCode()); + } + } + return new ArrayList<>(); + } +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java new file mode 100644 index 0000000000..49f991a29a --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java @@ -0,0 +1,36 @@ +/** + * 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.datareport.service.evaluationindex.screen.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectQuantityGridMonthlyService; +import org.springframework.stereotype.Service; + +/** + * 项目(事件)数量分析按网格_按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@DataSource(DataSourceConstant.EVALUATION_INDEX) +@Service +public class ScreenProjectQuantityGridMonthlyServiceImpl implements ScreenProjectQuantityGridMonthlyService { + + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java new file mode 100644 index 0000000000..1e4855604d --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java @@ -0,0 +1,97 @@ +/** + * 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.datareport.service.evaluationindex.screen.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyDao; +import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyService; +import com.epmet.dto.ScreenProjectQuantityOrgMonthlyDTO; +import com.epmet.dto.form.screen.QueryQuantityMonthlyFormDTO; +import com.epmet.dto.result.screen.QueryQuantityMonthlyResultDTO; +import com.epmet.evaluationindex.screen.constant.ScreenConstant; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Function; +import java.util.stream.Collectors; + +/** + * 项目(事件)数量分析按组织_按月统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-27 + */ +@DataSource(DataSourceConstant.EVALUATION_INDEX) +@Service +public class ScreenProjectQuantityOrgMonthlyServiceImpl implements ScreenProjectQuantityOrgMonthlyService { + @Autowired + private ScreenProjectQuantityOrgMonthlyDao baseDao; + + /** + * @param formDTO + * @author yinzuomei + * @description 近12个月【事件分析】月度数量分析 + **/ + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Override + public QueryQuantityMonthlyResultDTO queryQuantityMonthly(QueryQuantityMonthlyFormDTO formDTO) { + if (StringUtils.isBlank(formDTO.getEndMonthId())) { + formDTO.setEndMonthId(DateUtils.getCurrentTimeBeforeMonthId()); + } + QueryQuantityMonthlyResultDTO resultDTO = new QueryQuantityMonthlyResultDTO(); + //近12个月的monthId集合,["202002","202003","202004","202005","202006","202007","202008","202009","202010","202011","202012","202101"] + List monthIdList = DateUtils.getMonthIdList(formDTO.getEndMonthId(), NumConstant.ELEVEN); + //要返回的横坐标:["02月","03月","04月","05月","06月","07月","08月","09月","10月","11月","12月","01月"] + List xAxis = new ArrayList<>(); + List yAxis = new ArrayList<>(); + //查询近12个月的数据 + List dtoList = baseDao.selectList(formDTO.getCustomerId(), formDTO.getAgencyId(), formDTO.getEndMonthId()); + + Map dtoMap = new HashMap<>(); + if (!CollectionUtils.isEmpty(dtoList)) { + dtoMap = dtoList.stream().collect(Collectors.toMap(ScreenProjectQuantityOrgMonthlyDTO::getMonthId, Function.identity(), (key1, key2) -> key2)); + } + for (String monthId : monthIdList) { + //202101=>01月 + xAxis.add(monthId.substring(NumConstant.FOUR, NumConstant.SIX).concat(ScreenConstant.MONTH)); + if (!CollectionUtils.isEmpty(dtoList)) { + if ("incr".equals(formDTO.getType())) { + yAxis.add(dtoMap.get(monthId).getProjectIncr()); + } else if ("sum".equals(formDTO.getType())) { + yAxis.add(dtoMap.get(monthId).getProjectTotal()); + } + continue; + } + //没有数据默认赋值0 + yAxis.add(0); + } + resultDTO.setXAxis(xAxis); + resultDTO.setYAxis(yAxis); + return resultDTO; + } + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml index c63fc774a1..678d8fc875 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml @@ -216,4 +216,13 @@ AND IS_DISPLAY = 1 AND pid = #{agencyId} + + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryGridDailyDao.xml new file mode 100644 index 0000000000..8a78a2ce57 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryGridDailyDao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryOrgDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryOrgDailyDao.xml new file mode 100644 index 0000000000..10b3a02431 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryOrgDailyDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectGridDailyDao.xml new file mode 100644 index 0000000000..2011413015 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectGridDailyDao.xml @@ -0,0 +1,32 @@ + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectOrgDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectOrgDailyDao.xml new file mode 100644 index 0000000000..f050e5dd1b --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectOrgDailyDao.xml @@ -0,0 +1,55 @@ + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectQuantityGridMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectQuantityGridMonthlyDao.xml new file mode 100644 index 0000000000..98b140e175 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectQuantityGridMonthlyDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectQuantityOrgMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectQuantityOrgMonthlyDao.xml new file mode 100644 index 0000000000..6e836f4df4 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectQuantityOrgMonthlyDao.xml @@ -0,0 +1,25 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.9__add_event_analysis.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.9__add_event_analysis.sql index be29f0a879..b2c2e623f2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.9__add_event_analysis.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.9__add_event_analysis.sql @@ -105,7 +105,7 @@ CREATE TABLE `screen_project_category_grid_daily` ( `GRID_ID` varchar(64) NOT NULL COMMENT '网格id', `PID` varchar(64) NOT NULL COMMENT '网格所属的组织id', `PIDS` varchar(255) NOT NULL COMMENT '网格所有的父级id,以英文:或者英文,隔开', - `EPMET_CATEGORY_CODE` varchar(255) NOT NULL COMMENT '类别编码', + `EPMET_CATEGORY_CODE` varchar(255) NOT NULL COMMENT 'e世通中的项目类别编码', `PROJECT_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下所有项目总数', `PENDING_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下,正在处理中的项目总数', `CLOSED_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下已结案的项目总数', @@ -129,7 +129,7 @@ CREATE TABLE `screen_project_category_org_daily` ( `ORG_TYPE` varchar(64) NOT NULL COMMENT '社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province', `PID` varchar(64) NOT NULL COMMENT '当前orgId所属的上级id', `PIDS` varchar(255) NOT NULL COMMENT 'orgId所有的父级id,以英文:或者英文,隔开', - `EPMET_CATEGORY_CODE` varchar(255) NOT NULL COMMENT '类别编码', + `EPMET_CATEGORY_CODE` varchar(255) NOT NULL COMMENT 'e世通中的项目类别编码', `PROJECT_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下所有项目总数', `PENDING_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下,正在处理中的项目总数', `CLOSED_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '该分类下已结案的项目总数',