Browse Source

Merge branch 'dev_ic_data' of http://git.elinkit.com.cn:7070/r/epmet-cloud into dev_ic_data

dev_shibei_match
wangxianzhang 4 years ago
parent
commit
b2bdd88e07
  1. 6
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java
  2. 7
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java
  3. 18
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionDataResultDTO.java
  4. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionResultDTO.java
  5. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  6. 28
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java
  7. 21
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/FactAgencyProjectMonthResultDTO.java
  8. 12
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/FactAgencyProjectResultDTO.java
  9. 93
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/IssueProjectCategoryDictDTO.java
  10. 6
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/result/GridsInfoListResultDTO.java
  11. 45
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ResiEventDTO.java
  12. 45
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/CategoryProjectFormDTO.java
  13. 33
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/ProjectAnalysisFormDTO.java
  14. 32
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/ProjectCategoryTotalFormDTO.java
  15. 8
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/ProjectTotalFormDTO.java
  16. 57
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/CategoryProjectResultDTO.java
  17. 12
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/IssueProjectCategory.java
  18. 63
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/ProjectAnalysisResultDTO.java
  19. 33
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/ProjectCategoryResultDTO.java
  20. 26
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/ProjectCategoryTotalResultDTO.java
  21. 4
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/ProjectMonthIncrResultDTO.java
  22. 10
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/ProjectStatusListResultDTO.java
  23. 19
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/form/UserTopicPageFormDTO.java
  24. 22
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/result/UserTopicResDTO.java
  25. 50
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovProjectController.java
  26. 12
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/ResiGroupController.java
  27. 7
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java
  28. 49
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/IcResiUserDao.java
  29. 6
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/UserBaseInfoDao.java
  30. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/evaluationindex/EvaluationIndexDao.java
  31. 7
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueDao.java
  32. 49
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govproject/ProjectDao.java
  33. 10
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/resigroup/ResiTopicDao.java
  34. 493
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/IcResiUserEntity.java
  35. 7
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/DataStatsService.java
  36. 10
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java
  37. 21
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java
  38. 32
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
  39. 7
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/EvaluationIndexService.java
  40. 11
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java
  41. 7
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/GovIssueService.java
  42. 10
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java
  43. 36
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/GovProjectService.java
  44. 280
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java
  45. 9
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/ResiGroupService.java
  46. 47
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/impl/ResiGroupServiceImpl.java
  47. 14
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml
  48. 39
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/IcResiUserDao.xml
  49. 11
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/UserBaseInfoDao.xml
  50. 14
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml
  51. 16
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml
  52. 3
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerGridDao.xml
  53. 2
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml
  54. 138
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml
  55. 19
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/resigroup/ResiTopicDao.xml
  56. 4
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java
  57. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java
  58. 19
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandOptionFormDTO.java
  59. 34
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandResearchAnalysisFormDTO.java
  60. 11
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java
  61. 52
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/PageListAnalysisFormDTO.java
  62. 16
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ActivityStatisticsDTO.java
  63. 20
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitDistributionResultDTO.java
  64. 52
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecExcelResultDTO.java
  65. 29
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandResearchAnalysisResultDTO.java
  66. 3
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/IcResiUserReportDemandRes.java
  67. 21
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java
  68. 29
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java
  69. 13
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java
  70. 52
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java
  71. 11
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyActivityDao.java
  72. 20
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java
  73. 4
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java
  74. 9
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java
  75. 19
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java
  76. 21
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java
  77. 1
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java
  78. 17
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java
  79. 86
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java
  80. 48
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java
  81. 13
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java
  82. 147
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java
  83. 18
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml
  84. 28
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml
  85. 17
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml
  86. 90
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml
  87. 4
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/IcResiPointPageFormDTO.java
  88. 2
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java
  89. 4
      epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointActionLogDao.xml
  90. 36
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ResiBuzzFormDTO.java
  91. 26
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ResiBuzzLeftPieChartFormDTO.java
  92. 9
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/CategoryListResultDTO.java
  93. 91
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ResiBuzzDTO.java
  94. 44
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ResiBuzzLeftPieChartResultDTO.java
  95. 28
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ResiBuzzResultDTO.java
  96. 18
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
  97. 17
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
  98. 38
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java
  99. 37
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java
  100. 27
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java

6
epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java

@ -1,6 +1,8 @@
package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.dto.form.DictListFormDTO;
import com.epmet.commons.tools.dto.result.DictListResultDTO;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.result.CorsConfigResultDTO;
@ -8,6 +10,7 @@ import com.epmet.feign.fallback.EpmetAdminOpenFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
import java.util.Map;
@ -84,4 +87,7 @@ public interface EpmetAdminOpenFeignClient {
*/
@PostMapping("/sys/dict/data/dictmap/{dictType}")
Result<Map<String, String>> dictMap(@PathVariable("dictType") String dictType);
@PostMapping("/sys/dict/data/dictlist")
Result<List<DictListResultDTO>> dictList(@RequestBody DictListFormDTO formDTO);
}

7
epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java

@ -1,6 +1,8 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.dto.form.DictListFormDTO;
import com.epmet.commons.tools.dto.result.DictListResultDTO;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
@ -46,4 +48,9 @@ public class EpmetAdminOpenFeignClientFallback implements EpmetAdminOpenFeignCli
public Result<Map<String, String>> dictMap(String dictType) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "dictMap", dictType);
}
@Override
public Result<List<DictListResultDTO>> dictList(DictListFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "dictList", formDTO);
}
}

18
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionDataResultDTO.java

@ -0,0 +1,18 @@
package com.epmet.commons.tools.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/12/8 14:50
*/
@Data
public class OptionDataResultDTO implements Serializable {
private static final long serialVersionUID = 416877704759019210L;
private String label;
private String value;
private String code;
}

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionResultDTO.java

@ -18,4 +18,5 @@ public class OptionResultDTO implements Serializable {
private String pValue;
private String sysDictDataId;
private List<OptionResultDTO> children;
private Boolean usableFlag;
}

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java

@ -163,6 +163,7 @@ public enum EpmetErrorCode {
EXISTS_SAME_PHONE_ERROR(8529, "%s存在重复"),
COMMUNITY_SELF_ORGANIZATION_LIST_REPART_ERROR(8530, "%s社区自组织名称已存在"),
MATTER_NAME_EXISTS_APPOINTMENT_ERROR(8532, "存在重复预约事项"),
// 该错误不会提示给前端,只是后端传输错误信息用。
ACCESS_SQL_FILTER_MISSION_ARGS(8701, "缺少生成权限过滤SQL所需参数"),

28
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java

@ -11,6 +11,7 @@ package com.epmet.commons.tools.utils;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.form.TimeListResultDTO;
import com.google.common.collect.Maps;
import org.apache.commons.lang3.StringUtils;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
@ -917,4 +918,31 @@ public class DateUtils {
return new SimpleDateFormat(DateUtils.DATE_PATTERN_YYYYMMDD).format(time);
}
/**
* @Author sun
* @Description 获取dateId对应上一个月过去12个月的monthId
* dateId yyyymmdd
* 20211201 -> 202012-202111的值
**/
public static LinkedHashMap<String,String> getXproSub(String dateId){
java.time.format.DateTimeFormatter fmt = java.time.format.DateTimeFormatter.ofPattern("yyyyMM");
LinkedHashMap<String,String> xAxis = new LinkedHashMap<>();
Calendar cal=Calendar.getInstance();
cal.setTime(DateUtils.parseDate(dateId, DateUtils.DATE_PATTERN_YYYYMMDD));
TimeZone tz = cal.getTimeZone();
ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();
java.time.LocalDate today = java.time.LocalDateTime.ofInstant(cal.toInstant(), zid).toLocalDate();
//java.time.LocalDate today = java.time.LocalDate.now();
for(int i = NumConstant.TWELVE;i > NumConstant.ZERO; i--){
java.time.LocalDate localDate = today.minusMonths(i);
String s = localDate.getMonth().getValue() + "月";
xAxis.put(localDate.format(fmt),s);
}
LinkedHashMap<String, String> result = Maps.newLinkedHashMap();
xAxis.entrySet().stream().sorted(Map.Entry.comparingByKey())
.forEachOrdered((e -> result.put(e.getKey(),e.getValue())));
return result;
}
}

21
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/FactAgencyProjectMonthResultDTO.java

@ -0,0 +1,21 @@
package com.epmet.dataaggre.dto.datastats.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description 项目月数据-接口返参
* @Auth sun
*/
@Data
public class FactAgencyProjectMonthResultDTO implements Serializable {
private static final long serialVersionUID = 466974582608407121L;
//组织Id
private String agencyId;
//月维度Id
private String monthId;
//当月项目总数 【当前组织及下级前一月新增项目数】
private Integer projectIncr = 0;
}

12
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/FactAgencyProjectResultDTO.java

@ -19,17 +19,17 @@ public class FactAgencyProjectResultDTO implements Serializable {
private String agencyId;
//组织名称
private String dateId;
//问题解决总数
//月维度Id
private String monthId;
//党群自治占比
//项目总数
private Integer projectTotal = 0;
//网格自治占比
//处理中项目数
private Integer pendingTotal = 0;
//社区解决占比
//处理中项目占比
private String pendingRatio = "0%";
//区直部门解决占比
//已结案中项目数
private Integer closedTotal = 0;
//街道解决占比
//已结案中项目占比
private String closedRatio = "0%";
}

93
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/IssueProjectCategoryDictDTO.java

@ -0,0 +1,93 @@
/**
* 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.dataaggre.dto.govissue;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 议题项目分类字典
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-08
*/
@Data
public class IssueProjectCategoryDictDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id, 产品默认default
*/
private String customerId;
/**
* 上级分类ID 顶级此列存储0
*/
private String pid;
/**
* 所有上级分类ID用逗号分开
*/
private String pids;
/**
* 上级分类编码
*/
private String parentCategoryCode;
/**
* 分类编码分类编码+customer_id唯一
*/
private String categoryCode;
/**
* 分类名称
*/
private String categoryName;
/**
* 分类类别1,2,3,4....
*/
private String categoryType;
/**
* 排序
*/
private Integer sort;
/**
* 是否禁用(enable:启用 disable:禁用)
*/
private String isDisable;
/**
* 颜色
*/
private String colour;
}

6
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/result/GridsInfoListResultDTO.java

@ -24,8 +24,12 @@ public class GridsInfoListResultDTO implements Serializable {
private String gridId;
/**
* 网格名称
* 组织-网格名称
*/
private String gridName;
/**
* 网格名称
*/
private String name;
}

45
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ResiEventDTO.java

@ -0,0 +1,45 @@
/**
* 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.dataaggre.dto.govproject;
import lombok.Data;
import java.io.Serializable;
/**
* 居民报事表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-03
*/
@Data
public class ResiEventDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
private String projectId;
private String reportUserId;
}

45
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/CategoryProjectFormDTO.java

@ -0,0 +1,45 @@
package com.epmet.dataaggre.dto.govproject.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @Description 赋能平台项目分类分析-接口入参
* @Auth sun
*/
@NoArgsConstructor
@Data
public class CategoryProjectFormDTO implements Serializable {
private static final long serialVersionUID = -8515172319313536407L;
//组织Id
@NotBlank(message = "组织ID不能为空", groups = {Category.class})
private String agencyId;
//日期yyyymmdd
@NotBlank(message = "组织ID不能为空", groups = {Category.class})
private String dateId;
//一级分类Id
@NotBlank(message = "分类Code不能为空", groups = {Category.class})
private String categoryCode;
//页码
@Min(1)
private Integer pageNo = 1;
//每页多少条
private Integer pageSize = 20;
//是否分页(是:true 否:false)
private Boolean isPage = true;
//明天的dateId值
private String toDateId;
private String customerId;
private List<String> categoreCodeList;
public interface Category extends CustomerClientShowGroup {
}
}

33
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/ProjectAnalysisFormDTO.java

@ -0,0 +1,33 @@
package com.epmet.dataaggre.dto.govproject.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
/**
* @Description 赋能平台项目分类分析-接口入参
* @Auth sun
*/
@NoArgsConstructor
@Data
public class ProjectAnalysisFormDTO implements Serializable {
private static final long serialVersionUID = -8515172319313536407L;
//小程序话题或事件发起人Id
@NotBlank(message = "话题或事件发起人Id不能为空", groups = {Analysis.class})
private String userId;
//一级分类Id集合
@NotNull(message = "分类Code集合不能为空", groups = {Analysis.class})
private List<String> categoryCodeList;
private String customerId;
public interface Analysis extends CustomerClientShowGroup {
}
}

32
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/ProjectCategoryTotalFormDTO.java

@ -0,0 +1,32 @@
package com.epmet.dataaggre.dto.govproject.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @Description 赋能平台项目分类分析-接口入参
* @Auth sun
*/
@NoArgsConstructor
@Data
public class ProjectCategoryTotalFormDTO implements Serializable {
private static final long serialVersionUID = -8515172319313536407L;
//组织Id
@NotBlank(message = "组织ID不能为空", groups = {Project.class})
private String agencyId;
//日期yyyymmdd
@NotBlank(message = "日维度ID不能为空", groups = {Project.class})
private String dateId;
private String customerId;
public interface Project extends CustomerClientShowGroup {
}
}

8
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/ProjectTotalFormDTO.java

@ -19,7 +19,7 @@ public class ProjectTotalFormDTO implements Serializable {
@NotBlank(message = "组织ID不能为空", groups = {Total.class, Monthincr.class, Statuslist.class})
private String agencyId;
//日期yyyymmdd
@NotBlank(message = "组织ID不能为空", groups = {Total.class, Monthincr.class, Statuslist.class})
@NotBlank(message = "日维度ID不能为空", groups = {Total.class, Monthincr.class, Statuslist.class})
private String dateId;
//状态:待处理 pending,结案closed
@NotBlank(message = "项目状态不能为空", groups = {Statuslist.class})
@ -36,5 +36,11 @@ public class ProjectTotalFormDTO implements Serializable {
private String yeDateId;
//较dateId上月的monthId值
private String monthId;
//查询数据起始月份Id
private String startMonth;
//查询数据结束月份Id
private String endMonth;
//明天的dateId值
private String toDateId;
}

57
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/CategoryProjectResultDTO.java

@ -0,0 +1,57 @@
package com.epmet.dataaggre.dto.govproject.result;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* @Description 赋能平台项目处理分析分类下项目列表-接口返参
* @Auth sun
*/
@Data
public class CategoryProjectResultDTO implements Serializable {
private static final long serialVersionUID = 6188316867855643263L;
//总条数
private Integer total = 0;
private List<Project> list;
@Data
public static class Project {
//项目所属组织Id
private String agencyId;
//项目Id
private String projectId;
//项目编码[目前没这个功能 默认为空]
private String projectCode = "";
//一级分类Code集合
private List<String> categoryCodes = new ArrayList<>();
//一级分类名称集合
private List<String> categoryNames = new ArrayList<>();
//来源:议题issue 项目立项:agency 事件:resi_event【控制电机查看时里边三个按钮的显示】
private String origin;
//网格Id[上报给组织的事件、直接立项的项目此值为空]
private String gridId = "";
//网格名[上报给组织的事件、直接立项的项目此值为空]
private String gridName = "";
//状态:待处理 pending,已结案closed
private String status;
//标题
private String title;
//转项目时间
private String time;
//小程序居民端话题或事件创建人【立项项目此值为空】
private String userId = "";
//分类对应的所有上级,英文逗号隔开【目前分类只有两级,所以这个字段值其实就是一类的id值】
@JsonIgnore
private String categoryPids;
//二级分类code
@JsonIgnore
private String categoryCode;
}
}

12
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/IssueProjectCategory.java

@ -0,0 +1,12 @@
package com.epmet.dataaggre.dto.govproject.result;
import lombok.Data;
import java.io.Serializable;
@Data
public class IssueProjectCategory implements Serializable {
private static final long serialVersionUID = -2226298165882293959L;
private String issueId;
private String projectId;
}

63
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/ProjectAnalysisResultDTO.java

@ -0,0 +1,63 @@
package com.epmet.dataaggre.dto.govproject.result;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* @Description 赋能平台项目处理分析研判分析-接口返参
* @Auth sun
*/
@Data
public class ProjectAnalysisResultDTO implements Serializable {
private static final long serialVersionUID = 6188316867855643263L;
//小程序居民Id
private String userId;
//负能平台居民Id
private String icUserId;
//负能平台居民名称
private String icUserName;
//家庭里人员集合
private List<Home> homeUserList = new ArrayList<>();
//楼院小组下分类项目列表
private List<Category> groupProjectList = new ArrayList<>();
//事件上报下分类项目列表
private List<Category> eventProjectList = new ArrayList<>();
@Data
public static class Home {
//家庭Id
private String homeId;
//居民Id
private String icUserId;
//居民姓名
private String icUserName;
}
@Data
public static class Category {
//一级分类Id
private String categoryCode;
//一级分类名称
private String categoryName;
//分类下项目列表【创建时间倒序】
private List<Project> projectList = new ArrayList<>();
}
@Data
public static class Project {
//项目Id
private String projectId;
//项目标题
private String title;
//状态:待处理 pending,结案closed
private String status;
}
}

33
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/ProjectCategoryResultDTO.java

@ -0,0 +1,33 @@
package com.epmet.dataaggre.dto.govproject.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author sun
* @dscription
*/
@NoArgsConstructor
@Data
public class ProjectCategoryResultDTO implements Serializable {
private static final long serialVersionUID = 3217246702883400582L;
/**
* 项目ID
*/
private String projectId;
/**
* 项目标题
*/
private String title;
/**
* 项目状态
*/
private String status;
/**
* 二级分类Code
*/
private String categoryCode;
}

26
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/ProjectCategoryTotalResultDTO.java

@ -0,0 +1,26 @@
package com.epmet.dataaggre.dto.govproject.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description 赋能平台项目分类分析各分类项目数图表-接口返参
* @Auth sun
*/
@Data
public class ProjectCategoryTotalResultDTO implements Serializable {
private static final long serialVersionUID = 6188316867855643263L;
//组织Id
private String agencyId;
//一级分类Code
private String categoryCode;
//一级分类名称
private String categoryName;
//一级分类颜色
private String colour = "";
//分类下项目总数
private Integer total = 0;
}

4
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/ProjectMonthIncrResultDTO.java

@ -13,8 +13,8 @@ public class ProjectMonthIncrResultDTO implements Serializable {
private static final long serialVersionUID = 6188316867855643263L;
//横坐标值
private String value;
private Integer value = 0;
//横坐标
private Integer type;
private String type;
}

10
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/ProjectStatusListResultDTO.java

@ -17,12 +17,14 @@ public class ProjectStatusListResultDTO implements Serializable {
//项目Id
private String projectId;
//来源:议题issue 项目立项:agency 事件:resi_event
private Integer origin;
private String origin;
//状态:待处理 pending,结案closed
private Integer status;
private String status;
//经度
private Integer longitude;
private String longitude;
//纬度
private Integer dimension;
private String dimension;
//项目标题
private String title;
}

19
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/form/UserTopicPageFormDTO.java

@ -0,0 +1,19 @@
package com.epmet.dataaggre.dto.resigroup.form;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
@Data
public class UserTopicPageFormDTO implements Serializable {
public interface AddUserInternalGroup {
}
//@NotBlank(message = "epmetUserId不能为空" , groups = AddUserInternalGroup.class)
private List<String> epmetUserIdList;
@NotNull(message = "pageNo不能为空",groups = AddUserInternalGroup.class)
private Integer pageNo;
@NotNull(message = "pageSize不能为空",groups = AddUserInternalGroup.class)
private Integer pageSize;
}

22
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/result/UserTopicResDTO.java

@ -0,0 +1,22 @@
package com.epmet.dataaggre.dto.resigroup.result;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 个人分析发布话题分页列表
*/
@Data
public class UserTopicResDTO implements Serializable {
private String topicId;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date releaseTime;
private String topicContent;
private Boolean shiftIssue;
private String issueId;
private Boolean shiftProject=false;
private String projectId="";
}

50
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovProjectController.java

@ -6,17 +6,13 @@ import com.epmet.commons.tools.enums.RequirePermissionEnum;
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.dataaggre.dto.govproject.form.AllProjectFormDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectDistributionFormDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectTotalFormDTO;
import com.epmet.dataaggre.dto.govproject.result.AllProjectResultDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectDistributionResultDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectMonthIncrResultDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectTotalResultDTO;
import com.epmet.dataaggre.dto.govproject.form.*;
import com.epmet.dataaggre.dto.govproject.result.*;
import com.epmet.dataaggre.service.govproject.GovProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.LinkedList;
import java.util.List;
/**
@ -75,9 +71,9 @@ public class GovProjectController {
* @author sun
*/
@PostMapping("projectmonthincr")
public Result<List<ProjectMonthIncrResultDTO>> projectMonthIncr(@RequestBody ProjectTotalFormDTO formDTO) {
public Result<LinkedList<ProjectMonthIncrResultDTO>> projectMonthIncr(@RequestBody ProjectTotalFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, ProjectTotalFormDTO.Monthincr.class);
return new Result<List<ProjectMonthIncrResultDTO>>().ok(govProjectService.projectMonthIncr(formDTO));
return new Result<LinkedList<ProjectMonthIncrResultDTO>>().ok(govProjectService.projectMonthIncr(formDTO));
}
/**
@ -85,9 +81,41 @@ public class GovProjectController {
* @author sun
*/
@PostMapping("projectstatuslist")
public Result<List<ProjectTotalResultDTO>> projectStatusList(@RequestBody ProjectTotalFormDTO formDTO) {
public Result<List<ProjectStatusListResultDTO>> projectStatusList(@RequestBody ProjectTotalFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, ProjectTotalFormDTO.Statuslist.class);
return new Result<List<ProjectTotalResultDTO>>().ok(govProjectService.projectStatusList(formDTO));
return new Result<List<ProjectStatusListResultDTO>>().ok(govProjectService.projectStatusList(formDTO));
}
/**
* @Description 赋能平台项目分类分析各分类项目数图表
* @author sun
*/
@PostMapping("projectcategorylist")
public Result<List<ProjectCategoryTotalResultDTO>> projectCategoryList(@LoginUser TokenDto tokenDto, @RequestBody ProjectCategoryTotalFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, ProjectCategoryTotalFormDTO.Project.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
return new Result<List<ProjectCategoryTotalResultDTO>>().ok(govProjectService.projectCategoryList(formDTO));
}
/**
* @Description 赋能平台项目处理分析分类下项目列表
* @author sun
*/
@PostMapping("categoryprojectlist")
public Result<CategoryProjectResultDTO> categoryProjectList(@LoginUser TokenDto tokenDto, @RequestBody CategoryProjectFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, CategoryProjectFormDTO.Category.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
return new Result<CategoryProjectResultDTO>().ok(govProjectService.categoryProjectList(formDTO));
}
/**
* @Description 赋能平台项目处理分析研判分析
* @author sun
*/
@PostMapping("projectanalysis")
public Result<ProjectAnalysisResultDTO> projectAnalysis(@RequestBody ProjectAnalysisFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, ProjectAnalysisFormDTO.Analysis.class);
return new Result<ProjectAnalysisResultDTO>().ok(govProjectService.projectAnalysis(formDTO));
}
}

12
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/ResiGroupController.java

@ -1,12 +1,15 @@
package com.epmet.dataaggre.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.page.PageData;
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.dataaggre.dto.resigroup.form.CandidateListFormDTO;
import com.epmet.dataaggre.dto.resigroup.result.CandidateListResultDTO;
import com.epmet.dataaggre.dto.resigroup.result.UserTopicResDTO;
import com.epmet.dataaggre.service.resigroup.ResiGroupService;
import com.epmet.dto.form.PageUserReportEventFormDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -39,4 +42,13 @@ public class ResiGroupController {
return new Result<List<CandidateListResultDTO>>().ok(resiGroupService.candidateList(formDTO));
}
/**
* 数字赋能平台-个人分析发布话题分页列表
* @return
*/
@PostMapping("pageusertopic")
public Result<PageData<UserTopicResDTO>> pageUserTopic(@RequestBody PageUserReportEventFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, PageUserReportEventFormDTO.AddUserInternalGroup.class);
return new Result<PageData<UserTopicResDTO>>().ok(resiGroupService.pageUserTopic(formDTO));
}
}

7
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java

@ -25,6 +25,7 @@ import com.epmet.dataaggre.dto.datastats.result.*;
import com.epmet.dataaggre.dto.epmetuser.form.GridMemberPatrolListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.GridMemberPatrolListResultDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectTotalFormDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectMonthIncrResultDTO;
import com.epmet.dataaggre.dto.resigroup.ActCategoryDictDTO;
import com.epmet.dataaggre.dto.resigroup.result.GroupActRankDetailDTO;
import com.epmet.dataaggre.entity.datastats.DimAgencyEntity;
@ -342,4 +343,10 @@ public interface DataStatsDao {
* @author sun
*/
List<FactAgencyProjectResultDTO> getProjectTotal(ProjectTotalFormDTO formDTO);
/**
* @Description 查询dateId的上一月过去12个月份组织项目数据
* @author sun
*/
List<FactAgencyProjectMonthResultDTO> getProjectMonthIncr(ProjectTotalFormDTO formDTO);
}

49
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/IcResiUserDao.java

@ -0,0 +1,49 @@
/**
* 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.dataaggre.dao.epmetuser;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dataaggre.dto.govproject.result.ProjectAnalysisResultDTO;
import com.epmet.dataaggre.entity.epmetuser.IcResiUserEntity;
import com.epmet.dto.IcResiUserDTO;
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-10-26
*/
@Mapper
public interface IcResiUserDao extends BaseDao<IcResiUserEntity> {
/**
* @Description 根据身份证号查询负能平台用户信息
* @author sun
*/
IcResiUserDTO getIcResiUser(@Param("idCard") String idCard, @Param("customerId") String customerId);
/**
* @Description 查询人员的家庭成员数据
* @author sun
*/
List<ProjectAnalysisResultDTO.Home> getHomeUserList(@Param("homeId") String homeId, @Param("icUserId") String icUserId);
}

6
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/UserBaseInfoDao.java

@ -20,6 +20,7 @@ package com.epmet.dataaggre.dao.epmetuser;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dataaggre.dto.epmetuser.result.UserInfosResultDTO;
import com.epmet.dataaggre.entity.epmetuser.UserBaseInfoEntity;
import com.epmet.dto.UserBaseInfoDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -50,4 +51,9 @@ public interface UserBaseInfoDao extends BaseDao<UserBaseInfoEntity> {
*/
List<String> selectUserIdByCustomerId(@Param("userIds") List<String> userIds);
/**
* @Description 查询userId的身份证号在小程序用户中存在的多个userId值
* @author sun
*/
List<UserBaseInfoDTO> getUserBaseList(@Param("userId") String userId);
}

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/evaluationindex/EvaluationIndexDao.java

@ -21,6 +21,8 @@ import com.epmet.dataaggre.dto.datastats.result.GovrnRatioResultDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectCategoryTotalFormDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectCategoryTotalResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -103,4 +105,10 @@ public interface EvaluationIndexDao {
*/
String selectAgencyNameByAgencyId(@Param("agencyId")String agencyId);
/**
* @Description 按dateId查询组织下一级分类项目总数统计
* @author sun
*/
List<ProjectCategoryTotalResultDTO> projectCategoryList(ProjectCategoryTotalFormDTO formDTO);
}

7
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueDao.java

@ -18,6 +18,7 @@
package com.epmet.dataaggre.dao.govissue;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dataaggre.dto.govissue.IssueProjectCategoryDictDTO;
import com.epmet.dataaggre.dto.govissue.form.ClosedIssueListFormDTO;
import com.epmet.dataaggre.dto.govissue.form.ShiftProjectIssueListFormDTO;
import com.epmet.dataaggre.dto.govissue.form.VotingIssueListFormDTO;
@ -74,4 +75,10 @@ public interface IssueDao extends BaseDao<IssueEntity> {
Integer selectIssueCount(@Param("gridIds") List<String> gridIds,@Param("issueType")String issueType);
List<IssueInfoDTO> selectShiftProjectIssueList(@Param("customerId") String customerId, @Param("gridId") String gridId);
/**
* @Description 查询客户下分类信息
* @author sun
**/
List<IssueProjectCategoryDictDTO> getCategoryList(@Param("customerId") String customerId, @Param("level") String level, @Param("isDisable") String isDisable);
}

49
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govproject/ProjectDao.java

@ -20,10 +20,14 @@ package com.epmet.dataaggre.dao.govproject;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dataaggre.dto.govissue.result.IssueListResultDTO;
import com.epmet.dataaggre.dto.govproject.ProjectDTO;
import com.epmet.dataaggre.dto.govproject.ProjectRelatedPersonnelDTO;
import com.epmet.dataaggre.dto.govproject.ResiEventDTO;
import com.epmet.dataaggre.dto.govproject.form.AllProjectFormDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectDistributionResultDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectInfoDTO;
import com.epmet.dataaggre.dto.govproject.form.CategoryProjectFormDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectTotalFormDTO;
import com.epmet.dataaggre.dto.govproject.result.*;
import com.epmet.dataaggre.entity.govproject.ProjectEntity;
import com.epmet.dto.ProjectCategoryDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -70,4 +74,45 @@ public interface ProjectDao extends BaseDao<ProjectEntity> {
List<ProjectDistributionResultDTO> selectList(@Param("customerId") String customerId,@Param("list")List<String> issueIds);
int countRedDot(String userId);
/**
* @Description 查询组织下截止到dateId的某个状态的项目列表
* @author sun
*/
List<ProjectStatusListResultDTO> getProjectStatusList(ProjectTotalFormDTO formDTO);
List<IssueProjectCategory> selectProjectIssueCategory(@Param("issueIds") List<String> issueIds);
/**
* @Description 查询组织截止某一天的某个分类下的项目列表
* @author sun
*/
List<CategoryProjectResultDTO.Project> categoryProjectList(CategoryProjectFormDTO formDTO);
/**
* @Description 查询项目对应的所有分类信息
* @author sun
*/
List<CategoryProjectResultDTO.Project> getCategoryList(@Param("projectIds") List<String> projectIds);
/**
* @Description 查询来源事件的项目居民端创建人信息
* @author sun
*/
List<ResiEventDTO> getEventList(@Param("projectIds") List<String> projectIds);
/**
* @Description 查询来源话题的项目居民端创建人信息
* @author sun
*/
List<ProjectRelatedPersonnelDTO> getTopicUser(@Param("projectIds") List<String> projectIds);
/**
* @Description 根据项目来源查询不同分类不同创建人下的分类项目
* @author sun
*/
List<ProjectCategoryResultDTO> getProjectCategoryList(@Param("customerId") String customerId,
@Param("secondCodeList") List<String> secondCodeList,
@Param("userIds") List<String> userIds,
@Param("origin") String origin);
}

10
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/resigroup/ResiTopicDao.java

@ -19,7 +19,9 @@ package com.epmet.dataaggre.dao.resigroup;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dataaggre.dto.resigroup.ResiTopicDTO;
import com.epmet.dataaggre.dto.resigroup.result.UserTopicResDTO;
import com.epmet.dataaggre.entity.resigroup.ResiTopicEntity;
import com.epmet.dto.form.PageUserReportEventFormDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -35,4 +37,12 @@ import java.util.List;
public interface ResiTopicDao extends BaseDao<ResiTopicEntity> {
List<ResiTopicDTO> selectTopicInfoByIds(@Param("list") List<String> topicIds);
/**
* 数据分析-个人档案-发布话题列表
*
* @param formDTO
* @return
*/
List<UserTopicResDTO> selectListTopic(PageUserReportEventFormDTO formDTO);
}

493
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/IcResiUserEntity.java

@ -0,0 +1,493 @@
/**
* 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.dataaggre.entity.epmetuser;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 用户基础信息
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-10-26
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_resi_user")
public class IcResiUserEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户Id customer.id
*/
private String customerId;
/**
*
*/
private String agencyId;
/**
*
*/
private String pids;
/**
* 网格ID
*/
private String gridId;
/**
* 所属小区ID
*/
private String villageId;
/**
* 所属楼宇Id
*/
private String buildId;
/**
* 单元id
*/
private String unitId;
/**
* 所属家庭Id
*/
private String homeId;
/**
* 是否本地户籍
*/
private String isBdhj;
/**
* 姓名
*/
private String name;
/**
* 手机号
*/
private String mobile;
/**
* 性别
*/
private String gender;
/**
* 身份证号
*/
private String idCard;
/**
* 出生日期
*/
private String birthday;
/**
* 备注
*/
private String remarks;
/**
* 联系人
*/
private String contacts;
/**
* 联系人电话
*/
private String contactsMobile;
/**
* 九小场所url
*/
private String ninePlace;
/**
* 是否党员
*/
private String isParty;
/**
* 是否低保户
*/
private String isDbh;
/**
* 是否保障房
*/
private String isEnsureHouse;
/**
* 是否失业
*/
private String isUnemployed;
/**
* 是否育龄妇女
*/
private String isYlfn;
/**
* 是否退役军人
*/
private String isVeterans;
/**
* 是否统战人员
*/
private String isUnitedFront;
/**
* 是否信访人员
*/
private String isXfry;
/**
* 是否志愿者
*/
private String isVolunteer;
/**
* 是否老年人
*/
private String isOldPeople;
/**
* 是否空巢
*/
private String isKc;
/**
* 是否失独
*/
private String isSd;
/**
* 是否失能
*/
private String isSn;
/**
* 是否失智
*/
private String isSz;
/**
* 是否残疾
*/
private String isCj;
/**
* 是否大病
*/
private String isDb;
/**
* 是否慢病
*/
private String isMb;
/**
* 是否特殊人群
*/
private String isSpecial;
/**
* 文化程度字典表
*/
private String culture;
/**
* 文化程度备注
*/
private String cultureRemakes;
/**
* 特长字典表
*/
private String specialSkill;
/**
* 兴趣爱好
*/
private String hobby;
/**
* 兴趣爱好备注
*/
private String hobbyRemakes;
/**
* 宗教信仰
*/
private String faith;
/**
* 宗教信仰备注
*/
private String faithRemakes;
/**
* 残疾类别字典表
*/
private String cjlb;
/**
* 残疾登记(状况)字典表
*/
private String cjzk;
/**
* 残疾证号
*/
private String cjzh;
/**
* 残疾说明
*/
private String cjsm;
/**
* 有无监护人yes no
*/
private String ynJdr;
/**
* 有无技能特长yes no
*/
private String ynJntc;
/**
* 有无劳动能力
*/
private String ynLdnl;
/**
* 有无非义务教育阶段助学yes no
*/
private String ynFywjyjdzx;
/**
* 所患大病
*/
private String shdb;
/**
* 患大病时间
*/
private String dbsj;
/**
* 所患慢性病
*/
private String shmxb;
/**
* 患慢性病时间
*/
private String mxbsj;
/**
* 是否参保
*/
private String isCb;
/**
* 自付金额
*/
private String zfje;
/**
* 救助金额
*/
private String jzje;
/**
* 救助时间[yyyy-MM-dd]
*/
private String jzsj;
/**
* 享受救助明细序号
*/
private String jzmxxh;
/**
* 健康信息备注
*/
private String healthRemakes;
/**
* 工作单位
*/
private String gzdw;
/**
* 职业
*/
private String zy;
/**
* 离退休时间
*/
private String ltxsj;
/**
* 工作信息备注
*/
private String workRemake;
/**
* 退休金额
*/
private String txje;
/**
* 月收入
*/
private String ysr;
/**
* 籍贯
*/
private String jg;
/**
* 户籍所在地
*/
private String hjszd;
/**
* 现居住地
*/
private String xjzd;
/**
* 人户情况
*/
private String rhzk;
/**
* 居住信息备注
*/
private String jzxxRemakes;
/**
* 民族字典表
*/
private String mz;
/**
* 与户主关系字典表
*/
private String yhzgx;
/**
* 居住情况字典表
*/
private String jzqk;
/**
* 婚姻状况字典表
*/
private String hyzk;
/**
* 配偶情况字典表
*/
private String poqk;
/**
* 有无赡养人
*/
private String ynSyr;
/**
* 与赡养人关系字典表
*/
private String ysyrgx;
/**
* 赡养人电话
*/
private String syrMobile;
/**
* 家庭信息备注
*/
private String jtxxRemakes;
/**
* 预留字段1
*/
private String field1;
/**
* 预留字段2
*/
private String field2;
/**
* 预留字段3
*/
private String field3;
/**
* 预留字段4
*/
private String field4;
/**
* 预留字段5
*/
private String field5;
/**
* 预留字段6
*/
private String field6;
/**
* 预留字段7
*/
private String field7;
/**
* 预留字段8
*/
private String field8;
/**
* 预留字段9
*/
private String field9;
/**
* 预留字段10
*/
private String field10;
}

7
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/DataStatsService.java

@ -7,6 +7,7 @@ import com.epmet.dataaggre.dto.epmetuser.form.GridMemberPatrolListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.GridMemberPatrolListResultDTO;
import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectTotalFormDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectMonthIncrResultDTO;
import com.epmet.dataaggre.dto.resigroup.ActCategoryDictDTO;
import com.epmet.dataaggre.dto.resigroup.result.GroupActRankDetailDTO;
@ -253,4 +254,10 @@ public interface DataStatsService {
* @author sun
*/
List<FactAgencyProjectResultDTO> getProjectTotal(ProjectTotalFormDTO formDTO);
/**
* @Description 查询dateId的上一月过去12个月份组织项目数据
* @author sun
*/
List<FactAgencyProjectMonthResultDTO> getProjectMonthIncr(ProjectTotalFormDTO formDTO);
}

10
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java

@ -24,6 +24,7 @@ import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO;
import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectTotalFormDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectMonthIncrResultDTO;
import com.epmet.dataaggre.dto.resigroup.ActCategoryDictDTO;
import com.epmet.dataaggre.dto.resigroup.result.GroupActRankDetailDTO;
import com.epmet.dataaggre.entity.datastats.DimAgencyEntity;
@ -2124,5 +2125,14 @@ public class DataStatsServiceImpl implements DataStatsService {
return dataStatsDao.getProjectTotal(formDTO);
}
/**
* @Description 查询dateId的上一月过去12个月份组织项目数据
* @author sun
*/
@Override
public List<FactAgencyProjectMonthResultDTO> getProjectMonthIncr(ProjectTotalFormDTO formDTO) {
return dataStatsDao.getProjectMonthIncr(formDTO);
}
}

21
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java

@ -7,6 +7,9 @@ import com.epmet.dataaggre.dto.epmetuser.result.*;
import com.epmet.dataaggre.dto.govorg.form.OrgStaffListFormDTO;
import com.epmet.dataaggre.dto.govorg.form.StaffDetailV2FormDTO;
import com.epmet.dataaggre.dto.govorg.result.GridStaffResultDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectAnalysisResultDTO;
import com.epmet.dto.IcResiUserDTO;
import com.epmet.dto.UserBaseInfoDTO;
import java.util.List;
@ -148,4 +151,22 @@ public interface EpmetUserService {
* @author sun
*/
StaffDetailV2FormDTO selectByStaffId(String staffId);
/**
* @Description 查询userId的身份证号在小程序用户中存在的多个userId值
* @author sun
*/
List<UserBaseInfoDTO> getUserBaseList(String userId);
/**
* @Description 根据身份证号查询负能平台用户信息
* @author sun
*/
IcResiUserDTO getIcResiUser(String idNum, String customerId);
/**
* @Description 查询人员的家庭成员数据
* @author sun
*/
List<ProjectAnalysisResultDTO.Home> getHomeUserList(String homeId, String icUserId);
}

32
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java

@ -26,6 +26,7 @@ import com.epmet.dataaggre.dto.govorg.form.StaffDetailV2FormDTO;
import com.epmet.dataaggre.dto.govorg.result.GridStaffResultDTO;
import com.epmet.dataaggre.dto.govorg.result.StaffOrgNameResultDTO;
import com.epmet.dataaggre.dto.govorg.result.StaffOrgRelationResultDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectAnalysisResultDTO;
import com.epmet.dataaggre.entity.epmetuser.CustomerStaffEntity;
import com.epmet.dataaggre.entity.epmetuser.GovStaffRoleEntity;
import com.epmet.dataaggre.entity.epmetuser.ResiUserBadgeEntity;
@ -36,6 +37,8 @@ import com.epmet.dataaggre.service.epmetuser.StaffPatrolDetailService;
import com.epmet.dataaggre.service.epmetuser.StaffPatrolRecordService;
import com.epmet.dataaggre.service.govorg.GovOrgService;
import com.epmet.dataaggre.service.govproject.GovProjectService;
import com.epmet.dto.IcResiUserDTO;
import com.epmet.dto.UserBaseInfoDTO;
import com.epmet.dto.result.StaffRoleResultDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
@ -79,6 +82,8 @@ public class EpmetUserServiceImpl implements EpmetUserService {
private DataStatsService dataStatsService;
@Resource
private GovStaffRoleDao govStaffRoleDao;
@Resource
private IcResiUserDao icResiUserDao;
/**
* @Description 根据UserIds查询
@ -702,5 +707,32 @@ public class EpmetUserServiceImpl implements EpmetUserService {
return result;
}
/**
* @Description 查询userId的身份证号在小程序用户中存在的多个userId值
* @author sun
*/
@Override
public List<UserBaseInfoDTO> getUserBaseList(String userId) {
return userBaseInfoDao.getUserBaseList(userId);
}
/**
* @Description 根据身份证号查询负能平台用户信息
* @author sun
*/
@Override
public IcResiUserDTO getIcResiUser(String idNum, String customerId) {
return icResiUserDao.getIcResiUser(idNum, customerId);
}
/**
* @Description 查询人员的家庭成员数据
* @author sun
*/
@Override
public List<ProjectAnalysisResultDTO.Home> getHomeUserList(String homeId, String icUserId) {
return icResiUserDao.getHomeUserList(homeId, icUserId);
}
}

7
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/EvaluationIndexService.java

@ -6,6 +6,8 @@ import com.epmet.dataaggre.dto.evaluationindex.ScreenAgencyOrGridListDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectCategoryTotalFormDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectCategoryTotalResultDTO;
import java.util.List;
@ -86,4 +88,9 @@ public interface EvaluationIndexService {
*/
ScreenAgencyOrGridListDTO getSubAgencyOrGridList(String agencyId);
/**
* @Description 按dateId查询组织下一级分类项目总数统计
* @author sun
*/
List<ProjectCategoryTotalResultDTO> projectCategoryList(ProjectCategoryTotalFormDTO formDTO);
}

11
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java

@ -11,6 +11,8 @@ import com.epmet.dataaggre.dto.evaluationindex.ScreenAgencyOrGridListDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectCategoryTotalFormDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectCategoryTotalResultDTO;
import com.epmet.dataaggre.service.evaluationindex.EvaluationIndexService;
import com.epmet.dataaggre.service.opercrm.CustomerRelation;
import lombok.extern.slf4j.Slf4j;
@ -206,4 +208,13 @@ public class EvaluationIndexServiceImpl implements EvaluationIndexService {
return resultDTO;
}
/**
* @Description 按dateId查询组织下一级分类项目总数统计
* @author sun
*/
@Override
public List<ProjectCategoryTotalResultDTO> projectCategoryList(ProjectCategoryTotalFormDTO formDTO) {
return evaluationIndexDao.projectCategoryList(formDTO);
}
}

7
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/GovIssueService.java

@ -1,6 +1,7 @@
package com.epmet.dataaggre.service.govissue;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dataaggre.dto.govissue.IssueProjectCategoryDictDTO;
import com.epmet.dataaggre.dto.govissue.form.AllIssueFormDTO;
import com.epmet.dataaggre.dto.govissue.form.ClosedIssueListFormDTO;
import com.epmet.dataaggre.dto.govissue.form.ShiftProjectIssueListFormDTO;
@ -45,4 +46,10 @@ public interface GovIssueService {
List<ClosedIssueListResultDTO> closedIssueList(ClosedIssueListFormDTO fromDTO);
List<IssueInfoDTO> selectShiftProjectIssueList(String customerId,String gridId,Integer pageNo,Integer pageSize);
/**
* @Description 查询客户下分类信息
* @author sun
**/
List<IssueProjectCategoryDictDTO> categoryList(String customerId, String level, String isDisable);
}

10
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java

@ -8,6 +8,7 @@ import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.constant.IssueConstant;
import com.epmet.dataaggre.dao.govissue.IssueApplicationDao;
import com.epmet.dataaggre.dao.govissue.IssueDao;
import com.epmet.dataaggre.dto.govissue.IssueProjectCategoryDictDTO;
import com.epmet.dataaggre.dto.govissue.form.AllIssueFormDTO;
import com.epmet.dataaggre.dto.govissue.form.ClosedIssueListFormDTO;
import com.epmet.dataaggre.dto.govissue.form.ShiftProjectIssueListFormDTO;
@ -323,4 +324,13 @@ public class GovIssueServiceImpl implements GovIssueService {
return issueDao.selectShiftProjectIssueList(customerId, gridId);
}
/**
* @Description 查询客户下一级分类信息
* @author sun
**/
@Override
public List<IssueProjectCategoryDictDTO> categoryList(String customerId, String level, String isDisable) {
return issueDao.getCategoryList(customerId, level, isDisable);
}
}

36
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/GovProjectService.java

@ -1,12 +1,12 @@
package com.epmet.dataaggre.service.govproject;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dataaggre.dto.govproject.result.IssueProjectCategory;
import com.epmet.dataaggre.dto.govissue.result.IssueListResultDTO;
import com.epmet.dataaggre.dto.govproject.form.AllProjectFormDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectDistributionFormDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectTotalFormDTO;
import com.epmet.dataaggre.dto.govproject.form.*;
import com.epmet.dataaggre.dto.govproject.result.*;
import java.util.LinkedList;
import java.util.List;
/**
@ -61,11 +61,37 @@ public interface GovProjectService {
* @Description 赋能平台项目处理分析进12月新增项目折线图
* @author sun
*/
List<ProjectMonthIncrResultDTO> projectMonthIncr(ProjectTotalFormDTO formDTO);
LinkedList<ProjectMonthIncrResultDTO> projectMonthIncr(ProjectTotalFormDTO formDTO);
/**
* @Description 赋能平台项目处理分析按状态查询项目列表
* @author sun
*/
List<ProjectTotalResultDTO> projectStatusList(ProjectTotalFormDTO formDTO);
List<ProjectStatusListResultDTO> projectStatusList(ProjectTotalFormDTO formDTO);
/**
* @Description 赋能平台项目分类分析各分类项目数图表
* @author sun
*/
List<ProjectCategoryTotalResultDTO> projectCategoryList(ProjectCategoryTotalFormDTO formDTO);
/**
* @Description 赋能平台项目处理分析分类下项目列表
* @author sun
*/
CategoryProjectResultDTO categoryProjectList(CategoryProjectFormDTO formDTO);
/**
* @Description 赋能平台项目处理分析研判分析
* @author sun
*/
ProjectAnalysisResultDTO projectAnalysis(ProjectAnalysisFormDTO formDTO);
/**
* 找出这些议题中对应的项目id,以及项目对应的一级分类编码
*
* @param issueIds
* @return
*/
List<IssueProjectCategory> getIssueProjectFirstCategory(List<String> issueIds);
}

280
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java

@ -10,23 +10,32 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.constant.ProjectConstant;
import com.epmet.dataaggre.dao.govproject.ProjectDao;
import com.epmet.dataaggre.dto.datastats.result.FactAgencyProjectMonthResultDTO;
import com.epmet.dataaggre.dto.datastats.result.FactAgencyProjectResultDTO;
import com.epmet.dataaggre.dto.govissue.IssueProjectCategoryDictDTO;
import com.epmet.dataaggre.dto.govissue.result.IssueInfoDTO;
import com.epmet.dataaggre.dto.govissue.result.IssueListResultDTO;
import com.epmet.dataaggre.dto.govorg.result.GridsInfoListResultDTO;
import com.epmet.dataaggre.dto.govproject.ProjectDTO;
import com.epmet.dataaggre.dto.govproject.form.AllProjectFormDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectDistributionFormDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectTotalFormDTO;
import com.epmet.dataaggre.dto.govproject.ProjectRelatedPersonnelDTO;
import com.epmet.dataaggre.dto.govproject.ResiEventDTO;
import com.epmet.dataaggre.dto.govproject.form.*;
import com.epmet.dataaggre.dto.govproject.result.*;
import com.epmet.dataaggre.dto.resigroup.ResiTopicDTO;
import com.epmet.dataaggre.service.datastats.DataStatsService;
import com.epmet.dataaggre.service.epmetuser.EpmetUserService;
import com.epmet.dataaggre.service.evaluationindex.EvaluationIndexService;
import com.epmet.dataaggre.service.govissue.GovIssueService;
import com.epmet.dataaggre.service.govorg.GovOrgService;
import com.epmet.dataaggre.service.govproject.GovProjectService;
import com.epmet.dataaggre.service.resigroup.ResiGroupService;
import com.epmet.dto.IcResiUserDTO;
import com.epmet.dto.UserBaseInfoDTO;
import com.epmet.dto.form.TimestampIntervalFormDTO;
import com.epmet.dto.form.WorkMinuteFormDTO;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
@ -57,6 +66,10 @@ public class GovProjectServiceImpl implements GovProjectService {
private ResiGroupService resiGroupService;
@Autowired
private DataStatsService dataStatsService;
@Autowired
private EvaluationIndexService evaluationIndexService;
@Autowired
private EpmetUserService epmetUserService;
/**
* @Description 查询项目信息
@ -278,6 +291,9 @@ public class GovProjectServiceImpl implements GovProjectService {
result.setPendingRatio(l.getPendingRatio());
result.setClosedTotal(l.getClosedTotal());
result.setClosedRatio(l.getClosedRatio());
//默认较昨日较上个月增长值就是当前日期的数据
result.setDateIncr(l.getProjectTotal());
result.setMonthIncr(l.getProjectTotal());
}
if (formDTO.getYeDateId().equals(l.getDateId())) {
result.setDateIncr(result.getProjectTotal() - l.getProjectTotal());
@ -294,8 +310,30 @@ public class GovProjectServiceImpl implements GovProjectService {
* @author sun
*/
@Override
public List<ProjectMonthIncrResultDTO> projectMonthIncr(ProjectTotalFormDTO formDTO) {
return null;
public LinkedList<ProjectMonthIncrResultDTO> projectMonthIncr(ProjectTotalFormDTO formDTO) {
LinkedList<ProjectMonthIncrResultDTO> resultList = new LinkedList<>();
//1.获取起始终止月份值
LinkedHashMap<String, String> map = DateUtils.getXproSub(formDTO.getDateId());
List<String> monthIdList = map.keySet().stream().collect(Collectors.toList());
formDTO.setStartMonth(monthIdList.get(NumConstant.ZERO));
formDTO.setEndMonth(monthIdList.get(NumConstant.ELEVEN));
//2.查询dateId的上一月过去12个月份数据【2021-12-08 数据是202012到202111的数据】
List<FactAgencyProjectMonthResultDTO> list = dataStatsService.getProjectMonthIncr(formDTO);
//3.封装数据并返回
map.forEach((k, v) -> {
ProjectMonthIncrResultDTO dto = new ProjectMonthIncrResultDTO();
dto.setType(v);
list.forEach(l -> {
if (k.equals(l.getMonthId())) {
dto.setValue(l.getProjectIncr());
}
});
resultList.add(dto);
});
return resultList;
}
/**
@ -303,8 +341,236 @@ public class GovProjectServiceImpl implements GovProjectService {
* @author sun
*/
@Override
public List<ProjectTotalResultDTO> projectStatusList(ProjectTotalFormDTO formDTO) {
return null;
public List<ProjectStatusListResultDTO> projectStatusList(ProjectTotalFormDTO formDTO) {
//所选日期后一天的dateId值
formDTO.setToDateId(DateUtils.dateOrmonthId(formDTO.getDateId(), "date", 1));
//1.查询组织下截止到dateId的某个状态的项目列表
List<ProjectStatusListResultDTO> resultList = projectDao.getProjectStatusList(formDTO);
return resultList;
}
/**
* @Description 赋能平台项目分类分析各分类项目数图表
, * @author sun
*/
@Override
public List<ProjectCategoryTotalResultDTO> projectCategoryList(ProjectCategoryTotalFormDTO formDTO) {
List<ProjectCategoryTotalResultDTO> resultList = new ArrayList<>();
//1.查询客户下一级分类信息
List<IssueProjectCategoryDictDTO> categoryList = govIssueService.categoryList(formDTO.getCustomerId(), "1", "enable");
//2.按dateId查询组织下一级分类项目总数
List<ProjectCategoryTotalResultDTO> list = evaluationIndexService.projectCategoryList(formDTO);
//3.封装数据并返回
//有数据的排在前边,没数据的按分类顺序排在后边
Map<String, String> map = new HashMap<>();
list.forEach(l -> {
ProjectCategoryTotalResultDTO dto = new ProjectCategoryTotalResultDTO();
dto.setAgencyId(formDTO.getAgencyId());
dto.setTotal(l.getTotal());
categoryList.forEach(ca -> {
if (ca.getCategoryCode().equals(l.getCategoryCode())) {
dto.setCategoryCode(ca.getCategoryCode());
dto.setCategoryName(ca.getCategoryName());
dto.setColour(ca.getColour());
}
});
map.put(l.getCategoryCode(), l.getCategoryCode());
resultList.add(dto);
});
categoryList.forEach(ca -> {
if (!map.containsKey(ca.getCategoryCode())) {
ProjectCategoryTotalResultDTO dto = new ProjectCategoryTotalResultDTO();
dto.setAgencyId(formDTO.getAgencyId());
dto.setCategoryCode(ca.getCategoryCode());
dto.setCategoryName(ca.getCategoryName());
dto.setColour(ca.getColour());
resultList.add(dto);
map.put(ca.getCategoryCode(), ca.getCategoryCode());
}
});
return resultList;
}
/**
* @Description 赋能平台项目处理分析分类下项目列表
* @author sun
*/
@Override
public CategoryProjectResultDTO categoryProjectList(CategoryProjectFormDTO formDTO) {
CategoryProjectResultDTO resultDTO = new CategoryProjectResultDTO();
//所选日期后一天的dateId值
formDTO.setToDateId(DateUtils.dateOrmonthId(formDTO.getDateId(), "date", 1));
//1.查询客户下分类信息
List<IssueProjectCategoryDictDTO> categoryList = govIssueService.categoryList(formDTO.getCustomerId(), null, null);
List<String> categoreCodeList = categoryList.stream().filter(ca -> ca.getParentCategoryCode().equals(formDTO.getCategoryCode())).map(m -> m.getCategoryCode()).collect(Collectors.toList());
formDTO.setCategoreCodeList(categoreCodeList);
//2.查询组织及下级截止某一天的某个一级分类下的项目列表
PageInfo<CategoryProjectResultDTO.Project> result =
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> projectDao.categoryProjectList(formDTO));
if (org.springframework.util.CollectionUtils.isEmpty(result.getList())) {
return resultDTO;
}
resultDTO.setTotal((int) result.getTotal());
//3.查询已有项目列表涉及的所有分类信息【一个项目存在多个一级分类下的二级分类】
List<String> projectIds = result.getList().stream().map(CategoryProjectResultDTO.Project::getProjectId).collect(Collectors.toList());
List<CategoryProjectResultDTO.Project> list = projectDao.getCategoryList(projectIds);
//4.查询网格信息【楼院小组类项目、上报事件且上报给网格的项目才存在网格Id】
List<String> gridIds = result.getList().stream().map(CategoryProjectResultDTO.Project::getGridId).collect(Collectors.toList());
gridIds = gridIds.stream().distinct().collect(Collectors.toList());
List<GridsInfoListResultDTO> gridList = govOrgService.gridListByIds(gridIds);
//5.查询来源议题、事件的项目居民端创建人userId
List<ResiEventDTO> eventUser = projectDao.getEventList(projectIds);
List<ProjectRelatedPersonnelDTO> topicUser = projectDao.getTopicUser(projectIds);
//5.封装数据
result.getList().forEach(re -> {
//项目涉及网格信息
gridList.forEach(g -> {
if (StringUtils.isNotBlank(re.getGridId()) && re.getGridId().equals(g.getGridId())) {
re.setGridName(g.getName());
}
});
//项目涉及分类信息【一个项目涉及多个一级分类】
//一级分类Id
List<String> caId = new ArrayList<>();
list.forEach(ca -> {
if (ca.getProjectId().equals(re.getProjectId())) {
caId.add(ca.getCategoryPids());
}
});
//一级分类名称、code集合
List<String> caName = new ArrayList<>();
List<String> caCode = new ArrayList<>();
categoryList.forEach(ca -> caId.stream().filter(li -> ca.getId().equals(li)).forEach(s -> {
caName.add(ca.getCategoryName());
caCode.add(ca.getCategoryCode());
}));
re.setCategoryNames(caName);
re.setCategoryCodes(caCode);
//项目来源话题、事件的创建人信息
eventUser.forEach(ev -> {
if (re.getProjectId().equals(ev.getProjectId())) {
re.setUserId(ev.getReportUserId());
}
});
topicUser.forEach(to -> {
if (re.getProjectId().equals(to.getProjectId())) {
re.setUserId(to.getUserId());
}
});
});
resultDTO.setList(result.getList());
return resultDTO;
}
/**
* @Description 赋能平台项目处理分析研判分析
* @author sun
*/
@Override
public ProjectAnalysisResultDTO projectAnalysis(ProjectAnalysisFormDTO formDTO) {
ProjectAnalysisResultDTO resultDTO = new ProjectAnalysisResultDTO();
resultDTO.setUserId(formDTO.getUserId());
//1.查询userId的身份证号在小程序用户中存在的多个userId值
List<UserBaseInfoDTO> userList = epmetUserService.getUserBaseList(formDTO.getUserId());
List<String> userIds = userList.stream().map(UserBaseInfoDTO::getUserId).collect(Collectors.toList());
//2.查询对应负能平台用户家庭信息
if (!org.springframework.util.CollectionUtils.isEmpty(userList)) {
//2-1.根据身份证号查询负能平台用户信息
IcResiUserDTO icResiUserDTO = epmetUserService.getIcResiUser(userList.get(0).getIdNum(), formDTO.getCustomerId());
resultDTO.setIcUserId(icResiUserDTO.getId());
resultDTO.setIcUserName(icResiUserDTO.getName());
if (null != icResiUserDTO) {
//2-2.查询人员的家庭成员数据
List<ProjectAnalysisResultDTO.Home> homeList = epmetUserService.getHomeUserList(icResiUserDTO.getHomeId(), icResiUserDTO.getId());
resultDTO.setHomeUserList(homeList);
}
}
if (org.springframework.util.CollectionUtils.isEmpty(userIds)) {
userIds = new ArrayList<>();
userIds.add(formDTO.getUserId());
}
//3.查询一级分类数据
List<IssueProjectCategoryDictDTO> categoryList = govIssueService.categoryList(formDTO.getCustomerId(), null, null);
List<String> secondCodeList = formDTO.getCategoryCodeList().stream().flatMap(code -> categoryList.stream().filter(ca -> code.equals(ca.getParentCategoryCode())).map(second -> {
return second.getCategoryCode();
})).collect(Collectors.toList());
//4.根据userId集合和二级分类Code集合查询来源楼院小组的项目
List<ProjectCategoryResultDTO> groupList = projectDao.getProjectCategoryList(formDTO.getCustomerId(), secondCodeList, userIds, "issue");
//5.根据userId集合和二级分类Code集合查询来源事件上报的项目
List<ProjectCategoryResultDTO> eventList = projectDao.getProjectCategoryList(formDTO.getCustomerId(), secondCodeList, userIds, "resiEvent");
//6.封装数据
//楼院小组下分类项目列表
List<ProjectAnalysisResultDTO.Category> groupProjectList = new ArrayList<>();
//事件上报下分类项目列表
List<ProjectAnalysisResultDTO.Category> eventProjectList = new ArrayList<>();
formDTO.getCategoryCodeList().forEach(code -> {
//一级分类code下的二级分类code集合
Map<String, String> secondCodeMap = new HashMap<>();
//来源楼院小组的分类及项目列表
ProjectAnalysisResultDTO.Category groupCa = new ProjectAnalysisResultDTO.Category();
List<ProjectAnalysisResultDTO.Project> groupPrList = new ArrayList<>();
//来源事件上报的分类及项目列表
ProjectAnalysisResultDTO.Category eventCa = new ProjectAnalysisResultDTO.Category();
List<ProjectAnalysisResultDTO.Project> eventPrList = new ArrayList<>();
categoryList.forEach(ca -> {
groupCa.setCategoryCode(code);
eventCa.setCategoryCode(code);
if (code.equals(ca.getCategoryCode())) {
groupCa.setCategoryName(ca.getCategoryName());
eventCa.setCategoryName(ca.getCategoryName());
}
if (code.equals(ca.getParentCategoryCode())) {
secondCodeMap.put(ca.getCategoryCode(), ca.getCategoryCode());
}
});
//当前分类下来源楼院小组的项目
groupList.forEach(gr -> {
if (secondCodeMap.containsKey(gr.getCategoryCode())) {
ProjectAnalysisResultDTO.Project project = ConvertUtils.sourceToTarget(gr, ProjectAnalysisResultDTO.Project.class);
groupPrList.add(project);
}
});
groupCa.setProjectList(groupPrList);
groupProjectList.add(groupCa);
//当前分类下来源事件上报的项目
eventList.forEach(gr -> {
if (secondCodeMap.containsKey(gr.getCategoryCode())) {
ProjectAnalysisResultDTO.Project project = ConvertUtils.sourceToTarget(gr, ProjectAnalysisResultDTO.Project.class);
eventPrList.add(project);
}
});
eventCa.setProjectList(eventPrList);
eventProjectList.add(eventCa);
});
resultDTO.setGroupProjectList(groupProjectList);
resultDTO.setEventProjectList(eventProjectList);
return resultDTO;
}
/**
* 找出这些议题中对应的项目id,以及项目对应的一级分类编码
*
* @param issueIds
* @return
*/
@Override
public List<IssueProjectCategory> getIssueProjectFirstCategory(List<String> issueIds) {
return projectDao.selectProjectIssueCategory(issueIds);
}
}

9
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/ResiGroupService.java

@ -1,9 +1,11 @@
package com.epmet.dataaggre.service.resigroup;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dataaggre.dto.resigroup.ActCategoryDictDTO;
import com.epmet.dataaggre.dto.resigroup.ResiTopicDTO;
import com.epmet.dataaggre.dto.resigroup.form.*;
import com.epmet.dataaggre.dto.resigroup.result.*;
import com.epmet.dto.form.PageUserReportEventFormDTO;
import java.util.List;
@ -61,4 +63,11 @@ public interface ResiGroupService {
* @return com.epmet.dataaggre.dto.resigroup.result.GroupActRankResultDTO
*/
List<GroupActRankResultDTO> querySubRankList(GroupActRankFormDTO formDTO);
/**
* 分页查询我发布的话题
* @param formDTO
* @return
*/
PageData<UserTopicResDTO> pageUserTopic(PageUserReportEventFormDTO formDTO);
}

47
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/impl/ResiGroupServiceImpl.java

@ -3,12 +3,15 @@ package com.epmet.dataaggre.service.resigroup.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.Constant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.resigroup.ResiGroupDao;
import com.epmet.dataaggre.dao.resigroup.ResiTopicDao;
import com.epmet.dataaggre.dto.datastats.FactGroupActDailyDTO;
import com.epmet.dataaggre.dto.epmetuser.result.UserInfosResultDTO;
import com.epmet.dataaggre.dto.govproject.result.IssueProjectCategory;
import com.epmet.dataaggre.dto.resigroup.ActCategoryDictDTO;
import com.epmet.dataaggre.dto.resigroup.ResiTopicDTO;
import com.epmet.dataaggre.dto.resigroup.form.*;
@ -18,7 +21,9 @@ import com.epmet.dataaggre.redis.ResiGroupRedis;
import com.epmet.dataaggre.service.datastats.DataStatsService;
import com.epmet.dataaggre.service.epmetuser.EpmetUserService;
import com.epmet.dataaggre.service.govorg.GovOrgService;
import com.epmet.dataaggre.service.govproject.GovProjectService;
import com.epmet.dataaggre.service.resigroup.ResiGroupService;
import com.epmet.dto.form.PageUserReportEventFormDTO;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
@ -27,10 +32,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
@ -53,6 +55,8 @@ public class ResiGroupServiceImpl implements ResiGroupService {
private DataStatsService dataStatsService;
@Autowired
private GovOrgService govOrgService;
@Autowired
private GovProjectService govProjectService;
@Override
public List<ResiTopicDTO> selectTopicInfoByIds(List<String> topicIds) {
@ -358,4 +362,39 @@ public class ResiGroupServiceImpl implements ResiGroupService {
}
return resultDTOList;
}
/**
* 数据分析-个人档案-发布话题列表
*
* @param formDTO
* @return
*/
@Override
public PageData<UserTopicResDTO> pageUserTopic(PageUserReportEventFormDTO formDTO) {
if (org.apache.commons.collections4.CollectionUtils.isEmpty(formDTO.getEpmetUserIdList())) {
return new PageData<UserTopicResDTO>(new ArrayList<>(), NumConstant.ZERO);
}
PageInfo<UserTopicResDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(),
formDTO.getPageSize()).doSelectPageInfo(() -> resiTopicDao.selectListTopic(formDTO));
List<UserTopicResDTO> list =pageInfo.getList();
//根据议题id查询出每个议题对应的项目id,以及项目分类编码
List<String> issueIds=list.stream().filter(dto -> StringUtils.isNotBlank(dto.getIssueId())).map(UserTopicResDTO::getIssueId).collect(Collectors.toList());
if(org.apache.commons.collections4.CollectionUtils.isNotEmpty(issueIds)){
List<IssueProjectCategory> categoryList= govProjectService.getIssueProjectFirstCategory(issueIds);
for(UserTopicResDTO topicResDTO :pageInfo.getList()){
topicResDTO.setShiftProject(false);
topicResDTO.setProjectId(StrConstant.EPMETY_STR);
for(IssueProjectCategory category:categoryList){
if(topicResDTO.getIssueId().equals(category.getIssueId())&&StringUtils.isNotBlank(category.getProjectId())){
topicResDTO.setShiftProject(true);
topicResDTO.setProjectId(category.getProjectId());
break;
}
}
}
}
return new PageData<>(pageInfo.getList(), pageInfo.getTotal());
}
}

14
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml

@ -1083,4 +1083,18 @@
ORDER BY a.date_id DESC
</select>
<select id="getProjectMonthIncr" resultType="com.epmet.dataaggre.dto.datastats.result.FactAgencyProjectMonthResultDTO">
SELECT
agency_id,
month_id,
project_incr
FROM
fact_agency_project_monthly
WHERE
agency_id = #{agencyId}
AND month_id &gt;= #{startMonth}
AND month_id <![CDATA[ <= ]]> #{endMonth}
ORDER BY month_id ASC
</select>
</mapper>

39
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/IcResiUserDao.xml

@ -0,0 +1,39 @@
<?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.dataaggre.dao.epmetuser.IcResiUserDao">
<select id="getIcResiUser" resultType="com.epmet.dto.IcResiUserDTO">
SELECT
id,
customer_id,
agency_id,
grid_id,
home_id,
name,
mobile,
gender,
id_card,
birthday
FROM
ic_resi_user
WHERE
del_flag = '0'
AND customer_id = #{customerId}
AND id_card = #{idCard}
</select>
<select id="getHomeUserList" resultType="com.epmet.dataaggre.dto.govproject.result.ProjectAnalysisResultDTO$Home">
SELECT
id icUserId,
home_id homeId,
name icUserName
FROM
ic_resi_user
WHERE
del_flag = '0'
AND home_id = #{homeId}
ORDER BY id = #{icUserId} desc <!-- 指定某个人排在第一位 -->
</select>
</mapper>

11
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/UserBaseInfoDao.xml

@ -38,4 +38,15 @@
</foreach>
)
</select>
<select id="getUserBaseList" resultType="com.epmet.dto.UserBaseInfoDTO">
SELECT
*
FROM
user_base_info
WHERE
del_flag = '0'
AND id_num = ( SELECT id_num FROM user_base_info WHERE user_id = #{userId})
</select>
</mapper>

14
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml

@ -182,4 +182,18 @@
AND DEL_FLAG = 0
</select>
<select id="projectCategoryList" resultType="com.epmet.dataaggre.dto.govproject.result.ProjectCategoryTotalResultDTO">
SELECT
org_id agencyId,
category_code categoryCode,
project_total total
FROM
screen_project_category_org_daily
WHERE
`level` = '1'
AND org_id = #{agencyId}
AND date_id = #{dateId}
ORDER BY project_total DESC
</select>
</mapper>

16
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml

@ -124,4 +124,20 @@
</if>
order by i.SHIFTED_TIME desc
</select>
<select id="getCategoryList" resultType="com.epmet.dataaggre.dto.govissue.IssueProjectCategoryDictDTO">
SELECT
*
FROM issue_project_category_dict
WHERE del_flag = 0
AND customer_id = #{customerId}
<if test="level != null and level.trim() != ''">
AND category_type = #{level}
</if>
<if test="isDisable != null and isDisable.trim() != ''">
AND is_disable = #{isDisable}
</if>
ORDER BY category_code
</select>
</mapper>

3
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerGridDao.xml

@ -22,7 +22,8 @@
cg.grid_name,
CONCAT(ca.organization_name,'-',cg.grid_name)
) AS 'gridName',
cg.customer_id AS 'customerId'
cg.customer_id AS 'customerId',
cg.grid_name AS 'name'
FROM
customer_grid cg
INNER JOIN customer_agency ca ON cg.pid = ca.id

2
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml

@ -27,7 +27,7 @@
ca.level,
ca.area_code,
ca.parent_area_code,
( CASE WHEN ca.longitude is THEN
( CASE WHEN ca.longitude is null THEN
( SELECT longitude FROM customer_agency
WHERE del_flag = '0' AND customer_id = (SELECT customer_id FROM customer_agency WHERE id = ca.id)
ORDER BY pid ASC LIMIT 1

138
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml

@ -155,4 +155,142 @@
AND rem.RED_DOT = '1'
AND rem.USER_ID = #{userId}
</select>
<select id="getProjectStatusList" resultType="com.epmet.dataaggre.dto.govproject.result.ProjectStatusListResultDTO">
SELECT
agency_id agencyId,
id projectId,
origin origin,
`status` status,
locate_longitude longitude,
locate_dimension dimension,
title title
FROM
project
WHERE
del_flag = '0'
AND org_id_path LIKE CONCAT('%', #{agencyId}, '%')
AND `status` = #{status}
AND created_time <![CDATA[<]]> DATE_FORMAT(#{toDateId}, '%Y-%m-%d')
ORDER BY created_time DESC
</select>
<select id="categoryProjectList" resultType="com.epmet.dataaggre.dto.govproject.result.CategoryProjectResultDTO$Project">
SELECT
p.agency_id agencyId,
p.id projectId,
p.origin origin,
IFNULL(pc.grid_id, '') gridId,
p.`status` status,
p.title title,
p.created_time time
FROM
project p
INNER JOIN project_category pc ON p.id = pc.project_id
WHERE
p.del_flag = '0'
AND p.org_id_path LIKE CONCAT('%', #{agencyId}, '%')
AND p.created_time <![CDATA[<]]> DATE_FORMAT(#{toDateId}, '%Y-%m-%d')
<foreach collection="categoreCodeList" item="code" open="AND pc.category_code IN (" separator="," close=")">
#{code}
</foreach>
GROUP BY
pc.project_id
ORDER BY
p.created_time DESC
</select>
<select id="getCategoryList" resultType="com.epmet.dataaggre.dto.govproject.result.CategoryProjectResultDTO$Project">
SELECT
project_id projectId,
substring_index(category_pids, ',', 1) categoryPids, <!-- 目前分类只有两级,所以这个字段值其实就是一类的id值,后续上报上来的数据会存在多个 -->
category_code categoryCode
FROM
project_category
WHERE
del_flag = '0'
<foreach collection="projectIds" item="projectId" open="AND project_id IN (" separator="," close=")">
#{projectId}
</foreach>
GROUP BY
category_pids, project_id
ORDER BY project_id
</select>
<select id="getEventList" resultType="com.epmet.dataaggre.dto.govproject.ResiEventDTO">
SELECT
project_id projectId,
report_user_id reportUserId
FROM
resi_event
WHERE
DEL_FLAG = '0'
<foreach collection="projectIds" item="projectId" open="AND project_id IN (" separator="," close=")">
#{projectId}
</foreach>
</select>
<select id="getTopicUser" resultType="com.epmet.dataaggre.dto.govproject.ProjectRelatedPersonnelDTO">
SELECT
project_id projectId,
user_id userId
FROM
project_related_personnel
WHERE
del_flag = '0'
AND source_type = 'topic'
<foreach collection="projectIds" item="projectId" open="AND project_id IN (" separator="," close=")">
#{projectId}
</foreach>
</select>
<select id="selectProjectIssueCategory" parameterType="map" resultType="com.epmet.dataaggre.dto.govproject.result.IssueProjectCategory">
SELECT
p.ORIGIN_ID AS issueId,
p.id AS projectId
FROM
project p
WHERE
p.DEL_FLAG = '0'
<foreach item="issueId" collection="issueIds" separator="OR" open="AND (" close=")" index="">
p.ORIGIN_ID = #{issueId}
</foreach>
</select>
<select id="getProjectCategoryList" resultType="com.epmet.dataaggre.dto.govproject.result.ProjectCategoryResultDTO">
SELECT
p.id projectId,
p.title title,
p.`status` status,
pc.category_code categoryCode
FROM
project p
INNER JOIN project_category pc ON p.id = pc.project_id
<if test="origin != null and origin != '' and origin == 'issue'">
INNER JOIN project_related_personnel prp ON p.id = prp.project_id AND prp.source_type = 'topic'
</if>
<if test="origin != null and origin != '' and origin == 'resiEvent'">
INNER JOIN resi_event re ON p.ID = re.PROJECT_ID
</if>
WHERE
p.del_flag = '0'
AND p.customer_id = #{customerId}
AND p.origin = #{origin}
<foreach collection="secondCodeList" item="code" open="AND pc.category_code IN (" separator="," close=")">
#{code}
</foreach>
<if test="origin != null and origin != '' and origin == 'issue'">
<foreach collection="userIds" item="userId" open="AND prp.user_id IN (" separator="," close=")">
#{userId}
</foreach>
</if>
<if test="origin != null and origin != '' and origin == 'resiEvent'">
<foreach collection="userIds" item="userId" open="AND re.report_user_id IN (" separator="," close=")">
#{userId}
</foreach>
</if>
GROUP BY pc.project_id
ORDER BY p.created_time DESC
</select>
</mapper>

19
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/resigroup/ResiTopicDao.xml

@ -22,4 +22,23 @@
#{topicId}
</foreach>
</select>
<!-- 发布话题,分页-->
<select id="selectListTopic" parameterType="com.epmet.dto.form.PageUserReportEventFormDTO"
resultType="com.epmet.dataaggre.dto.resigroup.result.UserTopicResDTO">
SELECT
rt.id as topicId,
IFNULL(rt.TOPIC_CONTENT,'语音话题') as topicContent,
rt.SHIFT_ISSUE as shiftIssue,
IFNULL(rt.ISSUE_ID,'') AS issueId,
rt.CREATED_TIME as releaseTime
FROM
resi_topic RT
WHERE
rt.DEL_FLAG = '0'
<foreach item="epmetUserId" collection="epmetUserIdList" open="AND (" separator="or" close=")" index="">
rt.CREATED_BY = #{epmetUserId}
</foreach>
order by rt.CREATED_TIME desc
</select>
</mapper>

4
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java

@ -69,7 +69,7 @@ public class IcPartyActivityDTO implements Serializable {
*/
@NotBlank(message = "服务事项不能为空",groups = AddGroup.class)
private String serviceMatter;
private String serviceMatterName;
/**
* 活动标题
*/
@ -97,7 +97,7 @@ public class IcPartyActivityDTO implements Serializable {
* 活动时间
*/
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern="yyyy-MM-dd HH:mm")
private Date activityTime;
/**

2
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java

@ -4,6 +4,7 @@ import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
@ -16,6 +17,7 @@ import java.util.Date;
@Data
public class PartyActivityFormDTO implements Serializable {
private static final long serialVersionUID = -2510068555703677L;
@NotBlank(message = "组织Id不能为空" )
private String agencyId;
private String unitId;
private String title;

19
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandOptionFormDTO.java

@ -0,0 +1,19 @@
package com.epmet.dto.form.demand;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
@Data
public class DemandOptionFormDTO implements Serializable {
private static final long serialVersionUID = -5335277881919236426L;
public interface AddUserInternalGroup {
}
@NotBlank(message = "token获取客户id不能为空", groups = AddUserInternalGroup.class)
private String customerId;
@NotBlank(message = "查询条件和查看居民详情:query;新增或修改居民信息:addorupdate", groups = AddUserInternalGroup.class)
private String purpose;
}

34
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandResearchAnalysisFormDTO.java

@ -0,0 +1,34 @@
package com.epmet.dto.form.demand;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* 需求研判分析 入参DTO
*/
@Data
public class DemandResearchAnalysisFormDTO implements Serializable {
private static final long serialVersionUID = 3528172570410679765L;
public interface AddUserInternalGroup {
}
public interface AddUserShowGroup extends CustomerClientShowGroup {
}
@NotBlank(message = "firstCategoryCode不能为空",groups = AddUserInternalGroup.class)
private String firstCategoryCode;
@NotBlank(message = "isResiUserId不能为空",groups = AddUserInternalGroup.class)
private String icResiUserId;
private List<String> epmetUserIdList;
@NotBlank(message = "tokenDto中的customerId不能为空",groups = AddUserInternalGroup.class)
private String customerId;
}

11
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcResiUserDemandFromDTO.java

@ -5,6 +5,7 @@ import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
@Data
public class IcResiUserDemandFromDTO implements Serializable {
@ -15,13 +16,13 @@ public class IcResiUserDemandFromDTO implements Serializable {
/**
* 居民信息录入的居民的id
*/
@NotBlank(message = "userId不能为空", groups = AddUserInternalGroup.class)
private String userId;
@NotBlank(message = "icResiUserId不能为空", groups = AddUserInternalGroup.class)
private String icResiUserId;
/**
* icresiuser/persondata接口返参中有此值
*/
private String epmetUserId;
private List<String> epmetUserIdList;
@NotNull(message = "pageNo不能为空", groups = AddUserInternalGroup.class)
private Integer pageNo;
@ -36,4 +37,8 @@ public class IcResiUserDemandFromDTO implements Serializable {
@NotBlank(message = "tokenDto获取客户id不能为空", groups = AddUserInternalGroup.class)
private String customerId;
/**
* epmetUserIdList+userId
*/
private List<String> userIds;
}

52
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/PageListAnalysisFormDTO.java

@ -0,0 +1,52 @@
package com.epmet.dto.form.demand;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* 数据分析-服务措施分析-分页查询接口入参
*/
@Data
public class PageListAnalysisFormDTO implements Serializable {
private static final long serialVersionUID = 4993949289966075260L;
public interface AddUserInternalGroup {
}
public interface AddUserShowGroup extends CustomerClientShowGroup {
}
@NotNull(message = "页码不能为空", groups = AddUserInternalGroup.class)
private Integer pageNo;
@NotNull(message = "每页数量不能为空", groups = AddUserInternalGroup.class)
private Integer pageSize;
@NotBlank(message = "先选择组织或网格", groups = AddUserShowGroup.class)
private String orgId;
@NotBlank(message = "组织或网格的上级", groups = AddUserShowGroup.class)
private String pid;
@NotBlank(message = "orgType=grid或者agency,不能为空", groups = AddUserInternalGroup.class)
private String orgType;
@NotBlank(message = "分类编码不能为空", groups = AddUserInternalGroup.class)
private String categoryCode;
@NotBlank(message = "上报时间起始日期不能为空,格式yyyyMMdd", groups = AddUserInternalGroup.class)
private String startDateId;
@NotBlank(message = "上报时间截止日期不能为空,格式yyyyMMdd", groups = AddUserInternalGroup.class)
private String endDateId;
@NotBlank(message = "tokenDto中的customerId不能为空",groups = AddUserInternalGroup.class)
private String customerId;
/**
* orgType=agency时pid拼接上orgId
*/
private String gridPids;
private Boolean pageFlag;
}

16
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ActivityStatisticsDTO.java

@ -0,0 +1,16 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/12/9 16:05
*/
@Data
public class ActivityStatisticsDTO implements Serializable {
private String unitCount;
private String activityCount;
}

20
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitDistributionResultDTO.java

@ -0,0 +1,20 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/12/9 10:05
*/
@Data
public class PartyUnitDistributionResultDTO implements Serializable {
private static final long serialVersionUID = -4066938451623510159L;
private String id;
private String name;
private String type;
private String longitude;
private String latitude;
}

52
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecExcelResultDTO.java

@ -0,0 +1,52 @@
package com.epmet.dto.result.demand;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
public class DemandRecExcelResultDTO implements Serializable {
private static final long serialVersionUID = -1110606022410166621L;
@Excel(name = "状态", width = 15)
private String statusName;
@Excel(name = "所属网格", width = 40)
private String gridName;
@Excel(name = "需求类型", width = 40)
private String categoryName;
@Excel(name = "需求内容", width = 40)
private String content;
@Excel(name = "上报类型", width = 40)
private String reportTypeName;
@Excel(name = "上报人", width = 20)
private String reportUserName;
@Excel(name = "上报时间", width = 25,format ="yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date reportTime;
@Excel(name = "需求人", width = 20)
private String demandUserName;
/**
* 尹作梅(志愿者)
* XXX(社会组织)
* XXX(社区自组织)
* XXX(区域化党建单位)
*/
@Excel(name = "服务方", width = 15)
private String serviceShowName;
@Excel(name = "服务时间", width = 25,format ="yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date wantServiceTime;
}

29
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandResearchAnalysisResultDTO.java

@ -0,0 +1,29 @@
package com.epmet.dto.result.demand;
import com.epmet.dto.result.HouseUserDTO;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 数据分析-个人档案-需求详情研判分析
*/
@Data
public class DemandResearchAnalysisResultDTO implements Serializable {
private static final long serialVersionUID = -1024304149893118204L;
/**
* 居民信息及家属列表
*/
private String icResiUserId;
private String icUserName;
private String houseId;
private List<HouseUserDTO> houseUserList;
private List<IcResiUserReportDemandRes> demandList;
/**
* 入参中给的再返回去
*/
private List<String> epmetUserIdList;
}

3
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/IcResiUserReportDemandRes.java

@ -30,4 +30,7 @@ public class IcResiUserReportDemandRes implements Serializable {
private String status;
private String statusName;
private String firstCategoryCode;
private String firstCategoryName;
}

21
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java

@ -29,6 +29,7 @@ import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.IcPartyActivityDTO;
import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.excel.IcPartyActivityExcel;
import com.epmet.service.IcPartyActivityService;
import org.apache.commons.collections4.CollectionUtils;
@ -117,4 +118,24 @@ public class IcPartyActivityController {
public Result importData(@LoginUser TokenDto tokenDto, HttpServletResponse response, @RequestPart("file") MultipartFile file) throws IOException {
return icPartyActivityService.importData(tokenDto, response, file);
}
/**
* @Description 联建活动分类统计
* @Param formDTO
* @Return {@link Result< List< OptionDTO>>}
* @Author zhaoqifeng
* @Date 2021/12/9 16:20
*/
@PostMapping("statistics")
public Result<List<OptionDTO>> statistics(@RequestBody PartyActivityFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return new Result<List<OptionDTO>>().ok(icPartyActivityService.statistics(formDTO));
}
@PostMapping("activitylist")
public Result<PageData<IcPartyActivityDTO>> activityList(@LoginUser TokenDto tokenDto, @RequestBody PartyActivityFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
PageData<IcPartyActivityDTO> page = icPartyActivityService.getActivityList(tokenDto, formDTO);
return new Result<PageData<IcPartyActivityDTO>>().ok(page);
}
}

29
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java

@ -19,6 +19,7 @@ package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.dto.result.OptionDataResultDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ExcelUtils;
@ -28,8 +29,10 @@ import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.IcPartyUnitDTO;
import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.dto.form.PartyUnitFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.PartyUnitDistributionResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.excel.IcPartyUnitExcel;
import com.epmet.service.IcPartyUnitService;
@ -150,4 +153,30 @@ public class IcPartyUnitController {
public Result importData(@LoginUser TokenDto tokenDto, HttpServletResponse response, @RequestPart("file") MultipartFile file) throws IOException {
return icPartyUnitService.importData(tokenDto, response, file);
}
/**
* @Description 按类型统计单位数量
* @Param dto
* @Return {@link Result< List< OptionDataResultDTO>>}
* @Author zhaoqifeng
* @Date 2021/12/8 14:52
*/
@PostMapping("typestatistics")
public Result<List<OptionDataResultDTO>> typeStatistics(@RequestBody PartyActivityFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
return new Result<List<OptionDataResultDTO>>().ok(icPartyUnitService.typeStatistics(formDTO));
}
/**
* @Description 联建单位分布
* @Param formDTO
* @Return {@link Result< List< PartyUnitDistributionResultDTO>>}
* @Author zhaoqifeng
* @Date 2021/12/9 10:11
*/
@PostMapping("distribution")
public Result<List<PartyUnitDistributionResultDTO>> distribution(@RequestBody PartyActivityFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
return new Result<List<PartyUnitDistributionResultDTO>>().ok(icPartyUnitService.distribution(formDTO));
}
}

13
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java

@ -132,6 +132,19 @@ public class IcResiDemandDictController {
return new Result<List<OptionResultDTO>>().ok(icResiDemandDictService.getDemandOptions(tokenDto.getCustomerId()));
}
/**
* 服务措施管理界面
*
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("option-service")
public Result<List<OptionResultDTO>> getDemandOptionsV2(@LoginUser TokenDto tokenDto,@RequestBody DemandOptionFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
ValidatorUtils.validateEntity(formDTO,DemandOptionFormDTO.AddUserInternalGroup.class);
return new Result<List<OptionResultDTO>>().ok(icResiDemandDictService.getDemandOptionsV2(formDTO));
}
/**
* 居民信息列表需要展示分类名称单独开出来这个接口供user查询

52
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java

@ -20,21 +20,22 @@ package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constant.UserDemandConstant;
import com.epmet.dto.form.demand.*;
import com.epmet.dto.result.demand.DemandRecResultDTO;
import com.epmet.dto.result.demand.IcResiUserReportDemandRes;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.dto.result.demand.*;
import com.epmet.service.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
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 javax.servlet.http.HttpServletResponse;
import java.util.List;
@ -210,7 +211,50 @@ public class IcUserDemandRecController {
}
/**
* 数据分析-个人档案-需求详情研判分析
*
* @param formDTO
* @return
*/
@PostMapping("demand-research-analysis")
public Result<DemandResearchAnalysisResultDTO> queryDemandResearchAnalysis(@LoginUser TokenDto tokenDto,@RequestBody DemandResearchAnalysisFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
ValidatorUtils.validateEntity(formDTO, DemandResearchAnalysisFormDTO.AddUserInternalGroup.class);
return new Result<DemandResearchAnalysisResultDTO>().ok(icUserDemandRecService.queryDemandResearchAnalysis(formDTO));
}
/**
* 数分析-服务措施分析-分页查询
*
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("pagelist-analysis")
public Result<PageData<DemandRecResultDTO>> pageListAnalysis(@LoginUser TokenDto tokenDto,@RequestBody PageListAnalysisFormDTO formDTO){
formDTO.setPageFlag(true);
formDTO.setCustomerId(tokenDto.getCustomerId());
ValidatorUtils.validateEntity(formDTO,PageListAnalysisFormDTO.AddUserShowGroup.class,PageListAnalysisFormDTO.AddUserInternalGroup.class);
return new Result<PageData<DemandRecResultDTO>>().ok(icUserDemandRecService.pageListAnalysis(formDTO));
}
/**
* 数据分析-服务措施分析-导出
* @param response
* @param tokenDto
* @param formDTO
* @throws Exception
*/
@PostMapping("analysis-export")
public Result analysisExport(HttpServletResponse response,@LoginUser TokenDto tokenDto, @RequestBody PageListAnalysisFormDTO formDTO)throws Exception {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setPageFlag(false);
PageData<DemandRecResultDTO> res=icUserDemandRecService.pageListAnalysis(formDTO);
if (!CollectionUtils.isEmpty(res.getList())) {
ExcelUtils.exportExcelToTarget(response, null, res.getList(), DemandRecExcelResultDTO.class);
return new Result();
}
return new Result();
}
}

11
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyActivityDao.java

@ -18,6 +18,8 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.dto.result.ActivityStatisticsDTO;
import com.epmet.entity.IcPartyActivityEntity;
import org.apache.ibatis.annotations.Mapper;
@ -29,5 +31,14 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface IcPartyActivityDao extends BaseDao<IcPartyActivityEntity> {
/**
* @Description 联建活动统计
* @Param formDTO
* @Return {@link ActivityStatisticsDTO}
* @Author zhaoqifeng
* @Date 2021/12/9 16:06
*/
ActivityStatisticsDTO getStatistics(PartyActivityFormDTO formDTO);
}

20
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java

@ -18,6 +18,8 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.commons.tools.dto.result.OptionDataResultDTO;
import com.epmet.dto.result.PartyUnitDistributionResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcPartyUnitEntity;
import org.apache.ibatis.annotations.Mapper;
@ -43,4 +45,22 @@ public interface IcPartyUnitDao extends BaseDao<IcPartyUnitEntity> {
List<OptionDTO> selectListByAgencyId(@Param("agencyIds") List<String> agencyIds,
@Param("unitName") String unitName,
@Param("customerId")String customerId);
/**
* 单位分类统计
* @Param agencyId
* @Return {@link java.util.List<com.epmet.commons.tools.dto.result.OptionDataResultDTO>}
* @Author zhaoqifeng
* @Date 2021/12/8 15:25
*/
List<OptionDataResultDTO> getTypeStatistics(@Param("agencyId")String agencyId);
/**
* @Description 联建单位分布
* @Param agencyId
* @Return {@link List< PartyUnitDistributionResultDTO>}
* @Author zhaoqifeng
* @Date 2021/12/9 14:24
*/
List<PartyUnitDistributionResultDTO> getDistribution(@Param("agencyId")String agencyId);
}

4
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java

@ -36,8 +36,8 @@ import java.util.Set;
*/
@Mapper
public interface IcResiDemandDictDao extends BaseDao<IcResiDemandDictEntity> {
List<OptionResultDTO> selectDemandOptions(@Param("customerId") String customerId);
List<OptionResultDTO> selectChildDemands(@Param("customerId")String customerId, @Param("parentCode") String parentCode);
List<OptionResultDTO> selectDemandOptions(@Param("customerId") String customerId,@Param("usableFlagFormValue") String usableFlagFormValue);
List<OptionResultDTO> selectChildDemands(@Param("customerId")String customerId, @Param("parentCode") String parentCode,@Param("usableFlagFormValue") String usableFlagFormValue);
String selectCategoryNames(@Param("customerId") String customerId,@Param("codeSet") Set<String> codeSet);

9
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java

@ -19,6 +19,7 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.form.demand.IcResiUserDemandFromDTO;
import com.epmet.dto.form.demand.PageListAnalysisFormDTO;
import com.epmet.dto.form.demand.UserDemandPageFormDTO;
import com.epmet.dto.result.demand.DemandRecResultDTO;
import com.epmet.dto.result.demand.IcResiUserReportDemandRes;
@ -56,4 +57,12 @@ public interface IcUserDemandRecDao extends BaseDao<IcUserDemandRecEntity> {
* @return
*/
DemandRecResultDTO selectDemandRecDetail(@Param("customerId") String customerId, @Param("demandRecId") String demandRecId);
/**
* 数分析-服务措施分析-分页查询
*
* @param formDTO
* @return
*/
List<DemandRecResultDTO> pageListAnalysis(PageListAnalysisFormDTO formDTO);
}

19
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java

@ -23,6 +23,7 @@ import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.IcPartyActivityDTO;
import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcPartyActivityEntity;
import org.springframework.web.multipart.MultipartFile;
@ -98,4 +99,22 @@ public interface IcPartyActivityService extends BaseService<IcPartyActivityEntit
* @Date 2021/11/29 11:01
*/
Result importData(TokenDto tokenDto, HttpServletResponse response, MultipartFile file) throws IOException;
/**
* 联建活动统计
* @Param formDTO
* @Return {@link List< OptionDTO>}
* @Author zhaoqifeng
* @Date 2021/12/9 14:55
*/
List<OptionDTO> statistics(PartyActivityFormDTO formDTO);
/**
* 联建活动统计列表
* @Param formDTO
* @Return {@link PageData< IcPartyActivityDTO>}
* @Author zhaoqifeng
* @Date 2021/12/9 16:24
*/
PageData<IcPartyActivityDTO> getActivityList(TokenDto tokenDto, PartyActivityFormDTO formDTO);
}

21
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java

@ -18,12 +18,15 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.dto.result.OptionDataResultDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.IcPartyUnitDTO;
import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.dto.form.PartyUnitFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.PartyUnitDistributionResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcPartyUnitEntity;
import org.springframework.web.multipart.MultipartFile;
@ -120,4 +123,22 @@ public interface IcPartyUnitService extends BaseService<IcPartyUnitEntity> {
* @Date 2021/11/29 11:01
*/
Result importData(TokenDto tokenDto, HttpServletResponse response, MultipartFile file) throws IOException;
/**
* @Description 按类型统计单位数量
* @Param formDTO
* @Return {@link List< OptionDataResultDTO>}
* @Author zhaoqifeng
* @Date 2021/12/8 14:56
*/
List<OptionDataResultDTO> typeStatistics(PartyActivityFormDTO formDTO);
/**
* 联建单位分布
* @Param formDTO
* @Return {@link List< PartyUnitDistributionResultDTO>}
* @Author zhaoqifeng
* @Date 2021/12/9 10:10
*/
List<PartyUnitDistributionResultDTO> distribution(PartyActivityFormDTO formDTO);
}

1
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java

@ -86,6 +86,7 @@ public interface IcResiDemandDictService extends BaseService<IcResiDemandDictEnt
*/
List<OptionResultDTO> getDemandOptions(String customerId);
List<OptionResultDTO> getDemandOptionsV2(DemandOptionFormDTO formDTO);
/**
* 居民信息列表需要展示分类名称单独开出来这个接口供user查询
* @param formDTO

17
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java

@ -22,6 +22,7 @@ import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IcUserDemandRecDTO;
import com.epmet.dto.form.demand.*;
import com.epmet.dto.result.demand.DemandRecResultDTO;
import com.epmet.dto.result.demand.DemandResearchAnalysisResultDTO;
import com.epmet.dto.result.demand.IcResiUserReportDemandRes;
import com.epmet.entity.IcUserDemandRecEntity;
@ -144,4 +145,20 @@ public interface IcUserDemandRecService extends BaseService<IcUserDemandRecEntit
* @return
*/
DemandRecResultDTO queryDemandDetail(DemandDetailFormDTO formDTO);
/**
* 数据分析-个人档案-需求详情研判分析
*
* @param formDTO
* @return
*/
DemandResearchAnalysisResultDTO queryDemandResearchAnalysis(DemandResearchAnalysisFormDTO formDTO);
/**
* 数分析-服务措施分析-分页查询
*
* @param formDTO
* @return
*/
PageData<DemandRecResultDTO> pageListAnalysis(PageListAnalysisFormDTO formDTO);
}

86
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java

@ -36,6 +36,7 @@ import com.epmet.dto.IcPartyActivityDTO;
import com.epmet.dto.IcPartyUnitDTO;
import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.dto.form.demand.SubCodeFormDTO;
import com.epmet.dto.result.ActivityStatisticsDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcPartyActivityEntity;
import com.epmet.excel.IcPartyActivityImportExcel;
@ -149,7 +150,13 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD
@Override
public IcPartyActivityDTO get(String id) {
IcPartyActivityEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, IcPartyActivityDTO.class);
SubCodeFormDTO codeFormDTO = new SubCodeFormDTO();
codeFormDTO.setCustomerId(entity.getCustomerId());
codeFormDTO.setParentCategoryCode("1010");
Map<String, String> categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
IcPartyActivityDTO dto = ConvertUtils.sourceToTarget(entity, IcPartyActivityDTO.class);
dto.setServiceMatterName(categoryMap.get(dto.getServiceMatter()));
return dto;
}
@Override
@ -287,4 +294,81 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD
return new Result().ok(str);
}
/**
* 联建活动统计
*
* @param formDTO
* @Param formDTO
* @Return {@link List< OptionDTO>}
* @Author zhaoqifeng
* @Date 2021/12/9 14:55
*/
@Override
public List<OptionDTO> statistics(PartyActivityFormDTO formDTO) {
List<OptionDTO> list = new ArrayList<>();
if (null == formDTO.getStartTime() && null == formDTO.getEndTime()) {
setDate(formDTO);
}
ActivityStatisticsDTO dto = baseDao.getStatistics(formDTO);
OptionDTO unit = new OptionDTO();
unit.setLabel("组织单位");
unit.setValue(dto.getUnitCount());
list.add(unit);
OptionDTO activity = new OptionDTO();
activity.setLabel("组织活动");
activity.setValue(dto.getActivityCount());
list.add(activity);
return list;
}
/**
* 联建活动统计列表
*
* @param formDTO
* @Param formDTO
* @Return {@link PageData< IcPartyActivityDTO>}
* @Author zhaoqifeng
* @Date 2021/12/9 16:24
*/
@Override
public PageData<IcPartyActivityDTO> getActivityList(TokenDto tokenDto, PartyActivityFormDTO formDTO) {
if (null == formDTO.getStartTime() && null == formDTO.getEndTime()) {
setDate(formDTO);
}
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
LambdaQueryWrapper<IcPartyActivityEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(IcPartyActivityEntity::getAgencyId, formDTO.getAgencyId());
wrapper.eq(StringUtils.isNotBlank(formDTO.getServiceMatter()), IcPartyActivityEntity::getServiceMatter, formDTO.getServiceMatter());
wrapper.ge(null != formDTO.getStartTime(),IcPartyActivityEntity::getActivityTime, formDTO.getStartTime());
wrapper.le(null != formDTO.getEndTime(), IcPartyActivityEntity::getActivityTime, formDTO.getEndTime());
wrapper.orderByDesc(IcPartyActivityEntity::getActivityTime);
List<IcPartyActivityEntity> list = baseDao.selectList(wrapper);
List<IcPartyActivityDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyActivityDTO.class);
IcPartyUnitDTO unitDTO = new IcPartyUnitDTO();
unitDTO.setAgencyId(formDTO.getAgencyId());
if (CollectionUtils.isNotEmpty(dtoList)) {
Map<String, String> option = icPartyUnitService.option(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
SubCodeFormDTO codeFormDTO = new SubCodeFormDTO();
codeFormDTO.setCustomerId(tokenDto.getCustomerId());
codeFormDTO.setParentCategoryCode("1010");
Map<String, String> categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
dtoList.forEach(dto -> {
dto.setServiceMatterName(categoryMap.get(dto.getServiceMatter()));
dto.setUnitName(option.get(dto.getUnitId()));
});
}
PageInfo<IcPartyActivityDTO> pageInfo = new PageInfo<>(dtoList);
return new PageData<>(dtoList, pageInfo.getTotal());
}
private void setDate(PartyActivityFormDTO formDTO) {
String start = DateUtils.getBeforeNDay(30);
formDTO.setEndTime(DateUtils.parse(start.concat("000000"), DateUtils.DATE_TIME_NO_SPLIT));
String end = DateUtils.format(new Date(), DateUtils.DATE_PATTERN);
formDTO.setEndTime(DateUtils.parse(end.concat(" 23:59:59"), DateUtils.DATE_TIME_PATTERN));
}
}

48
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java

@ -24,7 +24,10 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.form.DictListFormDTO;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.dto.result.DictListResultDTO;
import com.epmet.commons.tools.dto.result.OptionDataResultDTO;
import com.epmet.commons.tools.enums.DictTypeEnum;
import com.epmet.commons.tools.enums.PartyUnitTypeEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
@ -37,9 +40,11 @@ import com.epmet.commons.tools.utils.ExcelPoiUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.IcPartyUnitDao;
import com.epmet.dto.IcPartyUnitDTO;
import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.dto.form.PartyUnitFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.form.demand.SubCodeFormDTO;
import com.epmet.dto.result.PartyUnitDistributionResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcPartyUnitEntity;
import com.epmet.excel.IcPartyUnitImportExcel;
@ -370,6 +375,49 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
return new Result().ok(str);
}
/**
* @param formDTO
* @Description 按类型统计单位数量
* @Param formDTO
* @Return {@link List<OptionDataResultDTO>}
* @Author zhaoqifeng
* @Date 2021/12/8 14:56
*/
@Override
public List<OptionDataResultDTO> typeStatistics(PartyActivityFormDTO formDTO) {
DictListFormDTO dictFromDTO = new DictListFormDTO();
dictFromDTO.setDictType(DictTypeEnum.PARTY_UNIT_TYPE.getCode());
Result<List<DictListResultDTO>> dictResult = epmetAdminOpenFeignClient.dictList(dictFromDTO);
if (!dictResult.success()) {
throw new EpmetException(dictResult.getCode());
}
List<OptionDataResultDTO> list = baseDao.getTypeStatistics(formDTO.getAgencyId());
Map<String, String> map = list.stream().collect(Collectors.toMap(OptionDataResultDTO::getCode, OptionDataResultDTO::getValue));
return dictResult.getData().stream().map(item -> {
OptionDataResultDTO dto = new OptionDataResultDTO();
dto.setLabel(item.getLabel());
dto.setCode(item.getValue());
dto.setValue(null == map.get(item.getValue())?NumConstant.ZERO_STR:map.get(item.getValue()));
return dto;
}).collect(Collectors.toList());
}
/**
* 联建单位分布
*
* @param formDTO
* @Param formDTO
* @Return {@link List<PartyUnitDistributionResultDTO >}
* @Author zhaoqifeng
* @Date 2021/12/9 10:10
*/
@Override
public List<PartyUnitDistributionResultDTO> distribution(PartyActivityFormDTO formDTO) {
return baseDao.getDistribution(formDTO.getAgencyId());
}
private String getServiceMatter(Map<String, String> map, String matter) {
List<String> matters = Arrays.asList(matter.split(StrConstant.COLON));
List<String> list = matters.stream().map(map::get).collect(Collectors.toList());

13
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java

@ -182,7 +182,18 @@ public class IcResiDemandDictServiceImpl extends BaseServiceImpl<IcResiDemandDic
*/
@Override
public List<OptionResultDTO> getDemandOptions(String customerId) {
return baseDao.selectDemandOptions(customerId);
return baseDao.selectDemandOptions(customerId,null);
}
@Override
public List<OptionResultDTO> getDemandOptionsV2(DemandOptionFormDTO formDTO) {
if ("addorupdate".equals(formDTO.getPurpose())) {
//只查询可用的
return baseDao.selectDemandOptions(formDTO.getCustomerId(), "1");
}
//查询全部
return baseDao.selectDemandOptions(formDTO.getCustomerId(), null);
}
@Override

147
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java

@ -37,13 +37,16 @@ import com.epmet.dao.IcUserDemandOperateLogDao;
import com.epmet.dao.IcUserDemandRecDao;
import com.epmet.dao.IcUserDemandSatisfactionDao;
import com.epmet.dao.IcUserDemandServiceDao;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.IcUserDemandRecDTO;
import com.epmet.dto.form.CustomerGridFormDTO;
import com.epmet.dto.form.demand.*;
import com.epmet.dto.result.AllGridsByUserIdResultDTO;
import com.epmet.dto.result.IcResiUserBriefDTO;
import com.epmet.dto.result.UserBaseInfoResultDTO;
import com.epmet.dto.result.demand.DemandRecResultDTO;
import com.epmet.dto.result.demand.DemandResearchAnalysisResultDTO;
import com.epmet.dto.result.demand.IcResiUserReportDemandRes;
import com.epmet.entity.*;
import com.epmet.feign.EpmetAdminOpenFeignClient;
@ -475,7 +478,12 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
}
formDTO.setEpmetUserId(userRes.getData().getEpmetUserId());*/
//icresiuser/persondata接口已经返回去epmetUserId,这里就不需要再查询了。直接让前端传过来
List<String> userIds=new ArrayList<>();
userIds.add(formDTO.getIcResiUserId());
if(CollectionUtils.isNotEmpty(formDTO.getEpmetUserIdList())){
userIds.addAll(formDTO.getEpmetUserIdList());
}
formDTO.setUserIds(userIds);
//2、小程序内自己上报+赋能平台待录入的
PageInfo<IcResiUserReportDemandRes> pageInfo = PageHelper.startPage(formDTO.getPageNo(),
formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectUserDemand(formDTO));
@ -494,6 +502,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
if (null != dictMap && dictMap.containsKey(resDto.getCategoryCode())) {
resDto.setCategoryName(dictMap.get(resDto.getCategoryCode()));
}
resDto.setFirstCategoryName(demandDictService.getCategoryName(formDTO.getCustomerId(),resDto.getFirstCategoryCode()));
}
}
return new PageData<>(list, pageInfo.getTotal());
@ -548,8 +557,144 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
}
/**
* 数据分析-个人档案-需求详情研判分析
*
* @param formDTO
* @return
*/
@Override
public DemandResearchAnalysisResultDTO queryDemandResearchAnalysis(DemandResearchAnalysisFormDTO formDTO) {
//获取案件居民和及家属列表
Result<IcResiUserBriefDTO> userRes = epmetUserOpenFeignClient.findFamilyMem(formDTO.getIcResiUserId());
if (!userRes.success() || null == userRes.getData()) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取居民信息接口异常");
}
IcResiUserBriefDTO icResiUserDTO = userRes.getData();
DemandResearchAnalysisResultDTO resultDTO = ConvertUtils.sourceToTarget(icResiUserDTO, DemandResearchAnalysisResultDTO.class);
resultDTO.setEpmetUserIdList(CollectionUtils.isNotEmpty(formDTO.getEpmetUserIdList()) ? formDTO.getEpmetUserIdList() : Collections.emptyList());
//获取当前需求人,相同分类的需求列表。不分页,直接返回所有
List<String> userIds=new ArrayList<>();
userIds.add(formDTO.getIcResiUserId());
if(CollectionUtils.isNotEmpty(formDTO.getEpmetUserIdList())){
userIds.addAll(formDTO.getEpmetUserIdList());
}
IcResiUserDemandFromDTO icResiUserDemandFromDTO=new IcResiUserDemandFromDTO();
icResiUserDemandFromDTO.setUserIds(userIds);
icResiUserDemandFromDTO.setFirstCategoryCode(formDTO.getFirstCategoryCode());
List<IcResiUserReportDemandRes> demandList = baseDao.selectUserDemand(icResiUserDemandFromDTO);
if(CollectionUtils.isNotEmpty(demandList)){
// 1、状态字典
Result<Map<String, String>> statusRes = adminOpenFeignClient.dictMap(DictTypeEnum.USER_DEMAND_STATUS.getCode());
Map<String, String> statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>();
//2、查询分类名称
List<String> categoryCodes = demandList.stream().map(IcResiUserReportDemandRes::getCategoryCode).collect(Collectors.toList());
List<IcResiDemandDictEntity> dictList = demandDictService.listByCodes(formDTO.getCustomerId(), categoryCodes);
Map<String, String> dictMap = dictList.stream().collect(Collectors.toMap(IcResiDemandDictEntity::getCategoryCode, IcResiDemandDictEntity::getCategoryName));
for (IcResiUserReportDemandRes resDto : demandList) {
//状态赋值
resDto.setStatusName(statusMap.containsKey(resDto.getStatus()) ? statusMap.get(resDto.getStatus()) : StrConstant.EPMETY_STR);
if (null != dictMap && dictMap.containsKey(resDto.getCategoryCode())) {
//分类名称XXX-XX 或者XXX
resDto.setCategoryName(dictMap.get(resDto.getCategoryCode()));
}
//一级分类名称
resDto.setFirstCategoryName(demandDictService.getCategoryName(formDTO.getCustomerId(),resDto.getFirstCategoryCode()));
}
resultDTO.setDemandList(CollectionUtils.isNotEmpty(demandList) ? demandList : Collections.emptyList());
}
return resultDTO;
}
/**
* 数分析-服务措施分析-分页查询
*
* @param formDTO
* @return
*/
@Override
public PageData<DemandRecResultDTO> pageListAnalysis(PageListAnalysisFormDTO formDTO) {
if("agency".equals(formDTO.getOrgType())){
if(NumConstant.ZERO_STR.equals(formDTO.getPid())){
//当前传入的组织id=客户的根组织
formDTO.setGridPids(formDTO.getOrgId());
}else{
//找到当前组织的所有上级,再拼接上自己
Result<CustomerAgencyDTO> customerAgencyDTOResult=govOrgOpenFeignClient.getAgencyById(formDTO.getOrgId());
if(!customerAgencyDTOResult.success()||null==customerAgencyDTOResult.getData()){
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取组织信息异常govOrgOpenFeignClient.getAgencyById");
}
formDTO.setGridPids(customerAgencyDTOResult.getData().getPids().concat(StrConstant.COLON).concat(formDTO.getOrgId()));
}
}
long total=NumConstant.ZERO;
List<DemandRecResultDTO> list=new ArrayList<>();
if(formDTO.getPageFlag()){
PageInfo<DemandRecResultDTO> pageInfo= PageHelper.startPage(formDTO.getPageNo(),
formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.pageListAnalysis(formDTO));
list=pageInfo.getList();
total=pageInfo.getTotal();
}else{
list=baseDao.pageListAnalysis(formDTO);
}
if(CollectionUtils.isNotEmpty(list)){
//1、查询网格信息
List<String> gridIds=list.stream().map(DemandRecResultDTO::getGridId).collect(Collectors.toList());
Result<List<AllGridsByUserIdResultDTO>> gridInfoRes=govOrgOpenFeignClient.getGridListByGridIds(gridIds);
List<AllGridsByUserIdResultDTO> gridInfoList = gridInfoRes.success() && !CollectionUtils.isEmpty(gridInfoRes.getData()) ? gridInfoRes.getData() : new ArrayList<>();
Map<String, AllGridsByUserIdResultDTO> gridInfoMap = gridInfoList.stream().collect(Collectors.toMap(AllGridsByUserIdResultDTO::getGridId, Function.identity()));
//2、查询分类名称
List<String> categoryCodes=list.stream().map(DemandRecResultDTO::getCategoryCode).collect(Collectors.toList());
List<IcResiDemandDictEntity> dictList=demandDictService.listByCodes(formDTO.getCustomerId(),categoryCodes);
Map<String, String> dictMap = dictList.stream().collect(Collectors.toMap(IcResiDemandDictEntity::getCategoryCode, IcResiDemandDictEntity::getCategoryName));
//3、查询志愿者
// 服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit;
Map<String,String> userInfoMap=new HashMap<>();
List<String> userIdList=list.stream().filter(item->item.getServiceType().equals(UserDemandConstant.VOLUNTEER)).map(DemandRecResultDTO::getServerId).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(userIdList)){
Result<List<UserBaseInfoResultDTO>> userInfoRes = epmetUserOpenFeignClient.queryUserBaseInfo(userIdList);
if(!userInfoRes.success()||CollectionUtils.isEmpty(userInfoRes.getData())){
throw new RenException("查询志愿者信息异常");
}
userInfoMap=userInfoRes.getData().stream().collect(Collectors.toMap(UserBaseInfoResultDTO::getUserId, UserBaseInfoResultDTO::getRealName));
}
//查询字典表
Result<Map<String, String>> reportTypeRes=adminOpenFeignClient.dictMap(DictTypeEnum.USER_DEMAND_REPORT_TYPE.getCode());
Map<String,String> reportTypeMap=reportTypeRes.success()&& MapUtils.isNotEmpty(reportTypeRes.getData())?reportTypeRes.getData():new HashMap<>();
Result<Map<String, String>> statusRes=adminOpenFeignClient.dictMap(DictTypeEnum.USER_DEMAND_STATUS.getCode());
Map<String,String> statusMap=statusRes.success()&& MapUtils.isNotEmpty(statusRes.getData())?statusRes.getData():new HashMap<>();
Result<Map<String, String>> serviceTypeRes=adminOpenFeignClient.dictMap(DictTypeEnum.USER_DEMAND_SERVICE_TYPE.getCode());
Map<String,String> serviceTypeMap=serviceTypeRes.success()&& MapUtils.isNotEmpty(serviceTypeRes.getData())?serviceTypeRes.getData():new HashMap<>();
for(DemandRecResultDTO res:list){
if (null != gridInfoMap && gridInfoMap.containsKey(res.getGridId())) {
res.setGridName(gridInfoMap.get(res.getGridId()).getGridName());
}
if (null != dictMap && dictMap.containsKey(res.getCategoryCode())) {
res.setCategoryName(dictMap.get(res.getCategoryCode()));
}
res.setFirstCategoryName(demandDictService.getCategoryName(formDTO.getCustomerId(), res.getFirstCategoryCode()));
if (null != userInfoMap && userInfoMap.containsKey(res.getServerId())) {
res.setServiceName(userInfoMap.get(res.getServerId()));
}
//社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help
res.setReportTypeName(reportTypeMap.containsKey(res.getReportType())?reportTypeMap.get(res.getReportType()):StrConstant.EPMETY_STR);
//待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished
res.setStatusName(statusMap.containsKey(res.getStatus())?statusMap.get(res.getStatus()):StrConstant.EPMETY_STR);
//服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit;
res.setServiceShowName(serviceTypeMap.containsKey(res.getServiceType())?res.getServiceName().concat("(").concat(serviceTypeMap.get(res.getServiceType())).concat(")"):StrConstant.EPMETY_STR);
}
}
return new PageData<>(list, total);
}

18
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml

@ -26,6 +26,24 @@
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="getStatistics" resultType="com.epmet.dto.result.ActivityStatisticsDTO" parameterType="com.epmet.dto.form.PartyActivityFormDTO">
SELECT
count( ID ) AS "activityCount",
COUNT( DISTINCT UNIT_ID ) AS "unitCount"
FROM
ic_party_activity
WHERE DEL_FLAG = '0'
AND (AGENCY_ID = #{agencyId} OR PIDS LIKE concat( '%', #{agencyId}, '%' ))
<if test='null != serviceMatter'>
AND SERVICE_MATTER = #{serviceMatter}
</if>
<if test='null != startTime'>
AND ACTIVITY_TIME &gt;= #{startTime}
</if>
<if test='null != endTime'>
AND ACTIVITY_TIME &lt;= #{endTime}
</if>
</select>
</mapper>

28
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml

@ -46,4 +46,32 @@
</foreach>
</select>
<select id="getTypeStatistics" resultType="com.epmet.commons.tools.dto.result.OptionDataResultDTO">
SELECT
TYPE AS "code",
COUNT( ID ) AS "value"
FROM
ic_party_unit
WHERE
DEL_FLAG = '0'
AND (AGENCY_ID = #{agencyId} OR PIDS LIKE concat( '%', #{agencyId}, '%' ))
GROUP BY
TYPE
</select>
<select id="getDistribution" resultType="com.epmet.dto.result.PartyUnitDistributionResultDTO">
SELECT
ID,
UNIT_NAME AS "name",
TYPE,
LONGITUDE,
LATITUDE
FROM
ic_party_unit
WHERE
DEL_FLAG = '0'
AND (AGENCY_ID = #{agencyId} OR PIDS LIKE concat( '%', #{agencyId}, '%' ))
ORDER BY
ID
</select>
</mapper>

17
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml

@ -24,8 +24,9 @@
<result column="value" property="value"/>
<result column="label" property="label"/>
<result column="PARENT_CODE" property="pValue"/>
<result column="usableFlag" property="usableFlag"/>
<collection property="children" ofType="com.epmet.commons.tools.dto.result.OptionResultDTO"
select="selectChildDemands" column="customerId=customerId,parentCode=value">
select="selectChildDemands" column="customerId=customerId,parentCode=value,usableFlagFormValue=usable_flag_form_value">
</collection>
</resultMap>
<select id="selectDemandOptions" resultMap="DemandResult">
@ -33,13 +34,18 @@
CUSTOMER_ID AS customerId,
CATEGORY_CODE AS "value",
CATEGORY_NAME AS "label",
PARENT_CODE as pValue
PARENT_CODE as pValue,
#{usableFlagFormValue} as usable_flag_form_value,
USABLE_FLAG as usableFlag
FROM
ic_resi_demand_dict
WHERE
DEL_FLAG = 0
AND LEVEL = 1
AND CUSTOMER_ID = #{customerId}
<if test="null !=usableFlagFormValue and usableFlagFormValue!='' ">
and USABLE_FLAG=#{usableFlagFormValue}
</if>
ORDER BY
SORT ASC
</select>
@ -48,7 +54,9 @@
CUSTOMER_ID AS customerId,
CATEGORY_CODE AS "value",
CATEGORY_NAME AS "label",
PARENT_CODE as pValue
PARENT_CODE as pValue,
#{usableFlagFormValue} as usable_flag_form_value,
USABLE_FLAG as usableFlag
FROM
ic_resi_demand_dict
WHERE
@ -56,6 +64,9 @@
AND LEVEL = 2
AND CUSTOMER_ID = #{customerId}
AND PARENT_CODE = #{parentCode}
<if test="null !=usableFlagFormValue and usableFlagFormValue!='' ">
and USABLE_FLAG=#{usableFlagFormValue}
</if>
ORDER BY
SORT ASC
</select>

90
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml

@ -129,19 +129,16 @@
r.PARENT_CODE as parentCode,
r.CONTENT,
r.`STATUS`,
r.WANT_SERVICE_TIME as wantServiceTime
r.WANT_SERVICE_TIME as wantServiceTime,
left(r.CATEGORY_CODE,4) as firstCategoryCode
FROM
ic_user_demand_rec r
WHERE
r.DEL_FLAG = '0'
<choose>
<when test="null!=epmetUserId and epmetUserId!='' ">
AND (r.DEMAND_USER_ID = #{userId} or r.DEMAND_USER_ID=#{epmetUserId})
</when>
<otherwise>
AND r.DEMAND_USER_ID = #{userId}
</otherwise>
</choose>
AND r.DEMAND_USER_ID in
<foreach item="demandUserId" collection="userIds" open="(" separator="," close=")">
#{demandUserId}
</foreach>
<if test="null !=firstCategoryCode and firstCategoryCode!=''">
and r.CATEGORY_CODE like concat(#{firstCategoryCode},'%')
</if>
@ -185,11 +182,7 @@
IFNULL(s.FINISH_DESC,'') as finishDesc,
'' AS serviceShowName,
s.id as serviceId,
(
case when r.PARENT_CODE !='0' then r.PARENT_CODE
ELSE R.CATEGORY_CODE
END
) as firstCategoryCode
left(r.CATEGORY_CODE,4) as firstCategoryCode
FROM
ic_user_demand_rec r
left JOIN ic_user_demand_service s ON ( r.id = s.DEMAND_REC_ID AND s.DEL_FLAG = '0' )
@ -199,4 +192,73 @@
AND r.CUSTOMER_ID = #{customerId}
and r.id=#{demandRecId}
</select>
<!-- 列表查询 -->
<select id="pageListAnalysis" parameterType="com.epmet.dto.form.demand.PageListAnalysisFormDTO" resultType="com.epmet.dto.result.demand.DemandRecResultDTO">
SELECT
r.ID as demandRecId,
r.GRID_ID as gridId,
r.agency_id as agencyId,
r.CATEGORY_CODE as categoryCode,
r.PARENT_CODE as parentCode,
r.CONTENT,
r.REPORT_TYPE as reportType,
r.REPORT_TIME as reportTime,
r.REPORT_USER_NAME as reportUserName,
r.REPORT_USER_MOBILE as reportUserMobile,
r.`STATUS` as status,
r.DEMAND_USER_ID as demandUserId,
r.DEMAND_USER_NAME as demandUserName,
r.DEMAND_USER_MOBILE as demandUserMobile,
concat(r.DEMAND_USER_NAME,'(',r.DEMAND_USER_MOBILE,')') as demandUser,
r.WANT_SERVICE_TIME as wantServiceTime,
IFNULL(r.FINISH_RESULT,'') as finishResult,
r.CANCEL_TIME as cancelTime,
r.EVALUATE_FLAG as evaluateFlag,
IFNULL(sa.SCORE,0) as score,
IFNULL( s.SERVICE_TYPE, '' ) AS serviceType,
IFNULL( s.SERVER_ID, '' ) AS serverId,
(
CASE WHEN s.SERVICE_TYPE='social_org' then (select m1.SOCIETY_NAME as socialOrgName from ic_society_org m1 where m1.id=s.SERVER_ID)
WHEN s.SERVICE_TYPE='community_org' then (select m2.ORGANIZATION_NAME as communityName from ic_community_self_organization m2 where m2.id=s.SERVER_ID)
WHEN s.SERVICE_TYPE='party_unit' then (select m3.UNIT_NAME as partyUnitName from ic_party_unit m3 where m3.id=s.SERVER_ID)
else ''
end
) as serviceName,
s.SERVICE_START_TIME as serviceStartTime,
s.SERVICE_END_TIME as serviceEndTime,
IFNULL(s.FINISH_DESC,'') as finishDesc,
'' AS serviceShowName,
s.id as serviceId,
(
case when r.PARENT_CODE !='0' then r.PARENT_CODE
ELSE R.CATEGORY_CODE
END
) as firstCategoryCode
FROM
ic_user_demand_rec r
left JOIN ic_user_demand_service s ON ( r.id = s.DEMAND_REC_ID AND s.DEL_FLAG = '0' )
left join ic_user_demand_satisfaction sa on(r.id=sa.DEMAND_REC_ID AND sa.DEL_FLAG = '0')
WHERE
r.DEL_FLAG = '0'
AND r.CUSTOMER_ID = #{customerId}
<if test="null != orgType and orgType == 'grid' ">
and r.GRID_ID=#{orgId}
</if>
<if test="null != orgType and orgType == 'agency' ">
AND r.GRID_PIDS LIKE concat(#{gridPids},'%')
</if>
<if test="null != categoryCode and categoryCode !='' ">
and r.CATEGORY_CODE LIKE CONCAT(#{categoryCode},'%')
</if>
<if test=" null != startDateId and startDateId != '' ">
AND DATE_FORMAT(r.REPORT_TIME,'%Y%m%d') <![CDATA[ >= ]]> #{startDateId}
</if>
<if test="null != endDateId and endDateId != '' ">
AND DATE_FORMAT(r.REPORT_TIME,'%Y%m%d') <![CDATA[ <= ]]> #{endDateId}
</if>
order by r.WANT_SERVICE_TIME desc,r.REPORT_TIME asc
</select>
</mapper>

4
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/IcResiPointPageFormDTO.java

@ -4,13 +4,13 @@ import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
@Data
public class IcResiPointPageFormDTO implements Serializable {
public interface AddUserInternalGroup {
}
//@NotBlank(message = "epmetUserId不能为空" , groups = AddUserInternalGroup.class)
private String epmetUserId;
private List<String> epmetUserIdList;
@NotNull(message = "pageNo不能为空",groups = AddUserInternalGroup.class)
private Integer pageNo;
@NotNull(message = "pageSize不能为空",groups = AddUserInternalGroup.class)

2
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java

@ -571,7 +571,7 @@ public class UserPointActionLogServiceImpl extends BaseServiceImpl<UserPointActi
*/
@Override
public PageData<ResiPointPageResDTO> pageUserPoint(IcResiPointPageFormDTO formDTO) {
if(StringUtils.isBlank(formDTO.getEpmetUserId())){
if(org.apache.commons.collections4.CollectionUtils.isEmpty(formDTO.getEpmetUserIdList())){
return new PageData<ResiPointPageResDTO>(new ArrayList<>(),NumConstant.ZERO);
}
PageInfo<ResiPointPageResDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(),

4
epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointActionLogDao.xml

@ -52,7 +52,9 @@
USER_POINT_ACTION_LOG
WHERE
DEL_FLAG = '0'
AND USER_ID = #{epmetUserId}
<foreach item="epmetUserId" collection="epmetUserIdList" open="AND (" separator="or" close=")" index="">
USER_ID = #{epmetUserId}
</foreach>
ORDER BY
CREATED_TIME DESC
</select>

36
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ResiBuzzFormDTO.java

@ -0,0 +1,36 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/12/8 3:29 下午
* @DESC
*/
@Data
public class ResiBuzzFormDTO implements Serializable {
private static final long serialVersionUID = 7477325476668438447L;
public interface ResiBuzzForm{}
private String orgId;
private String orgType;
/**
* 表决中voting 已转项目shift_project 已关闭closed全部all
*/
@NotBlank(message = "status不能为空",groups = ResiBuzzForm.class)
private String status;
@NotNull(message = "pageSize不能为空",groups = ResiBuzzForm.class)
private Integer pageSize;
@NotNull(message = "pageNo不能为空",groups = ResiBuzzForm.class)
private Integer pageNo;
}

26
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ResiBuzzLeftPieChartFormDTO.java

@ -0,0 +1,26 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/12/9 9:53 上午
* @DESC
*/
@Data
public class ResiBuzzLeftPieChartFormDTO implements Serializable {
private static final long serialVersionUID = -7312573663758331220L;
/**
* 组织ID
*/
private String orgId;
/**
* 组织类型agency组织grid网格
*/
private String orgType;
}

9
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/CategoryListResultDTO.java

@ -27,6 +27,14 @@ public class CategoryListResultDTO implements Serializable {
private Integer count;
/**
* 颜色
*/
private String colour;
/**
* 1级分类长度
*/
private Integer codeLength;
public CategoryListResultDTO() {
@ -34,5 +42,6 @@ public class CategoryListResultDTO implements Serializable {
this.categoryName = "";
this.count = NumConstant.ZERO;
this.codeLength = NumConstant.ZERO;
this.colour = "";
}
}

91
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ResiBuzzDTO.java

@ -0,0 +1,91 @@
package com.epmet.dto.result;
import com.epmet.commons.tools.constant.NumConstant;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/12/8 3:37 下午
* @DESC
*/
@Data
public class ResiBuzzDTO implements Serializable {
private static final long serialVersionUID = -1844581181580474374L;
@JsonIgnore
private String createdBy;
/**
* 排序
*/
private Integer sort;
/**
* 议题标题
*/
private String issueTitle;
/**
* 议题ID
*/
private String issueId;
/**
* 建议
*/
private String suggestion;
/**
* 状态
*/
private String status;
/**
* 创建时间
*/
private String createdTime;
/**
* 支持个数
*/
private Integer supportCount;
/**
* 反对个数
*/
private Integer oppositionCount;
/**
* 表决占比
*/
private String voteAccount;
/**
* 议题发起人
*/
private String issueOriginator;
/**
* 分类名字
*/
private String categoryName;
public ResiBuzzDTO() {
this.createdBy = "";
this.sort = NumConstant.ZERO;
this.issueTitle = "";
this.issueId = "";
this.suggestion = "";
this.status = "";
this.createdTime = "";
this.supportCount = NumConstant.ZERO;
this.oppositionCount = NumConstant.ZERO;
this.voteAccount = "";
this.issueOriginator = "";
this.categoryName = "其他";
}
}

44
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ResiBuzzLeftPieChartResultDTO.java

@ -0,0 +1,44 @@
package com.epmet.dto.result;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/12/9 9:56 上午
* @DESC
*/
@Data
public class ResiBuzzLeftPieChartResultDTO implements Serializable {
private static final long serialVersionUID = -4673540577019002156L;
/**
* 数量
*/
private Integer count;
/**
* 分类编码
*/
private String categoryCode;
/**
* 分类名字
*/
private String categoryName;
/**
* 颜色
*/
private String colour;
public ResiBuzzLeftPieChartResultDTO() {
this.count = NumConstant.ZERO;
this.categoryCode = "";
this.categoryName = "";
this.colour = "";
}
}

28
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ResiBuzzResultDTO.java

@ -0,0 +1,28 @@
package com.epmet.dto.result;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* @Author zxc
* @DateTime 2021/12/8 3:36 下午
* @DESC
*/
@Data
public class ResiBuzzResultDTO implements Serializable {
private static final long serialVersionUID = 4914999826185811915L;
private Integer total;
private List<ResiBuzzDTO> list;
public ResiBuzzResultDTO() {
this.total = NumConstant.ZERO;
this.list = new ArrayList<>();
}
}

18
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java

@ -7,7 +7,6 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.*;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.feign.fallback.GovIssueOpenFeignClientFallBack;
import com.epmet.feign.fallback.GovIssueOpenFeignClientFallBackFactory;
import com.epmet.project.dto.CustomerCategoryDTO;
import com.epmet.project.dto.result.ProjectCategoryDictResultDTO;
@ -353,4 +352,21 @@ public interface GovIssueOpenFeignClient {
@PostMapping(value = "/gov/issue/issueprojectcategorydict/categorylist")
Result<List<CategoryListResultDTO>> selectCategoryOneLevelListByCustomerId(@LoginUser TokenDto tokenDto);
/**
* @Description 查询组织下每个网格的项目数
* @param formDTO
* @author zxc
* @date 2021/12/9 2:59 下午
*/
@PostMapping(value = "/gov/issue/issue/projectcountbygrid")
Result<List<ProjectDistributionAnalysisRightDTO>> getProjectCountByGrid(@RequestBody ProjectDistributionAnalysisFormDTO formDTO);
/**
* @param formDTO
* @return
* @Description 批量查询分类信息
* @Author yinzuomei
**/
@PostMapping(value = "/gov/issue/issueprojectcategorydict/getcategorylist")
public Result<List<IssueProjectCategoryDictDTO>> getCategoryList(@RequestBody IssueProjectCategoryDictListFormDTO formDTO);
}

17
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java

@ -20,7 +20,6 @@ import com.epmet.resi.group.dto.group.result.ApplicationListResultDTO;
import com.epmet.resi.group.dto.group.result.*;
import com.epmet.resi.mine.dto.from.MyShiftIssueTopicsFormDTO;
import com.epmet.resi.mine.dto.result.MyShiftIssueTopicsResultDTO;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Map;
@ -287,4 +286,20 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient
public Result<List<CategoryListResultDTO>> selectCategoryOneLevelListByCustomerId(TokenDto tokenDto) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "selectCategoryOneLevelListByCustomerId", tokenDto);
}
@Override
public Result<List<ProjectDistributionAnalysisRightDTO>> getProjectCountByGrid(ProjectDistributionAnalysisFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "getProjectCountByGrid", formDTO);
}
/**
* @param formDTO
* @return
* @Description 批量查询分类信息
* @Author yinzuomei
**/
@Override
public Result<List<IssueProjectCategoryDictDTO>> getCategoryList(IssueProjectCategoryDictListFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "getCategoryList", formDTO);
}
}

38
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java

@ -1,5 +1,7 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.IssueDTO;
@ -284,5 +286,41 @@ public class IssueController {
return new Result<List<UnResolvedResultDTO>>().ok(issueService.getUnResolvedList(formDTO));
}
/**
* @Description 居民热议列表
* @param formDTO
* @param tokenDto
* @author zxc
* @date 2021/12/8 3:50 下午
*/
@PostMapping("resibuzz")
public Result<ResiBuzzResultDTO> resiBuzz(@RequestBody ResiBuzzFormDTO formDTO, @LoginUser TokenDto tokenDto){
ValidatorUtils.validateEntity(formDTO, ResiBuzzFormDTO.ResiBuzzForm.class);
return new Result<ResiBuzzResultDTO>().ok(issueService.resiBuzz(formDTO,tokenDto));
}
/**
* @Description 居民热议左边饼图
* @param formDTO
* @param tokenDto
* @author zxc
* @date 2021/12/9 10:03 上午
*/
@PostMapping("resibuzz-leftpiechart")
public Result<List<ResiBuzzLeftPieChartResultDTO>> resiBuzzLeftPieChart(@RequestBody ResiBuzzLeftPieChartFormDTO formDTO,@LoginUser TokenDto tokenDto){
return new Result<List<ResiBuzzLeftPieChartResultDTO>>().ok(issueService.resiBuzzLeftPieChart(formDTO,tokenDto));
}
/**
* @Description 查询组织下每个网格的项目数
* @param formDTO
* @author zxc
* @date 2021/12/9 2:59 下午
*/
@PostMapping("projectcountbygrid")
public Result<List<ProjectDistributionAnalysisRightDTO>> getProjectCountByGrid(@RequestBody ProjectDistributionAnalysisFormDTO formDTO){
return new Result<List<ProjectDistributionAnalysisRightDTO>>().ok(issueService.getProjectCountByGrid(formDTO));
}
}

37
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java

@ -225,4 +225,41 @@ public interface IssueDao extends BaseDao<IssueEntity> {
* @return java.util.List<com.epmet.dto.result.UnResolvedResultDTO>
*/
List<UnResolvedResultDTO> selectUnResolvedList(@Param("gridId") String gridId);
/**
* @Description 查询表决前50名
* @param orgId
* @param orgType
* @param status
* @author zxc
* @date 2021/12/8 4:08 下午
*/
List<ResiBuzzDTO> selectIssueLimit50(@Param("orgId")String orgId,@Param("orgType")String orgType,@Param("status")String status);
/**
* @Description 查询客户下1级分类的长度
* @param customerId
* @author zxc
* @date 2021/12/9 10:28 上午
*/
Integer selectOneLevelCategoryLength(@Param("customerId")String customerId);
/**
* @Description 查询居民热议左侧饼图
* @param orgId
* @param orgType
* @param length
* @author zxc
* @date 2021/12/9 10:57 上午
*/
List<ResiBuzzLeftPieChartResultDTO> resiBuzzLeftPieChart(@Param("orgId")String orgId,@Param("orgType")String orgType,@Param("length")Integer length,@Param("customerId")String customerId);
/**
* @Description 查询组织下每个网格的项目数
* @param orgId
* @author zxc
* @date 2021/12/9 2:59 下午
*/
List<ProjectDistributionAnalysisRightDTO> getProjectCountByGrid(@Param("orgId")String orgId,@Param("startDate")String startDate,@Param("endDate")String endDate);
}

27
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java

@ -350,4 +350,31 @@ public interface IssueService extends BaseService<IssueEntity> {
* @return java.util.List<com.epmet.dto.result.UnResolvedResultDTO>
*/
List<UnResolvedResultDTO> getUnResolvedList(ShiftProjectListFromDTO fromDTO);
/**
* @Description 居民热议列表
* @param formDTO
* @param tokenDto
* @author zxc
* @date 2021/12/8 3:50 下午
*/
ResiBuzzResultDTO resiBuzz(ResiBuzzFormDTO formDTO , TokenDto tokenDto);
/**
* @Description 居民热议左边饼图
* @param formDTO
* @param tokenDto
* @author zxc
* @date 2021/12/9 10:03 上午
*/
List<ResiBuzzLeftPieChartResultDTO> resiBuzzLeftPieChart(ResiBuzzLeftPieChartFormDTO formDTO,TokenDto tokenDto);
/**
* @Description 查询组织下每个网格的项目数
* @param formDTO
* @author zxc
* @date 2021/12/9 2:59 下午
*/
List<ProjectDistributionAnalysisRightDTO> getProjectCountByGrid(ProjectDistributionAnalysisFormDTO formDTO);
}

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

Loading…
Cancel
Save