Browse Source

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

master
wangxianzhang 3 years ago
parent
commit
b1f9dc7e4b
  1. 2
      epmet-admin/epmet-admin-server/pom.xml
  2. 2
      epmet-auth/pom.xml
  3. 36
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelUtils.java
  4. 32
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/excel/ExportMultiView.java
  5. 2
      epmet-gateway/pom.xml
  6. 5
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/form/CustomerDataManageFormDTO.java
  7. 1
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/CustomerDataManageResultDTO.java
  8. 5
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/evaluationindex/ScreenAgencyOrGridListDTO.java
  9. 64
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/evaluationindex/ScreenCustomerGridDTO.java
  10. 2
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/CategoryProjectResultDTO.java
  11. 2
      epmet-module/data-aggregator/data-aggregator-server/pom.xml
  12. 11
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/DataStatsController.java
  13. 26
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/evaluationindex/EvaluationIndexDao.java
  14. 18
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueDao.java
  15. 28
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/excel/CustomerDataManageExcel.java
  16. 171
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java
  17. 4
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/EvaluationIndexService.java
  18. 32
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java
  19. 7
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/GovIssueService.java
  20. 9
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java
  21. 27
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java
  22. 26
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml
  23. 17
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml
  24. 2
      epmet-module/data-report/data-report-server/pom.xml
  25. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java
  26. 2
      epmet-module/data-statistical/data-statistical-server/pom.xml
  27. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java
  28. 2
      epmet-module/epmet-activiti/epmet-activiti-server/pom.xml
  29. 2
      epmet-module/epmet-common-service/common-service-server/pom.xml
  30. 2
      epmet-module/epmet-demo/epmet-demo-server/pom.xml
  31. 2
      epmet-module/epmet-ext/epmet-ext-server/pom.xml
  32. 2
      epmet-module/epmet-heart/epmet-heart-server/pom.xml
  33. 2
      epmet-module/epmet-job/epmet-job-server/pom.xml
  34. 2
      epmet-module/epmet-message/epmet-message-server/pom.xml
  35. 2
      epmet-module/epmet-oss/epmet-oss-server/pom.xml
  36. 2
      epmet-module/epmet-point/epmet-point-server/pom.xml
  37. 2
      epmet-module/epmet-third/epmet-third-server/pom.xml
  38. 2
      epmet-module/gov-access/gov-access-server/pom.xml
  39. 2
      epmet-module/gov-grid/gov-grid-server/pom.xml
  40. 2
      epmet-module/gov-issue/gov-issue-server/pom.xml
  41. 2
      epmet-module/gov-mine/gov-mine-server/pom.xml
  42. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/ImportGeneralDTO.java
  43. 2
      epmet-module/gov-org/gov-org-server/pom.xml
  44. 3
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/HouseErrorInfoModel.java
  45. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/HouseInfoModel.java
  46. 19
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java
  47. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingUnitServiceImpl.java
  48. 13
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java
  49. 2
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml
  50. 2
      epmet-module/gov-project/gov-project-server/pom.xml
  51. 2
      epmet-module/gov-voice/gov-voice-server/pom.xml
  52. 2
      epmet-module/open-data-worker/open-data-worker-server/pom.xml
  53. 2
      epmet-module/oper-access/oper-access-server/pom.xml
  54. 2
      epmet-module/oper-crm/oper-crm-server/pom.xml
  55. 2
      epmet-module/oper-customize/oper-customize-server/pom.xml
  56. 2
      epmet-module/resi-group/resi-group-server/pom.xml
  57. 2
      epmet-module/resi-guide/resi-guide-server/pom.xml
  58. 2
      epmet-module/resi-hall/resi-hall-server/pom.xml
  59. 2
      epmet-module/resi-home/resi-home-server/pom.xml
  60. 2
      epmet-module/resi-mine/resi-mine-server/pom.xml
  61. 2
      epmet-module/resi-partymember/resi-partymember-server/pom.xml
  62. 2
      epmet-module/resi-voice/resi-voice-server/pom.xml
  63. 2
      epmet-openapi/epmet-openapi-scan/pom.xml
  64. 2
      epmet-user/epmet-user-server/pom.xml
  65. 10
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java
  66. 20
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java

2
epmet-admin/epmet-admin-server/pom.xml

@ -215,7 +215,7 @@
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-auth/pom.xml

@ -301,7 +301,7 @@
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

36
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelUtils.java

@ -10,6 +10,8 @@ package com.epmet.commons.tools.utils;
import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import com.epmet.commons.tools.utils.excel.ExportMultiView;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
@ -19,12 +21,8 @@ import org.springframework.util.CollectionUtils;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.*;
/**
* Excel工具类
@ -121,8 +119,11 @@ public class ExcelUtils {
out.flush();
out.close();
}
public static OutputStream getOutputStreamForExcel(String fileName, HttpServletResponse response) throws Exception {
public static ServletOutputStream getOutputStreamForExcel(String fileName, HttpServletResponse response) throws Exception {
fileName = URLEncoder.encode(fileName, "UTF-8");
if (!fileName.endsWith(".xls") ||!fileName.endsWith(".xlsx")){
fileName = fileName + ".xlsx";
}
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf8");
response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
@ -131,4 +132,27 @@ public class ExcelUtils {
return response.getOutputStream();
}
/**
* desc:easypoi导出多个sheet
* @param fileName
* @param list
* @param response
* @throws Exception
*/
public static void exportMultiSheetExcel(String fileName, List<ExportMultiView> list, HttpServletResponse response) throws Exception {
List<Map<String,Object>> excel = new ArrayList<>();
for(ExportMultiView view :list){
Map<String,Object> sheet = new HashMap<>();
sheet.put("title",view.getExportParams());
sheet.put("entity",view.getCls());
sheet.put("data", view.getDataList());
excel.add(sheet);
}
Workbook workbook = ExcelExportUtil.exportExcel(excel, ExcelType.XSSF);
ServletOutputStream outputStream = ExcelUtils.getOutputStreamForExcel(fileName, response);
workbook.write(outputStream);
outputStream.flush();
outputStream.close();
}
}

32
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/excel/ExportMultiView.java

@ -0,0 +1,32 @@
package com.epmet.commons.tools.utils.excel;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.util.List;
/**
* desc:easypoi 导出多个sheet
*
* @author: LiuJanJun
* @date: 2022/3/29 1:13 下午
* @version: 1.0
*/
@Data
@AllArgsConstructor
public class ExportMultiView {
/**
* 导出的参数 比如设置表头
*/
private ExportParams exportParams;
/**
* 要导出的数据列
*/
private List<?> dataList;
/**
* excel对应的类
*/
private Class<?> cls;
}

2
epmet-gateway/pom.xml

@ -391,7 +391,7 @@
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

5
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/form/CustomerDataManageFormDTO.java

@ -64,4 +64,9 @@ public class CustomerDataManageFormDTO implements Serializable {
private String sourceType;
//数据类型【组织agency 网格grid】
private String dataType;
/**
* desc:是否是导出
*/
private boolean export;
}

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

@ -14,6 +14,7 @@ import java.util.List;
public class CustomerDataManageResultDTO {
List<CustomerDataManage> list = new ArrayList<>();
List<CustomerDataManage> allGridList = new ArrayList<>();
private Integer total;
@Data

5
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/evaluationindex/ScreenAgencyOrGridListDTO.java

@ -3,6 +3,7 @@ package com.epmet.dataaggre.dto.evaluationindex;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
@ -16,6 +17,10 @@ public class ScreenAgencyOrGridListDTO implements Serializable {
private String level;
//直属下级组织或网格集合
private List<AgencyGrid> agencyGridList;
/**
* 所有下级网格列表
*/
private List<AgencyGrid> allGridList = new ArrayList<>();
@Data
public static class AgencyGrid {

64
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/evaluationindex/ScreenCustomerGridDTO.java

@ -20,7 +20,6 @@ package com.epmet.dataaggre.dto.evaluationindex;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
@ -54,66 +53,5 @@ public class ScreenCustomerGridDTO implements Serializable {
*/
private String gridName;
/**
* 网格所属组织id
*/
private String parentAgencyId;
/**
* 坐标区域
*/
private String areaMarks;
/**
* 中心点位
*/
private String centerMark;
/**
* 党支部=网格的位置
*/
private String partyMark;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增)
*/
private String dataEndTime;
/**
* 所有上级ID用英文逗号分开
*/
private String allParentIds;
private String pid;
private String pids;
}
}

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

@ -54,6 +54,8 @@ public class CategoryProjectResultDTO implements Serializable {
//二级分类code
@JsonIgnore
private String categoryCode;
private String topicId;
}
}

2
epmet-module/data-aggregator/data-aggregator-server/pom.xml

@ -494,7 +494,7 @@
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>

11
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/DataStatsController.java

@ -1,21 +1,20 @@
package com.epmet.dataaggre.controller;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dataaggre.dto.datastats.form.*;
import com.epmet.dataaggre.dto.datastats.result.*;
import com.epmet.dataaggre.excel.CustomerDataManageExcel;
import com.epmet.dataaggre.service.datastats.DataStatsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
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.text.ParseException;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* @Author sun
@ -228,6 +227,7 @@ public class DataStatsController {
@PostMapping("operateexport")
public void CustomerDataManage(@RequestBody CustomerDataManageFormDTO formDTO, HttpServletResponse response) throws Exception {
ValidatorUtils.validateEntity(formDTO, CustomerDataManageFormDTO.CustomerDataManageForm.class);
formDTO.setExport(true);
dataStatsService.CustomerDataManage(formDTO,response);
}
@ -239,6 +239,7 @@ public class DataStatsController {
@PostMapping("operatedata")
public Result<CustomerDataManageResultDTO> operatedata(@RequestBody CustomerDataManageFormDTO formDTO) throws ParseException {
ValidatorUtils.validateEntity(formDTO, CustomerDataManageFormDTO.CustomerDataManageForm.class);
formDTO.setExport(false);
return new Result<CustomerDataManageResultDTO>().ok(dataStatsService.operateExport(formDTO));
}

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

@ -32,7 +32,7 @@ import java.util.List;
/**
* @Author sun
* @Description 指标统计服务
* @Description 指标统计服务
*/
@Mapper
public interface EvaluationIndexDao {
@ -64,20 +64,22 @@ public interface EvaluationIndexDao {
/**
* 根据组织Id查询治理指数
* @author zhaoqifeng
* @date 2021/6/25 16:36
*
* @param agencyIds
* @param dateId
* @return java.util.List<com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO>
* @author zhaoqifeng
* @date 2021/6/25 16:36
*/
ScreenGovernRankDataDailyDTO getGovernRankList(@Param("agencyIds") List<String> agencyIds, @Param("dateId") String dateId);
/**
* 获取组织信息
* @author zhaoqifeng
* @date 2021/6/29 13:58
*
* @param agencyId
* @return com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO
* @author zhaoqifeng
* @date 2021/6/29 13:58
*/
ScreenCustomerAgencyDTO getAgencyInfo(@Param("agencyId") String agencyId);
@ -100,12 +102,12 @@ public interface EvaluationIndexDao {
List<ScreenCustomerAgencyDTO> getSubAgencyListByAgency(@Param("agencyId") String agencyId, @Param("areaCode") String areaCode, @Param("list") List<String> list);
/**
* @Description 根据组织ID查询组织名
* @Description 根据组织ID查询组织名
* @Param agencyId
* @author zxc
* @date 2021/9/10 3:54 下午
*/
String selectAgencyNameByAgencyId(@Param("agencyId")String agencyId);
String selectAgencyNameByAgencyId(@Param("agencyId") String agencyId);
/**
* @Description 按dateId查询组织下一级分类项目总数统计
@ -118,4 +120,12 @@ public interface EvaluationIndexDao {
* @author sun
*/
List<GridDateIdResultDTO> getGridProejctToProjectMain(GridLivelyFormDTO formDTO);
}
/**
* desc:根据组织全路径 获取所有网格
*
* @param fullAgencyPath
* @return
*/
List<ScreenCustomerGridDTO> getSubAllGridByAgencyPath(@Param("fullAgencyPath") String fullAgencyPath);
}

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

@ -39,15 +39,15 @@ import java.util.List;
public interface IssueDao extends BaseDao<IssueEntity> {
/**
* @Description 查询议题表决中已关闭
* @Description 查询议题表决中已关闭
* @Param gridIds
* @author zxc
* @date 2020/12/25 下午2:19
*/
List<IssueListResultDTO> issueStatusClosedOrVoting(@Param("gridIds") List<String> gridIds, @Param("issueStatus")String issueStatus);
List<IssueListResultDTO> issueStatusClosedOrVoting(@Param("gridIds") List<String> gridIds, @Param("issueStatus") String issueStatus);
/**
* @Description 查询已转项目议题
* @Description 查询已转项目议题
* @Param gridIds
* @author zxc
* @date 2020/12/25 下午5:27
@ -72,7 +72,7 @@ public interface IssueDao extends BaseDao<IssueEntity> {
**/
List<ClosedIssueListResultDTO> selectClosedListGov(ClosedIssueListFormDTO fromDTO);
Integer selectIssueCount(@Param("gridIds") List<String> gridIds,@Param("issueType")String issueType);
Integer selectIssueCount(@Param("gridIds") List<String> gridIds, @Param("issueType") String issueType);
List<IssueInfoDTO> selectShiftProjectIssueList(@Param("customerId") String customerId, @Param("gridId") String gridId);
@ -81,4 +81,12 @@ public interface IssueDao extends BaseDao<IssueEntity> {
* @author sun
**/
List<IssueProjectCategoryDictDTO> getCategoryList(@Param("customerId") String customerId, @Param("level") String level, @Param("isDisable") String isDisable);
}
/**
* desc:根据议题id获取对应的话题id
*
* @param ids
* @return
*/
List<IssueInfoDTO> selectIssueTopicIdType(@Param("ids") List<String> ids);
}

28
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/excel/CustomerDataManageExcel.java

@ -5,49 +5,49 @@ import lombok.Data;
/**
* @Author zxc
* @DateTime 2021/9/10 10:15 上午
* @DateTime 2021/9/10 10:10 上午
* @DESC
*/
@Data
public class CustomerDataManageExcel {
@Excel(name = "组织")
@Excel(name = "组织",width = 25)
private String orgName;
@Excel(name = "用户数")
@Excel(name = "用户数",width = 10)
private Integer userCount;
@Excel(name = "居民数")
@Excel(name = "居民数",width = 10)
private Integer residentCount;
@Excel(name = "党员数")
@Excel(name = "党员数",width = 10)
private Integer partyMemberCount;
@Excel(name = "小组数")
@Excel(name = "小组数",width = 10)
private Integer groupCount;
@Excel(name = "话题数")
@Excel(name = "话题数",width = 10)
private Integer topicCount;
@Excel(name = "议题数")
@Excel(name = "议题数",width = 10)
private Integer issueCount;
@Excel(name = "项目数")
@Excel(name = "项目数",width = 10)
private Integer projectCount;
@Excel(name = "结案项目数")
@Excel(name = "结案项目数",width = 12)
private Integer closedProjectCount;
@Excel(name = "巡查人数")
@Excel(name = "巡查人数",width = 10)
private Integer patrolPeopleCount;
@Excel(name = "巡查次数")
@Excel(name = "巡查次数",width = 10)
private Integer patrolCount;
@Excel(name = "巡查时长")
@Excel(name = "巡查时长",width = 15)
private String patrolDuration;
@Excel(name = "例行工作次数")
@Excel(name = "例行工作次数",width = 15)
private Integer patrolRoutineWorkTimes;
/**

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

@ -1,61 +1,63 @@
package com.epmet.dataaggre.service.datastats.impl;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.enums.OrgLevelEnum;
import com.epmet.commons.tools.enums.OrgTypeEnum;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.constant.OrgConstant;
import com.epmet.dataaggre.dao.datastats.DataStatsDao;
import com.epmet.dataaggre.dao.datastats.FactGridMemberStatisticsDailyDao;
import com.epmet.dataaggre.dto.datastats.FactGroupActDailyDTO;
import com.epmet.dataaggre.dto.datastats.form.*;
import com.epmet.dataaggre.dto.datastats.result.*;
import com.epmet.dataaggre.dto.epmetuser.FactIcuserCategoryAnalysisDailyDTO;
import com.epmet.dataaggre.dto.epmetuser.form.GridMemberPatrolListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.GridMemberPatrolListResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.PatrolDailySumResult;
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.govorg.form.GridLivelyFormDTO;
import com.epmet.dataaggre.dto.govorg.result.GridDateIdResultDTO;
import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectTotalFormDTO;
import com.epmet.dataaggre.dto.resigroup.ActCategoryDictDTO;
import com.epmet.dataaggre.dto.resigroup.result.GroupActRankDetailDTO;
import com.epmet.dataaggre.entity.datastats.DimAgencyEntity;
import com.epmet.dataaggre.entity.datastats.FactAgencyGovernDailyEntity;
import com.epmet.dataaggre.excel.CustomerDataManageExcel;
import com.epmet.dataaggre.service.datastats.DataStatsService;
import com.epmet.dataaggre.service.epmetuser.StatsStaffPatrolRecordDailyService;
import com.epmet.dataaggre.service.evaluationindex.EvaluationIndexService;
import com.epmet.dataaggre.service.govorg.GovOrgService;
import com.epmet.dataaggre.service.opercrm.CustomerRelation;
import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.NumberFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.enums.OrgLevelEnum;
import com.epmet.commons.tools.enums.OrgTypeEnum;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.excel.ExportMultiView;
import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.constant.OrgConstant;
import com.epmet.dataaggre.dao.datastats.DataStatsDao;
import com.epmet.dataaggre.dao.datastats.FactGridMemberStatisticsDailyDao;
import com.epmet.dataaggre.dto.datastats.FactGroupActDailyDTO;
import com.epmet.dataaggre.dto.datastats.form.*;
import com.epmet.dataaggre.dto.datastats.result.*;
import com.epmet.dataaggre.dto.epmetuser.FactIcuserCategoryAnalysisDailyDTO;
import com.epmet.dataaggre.dto.epmetuser.form.GridMemberPatrolListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.GridMemberPatrolListResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.PatrolDailySumResult;
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.govorg.form.GridLivelyFormDTO;
import com.epmet.dataaggre.dto.govorg.result.GridDateIdResultDTO;
import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectTotalFormDTO;
import com.epmet.dataaggre.dto.resigroup.ActCategoryDictDTO;
import com.epmet.dataaggre.dto.resigroup.result.GroupActRankDetailDTO;
import com.epmet.dataaggre.entity.datastats.DimAgencyEntity;
import com.epmet.dataaggre.entity.datastats.FactAgencyGovernDailyEntity;
import com.epmet.dataaggre.excel.CustomerDataManageExcel;
import com.epmet.dataaggre.service.datastats.DataStatsService;
import com.epmet.dataaggre.service.epmetuser.StatsStaffPatrolRecordDailyService;
import com.epmet.dataaggre.service.evaluationindex.EvaluationIndexService;
import com.epmet.dataaggre.service.govorg.GovOrgService;
import com.epmet.dataaggre.service.opercrm.CustomerRelation;
import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.NumberFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
/**
* @Author sun
@ -1878,7 +1880,28 @@ public class DataStatsServiceImpl implements DataStatsService, ResultDataResolve
@Override
public void CustomerDataManage(CustomerDataManageFormDTO formDTO, HttpServletResponse response) throws Exception {
String openTime = formDTO.getStartTime();
List<CustomerDataManageResultDTO.CustomerDataManage> result = operateExport(formDTO).getList();
CustomerDataManageResultDTO operateExport = operateExport(formDTO);
List<CustomerDataManageResultDTO.CustomerDataManage> result = operateExport.getList();
setTotal(result);
formDTO.setStartTime(openTime);
String fileName = excelName(formDTO);
ExportParams exportParams = new ExportParams(fileName,fileName);
List<ExportMultiView> exportList = new ArrayList<>();
List<CustomerDataManageExcel> excelList = ConvertUtils.sourceToTarget(result, CustomerDataManageExcel.class);
exportList.add(new ExportMultiView(exportParams,excelList,CustomerDataManageExcel.class));
if (CollectionUtils.isNotEmpty(operateExport.getAllGridList())){
List<CustomerDataManageResultDTO.CustomerDataManage> gridResult = operateExport.getAllGridList();
setTotal(gridResult);
ExportParams exportParams2 = new ExportParams(fileName,"网格数据");
List<CustomerDataManageExcel> excelList2 = ConvertUtils.sourceToTarget(gridResult, CustomerDataManageExcel.class);
exportList.add(new ExportMultiView(exportParams2,excelList2,CustomerDataManageExcel.class));
}
ExcelUtils.exportMultiSheetExcel(fileName, exportList, response);
}
public void setTotal(List<CustomerDataManageResultDTO.CustomerDataManage> result) {
if (!CollectionUtils.isEmpty(result)){
CustomerDataManageResultDTO.CustomerDataManage c = new CustomerDataManageResultDTO.CustomerDataManage();
c.setOrgName("合计");
@ -1897,9 +1920,6 @@ public class DataStatsServiceImpl implements DataStatsService, ResultDataResolve
c.setPatrolDuration(getHm(c.getPatrolDurationInteger()));
result.add(c);
}
formDTO.setStartTime(openTime);
String fileName = excelName(formDTO);
ExcelUtils.exportExcelToTargetDisposeAll(response,fileName,result, CustomerDataManageExcel.class);
}
/**
@ -1958,8 +1978,7 @@ public class DataStatsServiceImpl implements DataStatsService, ResultDataResolve
*/
@Override
public CustomerDataManageResultDTO operateExport(CustomerDataManageFormDTO formDTO) throws ParseException {
CustomerDataManageResultDTO resultDTO = new CustomerDataManageResultDTO();
List<CustomerDataManageResultDTO.CustomerDataManage> dataManageList = new ArrayList<>();
//1.必要参数校验及处理
String startTimeForm = formDTO.getStartTime();
if ("Interval".equals(formDTO.getType()) && StringUtils.isEmpty(startTimeForm)) {
@ -1974,7 +1993,7 @@ public class DataStatsServiceImpl implements DataStatsService, ResultDataResolve
}
//2.查询组织信息,判断查询下级组织还是网格数据
ScreenAgencyOrGridListDTO agencyGrid = indexService.getSubAgencyOrGridList(formDTO.getAgencyId());
ScreenAgencyOrGridListDTO agencyGrid = indexService.getSubAgencyOrGridList(formDTO.getAgencyId(), formDTO.isExport());
if (null == agencyGrid) {
return new CustomerDataManageResultDTO();
}
@ -1982,7 +2001,23 @@ public class DataStatsServiceImpl implements DataStatsService, ResultDataResolve
List<String> idList = agencyGrid.getAgencyGridList().stream().map(ScreenAgencyOrGridListDTO.AgencyGrid::getOrgId).collect(Collectors.toList());
formDTO.setDataType(!OrgLevelEnum.COMMUNITY.getCode().equals(agencyGrid.getLevel()) ? OrgTypeEnum.AGENCY.getCode() : OrgTypeEnum.GRID.getCode());
formDTO.setIdList(idList);
//获取组织级别数据
CustomerDataManageResultDTO resultDTO = getDataManageResultDTO(formDTO, startTimeForm, agencyGrid.getAgencyGridList(),agencyGrid.getLevel());
resultDTO.setTotal(idList.size());
//网格List不为空则 查询网格数据 (仅限查询组织id为街道级别时)
if (CollectionUtils.isNotEmpty(agencyGrid.getAllGridList())){
formDTO.setDataType(OrgTypeEnum.GRID.getCode());
idList = agencyGrid.getAllGridList().stream().map(ScreenAgencyOrGridListDTO.AgencyGrid::getOrgId).collect(Collectors.toList());
formDTO.setIdList(idList);
CustomerDataManageResultDTO allGridData = getDataManageResultDTO(formDTO, startTimeForm, agencyGrid.getAllGridList(),agencyGrid.getLevel());
resultDTO.setAllGridList(allGridData.getList());
}
return resultDTO;
}
public CustomerDataManageResultDTO getDataManageResultDTO(CustomerDataManageFormDTO formDTO, String startTimeForm, List<ScreenAgencyOrGridListDTO.AgencyGrid> agencyGridList,String orgLevel) {
CustomerDataManageResultDTO resultDTO = new CustomerDataManageResultDTO();
List<CustomerDataManageResultDTO.CustomerDataManage> dataManageList = new ArrayList<>();
//3.查询截止日期用户、群组、话题、议题、项目、巡查数据
formDTO.setSourceType("end");
@ -2029,7 +2064,7 @@ public class DataStatsServiceImpl implements DataStatsService, ResultDataResolve
}
//5.封装数据
for (ScreenAgencyOrGridListDTO.AgencyGrid org : agencyGrid.getAgencyGridList()) {
for (ScreenAgencyOrGridListDTO.AgencyGrid org : agencyGridList) {
CustomerDataManageResultDTO.CustomerDataManage dto = new CustomerDataManageResultDTO.CustomerDataManage();
dto.setOrgId(org.getOrgId());
dto.setOrgName(org.getOrgName());
@ -2083,12 +2118,12 @@ public class DataStatsServiceImpl implements DataStatsService, ResultDataResolve
int patrolDurationInteger = NumConstant.ZERO;
HashSet set = new HashSet();
for (CustomerDataManageResultDTO.CustomerDataManage u : patrolEnd) {
if (OrgLevelEnum.COMMUNITY.getCode().equals(agencyGrid.getLevel()) && org.getOrgId().equals(u.getOrgId())) {
if (OrgLevelEnum.COMMUNITY.getCode().equals(orgLevel) && org.getOrgId().equals(u.getOrgId())) {
patroCount += u.getPatrolCount();
patrolDurationInteger += u.getPatrolDurationInteger();
set.add(u.getStaffId());
}
if (!OrgLevelEnum.COMMUNITY.getCode().equals(agencyGrid.getLevel()) && u.getOrgId().contains(org.getOrgId())) {
if (!OrgLevelEnum.COMMUNITY.getCode().equals(orgLevel) && u.getOrgId().contains(org.getOrgId())) {
patroCount += u.getPatrolCount();
patrolDurationInteger += u.getPatrolDurationInteger();
set.add(u.getStaffId());
@ -2099,10 +2134,10 @@ public class DataStatsServiceImpl implements DataStatsService, ResultDataResolve
int patrolRoutineWorkTimes = NumConstant.ZERO;
if (CollectionUtils.isNotEmpty(workCountList) && workCountList.get(NumConstant.ZERO) != null) {
for (CustomerDataManageResultDTO.CustomerDataManage work : workCountList) {
if (OrgLevelEnum.COMMUNITY.getCode().equals(agencyGrid.getLevel()) && org.getOrgId().equals(work.getOrgId())) {
if (OrgLevelEnum.COMMUNITY.getCode().equals(orgLevel) && org.getOrgId().equals(work.getOrgId())) {
patrolRoutineWorkTimes += work.getPatrolRoutineWorkTimes();
set.add(work.getStaffId());
} else if (!OrgLevelEnum.COMMUNITY.getCode().equals(agencyGrid.getLevel()) && work.getOrgId().contains(org.getOrgId())) {
} else if (!OrgLevelEnum.COMMUNITY.getCode().equals(orgLevel) && work.getOrgId().contains(org.getOrgId())) {
patrolRoutineWorkTimes += work.getPatrolRoutineWorkTimes();
set.add(work.getStaffId());
}

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

@ -44,6 +44,8 @@ public interface EvaluationIndexService {
*/
List<ScreenCustomerGridDTO> getSubGridList(String agencyId);
List<ScreenCustomerGridDTO> getSubAllGridByAgencyPath(String fullAgencyPath);
/**
* 根据组织ID获取治理指数
* @author zhaoqifeng
@ -88,7 +90,7 @@ public interface EvaluationIndexService {
* @Description 根据组织Id判断查询直属下级组织/网格列表组织存在子客户的查询包含子客户组织数据
* @author sun
*/
ScreenAgencyOrGridListDTO getSubAgencyOrGridList(String agencyId);
ScreenAgencyOrGridListDTO getSubAgencyOrGridList(String agencyId, Boolean isGetSubAllGrid);
/**
* @Description 按dateId查询组织下一级分类项目总数统计

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

@ -1,8 +1,8 @@
package com.epmet.dataaggre.service.evaluationindex.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.enums.OrgLevelEnum;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.evaluationindex.EvaluationIndexDao;
import com.epmet.dataaggre.dto.datastats.form.GovrnRatioFormDTO;
@ -75,6 +75,15 @@ public class EvaluationIndexServiceImpl implements EvaluationIndexService {
return evaluationIndexDao.getSubGridList(agencyId);
}
/**
* @Description 查询所有下级网格
* @author sun
*/
@Override
public List<ScreenCustomerGridDTO> getSubAllGridByAgencyPath(String fullAgencyPath) {
return evaluationIndexDao.getSubAllGridByAgencyPath(fullAgencyPath);
}
/**
* 根据组织ID获取治理指数
*
@ -165,7 +174,7 @@ public class EvaluationIndexServiceImpl implements EvaluationIndexService {
* @author sun
*/
@Override
public ScreenAgencyOrGridListDTO getSubAgencyOrGridList(String agencyId) {
public ScreenAgencyOrGridListDTO getSubAgencyOrGridList(String agencyId, Boolean isGetSubAllGrid) {
ScreenAgencyOrGridListDTO resultDTO = new ScreenAgencyOrGridListDTO();
List<ScreenAgencyOrGridListDTO.AgencyGrid> agencyGridList = new ArrayList<>();
//1.查询组织信息
@ -177,12 +186,23 @@ public class EvaluationIndexServiceImpl implements EvaluationIndexService {
//2.根据组织级别判断查询直属组织或网格列表
List<ScreenCustomerAgencyDTO> agencyList = new ArrayList<>();
List<ScreenCustomerGridDTO> gridList = new ArrayList<>();
List<ScreenAgencyOrGridListDTO.AgencyGrid> finalAgencyGridList = agencyGridList;
//孔村和组织级别为街道的查询下级所有网格
if (isGetSubAllGrid && (OrgLevelEnum.STREET.getCode().equals(dto.getLevel()) || "1234085031077498881".equals(agencyId))){
gridList = evaluationIndexDao.getSubAllGridByAgencyPath(dto.getAgencyId());
List<ScreenAgencyOrGridListDTO.AgencyGrid> allGridList = new ArrayList<>();
gridList.forEach(gr->{
ScreenAgencyOrGridListDTO.AgencyGrid org = new ScreenAgencyOrGridListDTO.AgencyGrid();
org.setOrgId(gr.getGridId());
org.setOrgName(gr.getGridName());
allGridList.add(org);
});
resultDTO.setAllGridList(allGridList);
}
if (!"community".equals(dto.getLevel())) {
//2-1.直属下级组织列表
//2.判断客户是否存在子客户
List<String> list = customerRelation.haveSubCustomer(dto.getCustomerId());
if (!CollectionUtils.isNotEmpty(list)) {
if (CollectionUtils.isEmpty(list)) {
agencyList = evaluationIndexDao.getSubAgencyListByAgency(agencyId, null, null);
} else {
list.add(dto.getCustomerId());
@ -192,7 +212,7 @@ public class EvaluationIndexServiceImpl implements EvaluationIndexService {
ScreenAgencyOrGridListDTO.AgencyGrid org = new ScreenAgencyOrGridListDTO.AgencyGrid();
org.setOrgId(gr.getAgencyId());
org.setOrgName(gr.getAgencyName());
finalAgencyGridList.add(org);
agencyGridList.add(org);
});
} else {
//2-2.直属下级网格列表
@ -201,7 +221,7 @@ public class EvaluationIndexServiceImpl implements EvaluationIndexService {
ScreenAgencyOrGridListDTO.AgencyGrid org = new ScreenAgencyOrGridListDTO.AgencyGrid();
org.setOrgId(gr.getGridId());
org.setOrgName(gr.getGridName());
finalAgencyGridList.add(org);
agencyGridList.add(org);
});
}

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

@ -52,4 +52,11 @@ public interface GovIssueService {
* @author sun
**/
List<IssueProjectCategoryDictDTO> categoryList(String customerId, String level, String isDisable);
/**
* desc:根据id 获取议题的话题的话题Id
* @param collect
* @return
*/
List<IssueInfoDTO> selectIssueTopicIdType(List<String> collect);
}

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

@ -333,4 +333,13 @@ public class GovIssueServiceImpl implements GovIssueService {
return issueDao.getCategoryList(customerId, level, isDisable);
}
@Override
public List<IssueInfoDTO> selectIssueTopicIdType(List<String> ids) {
List<IssueInfoDTO> dtoList = issueDao.selectIssueTopicIdType(ids);
if (CollectionUtils.isEmpty(dtoList)){
return new ArrayList<>();
}
return dtoList;
}
}

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

@ -13,6 +13,7 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
@ -23,7 +24,6 @@ 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.ProjectRelatedPersonnelDTO;
import com.epmet.dataaggre.dto.govproject.ResiEventDTO;
@ -80,6 +80,8 @@ public class GovProjectServiceImpl implements GovProjectService {
private EvaluationIndexService evaluationIndexService;
@Autowired
private EpmetUserService epmetUserService;
@Autowired
private LoginUserUtil loginUserUtil;
/**
* @Description 查询项目信息
@ -415,13 +417,13 @@ public class GovProjectServiceImpl implements GovProjectService {
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());
List<String> categoreCodeList = categoryList.stream().filter(ca -> ca.getParentCategoryCode().equals(formDTO.getCategoryCode())).map(IssueProjectCategoryDictDTO::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())) {
if (CollectionUtils.isEmpty(result.getList())) {
return resultDTO;
}
resultDTO.setTotal((int) result.getTotal());
@ -431,7 +433,7 @@ public class GovProjectServiceImpl implements GovProjectService {
List<CategoryProjectResultDTO.Project> list = projectDao.getCategoryList(projectIds);
//4.查询来源事件的项目上报的组织信息
List<String> eventIds = result.getList().stream().filter(re -> "resi_event".equals(re.getOrigin())).map(m -> m.getOriginId()).collect(Collectors.toList());
List<String> eventIds = result.getList().stream().filter(re -> "resi_event".equals(re.getOrigin())).map(CategoryProjectResultDTO.Project::getOriginId).collect(Collectors.toList());
List<ResiEventReportOrgDTO> eventOrgList = projectDao.getEventOrgList(eventIds);
Map<String, ResiEventReportOrgDTO> eventMap = eventOrgList.stream().collect(Collectors.toMap(ResiEventReportOrgDTO::getResiEventId, Function.identity()));
@ -439,11 +441,19 @@ public class GovProjectServiceImpl implements GovProjectService {
List<ResiEventDTO> eventUser = projectDao.getEventList(projectIds);
List<ProjectRelatedPersonnelDTO> topicUser = projectDao.getTopicUser(projectIds);
//市北客户查询 下议题区分下来源 设置topicId
Map<String, String> issueTopicSourceMap = new HashMap<>();
if (CustomerIdConstant.SHI_BEI_CUSTOMER_ID.equals(loginUserUtil.getLoginUserCustomerId())){
issueTopicSourceMap = govIssueService.selectIssueTopicIdType(result.getList().stream()
.filter(re -> "issue".equals(re.getOrigin()))
.map(CategoryProjectResultDTO.Project::getOriginId)
.collect(Collectors.toList())).stream().collect(Collectors.toMap(IssueInfoDTO::getIssueId,IssueInfoDTO::getTopicId));
}
//5.封装数据
//组织或网格id->组织或网格名称
Map<String, String> map = new HashMap<>();
result.getList().forEach(re -> {
//所属组织
for (CategoryProjectResultDTO.Project re : result.getList()) {//所属组织
if ("issue".equals(re.getOrigin())) {
if (map.containsKey(re.getGridId())) {
re.setOrgName(map.get(re.getGridId()));
@ -454,6 +464,9 @@ public class GovProjectServiceImpl implements GovProjectService {
map.put(re.getGridId(), gridInfo.getGridName());
}
}
//市北议题来源的设置话题Id
re.setTopicId(issueTopicSourceMap.get(re.getOriginId()));
} else if ("agency".equals(re.getOrigin())) {
if (map.containsKey(re.getAgencyId())) {
re.setOrgName(map.get(re.getAgencyId()));
@ -518,7 +531,7 @@ public class GovProjectServiceImpl implements GovProjectService {
re.setUserId(to.getUserId());
}
});
});
}
resultDTO.setList(result.getList());
return resultDTO;

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

@ -118,7 +118,8 @@
agency_name AS agencyName,
level AS level,
area_code AS areaCode,
parent_area_code AS parentAreaCode
parent_area_code AS parentAreaCode,
pids pids
FROM
screen_customer_agency
WHERE
@ -164,6 +165,11 @@
<when test="areaCode != null and areaCode.trim() != ''">
AND parent_area_code = #{areaCode}
</when>
<!--要孔村的党支部有啥用 还要导出排掉-->
<when test="agencyId == '1234085031077498881'">
AND PIDS like concat(#{agencyId},'%')
AND LEVEL = 'community'
</when>
<otherwise>
AND pid = #{agencyId}
</otherwise>
@ -211,5 +217,23 @@
AND all_parent_ids LIKE CONCAT('%', #{agencyId}, '%')
GROUP BY org_id, DATE_FORMAT(project_create_time, "%Y%m%d")
</select>
<select id="getSubAllGridByAgencyPath" resultType="com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO">
SELECT
customer_id AS customerId,
grid_id AS gridId,
grid_name AS gridName,
parent_agency_id AS parentAgencyId,
area_marks AS areaMarks,
center_mark AS centerMark,
party_mark AS partyMark,
data_end_time AS dataEndTime,
all_parent_ids AS allParentIds
FROM
screen_customer_grid
WHERE
del_flag = '0'
AND all_parent_ids LIKE concat('%',#{fullAgencyPath},'%')
order by parentAgencyId,gridName
</select>
</mapper>

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

@ -139,5 +139,20 @@
</if>
ORDER BY category_code
</select>
<select id="selectIssueTopicIdType" resultType="com.epmet.dataaggre.dto.govissue.result.IssueInfoDTO">
SELECT
i.ID as issueId,
i.GRID_ID as gridId,
i.SOURCE_ID as topicId
FROM
issue i
WHERE
i.id IN
<foreach collection="ids" separator="," item="item" close=")" open="(" >
#{item}
</foreach>
and i.DEL_FLAG = '0'
and i.SOURCE_TYPE='resi_topic'
</select>
</mapper>
</mapper>

2
epmet-module/data-report/data-report-server/pom.xml

@ -291,7 +291,7 @@
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>

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

@ -561,6 +561,8 @@ public class AgencyServiceImpl implements AgencyService {
return nodes.get(0);
}
private void convertOrgTreeNode(List<OrgTreeNode> nodeList, ScreenCustomerAgencyDTO currentAgency) {
OrgTreeNode orgTreeNode = ConvertUtils.sourceToTarget(currentAgency, OrgTreeNode.class);
orgTreeNode.setOrgId(currentAgency.getAgencyId());

2
epmet-module/data-statistical/data-statistical-server/pom.xml

@ -550,7 +550,7 @@
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java

@ -137,11 +137,14 @@ public class DataReportingServiceImpl implements DataReportingService {
public List<EventInfoResultDTO> getEventInfo(EventInfoFormDTO formDTO) {
List<EventInfoResultDTO> list;
//根据入参,获取项目
long start = System.currentTimeMillis();
List<ScreenProjectDataDTO> projectList = screenProjectDataService.getProjectList(formDTO.getCustomerId(), formDTO.getProjectId(), formDTO.getPageNo(), formDTO.getPageSize());
log.info("事件上报-查询项目列表耗时:{}ms",System.currentTimeMillis()-start);
//项目列表为空,返回空数组
if(CollectionUtils.isEmpty(projectList)) {
return Collections.emptyList();
}
start = System.currentTimeMillis();
Map<String, CustomerProjectCategoryDictEntity> epmetCodeMap = new HashMap<>();
Result<String> parentCustomer = operCrmOpenFeignClient.getExternalAndParentCustomerId(formDTO.getCustomerId());
if (StringUtils.isNotBlank(parentCustomer.getData())) {
@ -194,6 +197,7 @@ public class DataReportingServiceImpl implements DataReportingService {
return dto;
}).collect(Collectors.toList());
}
log.info("事件上报-组装数据耗时:{}ms",System.currentTimeMillis()-start);
return list.stream().collect(collectingAndThen(toCollection(() -> new TreeSet<>(Comparator.comparing(EventInfoResultDTO::getId))), ArrayList::new));
}

2
epmet-module/epmet-activiti/epmet-activiti-server/pom.xml

@ -253,7 +253,7 @@
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/epmet-common-service/common-service-server/pom.xml

@ -224,7 +224,7 @@
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/epmet-demo/epmet-demo-server/pom.xml

@ -172,7 +172,7 @@
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/epmet-ext/epmet-ext-server/pom.xml

@ -304,7 +304,7 @@
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/epmet-heart/epmet-heart-server/pom.xml

@ -268,7 +268,7 @@
<datasource.druid.password>elink@833066</datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/epmet-job/epmet-job-server/pom.xml

@ -222,7 +222,7 @@
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/epmet-message/epmet-message-server/pom.xml

@ -279,7 +279,7 @@
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/epmet-oss/epmet-oss-server/pom.xml

@ -229,7 +229,7 @@
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/epmet-point/epmet-point-server/pom.xml

@ -245,7 +245,7 @@
<datasource.druid.password>elink@833066</datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/epmet-third/epmet-third-server/pom.xml

@ -317,7 +317,7 @@
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/gov-access/gov-access-server/pom.xml

@ -209,7 +209,7 @@
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/gov-grid/gov-grid-server/pom.xml

@ -191,7 +191,7 @@
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/gov-issue/gov-issue-server/pom.xml

@ -259,7 +259,7 @@
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/gov-mine/gov-mine-server/pom.xml

@ -209,7 +209,7 @@
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/ImportGeneralDTO.java

@ -68,7 +68,7 @@ public class ImportGeneralDTO implements Serializable {
/**
* 单元号ID
*/
private Integer buildingUnit;
private String buildingUnit;
private String buildingUnitId;
/**

2
epmet-module/gov-org/gov-org-server/pom.xml

@ -303,7 +303,7 @@
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

3
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/HouseErrorInfoModel.java

@ -13,6 +13,9 @@ import org.hibernate.validator.constraints.Length;
@Data
public class HouseErrorInfoModel {
@Excel(name = "行号(不计算表头)", width = 20)
private Integer num;
@Excel(name = "所属小区", width = 20)
private String neighborHoodName;

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/HouseInfoModel.java

@ -1,5 +1,6 @@
package com.epmet.model;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
@ -26,7 +27,7 @@ public class HouseInfoModel {
private String buildingName;
@ExcelProperty(value = "单元号")
private Integer buildingUnit;
private String buildingUnit;
@ExcelProperty(value = "门牌号")
private String doorName;
@ -49,4 +50,7 @@ public class HouseInfoModel {
@ExcelProperty(value = "房主身份证")
private String ownerIdCard;
@ExcelIgnore
private Integer num;
}

19
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java

@ -67,7 +67,7 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode
/**
* 本次导入涉及到的楼宇id 用于更新住户数
*/
private Set<String> buildingIdSet = new ConcurrentHashSet<>();
// private Set<String> buildingIdSet = new ConcurrentHashSet<>();
private ImportInfoFormDTO formDTO;
private IcBuildingDao icBuildingDao;
@ -96,6 +96,7 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode
ImportGeneralDTO dto = ConvertUtils.sourceToTarget(data, ImportGeneralDTO.class);
dto.setNum(num);
dto.setCustomerId(formDTO.getCustomerId());
info.setNum(num);
if(StringUtils.isBlank(data.getAgencyName())){
nums.add(num);
disposeErrorMsg(info, "所属组织的值未填写");
@ -136,9 +137,13 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode
disposeErrorMsg(info, "门牌号的值未填写");
return;
}
if(null == data.getBuildingUnit()){
/**
* 2022-03-29 需求改动单元号修改 eg 1 改为 1单元
* 做限制此字段中必须带有 "单元"2字不存在就不给导入
*/
if(StringUtils.isBlank(data.getBuildingUnit()) || !data.getBuildingUnit().contains("单元")){
nums.add(num);
disposeErrorMsg(info, "单元号的值未填写");
disposeErrorMsg(info, "单元号的值未填写或者格式不正确");
return;
}
// 应产品要求
@ -535,13 +540,13 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode
public void doAfterAllAnalysed(AnalysisContext context) {
finalDispose();
// 更新ic_building户数
if (!CollectionUtils.isEmpty(buildingIdSet)){
/*if (!CollectionUtils.isEmpty(buildingIdSet)){
List<UpdateBuildingHouseNumResultDTO> houseNum = icBuildingDao.selectHouseNum(buildingIdSet);
if (!CollectionUtils.isEmpty(houseNum)){
icBuildingDao.allUpdateHouseNum(houseNum);
}
buildingIdSet = null;
}
}*/
// 删除缓存
icHouseRedis.delTemporaryCacheGrids(formDTO.getCustomerId(), formDTO.getUserId());
icHouseRedis.delTemporaryCacheNeighBorHood(formDTO.getCustomerId(), formDTO.getUserId());
@ -582,7 +587,7 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode
public void houseInsert(List<ImportGeneralDTO> houses){
if (!CollectionUtils.isEmpty(houses)){
icHouseService.insertBatch(ConvertUtils.sourceToTarget(houses, IcHouseEntity.class));
buildingIdSet.addAll(houses.stream().map(ImportGeneralDTO::getBuildingId).collect(Collectors.toSet()));
// buildingIdSet.addAll(houses.stream().map(ImportGeneralDTO::getBuildingId).collect(Collectors.toSet()));
}
}
@ -590,7 +595,7 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode
public void houseUpdate(List<ImportGeneralDTO> houses){
if (!CollectionUtils.isEmpty(houses)){
icHouseService.houseUpdate(houses);
buildingIdSet.addAll(houses.stream().map(ImportGeneralDTO::getBuildingId).collect(Collectors.toSet()));
// buildingIdSet.addAll(houses.stream().map(ImportGeneralDTO::getBuildingId).collect(Collectors.toSet()));
}
}

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingUnitServiceImpl.java

@ -148,7 +148,7 @@ public class IcBuildingUnitServiceImpl extends BaseServiceImpl<IcBuildingUnitDao
public IcBuildingUnitDTO getUnitInfo(String buildingId, String unitName) {
LambdaQueryWrapper<IcBuildingUnitEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(IcBuildingUnitEntity::getBuildingId, buildingId);
wrapper.eq(IcBuildingUnitEntity::getUnitNum, unitName);
wrapper.eq(IcBuildingUnitEntity::getUnitName, unitName);
IcBuildingUnitEntity entity = baseDao.selectOne(wrapper);
return ConvertUtils.sourceToTarget(entity, IcBuildingUnitDTO.class);
}

13
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java

@ -526,7 +526,7 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl<IcNeighborHoodDao
item.setBuildingId(buildingId);
}
//3.获取单元ID,判断单元是否存在,不存在则添加单元,存在则直接获取单元ID
if (null != item.getBuildingUnit()) {
if (StringUtils.isNotBlank(item.getBuildingUnit())) {
String unitId = getUnitId(formDTO.getCustomerId(), item);
item.setBuildingUnitId(unitId);
}
@ -535,7 +535,7 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl<IcNeighborHoodDao
String buildingId = getBuildingId(formDTO.getCustomerId(), item);
item.setBuildingId(buildingId);
//获取单元ID,判断单元是否存在,不存在则添加单元,存在则直接获取单元ID
if (null != item.getBuildingUnit()) {
if (StringUtils.isNotBlank(item.getBuildingUnit())) {
String unitId = getUnitId(formDTO.getCustomerId(), item);
item.setBuildingUnitId(unitId);
}
@ -628,7 +628,10 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl<IcNeighborHoodDao
*/
private String getUnitId(String customerId, ImportGeneralDTO info) {
//根据楼栋ID和单元名获取单元信息
IcBuildingUnitDTO unit = icBuildingUnitService.getUnitInfo(info.getBuildingId(), String.valueOf(info.getBuildingUnit()));
/**
* 2022-03-29 需求改动单元号修改 eg 1 改为 1单元
*/
IcBuildingUnitDTO unit = icBuildingUnitService.getUnitInfo(info.getBuildingId(), info.getBuildingUnit());
if (null != unit) {
return unit.getId();
}
@ -636,8 +639,8 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl<IcNeighborHoodDao
IcBuildingUnitEntity unitEntity = new IcBuildingUnitEntity();
unitEntity.setCustomerId(customerId);
unitEntity.setBuildingId(info.getBuildingId());
unitEntity.setUnitName(info.getBuildingUnit() +"单元");
unitEntity.setUnitNum(String.valueOf(info.getBuildingUnit()));
unitEntity.setUnitName(info.getBuildingUnit());
unitEntity.setUnitNum(info.getBuildingUnit().replace("单元",""));
icBuildingUnitService.insert(unitEntity);
return unitEntity.getId();

2
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml

@ -294,7 +294,7 @@
<select id="selectAllBuildingUnitByBuildingId" resultType="com.epmet.dto.ImportGeneralDTO">
SELECT
u.ID AS buildingUnitId,
u.UNIT_NUM AS buildingUnit,
u.UNIT_NAME AS buildingUnit,
u.BUILDING_ID,b.NEIGHBOR_HOOD_ID
FROM ic_building_unit u
INNER JOIN ic_building b ON (b.ID = u.BUILDING_ID AND b.DEL_FLAG = '0')

2
epmet-module/gov-project/gov-project-server/pom.xml

@ -286,7 +286,7 @@
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/gov-voice/gov-voice-server/pom.xml

@ -218,7 +218,7 @@
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/open-data-worker/open-data-worker-server/pom.xml

@ -230,7 +230,7 @@
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/oper-access/oper-access-server/pom.xml

@ -204,7 +204,7 @@
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/oper-crm/oper-crm-server/pom.xml

@ -249,7 +249,7 @@
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/oper-customize/oper-customize-server/pom.xml

@ -231,7 +231,7 @@
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/resi-group/resi-group-server/pom.xml

@ -292,7 +292,7 @@
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/resi-guide/resi-guide-server/pom.xml

@ -225,7 +225,7 @@
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/resi-hall/resi-hall-server/pom.xml

@ -177,7 +177,7 @@
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/resi-home/resi-home-server/pom.xml

@ -199,7 +199,7 @@
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/resi-mine/resi-mine-server/pom.xml

@ -216,7 +216,7 @@
<spring.profiles.active>test</spring.profiles.active>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/resi-partymember/resi-partymember-server/pom.xml

@ -254,7 +254,7 @@
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-module/resi-voice/resi-voice-server/pom.xml

@ -175,7 +175,7 @@
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-openapi/epmet-openapi-scan/pom.xml

@ -176,7 +176,7 @@
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

2
epmet-user/epmet-user-server/pom.xml

@ -299,7 +299,7 @@
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.host>192.168.10.150</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->

10
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java

@ -24,6 +24,7 @@ import com.alibaba.excel.write.metadata.fill.FillWrapper;
import com.epmet.commons.rocketmq.messages.IcResiUserAddMQMsg;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.Constant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
@ -486,6 +487,15 @@ public class IcResiUserController implements ResultDataResolver {
} catch (IOException e) {
log.error("【导入居民信息失败】清理上传的文件失败:{}", ExceptionUtils.getErrorStackTrace(e));
}
//推送MQ事件
IcResiUserAddMQMsg mqMsg = new IcResiUserAddMQMsg();
mqMsg.setCustomerId(EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID));
//mqMsg.setIcResiUser(resiUserId);
SystemMsgFormDTO form = new SystemMsgFormDTO();
form.setMessageType(SystemMessageType.IC_RESI_USER_ADD);
form.setContent(mqMsg);
epmetMessageOpenFeignClient.sendSystemMsgByMQ(form);
}
});

20
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java

@ -172,7 +172,23 @@ public class StatsResiWarnServiceImpl implements StatsResiWarnService {
//根据buildingID,tableName he columnName获取名字
//限制条数 一栋楼内最多显示1000 即可
PageHelper.startPage(NumConstant.ONE,NumConstant.ONE_THOUSAND,false).doSelectPage(()->{
for (String s : buildingIdList) {
PageHelper.startPage(NumConstant.ONE,NumConstant.ONE_HUNDRED,false).doSelectPage(()->{
List<UserWarnNameListResultDTO> dtos = icStatsResiWarnDao.userWarnListDTO(customerId, Arrays.asList(s), icResiCategoryWarnConfigDTO.getTableName(), icResiCategoryWarnConfigDTO.getColumnName());
if (!CollectionUtils.isEmpty(dtos)){
Map<String, List<UserWarnNameListResultDTO>> groupByBuild = dtos.stream().collect(Collectors.groupingBy(UserWarnNameListResultDTO::getBuildingId));
result.forEach(item->{
item.setConfigId(configId);
groupByBuild.forEach((k,v) -> {
if (item.getBuildingId().equals(k)){
item.setUserList(v);
}
});
});
}
});
}
/*PageHelper.startPage(NumConstant.ONE,NumConstant.ONE_THOUSAND,false).doSelectPage(()->{
List<UserWarnNameListResultDTO> dtos = icStatsResiWarnDao.userWarnListDTO(customerId, buildingIdList, icResiCategoryWarnConfigDTO.getTableName(), icResiCategoryWarnConfigDTO.getColumnName());
if (!CollectionUtils.isEmpty(dtos)){
Map<String, List<UserWarnNameListResultDTO>> groupByBuild = dtos.stream().collect(Collectors.groupingBy(UserWarnNameListResultDTO::getBuildingId));
@ -185,7 +201,7 @@ public class StatsResiWarnServiceImpl implements StatsResiWarnService {
});
});
}
});
});*/
return mapResult;
}

Loading…
Cancel
Save