Browse Source

Merge remote-tracking branch 'origin/dev'

dev_shibei_match
yinzuomei 5 years ago
parent
commit
9cc16a0bd7
  1. 5
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java
  2. 26
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/AgencyNode.java
  3. 73
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/AgencyTreeUtils.java
  4. 34
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java
  5. 2
      epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java
  6. 4
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/CustomerAgencyDTO.java
  7. 4
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/govorg/CustomerAgencyEntity.java
  8. 59
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectQuantityOrgMonthlyDTO.java
  9. 20
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/EfficiencyAnalysisFormDTO.java
  10. 28
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/QueryQuantityMonthlyFormDTO.java
  11. 24
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/ScreenCommonFormDTO.java
  12. 45
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/ScreenCustomerAgencyDTO.java
  13. 50
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/AgencyNodeDTO.java
  14. 15
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/BidInfoResultDTO.java
  15. 19
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/ContractResultDTO.java
  16. 36
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/DeptNodeDTO.java
  17. 36
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/GridNodeDTO.java
  18. 18
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/OneListResultDTO.java
  19. 40
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/EfficiencyAnalysisResultDTO.java
  20. 40
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/ProjectQuantityResultDTO.java
  21. 27
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/QueryQuantityMonthlyResultDTO.java
  22. 17
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/constant/ScreenConstant.java
  23. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthBarchartFormDTO.java
  24. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthPieChartFormDTO.java
  25. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/SubAgencyIndexRankFormDTO.java
  26. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/SubAgencyIndexRankYMFormDTO.java
  27. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/YearAverageIndexFormDTO.java
  28. 27
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/feign/DataReportOpenFeignClient.java
  29. 21
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/feign/impl/DataReportOpenFeignClientFallBack.java
  30. 65
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/OfsController.java
  31. 28
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java
  32. 57
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java
  33. 16
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java
  34. 26
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java
  35. 38
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java
  36. 43
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectGridDailyDao.java
  37. 48
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectOrgDailyDao.java
  38. 32
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectQuantityGridMonthlyDao.java
  39. 44
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.java
  40. 36
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenBidInfoDao.java
  41. 35
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenContractInfoDao.java
  42. 35
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenListInfoDao.java
  43. 8
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java
  44. 38
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectGridDailyService.java
  45. 47
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectOrgDailyService.java
  46. 28
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectQuantityGridMonthlyService.java
  47. 37
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyService.java
  48. 29
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java
  49. 53
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java
  50. 101
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java
  51. 36
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java
  52. 97
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java
  53. 34
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/OfsService.java
  54. 59
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/OfsServiceImpl.java
  55. 18
      epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenBidInfoDao.xml
  56. 18
      epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenContractInfoDao.xml
  57. 17
      epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenListInfoDao.xml
  58. 56
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml
  59. 32
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectGridDailyDao.xml
  60. 55
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectOrgDailyDao.xml
  61. 8
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectQuantityGridMonthlyDao.xml
  62. 25
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectQuantityOrgMonthlyDao.xml
  63. 22
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/PingYinConstants.java
  64. 13
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java
  65. 29
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerSubInfoDTO.java
  66. 16
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/PageQueryGridFormDTO.java
  67. 48
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java
  68. 36
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java
  69. 12
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyAbilityFormDTO.java
  70. 23
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridServiceAbilityFormDTO.java
  71. 60
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java
  72. 25
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerAreaCodeResultDTO.java
  73. 19
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ClosedIncrResultDTO.java
  74. 20
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/EvaluateTotalResultDTO.java
  75. 19
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ProjectIncrResultDTO.java
  76. 54
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ProjectOrgDailyResultDTO.java
  77. 46
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ProjectOrgMonthlyResultDTO.java
  78. 18
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ProjectTotalResultDTO.java
  79. 18
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ResolvedNumResultDTO.java
  80. 19
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/UnClosedTotalResultDTO.java
  81. 60
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/BidFormDTO.java
  82. 56
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ContractFormDTO.java
  83. 35
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/OneListFormDTO.java
  84. 126
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenCustomerWorkRecordDictDTO.java
  85. 57
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridDailyFormDTO.java
  86. 122
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridMonthlyDTO.java
  87. 47
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgDailyFormDTO.java
  88. 112
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java
  89. 152
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectGridDailyDTO.java
  90. 147
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectOrgDailyDTO.java
  91. 134
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectQuantityGridMonthlyDTO.java
  92. 141
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectQuantityOrgMonthlyDTO.java
  93. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/ScreenCollFormDTO.java
  94. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyFormDTO.java
  95. 6
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerDeptFormDTO.java
  96. 6
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java
  97. 7
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimCustomerDTO.java
  98. 56
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java
  99. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java
  100. 92
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java

5
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java

@ -119,6 +119,11 @@ public interface ServiceConstant {
*/
String DATA_STATISTICAL_SERVER = "data-statistical-server";
/**
* 数据统计结果查询
*/
String DATA_REPORT_SERVER="data-report-server";
/**
* 微信第三方平台
*/

26
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/AgencyNode.java

@ -0,0 +1,26 @@
package com.epmet.commons.tools.utils;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* 描述一下
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/4 20:49
*/
@Data
public class AgencyNode<T> implements Serializable {
private String areaCode;
private String parentAreaCode;
/**
* 子节点列表
*/
private List<T> subAgencyList = new ArrayList<>();
}

73
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/AgencyTreeUtils.java

@ -0,0 +1,73 @@
package com.epmet.commons.tools.utils;
import com.epmet.commons.tools.validator.AssertUtils;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/**
* 描述一下
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/4 20:49
*/
public class AgencyTreeUtils {
/**
* 根据pid构建树节点
*/
public static <T extends AgencyNode> List<T> build(List<T> agencyNodes, String parentAreaCode) {
//pid不能为空
AssertUtils.isNull(parentAreaCode, "parentAreaCode");
List<T> treeList = new ArrayList<>();
for (T agencyNode : agencyNodes) {
if (parentAreaCode.equals(agencyNode.getParentAreaCode())) {
treeList.add(findChildren(agencyNodes, agencyNode));
}
}
return treeList;
}
/**
* 查找子节点
*/
private static <T extends AgencyNode> T findChildren(List<T> agencyNodes, T rootNode) {
for (T agencyNode : agencyNodes) {
if (rootNode.getAreaCode().equals(agencyNode.getParentAreaCode())) {
rootNode.getSubAgencyList().add(findChildren(agencyNodes, agencyNode));
}
}
return rootNode;
}
/**
* 构建树节点
*/
public static <T extends AgencyNode> List<T> build(List<T> agencyNodes) {
List<T> result = new ArrayList<>();
//list转map
Map<String, T> nodeMap = new LinkedHashMap<>(agencyNodes.size());
for (T agencyNode : agencyNodes) {
nodeMap.put(agencyNode.getAreaCode(), agencyNode);
}
for (T node : nodeMap.values()) {
T parent = nodeMap.get(node.getParentAreaCode());
if (parent != null && !(node.getAreaCode().equals(parent.getAreaCode()))) {
parent.getSubAgencyList().add(node);
continue;
}
result.add(node);
}
return result;
}
}

34
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<String> getMonthIdList(String monthId,int num) {
List<String> 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);
}
}

2
epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java

@ -115,7 +115,7 @@ public class InternalAuthProcessor extends AuthProcessor {
builder.header(AppClientConstant.CUSTOMER_ID,baseTokenDto.getCustomerId());
}
if (StringUtils.equals(baseTokenDto.getApp(), "gov")) {//工作端
if (StringUtils.equalsAny(baseTokenDto.getApp(), AppClientConstant.APP_GOV, AppClientConstant.APP_RESI)) {//工作端/居民
if(StringUtils.isNotBlank(customerId)){
exchange.getRequest().mutate().header(AppClientConstant.CUSTOMER_ID, customerId);
}

4
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/CustomerAgencyDTO.java

@ -128,4 +128,8 @@ public class CustomerAgencyDTO implements Serializable {
*/
private String district;
/**
* 当前组织的上级行政地区编码add0204;举例平阴县对应的是济南市3701
*/
private String parentAreaCode;
}

4
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/govorg/CustomerAgencyEntity.java

@ -94,4 +94,8 @@ public class CustomerAgencyEntity extends BaseEpmetEntity {
*/
private String district;
/**
* 当前组织的上级行政地区编码add0204;举例平阴县对应的是济南市3701
*/
private String parentAreaCode;
}

59
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

20
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;
}

28
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;
}

24
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;
}

45
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;
}

50
epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/AgencyNodeDTO.java

@ -0,0 +1,50 @@
package com.epmet.dto.result.plugins;
import com.epmet.commons.tools.utils.AgencyNode;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* 008当前用户的数据权限(多客户版本) 返参DTO
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/3 20:33
*/
@Data
public class AgencyNodeDTO extends AgencyNode<AgencyNodeDTO> implements Serializable {
private static final long serialVersionUID = -3745920378557792529L;
/**
* 直属机关Id
* */
private String agencyId;
/**
* 直属机关名称
* */
private String agencyName;
/**
* 机关级别社区级community 街道:street, 区县级: district, 市级: city 省级:province
* */
private String level;
/**
* 当前agencyId所属的客户id add02.03
* */
private String customerId;
/**
* 直属机关直属网格列表
* */
private List<GridNodeDTO> gridList = new ArrayList<>();
/**
* 直属机关直属部门列表
* */
private List<DeptNodeDTO> departmentList = new ArrayList<>();
}

15
epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/BidInfoResultDTO.java

@ -0,0 +1,15 @@
package com.epmet.dto.result.plugins;
import lombok.Data;
/**
* 146体系竞标管理-列表
*
* @author yinzuomei@elink-cn.com
* @date 2021/1/22 13:37
*/
@Data
public class BidInfoResultDTO {
private String bidName;
private String statusDesc;
}

19
epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/ContractResultDTO.java

@ -0,0 +1,19 @@
package com.epmet.dto.result.plugins;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
* 146体系合同监督-列表
*
* @author yinzuomei@elink-cn.com
* @date 2021/1/22 13:30
*/
@Data
public class ContractResultDTO {
private String contractListName;
@JsonFormat(pattern = "yyyy.MM.dd", timezone = "GMT+8")
private Date dueDate;
}

36
epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/DeptNodeDTO.java

@ -0,0 +1,36 @@
package com.epmet.dto.result.plugins;
import lombok.Data;
import java.io.Serializable;
/**
* @Description 部门信息
* @ClassName ExtDeptResultDTO
* @Auth wangc
* @Date 2020-08-17 17:16
*/
@Data
public class DeptNodeDTO implements Serializable {
private static final long serialVersionUID = 1792371558965832432L;
/**
* 部门Id
* */
private String deptId;
/**
* 部门名称
* */
private String deptName;
/**
* 当前deptId所属的customerId add02.03
* */
private String customerId;
/**
* 当前deptId对应的地区编码 add02.03
* */
private String areaCode;
}

36
epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/GridNodeDTO.java

@ -0,0 +1,36 @@
package com.epmet.dto.result.plugins;
import lombok.Data;
import java.io.Serializable;
/**
* 008当前用户的数据权限(多客户版本) 返参DTO
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/3 20:33
*/
@Data
public class GridNodeDTO implements Serializable {
private static final long serialVersionUID = -4531574240525562587L;
/**
* 网格Id
* */
private String gridId;
/**
* 网格名称
* */
private String gridName;
/**
* 当前gridId所属的客户id add02.03
* */
private String customerId;
/**
* 当前gridId对应的地区编码 add02.03
* */
private String areaCode;
}

18
epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/OneListResultDTO.java

@ -0,0 +1,18 @@
package com.epmet.dto.result.plugins;
import lombok.Data;
import java.io.Serializable;
/**
* 146体系清单列表
*
* @author yinzuomei@elink-cn.com
* @date 2021/1/22 13:23
*/
@Data
public class OneListResultDTO implements Serializable {
private static final long serialVersionUID = -1578923862757670664L;
private String listName;
private String listId;
}

40
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;
}

40
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;
}

27
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<String> xAxis;
/**
* 每个月的项目增量或者累计数量根据入参type决定
*/
private List<Integer> yAxis;
}

17
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";
}

5
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthBarchartFormDTO.java

@ -26,4 +26,9 @@ public class MonthBarchartFormDTO implements Serializable {
* 月份ID,如果此列有值查询截止到当前monthId的近12个月数据
*/
private String monthId;
/**
* area_code升级,新增此参数来源于当前token
*/
private String customerId;
}

5
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthPieChartFormDTO.java

@ -21,4 +21,9 @@ public class MonthPieChartFormDTO implements Serializable {
*/
@NotBlank(message = "机关ID不能为空",groups = {MonthPieChart.class})
private String agencyId;
/**
* area_code升级,新增此参数来源于当前token
*/
private String customerId;
}

5
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/SubAgencyIndexRankFormDTO.java

@ -30,4 +30,9 @@ public class SubAgencyIndexRankFormDTO implements Serializable {
private Integer topNum;
private String yearId;
/**
* area_code升级,新增此参数来源于当前token
*/
private String customerId;
}

5
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/SubAgencyIndexRankYMFormDTO.java

@ -53,4 +53,9 @@ public class SubAgencyIndexRankYMFormDTO implements Serializable {
* 组织类型 组织agency 网格grid
*/
private String orgType;
/**
* area_code升级,新增此参数来源于当前token
*/
private String customerId;
}

5
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/YearAverageIndexFormDTO.java

@ -21,4 +21,9 @@ public class YearAverageIndexFormDTO implements Serializable {
*/
@NotBlank(message = "机关ID不能为空",groups = {YearAverageIndex.class})
private String agencyId;
/**
* area_code升级,新增此参数来源于当前token
*/
private String customerId;
}

27
epmet-module/data-report/data-report-client/src/main/java/com/epmet/feign/DataReportOpenFeignClient.java

@ -0,0 +1,27 @@
package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.result.plugins.AgencyNodeDTO;
import com.epmet.feign.impl.DataReportOpenFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
/**
* 本服务对外开放的API,其他服务通过引用此client调用该服务
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/3 22:05
*/
// @FeignClient(name = ServiceConstant.DATA_REPORT_SERVER, fallback = DataReportOpenFeignClientFallBack.class,url = "localhost:8109")
@FeignClient(name = ServiceConstant.DATA_REPORT_SERVER, fallback = DataReportOpenFeignClientFallBack.class)
public interface DataReportOpenFeignClient {
/**
* @param agencyId
* @description 查询当前组织及下级组织树
* @Date 2021/2/3 22:05
**/
@GetMapping("/data/report/screen/agency/querystaffagencytree/{agencyId}")
Result<AgencyNodeDTO> queryStaffAgencyTree(@PathVariable("agencyId") String agencyId);
}

21
epmet-module/data-report/data-report-client/src/main/java/com/epmet/feign/impl/DataReportOpenFeignClientFallBack.java

@ -0,0 +1,21 @@
package com.epmet.feign.impl;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.result.plugins.AgencyNodeDTO;
import com.epmet.feign.DataReportOpenFeignClient;
import org.springframework.stereotype.Component;
@Component
public class DataReportOpenFeignClientFallBack implements DataReportOpenFeignClient {
/**
* @param agencyId
* @description 查询当前组织及下级组织树
* @Date 2021/2/3 22:05
**/
@Override
public Result<AgencyNodeDTO> queryStaffAgencyTree(String agencyId) {
return ModuleUtils.feignConError(ServiceConstant.DATA_REPORT_SERVER, "queryStaffAgencyTree",agencyId);
}
}

65
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/OfsController.java

@ -0,0 +1,65 @@
package com.epmet.datareport.controller.plugins;
import com.epmet.commons.tools.utils.Result;
import com.epmet.datareport.service.plugins.OfsService;
import com.epmet.dto.result.plugins.BidInfoResultDTO;
import com.epmet.dto.result.plugins.ContractResultDTO;
import com.epmet.dto.result.plugins.OneListResultDTO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 146体系数据查询
*
* @author yinzuomei@elink-cn.com
* @date 2021/1/22 12:58
*/
@RestController
@RequestMapping("plugins/ofs")
public class OfsController {
@Autowired
private OfsService ofsService;
/**
* @param customerId
* @author yinzuomei
* @description 146体系清单列表
* @Date 2021/1/22 13:36
**/
@PostMapping("list")
public Result<List<OneListResultDTO>> oneList(@RequestHeader("CustomerId") String customerId){
if(StringUtils.isNotBlank(customerId)){
return new Result().ok(ofsService.queryOneList(customerId));
}
return new Result();
}
/**
* @param customerId
* @author yinzuomei
* @description 146体系合同监督-列表
* @Date 2021/1/22 13:36
**/
@PostMapping("contractlist")
public Result<List<ContractResultDTO>> queryContractList(@RequestHeader("CustomerId") String customerId){
if(StringUtils.isNotBlank(customerId)){
return new Result().ok(ofsService.queryContractList(customerId));
}
return new Result();
}
@PostMapping("bidlist")
public Result<List<BidInfoResultDTO>> bidList(@RequestHeader("CustomerId") String customerId){
if(StringUtils.isNotBlank(customerId)){
return new Result().ok(ofsService.queryBidList(customerId));
}
return new Result();
}
}

28
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java

@ -0,0 +1,28 @@
package com.epmet.datareport.controller.plugins;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 大屏工作日志相关输出接口
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/21 19:51
*/
@RestController
@RequestMapping("plugins/workrecord")
public class WorkRecordController {
//todo
//5、【工作日志】本机及下级排名
//NEI接口地址:https://nei.netease.com/interface/detail/?pid=57068&id=348966
//返参中的当前组织的参与人数、组织次数 直接sum所有下级的值;
//下级根据当前组织的areaCode查询下级列表,再去查询screen_work_record_org_daily
//legend来源于screen_customer_work_record_dict表 level=2,dataType=party
//6、【工作日志】近12月趋势图
//NEI接口地址:https://nei.netease.com/interface/detail/?pid=57068&id=348967
}

57
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,14 @@ public class ProjectController {
@Autowired
private ProjectService projectService;
@Autowired
private ScreenProjectGridDailyService projectGridDailyService;
@Autowired
private ScreenProjectOrgDailyService projectOrgDailyService;
@Autowired
private ScreenProjectQuantityGridMonthlyService projectQuantityGridMonthlyService;
@Autowired
private ScreenProjectQuantityOrgMonthlyService projectQuantityOrgMonthlyService;
/**
* @Author sun
@ -119,6 +130,42 @@ public class ProjectController {
return new Result<List<ProjectNextAgencyResultDTO>>().ok(projectService.getMyNextAgency(tokenDto));
}
/**
* @param customerId
* @param formDTO
* @description 事件分析数量统计查询 平阴大屏
**/
@PostMapping("queryquantity")
public Result<ProjectQuantityResultDTO> 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<QueryQuantityMonthlyResultDTO> queryQuantityMonthly(@RequestHeader("CustomerId") String customerId, @RequestBody QueryQuantityMonthlyFormDTO formDTO) {
formDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(formDTO);
return new Result<QueryQuantityMonthlyResultDTO>().ok(projectQuantityOrgMonthlyService.queryQuantityMonthly(formDTO));
}
/**
* @param customerId
* @param formDTO
* @author yinzuomei
* @description 事件分析效率分析 平阴大屏
**/
@PostMapping("efficiency-analysis")
public Result<List<EfficiencyAnalysisResultDTO>> efficiencyAnalysis(@RequestHeader("CustomerId") String customerId, @RequestBody EfficiencyAnalysisFormDTO formDTO){
formDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(formDTO);
return new Result<List<EfficiencyAnalysisResultDTO>>().ok(projectOrgDailyService.efficiencyAnalysis(formDTO));
}
//todo 【事件类型分析】NEI接口地址: https://nei.netease.com/interface/detail/?pid=57068&id=346721
}

16
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java

@ -7,11 +7,13 @@ import com.epmet.dto.form.AddAreaCodeDictFormDTO;
import com.epmet.dto.form.AreaCodeDictFormDTO;
import com.epmet.dto.result.AreaCodeDictResultDTO;
import com.epmet.dto.result.commonservice.AddAreaCodeDictResultDTO;
import com.epmet.dto.result.plugins.AgencyNodeDTO;
import com.epmet.evaluationindex.screen.dto.form.CompartmentByBizTypeFormDTO;
import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO;
import com.epmet.evaluationindex.screen.dto.form.TreeByTypeFormDTO;
import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO;
import com.epmet.evaluationindex.screen.dto.result.TreeResultDTO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -94,4 +96,18 @@ public class AgencyController {
ValidatorUtils.validateEntity(formDTO);
return new Result<AddAreaCodeDictResultDTO>().ok(agencyService.addStreetCommAreaCode(formDTO));
}
/**
* @param agencyId
* @author yinzuomei
* @description 查询当前组织及下级组织树
* @Date 2021/2/3 22:19
**/
@GetMapping("querystaffagencytree/{agencyId}")
public Result<AgencyNodeDTO> queryStaffAgencyTree(@PathVariable("agencyId") String agencyId) {
//todo 单独校验下此方法
if (StringUtils.isNotBlank(agencyId)) {
return new Result<AgencyNodeDTO>().ok(agencyService.queryStaffAgencyTree(agencyId));
}
return new Result<>();
}
}

26
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java

@ -6,6 +6,7 @@ import com.epmet.datareport.eum.OrgTypeEnum;
import com.epmet.datareport.service.evaluationindex.screen.IndexService;
import com.epmet.evaluationindex.screen.dto.form.*;
import com.epmet.evaluationindex.screen.dto.result.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -17,6 +18,7 @@ import java.util.List;
* @author yinzuomei@elink-cn.com
* @date 2020/8/18 10:13
*/
@Slf4j
@RestController
@RequestMapping("/screen/index")
public class IndexController {
@ -31,7 +33,9 @@ public class IndexController {
* @date 2020/8/19 2:53 下午
*/
@PostMapping("yearaverageindex")
public Result<YearAverageIndexResultDTO> yearAverageIndex(@RequestBody YearAverageIndexFormDTO yearAverageIndexFormDTO){
public Result<YearAverageIndexResultDTO> yearAverageIndex(@RequestHeader("CustomerId") String customerId,@RequestBody YearAverageIndexFormDTO yearAverageIndexFormDTO){
//area_code升级,新增此参数
yearAverageIndexFormDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(yearAverageIndexFormDTO, YearAverageIndexFormDTO.YearAverageIndex.class);
return new Result<YearAverageIndexResultDTO>().ok(indexService.yearAverageIndex(yearAverageIndexFormDTO));
}
@ -43,7 +47,9 @@ public class IndexController {
* @date 2020/8/19 3:17 下午
*/
@PostMapping("monthindexanalysis/piechart")
public Result<MonthPieChartResultDTO> monthPieChart(@RequestBody MonthPieChartFormDTO monthPieChartFormDTO){
public Result<MonthPieChartResultDTO> monthPieChart(@RequestHeader("CustomerId") String customerId,@RequestBody MonthPieChartFormDTO monthPieChartFormDTO){
//area_code升级,新增此参数
monthPieChartFormDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(monthPieChartFormDTO, MonthPieChartFormDTO.MonthPieChart.class);
return new Result<MonthPieChartResultDTO>().ok(indexService.monthPieChart(monthPieChartFormDTO));
}
@ -55,7 +61,9 @@ public class IndexController {
* @date 2020/8/19 5:27 下午
*/
@PostMapping("monthindexanalysis/barchart")
public Result<MonthBarchartResultDTO> monthBarchart(@RequestBody MonthBarchartFormDTO monthBarchartFormDTO){
public Result<MonthBarchartResultDTO> monthBarchart(@RequestHeader("CustomerId") String customerId,@RequestBody MonthBarchartFormDTO monthBarchartFormDTO){
//area_code升级,新增此参数
monthBarchartFormDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(monthBarchartFormDTO, MonthBarchartFormDTO.MonthBarchart.class);
return new Result<MonthBarchartResultDTO>().ok(indexService.monthBarchart(monthBarchartFormDTO));
}
@ -67,7 +75,9 @@ public class IndexController {
* @date 2020/8/20 10:02 上午
*/
@PostMapping("subagencyindexrank")
public Result<List<SubAgencyIndexRankResultDTO>> subAgencyIndexRank(@RequestBody SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO){
public Result<List<SubAgencyIndexRankResultDTO>> subAgencyIndexRank(@RequestHeader("CustomerId") String customerId,@RequestBody SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO){
//area_code升级,新增此参数
subAgencyIndexRankFormDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(subAgencyIndexRankFormDTO, SubAgencyIndexRankFormDTO.SubAgencyIndexRank.class);
return new Result<List<SubAgencyIndexRankResultDTO>>().ok(indexService.subAgencyIndexRank(subAgencyIndexRankFormDTO));
}
@ -81,7 +91,9 @@ public class IndexController {
* @Date 13:39 2020-09-11
**/
@PostMapping("dataclient/subagencyindexrank")
public Result<List<AnNingSubAgencyIndexRankResultDTO>> getSubAgencyIndexRank(@RequestBody SubAgencyIndexRankYMFormDTO formDTO) {
public Result<List<AnNingSubAgencyIndexRankResultDTO>> getSubAgencyIndexRank(@RequestHeader("CustomerId") String customerId,@RequestBody SubAgencyIndexRankYMFormDTO formDTO) {
//area_code升级,新增此参数
formDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(formDTO, SubAgencyIndexRankYMFormDTO.SubAgencyIndexRank.class);
return new Result<List<AnNingSubAgencyIndexRankResultDTO>>().ok(indexService.getSubAgencyIndexRank(formDTO));
}
@ -118,7 +130,7 @@ public class IndexController {
/**
* @param formDTO
* @Description 组织月度指数得分
* @Description 数据改版组织月度指数得分
* @author sun
*/
@PostMapping("month/indexscore")
@ -129,7 +141,7 @@ public class IndexController {
/**
* @param formDTO
* @Description 先进排行-先进支部排行
* @Description 数据改版先进排行-先进支部排行
* @author sun
*/
@PostMapping("advancedbranchrank")

38
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java

@ -17,6 +17,10 @@
package com.epmet.datareport.dao.evaluationindex.screen;
import com.epmet.dto.result.ScreenCustomerAgencyDTO;
import com.epmet.dto.result.plugins.AgencyNodeDTO;
import com.epmet.dto.result.plugins.DeptNodeDTO;
import com.epmet.dto.result.plugins.GridNodeDTO;
import com.epmet.evaluationindex.screen.dto.result.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -112,4 +116,38 @@ public interface ScreenCustomerAgencyDao {
* @date 2020/10/28 10:33 上午
*/
List<SubBranchCountResultDTO> selectSubAgencyId(@Param("agencyId") String agencyId);
/**
* @param agencyId
* @author yinzuomei
* @description 查询组织基本信息
**/
ScreenCustomerAgencyDTO selectByAgencyId(@Param("agencyId") String agencyId);
/**
* @param areaCode
* @author yinzuomei
* @description 根据areaCode查询组织机构
* @Date 2021/2/4 21:51
**/
List<AgencyNodeDTO> queryStaffAgencyTree(@Param("areaCode")String areaCode);
/**
* @param areaCode
* @param agencyId
* @author yinzuomei
* @description 查找组织下的部门
* @Date 2021/2/4 21:51
**/
List<DeptNodeDTO> selectDeptList(@Param("areaCode") String areaCode,@Param("agencyId") String agencyId);
/**
* @param areaCode
* @param agencyId
* @author yinzuomei
* @description 查找组织下的网格
* @Date 2021/2/4 21:52
**/
List<GridNodeDTO> selectGridList(@Param("areaCode") String areaCode,@Param("agencyId") String agencyId);
}

43
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<EfficiencyAnalysisResultDTO> queryGridEfficiencyAnalysis(@Param("customerId") String customerId, @Param("areaCode") String areaCode);
}

48
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<EfficiencyAnalysisResultDTO> queryEfficiencyAnalysis(@Param("customerId")String customerId,@Param("areaCode") String areaCode);
}

32
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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 {
}

44
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<com.epmet.dto.ScreenProjectQuantityOrgMonthlyDTO>
* @param customerId 当前客户id
* @param agencyId 当前要查询的组织
* @param endMonthId 截止月份yyyyMM
* @author yinzuomei
* @description 近12个月事件分析月度数量分析
**/
List<ScreenProjectQuantityOrgMonthlyDTO> selectList(@Param("customerId") String customerId, @Param("agencyId")String agencyId, @Param("endMonthId")String endMonthId);
}

36
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenBidInfoDao.java

@ -0,0 +1,36 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.datareport.dao.plugins;
import com.epmet.dto.result.plugins.BidInfoResultDTO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 146:竞标管理
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-22
*/
@Mapper
public interface ScreenBidInfoDao{
List<BidInfoResultDTO> selectList(String customerId);
}

35
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenContractInfoDao.java

@ -0,0 +1,35 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.datareport.dao.plugins;
import com.epmet.dto.result.plugins.ContractResultDTO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 146:合同基本信息
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-22
*/
@Mapper
public interface ScreenContractInfoDao {
List<ContractResultDTO> selectList(String customerId);
}

35
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenListInfoDao.java

@ -0,0 +1,35 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.datareport.dao.plugins;
import com.epmet.dto.result.plugins.OneListResultDTO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 146:一张清单列表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-22
*/
@Mapper
public interface ScreenListInfoDao {
List<OneListResultDTO> selectList(String customerId);
}

8
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java

@ -4,6 +4,7 @@ import com.epmet.dto.form.AddAreaCodeDictFormDTO;
import com.epmet.dto.form.AreaCodeDictFormDTO;
import com.epmet.dto.result.AreaCodeDictResultDTO;
import com.epmet.dto.result.commonservice.AddAreaCodeDictResultDTO;
import com.epmet.dto.result.plugins.AgencyNodeDTO;
import com.epmet.evaluationindex.screen.dto.form.CompartmentByBizTypeFormDTO;
import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO;
import com.epmet.evaluationindex.screen.dto.form.TreeByTypeFormDTO;
@ -50,4 +51,11 @@ public interface AgencyService {
List<AreaCodeDictResultDTO> areaCodeDictTree(AreaCodeDictFormDTO formDTO);
AddAreaCodeDictResultDTO addStreetCommAreaCode(AddAreaCodeDictFormDTO formDTO);
/**
* @param agencyId
* @author yinzuomei
* @description 查询当前组织及下级组织树
* @Date 2021/2/3 22:19
**/
AgencyNodeDTO queryStaffAgencyTree(String agencyId);
}

38
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<EfficiencyAnalysisResultDTO> efficiencyAnalysis(String customerId, String areaCode);
}

47
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<EfficiencyAnalysisResultDTO> efficiencyAnalysis(EfficiencyAnalysisFormDTO formDTO);
}

28
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.datareport.service.evaluationindex.screen;
/**
* 项目(事件)数量分析按网格_按月统计
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-27
*/
public interface ScreenProjectQuantityGridMonthlyService {
}

37
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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);
}

29
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java

@ -1,8 +1,10 @@
package com.epmet.datareport.service.evaluationindex.screen.impl;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.AgencyTreeUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerAgencyDao;
@ -12,6 +14,8 @@ import com.epmet.dto.form.AddAreaCodeDictFormDTO;
import com.epmet.dto.form.AreaCodeDictFormDTO;
import com.epmet.dto.result.AreaCodeDictResultDTO;
import com.epmet.dto.result.commonservice.AddAreaCodeDictResultDTO;
import com.epmet.dto.result.ScreenCustomerAgencyDTO;
import com.epmet.dto.result.plugins.AgencyNodeDTO;
import com.epmet.evaluationindex.screen.constant.ScreenConstant;
import com.epmet.evaluationindex.screen.dto.form.CompartmentByBizTypeFormDTO;
import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO;
@ -20,6 +24,8 @@ import com.epmet.evaluationindex.screen.dto.result.AgencyDistributionResultDTO;
import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO;
import com.epmet.evaluationindex.screen.dto.result.TreeResultDTO;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.exceptions.TooManyResultsException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -34,6 +40,7 @@ import java.util.List;
* @author yinzuomei@elink-cn.com
* @date 2020/8/18 10:18
*/
@Slf4j
@Service
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class AgencyServiceImpl implements AgencyService {
@ -261,4 +268,26 @@ public class AgencyServiceImpl implements AgencyService {
}
throw new RenException(res.getMsg() + res.getInternalMsg());
}
/**
* @param agencyId
* @author yinzuomei
* @description 查询当前组织及下级组织树
* @Date 2021/2/3 22:19
**/
@Override
public AgencyNodeDTO queryStaffAgencyTree(String agencyId) {
ScreenCustomerAgencyDTO agencyDTO = screenCustomerAgencyDao.selectByAgencyId(agencyId);
if (null == agencyDTO || StringUtils.isBlank(agencyDTO.getAreaCode())) {
throw new RenException(String.format("当前agencyId%s所属的area_code为空", agencyId));
}
List<AgencyNodeDTO> list = screenCustomerAgencyDao.queryStaffAgencyTree(agencyDTO.getAreaCode());
for (AgencyNodeDTO agencyNodeDTO : list) {
agencyNodeDTO.setGridList(screenCustomerAgencyDao.selectGridList(agencyNodeDTO.getAreaCode(), agencyNodeDTO.getAgencyId()));
agencyNodeDTO.setDepartmentList(screenCustomerAgencyDao.selectDeptList(agencyNodeDTO.getAreaCode(), agencyNodeDTO.getAgencyId()));
}
List<AgencyNodeDTO> treeList = AgencyTreeUtils.build(list);
log.info(JSON.toJSONString(treeList));
return treeList.get(NumConstant.ZERO);
}
}

53
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<EfficiencyAnalysisResultDTO> efficiencyAnalysis(String customerId, String areaCode) {
return screenProjectGridDailyDao.queryGridEfficiencyAnalysis(customerId,areaCode);
}
}

101
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<EfficiencyAnalysisResultDTO> 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<>();
}
}

36
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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 {
}

97
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<String> monthIdList = DateUtils.getMonthIdList(formDTO.getEndMonthId(), NumConstant.ELEVEN);
//要返回的横坐标:["02月","03月","04月","05月","06月","07月","08月","09月","10月","11月","12月","01月"]
List<String> xAxis = new ArrayList<>();
List<Integer> yAxis = new ArrayList<>();
//查询近12个月的数据
List<ScreenProjectQuantityOrgMonthlyDTO> dtoList = baseDao.selectList(formDTO.getCustomerId(), formDTO.getAgencyId(), formDTO.getEndMonthId());
Map<String, ScreenProjectQuantityOrgMonthlyDTO> 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;
}
}

34
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/OfsService.java

@ -0,0 +1,34 @@
package com.epmet.datareport.service.plugins;
import com.epmet.dto.result.plugins.BidInfoResultDTO;
import com.epmet.dto.result.plugins.ContractResultDTO;
import com.epmet.dto.result.plugins.OneListResultDTO;
import java.util.List;
/**
* 146体系数据查询
*
* @author yinzuomei@elink-cn.com
* @date 2021/1/22 10:18
*/
public interface OfsService {
List<OneListResultDTO> queryOneList(String customerId);
/**
* @param customerId
* @author yinzuomei
* @description 146体系合同监督-列表
* @Date 2021/1/22 13:36
**/
List<ContractResultDTO> queryContractList(String customerId);
/**
* @param customerId
* @author yinzuomei
* @description 146体系竞标管理-列表
* @Date 2021/1/22 13:38
**/
List<BidInfoResultDTO> queryBidList(String customerId);
}

59
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/OfsServiceImpl.java

@ -0,0 +1,59 @@
package com.epmet.datareport.service.plugins.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.dao.plugins.ScreenBidInfoDao;
import com.epmet.datareport.dao.plugins.ScreenContractInfoDao;
import com.epmet.datareport.dao.plugins.ScreenListInfoDao;
import com.epmet.datareport.service.plugins.OfsService;
import com.epmet.dto.result.plugins.BidInfoResultDTO;
import com.epmet.dto.result.plugins.ContractResultDTO;
import com.epmet.dto.result.plugins.OneListResultDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 146体系数据查询
*
* @author yinzuomei@elink-cn.com
* @date 2021/1/22 10:20
*/
@Service
@Slf4j
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class OfsServiceImpl implements OfsService {
@Autowired
private ScreenBidInfoDao screenBidInfoDao;
@Autowired
private ScreenContractInfoDao screenContractInfoDao;
@Autowired
private ScreenListInfoDao screenListInfoDao;
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public List<OneListResultDTO> queryOneList(String customerId) {
return screenListInfoDao.selectList(customerId);
}
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public List<ContractResultDTO> queryContractList(String customerId) {
return screenContractInfoDao.selectList(customerId);
}
/**
* @param customerId
* @author yinzuomei
* @description 146体系竞标管理-列表
* @Date 2021/1/22 13:38
**/
@Override
public List<BidInfoResultDTO> queryBidList(String customerId) {
return screenBidInfoDao.selectList(customerId);
}
}

18
epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenBidInfoDao.xml

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.datareport.dao.plugins.ScreenBidInfoDao">
<select id="selectList" parameterType="java.lang.String" resultType="com.epmet.dto.result.plugins.BidInfoResultDTO">
SELECT
sbi.BID_NAME AS bidName,
sbi.STATUS_DESC AS statusDesc
FROM
screen_bid_info sbi
WHERE
sbi.DEL_FLAG = '0'
AND sbi.CUSTOMER_ID =#{customerId}
ORDER BY
sbi.RELEASE_TIME DESC
</select>
</mapper>

18
epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenContractInfoDao.xml

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.datareport.dao.plugins.ScreenContractInfoDao">
<select id="selectList" parameterType="java.lang.String" resultType="com.epmet.dto.result.plugins.ContractResultDTO">
SELECT
sci.CONTRACT_NAME AS contractListName,
sci.DUE_DATE AS dueDate
FROM
screen_contract_info sci
WHERE
sci.DEL_FLAG = '0'
and sci.CUSTOMER_ID=#{customerId}
order by sci.DUE_DATE desc
</select>
</mapper>

17
epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenListInfoDao.xml

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.datareport.dao.plugins.ScreenListInfoDao">
<select id="selectList" parameterType="java.lang.String" resultType="com.epmet.dto.result.plugins.OneListResultDTO">
SELECT
sli.LIST_ID AS listId,
sli.LIST_NAME AS listName
FROM
screen_list_info sli
WHERE
sli.DEL_FLAG = '0'
AND sli.CUSTOMER_ID = #{customerId}
ORDER BY
sli.SORT ASC
</select>
</mapper>

56
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml

@ -216,4 +216,60 @@
AND IS_DISPLAY = 1
AND pid = #{agencyId}
</select>
<select id="selectByAgencyId" parameterType="map" resultType="com.epmet.dto.result.ScreenCustomerAgencyDTO">
SELECT *
FROM
screen_customer_agency
WHERE
del_flag = 0
AND agency_id = #{agencyId}
</select>
<!-- 根据areaCode查询组织机构 -->
<select id="queryStaffAgencyTree" resultType="com.epmet.dto.result.plugins.AgencyNodeDTO">
SELECT
agency.AGENCY_ID AS agencyId,
agency.AGENCY_NAME AS agencyName,
agency.LEVEL AS LEVEL,
agency.CUSTOMER_ID AS customerId,
agency.AREA_CODE AS areaCode,
agency.PARENT_AREA_CODE AS parentAreaCode
FROM
screen_customer_agency agency
WHERE
agency.DEL_FLAG = '0'
AND agency.AREA_CODE like concat(#{areaCode},'%')
</select>
<!-- 查找组织下的部门 -->
<select id="selectDeptList" resultType="com.epmet.dto.result.plugins.DeptNodeDTO">
SELECT
DEPT_ID AS deptId,
DEPT_NAME AS deptName,
CUSTOMER_ID as customerId,
AREA_CODE AS areaCode
FROM
screen_customer_dept dept
WHERE
DEL_FLAG = '0'
AND AREA_CODE like concat(#{areaCode},'%')
and PARENT_AGENCY_ID =#{agencyId}
</select>
<!-- 查找组织下的网格 -->
<select id="selectGridList" resultType="com.epmet.dto.result.plugins.GridNodeDTO">
SELECT
grid.GRID_ID AS gridId,
grid.GRID_NAME AS gridName,
grid.CUSTOMER_ID AS customerId,
grid.AREA_CODE AS areaCode
FROM
screen_customer_grid grid
WHERE
grid.DEL_FLAG = '0'
and grid.AREA_CODE like CONCAT(#{areaCode},'%')
and grid.PARENT_AGENCY_ID=#{agencyId}
</select>
</mapper>

32
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectGridDailyDao.xml

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.datareport.dao.evaluationindex.screen.ScreenProjectGridDailyDao">
<!-- 下级网格的效率(解决率)列表 -->
<select id="queryGridEfficiencyAnalysis" parameterType="map" resultType="com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO">
SELECT
m.CUSTOMER_ID AS customerId,
'' AS agencyId,
m.GRID_ID AS gridId,
m.DATE_ID AS dateId,
a.GRID_NAME AS NAME,
( CASE WHEN m.RESOLVED_RATIO IS NULL THEN '0' ELSE FORMAT( m.RESOLVED_RATIO * 100, 2 ) END ) AS resolvedRatio,
( CASE WHEN m.RESOLVED_RATIO IS NULL THEN '0%' ELSE CONCAT( FORMAT( m.RESOLVED_RATIO * 100, 2 ), '%' ) END ) AS resolvedRatioStr
FROM
screen_project_grid_daily m
INNER JOIN screen_customer_grid a ON ( m.GRID_ID = a.GRID_ID AND a.DEL_FLAG = '0' )
WHERE
m.DEL_FLAG = '0'
AND a.AREA_CODE LIKE concat( #{areaCode}, '%')
AND M.DATE_ID=(
select t1.DATE_ID from screen_project_grid_daily t1
where t1.DEL_FLAG='0'
and t1.CUSTOMER_ID=#{customerId}
order by t1.DATE_ID desc
limit 1
)
</select>
</mapper>

55
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectOrgDailyDao.xml

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.datareport.dao.evaluationindex.screen.ScreenProjectOrgDailyDao">
<!-- 【事件分析】数量统计查询 -->
<select id="queryQuantity" parameterType="map" resultType="com.epmet.dto.result.screen.ProjectQuantityResultDTO">
SELECT
m.CUSTOMER_ID as customerId,
m.ORG_ID as agencyId,
m.DATE_ID as dateId,
IFNULL(m.PROJECT_TOTAL,0) as projectTotal,
IFNULL(m.RESOLVED_NUM,0) as resolvedNum,
(case
when m.RESOLVED_RATIO is null then '0%'
else CONCAT(FORMAT(m.RESOLVED_RATIO*100,2),'%')
end)as resolvedRatio,
(case
when m.GOOD_RATIO is null then '0%'
else CONCAT(FORMAT(m.GOOD_RATIO*100,2),'%')
end)as satisfactionRatio
FROM
screen_project_org_daily m
WHERE
m.DEL_FLAG = '0'
AND m.CUSTOMER_ID =#{customerId}
AND m.ORG_ID = #{agencyId}
order by m.DATE_ID desc
limit 1
</select>
<!-- 下级组织的效率(解决率)列表 -->
<select id="queryEfficiencyAnalysis" parameterType="map" resultType="com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO">
SELECT
m.CUSTOMER_ID AS customerId,
m.ORG_ID AS agencyId,
'' AS gridId,
m.DATE_ID AS dateId,
a.AGENCY_NAME AS NAME,
( CASE WHEN m.RESOLVED_RATIO IS NULL THEN '0' ELSE FORMAT( m.RESOLVED_RATIO * 100, 2 ) END ) AS resolvedRatio,
( CASE WHEN m.RESOLVED_RATIO IS NULL THEN '0%' ELSE CONCAT( FORMAT( m.RESOLVED_RATIO * 100, 2 ), '%' ) END ) AS resolvedRatioStr
FROM
screen_project_org_daily m
INNER JOIN screen_customer_agency a ON ( m.ORG_ID = a.AGENCY_ID AND a.DEL_FLAG = '0' )
WHERE
m.DEL_FLAG = '0'
AND a.AREA_CODE LIKE concat( #{areaCode}, '%')
AND M.DATE_ID=(
select t1.DATE_ID from screen_project_org_daily t1
where t1.DEL_FLAG='0'
and t1.CUSTOMER_ID=#{customerId}
order by t1.DATE_ID desc
limit 1
)
</select>
</mapper>

8
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectQuantityGridMonthlyDao.xml

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.datareport.dao.evaluationindex.screen.ScreenProjectQuantityGridMonthlyDao">
</mapper>

25
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectQuantityOrgMonthlyDao.xml

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.datareport.dao.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyDao">
<!-- 近12个月【事件分析】月度数量分析 -->
<select id="selectList" parameterType="map" resultType="com.epmet.dto.ScreenProjectQuantityOrgMonthlyDTO">
SELECT
m.CUSTOMER_ID,
m.ORG_ID,
m.PROJECT_INCR,
m.PROJECT_TOTAL,
m.MONTH_ID
FROM
screen_project_quantity_org_monthly m
WHERE
m.DEL_FLAG = '0'
AND m.CUSTOMER_ID =#{customerId}
AND m.ORG_ID =#{agencyId}
AND m.MONTH_ID &lt;= #{endMonthId}
ORDER BY
m.MONTH_ID ASC
LIMIT 12
</select>
</mapper>

22
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/PingYinConstants.java

@ -0,0 +1,22 @@
package com.epmet.constant;
/**
* @Author zxc
* @DateTime 2021/1/28 下午3:20
*/
public interface PingYinConstants {
String GRID_INFO_IS_ZERO = "客户【%s】下的网格信息为空......";
String AGENCY_INFO_IS_ZERO = "客户【%s】下的组织信息为空......";
String SELECT_GRID_INFO_BY_ORG_IS_NULL = "客户【%s】根据orgId查询网格项目信息为空......";
String EVALUATE_BAD = "bad";
String EVALUATE_GOOD = "good";
String EVALUATE_PERFECT = "perfect";
String UN_CLOSED = "unClosed";
String CLOSED = "closed";
String CREATED_BY = "APP_USER";
}

13
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java

@ -5,6 +5,8 @@ import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* 指标计算通用入参DTO
@ -29,6 +31,17 @@ public class CalculateCommonFormDTO implements Serializable {
@NotBlank(message = "客户id不能为空", groups = { CancelCalculateGroup.class })
private String customerId;
/**
* 当前客户所属的地区编码 add 01.14
*/
private String customerAreaCode = "";
/**
* 当前客户下的需要汇聚的子客户列表 add 01.14
* 暂不使用
*/
private List<String> subCustomerIds = new ArrayList<>();
public CalculateCommonFormDTO() {
super();
}

29
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerSubInfoDTO.java

@ -0,0 +1,29 @@
package com.epmet.dto.indexcal;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 查询当前客户的area_code信息以及下一级客户列表
*
* @author yinzuomei@elink-cn.com
* @date 2021/1/14 16:17
*/
@Data
public class CustomerSubInfoDTO implements Serializable {
private String customerId;
private String customerName;
/**
* 当前客户所属的地区编码 add 01.14
*/
private String customerAreaCode;
/**
* 当前客户下的需要汇聚的子客户列表 add 01.14
* 暂不使用
*/
private List<String> subCustomerIds;
}

16
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/PageQueryGridFormDTO.java

@ -4,6 +4,8 @@ import lombok.Data;
import javax.validation.constraints.Min;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* 分页查询网格列表
@ -36,13 +38,25 @@ public class PageQueryGridFormDTO implements Serializable {
private Integer pageIndex;
/**
* 当前客户所属的地区编码 add 01.14
*/
private String customerAreaCode = "";
/**
* 当前客户下的需要汇聚的子客户列表 add 01.14
* 暂不使用
*/
private List<String> subCustomerIds = new ArrayList<>();
public PageQueryGridFormDTO(String customerId,String monthId,int pageIndex,int pageNo,int pageSize){
public PageQueryGridFormDTO(String customerId,String monthId,int pageIndex,int pageNo,int pageSize,String customerAreaCode,List<String> subCustomerIds){
this.customerId=customerId;
this.monthId=monthId;
this.pageIndex=pageIndex;
this.pageNo=pageNo;
this.pageSize=pageSize;
this.customerAreaCode=customerAreaCode;
this.subCustomerIds=subCustomerIds;
}
}

48
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java

@ -69,4 +69,52 @@ public class DeptGovrnAbilityFormDTO implements Serializable {
* 办结项目满意度
*/
private BigDecimal satisfactionRatio;
/**
* V2升级新增字段, 详见说明文档
* 2020-01-07
*/
private BigDecimal respProjectRatioFz;
/**
* V2升级新增字段, 详见说明文档
* 2020-01-07
*/
private BigDecimal respProjectRatioFm;
/**
* V2升级新增字段, 详见说明文档
* 2020-01-07
*/
private BigDecimal handleProjectRatioFz;
/**
* V2升级新增字段, 详见说明文档
* 2020-01-07
*/
private BigDecimal handleProjectRatioFm;
/**
* V2升级新增字段, 详见说明文档
* 2020-01-07
*/
private BigDecimal closedProjectRatioFz;
/**
* V2升级新增字段, 详见说明文档
* 2020-01-07
*/
private BigDecimal closedProjectRatioFm;
/**
* V2升级新增字段, 详见说明文档
* 2020-01-07
*/
private BigDecimal satisfactionRatioFz;
/**
* V2升级新增字段, 详见说明文档
* 2020-01-07
*/
private BigDecimal satisfactionRatioFm;
}

36
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java

@ -79,4 +79,40 @@ public class GridGovrnAbilityFormDTO implements Serializable {
* 网格自治项目数 统计期网格自身内办结的项目数目
*/
private Integer selfSolveProjectCount;
/**
* V2升级新增字段, 详见说明文档
* 2020-01-07
*/
private BigDecimal transferRightRatioFz;
/**
* V2升级新增字段, 详见说明文档
* 2020-01-07
*/
private BigDecimal transferRightRatioFm;
/**
* V2升级新增字段, 详见说明文档
* 2020-01-07
*/
private BigDecimal satisfactionRatioFz;
/**
* V2升级新增字段, 详见说明文档
* 2020-01-07
*/
private BigDecimal satisfactionRatioFm;
/**
* V2升级新增字段, 详见说明文档
* 2020-01-07
*/
private BigDecimal issueToProjectRatioFz;
/**
* V2升级新增字段, 详见说明文档
* 2020-01-07
*/
private BigDecimal issueToProjectRatioFm;
}

12
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyAbilityFormDTO.java

@ -104,4 +104,16 @@ public class GridPartyAbilityFormDTO implements Serializable {
* 党员参加三会一课人次
*/
private Integer joinThreeMeetsCount;
/**
* V2升级字段issueToProjectRatio的分子评价周期内转为项目的数量
* 2020-01-07 新增
*/
private Integer shiftedProjectTotal;
/**
* V2升级字段issueToProjectRatio的分母评价周期内网格内居民提出的议题数目
* 2020-01-07 新增
*/
private Integer issueTotal;
}

23
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridServiceAbilityFormDTO.java

@ -55,4 +55,27 @@ public class GridServiceAbilityFormDTO implements Serializable {
*/
private BigDecimal partyVolunteerRatio;
/**
* V2升级字段partyVolunteerRatio的分子网格党员志愿者数
* 2020-01-07
*/
private Integer partyVolunteerTotal;
/**
* V2升级字段partyVolunteerRatio的分母志愿者总数
* 2020-01-07
*/
private Integer volunteerTotal;
/**
* V2升级字段volunteerRatio的分子居民且注册志愿者的总人数
* 2020-01-07
*/
private Integer volunteerUserTotal;
/**
* V2升级字段volunteerRatio的分母网格内注册居民数
* 2020-01-07
*/
private Integer regUserTotal;
}

60
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java

@ -80,4 +80,64 @@ public class OrgGovrnAbilityFormDTO implements Serializable {
* 街道办结项目的处理效率, data_type=street时有值
*/
private BigDecimal handleProjectRatio;
/**
* V2升级新增字段, 详见说明文档
* 2020-01-07
*/
private BigDecimal respProjectRatioFz;
/**
* V2升级新增字段, 详见说明文档
* 2020-01-07
*/
private BigDecimal respProjectRatioFm;
/**
* V2升级新增字段, 详见说明文档
* 2020-01-07
*/
private BigDecimal closedProjectRatioFz;
/**
* V2升级新增字段, 详见说明文档
* 2020-01-07
*/
private BigDecimal closedProjectRatioFm;
/**
* V2升级新增字段, 详见说明文档
* 2020-01-07
*/
private BigDecimal satisfactionRatioFz;
/**
* V2升级新增字段, 详见说明文档
* 2020-01-07
*/
private BigDecimal satisfactionRatioFm;
/**
* V2升级新增字段, 详见说明文档
* 2020-01-07
*/
private BigDecimal overdueProjectRatioFz;
/**
* V2升级新增字段, 详见说明文档
* 2020-01-07
*/
private BigDecimal overdueProjectRatioFm;
/**
* V2升级新增字段, 详见说明文档
* 2020-01-07
*/
private BigDecimal handleProjectRatioFz;
/**
* V2升级新增字段, 详见说明文档
* 2020-01-07
*/
private BigDecimal handleProjectRatioFm;
}

25
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerAreaCodeResultDTO.java

@ -0,0 +1,25 @@
package com.epmet.dto.org.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/1/14 上午11:05
*/
@Data
public class CustomerAreaCodeResultDTO implements Serializable {
private static final long serialVersionUID = -4722604654441455214L;
/**
* 客户ID
*/
private String customerId;
/**
* 行政区域编码
*/
private String areaCode;
}

19
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ClosedIncrResultDTO.java

@ -0,0 +1,19 @@
package com.epmet.dto.pingyin.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/2/1 上午9:22
*/
@Data
public class ClosedIncrResultDTO implements Serializable {
private static final long serialVersionUID = 4907953818631953766L;
private String gridId;
private Integer closedIncr;
}

20
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/EvaluateTotalResultDTO.java

@ -0,0 +1,20 @@
package com.epmet.dto.pingyin.result;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/1/29 上午9:08
*/
@Data
public class EvaluateTotalResultDTO implements Serializable {
private static final long serialVersionUID = -4734985200452228738L;
private String orgId;
private Integer evaluateCount = NumConstant.ZERO;
}

19
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ProjectIncrResultDTO.java

@ -0,0 +1,19 @@
package com.epmet.dto.pingyin.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/1/29 下午2:28
*/
@Data
public class ProjectIncrResultDTO implements Serializable {
private static final long serialVersionUID = -1452144390062903633L;
private String gridId;
private Integer projectIncr;
}

54
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ProjectOrgDailyResultDTO.java

@ -0,0 +1,54 @@
package com.epmet.dto.pingyin.result;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/2/1 下午3:34
*/
@Data
public class ProjectOrgDailyResultDTO implements Serializable {
private static final long serialVersionUID = -6838351691873050562L;
/**
* 行政区域编码
*/
private String areaCode;
/**
* 项目总数
*/
private Integer projectTotal;
/**
* 已解决的项目总数
*/
private Integer resolvedNum;
/**
* 参与满意度评价的总次数
*/
private Integer evaluateTotal;
/**
* 满意+非常满意的总次数
*/
private Integer goodTotal;
/**
* 不满意总次数
*/
private Integer badTotal;
public ProjectOrgDailyResultDTO() {
this.projectTotal = NumConstant.ZERO;
this.resolvedNum = NumConstant.ZERO;
this.evaluateTotal = NumConstant.ZERO;
this.goodTotal = NumConstant.ZERO;
this.badTotal = NumConstant.ZERO;
}
}

46
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ProjectOrgMonthlyResultDTO.java

@ -0,0 +1,46 @@
package com.epmet.dto.pingyin.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/2/2 上午11:01
*/
@Data
public class ProjectOrgMonthlyResultDTO implements Serializable {
private static final long serialVersionUID = 4917301916897636586L;
/**
* 行政区域编码
*/
private String areaCode;
/**
* 本月新增的项目数量转项目日期在当前月份内
*/
private Integer projectIncr;
/**
* 累计项目总数
*/
private Integer projectTotal;
/**
* 累计未结项目总数
*/
private Integer unClosedTotal;
/**
* 累计已结项目
*/
private Integer closedTotal;
/**
* 本月新增结案项目数
*/
private Integer closedIncr;
}

18
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ProjectTotalResultDTO.java

@ -0,0 +1,18 @@
package com.epmet.dto.pingyin.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/1/28 下午3:15
*/
@Data
public class ProjectTotalResultDTO implements Serializable {
private static final long serialVersionUID = 6071988402600005617L;
private String gridId;
private Integer projectTotal;
}

18
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/ResolvedNumResultDTO.java

@ -0,0 +1,18 @@
package com.epmet.dto.pingyin.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/1/28 下午3:15
*/
@Data
public class ResolvedNumResultDTO implements Serializable {
private static final long serialVersionUID = 607198840261205617L;
private String gridId;
private Integer resolvedNum;
}

19
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/pingyin/result/UnClosedTotalResultDTO.java

@ -0,0 +1,19 @@
package com.epmet.dto.pingyin.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/1/29 下午2:59
*/
@Data
public class UnClosedTotalResultDTO implements Serializable {
private static final long serialVersionUID = -722723608888414454L;
private String gridId;
private Integer projectCount;
}

60
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/BidFormDTO.java

@ -0,0 +1,60 @@
package com.epmet.dto.plugins;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 146竞标管理
*
* @author yinzuomei@elink-cn.com
* @date 2021/1/22 10:54
*/
@Data
public class BidFormDTO implements Serializable {
private static final long serialVersionUID = -9132608534627587213L;
/**
* 竞标项目id
*/
private String bidId;
/**
* 竞标项目名称
*/
private String bidName;
/**
* 状态编码
*/
private String statusCode;
/**
* 状态描述eg已中标未中标投标中
*/
private String statusDesc;
/**
* 金额单位万元
*/
private Double amount;
/**
* 发布时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date releaseTime;
/**
* 发布村镇,以英文逗号隔开
*/
private String townIds;
/**
* 发布村镇名称,以英文逗号隔开
*/
private String townNames;
}

56
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ContractFormDTO.java

@ -0,0 +1,56 @@
package com.epmet.dto.plugins;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 146合同监管入参
*
* @author yinzuomei@elink-cn.com
* @date 2021/1/22 10:43
*/
@Data
public class ContractFormDTO implements Serializable {
private static final long serialVersionUID = 971064596156093552L;
/**
* 合同id
*/
private String contractId;
/**
* 合同名称
*/
private String contractName;
/**
* 合同所属类别编码
*/
private String categoryCode;
/**
* 合同所属类别名称
*/
private String categoryName;
/**
* 合同到期日期2020-12-31
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date dueDate;
/**
* 发布村镇,以英文逗号隔开
*/
private String townIds;
/**
* 发布村镇名称,以英文逗号隔开
*/
private String townNames;
}

35
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/OneListFormDTO.java

@ -0,0 +1,35 @@
package com.epmet.dto.plugins;
import lombok.Data;
import java.io.Serializable;
/**
* 146一张清单 入参
*
* @author yinzuomei@elink-cn.com
* @date 2021/1/22 10:12
*/
@Data
public class OneListFormDTO implements Serializable {
private static final long serialVersionUID = 8350552654881582654L;
/**
* 清单id
*/
private String listId;
/**
* 清单编码
*/
private String listCode;
/**
* 名称
*/
private String listName;
/**
* 排序
*/
private Integer sort;
}

126
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenCustomerWorkRecordDictDTO.java

@ -0,0 +1,126 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.plugins;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 工作日志资源字典表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-02-04
*/
@Data
public class ScreenCustomerWorkRecordDictDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键客户每次上传直接根据customerId全删全增
*/
private String id;
/**
* 客户Id
*/
private String customerId;
/**
* 数据更新至日期eg:20200101
*/
private String dateId;
/**
* 资源id
*/
private String dictId;
/**
* 父资源ID如果是一级分类pid=0
*/
private String pid;
/**
* 资源类型
*/
private String resourceType;
/**
* 资源编码
*/
private String resourceCode;
/**
* 资源标签名
*/
private String resourceLabel;
/**
* 显示标识0否1是
*/
private String showFlag;
/**
* 排序
*/
private Integer sort;
/**
* 数据类别 party:支部建设; union:联合建设党员志愿服务voluntaryservice所有的一级分类需要对应到这三个key中
*/
private String dataType;
/**
* 当前资源属于几级例如1234....
*/
private Integer level;
/**
* 逻辑删除标识
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

57
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridDailyFormDTO.java

@ -0,0 +1,57 @@
package com.epmet.dto.plugins;
import lombok.Data;
import java.io.Serializable;
/**
* 工作日志-网格按日统计(累计值)
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/21 18:48
*/
@Data
public class ScreenWorkRecordGridDailyFormDTO implements Serializable {
private static final long serialVersionUID = 5993623581944585517L;
/**
* 网格id
*/
private String gridId;
/**
* 网格所属的组织id
*/
private String agencyId;
/**
* 会议类型编码对应screen_customer_work_record_dict的资源编码
*/
private String meetingCode;
/**
* 随手记类型编码对应screen_customer_work_record_dict的资源编码
*/
private String typeCode;
/**
* 组织次数
*/
private Integer organizeTotal;
/**
* 当前组织参与的总次数
*/
private Integer participateTotal;
/**
* 参与人数
*/
private Integer participateUserTotal;
/**
* 平均参与人数
*/
private Integer avgParticipateUserTotal;
}

122
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordGridMonthlyDTO.java

@ -0,0 +1,122 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.plugins;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 工作日志-网格按月统计
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-02-04
*/
@Data
public class ScreenWorkRecordGridMonthlyDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID 主键
*/
private String id;
/**
* 客户Id
*/
private String customerId;
/**
* 月份IdyyyyMM
*/
private String monthId;
/**
* 网格id
*/
private String gridId;
/**
* 网格所属的组织id
*/
private String agencyId;
/**
* 会议类型编码对应screen_customer_work_record_dict的资源编码
*/
private String meetingCode;
/**
* 随手记类型编码对应screen_customer_work_record_dict的资源编码
*/
private String typeCode;
/**
* 组织次数
*/
private Integer organizeTotal;
/**
* 当前组织参与的总次数
*/
private Integer participateTotal;
/**
* 参与人数
*/
private Integer participateUserTotal;
/**
* 平均参与人数
*/
private Integer avgParticipateUserTotal;
/**
* 删除标识 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

47
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgDailyFormDTO.java

@ -0,0 +1,47 @@
package com.epmet.dto.plugins;
import lombok.Data;
import java.io.Serializable;
/**
* 工作日志-组织按日统计(累计值)
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/21 18:49
*/
@Data
public class ScreenWorkRecordOrgDailyFormDTO implements Serializable {
private static final long serialVersionUID = 819322082786098071L;
/**
* 组织Id
*/
private String orgId;
/**
* 会议类型编码对应screen_customer_work_record_dict的资源编码
*/
private String meetingCode;
/**
* 随手记类型编码对应screen_customer_work_record_dict的资源编码
*/
private String typeCode;
/**
* 组织次数
*/
private Integer organizeTotal;
/**
* 参与人数
*/
private Integer participateUserTotal;
/**
* 平均参与人数
*/
private Integer avgParticipateUserTotal;
}

112
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ScreenWorkRecordOrgMonthlyDTO.java

@ -0,0 +1,112 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.plugins;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 工作日志-组织按月统计
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-02-04
*/
@Data
public class ScreenWorkRecordOrgMonthlyDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID 主键
*/
private String id;
/**
* 客户Id
*/
private String customerId;
/**
* 月份IdyyyyMM
*/
private String monthId;
/**
* 组织Id
*/
private String orgId;
/**
* 会议类型编码对应screen_customer_work_record_dict的资源编码
*/
private String meetingCode;
/**
* 随手记类型编码对应screen_customer_work_record_dict的资源编码
*/
private String typeCode;
/**
* 组织次数
*/
private Integer organizeTotal;
/**
* 参与人数
*/
private Integer participateUserTotal;
/**
* 平均参与人数
*/
private Integer avgParticipateUserTotal;
/**
* 删除标识 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

152
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectGridDailyDTO.java

@ -0,0 +1,152 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.screen;
import com.epmet.commons.tools.constant.NumConstant;
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 2021-01-27
*/
@Data
public class ScreenProjectGridDailyDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 日期yyyyMMdd
*/
private String dateId;
/**
* 网格id
*/
private String gridId;
/**
* 网格所属的组织id
*/
private String pid;
/**
* 网格所有的父级id,以英文:或者英文,隔开
*/
private String pids;
/**
* 截止到当前日期网格内项目总数
*/
private Integer projectTotal;
/**
* 截止到当前日期网格内已解决的项目总数
*/
private Integer resolvedNum;
/**
* 解决率=RESOLVED_NUM/PROJECT_TOTAL存储小数即可保留小数点后4位
*/
private BigDecimal resolvedRatio;
/**
* 对当前网格内项目参与满意度评价的总次数
*/
private Integer evaluateTotal;
/**
* 对当前网格内项目满意+非常满意的总次数
*/
private Integer goodTotal;
/**
* 对当前网格内项目不满意总次数
*/
private Integer badTotal;
/**
* 满意率=good_total/evaluate_total
*/
private BigDecimal goodRatio;
/**
* 不满意率=bad_total/evaluate_total
*/
private BigDecimal badRatio;
/**
* 删除标识
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
public ScreenProjectGridDailyDTO() {
this.projectTotal = NumConstant.ZERO;
this.resolvedNum = NumConstant.ZERO;
this.resolvedRatio = NumConstant.ZERO_DECIMAL;
this.evaluateTotal = NumConstant.ZERO;
this.goodTotal = NumConstant.ZERO;
this.badTotal = NumConstant.ZERO;
this.goodRatio = NumConstant.ZERO_DECIMAL;
this.badRatio = NumConstant.ZERO_DECIMAL;
this.createdBy = "APP_USER";
this.updatedBy = "APP_USER";
this.delFlag = NumConstant.ZERO_STR;
this.revision = NumConstant.ZERO;
}
}

147
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectOrgDailyDTO.java

@ -0,0 +1,147 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.screen;
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 2021-01-27
*/
@Data
public class ScreenProjectOrgDailyDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 日期yyyyMMdd
*/
private String dateId;
/**
* 组织id
*/
private String orgId;
/**
* 社区级community街道:street,区县级: district,市级: city省级:province
*/
private String orgType;
/**
* 当前orgId所属的上级id
*/
private String pid;
/**
* orgId所有的父级id,以英文:或者英文,隔开
*/
private String pids;
/**
* 截止到当前日期网格内项目总数
*/
private Integer projectTotal;
/**
* 截止到当前日期网格内已解决的项目总数
*/
private Integer resolvedNum;
/**
* 解决率=RESOLVED_NUM/PROJECT_TOTAL存储小数即可保留小数点后4位
*/
private BigDecimal resolvedRatio;
/**
* 对当前组织内项目参与满意度评价的总次数
*/
private Integer evaluateTotal;
/**
* 对当前组织内项目满意+非常满意的总次数
*/
private Integer goodTotal;
/**
* 对当前组织内项目不满意总次数
*/
private Integer badTotal;
/**
* 满意率=good_total/evaluate_total
*/
private BigDecimal goodRatio;
/**
* 不满意率=bad_total/evaluate_total
*/
private BigDecimal badRatio;
/**
* 删除标识
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 行政区域编码
*/
private String areaCode;
}

134
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectQuantityGridMonthlyDTO.java

@ -0,0 +1,134 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.screen;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 项目(事件)数量分析按网格_按月统计
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-27
*/
@Data
public class ScreenProjectQuantityGridMonthlyDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 日期yyyyMMdd
*/
private String monthId;
/**
* 网格id
*/
private String gridId;
/**
* 网格所属的组织id
*/
private String pid;
/**
* 网格所有的父级id,以英文:或者英文,隔开
*/
private String pids;
/**
* 当前网格本月新增的项目数量转项目日期在当前月份内
*/
private Integer projectIncr;
/**
* 截止到当前月份累计项目总数
*/
private Integer projectTotal;
/**
* 截止到当前月份累计未结项目总数
*/
private Integer unClosedTotal;
/**
* 截止到当前月份累计已结项目
*/
private Integer closedTotal;
/**
* 本月新增结案项目数
*/
private Integer closedIncr;
/**
* 删除标识
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
public ScreenProjectQuantityGridMonthlyDTO() {
this.projectIncr = NumConstant.ZERO;
this.projectTotal = NumConstant.ZERO;
this.unClosedTotal = NumConstant.ZERO;
this.closedTotal = NumConstant.ZERO;
this.closedIncr = NumConstant.ZERO;
this.delFlag = NumConstant.ZERO_STR;
this.revision = NumConstant.ZERO;
this.createdBy = "APP_USER";
this.updatedBy = "APP_USER";
}
}

141
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectQuantityOrgMonthlyDTO.java

@ -0,0 +1,141 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.screen;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 项目(事件)数量分析按组织_按月统计
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-27
*/
@Data
public class ScreenProjectQuantityOrgMonthlyDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 日期yyyyMMdd
*/
private String monthId;
/**
* 组织id
*/
private String orgId;
/**
* 社区级community街道:street,区县级: district,市级: city省级:province
*/
private String orgType;
/**
* 当前orgId所属的上级id
*/
private String pid;
/**
* orgId所有的父级id,以英文:或者英文,隔开
*/
private String pids;
/**
* 当前组织内本月新增的项目数量转项目日期在当前月份内
*/
private Integer projectIncr;
/**
* 截止到当前月份累计项目总数
*/
private Integer projectTotal;
/**
* 截止到当前月份累计未结项目总数
*/
private Integer unClosedTotal;
/**
* 截止到当前月份累计已结项目
*/
private Integer closedTotal;
/**
* 本月新增结案项目数
*/
private Integer closedIncr;
/**
* 删除标识
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
private String areaCode;
public ScreenProjectQuantityOrgMonthlyDTO() {
this.projectIncr = NumConstant.ZERO;
this.projectTotal = NumConstant.ZERO;
this.unClosedTotal = NumConstant.ZERO;
this.closedTotal = NumConstant.ZERO;
this.closedIncr = NumConstant.ZERO;
this.delFlag = NumConstant.ZERO_STR;
this.revision = NumConstant.ZERO;
this.createdBy = "APP_USER";
this.updatedBy = "APP_USER";
}
}

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/ScreenCollFormDTO.java

@ -45,4 +45,9 @@ public class ScreenCollFormDTO<T> implements Serializable {
public String toString() {
return JSON.toJSONString(this);
}
/**
* 当前客户id
*/
private String customerId;
}

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyFormDTO.java

@ -73,4 +73,9 @@ public class CustomerAgencyFormDTO implements Serializable {
* 是否显示
*/
private String isDisplay;
/**
* 当前组织的上级行政地区编码add0204;举例平阴县对应的是济南市3701
*/
private String parentAreaCode;
}

6
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerDeptFormDTO.java

@ -48,4 +48,10 @@ public class CustomerDeptFormDTO implements Serializable {
* 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增)
*/
private String dataEndTime;
/**
* V2升级必传参数当前网格所属行政地区编码去除末尾0
* 2020-01-07
*/
private String areaCode;
}

6
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java

@ -53,4 +53,10 @@ public class CustomerGridFormDTO implements Serializable {
* 所有上级ID用英文逗号分开(8.26新增)
*/
private String allParentIds;
/**
* V2升级必传参数当前网格所属行政地区编码去除末尾0
* 2020-01-07
*/
private String areaCode;
}

7
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimCustomerDTO.java

@ -17,9 +17,10 @@
package com.epmet.dto.stats;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
@ -73,4 +74,8 @@ public class DimCustomerDTO implements Serializable {
*/
private Date updatedTime;
/**
* 客户所属行政地区编码取值来自客户根组织的area_code01.14 add
*/
private String areaCode;
}

56
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java

@ -36,6 +36,10 @@ import com.epmet.service.evaluationindex.extract.dataToIndex.*;
import com.epmet.service.evaluationindex.extract.todata.FactOriginTopicMainDailyService;
import com.epmet.service.evaluationindex.extract.toscreen.*;
import com.epmet.service.evaluationindex.indexcal.*;
import com.epmet.service.evaluationindex.screen.ScreenProjectGridDailyService;
import com.epmet.service.evaluationindex.screen.ScreenProjectOrgDailyService;
import com.epmet.service.evaluationindex.screen.ScreenProjectQuantityGridMonthlyService;
import com.epmet.service.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyService;
import com.epmet.service.stats.DimAgencyService;
import com.epmet.service.stats.DimCustomerPartymemberService;
import lombok.extern.slf4j.Slf4j;
@ -175,8 +179,8 @@ public class DemoController {
}
@PostMapping("zxc2")
public Result getZxc2(){
indexCalculateCommunityService.calCommunityAll("45687aa479955f9d06204d415238f7cc", "202008");
public Result getZxc2(@RequestBody CalculateCommonFormDTO formDTO){
indexCalculateCommunityService.calCommunityAll(formDTO);
return new Result();
}
@ -484,17 +488,13 @@ public class DemoController {
}
@PostMapping("streetZxc")
public void getStreet(){
String customerId = "b09527201c4409e19d1dbc5e3c3429a1";
String monthId = "202009";
indexCalculateStreetService.calStreetAll(customerId,monthId);
public void getStreet(@RequestBody CalculateCommonFormDTO form){
indexCalculateStreetService.calStreetAll(form);
}
@PostMapping("districtZxc")
public void getDistrict(){
String customerId = "45687aa479955f9d06204d415238f7cc";
String monthId = "202009";
indexCalculateDistrictService.calDistrictAll(customerId,monthId);
public void getDistrict(@RequestBody CalculateCommonFormDTO form){
indexCalculateDistrictService.calDistrictAll(form);
}
@PostMapping("gridZxc")
public void getGrid(){
@ -747,4 +747,40 @@ public class DemoController {
log.info("影响行数="+updateNum);
return new Result();
}
@Autowired
private ScreenProjectGridDailyService screenProjectGridDailyService;
@Autowired
private ScreenProjectQuantityGridMonthlyService screenProjectQuantityGridMonthlyService;
@Autowired
private ScreenProjectOrgDailyService screenProjectOrgDailyService;
@Autowired
private ScreenProjectQuantityOrgMonthlyService screenProjectQuantityOrgMonthlyService;
@PostMapping("screenProjectGridDaily")
public Result screenProjectGridDaily(@RequestParam("customerId")String customerId,@RequestParam("dateId")String dateId){
screenProjectGridDailyService.extractionProjectGridDaily(customerId,dateId);
return new Result();
}
@PostMapping("screenProjectQuantityGrid")
public Result screenProjectQuantityGrid(@RequestParam("customerId")String customerId,@RequestParam("monthId")String monthId){
screenProjectQuantityGridMonthlyService.extractionProjectGridMonthly(customerId,monthId);
return new Result();
}
@PostMapping("screenProjectOrgDaily")
public Result screenProjectOrgDaily(@RequestParam("customerId")String customerId,@RequestParam("dateId")String dateId){
screenProjectOrgDailyService.extractionProjectOrgDaily(customerId, dateId);
return new Result();
}
@PostMapping("screenProjectQuantityOrgMonthly")
public Result screenProjectQuantityOrgMonthly(@RequestParam("customerId")String customerId,@RequestParam("monthId")String monthId){
screenProjectQuantityOrgMonthlyService.extractionProjectOrgMonthly(customerId,monthId);
return new Result();
}
}

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java

@ -84,6 +84,9 @@ public class IndexCalculateController {
CalculateCommonFormDTO form = new CalculateCommonFormDTO();
form.setCustomerId(flag.getForm().getCustomerId());
form.setMonthId(flag.getForm().getMonthId());
//01.14 add
form.setCustomerAreaCode(flag.getForm().getCustomerAreaCode());
form.setSubCustomerIds(flag.getForm().getSubCustomerIds());
indexCalculate(form);
}
});

92
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java

@ -0,0 +1,92 @@
package com.epmet.controller;
import com.epmet.commons.tools.exception.ValidateException;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.screen.*;
import com.epmet.dto.screencoll.ScreenCollFormDTO;
import com.epmet.service.evaluationindex.screen.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @Description 事件/项目采集接口入口
* @ClassName ScreenProjectDataCollController
* @Auth wangc
* @Date 2021-01-27 17:10
*/
@Slf4j
@RestController
@RequestMapping("project")
public class ScreenProjectDataCollController {
@Autowired
private ScreenProjectGridDailyService projectGridDailyService;
@Autowired
private ScreenProjectOrgDailyService projectOrgDailyService;
@Autowired
private ScreenProjectQuantityGridMonthlyService projectQuantityGridMonthlyService;
@Autowired
private ScreenProjectQuantityOrgMonthlyService projectQuantityOrgMonthlyService;
/**
* @author wangc
* @description 事件/项目分析网格内月度数量统计
**/
@RequestMapping("quantity-grid-monthly")
public Result quantityGridMonthly(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<ScreenProjectQuantityGridMonthlyDTO> param) {
if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getMonthId())) {
throw new ValidateException("参数错误:dataList不能为空且monthId不能为空");
}
projectQuantityGridMonthlyService.collect(customerId, param);
return new Result();
}
/**
* @author wangc
* @description 事件/项目分析组织内月度数量统计
**/
@RequestMapping("quantity-org-monthly")
public Result quantityOrgMonthly(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<ScreenProjectQuantityOrgMonthlyDTO> param) {
if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getMonthId())) {
throw new ValidateException("参数错误:dataList不能为空且monthId不能为空");
}
projectQuantityOrgMonthlyService.collect(customerId, param);
return new Result();
}
/**
* @author wangc
* @description 事件/项目分析网格内事件
**/
@RequestMapping("project-grid-daily")
public Result projectGridDaily(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<ScreenProjectGridDailyDTO> param) {
if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getDateId())) {
throw new ValidateException("参数错误:dataList不能为空且dataId不能为空");
}
projectGridDailyService.collect(customerId, param);
return new Result();
}
/**
* @author wangc
* @description 事件/项目分析组织内事件
**/
@RequestMapping("project-org-daily")
public Result projectOrgDaily(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<ScreenProjectOrgDailyDTO> param) {
if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getDateId())) {
throw new ValidateException("参数错误:dataList不能为空且dataId不能为空");
}
projectOrgDailyService.collect(customerId, param);
return new Result();
}
//todo 【事件/项目分析】按类别统计-网格
//todo 【事件/项目分析】按类别统计-组织
//上述两个接口可以有采集接口方便灌假数。后面项目分类统计两个方案A:从项目信息中分析计算到大屏表; B:下面三个子客户(榆山街道、孔村街道、锦水街道)单独上报;子客户根据area_code计算
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save