Browse Source

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

master
wangxianzhang 3 years ago
parent
commit
739582bb78
  1. 17
      epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.12__up_sys_dict_data.sql
  2. 6
      epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.13__up_sys_dict_data.sql
  3. 15
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/PartyUnitTypeEnum.java
  4. 6
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/AgencyInfoCache.java
  5. 6
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/CustomerAgencyDTO.java
  6. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java
  7. 1
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerAgencyDao.java
  8. 3
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java
  9. 79
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java
  10. 5
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/AggreGridServiceImpl.java
  11. 2
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml
  12. 2
      epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeDao.xml
  13. 5
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationDTO.java
  14. 3
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java
  15. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/LatestActInfoDTO.java
  16. 5
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java
  17. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java
  18. 5
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java
  19. 1
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java
  20. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/DraftActInfoFormDTO.java
  21. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActInfoFormDTO.java
  22. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/RePublishFormDTO.java
  23. 6
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java
  24. 3
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPreviewResultDTO.java
  25. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActDetailResultDTO.java
  26. 3
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActDetailResultDTO.java
  27. 3
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActDetailResultDTO.java
  28. 1
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/LatestDraftActInfoResultDTO.java
  29. 3
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ReEditActInfoResultDTO.java
  30. 5
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java
  31. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyActivityEntity.java
  32. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ExportCommunitySelfOrganizationExcel.java
  33. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java
  34. 28
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java
  35. 11
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java
  36. 34
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java
  37. 1
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.13__add_column_remark.sql
  38. 4
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.14__activity_add_grid.sql
  39. 7
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml
  40. 5
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml
  41. BIN
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/templates/self_org_import_template.xlsx
  42. 4
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseFormDTO.java
  43. 4
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/ListIcNeighborHoodFormDTO.java
  44. 20
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HousesNameResultDTO.java
  45. 8
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/enums/HouseRentFlagEnums.java
  46. 9
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
  47. 5
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java
  48. 12
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java
  49. 11
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java
  50. 12
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseController.java
  51. 23
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java
  52. 1
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/BuildingService.java
  53. 8
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java
  54. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java
  55. 39
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java
  56. 42
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java
  57. 15
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java
  58. 2
      epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.15__alter_ic_house.sql
  59. 3
      epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.16__add_index_ic_house.sql
  60. 200
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml
  61. 10
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java
  62. 5
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PartyMemberListFormDTO.java
  63. 7
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/SearchByNameFormDTO.java
  64. 20
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinationListFormDTO.java
  65. 11
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListMemberExcelResultDTO.java
  66. 9
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListResultDTO.java
  67. 5
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcStatsResiResultDTO.java
  68. 30
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/SearchByNameResultDTO.java
  69. 5
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java
  70. 45
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java
  71. 129
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java
  72. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java
  73. 9
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiMemberEntity.java
  74. 21
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/PartyMemberAgeExportExcel.java
  75. 21
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/PartyMemberEducationExportExcel.java
  76. 3
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/VaccinationExportExcel.java
  77. 3
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java
  78. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java
  79. 23
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java
  80. 44
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java
  81. 1
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java
  82. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java
  83. 1
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java
  84. 2
      epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.40__member_huji.sql
  85. BIN
      epmet-user/epmet-user-server/src/main/resources/excel/attention_vaccination_template.xlsx
  86. 39
      epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml
  87. 4
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml
  88. 4
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiMemberDao.xml
  89. 20
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

17
epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.12__up_sys_dict_data.sql

@ -0,0 +1,17 @@
UPDATE `epmet_admin`.`sys_dict_data` SET `id` = '1000000000000000220', `dict_label` = '区域化党建单位--楼宇党建'
WHERE (`id` = '1000000000000000200');
UPDATE `epmet_admin`.`sys_dict_data` SET `id` = '1000000000000000221', `dict_label` = '区域化党建单位--两新组织'
WHERE (`id` = '1000000000000000201');
UPDATE `epmet_admin`.`sys_dict_data` SET `id` = '1000000000000000222', `dict_label` = '区域化党建单位--区域单位党建'
WHERE (`id` = '1000000000000000202');
UPDATE `epmet_admin`.`sys_dict_data` SET `id` = '1000000000000000223', `dict_label` = '区域化党建单位--机关直属部门'
WHERE (`id` = '1000000000000000203');
UPDATE `epmet_admin`.`sys_dict_data` SET `id` = '1000000000000000224', `dict_label` = '区域化党建单位--其他'
WHERE (`id` = '1000000000000000204');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000225', '1000000000000000007', '社会组织--社会团体', '5', '0', '', '5', '0', '0', '', '2022-04-12 14:39:18', '', '2022-04-12 14:39:18');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000226', '1000000000000000007', '社会组织--民办非企业单位', '6', '0', '', '6', '0', '0', '', '2022-04-12 14:39:18', '', '2022-04-12 14:39:18');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000227', '1000000000000000007', '社会组织--基金会', '7', '0', '', '7', '0', '0', '', '2022-04-12 14:39:18', '', '2022-04-12 14:39:18');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000228', '1000000000000000007', '社会组织--其他', '8', '0', '', '8', '0', '0', '', '2022-04-12 14:39:18', '', '2022-04-12 14:39:18');

6
epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.13__up_sys_dict_data.sql

@ -0,0 +1,6 @@
update sys_dict_data set dict_label='联建单位'
where dict_value='party_unit'
and DEL_FLAG='0'
and dict_type_id=(
select st.id from sys_dict_type st where st.dict_type='user_demand_service_type' and st.DEL_FLAG='0'
);

15
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/PartyUnitTypeEnum.java

@ -7,11 +7,16 @@ import com.epmet.commons.tools.exception.EpmetErrorCode;
*/
public enum PartyUnitTypeEnum {
//房屋类型,1楼房,2平房,3别墅
LOUYU("0", "楼宇党建"),
ZUZHI("1", "两新组织"),
DANWEI("2", "区域单位党建"),
JIGUAN("3", "机关直属部门"),
QITA("4", "其他");
LOUYU("0", "区域化党建单位--楼宇党建"),
ZUZHI("1", "区域化党建单位--两新组织"),
DANWEI("2", "区域化党建单位--区域单位党建"),
JIGUAN("3", "区域化党建单位--机关直属部门"),
QITA("4", "区域化党建单位--其他"),
SHZZ_SHTT("5", "社会组织--社会团体"),
SHZZ_MBFQYDW("6", "社会组织--民办非企业单位"),
SHZZ_JJH("7", "社会组织--基金会"),
SHZZ_QT("8", "社会组织--其他");
private String code;
private String name;

6
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/AgencyInfoCache.java

@ -4,6 +4,7 @@ import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* @Author zxc
@ -59,6 +60,11 @@ public class AgencyInfoCache implements Serializable {
*/
private String areaCode;
/**
* 地区编码全路径例如37,3702,370203,370203005,370203005015
*/
private List<String> areaCodePath;
/**
* 删除标识
*/

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

@ -21,6 +21,7 @@ import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
@ -172,4 +173,9 @@ public class CustomerAgencyDTO implements Serializable {
* 联系电话
*/
private String mobile;
/**
* 地区编码全路径例如37,3702,370203,370203005,370203005015
*/
private List<String> areaCodePath;
}

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java

@ -21,10 +21,10 @@ import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dataaggre.beans.GridMemberDataAnalysisExcelExportBean;
import com.epmet.dataaggre.dto.govorg.CustomerAgencyDTO;
import com.epmet.dataaggre.dto.govorg.CustomerGridDTO;
import com.epmet.dataaggre.dto.govorg.form.*;
import com.epmet.dataaggre.dto.govorg.result.*;
import com.epmet.dataaggre.entity.govorg.CustomerAgencyEntity;
import com.epmet.dataaggre.enums.GridMemberDataAnalysisEnums;
import com.epmet.dataaggre.service.AggreGridService;
import com.epmet.dataaggre.service.govorg.GovOrgService;
@ -242,8 +242,8 @@ public class GovOrgController {
* @date 2021/11/5 2:54 下午
*/
@PostMapping("agency")
public Result<CustomerAgencyEntity> getAgencyInfo(@RequestParam("agencyId")String agencyId){
return new Result<CustomerAgencyEntity>().ok(govOrgService.getAgencyInfo(agencyId));
public Result<CustomerAgencyDTO> getAgencyInfo(@RequestParam("agencyId")String agencyId){
return new Result<CustomerAgencyDTO>().ok(govOrgService.getAgencyInfo(agencyId));
}
/**
@ -305,7 +305,7 @@ public class GovOrgController {
CustomerGridDTO gridInfo = govOrgService.getGridInfo(orgId);
Optional.ofNullable(gridInfo).ifPresent((g) -> orgName.set(g.getGridName()));
} else if ("agency".equals(orgType)) {
CustomerAgencyEntity agencyInfo = govOrgService.getAgencyInfo(orgId);
CustomerAgencyDTO agencyInfo = govOrgService.getAgencyInfo(orgId);
Optional.ofNullable(agencyInfo).ifPresent((a) -> orgName.set(a.getOrganizationName()));
}

1
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerAgencyDao.java

@ -105,4 +105,5 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
* @author sun
*/
LinkedList<GridLivelyResultDTO> subAgencyListAndGridSumNum(@Param("agencyId") String agencyId);
}

3
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java

@ -8,7 +8,6 @@ import com.epmet.dataaggre.dto.govorg.CustomerGridDTO;
import com.epmet.dataaggre.dto.govorg.form.*;
import com.epmet.dataaggre.dto.govorg.result.*;
import com.epmet.dataaggre.dto.resigroup.result.OrgInfoCommonDTO;
import com.epmet.dataaggre.entity.govorg.CustomerAgencyEntity;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@ -162,7 +161,7 @@ public interface GovOrgService {
* @author zxc
* @date 2021/11/5 2:54 下午
*/
CustomerAgencyEntity getAgencyInfo(String agencyId);
CustomerAgencyDTO getAgencyInfo(String agencyId);
/**
* @Description 查询网格信息

79
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java

@ -6,6 +6,7 @@ import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import com.alibaba.fastjson.JSON;
import com.dingtalk.api.request.OapiRobotSendRequest;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.Constant;
import com.epmet.commons.tools.constant.DingDingRobotConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
@ -23,6 +24,7 @@ import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache;
import com.epmet.commons.tools.redis.common.bean.BuildingInfoCache;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.HttpClientManager;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dataaggre.constant.DataSourceConstant;
@ -250,41 +252,6 @@ public class GovOrgServiceImpl implements GovOrgService {
return result;
}
public static void main(String[] args) {
List<NextAreaCodeResultDTO> allList = new ArrayList<>();
NextAreaCodeResultDTO m1 = new NextAreaCodeResultDTO();
m1.setAreaCode("1");
m1.setAreaName("a");
allList.add(m1);
NextAreaCodeResultDTO m2 = new NextAreaCodeResultDTO();
m2.setAreaCode("2");
m2.setAreaName("b");
allList.add(m2);
NextAreaCodeResultDTO m3 = new NextAreaCodeResultDTO();
m3.setAreaCode("3");
m3.setAreaName("c");
allList.add(m3);
List<String> stringList = new ArrayList<>();
stringList.add("1");
stringList.add("2");
Iterator<NextAreaCodeResultDTO> iterator = allList.iterator();
while (iterator.hasNext()) {
NextAreaCodeResultDTO next = iterator.next();
for (String usedAreaCode : stringList) {
if (next.getAreaCode().equals(usedAreaCode)) {
iterator.remove();
}
}
}
System.out.println(JSON.toJSONString(allList, true));
}
/**
* @param staffId
* @Author sun
@ -642,8 +609,46 @@ public class GovOrgServiceImpl implements GovOrgService {
* @date 2021/11/5 2:54 下午
*/
@Override
public CustomerAgencyEntity getAgencyInfo(String agencyId) {
return customerAgencyDao.selectById(agencyId);
public CustomerAgencyDTO getAgencyInfo(String agencyId) {
CustomerAgencyEntity customerAgencyEntity=customerAgencyDao.selectById(agencyId);
CustomerAgencyDTO res= ConvertUtils.sourceToTarget(customerAgencyEntity,CustomerAgencyDTO.class);
//设置行政地区编码全路径
if (StringUtils.isNotBlank(res.getAreaCode()) && StringUtils.isNotBlank(res.getParentAreaCode())) {
res.setAreaCodePath(queryAreaCodePath(res));
}
return res;
}
private List<String> queryAreaCodePath(CustomerAgencyDTO customerAgencyEntity) {
List<String> areaCodePath = new ArrayList<>();
switch (customerAgencyEntity.getLevel()) {
case Constant.COMMUNITY:
areaCodePath.add(customerAgencyEntity.getAreaCode().substring(NumConstant.ZERO, NumConstant.TWO));
areaCodePath.add(customerAgencyEntity.getAreaCode().substring(NumConstant.ZERO, NumConstant.FOUR));
areaCodePath.add(customerAgencyEntity.getAreaCode().substring(NumConstant.ZERO, NumConstant.SIX));
areaCodePath.add(customerAgencyEntity.getParentAreaCode());
areaCodePath.add(customerAgencyEntity.getAreaCode());
break;
case Constant.STREET:
areaCodePath.add(customerAgencyEntity.getAreaCode().substring(NumConstant.ZERO, NumConstant.TWO));
areaCodePath.add(customerAgencyEntity.getAreaCode().substring(NumConstant.ZERO, NumConstant.FOUR));
areaCodePath.add(customerAgencyEntity.getParentAreaCode());
areaCodePath.add(customerAgencyEntity.getAreaCode());
break;
case Constant.DISTRICT:
areaCodePath.add(customerAgencyEntity.getAreaCode().substring(NumConstant.ZERO, NumConstant.TWO));
areaCodePath.add(customerAgencyEntity.getParentAreaCode());
areaCodePath.add(customerAgencyEntity.getAreaCode());
break;
case Constant.CITY:
areaCodePath.add(customerAgencyEntity.getParentAreaCode());
areaCodePath.add(customerAgencyEntity.getAreaCode());
break;
case Constant.PROVINCE:
areaCodePath.add(customerAgencyEntity.getAreaCode());
break;
}
return areaCodePath;
}
/**

5
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/AggreGridServiceImpl.java

@ -8,10 +8,10 @@ import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.dataaggre.dto.epmetuser.result.StaffPatrolRecordDailyResultDTO;
import com.epmet.dataaggre.dto.govorg.CustomerAgencyDTO;
import com.epmet.dataaggre.dto.govorg.CustomerGridDTO;
import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO;
import com.epmet.dataaggre.entity.epmetuser.CustomerStaffEntity;
import com.epmet.dataaggre.entity.govorg.CustomerAgencyEntity;
import com.epmet.dataaggre.service.AggreGridService;
import com.epmet.dataaggre.service.datastats.DataStatsService;
import com.epmet.dataaggre.service.epmetuser.EpmetUserService;
@ -22,7 +22,6 @@ import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import sun.rmi.runtime.Log;
import java.util.*;
@ -173,7 +172,7 @@ public class AggreGridServiceImpl implements AggreGridService {
* @return
*/
private String getPidsByAgencyId(String agencyId) {
CustomerAgencyEntity agencyInfo = govOrgService.getAgencyInfo(agencyId);
CustomerAgencyDTO agencyInfo = govOrgService.getAgencyInfo(agencyId);
if (agencyInfo == null) {
String errorMsg = "【网格员数据统计查询pcwork】查询组织信息返回为null";

2
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml

@ -163,6 +163,7 @@
WHERE
u.del_flag = '0'
AND PARTY_FLAG = 0
AND u.point_total > 0 <!-- 初心互助中公益达人,0分人员不显示在榜单上 -->
<if test="orgType != null and orgType !=''">
<if test="orgType == 'agency'">
AND u.all_parent_ids LIKE CONCAT('%',#{orgId},'%')
@ -207,6 +208,7 @@
WHERE
u.del_flag = '0'
AND party_flag = '1'<!-- 是否是党员标志:1是。0不是党员 -->
and u.point_total > 0 <!-- 初心互助中党员先锋排行,0分人员不显示在榜单上 -->
<if test="orgType != null and orgType !=''">
<if test="orgType == 'agency'">
AND u.all_parent_ids LIKE CONCAT('%',#{orgId},'%')

2
epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeDao.xml

@ -84,7 +84,6 @@
area_code_child ac
WHERE
ac.DEL_FLAG = '0'
AND ac.USER_DEFINED = '0'
<if test='null != pCode and "" != pCode'>
AND ac.p_code=#{pCode}
</if>
@ -101,7 +100,6 @@
area_code_child ac
WHERE
ac.DEL_FLAG = '0'
AND ac.USER_DEFINED = '0'
<if test='null != pCode and "" != pCode'>
AND ac.p_code=#{pCode}
</if>

5
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationDTO.java

@ -133,4 +133,9 @@ public class IcCommunitySelfOrganizationDTO implements Serializable {
*/
private Date updatedTime;
/**
* 备注
*/
private String remark;
}

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

@ -57,7 +57,8 @@ public class IcPartyActivityDTO implements Serializable {
*/
@JsonIgnore
private String agencyId;
private String gridId;
private String gridName;
/**
* 组织的所有上级
*/

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

@ -43,7 +43,7 @@ public class LatestActInfoDTO implements Serializable {
* 客户id
*/
private String customerId;
private String gridId;
/**
* 活动标题
*/

5
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java

@ -56,6 +56,11 @@ public class AddCommunitySelfOrganizationFormDTO implements Serializable {
*/
private String organizationCreatedTime;
/**
* 备注
*/
private String remark;
/**
* 经度
*/

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

@ -46,4 +46,6 @@ public class CommunitySelfOrganizationListFormDTO implements Serializable {
private String customerId;
private String agencyId;
private Integer ranking;
private String remark;
}

5
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java

@ -68,6 +68,11 @@ public class EditCommunitySelfOrganizationFormDTO implements Serializable {
*/
private String latitude;
/**
* 备注
*/
private String remark;
/**
* 社区自组织ID
*/

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

@ -19,6 +19,7 @@ public class PartyActivityFormDTO implements Serializable {
private static final long serialVersionUID = -2510068555703677L;
@NotBlank(message = "组织Id不能为空" )
private String agencyId;
private String gridId;
private String unitId;
private String title;
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")

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

@ -28,7 +28,7 @@ public class DraftActInfoFormDTO implements Serializable {
* 活动草稿id,如果是编辑之前的活动草稿此列是有值的
*/
private String actDraftId;
private String gridId;
/**
* 如果是重新发布活动此列是有值的

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

@ -36,7 +36,7 @@ public class PublishActInfoFormDTO implements Serializable {
* 活动草稿id,如果是编辑之前的活动草稿此列是有值的
*/
private String actDraftId;
private String gridId;
/**
* 客户id
*/

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

@ -36,6 +36,8 @@ public class RePublishFormDTO implements Serializable {
*/
private String actDraftId;
private String gridId;
/**
* 活动id
*/

6
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java

@ -53,6 +53,11 @@ public class CommunitySelfOrganizationListDTO implements Serializable {
*/
private String organizationCreatedTime;
/**
* 备注
*/
private String remark;
/**
* 经度
*/
@ -87,6 +92,7 @@ public class CommunitySelfOrganizationListDTO implements Serializable {
this.longitude = "";
this.latitude = "";
this.orgId = "";
this.remark = "";
this.score = NumConstant.ZERO;
this.organizationPersonnel = new ArrayList<>();
}

3
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPreviewResultDTO.java

@ -101,6 +101,9 @@ public class ActPreviewResultDTO implements Serializable {
*/
private String actType;
private String gridId;
private String gridName;
/**
* 联建单位
*/

2
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActDetailResultDTO.java

@ -153,6 +153,8 @@ public class CanceledActDetailResultDTO implements Serializable {
*/
private String actType;
private String gridId;
private String gridName;
/**
* 联建单位
*/

3
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActDetailResultDTO.java

@ -142,6 +142,9 @@ public class FinishedActDetailResultDTO implements Serializable {
*/
private String actType;
private String gridId;
private String gridName;
/**
* 联建单位
*/

3
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActDetailResultDTO.java

@ -137,6 +137,9 @@ public class InProgressActDetailResultDTO implements Serializable {
*/
private String actType;
private String gridId;
private String gridName;
/**
* 联建单位
*/

1
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/LatestDraftActInfoResultDTO.java

@ -21,6 +21,7 @@ public class LatestDraftActInfoResultDTO implements Serializable {
* 活动草稿id
*/
private String actDraftId;
private String gridId;
/**
* 客户id
*/

3
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ReEditActInfoResultDTO.java

@ -154,6 +154,9 @@ public class ReEditActInfoResultDTO implements Serializable {
*/
private String actType;
private String gridId;
private String gridName;
/**
* 联建单位
*/

5
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java

@ -106,4 +106,9 @@ public class IcCommunitySelfOrganizationEntity extends BaseEpmetEntity {
*/
private String latitude;
/**
* 备注
*/
private String remark;
}

2
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyActivityEntity.java

@ -47,7 +47,7 @@ public class IcPartyActivityEntity extends BaseEpmetEntity {
* 组织ID
*/
private String agencyId;
private String gridId;
/**
* 组织的所有上级
*/

3
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ExportCommunitySelfOrganizationExcel.java

@ -31,6 +31,9 @@ public class ExportCommunitySelfOrganizationExcel {
@Excel(name = "创建时间", width = 20, needMerge = true)
private String organizationCreatedTime;
@Excel(name = "备注", width = 60, needMerge = true)
private String remark;
@ExcelCollection(name = "组织成员")
private List<ImportCommunitySelfOrganizationSon> organizationPersonnel;

3
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java

@ -40,6 +40,9 @@ public class ImportCommunitySelfOrganization extends ExcelVerifyInfo {
@Excel(name = "创建时间", needMerge = true)
private String organizationCreatedTime;
@Excel(name = "备注", needMerge = true)
private String remark;
@ExcelCollection(name = "组织成员")
private List<ImportCommunitySelfOrganizationSon> persons;

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

@ -28,7 +28,9 @@ import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
@ -123,6 +125,12 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD
List<String> unitIds = Arrays.asList(dto.getUnitId().split(StrConstant.COMMA));
List<String> unitNames = unitIds.stream().map(option::get).collect(Collectors.toList());
dto.setUnitName(StringUtils.join(unitNames, StrConstant.COMMA));
if (StringUtils.isNotEmpty(dto.getGridId())) {
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId());
if (null != gridInfo) {
dto.setGridName(gridInfo.getGridName());
}
}
});
}
@ -150,6 +158,12 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD
List<String> unitIds = Arrays.asList(dto.getUnitId().split(StrConstant.COMMA));
List<String> unitNames = unitIds.stream().map(option::get).collect(Collectors.toList());
dto.setUnitName(StringUtils.join(unitNames, StrConstant.COMMA));
if (StringUtils.isNotEmpty(dto.getGridId())) {
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId());
if (null != gridInfo) {
dto.setGridName(gridInfo.getGridName());
}
}
});
}
@ -171,6 +185,12 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD
List<String> serviceNames = services.stream().map(categoryMap::get).collect(Collectors.toList());
dto.setServiceMatterList(services);
dto.setServiceMatterNameList(serviceNames);
if (StringUtils.isNotEmpty(dto.getGridId())) {
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId());
if (null != gridInfo) {
dto.setGridName(gridInfo.getGridName());
}
}
//获取单位
//获取组织下联建单位
@ -547,6 +567,14 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD
List<String> services = Arrays.asList(dto.getServiceMatter().split(StrConstant.COMMA));
List<String> serviceNames = services.stream().map(categoryMap::get).collect(Collectors.toList());
dto.setServiceMatterName(StringUtils.join(serviceNames, StrConstant.SEMICOLON));
if (StringUtils.isNotEmpty(dto.getGridId())) {
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId());
if (null != gridInfo) {
dto.setGridName(gridInfo.getGridName());
}
}
});
}
PageInfo<IcPartyActivityDTO> pageInfo = new PageInfo<>(dtoList);

11
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java

@ -2,6 +2,8 @@ package com.epmet.service.impl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.ActConstant;
@ -201,6 +203,13 @@ public class WorkActDraftServiceImpl implements WorkActDraftService {
List<String> unitNames = unitIds.stream().map(option::get).collect(Collectors.toList());
actPreviewResultDTO.setUnitIdList(unitIds);
actPreviewResultDTO.setUnitNameList(unitNames);
if (StringUtils.isNotEmpty(actPreviewResultDTO.getGridId())) {
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(actPreviewResultDTO.getGridId());
if (null != gridInfo) {
actPreviewResultDTO.setGridName(gridInfo.getGridName());
}
}
}
}
return actPreviewResultDTO;
@ -337,7 +346,7 @@ public class WorkActDraftServiceImpl implements WorkActDraftService {
latestActInfoDTO.setActType(formDTO.getActType());
latestActInfoDTO.setTarget(formDTO.getTarget());
latestActInfoDTO.setGridId(formDTO.getGridId());
return latestActInfoDTO;
}

34
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java

@ -9,6 +9,8 @@ import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.scan.param.ImgScanParamDTO;
import com.epmet.commons.tools.scan.param.ImgTaskDTO;
import com.epmet.commons.tools.scan.param.TextScanParamDTO;
@ -832,6 +834,14 @@ public class WorkActServiceImpl implements WorkActService {
List<String> unitNames = unitIds.stream().map(option::get).collect(Collectors.toList());
canceledActDetailResultDTO.setUnitIdList(unitIds);
canceledActDetailResultDTO.setUnitNameList(unitNames);
if (StringUtils.isNotEmpty(dto.getGridId())) {
canceledActDetailResultDTO.setGridId(dto.getGridId());
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId());
if (null != gridInfo) {
canceledActDetailResultDTO.setGridName(gridInfo.getGridName());
}
}
}
}
}
@ -897,6 +907,14 @@ public class WorkActServiceImpl implements WorkActService {
List<String> unitNames = unitIds.stream().map(option::get).collect(Collectors.toList());
resultDTO.setUnitIdList(unitIds);
resultDTO.setUnitNameList(unitNames);
if (StringUtils.isNotEmpty(dto.getGridId())) {
resultDTO.setGridId(dto.getGridId());
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId());
if (null != gridInfo) {
resultDTO.setGridName(gridInfo.getGridName());
}
}
}
}
}
@ -986,6 +1004,14 @@ public class WorkActServiceImpl implements WorkActService {
List<String> unitNames = unitIds.stream().map(option::get).collect(Collectors.toList());
resultDTO.setUnitIdList(unitIds);
resultDTO.setUnitNameList(unitNames);
if (StringUtils.isNotEmpty(dto.getGridId())) {
resultDTO.setGridId(dto.getGridId());
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId());
if (null != gridInfo) {
resultDTO.setGridName(gridInfo.getGridName());
}
}
}
}
}
@ -1390,6 +1416,14 @@ public class WorkActServiceImpl implements WorkActService {
List<String> unitNames = unitIds.stream().map(option::get).collect(Collectors.toList());
resultDTO.setUnitIdList(unitIds);
resultDTO.setUnitNameList(unitNames);
if (StringUtils.isNotEmpty(dto.getGridId())) {
resultDTO.setGridId(dto.getGridId());
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId());
if (null != gridInfo) {
resultDTO.setGridName(gridInfo.getGridName());
}
}
}
}

1
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.13__add_column_remark.sql

@ -0,0 +1 @@
alter table ic_community_self_organization add COLUMN REMARK VARCHAR(500) comment '备注' AFTER ORGANIZATION_CREATED_TIME;

4
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.14__activity_add_grid.sql

@ -0,0 +1,4 @@
ALTER TABLE `epmet_heart`.`ic_party_activity`
ADD COLUMN `GRID_ID` varchar(64) NULL COMMENT '网格ID' AFTER `AGENCY_ID`;
ALTER TABLE `epmet_heart`.`latest_act_info`
ADD COLUMN `GRID_ID` varchar(64) NULL COMMENT '网格ID' AFTER `CUSTOMER_ID`;

7
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml

@ -14,6 +14,7 @@
LONGITUDE = #{longitude},
LATITUDE = #{latitude},
ORGANIZATION_CREATED_TIME = #{organizationCreatedTime},
REMARK = #{remark},
UPDATED_TIME = NOW(),
UPDATED_BY = #{updatedBy}
WHERE DEL_FLAG = 0
@ -52,7 +53,8 @@
so.SERVICE_ITEM AS serviceItem,
so.LONGITUDE AS longitude,
so.LATITUDE AS latitude,
so.ID as orgId
so.ID as orgId,
so.remark
FROM ic_community_self_organization so
WHERE so.DEL_FLAG = 0
AND so.ORG_ID = #{agencyId}
@ -60,6 +62,9 @@
<if test="null != organizationName and organizationName != '' ">
AND so.ORGANIZATION_NAME LIKE CONCAT('%',#{organizationName},'%')
</if>
<if test="null != remark and remark != '' ">
AND so.REMARK LIKE CONCAT('%',#{remark},'%')
</if>
<if test=" null != startTime and startTime != '' ">
AND so.ORGANIZATION_CREATED_TIME <![CDATA[ >= ]]> #{startTime}
</if>

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

@ -49,6 +49,7 @@
<select id="selectActivityList" resultType="com.epmet.entity.IcPartyActivityEntity" parameterType = "com.epmet.dto.form.PartyActivityFormDTO">
SELECT
a.ID,
a.GRID_ID,
b.unitId,
c.serviceMatter,
TITLE,
@ -95,10 +96,14 @@
WHERE
a.DEL_FLAG = '0'
AND a.AGENCY_ID = #{agencyId}
<if test='null != gridId and "" != gridId'>
AND a.GRID_ID = #{gridId}
</if>
<if test='null != title and "" != title'>
AND TITLE LIKE concat('%', #{title}, '%')
</if>
AND ACTIVITY_TIME BETWEEN #{startTime} AND #{endTime}
ORDER BY ACTIVITY_TIME DESC
</select>

BIN
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/templates/self_org_import_template.xlsx

Binary file not shown.

4
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseFormDTO.java

@ -79,9 +79,9 @@ public class IcHouseFormDTO implements Serializable {
private String purpose;
/**
* 1出租0未出租
* 1出租 0自住 2闲置
*/
@NotNull(message = "是否出租不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class})
@NotNull(message = "房屋状态不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class})
private Integer rentFlag;
/**

4
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/ListIcNeighborHoodFormDTO.java

@ -62,6 +62,10 @@ public class ListIcNeighborHoodFormDTO implements Serializable{
* 房主电话
*/
private String ownerPhone;
/**
* 房屋状态 1出租 0自住 2闲置
*/
private String rentFlag;
/**
* 数据类型小区neighbourHood楼栋building房屋house
*/

20
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HousesNameResultDTO.java

@ -0,0 +1,20 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/4/12 16:40
* @DESC
*/
@Data
public class HousesNameResultDTO implements Serializable {
private static final long serialVersionUID = -8643628706377635279L;
private String idCard;
private String houseName;
}

8
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/enums/HouseRentFlagEnums.java

@ -3,8 +3,12 @@ package com.epmet.enums;
import org.springframework.util.StringUtils;
public enum HouseRentFlagEnums {
YES(1,"是"),
NO(0,"否");
//原有的房屋出租状态是否改为房屋状态【1:出租 0:自住 2:闲置】
/*YES(1,"是"),
NO(0,"否");*/
HOUSE_ZZ(0,"自住"),
HOUSE_CZ(1,"出租"),
HOUSE_XZ(2,"闲置");

9
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java

@ -605,4 +605,13 @@ public interface GovOrgOpenFeignClient {
*/
@PostMapping("/gov/org/customerstaffgrid/getallstaffbygridid")
Result<List<String>> getAllStaffByGridId(@RequestParam("gridId")String gridId);
/**
* Desc: 根据身份证查询房屋名
* @param idCards
* @author zxc
* @date 2022/4/12 16:42
*/
@PostMapping("/gov/org/ichouse/houses-name")
Result<List<HousesNameResultDTO>> getHousesNameByIdCards(@RequestBody List<String> idCards);
}

5
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java

@ -393,4 +393,9 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient {
public Result<List<String>> getAllStaffByGridId(String gridId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getAllStaffByGridId", gridId);
}
@Override
public Result<List<HousesNameResultDTO>> getHousesNameByIdCards(List<String> idCards) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getHousesNameByIdCards", idCards);
}
}

12
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java

@ -118,6 +118,18 @@ public class BuildingController {
List<BuildingTreeLevelDTO> buildingTreeLevelDTOS =buildingService.treeList(tokenDTO.getCustomerId(), tokenDTO.getUserId());
return new Result().ok(buildingTreeLevelDTOS);
}
/**
* Desc: 根据前端方便新开接口只返回树的ID
* @param tokenDTO
* @author zxc
* @date 2022/4/12 15:20
*/
@PostMapping("tree-ids")
public Result treeIds(@LoginUser TokenDto tokenDTO){
List<String> ids =buildingService.treeIds(tokenDTO.getCustomerId(), tokenDTO.getUserId());
return new Result().ok(ids);
}
/**
* 导出模板
* @param response

11
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java

@ -89,12 +89,10 @@ public class HouseController implements ResultDataResolver {
//效验数据
ValidatorUtils.validateEntity(formDTO);
String queryScene = "house_manage";
IcNeighborHoodResultDTO icNeighborHoodResultDTO = houseService.listNeighborhood(null, formDTO.getBuildingId(), formDTO.getOwnerName(),
formDTO.getOwnerPhone(), null,
null, queryScene,
formDTO.getPageNo(), formDTO.getPageSize());
null,
formDTO.getPageNo(), formDTO.getPageSize(),formDTO.getId(),formDTO.getLevel(),formDTO.getRentFlag());
return new Result().ok(icNeighborHoodResultDTO);
}
@ -129,9 +127,6 @@ public class HouseController implements ResultDataResolver {
buildingName = null;
}
// 使用场景:社区查询
String scene = "community_search";
LoginUserDetailsFormDTO form = new LoginUserDetailsFormDTO();
form.setUserId(loginUser.getUserId());
form.setClient(loginUser.getClient());
@ -142,7 +137,7 @@ public class HouseController implements ResultDataResolver {
null);
IcNeighborHoodResultDTO icNeighborHoodResultDTO = houseService.listNeighborhood(loginUserDetail.getAgencyId(),null, null, null,
neighborhoodName, buildingName, scene, formDTO.getPageNo(), formDTO.getPageSize());
neighborhoodName, buildingName, formDTO.getPageNo(), formDTO.getPageSize(),null,null,null);
return new Result<IcNeighborHoodResultDTO>().ok(icNeighborHoodResultDTO);
}

12
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseController.java

@ -30,6 +30,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.IcHouseDTO;
import com.epmet.dto.form.HouseFormDTO;
import com.epmet.dto.result.HouseListResultDTO;
import com.epmet.dto.result.HousesNameResultDTO;
import com.epmet.service.IcHouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -114,4 +115,15 @@ public class IcHouseController {
return new Result<List<HouseListResultDTO>>().ok(icHouseService.getHouseList(tokenDto, formDTO));
}
/**
* Desc: 根据身份证查询房屋名
* @param idCards
* @author zxc
* @date 2022/4/12 16:42
*/
@PostMapping("houses-name")
public Result<List<HousesNameResultDTO>> getHousesNameByIdCards(@RequestBody List<String> idCards){
return new Result<List<HousesNameResultDTO>>().ok(icHouseService.getHousesNameByIdCards(idCards));
}
}

23
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.ImportGeneralDTO;
import com.epmet.dto.result.HouseInfoDTO;
import com.epmet.dto.result.HousesNameResultDTO;
import com.epmet.dto.result.NeighborHoodManageDelResultDTO;
import com.epmet.entity.IcHouseEntity;
import com.epmet.excel.IcHouseExcel;
@ -23,14 +24,6 @@ import java.util.Set;
@Mapper
public interface IcHouseDao extends BaseDao<IcHouseEntity> {
// IPage<Map<String, Object>> searchHouseByPage(IPage<IcHouseEntity> page,
// @Param(Constants.WRAPPER) QueryWrapper<IcNeighborHoodEntity> neighborHoodEntityQueryWrapper,
// @Param("ew1") QueryWrapper<IcBuildingEntity> buildingEntityQueryWrapper,
// @Param("ew2") QueryWrapper<IcHouseEntity> houseEntityQueryWrapper);
// IPage<Map<String, Object>> searchHouseByPage(IPage<IcHouseEntity> page,
// @Param("neighbor") IcNeighborHoodEntity neighbor,
// @Param("building") IcBuildingEntity building,
// @Param("house") IcHouseEntity house);
IPage<Map<String, Object>> searchHouseByPage(IPage<IcHouseEntity> page,
@Param("pids") String pids,
@Param("buildingId") String buildingId,
@ -38,7 +31,9 @@ public interface IcHouseDao extends BaseDao<IcHouseEntity> {
@Param("ownerPhone") String ownerPhone,
@Param("neighborHoodName") String neighborHoodName,
@Param("buildingName") String buildingName,
@Param("queryScene") String queryScene);
@Param("id")String id,
@Param("level")String level,
@Param("rentFlag")String rentFlag);
List<IcHouseExcel> searchAllHouse(@Param("house") IcHouseEntity house);
@ -92,4 +87,12 @@ public interface IcHouseDao extends BaseDao<IcHouseEntity> {
*/
void houseUpdate(@Param("houses") List<ImportGeneralDTO> houses);
}
/**
* Desc: 根据身份证查询房屋名
* @param idCards
* @author zxc
* @date 2022/4/12 16:42
*/
List<HousesNameResultDTO> getHousesNameByIdCards(@Param("idCards") List<String> idCards);
}

1
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/BuildingService.java

@ -57,6 +57,7 @@ public interface BuildingService {
void addBuilding(String customerId, IcBulidingFormDTO formDTO);
List<BuildingTreeLevelDTO> treeList(String customerId, String staffId);
List<String> treeIds(String customerId, String staffId);
List<Integer> importExcel(String customerId, List<IcBuildingExcel> list, String staffId, List<Integer> numList);

8
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java

@ -60,9 +60,11 @@ public interface HouseService {
String ownerPhone,
String neighborHoodName,
String buildingName,
String queryScene,
Integer pageNo,
Integer pageSize);
Integer pageSize,
String id,
String level,
String rentFlag);
void exportBuildinginfo(ListIcNeighborHoodFormDTO formDTO, HttpServletResponse response) throws Exception;
@ -79,4 +81,4 @@ public interface HouseService {
void allDelete(NeighborHoodManageDelFormDTO formDTO);
HouseInfoDTO getHouseInfoDTO(String customerId,String houseId);
}
}

9
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java

@ -8,6 +8,7 @@ import com.epmet.dto.IcHouseDTO;
import com.epmet.dto.ImportGeneralDTO;
import com.epmet.dto.form.HouseFormDTO;
import com.epmet.dto.result.HouseListResultDTO;
import com.epmet.dto.result.HousesNameResultDTO;
import com.epmet.entity.IcHouseEntity;
import java.util.List;
@ -116,4 +117,12 @@ public interface IcHouseService extends BaseService<IcHouseEntity> {
*/
void houseUpdate(List<ImportGeneralDTO> houses);
/**
* Desc: 根据身份证查询房屋名
* @param idCards
* @author zxc
* @date 2022/4/12 16:42
*/
List<HousesNameResultDTO> getHousesNameByIdCards(List<String> idCards);
}

39
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java

@ -261,6 +261,45 @@ public class BuildingServiceImpl implements BuildingService {
}
@Override
public List<String> treeIds(String customerId, String staffId) {
List<String> result = new ArrayList<>();
CustomerStaffInfoCacheResult agency = CustomerStaffRedis.getStaffInfo(customerId, staffId);
if(null == agency || StringUtils.isBlank(agency.getAgencyId())){
log.error("com.epmet.service.impl.BuildingServiceImpl.treeIds,没有找到工作人员所属的机关信息,用户Id:{}",staffId);
return new ArrayList<>();
}
//1.获取所在组织及下级组织
CustomerAgencyEntity customerAgency = customerAgencyDao.selectById(agency.getAgencyId());
List<CustomerAgencyEntity> customerAgencyList = icBuildingDao.selectAgencyChildrenList(agency.getAgencyId());
customerAgencyList.add(customerAgency);
if(CollectionUtils.isEmpty(customerAgencyList)){
return new ArrayList<>();
}
result.addAll(customerAgencyList.stream().map(m -> m.getId()).collect(Collectors.toList()));
List<BuildingTreeLevelDTO> agencyList = customerAgencyList.stream().map(item -> {
BuildingTreeLevelDTO buildingTreeLevelDTO = new BuildingTreeLevelDTO();
buildingTreeLevelDTO.setId(item.getId());
buildingTreeLevelDTO.setPId(item.getPid());
buildingTreeLevelDTO.setLabel(item.getOrganizationName());
buildingTreeLevelDTO.setLevel(item.getLevel());
buildingTreeLevelDTO.setLongitude(item.getLongitude());
buildingTreeLevelDTO.setLatitude(item.getLatitude());
buildingTreeLevelDTO.setChildren(new ArrayList<>());
//当前组织有几个下级组织
buildingTreeLevelDTO.setShowNum(StrConstant.EPMETY_STR);
return buildingTreeLevelDTO;
}).collect(Collectors.toList());
//2.获取组织所在网格
List<String> agencyIdList = customerAgencyList.stream().map(BaseEpmetEntity::getId).collect(Collectors.toList());
List<CustomerGridEntity> customerGridList = customerGridDao.selectList(new QueryWrapper<CustomerGridEntity>().lambda().in(CustomerGridEntity::getPid, agencyIdList));
if(CollectionUtils.isEmpty(customerGridList)){
return result;
}
result.addAll(customerGridList.stream().map(m -> m.getId()).collect(Collectors.toList()));
return result;
}
@Override
@Transactional(rollbackFor = Exception.class)
public List<Integer> importExcel(String customerId, List<IcBuildingExcel> list, String staffId, List<Integer> numList) {

42
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java

@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.OrgTypeEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.RenException;
@ -254,33 +255,22 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
String ownerPhone,
String neighborHoodName,
String buildingName,
String queryScene,
Integer pageNo,
Integer pageSize) {
Integer pageSize,
String id,String level, String rentFlag) {
IcNeighborHoodResultDTO result = new IcNeighborHoodResultDTO();
//如果类型是house 查房屋
//IPage<Map<String, Object>> resultMap = searchHouse(buildingId, ownerName, ownerPhone, neighborHoodName, buildingName, pageNo, pageSize);
// 查询pids
String pids = null;
if (StringUtils.isNotBlank(ancestorAgencyId)) {
CustomerAgencyDTO agency = agencyservice.getAgencyById(ancestorAgencyId);
if (agency == null) {
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "【社区查询-查询房屋列表】查询当前staff所属组织信息失败");
}
if (NumConstant.ZERO_STR.equals(agency.getPid())) {
pids = ancestorAgencyId;
} else {
pids = agency.getPids().concat(StrConstant.COLON).concat(ancestorAgencyId);
}
pids = getPids(ancestorAgencyId);
}
if (StringUtils.isNotBlank(level) && OrgTypeEnum.AGENCY.getCode().equals(level)){
pids = getPids(ancestorAgencyId);
}
IPage<IcHouseEntity> page = new Page<IcHouseEntity>(pageNo,pageSize);
IPage<Map<String, Object>> mapIPage = icHouseDao.searchHouseByPage(page, pids, buildingId, ownerName, ownerPhone, neighborHoodName, buildingName, queryScene);
IPage<Map<String, Object>> mapIPage = icHouseDao.searchHouseByPage(page, pids, buildingId, ownerName, ownerPhone, neighborHoodName, buildingName,id,level,rentFlag);
List<Map<String, Object>> records = mapIPage.getRecords();
records.forEach(item->{
item.put("houseType", HouseTypeEnums.getTypeValue(item.get("houseTypeKey")));
@ -291,6 +281,22 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
result.setList(records);
return result;
}
public String getPids(String agencyId){
String pids = null;
CustomerAgencyDTO agency = agencyservice.getAgencyById(agencyId);
if (agency == null) {
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "【社区查询-查询房屋列表】查询当前staff所属组织信息失败");
}
if (NumConstant.ZERO_STR.equals(agency.getPid())) {
pids = agencyId;
} else {
pids = agency.getPids().concat(StrConstant.COLON).concat(agencyId);
}
return pids;
}
@Override
public void exportBuildinginfo(ListIcNeighborHoodFormDTO formDTO, HttpServletResponse response) throws Exception {

15
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java

@ -19,6 +19,7 @@ import com.epmet.dto.IcResiUserDTO;
import com.epmet.dto.ImportGeneralDTO;
import com.epmet.dto.form.HouseFormDTO;
import com.epmet.dto.result.HouseListResultDTO;
import com.epmet.dto.result.HousesNameResultDTO;
import com.epmet.entity.IcHouseEntity;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.feign.OperCustomizeOpenFeignClient;
@ -231,4 +232,18 @@ public class IcHouseServiceImpl extends BaseServiceImpl<IcHouseDao, IcHouseEntit
baseDao.houseUpdate(houses);
}
/**
* Desc: 根据身份证查询房屋名
* @param idCards
* @author zxc
* @date 2022/4/12 16:42
*/
@Override
public List<HousesNameResultDTO> getHousesNameByIdCards(List<String> idCards) {
if (CollectionUtils.isEmpty(idCards)){
return new ArrayList<>();
}
return baseDao.getHousesNameByIdCards(idCards);
}
}

2
epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.15__alter_ic_house.sql

@ -0,0 +1,2 @@
ALTER TABLE `ic_house`
MODIFY COLUMN `RENT_FLAG` tinyint(1) NOT NULL COMMENT '1:出租 0:自住 2:闲置' AFTER `PURPOSE`;

3
epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.16__add_index_ic_house.sql

@ -0,0 +1,3 @@
ALTER TABLE `epmet_gov_org`.`ic_house`
ADD INDEX `idx_building_id`(`BUILDING_ID`) USING BTREE COMMENT '楼宇id',
ADD INDEX `idx_hood_id`(`NEIGHBOR_HOOD_ID`) USING BTREE COMMENT '小区id';

200
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml

@ -70,83 +70,6 @@
)
</update>
<!--<select id="searchHouseByPage" resultType="map">
select
a.ID as houseId,
a.HOUSE_NAME as houseName,
a.DOOR_NAME as doorName,
a.HOUSE_TYPE as houseType,
a.PURPOSE as purpose,
a.RENT_FLAG as rentFlag,
a.OWNER_NAME as ownerName,
a.OWNER_PHONE as ownerPhone,
a.OWNER_ID_CARD as ownerIdCard,
b.BUILDING_NAME as buildingName,
c.NEIGHBOR_HOOD_NAME as neighborHoodName,
d.UNIT_NUM as unitName
from ic_house a
INNER JOIN ic_building b on a.BUILDING_ID = b.ID
and c.ID in (select e.ID from ic_building e ${ew1.customSqlSegment})
INNER JOIN ic_neighbor_hood c on a.NEIGHBOR_HOOD_ID = c.ID
and c.ID in (select f.ID from ic_neighbor_hood f
INNER JOIN customer_agency g on f.AGENCY_ID = g.ID
INNER JOIN customer_grid h on f.GRID_ID = h.ID
${ew2.customSqlSegment}
)
LEFT JOIN ic_building_unit d on a.BUILDING_UNIT_ID = d.ID
${ew.customSqlSegment}
</select>-->
<!--<select id="searchHouseByPage" resultType="map">
select
a.ID as houseId,
a.HOUSE_NAME as houseName,
a.DOOR_NAME as doorName,
a.HOUSE_TYPE as houseType,
a.PURPOSE as purpose,
a.RENT_FLAG as rentFlag,
a.OWNER_NAME as ownerName,
a.OWNER_PHONE as ownerPhone,
a.OWNER_ID_CARD as ownerIdCard,
b.BUILDING_NAME as buildingName,
c.NEIGHBOR_HOOD_NAME as neighborHoodName,
d.UNIT_NUM as unitName
from ic_house a
INNER JOIN ic_building b on a.BUILDING_ID = b.ID
<if test="building.id != null and building.id.trim() != ''">
AND b.ID = #{building.id}
</if>
<if test="building.buildingName != null and building.buildingName.trim() != ''">
AND b.BUILDING_NAME like concat('%',trim(#{building.buildingName}),'%')
</if>
INNER JOIN ic_neighbor_hood c on a.NEIGHBOR_HOOD_ID = c.ID
<if test="neighbor.id != null and neighbor.id.trim() != ''">
AND c.ID = #{neighbor.id}
</if>
<if test="neighbor.agencyId != null and neighbor.agencyId.trim() != ''">
AND c.AGENCY_ID = #{neighbor.agencyId}
</if>
<if test="neighbor.gridId != null and neighbor.gridId.trim() != ''">
AND c.GRID_ID = #{neighbor.gridId}
</if>
<if test="neighbor.neighborHoodName != null and neighbor.neighborHoodName.trim() != ''">
AND c.NEIGHBOR_HOOD_NAME like concat('%',trim(#{neighbor.neighborHoodName}),'%')
</if>
LEFT JOIN ic_building_unit d on a.BUILDING_UNIT_ID = d.ID
<where>
<if test="house.ownerName != null and house.ownerName.trim() != ''">
AND a.OWNER_NAME = #{house.ownerName}
</if>
<if test="house.OWNER_PHONE != null and house.OWNER_PHONE.trim() != ''">
AND a.OWNER_PHONE = #{house.ownerPhone}
</if>
<if test="house.delFlag != null and house.delFlag.trim() != ''">
AND a.DEL_FLAG = #{building.delFlag}
</if>
</where>
</select>-->
<select id="searchHouseByPage" resultType="map">
select
a.HOUSE_NAME as houseName,
@ -154,7 +77,10 @@
b.BUILDING_NAME as buildingName,
d.UNIT_NUM as unitNum,
a.DOOR_NAME as doorName,
if(a.RENT_FLAG=1,'是','否') as rentFlag,
(case when a.RENT_FLAG = '0' then '自住'
when a.RENT_FLAG = '1' then '出租'
when a.RENT_FLAG = '2' then '闲置'
else '' end) as rentFlag,
a.OWNER_NAME as ownerName,
/*a.RENT_FLAG as rentFlag,
a.PURPOSE as purpose,*/
@ -167,7 +93,7 @@
a.BUILDING_UNIT_ID as unitNumKey,
a.HOUSE_TYPE as houseTypeKey,
a.PURPOSE as purposeKey,
a.RENT_FLAG as rentFlagKey,
CAST(a.RENT_FLAG AS CHAR) as rentFlagKey,
c.AGENCY_ID as agencyId,
c.GRID_ID as gridId
from ic_house a
@ -175,16 +101,26 @@
LEFT JOIN ic_neighbor_hood c on a.NEIGHBOR_HOOD_ID = c.ID and c.DEL_FLAG = '0'
LEFT JOIN ic_building_unit d on a.BUILDING_UNIT_ID = d.ID and d.DEL_FLAG = '0'
<where>
a.del_flag = '0'
1 = 1
<if test="pids != null and pids != ''">
and case c.AGENCY_PIDS
when '' then CONCAT(c.AGENCY_ID) like CONCAT(#{pids}, '%')
else CONCAT(c.AGENCY_PIDS, ':', c.AGENCY_ID) like CONCAT(#{pids}, '%')
end
and case c.AGENCY_PIDS when '' then CONCAT(c.AGENCY_ID) like CONCAT(#{pids}, '%')
else CONCAT(c.AGENCY_PIDS, ':', c.AGENCY_ID) like CONCAT(#{pids}, '%') end
</if>
<if test="buildingId != null and buildingId.trim() != ''">
AND a.BUILDING_ID = #{buildingId}
</if>
<if test='level == "grid"'>
AND c.GRID_ID = #{id}
</if>
<if test='level == "neighborHood"'>
AND c.id = #{id}
</if>
<if test='level == "build"'>
AND b.id = #{id}
</if>
<if test="rentFlag != null and rentFlag.trim() != ''">
AND a.RENT_FLAG = #{rentFlag}
</if>
<if test="ownerName != null and ownerName.trim() != ''">
AND a.OWNER_NAME like concat('%',#{ownerName},'%')
</if>
@ -197,22 +133,17 @@
<if test="buildingName != null and buildingName.trim() != ''">
AND b.BUILDING_NAME like CONCAT('%',#{buildingName},'%')
</if>
<if test="rentFlag != null and rentFlag.trim() != ''">
AND a.rent_flag = #{rentFlag}
</if>
and a.del_flag = '0'
</where>
/*排序规则:如果是社区查询则根据小区、楼栋、单元、房屋名字分别升序排序*/
<choose>
<when test="queryScene == 'community_search'">
ORDER BY CONVERT(c.NEIGHBOR_HOOD_NAME using gbk) ASC,
CONVERT(b.BUILDING_NAME USING gbk) ASC,
CONVERT(d.UNIT_NAME USING gbk) ASC,
CONVERT(a.HOUSE_NAME using gbk) ASC
</when>
<when test="queryScene == 'house_manage'">
ORDER BY CAST(d.UNIT_NUM AS SIGNED), a.DOOR_NAME
</when>
<otherwise>
ORDER BY CAST(d.UNIT_NUM AS SIGNED), a.DOOR_NAME
</otherwise>
</choose>
/*排序规则:根据小区、楼栋、单元、门牌号(分别按照数字和中文)分别升序排序*/
ORDER BY CONVERT(c.NEIGHBOR_HOOD_NAME using gbk),
CONVERT(b.BUILDING_NAME USING gbk),
CONVERT(d.UNIT_NAME USING gbk),
CAST(a.DOOR_NAME AS SIGNED),
CONVERT(a.DOOR_NAME using gbk)
</select>
<select id="searchAllHouse" resultType="com.epmet.excel.IcHouseExcel">
select
@ -220,7 +151,7 @@
a.DOOR_NAME as doorName,
a.HOUSE_TYPE as houseType,
a.PURPOSE as purpose,
if(a.RENT_FLAG=1,'是','否') as rentFlag,
if(a.RENT_FLAG=0,'自住',if(a.RENT_FLAG=1,'出租','闲置')) as rentFlag,
a.OWNER_NAME as ownerName,
a.OWNER_PHONE as ownerPhone,
a.OWNER_ID_CARD as ownerIdCard,
@ -244,59 +175,8 @@
<if test="house.delFlag != null and house.delFlag.trim() != ''">
AND a.DEL_FLAG = #{house.delFlag}
</if>
</where>
</select>
<!-- <select id="searchAllHouse" resultType="com.epmet.excel.IcHouseExcel">
select
a.HOUSE_NAME as houseName,
a.DOOR_NAME as doorName,
a.HOUSE_TYPE as houseType,
a.PURPOSE as purpose,
a.RENT_FLAG as rentFlag,
a.OWNER_NAME as ownerName,
a.OWNER_PHONE as ownerPhone,
a.OWNER_ID_CARD as ownerIdCard,
b.BUILDING_NAME as buildingName,
c.NEIGHBOR_HOOD_NAME as neighborHoodName,
d.UNIT_NUM as unitName
from ic_house a
INNER JOIN ic_building b on a.BUILDING_ID = b.ID
<if test="building.id != null and building.id.trim() != ''">
AND b.ID = #{building.id}
</if>
<if test="building.buildingName != null and building.buildingName.trim() != ''">
AND b.BUILDING_NAME like concat('%',trim(#{building.buildingName}),'%')
</if>
INNER JOIN ic_neighbor_hood c on a.NEIGHBOR_HOOD_ID = c.ID
<if test="neighbor.id != null and neighbor.id.trim() != ''">
AND c.ID = #{neighbor.id}
</if>
<if test="neighbor.agencyId != null and neighbor.agencyId.trim() != ''">
AND c.AGENCY_ID = #{neighbor.agencyId}
</if>
<if test="neighbor.gridId != null and neighbor.gridId.trim() != ''">
AND c.GRID_ID = #{neighbor.gridId}
</if>
<if test="neighbor.neighborHoodName != null and neighbor.neighborHoodName.trim() != ''">
AND c.NEIGHBOR_HOOD_NAME like concat('%',trim(#{neighbor.neighborHoodName}),'%')
</if>
LEFT JOIN ic_building_unit d on a.BUILDING_UNIT_ID = d.ID
<where>
<if test="house.ownerName != null and house.ownerName.trim() != ''">
AND a.OWNER_NAME = #{house.ownerName}
</if>
<if test="house.OWNER_PHONE != null and house.OWNER_PHONE.trim() != ''">
AND a.OWNER_PHONE = #{house.ownerPhone}
</if>
<if test="house.delFlag != null and house.delFlag.trim() != ''">
AND a.DEL_FLAG = #{building.delFlag}
</if>
</where>
</select>-->
<select id="queryHouseInfo" parameterType="map" resultType="com.epmet.dto.result.HouseInfoDTO">
@ -422,4 +302,22 @@
</foreach>
)
</select>
<!-- 根据身份证查询房屋名 -->
<select id="getHousesNameByIdCards" resultType="com.epmet.dto.result.HousesNameResultDTO">
SELECT
h.OWNER_ID_CARD AS idCard,
CONCAT(nh.NEIGHBOR_HOOD_NAME,b.BUILDING_NAME,n.UNIT_NAME,h.DOOR_NAME) AS houseName
FROM ic_house h
INNER JOIN ic_neighbor_hood nh ON (nh.ID = h.NEIGHBOR_HOOD_ID AND nh.DEL_FLAG = '0')
INNER JOIN ic_building b ON (b.ID = h.BUILDING_ID AND b.DEL_FLAG = '0')
INNER JOIN ic_building_unit n ON (n.ID = h.BUILDING_UNIT_ID AND n.DEL_FLAG = '0')
WHERE h.DEL_FLAG = '0'
AND h.OWNER_ID_CARD IN (
<foreach collection="idCards" item="i" separator=",">
#{i}
</foreach>
)
GROUP BY h.OWNER_ID_CARD
</select>
</mapper>

10
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java

@ -44,6 +44,16 @@ public class IcResiCollectMemFormDTO implements Serializable {
// @NotNull(message = "疫苗接种情况不能为空", groups = {IcResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class})
private Integer ymjz;
/**
* 户籍所在地
*/
private String domicilePlace;
/**
* 学校或公司
*/
private String workPlace;
/**
* 社区居民信息登记-查询返参用
*/

5
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PartyMemberListFormDTO.java

@ -1,5 +1,6 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@ -11,7 +12,7 @@ import java.io.Serializable;
* @Date 2021/12/10 15:49
*/
@Data
public class PartyMemberListFormDTO implements Serializable {
public class PartyMemberListFormDTO extends PageFormDTO implements Serializable {
private static final long serialVersionUID = -6085134769034337175L;
@NotBlank(message = "组织类型不能为空")
@ -19,6 +20,4 @@ public class PartyMemberListFormDTO implements Serializable {
@NotBlank(message = "组织ID不能为空")
private String orgId;
private String code;
private Integer pageNo = 1;
private Integer pageSize = 20;
}

7
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/SearchByNameFormDTO.java

@ -17,7 +17,7 @@ public class SearchByNameFormDTO implements Serializable {
private static final long serialVersionUID = -5017695783909884799L;
public interface SearchByNameForm{}
public interface SearchByCategoryForm{}
@NotBlank(message = "name不能为空",groups = SearchByNameForm.class)
private String name;
@ -27,4 +27,9 @@ public class SearchByNameFormDTO implements Serializable {
@NotNull(message = "pageNo不能为空",groups = SearchByNameForm.class)
private Integer pageNo;
@NotBlank(message = "columnName不能为空",groups = SearchByCategoryForm.class)
private String columnName;
private String customerId;
private String userId;
}

20
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinationListFormDTO.java

@ -54,6 +54,26 @@ public class VaccinationListFormDTO extends PageFormDTO implements Serializable
* 备注核酸检测关注名单此字段可填可不填
*/
private String remark;
/**
* 所属小区ID
*/
private String villageId;
/**
* 所属楼宇Id
*/
private String buildId;
/**
* 单元id
*/
private String unitId;
/**
* 所属家庭Id
*/
private String homeId;
private String userId;

11
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListMemberExcelResultDTO.java

@ -45,4 +45,15 @@ public class CollectListMemberExcelResultDTO implements Serializable {
@Excel(name = "疫苗接种情况",replace = { "全程接种_1", "未全程接种_2", "未接种_0" }, width = 30)
private String ymjz;
/**
* 户籍所在地
*/
@Excel(name = "户籍所在地", width = 60)
private String domicilePlace;
/**
* 学校或公司
*/
@Excel(name = "单位或学校", width = 60)
private String workPlace;
}

9
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListResultDTO.java

@ -69,6 +69,15 @@ public class CollectListResultDTO implements Serializable {
*/
private Integer ymjz;
/**
* 户籍所在地
*/
private String domicilePlace;
/**
* 学校或公司
*/
private String workPlace;
}
}

5
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcStatsResiResultDTO.java

@ -40,5 +40,8 @@ public class IcStatsResiResultDTO implements Serializable {
private String managementIcon;
private String dataIcon;
private String houseShowIcon;
/**
* 列名
*/
private String columnName;
}

30
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/SearchByNameResultDTO.java

@ -55,6 +55,31 @@ public class SearchByNameResultDTO implements Serializable {
*/
private String userId;
/**
* 手机号
*/
private String mobile;
/**
* 性别
*/
private String gender;
/**
* 身份证号
*/
private String idCard;
/**
* 出生日期
*/
private String birthday;
/**
* 备注
*/
private String remarks;
public SearchByNameResultDTO() {
this.sort = NumConstant.ZERO;
this.name = "";
@ -62,5 +87,10 @@ public class SearchByNameResultDTO implements Serializable {
this.neighborHoodName = "";
this.buildNum = "";
this.userId = "";
this.mobile="";
this.gender="";
this.idCard="";
this.birthday="";
this.remarks="";
}
}

5
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java

@ -92,5 +92,8 @@ public class StaffBasicInfoResultDTO implements Serializable {
*/
private String latitude;
/**
* 地区编码全路径例如37,3702,370203,370203005,370203005015
*/
private List<String> areaCodePath;
}

45
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java

@ -55,6 +55,51 @@ public class VaccinationListResultDTO implements Serializable {
*/
private String lastInformTime;
/**
* 所属小区ID
*/
private String villageId;
/**
* 所属小区名称
*/
private String villageName;
/**
* 所属楼宇Id
*/
private String buildId;
/**
* 所属楼宇名称
*/
private String buildName;
/**
* 单元id
*/
private String unitId;
/**
* 单元名称
*/
private String unitName;
/**
* 所属家庭Id
*/
private String homeId;
/**
* 所属家庭名称
*/
private String homeName;
/**
* 小区名+楼栋名+单元名+房屋名
*/
private String allName;
public VaccinationListResultDTO() {
this.vaccinationCount = NumConstant.ZERO;
this.name = "";

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

@ -43,6 +43,7 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.*;
import com.epmet.commons.tools.utils.poi.excel.FreezeAndFilter;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constant.SystemMessageType;
import com.epmet.constants.ImportTaskConstants;
@ -50,6 +51,8 @@ import com.epmet.dto.IcResiUserDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.enums.IcResiUserTableEnum;
import com.epmet.excel.PartyMemberAgeExportExcel;
import com.epmet.excel.PartyMemberEducationExportExcel;
import com.epmet.excel.support.ExportResiUserItemDTO;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.feign.OperCustomizeOpenFeignClient;
@ -59,6 +62,7 @@ import com.epmet.service.IcResiUserService;
import feign.RequestInterceptor;
import jodd.io.FileUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.io.IOUtils;
@ -85,6 +89,7 @@ import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
@ -532,8 +537,24 @@ public class IcResiUserController implements ResultDataResolver {
*/
@PostMapping("searchbyname")
public Result<PageData<SearchByNameResultDTO>> searchByName(@RequestBody SearchByNameFormDTO formDTO, @LoginUser TokenDto tokenDto) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO, SearchByNameFormDTO.SearchByNameForm.class);
return new Result<PageData<SearchByNameResultDTO>>().ok(icResiUserService.searchByName(formDTO, tokenDto));
return new Result<PageData<SearchByNameResultDTO>>().ok(icResiUserService.searchByName(formDTO));
}
/**
* 需求 http://zentao.elinkservice.cn/task-view-4193.html 第11条
* @param formDTO
* @param tokenDto
* @return 根据分类搜索
*/
@PostMapping("searchbycategory")
public Result<PageData<SearchByNameResultDTO>> search(@RequestBody SearchByNameFormDTO formDTO, @LoginUser TokenDto tokenDto) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO, SearchByNameFormDTO.SearchByCategoryForm.class);
return new Result<PageData<SearchByNameResultDTO>>().ok(icResiUserService.searchByName(formDTO));
}
@NotNull
@ -640,6 +661,56 @@ public class IcResiUserController implements ResultDataResolver {
return new Result<PageData<PartyMemberAgeResultDTO>>().ok(icResiUserService.getPartyMemberAgeList(formDTO));
}
@NoRepeatSubmit
@PostMapping("partymemberagelist/export")
public void partyMemberAgeListExport(@LoginUser TokenDto tokenDto, @RequestBody PartyMemberListFormDTO formDTO, HttpServletResponse response) {
ExcelWriter excelWriter = null;
formDTO.setPageSize(NumConstant.TEN_THOUSAND);
formDTO.setIsPage(false);
List<PartyMemberAgeExportExcel> exportList = new ArrayList<>();
try {
String fileName = "";
switch (formDTO.getCode()) {
case NumConstant.ZERO_STR:
fileName = "50岁以下党员信息.xlsx";
break;
case NumConstant.ONE_STR:
fileName = "50-59岁党员信息.xlsx";
break;
case NumConstant.TWO_STR:
fileName = "60-69岁党员信息.xlsx";
break;
case NumConstant.THREE_STR:
fileName = "70-79岁党员信息.xlsx";
break;
case NumConstant.FOUR_STR:
fileName = "80岁以上党员信息.xlsx";
break;
default:
fileName = "党员年龄信息.xlsx";
break;
}
excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), PartyMemberAgeExportExcel.class).build();
WriteSheet writeSheet = EasyExcel.writerSheet("党员列表").registerWriteHandler(new FreezeAndFilter()).build();
List<PartyMemberAgeResultDTO> list = icResiUserService.getPartyMemberAgeList(formDTO).getList();
AtomicInteger i = new AtomicInteger(1);
if (CollectionUtils.isNotEmpty(list)) {
exportList = list.stream().map(item -> {
PartyMemberAgeExportExcel excel = ConvertUtils.sourceToTarget(item, PartyMemberAgeExportExcel.class);
excel.setIndex(i.getAndIncrement());
return excel;
}).collect(Collectors.toList());
}
excelWriter.write(exportList, writeSheet);
} catch (Exception e) {
log.error("export exception", e);
} finally {
if (excelWriter != null) {
excelWriter.finish();
}
}
}
/**
* 党员学历统计
* @Param formDTO
@ -666,6 +737,62 @@ public class IcResiUserController implements ResultDataResolver {
return new Result<PageData<PartyMemberEducationResultDTO>>().ok(icResiUserService.getPartyMemberEducationList(formDTO));
}
@NoRepeatSubmit
@PostMapping("partymembereducationlist/export")
public void partyMemberEducationListExport(@LoginUser TokenDto tokenDto, @RequestBody PartyMemberListFormDTO formDTO, HttpServletResponse response) {
ExcelWriter excelWriter = null;
formDTO.setPageSize(NumConstant.TEN_THOUSAND);
formDTO.setIsPage(false);
List<PartyMemberEducationExportExcel> exportList = new ArrayList<>();
try {
String fileName = "";
switch (formDTO.getCode()) {
case NumConstant.ZERO_STR:
fileName = "小学及文盲党员信息.xlsx";
break;
case NumConstant.ONE_STR:
fileName = "初中学历党员信息.xlsx";
break;
case NumConstant.TWO_STR:
fileName = "高中学历党员信息.xlsx";
break;
case NumConstant.THREE_STR:
fileName = "大专学历党员信息.xlsx";
break;
case NumConstant.FOUR_STR:
fileName = "本科学历党员信息.xlsx";
break;
case NumConstant.FIVE_STR:
fileName = "硕士学历党员信息.xlsx";
break;
case NumConstant.SIX_STR:
fileName = "博士学历党员信息.xlsx";
break;
default:
fileName = "党员学历信息.xlsx";
break;
}
excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), PartyMemberEducationExportExcel.class).build();
WriteSheet writeSheet = EasyExcel.writerSheet("党员列表").registerWriteHandler(new FreezeAndFilter()).build();
List<PartyMemberEducationResultDTO> list = icResiUserService.getPartyMemberEducationList(formDTO).getList();
AtomicInteger i = new AtomicInteger(1);
if (CollectionUtils.isNotEmpty(list)) {
exportList = list.stream().map(item -> {
PartyMemberEducationExportExcel excel = ConvertUtils.sourceToTarget(item, PartyMemberEducationExportExcel.class);
excel.setIndex(i.getAndIncrement());
return excel;
}).collect(Collectors.toList());
}
excelWriter.write(exportList, writeSheet);
} catch (Exception e) {
log.error("export exception", e);
} finally {
if (excelWriter != null) {
excelWriter.finish();
}
}
}
/**
* 根据居民id查询居民信息简介
* @param resiUserId

2
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java

@ -124,7 +124,7 @@ public interface IcResiUserDao extends BaseDao<IcResiUserEntity> {
* @author zxc
* @date 2021/11/3 2:05 下午
*/
List<SearchByNameResultDTO> searchByName(@Param("name") String name, @Param("agencyId") String agencyId, @Param("pageNo") Integer pageNo);
List<SearchByNameResultDTO> searchByName(@Param("name") String name, @Param("columnName") String columnName, @Param("agencyId") String agencyId, @Param("pageNo") Integer pageNo);
Set<String> selectUserDemandCode(String icResiUserId);

9
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiMemberEntity.java

@ -53,4 +53,13 @@ public class IcResiMemberEntity extends BaseEpmetEntity {
*/
private Integer ymjz;
/**
* 户籍所在地
*/
private String domicilePlace;
/**
* 学校或公司
*/
private String workPlace;
}

21
epmet-user/epmet-user-server/src/main/java/com/epmet/excel/PartyMemberAgeExportExcel.java

@ -0,0 +1,21 @@
package com.epmet.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/4/13 10:46
*/
@Data
public class PartyMemberAgeExportExcel {
@Excel(name = "序号", width = 10)
private Integer index;
@Excel(name = "姓名", width = 20)
private String name;
@Excel(name = "年龄", width = 10)
private String age;
@Excel(name = "手机号码", width = 30)
private String mobile;
}

21
epmet-user/epmet-user-server/src/main/java/com/epmet/excel/PartyMemberEducationExportExcel.java

@ -0,0 +1,21 @@
package com.epmet.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/4/13 10:46
*/
@Data
public class PartyMemberEducationExportExcel {
@Excel(name = "序号", width = 10)
private Integer index;
@Excel(name = "姓名", width = 20)
private String name;
@Excel(name = "学历", width = 10)
private String education;
@Excel(name = "手机号码", width = 30)
private String mobile;
}

3
epmet-user/epmet-user-server/src/main/java/com/epmet/excel/VaccinationExportExcel.java

@ -32,4 +32,7 @@ public class VaccinationExportExcel {
@Excel(name = "最近一次通知时间",width = 20)
private String lastInformTime;
@Excel(name = "所属房屋",width = 40)
private String allName;
}

3
epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java

@ -98,11 +98,10 @@ public interface IcResiUserService extends BaseService<IcResiUserEntity> {
/**
* @Description 根据名字搜索
* @param formDTO
* @param tokenDto
* @author zxc
* @date 2021/11/3 1:42 下午
*/
PageData<SearchByNameResultDTO> searchByName(SearchByNameFormDTO formDTO, TokenDto tokenDto);
PageData<SearchByNameResultDTO> searchByName(SearchByNameFormDTO formDTO);
/**

4
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java

@ -30,7 +30,9 @@ import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache;
import com.epmet.commons.tools.security.password.PasswordUtils;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.CpUserDetailRedis;
@ -741,6 +743,8 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao,
resultDTO.setLevel(staffInfo.getLevel());
resultDTO.setLongitude(staffInfo.getLongitude());
resultDTO.setLatitude(staffInfo.getLatitude());
AgencyInfoCache agency= CustomerOrgRedis.getAgencyInfo(staffInfo.getAgencyId());
resultDTO.setAreaCodePath(null != agency && !CollectionUtils.isEmpty(agency.getAreaCodePath()) ? agency.getAreaCodePath() : new ArrayList<>());
}
//获取工作人员所属客户名
CustomerDTO dto = new CustomerDTO();

23
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java

@ -23,6 +23,7 @@ import com.epmet.constants.ImportTaskConstants;
import com.epmet.dao.IcEpidemicSpecialAttentionDao;
import com.epmet.dto.IcEpidemicSpecialAttentionDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.HouseInfoDTO;
import com.epmet.dto.result.UploadImgResultDTO;
import com.epmet.dto.result.VaccinationListResultDTO;
import com.epmet.entity.IcEpidemicSpecialAttentionEntity;
@ -30,6 +31,7 @@ import com.epmet.enums.ChannelEnum;
import com.epmet.excel.ImportEpidemicSpecialAttention;
import com.epmet.excel.error.EpidemicSpecialAttentionErrorModel;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.feign.OssFeignClient;
import com.epmet.service.IcEpidemicSpecialAttentionService;
import com.epmet.service.IcNoticeService;
@ -53,6 +55,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
@ -71,6 +74,8 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl<IcEpi
private OssFeignClient ossFeignClient;
@Autowired
private IcNoticeService noticeService;
@Autowired
private GovOrgOpenFeignClient govOrgOpenFeignClient;
@Override
public PageData<IcEpidemicSpecialAttentionDTO> page(Map<String, Object> params) {
@ -160,10 +165,28 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl<IcEpi
result.setTotal(list.size());
}
}
//需求调整 列表和导出增加所属房屋(小区+楼栋+单元+房间)一列值 sun
Map<String, HouseInfoDTO> houseInfoMap = new HashMap<>();
//查询房屋信息
if (result.getList().size() > NumConstant.ZERO) {
Set<String> houseIds = result.getList().stream().filter(l -> StringUtils.isNotBlank(l.getHomeId())).map(m -> m.getHomeId()).collect(Collectors.toSet());
Result<List<HouseInfoDTO>> houseInfoRes = govOrgOpenFeignClient.queryListHouseInfo(houseIds, formDTO.getCustomerId());
List<HouseInfoDTO> houseInfoDTOList = houseInfoRes.success() && !CollectionUtils.isEmpty(houseInfoRes.getData()) ? houseInfoRes.getData() : new ArrayList<>();
houseInfoMap = houseInfoDTOList.stream().collect(Collectors.toMap(HouseInfoDTO::getHomeId, Function.identity()));
}
int i = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize();
for (VaccinationListResultDTO v : result.getList()) {
i += 1;
v.setSort(i);
if (null != houseInfoMap && houseInfoMap.containsKey(v.getHomeId())) {
v.setVillageName(houseInfoMap.get(v.getHomeId()).getNeighborHoodName());
v.setBuildName(houseInfoMap.get(v.getHomeId()).getBuildingName());
v.setUnitName(houseInfoMap.get(v.getHomeId()).getUnitName());
v.setHomeName(houseInfoMap.get(v.getHomeId()).getDoorName());
v.setAllName(houseInfoMap.get(v.getHomeId()).getAllName());
}
}
return result;
}

44
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

@ -835,19 +835,18 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
/**
* @Description 根据名字搜索
* @param formDTO
* @param tokenDto
* @author zxc
* @date 2021/11/3 1:42 下午
*/
@Override
public PageData<SearchByNameResultDTO> searchByName(SearchByNameFormDTO formDTO, TokenDto tokenDto) {
public PageData<SearchByNameResultDTO> searchByName(SearchByNameFormDTO formDTO) {
// 查询工作人员所属组织
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId());
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId());
if (null == staffInfo){
throw new RenException("未查询到当前工作人员所属组织");
}
Integer no = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize();
PageInfo<SearchByNameResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.searchByName(formDTO.getName(), staffInfo.getAgencyId(), no));
PageInfo<SearchByNameResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.searchByName(formDTO.getName(), formDTO.getColumnName(),staffInfo.getAgencyId(), no));
List<SearchByNameResultDTO> result = pageInfo.getList();
if (CollectionUtils.isEmpty(result)){
return new PageData<>(new ArrayList<>(), pageInfo.getTotal());
@ -1298,6 +1297,16 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
}else if (formDTO.getAttentionType().equals(NumConstant.ONE)){
list = baseDao.vaccineList(formDTO);
}
List<String> idCards = list.stream().map(m -> m.getIdCard()).distinct().collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(idCards)){
Result<List<HousesNameResultDTO>> housesNameByIdCards = govOrgOpenFeignClient.getHousesNameByIdCards(idCards);
if (!housesNameByIdCards.success()){
throw new EpmetException("查询居民所属房屋失败...");
}
if (CollectionUtils.isNotEmpty(housesNameByIdCards.getData())){
list.forEach(l -> housesNameByIdCards.getData().stream().filter( h -> h.getIdCard().equals(l.getIdCard())).forEach(h -> l.setHouseName(h.getHouseName())));
}
}
PageInfo<EpidemicPreventionResultDTO> pageInfo = new PageInfo<>(list);
return new PageData<>(list, pageInfo.getTotal());
}
@ -1474,10 +1483,14 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
*/
@Override
public PageData<PartyMemberAgeResultDTO> getPartyMemberAgeList(PartyMemberListFormDTO formDTO) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
if (formDTO.getIsPage()) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
List<PartyMemberAgeResultDTO> list = baseDao.getPartyMemberAgeList(formDTO.getOrgType(), formDTO.getOrgId(), formDTO.getCode());
PageInfo<PartyMemberAgeResultDTO> pageInfo = new PageInfo<>(list);
return new PageData<>(list, pageInfo.getTotal());
}
List<PartyMemberAgeResultDTO> list = baseDao.getPartyMemberAgeList(formDTO.getOrgType(), formDTO.getOrgId(), formDTO.getCode());
PageInfo<PartyMemberAgeResultDTO> pageInfo = new PageInfo<>(list);
return new PageData<>(list, pageInfo.getTotal());
return new PageData<>(list, null == list?NumConstant.ZERO:list.size());
}
/**
@ -1533,15 +1546,26 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
*/
@Override
public PageData<PartyMemberEducationResultDTO> getPartyMemberEducationList(PartyMemberListFormDTO formDTO) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
if (formDTO.getIsPage()) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
List<PartyMemberEducationResultDTO> list = baseDao.getPartyMemberEducationList(formDTO.getOrgType(), formDTO.getOrgId(), formDTO.getCode());
Result<Map<String, String>> mapResult = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.EDUCATION.getCode());
PageInfo<PartyMemberEducationResultDTO> pageInfo = new PageInfo<>(list);
if (CollectionUtils.isNotEmpty(list)) {
list.forEach(item -> {
item.setEducation(null == mapResult.getData().get(item.getEducation()) ? "" : mapResult.getData().get(item.getEducation()));
});
}
return new PageData<>(list, pageInfo.getTotal());
}
List<PartyMemberEducationResultDTO> list = baseDao.getPartyMemberEducationList(formDTO.getOrgType(), formDTO.getOrgId(), formDTO.getCode());
Result<Map<String, String>> mapResult = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.EDUCATION.getCode());
PageInfo<PartyMemberEducationResultDTO> pageInfo = new PageInfo<>(list);
if (CollectionUtils.isNotEmpty(list)) {
list.forEach(item -> {
item.setEducation(null == mapResult.getData().get(item.getEducation()) ? "" : mapResult.getData().get(item.getEducation()));
});
}
return new PageData<>(list, pageInfo.getTotal());
return new PageData<>(list, null == list?NumConstant.ZERO:list.size());
}
}

1
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java

@ -220,6 +220,7 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR
dto.setChannel(Collections.emptyList());
//关注类型,核酸检测:2,疫苗接种:1;行程上报:0
dto.setAttentionType(NumConstant.TWO);
dto.setReason("有重点区域行程");
list.add(dto);
vaccinationAddFormDTO.setList(list);
epidemicSpecialAttentionService.vaccinationAdd( vaccinationAddFormDTO);

4
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java

@ -136,9 +136,9 @@ public class IcUserChangeRecordServiceImpl extends BaseServiceImpl<IcUserChangeR
}
//类别变动添加 新增/减少后缀
if ("category".equals(resultDto.getType())){
String tempSuffix = "减少";
String tempSuffix = "变更:减少";
if (resultDto.getValue().equals(NumConstant.ONE)){
tempSuffix = "增加";
tempSuffix = "变更:增加";
}
resultDto.setTypeName(resultDto.getTypeName().concat(tempSuffix));
}

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

@ -238,6 +238,7 @@ public class StatsResiWarnServiceImpl implements StatsResiWarnService {
resultDTO.setDataIcon(item.getDataIcon());
resultDTO.setHouseShowIcon(item.getHouseShowIcon());
resultDTO.setManagementIcon(item.getManagementIcon());
resultDTO.setColumnName(item.getColumnName());
//根据id ,level 获取count
//Integer count = icStatsResiWarnDao.countListByLevelAndCol(customerId,item.getTableName(),item.getColumnName(),id,level);
Map<String, BigDecimal> orDefault = tableColumnCountMap.getOrDefault(item.getTableName(), new HashMap<>());

2
epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.40__member_huji.sql

@ -0,0 +1,2 @@
alter table ic_resi_member add COLUMN DOMICILE_PLACE VARCHAR(128) comment '户籍所在地' AFTER YMJZ;
alter table ic_resi_member add COLUMN WORK_PLACE VARCHAR(128) comment '单位或学校' AFTER DOMICILE_PLACE;

BIN
epmet-user/epmet-user-server/src/main/resources/excel/attention_vaccination_template.xlsx

Binary file not shown.

39
epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml

@ -24,14 +24,20 @@
a.`NAME`,
a.MOBILE,
a.ID_CARD,
a.reason,
a.REMARK,
b.VILLAGE_ID,
b.BUILD_ID,
b.UNIT_ID,
b.HOME_ID,
IFNULL((SELECT DATE_FORMAT(CREATED_TIME,'%Y-%m-%d %H:%i:%s') FROM ic_notice WHERE DEL_FLAG = '0' AND ORIGIN = #{attentionType} AND ID_CARD = a.ID_CARD ORDER BY CREATED_TIME DESC LIMIT 1),'') AS lastInformTime,
IFNULL(v.vaccinationCount,0) AS vaccinationCount
FROM ic_epidemic_special_attention a
LEFT JOIN ic_resi_user b ON a.id_card = b.id_card
LEFT JOIN (SELECT id_card ,count(1) AS vaccinationCount FROM ic_vaccine WHERE DEL_FLAG = 0 GROUP BY ID_CARD) v ON (v.ID_CARD = a.ID_CARD)
WHERE a.DEL_FLAG = 0
AND a.ORG_ID = #{orgId}
AND ATTENTION_TYPE = #{attentionType}
AND a.ATTENTION_TYPE = #{attentionType}
<if test='null != name and "" != name'>
AND a.`NAME` LIKE CONCAT('%',#{name},'%')
</if>
@ -41,6 +47,18 @@
<if test='null != mobile and "" != mobile'>
AND a.ID_CARD LIKE CONCAT('%',#{idCard},'%')
</if>
<if test='null != villageId and "" != villageId'>
AND b.village_id = #{villageId}
</if>
<if test='null != buildId and "" != buildId'>
AND b.build_id = #{buildId}
</if>
<if test='null != unitId and "" != unitId'>
AND b.unit_id = #{unitId}
</if>
<if test='null != homeId and "" != homeId'>
AND b.home_id = #{homeId}
</if>
<if test=' null != vaccinationCount'>
HAVING vaccinationCount = #{vaccinationCount}
</if>
@ -55,11 +73,16 @@
a.ID_CARD,
a.REMARK,
a.REASON,
b.VILLAGE_ID,
b.BUILD_ID,
b.UNIT_ID,
b.HOME_ID,
IFNULL((SELECT DATE_FORMAT(CREATED_TIME,'%Y-%m-%d %H:%i:%s') FROM ic_notice WHERE DEL_FLAG = '0' AND ORIGIN = #{attentionType} AND ID_CARD = a.ID_CARD ORDER BY CREATED_TIME DESC LIMIT 1),'') AS lastInformTime
FROM ic_epidemic_special_attention a
LEFT JOIN ic_resi_user b ON a.id_card = b.id_card
WHERE a.DEL_FLAG = 0
AND a.ORG_ID = #{orgId}
AND ATTENTION_TYPE = #{attentionType}
AND a.ATTENTION_TYPE = #{attentionType}
<if test='null != name and "" != name'>
AND a.`NAME` LIKE CONCAT('%',#{name},'%')
</if>
@ -75,6 +98,18 @@
<if test='null != remark and "" != remark'>
AND a.REMARK LIKE CONCAT('%',#{remark},'%')
</if>
<if test='null != villageId and "" != villageId'>
AND b.village_id = #{villageId}
</if>
<if test='null != buildId and "" != buildId'>
AND b.build_id = #{buildId}
</if>
<if test='null != unitId and "" != unitId'>
AND b.unit_id = #{unitId}
</if>
<if test='null != homeId and "" != homeId'>
AND b.home_id = #{homeId}
</if>
ORDER BY a.CREATED_TIME DESC
</select>

4
epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml

@ -47,7 +47,9 @@
m.ID_NUM AS memberIdNum,
m.MOBILE AS memberMobile,
m.HE_SUAN_COUNT AS heSuanCount,
m.YMJZ AS ymjz
m.YMJZ AS ymjz,
m.DOMICILE_PLACE as domicilePlace,
m.WORK_PLACE as workPlace
from ic_resi_member m
where m.DEL_FLAG = 0
and m.IC_RESI_COLLECT_ID = #{id}

4
epmet-user/epmet-user-server/src/main/resources/mapper/IcResiMemberDao.xml

@ -12,7 +12,9 @@
m.ID_NUM,
m.MOBILE,
m.HE_SUAN_COUNT,
m.YMJZ
m.YMJZ,
m.DOMICILE_PLACE,
m.WORK_PLACE
FROM
ic_resi_member m
WHERE

20
epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

@ -196,11 +196,25 @@
`NAME`,
VILLAGE_ID AS neighborHoodId,
BUILD_ID,
GRID_ID
GRID_ID,
MOBILE,
( case when GENDER='1'then '男'
when GENDER='2' then '女'
else '未知'
end
) as GENDER,
ID_CARD,
IFNULL(BIRTHDAY,'') AS BIRTHDAY,
IFNULL(REMARKS,'') AS REMARKS
FROM ic_resi_user
WHERE DEL_FLAG = '0'
AND (AGENCY_ID = #{agencyId} OR PIDS LIKE CONCAT('%',#{agencyId},'%'))
AND `NAME` LIKE CONCAT('%',#{name},'%')
<if test="name != null and name != ''">
AND `NAME` LIKE CONCAT('%',#{name},'%')
</if>
<if test="columnName != null and columnName != ''">
and ${columnName}='1'
</if>
ORDER BY `NAME`
</select>
@ -454,6 +468,7 @@
<if test="null != code and '' != code">
WHERE ageGroup = #{code}
</if>
ORDER BY CONVERT(NAME USING GBK) ASC
</select>
<select id="getPartyMemberEducationList" resultType="com.epmet.dto.result.PartyMemberEducationResultDTO">
@ -479,6 +494,7 @@
AND (AGENCY_ID = #{orgId} OR PIDS LIKE CONCAT('%',#{orgId},'%'))
</otherwise>
</choose>
ORDER BY CONVERT(NAME USING GBK) ASC
</select>
<select id="getPartyMemberEducationStatistics" resultType="com.epmet.commons.tools.dto.result.OptionDataResultDTO">
SELECT

Loading…
Cancel
Save