Browse Source

Merge remote-tracking branch 'origin/master' into feature/syp_appMenu

feature/syp_points
songyunpeng 5 years ago
parent
commit
78900ce9f3
  1. 25
      esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/epdc/DeptTreeWithTypeKeyDTO.java
  2. 11
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/SysDeptController.java
  3. 7
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/SysDeptDao.java
  4. 17
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/SysDeptService.java
  5. 84
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/SysDeptServiceImpl.java
  6. 11
      esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/SysDeptDao.xml
  7. 10
      esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/Constant.java
  8. 6
      esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/FieldConstant.java
  9. 4
      esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/exception/ErrorCode.java
  10. 29
      esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/properties/ScreenPopulationProperties.java
  11. 10
      esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/redis/RedisKeys.java
  12. 93
      esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/utils/MD5Util.java
  13. 5
      esua-epdc/epdc-commons/epdc-commons-tools/src/main/resources/i18n/messages_common_en_US.properties
  14. 5
      esua-epdc/epdc-commons/epdc-commons-tools/src/main/resources/i18n/messages_common_zh_CN.properties
  15. 5
      esua-epdc/epdc-commons/epdc-commons-tools/src/main/resources/i18n/messages_common_zh_TW.properties
  16. 4
      esua-epdc/epdc-gateway/pom.xml
  17. 3
      esua-epdc/epdc-gateway/src/main/resources/application.yml
  18. 15
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/annotation/ReportData.java
  19. 97
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/aspect/ScreenPopulationAop.java
  20. 145
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiScreenPopulationController.java
  21. 11
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/AdminFeignClient.java
  22. 76
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java
  23. 5
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/AdminFeignClientFallback.java
  24. 37
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java
  25. 68
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppUserService.java
  26. 41
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java
  27. 8
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/resources/application.yml
  28. 31
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EpdcEventsServiceImpl.java
  29. 10
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/service/IssueService.java
  30. 30
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/service/impl/IssueServiceImpl.java
  31. 20
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemService.java
  32. 17
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java
  33. 33
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActInfoServiceImpl.java
  34. 10
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/UserInfoFeignClient.java
  35. 6
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/UserInfoFeignClientFallback.java
  36. 5
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/form/PartyGroupTopicTopFormDTO.java
  37. 5
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/result/PartyGroupOfficialsResultDTO.java
  38. 2
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/controller/AppPartyTopicController.java
  39. 17
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/controller/PartyTopicController.java
  40. 10
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java
  41. 8
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyTopicDao.xml
  42. 17
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/constant/HouseHeadRelationConstant.java
  43. 19
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/constant/PopulationIdentify.java
  44. 2
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/HousingInformationDTO.java
  45. 4
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/PopulationInformationDTO.java
  46. 34
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcScreenGridRankingFormDTO.java
  47. 34
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcScreenHouseInfoByPeopleFormDTO.java
  48. 34
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcScreenPopulationInfoByHouseFormDTO.java
  49. 34
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcScreenResidentInfoByCurrentAddressFormDTO.java
  50. 24
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcScreenSelectPeopleDetailFormDTO.java
  51. 43
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcScreenSelectPeopleFormDTO.java
  52. 29
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcVolunteerKindnessTimeUpdateFormDTO.java
  53. 20
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcScreenGridRankingResultDTO.java
  54. 37
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcScreenHouseInfoByPeopleResultDTO.java
  55. 58
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcScreenHouseUseResultDTO.java
  56. 37
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcScreenPopulationInfoByHouseResultDTO.java
  57. 30
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcScreenResidentInfoByCurrentAddressResultDTO.java
  58. 38
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcScreenSelectPeopleDetailResultDTO.java
  59. 32
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcScreenSelectPeopleResultDTO.java
  60. 25
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/FamilyMember.java
  61. 28
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/HousingInfo.java
  62. 131
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/EpdcScreenPopulationInformationController.java
  63. 14
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerInfoController.java
  64. 8
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/HousingInformationDao.java
  65. 89
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/PopulationInformationDao.java
  66. 9
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java
  67. 4
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/HousingInformationEntity.java
  68. 4
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/PopulationInformationEntity.java
  69. 3
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/BasePopulationInformationExcel.java
  70. 8
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/HousingInformationService.java
  71. 58
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/PopulationInformationService.java
  72. 10
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java
  73. 709
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/HousingInformationServiceImpl.java
  74. 233
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/PopulationInformationServiceImpl.java
  75. 12
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java
  76. BIN
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/excel/居民信息录入模板.xls
  77. 8
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/HousingInformationDao.xml
  78. 305
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/PopulationInformationDao.xml
  79. 10
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml

25
esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/epdc/DeptTreeWithTypeKeyDTO.java

@ -0,0 +1,25 @@
package com.elink.esua.epdc.dto.epdc;
import lombok.Data;
import java.io.Serializable;
/**
* @author: songyunpeng
* @Date: 2019/12/13 14:02
* @Description: 部门表树结构
*/
@Data
public class DeptTreeWithTypeKeyDTO implements Serializable {
private static final long serialVersionUID = 7058545106715835343L;
private Long id;
private Long pid;
private String name;
private String typeKey;
}

11
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/SysDeptController.java

@ -209,6 +209,17 @@ public class SysDeptController {
public Result<DeptOption> getDeptTree() {
return sysDeptService.getDeptTree();
}
/***
* 获取所有部门树 - 带typekey
* @param
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.DeptOption>
* @author qushutong
* @date 2019/12/13 15:25
*/
@GetMapping("party/getDeptTreeWithTypeKey")
public Result<DeptOption> getDeptTreeWithTypeKey() {
return sysDeptService.getDeptTreeWithTypeKey();
}
/**
* @param

7
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/SysDeptDao.java

@ -13,6 +13,7 @@ import com.elink.esua.epdc.dto.CompleteDeptDTO;
import com.elink.esua.epdc.dto.DeptTreeDTO;
import com.elink.esua.epdc.dto.SysDeptDTO;
import com.elink.esua.epdc.dto.SysSimpleDeptDTO;
import com.elink.esua.epdc.dto.epdc.DeptTreeWithTypeKeyDTO;
import com.elink.esua.epdc.dto.epdc.GridForLeaderRegisterDTO;
import com.elink.esua.epdc.dto.epdc.form.UserSysDeptInfoFormDTO;
import com.elink.esua.epdc.dto.epdc.result.UserSysDeptInfoResultDTO;
@ -145,6 +146,12 @@ public interface SysDeptDao extends BaseDao<SysDeptEntity> {
* @Description: 查询所有
*/
List<DeptTreeDTO> selectListDeptTree();
/**
* @author: qushutong
* @Date: 2019/12/13 14:17
* @Description: 查询所有带typekey
*/
List<DeptTreeWithTypeKeyDTO> selectListDeptTreeWithTypeKey();
/**
* @param params

17
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/SysDeptService.java

@ -182,6 +182,15 @@ public interface SysDeptService extends BaseService<SysDeptEntity> {
*/
void packgeAllDeptOption();
/***
* 组装所有部门带typekey
* @param
* @return void
* @author qushutong
* @date 2019/12/13 13:54
*/
void packgeAllDeptOptionWithTypeKey();
/***
* 获取所有部门树
* @param
@ -190,6 +199,14 @@ public interface SysDeptService extends BaseService<SysDeptEntity> {
* @date 2019/12/13 14:48
*/
Result<DeptOption> getDeptTree();
/***
* 获取所有部门树 - 携带type-key
* @param
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.DeptOption>
* @author songyunpeng
* @date 2019/12/13 14:48
*/
Result<DeptOption> getDeptTreeWithTypeKey();
/**
* @param

84
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/SysDeptServiceImpl.java

@ -29,6 +29,7 @@ import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.utils.TreeUtils;
import com.elink.esua.epdc.dao.SysDeptDao;
import com.elink.esua.epdc.dto.*;
import com.elink.esua.epdc.dto.epdc.DeptTreeWithTypeKeyDTO;
import com.elink.esua.epdc.dto.epdc.GridForLeaderRegisterDTO;
import com.elink.esua.epdc.dto.epdc.form.UserSysDeptInfoFormDTO;
import com.elink.esua.epdc.dto.epdc.result.UserSysDeptInfoResultDTO;
@ -606,6 +607,62 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit
redisUtils.set(RedisKeys.getAllDeptOptionKey(), option);
}
@Override
public void packgeAllDeptOptionWithTypeKey() {
List<DeptTreeWithTypeKeyDTO> deptList = baseDao.selectListDeptTreeWithTypeKey();
JSONObject node;
JSONArray headNodes = new JSONArray();
for (DeptTreeWithTypeKeyDTO deptItemDto : deptList) {
if (deptItemDto.getPid().longValue() == NumConstant.ZERO_L) {
node = new JSONObject();
node.put("value", deptItemDto.getId());
node.put("label", deptItemDto.getName());
node.put("typeKey", deptItemDto.getTypeKey());
headNodes.add(node);
}
}
// 用于存放所有父级节点
JSONArray parent;
parent = headNodes;
// 用于存放所有子级节点
JSONArray allChildren = new JSONArray();
JSONArray children;
// 用于存放单个子级节点
JSONObject childNode;
// 存放其余未处理的类别(节点)
List<DeptTreeWithTypeKeyDTO> others = this.getOtherDeptWithTypeKey(deptList, parent);
while (!others.isEmpty()) {
for (int i = 0; i < parent.size(); i++) {
node = parent.getJSONObject(i);
children = new JSONArray();
for (DeptTreeWithTypeKeyDTO categoryTreeDto : others) {
if (categoryTreeDto.getPid().equals(node.get("value"))) {
childNode = new JSONObject();
childNode.put("value", categoryTreeDto.getId());
childNode.put("label", categoryTreeDto.getName());
childNode.put("typeKey", categoryTreeDto.getTypeKey());
children.add(childNode);
allChildren.add(childNode);
}
}
if (!children.isEmpty()) {
node.put("children", children);
}
}
parent = allChildren;
others = this.getOtherDeptWithTypeKey(others, parent);
}
//存放到redis中
List<JSONArray> cache = Lists.newArrayList();
cache.add(headNodes);
DeptOption option = new DeptOption();
option.setOptions(cache.get(0));
redisUtils.set(RedisKeys.getAllDeptOptionKeyWithTypeKey(), option);
}
List<DeptTreeDTO> getOtherDept(List<DeptTreeDTO> deptList, JSONArray parent) {
List<Long> already = Lists.newArrayList();
@ -623,6 +680,22 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit
}
return others;
}
List<DeptTreeWithTypeKeyDTO> getOtherDeptWithTypeKey(List<DeptTreeWithTypeKeyDTO> deptList, JSONArray parent) {
List<Long> already = Lists.newArrayList();
for (int i = 0; i < parent.size(); i++) {
already.add((Long) parent.getJSONObject(i).get("value"));
}
List<DeptTreeWithTypeKeyDTO> others = Lists.newArrayList();
for (DeptTreeWithTypeKeyDTO categoryTreeDto : deptList) {
Long categoryTreeDtoId = categoryTreeDto.getId();
if (!already.contains(categoryTreeDtoId)) {
others.add(categoryTreeDto);
}
}
return others;
}
/***
@ -643,6 +716,17 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit
return new Result<DeptOption>().ok((DeptOption) obj);
}
@Override
public Result<DeptOption> getDeptTreeWithTypeKey() {
String deptKey = RedisKeys.getAllDeptOptionKeyWithTypeKey();
Object obj = redisUtils.get(deptKey);
if (null == obj) {
this.packgeAllDeptOptionWithTypeKey();
obj = redisUtils.get(deptKey);
}
return new Result<DeptOption>().ok((DeptOption) obj);
}
/**
* @param
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.DeptOption>

11
esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/SysDeptDao.xml

@ -252,4 +252,15 @@
where sd.del_flag='0'
and sd.type_key in ('district_party','street_party','street_dept')
</select>
<select id="selectListDeptTreeWithTypeKey"
resultType="com.elink.esua.epdc.dto.epdc.DeptTreeWithTypeKeyDTO">
SELECT
sd.id,
sd.pid,
sd.`name`,
sd.type_key
FROM
sys_dept sd
where sd.del_flag='0' and sd.ID not in(select dept_id from sys_dept_config t where t.del_flag ='0' and congig_type = 'screen_not_dept')
</select>
</mapper>

10
esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/Constant.java

@ -119,4 +119,14 @@ public interface Constant {
* 动作记录时机
*/
String BEHAVIOR_RECORDING_TIME_AFTER = "1";
/**
* AccessToken header
*/
String ACCESS_TOKEN = "AccessToken";
/**
* 时间戳
*/
String TIMESTAMP = "Timestamp";
}

6
esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/FieldConstant.java

@ -64,4 +64,10 @@ public interface FieldConstant {
String TAG_ID = "TAG_ID";
String TAG_ID_HUMP = "tagId";
String EVENT_ID = "EVENT_ID";
String EVENT_ID_HUMP = "eventId";
String ISSUE_ID = "ISSUE_ID";
String ISSUE_ID_HUMP = "issueId";
}

4
esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/exception/ErrorCode.java

@ -40,4 +40,8 @@ public interface ErrorCode {
int JSON_FORMAT_ERROR = 10016;
int PARSING_ERROR = 10017;
int INVALID_ERROR = 10018;
int ACCESS_TOKEN_NOT_EMPTY = 10022;
int ACCESS_TOKEN_INVALID = 10023;
int TIMESTAMP_NOT_EMPTY = 10024;
}

29
esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/properties/ScreenPopulationProperties.java

@ -0,0 +1,29 @@
package com.elink.esua.epdc.commons.tools.properties;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
/**
* 党群e事通接口配置
*
* @Authorsongyunpeng
* @Date2020/8/20 13:22
*/
@Configuration
@ConfigurationProperties(prefix = "js.screen.population")
public class ScreenPopulationProperties {
/**
* 锦水居民信息采集大屏接口appId
*/
private String screenAppId;
public String getScreenAppId() {
return screenAppId;
}
public void setScreenAppId(String screenAppId) {
this.screenAppId = screenAppId;
}
}

10
esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/redis/RedisKeys.java

@ -168,6 +168,16 @@ public class RedisKeys {
public static String getAllDeptOptionKey() {
return rootPrefix.concat("options:dept:all:");
}
/***
* 部门所有层级关系 - 带type key
* @param
* @return java.lang.String
* @author songyunpeng
* @date 2019/12/13 15:03
*/
public static String getAllDeptOptionKeyWithTypeKey() {
return rootPrefix.concat("options:dept:allWithTypeKey:");
}
/**
* @param

93
esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/utils/MD5Util.java

@ -0,0 +1,93 @@
package com.elink.esua.epdc.commons.tools.utils;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
/**
* MD5加密生成摘要
*
* @Authorliuchuang
* @Date2020/8/25 17:27
*/
public class MD5Util {
/**
* 对一段String生成MD5加密信息
*
* @param message 要加密的String
* @return java.lang.String
* @author Liuchuang
* @since 2020/8/26 9:56
*/
public static String getMD5(String message) {
try {
MessageDigest md = MessageDigest.getInstance("MD5");
byte[] b = md.digest(message.getBytes("utf-8"));
return byteToHexStringSingle(b);
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return null;
}
/**
* 对文件全文生成MD5摘要
*
* @param file 要加密的文件
* @return java.lang.String
* @author Liuchuang
* @since 2020/8/26 9:58
*/
public static String getMD5(File file) {
FileInputStream fis = null;
try {
MessageDigest md = MessageDigest.getInstance("MD5");
fis = new FileInputStream(file);
byte[] buffer = new byte[2048];
int length = -1;
long s = System.currentTimeMillis();
while ((length = fis.read(buffer)) != -1) {
md.update(buffer, 0, length);
}
byte[] b = md.digest();
return byteToHexStringSingle(b);
} catch (Exception ex) {
ex.printStackTrace();
return null;
} finally {
try {
fis.close();
} catch (IOException ex) {
ex.printStackTrace();
}
}
}
/**
* 独立把byte[]数组转换成十六进制字符串表示形式
*
* @param byteArray
* @return java.lang.String
* @author Liuchuang
* @since 2020/8/26 9:59
*/
public static String byteToHexStringSingle(byte[] byteArray) {
StringBuffer md5StrBuff = new StringBuffer();
for (int i = 0; i < byteArray.length; i++) {
if (Integer.toHexString(0xFF & byteArray[i]).length() == 1) {
md5StrBuff.append("0").append(
Integer.toHexString(0xFF & byteArray[i]));
} else {
md5StrBuff.append(Integer.toHexString(0xFF & byteArray[i]));
}
}
return md5StrBuff.toString();
}
}

5
esua-epdc/epdc-commons/epdc-commons-tools/src/main/resources/i18n/messages_common_en_US.properties

@ -19,4 +19,7 @@
10015=Please delete the user under the department first
10016=The parameter format is incorrect. Please use JSON format.
10017=Parsing {0} error
10018=Invalid {0}
10018=Invalid {0}
10022=AccessToken cannot be empty
10024=Timestamp cannot be empty
10023=AccessToken is invalid

5
esua-epdc/epdc-commons/epdc-commons-tools/src/main/resources/i18n/messages_common_zh_CN.properties

@ -19,4 +19,7 @@
10015=\u8BF7\u5148\u5220\u9664\u90E8\u95E8\u4E0B\u7684\u7528\u6237
10016=\u53C2\u6570\u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u8BF7\u4F7F\u7528JSON\u683C\u5F0F
10017=\u89E3\u6790{0}\u51FA\u9519
10018=\u65E0\u6548\u7684{0}
10018=\u65E0\u6548\u7684{0}
10022=AccessToken\u4E0D\u80FD\u4E3A\u7A7A
10024=Timestamp\u4E0D\u80FD\u4E3A\u7A7A
10023=AccessToken\u65E0\u6548

5
esua-epdc/epdc-commons/epdc-commons-tools/src/main/resources/i18n/messages_common_zh_TW.properties

@ -19,4 +19,7 @@
10015=\u8ACB\u5148\u522A\u9664\u90E8\u9580\u4E0B\u7684\u7528\u6236
10016=\u53C3\u6578\u683C\u5F0F\u4E0D\u6B63\u78BA\uFF0C\u8ACB\u4F7F\u7528JSON\u683C\u5F0F
10017=\u89E3\u6790{0}\u51FA\u932F
10018=\u7121\u6548\u7684{0}
10018=\u7121\u6548\u7684{0}
10022=AccessToken\u4E0D\u80FD\u70BA\u7A7A
10024=Timestamp\u4E0D\u80FD\u70BA\u7A7A
10023=AccessToken\u65E0\u6548

4
esua-epdc/epdc-gateway/pom.xml

@ -104,8 +104,8 @@
<gateway.routes.epdc-admin-server.uri>http://127.0.0.1:9092</gateway.routes.epdc-admin-server.uri>
<gateway.routes.epdc-activiti-server.uri>lb://epdc-activiti-server
</gateway.routes.epdc-activiti-server.uri>
<gateway.routes.epdc-api-server.uri>lb://epdc-api-server</gateway.routes.epdc-api-server.uri>
<!-- <gateway.routes.epdc-api-server.uri>http://127.0.0.1:9040</gateway.routes.epdc-api-server.uri>-->
<!-- <gateway.routes.epdc-api-server.uri>lb://epdc-api-server</gateway.routes.epdc-api-server.uri>-->
<gateway.routes.epdc-api-server.uri>http://127.0.0.1:9040</gateway.routes.epdc-api-server.uri>
<gateway.routes.epdc-app-server.uri>lb://epdc-app-server</gateway.routes.epdc-app-server.uri>
<!-- <gateway.routes.epdc-app-server.uri>http://127.0.0.1:9058</gateway.routes.epdc-app-server.uri>-->
<gateway.routes.epdc-heart-server.uri>lb://epdc-heart-server</gateway.routes.epdc-heart-server.uri>

3
esua-epdc/epdc-gateway/src/main/resources/application.yml

@ -269,6 +269,8 @@ renren:
- /api/work/user/scripLogin #工作端-用户凭证登录
- /api/work/*/swagger/**
- /api/residentConfig/getResidentConfig #获取居民端配置
- /api/screenPopulationInfo/** #获取居民端配置
workUrls:
- /api/work/** #工作端接口
- /api/analysis/** #数据端接口
@ -297,3 +299,4 @@ epdc:
- /api/analysis/** #数据端接口不拦截
- /cloudAnalysis/** #数据端接口
- /api/residentConfig/getResidentConfig #获取居民端配置
- /api/screenPopulationInfo/** #获取居民端配置

15
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/annotation/ReportData.java

@ -0,0 +1,15 @@
package com.elink.esua.epdc.annotation;
import java.lang.annotation.*;
/**
* 居民信息采集 - 接口验证
*
* @author Liuchuang
* @since 2020/8/25 17:09
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface ReportData {
}

97
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/aspect/ScreenPopulationAop.java

@ -0,0 +1,97 @@
package com.elink.esua.epdc.aspect;
import com.elink.esua.epdc.commons.tools.constant.Constant;
import com.elink.esua.epdc.commons.tools.exception.ErrorCode;
import com.elink.esua.epdc.commons.tools.exception.RenException;
import com.elink.esua.epdc.commons.tools.properties.ScreenPopulationProperties;
import com.elink.esua.epdc.commons.tools.utils.MD5Util;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.Objects;
import java.util.Optional;
/**
* 居民信息大屏接口验证
*
* @author songyunpeng
* @Date 20-04-28
*/
@Aspect
@Component
public class ScreenPopulationAop {
@Autowired
private ScreenPopulationProperties screenPopulationProperties;
/**
* 使用org.slf4j.Logger,这是Spring实现日志的方法
*/
private final Logger logger = LogManager.getLogger(getClass());
/**
* 定义AOP扫描路径
* 第一个注解只扫描aopTest方法
*/
@Pointcut("@annotation(com.elink.esua.epdc.annotation.ReportData)")
public void ScreenPopulation() {
}
/**
* 前置
*/
@Before("ScreenPopulation()")
public void deBefore(JoinPoint joinPoint) {
HttpServletRequest request = currentRequest();
if (Objects.isNull(request)) {
logger.info("without request, skip");
return;
}
// 从header中获取token
String headerAccessToken = request.getHeader(Constant.ACCESS_TOKEN);
// 如果header中不存在token,则从参数中获取token
if(StringUtils.isBlank(headerAccessToken)){
headerAccessToken = request.getParameter(Constant.ACCESS_TOKEN);
if(StringUtils.isBlank(headerAccessToken)){
throw new RenException(ErrorCode.ACCESS_TOKEN_NOT_EMPTY);
}
}
// 从header中获取Timestamp
String ts = request.getHeader(Constant.TIMESTAMP);
if (StringUtils.isBlank(ts)) {
ts = request.getParameter(Constant.TIMESTAMP);
if(StringUtils.isBlank(ts)){
throw new RenException(ErrorCode.TIMESTAMP_NOT_EMPTY);
}
}
// 校验AccessToken
String accessToken = MD5Util.getMD5(screenPopulationProperties.getScreenAppId().concat(ts));
if (!headerAccessToken.equals(accessToken)) {
throw new RenException(ErrorCode.ACCESS_TOKEN_INVALID);
}
return;
}
/**
* Return request current thread bound or null if none bound.
*
* @return Current request or null
*/
private HttpServletRequest currentRequest() {
// Use getRequestAttributes because of its return null if none bound
ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
return Optional.ofNullable(servletRequestAttributes).map(ServletRequestAttributes::getRequest).orElse(null);
}
}

145
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiScreenPopulationController.java

@ -0,0 +1,145 @@
package com.elink.esua.epdc.controller;
import com.elink.esua.epdc.annotation.ReportData;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.dto.DeptOption;
import com.elink.esua.epdc.dto.epdc.form.*;
import com.elink.esua.epdc.dto.epdc.result.*;
import com.elink.esua.epdc.service.AppUserService;
import com.elink.esua.epdc.service.CustomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* 用户模块
*
* @author yujintao
* @email yujintao@elink-cn.com
* @date 2019/9/6 19:30
*/
@RestController
@RequestMapping("screenPopulationInfo")
public class ApiScreenPopulationController {
@Autowired
private AppUserService appUserService;
@Autowired
private CustomService customService;
/**
* @Description 大屏找人接口
* @Author songyunpeng
* @Date 2020/9/14
* @Param [epdcScreenSelectPeopleFormDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenSelectPeopleResultDTO>>
**/
@ReportData
@PostMapping("selectPeople")
public Result<PageData<EpdcScreenSelectPeopleResultDTO>> selectPeople(@RequestBody EpdcScreenSelectPeopleFormDTO dto){
ValidatorUtils.validateEntity(dto);
return appUserService.selectPeople(dto);
}
/**
* @Description 一人找房接口
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.epdc.result.EpdcScreenHouseInfoByPeopleResultDTO>>
**/
@ReportData
@PostMapping("selectHouseByPeople")
public Result<PageData<EpdcScreenHouseInfoByPeopleResultDTO>> selectHouseByPeople(@RequestBody EpdcScreenHouseInfoByPeopleFormDTO dto){
ValidatorUtils.validateEntity(dto);
return appUserService.selectHouseByPeople(dto);
}
/**
* @Description 以房找人接口
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.epdc.result.EpdcScreenPopulationInfoByHouseResultDTO>>
**/
@ReportData
@PostMapping("selectPeopleByHouse")
public Result<PageData<EpdcScreenPopulationInfoByHouseResultDTO>> selectPeopleByHouse(@RequestBody EpdcScreenPopulationInfoByHouseFormDTO dto){
ValidatorUtils.validateEntity(dto);
return appUserService.selectPeopleByHouse(dto);
}
/**
* @Description 以人找人接口
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.epdc.result.EpdcScreenPopulationInfoByHouseResultDTO>>
**/
@ReportData
@PostMapping("selectPeopleByCurrentAddress")
public Result<PageData<EpdcScreenResidentInfoByCurrentAddressResultDTO>> selectPeopleByCurrentAddress(@RequestBody EpdcScreenResidentInfoByCurrentAddressFormDTO dto){
ValidatorUtils.validateEntity(dto);
return appUserService.selectPeopleByCurrentAddress(dto);
}
/**
* @Description 大屏找人详情接口
* @Author songyunpeng
* @Date 2020/9/14
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcScreenSelectPeopleDetailResultDTO>
**/
@ReportData
@Deprecated
@PostMapping("selectPeopleDetail")
public Result<EpdcScreenSelectPeopleDetailResultDTO> selectPeopleDetail(@RequestBody EpdcScreenSelectPeopleDetailFormDTO dto){
ValidatorUtils.validateEntity(dto);
return appUserService.selectPeopleDetail(dto);
}
/**
* @param
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @Author yinzuomei
* @Description 获取所有组织机构信息
* @Date 2020/1/28 11:50
**/
@ReportData
@Deprecated
@GetMapping("getDeptTreeWithTypeKey")
public Result<DeptOption> getDeptTreeWithTypeKey() {
return appUserService.getDeptTreeWithTypeKey();
}
/**
* @Description 房屋用途数据接口
* @Author songyunpeng
* @Date 2020/9/15
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcScreenHouseUseResultDTO>
**/
@ReportData
@Deprecated
@PostMapping("housingUse")
public Result<EpdcScreenHouseUseResultDTO> housingUse(){
return appUserService.housingUse();
}
/**
* @Description 网格排名
* @Author songyunpeng
* @Date 2020/9/15
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcScreenGridRankingResultDTO>
**/
@ReportData
@Deprecated
@PostMapping("gridRanking")
public Result<PageData<EpdcScreenGridRankingResultDTO>> gridRanking(@RequestBody EpdcScreenGridRankingFormDTO dto){
ValidatorUtils.validateEntity(dto);
return appUserService.gridRanking(dto);
}
}

11
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/AdminFeignClient.java

@ -98,11 +98,20 @@ public interface AdminFeignClient {
* @param
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.DeptOption>
* @Author yinzuomei
* @Description 获取所有组织机构信息
* @Description 获取所有组织机构信息 - 二级只带街道
* @Date 2020/1/28 12:15
**/
@GetMapping("sys/dept/party/getDeptTreeForEpiDemic")
Result<DeptOption> getDeptTreeForEpiDemic();
/**
* @Description 所有组织机构
* @Author songyunpeng
* @Date 2020/9/15
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.DeptOption>
**/
@GetMapping("sys/dept/party/getDeptTreeWithTypeKey")
Result<DeptOption> getDeptTreeWithTypeKey();
/**
* 根据数据字典类型获取简版数据字典列表用于页面下拉菜单

76
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java

@ -1,17 +1,19 @@
package com.elink.esua.epdc.feign;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.*;
import com.elink.esua.epdc.dto.epdc.form.*;
import com.elink.esua.epdc.dto.epdc.form.v2.EpdcCompleteVolunteerInfoV2FormDTO;
import com.elink.esua.epdc.dto.epdc.result.*;
import com.elink.esua.epdc.dto.epdc.result.EpdcWorkUserResultDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcAppUserRankingFormDTO;
import com.elink.esua.epdc.feign.fallback.UserFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
@ -481,5 +483,73 @@ public interface UserFeignClient {
**/
@GetMapping(value = "app-user/usersign/addConsequentSignPoints", consumes = MediaType.APPLICATION_JSON_VALUE)
Result addConsequentSignPoints(UserSignDTO userSignDTO);
/**
* @Description 大屏找人接口
* @Author songyunpeng
* @Date 2020/9/14
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenSelectPeopleResultDTO>>
**/
@PostMapping(value = "app-user/screenPopulationInfo/selectPeople", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<PageData<EpdcScreenSelectPeopleResultDTO>> selectPeople(EpdcScreenSelectPeopleFormDTO dto);
/**
* @Description 房屋用途数据接口
* @Author songyunpeng
* @Date 2020/9/16
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcScreenHouseUseResultDTO>
**/
@PostMapping(value = "app-user/screenPopulationInfo/housingUse", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<EpdcScreenHouseUseResultDTO> housingUse();
/**
* @Description 网格排名
* @Author songyunpeng
* @Date 2020/9/15
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcScreenGridRankingResultDTO>
**/
@PostMapping(value = "app-user/screenPopulationInfo/gridRanking", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<PageData<EpdcScreenGridRankingResultDTO>> gridRanking(@RequestBody EpdcScreenGridRankingFormDTO dto);
/**
* @Description 大屏找人详情接口
* @Author songyunpeng
* @Date 2020/9/14
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenSelectPeopleResultDTO>>
**/
@PostMapping(value = "app-user/screenPopulationInfo/selectPeopleDetail", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<EpdcScreenSelectPeopleDetailResultDTO> selectPeopleDetail(EpdcScreenSelectPeopleDetailFormDTO dto);
/**
* @Description 一人找房接口
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.epdc.result.EpdcScreenHouseInfoByPeopleResultDTO>>
**/
@PostMapping(value = "app-user/screenPopulationInfo/selectHouseByPeople", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<PageData<EpdcScreenHouseInfoByPeopleResultDTO>> selectHouseByPeople(@RequestBody EpdcScreenHouseInfoByPeopleFormDTO dto);
/**
* @Description 以房找人接口
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.epdc.result.EpdcScreenPopulationInfoByHouseResultDTO>>
**/
@PostMapping(value = "app-user/screenPopulationInfo/selectPeopleByHouse", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<PageData<EpdcScreenPopulationInfoByHouseResultDTO>> selectPeopleByHouse(@RequestBody EpdcScreenPopulationInfoByHouseFormDTO dto);
/**
* @Description 以人找人接口
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.epdc.result.EpdcScreenPopulationInfoByHouseResultDTO>>
**/
@PostMapping(value = "app-user/screenPopulationInfo/selectPeopleByCurrentAddress", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<PageData<EpdcScreenResidentInfoByCurrentAddressResultDTO>> selectPeopleByCurrentAddress(@RequestBody EpdcScreenResidentInfoByCurrentAddressFormDTO dto);
}

5
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/AdminFeignClientFallback.java

@ -54,6 +54,11 @@ public class AdminFeignClientFallback implements AdminFeignClient {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getDeptTreeForEpiDemic");
}
@Override
public Result<DeptOption> getDeptTreeWithTypeKey() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getDeptTreeWithTypeKey");
}
@Override
public Result<List<SysSimpleDictDTO>> getListSimpleDictInfo(String dictType) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getListSimpleDictInfo", dictType);

37
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java

@ -1,13 +1,13 @@
package com.elink.esua.epdc.feign.fallback;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.*;
import com.elink.esua.epdc.dto.epdc.form.*;
import com.elink.esua.epdc.dto.epdc.form.v2.EpdcCompleteVolunteerInfoV2FormDTO;
import com.elink.esua.epdc.dto.epdc.result.*;
import com.elink.esua.epdc.dto.epdc.form.EpdcAppUserRankingFormDTO;
import com.elink.esua.epdc.feign.UserFeignClient;
import org.springframework.stereotype.Component;
@ -232,4 +232,39 @@ public class UserFeignClientFallback implements UserFeignClient {
public Result addConsequentSignPoints(UserSignDTO userSignDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "addConsequentSignPoints", userSignDTO);
}
@Override
public Result<PageData<EpdcScreenSelectPeopleResultDTO>> selectPeople(EpdcScreenSelectPeopleFormDTO dto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "selectPeople", dto);
}
@Override
public Result<EpdcScreenSelectPeopleDetailResultDTO> selectPeopleDetail(EpdcScreenSelectPeopleDetailFormDTO dto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "selectPeopleDetail", dto);
}
@Override
public Result<PageData<EpdcScreenHouseInfoByPeopleResultDTO>> selectHouseByPeople(EpdcScreenHouseInfoByPeopleFormDTO dto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "selectHouseByPeople", dto);
}
@Override
public Result<PageData<EpdcScreenPopulationInfoByHouseResultDTO>> selectPeopleByHouse(EpdcScreenPopulationInfoByHouseFormDTO dto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "selectPeopleByHouse", dto);
}
@Override
public Result<PageData<EpdcScreenResidentInfoByCurrentAddressResultDTO>> selectPeopleByCurrentAddress(EpdcScreenResidentInfoByCurrentAddressFormDTO dto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "selectPeopleByCurrentAddress", dto);
}
@Override
public Result<EpdcScreenHouseUseResultDTO> housingUse() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "housingUse");
}
@Override
public Result<PageData<EpdcScreenGridRankingResultDTO>> gridRanking(EpdcScreenGridRankingFormDTO dto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "gridRanking", dto);
}
}

68
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppUserService.java

@ -1,14 +1,16 @@
package com.elink.esua.epdc.service;
import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.DeptOption;
import com.elink.esua.epdc.dto.epdc.form.*;
import com.elink.esua.epdc.dto.epdc.form.v2.EpdcCompleteVolunteerInfoV2FormDTO;
import com.elink.esua.epdc.dto.epdc.result.*;
import com.elink.esua.epdc.dto.form.*;
import com.elink.esua.epdc.dto.form.v2.EpdcCompleteUserInfoFormV2DTO;
import com.elink.esua.epdc.dto.result.EpdcAppRegisterCallbackDTO;
import com.elink.esua.epdc.dto.result.EpdcAppAuthorizationDTO;
import com.elink.esua.epdc.dto.result.EpdcAppRegisterCallbackDTO;
import com.elink.esua.epdc.dto.result.EpdcCompleteUserInfoDTO;
import java.util.List;
@ -318,4 +320,68 @@ public interface AppUserService {
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result userSign(TokenDto userDetail);
/**
* @Description 大屏找人接口
* @Author songyunpeng
* @Date 2020/9/14
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenSelectPeopleResultDTO>>
**/
Result<PageData<EpdcScreenSelectPeopleResultDTO>> selectPeople(EpdcScreenSelectPeopleFormDTO dto);
/**
* @Description 大屏找人详情接口
* @Author songyunpeng
* @Date 2020/9/14
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcScreenSelectPeopleDetailResultDTO>
**/
Result<EpdcScreenSelectPeopleDetailResultDTO> selectPeopleDetail(EpdcScreenSelectPeopleDetailFormDTO dto);
/**
* @Description 大屏找人组织机构获取
* @Author songyunpeng
* @Date 2020/9/15
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.DeptOption>
**/
Result<DeptOption> getDeptTreeWithTypeKey();
/**
* @Description 房屋用途数据接口
* @Author songyunpeng
* @Date 2020/9/16
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcScreenHouseUseResultDTO>
**/
Result<EpdcScreenHouseUseResultDTO> housingUse();
/**
* @Description 网格排名
* @Author songyunpeng
* @Date 2020/9/16
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcScreenGridRankingResultDTO>
**/
Result<PageData<EpdcScreenGridRankingResultDTO>> gridRanking(EpdcScreenGridRankingFormDTO dto);
/**
* @Description 以人找房
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.epdc.result.EpdcScreenHouseInfoByPeopleResultDTO>>
**/
Result<PageData<EpdcScreenHouseInfoByPeopleResultDTO>> selectHouseByPeople(EpdcScreenHouseInfoByPeopleFormDTO dto);
/**
* @Description 以房找人接口
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.epdc.result.EpdcScreenPopulationInfoByHouseResultDTO>>
**/
Result<PageData<EpdcScreenPopulationInfoByHouseResultDTO>> selectPeopleByHouse(EpdcScreenPopulationInfoByHouseFormDTO dto);
/**
* @Description 以人找人接口
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.epdc.result.EpdcScreenResidentInfoByCurrentAddressResultDTO>>
**/
Result<PageData<EpdcScreenResidentInfoByCurrentAddressResultDTO>> selectPeopleByCurrentAddress(EpdcScreenResidentInfoByCurrentAddressFormDTO dto);
}

41
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java

@ -15,6 +15,7 @@ import com.elink.esua.epdc.common.token.util.CpUserDetailRedis;
import com.elink.esua.epdc.commons.tools.constant.NumConstant;
import com.elink.esua.epdc.commons.tools.enums.*;
import com.elink.esua.epdc.commons.tools.exception.RenException;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.redis.RedisUtils;
import com.elink.esua.epdc.commons.tools.utils.*;
import com.elink.esua.epdc.dto.*;
@ -1586,4 +1587,44 @@ public class AppUserServiceImpl implements AppUserService {
return new Result().ok("您已连续签到"+userSignDTO.getConsequentSignDays()+"天,继续努力吧");
}
@Override
public Result<PageData<EpdcScreenSelectPeopleResultDTO>> selectPeople(EpdcScreenSelectPeopleFormDTO dto) {
return userFeignClient.selectPeople(dto);
}
@Override
public Result<EpdcScreenSelectPeopleDetailResultDTO> selectPeopleDetail(EpdcScreenSelectPeopleDetailFormDTO dto) {
return userFeignClient.selectPeopleDetail(dto);
}
@Override
public Result<DeptOption> getDeptTreeWithTypeKey() {
return adminFeignClient.getDeptTreeWithTypeKey();
}
@Override
public Result<EpdcScreenHouseUseResultDTO> housingUse() {
return userFeignClient.housingUse();
}
@Override
public Result<PageData<EpdcScreenGridRankingResultDTO>> gridRanking(EpdcScreenGridRankingFormDTO dto) {
return userFeignClient.gridRanking(dto);
}
@Override
public Result<PageData<EpdcScreenHouseInfoByPeopleResultDTO>> selectHouseByPeople(EpdcScreenHouseInfoByPeopleFormDTO dto) {
return userFeignClient.selectHouseByPeople(dto);
}
@Override
public Result<PageData<EpdcScreenPopulationInfoByHouseResultDTO>> selectPeopleByHouse(EpdcScreenPopulationInfoByHouseFormDTO dto) {
return userFeignClient.selectPeopleByHouse(dto);
}
@Override
public Result<PageData<EpdcScreenResidentInfoByCurrentAddressResultDTO>> selectPeopleByCurrentAddress(EpdcScreenResidentInfoByCurrentAddressFormDTO dto) {
return userFeignClient.selectPeopleByCurrentAddress(dto);
}
}

8
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/resources/application.yml

@ -145,4 +145,10 @@ rocketmq:
group: @rocketmq.producer.group@
consumer:
group: @rocketmq.consumer.group@
points-group: @rocketmq.consumer.points.group@
points-group: @rocketmq.consumer.points.group@
js:
screen:
population:
screenAppId: 9ce9fc63460401e7a3b3a6cab3b9c126

31
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EpdcEventsServiceImpl.java

@ -23,6 +23,7 @@ import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.commons.tools.constant.NumConstant;
import com.elink.esua.epdc.commons.tools.constant.OrganizationTypeConstant;
import com.elink.esua.epdc.commons.tools.exception.RenException;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.security.content.CheckDataUtils;
import com.elink.esua.epdc.commons.tools.security.content.ModuleName;
@ -258,6 +259,9 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEv
|| "".equals(dto.getCategoryId()))) {
return new Result().error("分类信息不能为空");
}
// 事件审核校验
checkEventReview(dto.getId(), dto.getEventState());
EpdcEventsEntity entity = new EpdcEventsEntity();
entity.setId(dto.getId());
entity.setEventState(dto.getEventState());
@ -739,4 +743,31 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEv
return eventTagService.listOfEventTags();
}
/**
* 事件审核校验
*
* @param eventId 事件ID
* @param eventState 事件状态
* @return void
* @author Liuchuang
* @since 2020/9/16 10:18
*/
private void checkEventReview(String eventId, int eventState) {
boolean checkResult;
if (EventIssueItemState.EVENT_REVIEW_PASS == eventState) {
int issueCount = issueService.selectIssueCountByEventId(eventId);
checkResult = issueCount > NumConstant.ZERO;
} else if (EventIssueItemState.EVENT_REVIEW_TO_ITEM == eventState) {
int itemCount = itemService.selectItemCountByEventId(eventId);
checkResult = itemCount > NumConstant.ZERO;
} else {
EpdcEventsEntity entity = baseDao.selectById(eventId);
checkResult = eventState == entity.getEventState();
}
if (checkResult) {
throw new RenException("该事件已审核,请勿重复操作");
}
}
}

10
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/service/IssueService.java

@ -284,4 +284,14 @@ public interface IssueService extends BaseService<IssueEntity> {
* @since 2020/3/7 12:50
*/
void modifyPartyGroupName(List<GroupFormDTO> groups);
/**
* 根据事件ID获取议题数量
*
* @param eventId 事件ID
* @return int
* @author Liuchuang
* @since 2020/9/16 10:31
*/
int selectIssueCountByEventId(String eventId);
}

30
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/service/impl/IssueServiceImpl.java

@ -189,6 +189,9 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
@Override
@Transactional(rollbackFor = Exception.class)
public Result saveIssueHandleResult(IssueWaitHandleSubmitFormDTO dto) {
// 转项目校验
checkChangeToItem(dto.getId(), dto.getState());
IssueHandleEntity handleEntity = new IssueHandleEntity();
handleEntity.setAdvice(dto.getAdvice());
handleEntity.setState(dto.getState());
@ -696,4 +699,31 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
return new Result();
}
@Override
public int selectIssueCountByEventId(String eventId) {
QueryWrapper<IssueEntity> wrapper = new QueryWrapper<>();
wrapper.eq(FieldConstant.EVENT_ID, eventId);
return baseDao.selectCount(wrapper);
}
/**
* 议题转项目校验
*
* @param issueId 议题ID
* @param state 状态
* @return void
* @author Liuchuang
* @since 2020/9/16 11:11
*/
private void checkChangeToItem(String issueId, int state) {
if(EventIssueItemState.ISSUE_CHANGE_TO_ITEM_AND_CIRCULATION_ASSISTANCE == state
|| EventIssueItemState.ISSUE_CHANGE_TO_ITEM == state) {
int itemCount = itemService.selectItemCountByIssueId(issueId);
if (itemCount > NumConstant.ZERO) {
throw new RenException("该议题已转为项目,请勿重复操作");
}
}
}
}

20
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemService.java

@ -387,4 +387,24 @@ public interface ItemService extends BaseService<ItemEntity> {
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
Result rejectItemSatisfactionInfo(RejectRecordDTO dto);
/**
* 根据事件ID获取项目数量
*
* @param eventId 事件ID
* @return int
* @author Liuchuang
* @since 2020/9/16 10:37
*/
int selectItemCountByEventId(String eventId);
/**
* 根据议题ID获取项目数量
*
* @param issueId 议题ID
* @return int
* @author Liuchuang
* @since 2020/9/16 10:37
*/
int selectItemCountByIssueId(String issueId);
}

17
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java

@ -74,6 +74,7 @@ import com.elink.esua.epdc.modules.feign.ContentSecurityFeignClient;
import com.elink.esua.epdc.modules.feign.UserFeignClient;
import com.elink.esua.epdc.modules.interfacelog.entity.InterfaceLogEntity;
import com.elink.esua.epdc.modules.interfacelog.service.InterfaceLogService;
import com.elink.esua.epdc.modules.issue.entity.IssueEntity;
import com.elink.esua.epdc.modules.issue.service.IssueService;
import com.elink.esua.epdc.modules.item.dao.GridPlatformHandleLogDao;
import com.elink.esua.epdc.modules.item.dao.ItemDao;
@ -1546,4 +1547,20 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
baseDao.rejectItemSatisfactionInfo(dto.getRelationId());
return new Result();
}
@Override
public int selectItemCountByEventId(String eventId) {
QueryWrapper<ItemEntity> wrapper = new QueryWrapper<>();
wrapper.eq(FieldConstant.EVENT_ID, eventId);
return baseDao.selectCount(wrapper);
}
@Override
public int selectItemCountByIssueId(String issueId) {
QueryWrapper<ItemEntity> wrapper = new QueryWrapper<>();
wrapper.eq(FieldConstant.ISSUE_ID, issueId);
return baseDao.selectCount(wrapper);
}
}

33
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActInfoServiceImpl.java

@ -50,6 +50,7 @@ import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.constant.*;
import com.elink.esua.epdc.dto.ScheduleJobDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeUpdateFormDTO;
import com.elink.esua.epdc.modules.activity.dao.*;
import com.elink.esua.epdc.modules.activity.entity.ActBannerEntity;
import com.elink.esua.epdc.modules.activity.entity.ActInfoEntity;
@ -68,8 +69,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
/**
* 活动信息表
@ -247,6 +250,8 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit
}
//内容审核 - end
ActInfoEntity entity = ConvertUtils.sourceToTarget(dto, ActInfoEntity.class);
//如果更新了公益时长,则更新相关确认积分的志愿者的公益时长
updateKindnessTime(dto);
updateById(entity);
//内容审核- 开始
//接口异常,保存至待审核信息
@ -276,6 +281,34 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit
//内容审核 - 结束
return new Result();
}
/**
* @Description 更新志愿者公益时长
* @Author songyunpeng
* @Date 2020/9/11
* @Param [dto]
* @return void
**/
private void updateKindnessTime(ActInfoDTO dto) {
ActInfoEntity oldActInfoEntity = selectById(dto.getId());
if(dto.getKindnessTime() == oldActInfoEntity.getKindnessTime()){
return;
}
//查询出所有的此活动下已确认积分的用户列表ID
Map<String,Object> params = new HashMap<>();
params.put("ACT_ID",dto.getId());
params.put("STATUS","5");
List<ActUserRelationEntity> actUserRelationEntities = actUserRelationDao.selectByMap(params);
if(actUserRelationEntities==null || actUserRelationEntities.size() == 0){
return;
}
List<String> userIds = actUserRelationEntities.stream().map(ActUserRelationEntity::getUserId).collect(Collectors.toList());
EpdcVolunteerKindnessTimeUpdateFormDTO epdcVolunteerKindnessTimeUpdateFormDTO = new EpdcVolunteerKindnessTimeUpdateFormDTO();
//更改的值减去原先的值 若是正的,则代表加上时长差 若是负的 则代表减去时长差
epdcVolunteerKindnessTimeUpdateFormDTO.setKindnessTime(new BigDecimal(dto.getKindnessTime()-oldActInfoEntity.getKindnessTime()));
epdcVolunteerKindnessTimeUpdateFormDTO.setUserIds(userIds);
userInfoFeignClient.updateKindnessTime(epdcVolunteerKindnessTimeUpdateFormDTO);
}
/**
* 活动列表-移动app端用

10
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/UserInfoFeignClient.java

@ -6,6 +6,7 @@ import com.elink.esua.epdc.dto.UserDTO;
import com.elink.esua.epdc.dto.VolunteerInfoDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcUserPointsFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeUpdateFormDTO;
import com.elink.esua.epdc.modules.feign.fallback.UserInfoFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
@ -79,4 +80,13 @@ public interface UserInfoFeignClient {
*/
@PostMapping(value = "app-user/volunteerinfo/addKindnessTime", consumes = MediaType.APPLICATION_JSON_VALUE)
Result addKindnessTime(EpdcVolunteerKindnessTimeFormDTO formDto);
/**
* @Description 更新志愿者爱心活动时长
* @Author songyunpeng
* @Date 2020/9/11
* @Param [formDto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@PostMapping(value = "app-user/volunteerinfo/updateKindnessTime", consumes = MediaType.APPLICATION_JSON_VALUE)
Result updateKindnessTime(EpdcVolunteerKindnessTimeUpdateFormDTO formDto);
}

6
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/UserInfoFeignClientFallback.java

@ -7,6 +7,7 @@ import com.elink.esua.epdc.dto.UserDTO;
import com.elink.esua.epdc.dto.VolunteerInfoDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcUserPointsFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeUpdateFormDTO;
import com.elink.esua.epdc.modules.feign.UserInfoFeignClient;
import org.springframework.stereotype.Component;
@ -45,4 +46,9 @@ public class UserInfoFeignClientFallback implements UserInfoFeignClient {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "addKindnessTime", formDto);
}
@Override
public Result updateKindnessTime(EpdcVolunteerKindnessTimeUpdateFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "updateKindnessTime", formDto);
}
}

5
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/form/PartyGroupTopicTopFormDTO.java

@ -31,4 +31,9 @@ public class PartyGroupTopicTopFormDTO implements Serializable {
* 用户ID
*/
private String userId;
/**
* 系统标识0-居民端1-pc端
*/
private String systemFlag;
}

5
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/result/PartyGroupOfficialsResultDTO.java

@ -64,6 +64,9 @@ public class PartyGroupOfficialsResultDTO implements Serializable {
*/
private String areaResponsibility;
/**
* 职责
*/
private String duty;
}

2
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/controller/AppPartyTopicController.java

@ -18,6 +18,7 @@
package com.elink.esua.epdc.controller;
import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.constant.NumConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.dto.form.*;
@ -126,6 +127,7 @@ public class AppPartyTopicController {
*/
@PostMapping("top")
public Result topicTop(@RequestBody PartyGroupTopicTopFormDTO formDto) {
formDto.setSystemFlag(NumConstant.ZERO_STR);
return partyTopicService.modifyTopicTopFlag(formDto);
}

17
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/controller/PartyTopicController.java

@ -17,6 +17,7 @@
package com.elink.esua.epdc.controller;
import com.elink.esua.epdc.commons.tools.constant.NumConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
@ -27,6 +28,7 @@ import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.dto.GroupTopicCloseFormDTO;
import com.elink.esua.epdc.dto.PartyTopicDTO;
import com.elink.esua.epdc.dto.form.PartyGroupTopicTopFormDTO;
import com.elink.esua.epdc.excel.PartyTopicExcel;
import com.elink.esua.epdc.service.PartyTopicService;
import org.springframework.beans.factory.annotation.Autowired;
@ -98,4 +100,19 @@ public class PartyTopicController {
return partyTopicService.modifyTopicState(formDto);
}
/**
* 话题置顶或取消置顶
*
* @param formDto 参数
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @author Liuchuang
* @since 2020/9/8 9:33
*/
@PostMapping("top")
public Result topicTop(@RequestBody PartyGroupTopicTopFormDTO formDto) {
ValidatorUtils.validateEntity(formDto);
formDto.setSystemFlag(NumConstant.ONE_STR);
return partyTopicService.modifyTopicTopFlag(formDto);
}
}

10
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java

@ -325,10 +325,12 @@ public class PartyTopicServiceImpl extends BaseServiceImpl<PartyTopicDao, PartyT
@Override
public Result modifyTopicTopFlag(PartyGroupTopicTopFormDTO formDto) {
// 校验用户是否是群主或者副群主
int num = baseDao.selectGroupUserByUserIdAndTopicId(formDto);
if (num <= NumConstant.ZERO) {
return new Result().error("您不是群主或副群主,不能进行置顶操作");
if (NumConstant.ZERO_STR.equals(formDto.getSystemFlag())) {
// 校验用户是否是群主或者副群主
int num = baseDao.selectGroupUserByUserIdAndTopicId(formDto);
if (num <= NumConstant.ZERO) {
return new Result().error("您不是群主或副群主,不能进行置顶操作");
}
}
// 更新话题置顶状态

8
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyTopicDao.xml

@ -32,6 +32,8 @@
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
<result property="topFlag" column="TOP_FLAG"/>
<result property="topTime" column="TOP_TIME"/>
</resultMap>
@ -64,7 +66,9 @@
t.CREATED_BY,
t.CREATED_TIME,
t.UPDATED_BY,
t.UPDATED_TIME
t.UPDATED_TIME,
t.TOP_FLAG,
t.TOP_TIME
from epdc_party_topic t
where t.DEL_FLAG ='0'
<if test="groupId!=null and groupId!=''">
@ -79,7 +83,7 @@
<if test="endTime != null and endTime != '' ">
<![CDATA[ and t.CREATED_TIME <= ]]> #{endTime}
</if>
order by CREATED_TIME desc
order by t.TOP_TIME DESC, t.CREATED_TIME desc
</select>
<resultMap id="topicDetail" type="com.elink.esua.epdc.dto.PartyTopicDTO">

17
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/constant/HouseHeadRelationConstant.java

@ -0,0 +1,17 @@
package com.elink.esua.epdc.constant;
/**
* @author: songyunpeng
* @Date: 2020/08/19 14:12
* @Description: 房屋用处
*/
public interface HouseHeadRelationConstant {
String CHILDREN = "0";
String HUSBAND_AND_WIFE = "1";
String PARENT = "2";
String OTHER = "3";
}

19
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/constant/PopulationIdentify.java

@ -0,0 +1,19 @@
package com.elink.esua.epdc.constant;
/**
* @author songyunpeng
* @Description 人口信息 人口身份标识
* @create 2020-09-14
*/
public interface PopulationIdentify {
String PROPERTY_OWNER = "0";
String HOUSE_HEAD = "1";
String HOUSE_RESIDENT = "2";
}

2
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/HousingInformationDTO.java

@ -48,7 +48,7 @@ public class HousingInformationDTO implements Serializable {
/**
* 购房时间
*/
private Date buyingTime;
private String buyingTime;
/**
* 房屋面积

4
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/PopulationInformationDTO.java

@ -73,7 +73,7 @@ public class PopulationInformationDTO implements Serializable {
/**
* 入党时间
*/
private Date joinTime;
private String joinTime;
/**
* 组织关系所在地
@ -148,7 +148,7 @@ public class PopulationInformationDTO implements Serializable {
/**
* 失业登记时间
*/
private Date unemploymentRegisterTime;
private String unemploymentRegisterTime;
/**
* 家庭类别 (0普通家庭 1五好家庭 2军烈家庭 3优抚家庭 4单亲家庭 5空巢老人 6困难家庭)

34
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcScreenGridRankingFormDTO.java

@ -0,0 +1,34 @@
package com.elink.esua.epdc.dto.epdc.form;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
/**
* @author songyunpeng
* @Description 大屏网格排名参数
* @create 2020-09-14
*/
@Data
public class EpdcScreenGridRankingFormDTO {
/**
* 页码
*/
@Min(value = 0, message = "页码必须大于0")
private Integer pageIndex;
/**
* 页容量
*/
@Min(value = 0, message = "页容量必须大于0")
private Integer pageSize;
/**
* 排序依据
*/
@NotBlank(message = "排序依据不能为空")
private String rankCategory;
}

34
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcScreenHouseInfoByPeopleFormDTO.java

@ -0,0 +1,34 @@
package com.elink.esua.epdc.dto.epdc.form;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
/**
* @author songyunpeng
* @Description 大屏以人找房参数
* @create 2020-09-14
*/
@Data
public class EpdcScreenHouseInfoByPeopleFormDTO {
/**
* 页码
*/
@Min(value = 0, message = "页码必须大于0")
private Integer pageIndex;
/**
* 页容量
*/
@Min(value = 0, message = "页容量必须大于0")
private Integer pageSize;
/**
* 户主姓名
*/
@NotBlank(message = "户主姓名不能为空")
private String houseHeadName;
}

34
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcScreenPopulationInfoByHouseFormDTO.java

@ -0,0 +1,34 @@
package com.elink.esua.epdc.dto.epdc.form;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
/**
* @author songyunpeng
* @Description 大屏以房找人参数
* @create 2020-09-14
*/
@Data
public class EpdcScreenPopulationInfoByHouseFormDTO {
/**
* 页码
*/
@Min(value = 0, message = "页码必须大于0")
private Integer pageIndex;
/**
* 页容量
*/
@Min(value = 0, message = "页容量必须大于0")
private Integer pageSize;
/**
* 房屋地址
*/
@NotBlank(message = "房屋地址不能为空")
private String houseAddress;
}

34
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcScreenResidentInfoByCurrentAddressFormDTO.java

@ -0,0 +1,34 @@
package com.elink.esua.epdc.dto.epdc.form;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
/**
* @author songyunpeng
* @Description 大屏以人找人参数
* @create 2020-09-14
*/
@Data
public class EpdcScreenResidentInfoByCurrentAddressFormDTO {
/**
* 页码
*/
@Min(value = 0, message = "页码必须大于0")
private Integer pageIndex;
/**
* 页容量
*/
@Min(value = 0, message = "页容量必须大于0")
private Integer pageSize;
/**
* 当前居住地址
*/
@NotBlank(message = "居住地址不能为空")
private String currentAddress;
}

24
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcScreenSelectPeopleDetailFormDTO.java

@ -0,0 +1,24 @@
package com.elink.esua.epdc.dto.epdc.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @author songyunpeng
* @Description 大屏找人接口详情参数
* @create 2020-09-14
*/
@Data
public class EpdcScreenSelectPeopleDetailFormDTO {
/**
* 人口ID
*/
private String populationId;
/**
* 身份标识
*/
@NotBlank(message = "身份标识不能为空")
private String identifyFlag;
}

43
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcScreenSelectPeopleFormDTO.java

@ -0,0 +1,43 @@
package com.elink.esua.epdc.dto.epdc.form;
import lombok.Data;
import javax.validation.constraints.Min;
/**
* @author songyunpeng
* @Description 大屏找人接口参数
* @create 2020-09-14
*/
@Data
public class EpdcScreenSelectPeopleFormDTO {
/**
* 页码
*/
@Min(value = 1, message = "页码必须大于0")
private Integer pageIndex;
/**
* 页容量
*/
@Min(value = 1, message = "页容量必须大于0")
private Integer pageSize;
/**
* 姓名
*/
private String name;
/**
* 社区ID
*/
private String communityId;
/**
* 电话
*/
private String phone;
/**
* 网格ID
*/
private String gridId;
}

29
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcVolunteerKindnessTimeUpdateFormDTO.java

@ -0,0 +1,29 @@
package com.elink.esua.epdc.dto.epdc.form;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
*
* 增加志愿者爱心时长Form DTO
*
* @Authorliuchuang
* @Date2020/2/7 18:29
*/
@Data
public class EpdcVolunteerKindnessTimeUpdateFormDTO implements Serializable {
private static final long serialVersionUID = 6680590022205970530L;
/**
* 爱心时长
*/
private BigDecimal kindnessTime;
/**
* 用户ID
*/
private List<String> userIds;
}

20
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcScreenGridRankingResultDTO.java

@ -0,0 +1,20 @@
package com.elink.esua.epdc.dto.epdc.result;
import lombok.Data;
/**
* @author songyunpeng
* @Description 大屏房屋用途接口结果
* @create 2020-09-14
*/
@Data
public class EpdcScreenGridRankingResultDTO {
/**
* 网格名
*/
private String gridName;
/**
* 数量
*/
private Integer total;
}

37
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcScreenHouseInfoByPeopleResultDTO.java

@ -0,0 +1,37 @@
package com.elink.esua.epdc.dto.epdc.result;
import lombok.Data;
/**
* @author songyunpeng
* @Description 大屏以人找房结果
* @create 2020-09-14
*/
@Data
public class EpdcScreenHouseInfoByPeopleResultDTO {
/**
* ID
*/
private String populationId;
/**
* 身份标识
*/
private String identityFlag;
/**
* 户主姓名
*/
private String houseHeadName;
/**
* 网格名称
*/
private String gridName;
/**
* 房屋地址
*/
private String houseAddress;
/**
* 户主联系电话
*/
private String houseHeadPhone;
}

58
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcScreenHouseUseResultDTO.java

@ -0,0 +1,58 @@
package com.elink.esua.epdc.dto.epdc.result;
import lombok.Data;
/**
* @author songyunpeng
* @Description 大屏房屋用途接口结果
* @create 2020-09-14
*/
@Data
public class EpdcScreenHouseUseResultDTO {
/**
* 房屋数量
*/
private Integer houseNum;
/**
* 人口数量
*/
private Integer populationNum;
/**
* 机动车数量
*/
private Integer motorVehicleNum;
/**
* 党员
*/
private Integer partyMemberNum;
/**
* 企业数量
*/
private Integer enterpriseNum;
/**
* 租赁数量
*/
private Integer rentNumber;
/**
* 自住数量
*/
private Integer sinceTheLivingNumber;
/**
* 经营数量
*/
private Integer businessNumber;
/**
* 租赁百分比
*/
private Integer rentPercent;
/**
* 自住百分比
*/
private Integer sinceTheLivingNumberPercent;
/**
* 经营百分比
*/
private Integer businessPercent;
}

37
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcScreenPopulationInfoByHouseResultDTO.java

@ -0,0 +1,37 @@
package com.elink.esua.epdc.dto.epdc.result;
import lombok.Data;
/**
* @author songyunpeng
* @Description 大屏以房找人结果
* @create 2020-09-14
*/
@Data
public class EpdcScreenPopulationInfoByHouseResultDTO {
/**
* ID
*/
private String populationId;
/**
* 身份标识
*/
private String identityFlag;
/**
* 户主姓名
*/
private String houseHeadName;
/**
* 网格名称
*/
private String gridName;
/**
* 房屋地址
*/
private String houseAddress;
/**
* 户主联系电话
*/
private String houseHeadPhone;
}

30
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcScreenResidentInfoByCurrentAddressResultDTO.java

@ -0,0 +1,30 @@
package com.elink.esua.epdc.dto.epdc.result;
import lombok.Data;
/**
* @author songyunpeng
* @Description 大屏以人找人结果
* @create 2020-09-14
*/
@Data
public class EpdcScreenResidentInfoByCurrentAddressResultDTO {
/**
* ID
*/
private String populationId;
/**
* 身份标识
*/
private String identityFlag;
/**
* 居住人姓名
*/
private String residentName;
/**
* 当前居住地址
*/
private String currentAddress;
}

38
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcScreenSelectPeopleDetailResultDTO.java

@ -0,0 +1,38 @@
package com.elink.esua.epdc.dto.epdc.result;
import lombok.Data;
import java.util.List;
/**
* @author songyunpeng
* @Description 大屏找人详情接口结果
* @create 2020-09-14
*/
@Data
public class EpdcScreenSelectPeopleDetailResultDTO {
/**
* 姓名
*/
private String name;
/**
* 性别
*/
private String sex;
/**
* 年龄
*/
private String age;
/**
* 电话
*/
private String phone;
/**
* 房屋信息
*/
List<HousingInfo> housingInfo;
/**
* 家庭成员信息
*/
List<FamilyMember> familyMember;
}

32
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcScreenSelectPeopleResultDTO.java

@ -0,0 +1,32 @@
package com.elink.esua.epdc.dto.epdc.result;
import lombok.Data;
/**
* @author songyunpeng
* @Description 大屏找人接口结果
* @create 2020-09-14
*/
@Data
public class EpdcScreenSelectPeopleResultDTO {
/**
* 姓名
*/
private String name;
/**
* 网格名
*/
private String gridName;
/**
* 身份
*/
private String identityName;
/**
* 身份标识
*/
private String identityFlag;
/**
* 居民ID
*/
private String populationId;
}

25
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/FamilyMember.java

@ -0,0 +1,25 @@
package com.elink.esua.epdc.dto.epdc.result;
import lombok.Data;
/**
* @author songyunpeng
* @Description 大屏找人详情接口 家庭成员信息
* @create 2020-09-14
*/
@Data
public class FamilyMember {
/**
* 姓名
*/
private String name;
/**
* 关系
*/
private String relation;
/**
* 居住地
*/
private String currentAddress;
}

28
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/HousingInfo.java

@ -0,0 +1,28 @@
package com.elink.esua.epdc.dto.epdc.result;
import lombok.Data;
import java.math.BigDecimal;
/**
* @author songyunpeng
* @Description 大屏详情接口 房屋信息
* @create 2020-09-14
*/
@Data
public class HousingInfo {
/**
* 房屋地址
*/
private String houseAddress;
/**
* 房屋面积
*/
private BigDecimal houseArea;
/**
* 房屋用途
*/
private String houseUse;
}

131
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/EpdcScreenPopulationInformationController.java

@ -0,0 +1,131 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.controller;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.epdc.form.*;
import com.elink.esua.epdc.dto.epdc.result.*;
import com.elink.esua.epdc.service.PopulationInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 大屏接口
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-08-19
*/
@RestController
@RequestMapping("screenPopulationInfo")
public class EpdcScreenPopulationInformationController {
@Autowired
private PopulationInformationService populationInformationService;
/**
* @Description 一人找房接口
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.epdc.result.EpdcScreenHouseInfoByPeopleResultDTO>>
**/
@PostMapping("selectHouseByPeople")
public Result<PageData<EpdcScreenHouseInfoByPeopleResultDTO>> selectHouseByPeople(@RequestBody EpdcScreenHouseInfoByPeopleFormDTO dto){
return new Result<PageData<EpdcScreenHouseInfoByPeopleResultDTO>>().ok(populationInformationService.selectHouseByPeople(dto));
}
/**
* @Description 以房找人接口
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.epdc.result.EpdcScreenPopulationInfoByHouseResultDTO>>
**/
@PostMapping("selectPeopleByHouse")
public Result<PageData<EpdcScreenPopulationInfoByHouseResultDTO>> selectPeopleByHouse(@RequestBody EpdcScreenPopulationInfoByHouseFormDTO dto){
return new Result<PageData<EpdcScreenPopulationInfoByHouseResultDTO>>().ok(populationInformationService.selectPeopleByHouse(dto));
}
/**
* @Description 以人找人接口
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.epdc.result.EpdcScreenPopulationInfoByHouseResultDTO>>
**/
@PostMapping("selectPeopleByCurrentAddress")
public Result<PageData<EpdcScreenResidentInfoByCurrentAddressResultDTO>> selectPeopleByCurrentAddress(@RequestBody EpdcScreenResidentInfoByCurrentAddressFormDTO dto){
return new Result<PageData<EpdcScreenResidentInfoByCurrentAddressResultDTO>>().ok(populationInformationService.selectPeopleByCurrentAddress(dto));
}
/**
* @Description 大屏找人详情接口
* @Author songyunpeng
* @Date 2020/9/14
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcScreenSelectPeopleDetailResultDTO>
**/
@PostMapping("selectPeopleDetail")
public Result<EpdcScreenSelectPeopleDetailResultDTO> selectPeopleDetail(@RequestBody EpdcScreenSelectPeopleDetailFormDTO dto){
return populationInformationService.selectPeopleDetail(dto);
}
/**
* @Description 大屏找人接口
* @Author songyunpeng
* @Date 2020/9/14
* @Param [epdcScreenSelectPeopleFormDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenSelectPeopleResultDTO>>
**/
@PostMapping("selectPeople")
@Deprecated
public Result<PageData<EpdcScreenSelectPeopleResultDTO>> selectPeople(@RequestBody EpdcScreenSelectPeopleFormDTO dto){
return new Result<PageData<EpdcScreenSelectPeopleResultDTO>>().ok(populationInformationService.selectPeople(dto));
}
/**
* @Description 房屋用途数据接口
* @Author songyunpeng
* @Date 2020/9/15
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcScreenHouseUseResultDTO>
**/
@PostMapping("housingUse")
@Deprecated
public Result<EpdcScreenHouseUseResultDTO> housingUse(){
return populationInformationService.housingUse();
}
/**
* @Description 网格排名
* @Author songyunpeng
* @Date 2020/9/15
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcScreenGridRankingResultDTO>
**/
@PostMapping("gridRanking")
@Deprecated
public Result<PageData<EpdcScreenGridRankingResultDTO>> gridRanking(@RequestBody EpdcScreenGridRankingFormDTO dto){
return new Result<PageData<EpdcScreenGridRankingResultDTO>>().ok(populationInformationService.gridRanking(dto));
}
}

14
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerInfoController.java

@ -24,9 +24,9 @@ import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.dto.VolunteerInfoDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeUpdateFormDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcAdjustVolunteerPointsDTO;
import com.elink.esua.epdc.excel.VolunteerInfoExcel;
import com.elink.esua.epdc.service.UserTagService;
@ -189,4 +189,16 @@ public class VolunteerInfoController {
return volunteerInfoService.modifyVolunteerKindnessTime(formDto);
}
/**
* @Description 更新志愿者爱心时长
* @Author songyunpeng
* @Date 2020/9/11
* @Param [formDto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@PostMapping("updateKindnessTime")
public Result updateKindnessTime(@RequestBody EpdcVolunteerKindnessTimeUpdateFormDTO formDto) {
return volunteerInfoService.updateKindnessTime(formDto);
}
}

8
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/HousingInformationDao.java

@ -69,4 +69,12 @@ public interface HousingInformationDao extends BaseDao<HousingInformationEntity>
* @return java.util.List<com.elink.esua.epdc.dto.BaseResidentInformationExportDto>
**/
List<BaseResidentInformationExportDto> selectBaseResidentInformationExcelList(@Param("houseHeadIds") Set<String> houseHeadIds);
/**
* @Description 根据户主ID获取所有房子信息
* @Author songyunpeng
* @Date 2020/9/14
* @Param [houseHeadId]
* @return java.util.List<com.elink.esua.epdc.dto.HousingInformationDTO>
**/
List<HousingInformationDTO> getHouseInfoByHouseHeadID(String houseHeadId);
}

89
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/PopulationInformationDao.java

@ -20,6 +20,8 @@ package com.elink.esua.epdc.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.dto.PopulationInfoOverviewDTO;
import com.elink.esua.epdc.dto.PopulationInformationDTO;
import com.elink.esua.epdc.dto.epdc.form.*;
import com.elink.esua.epdc.dto.epdc.result.*;
import com.elink.esua.epdc.entity.PopulationInformationEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -100,4 +102,91 @@ public interface PopulationInformationDao extends BaseDao<PopulationInformationE
* @return void
**/
void setUnemploymentRegisterTimeToNull(@Param("id")String id);
/**
* @Description 大屏找人接口
* @Author songyunpeng
* @Date 2020/9/14
* @Param [dto]
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenSelectPeopleResultDTO>
**/
List<EpdcScreenSelectPeopleResultDTO> selectListPeople(EpdcScreenSelectPeopleFormDTO dto);/**
* @Description 大屏找人接口 - count
* @Author songyunpeng
* @Date 2020/9/14
* @Param [dto]
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenSelectPeopleResultDTO>
**/
Integer selectCountListPeople(EpdcScreenSelectPeopleFormDTO dto);
/**
* @Description 房屋用途数据接口
* @Author songyunpeng
* @Date 2020/9/15
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcScreenHouseUseResultDTO>
**/
EpdcScreenHouseUseResultDTO selectHouseUseDataForScreen();
/**
* @Description 网格排名
* @Author songyunpeng
* @Date 2020/9/15
* @Param [dto]
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenGridRankingResultDTO>
**/
List<EpdcScreenGridRankingResultDTO> selectListGridRanking(EpdcScreenGridRankingFormDTO dto);
/**
* @Description 网格排名 count
* @Author songyunpeng
* @Date 2020/9/15
* @Param [dto]
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenGridRankingResultDTO>
**/
Integer selectCountListGridRanking(EpdcScreenGridRankingFormDTO dto);
/**
* @Description 一人找房接口
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenHouseInfoByPeopleResultDTO>
**/
List<EpdcScreenHouseInfoByPeopleResultDTO> selectHouseByPeople(EpdcScreenHouseInfoByPeopleFormDTO dto);
/**
* @Description 一人找房接口 - count
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenHouseInfoByPeopleResultDTO>
**/
Integer selectCountHouseByPeople(EpdcScreenHouseInfoByPeopleFormDTO dto);
/**
* @Description 以房找人
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenPopulationInfoByHouseResultDTO>
**/
List<EpdcScreenPopulationInfoByHouseResultDTO> selectPeopleByHouse(EpdcScreenPopulationInfoByHouseFormDTO dto);
/**
* @Description 以房找人 - count
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenPopulationInfoByHouseResultDTO>
**/
Integer selectCountPeopleByHouse(EpdcScreenPopulationInfoByHouseFormDTO dto);
/**
* @Description 以人找人
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenResidentInfoByCurrentAddressResultDTO>
**/
List<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddress(EpdcScreenResidentInfoByCurrentAddressFormDTO dto);
/**
* @Description 以人找人 - count
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return java.lang.Integer
**/
Integer selectCountPeopleByCurrentAddress(EpdcScreenResidentInfoByCurrentAddressFormDTO dto);
}

9
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java

@ -22,6 +22,7 @@ import com.elink.esua.epdc.dto.UserTagDTO;
import com.elink.esua.epdc.dto.VolunteerInfoDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcAppVolunteerListFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeUpdateFormDTO;
import com.elink.esua.epdc.dto.epdc.form.v2.EpdcCompleteVolunteerInfoV2FormDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcAdjustVolunteerPointsDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcAppVolunteerListResultDTO;
@ -159,4 +160,12 @@ public interface VolunteerInfoDao extends BaseDao<VolunteerInfoEntity> {
* @date 2020/7/20 10:53
*/
Integer selectListVolunteerCount();
/**
* @Description 更新公益时长
* @Author songyunpeng
* @Date 2020/9/11
* @Param [formDto]
* @return void
**/
void updateKindnessTime(EpdcVolunteerKindnessTimeUpdateFormDTO formDto);
}

4
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/HousingInformationEntity.java

@ -18,13 +18,11 @@
package com.elink.esua.epdc.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.util.Date;
/**
* 房屋信息表
@ -47,7 +45,7 @@ public class HousingInformationEntity extends BaseEpdcEntity {
/**
* 购房时间
*/
private Date buyingTime;
private String buyingTime;
/**
* 房屋面积

4
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/PopulationInformationEntity.java

@ -71,7 +71,7 @@ public class PopulationInformationEntity extends BaseEpdcEntity {
/**
* 入党时间
*/
private Date joinTime;
private String joinTime;
/**
* 组织关系所在地
@ -146,7 +146,7 @@ public class PopulationInformationEntity extends BaseEpdcEntity {
/**
* 失业登记时间
*/
private Date unemploymentRegisterTime;
private String unemploymentRegisterTime;
/**
* 家庭类别 (0普通家庭 1五好家庭 2军烈家庭 3优抚家庭 4单亲家庭 5空巢老人 6困难家庭)

3
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/BasePopulationInformationExcel.java

@ -50,9 +50,6 @@ public class BasePopulationInformationExcel {
@Excel(name = "产权人联系电话",width = 20)
private String propertyOwnerMobile;
@Excel(name = "产权证")
private String propertyOwnerCard;
@Excel(name = "房屋用途",replace = {"自住_0","租赁_1","经营_2"})
private String houseUse;

8
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/HousingInformationService.java

@ -129,4 +129,12 @@ public interface HousingInformationService extends BaseService<HousingInformatio
* @return java.util.List<com.elink.esua.epdc.dto.BaseResidentInformationExportDto>
**/
List<BaseResidentInformationExportDto> selectBaseResidentInformationExcelList(Set<String> houseHeadIds);
/**
* @Description 根据户主ID获取所有房子信息
* @Author songyunpeng
* @Date 2020/9/14
* @Param [populationId]
* @return java.util.List<com.elink.esua.epdc.dto.HousingInformationDTO>
**/
List<HousingInformationDTO> getHouseInfoByHouseHeadID(String houseHeadId);
}

58
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/PopulationInformationService.java

@ -22,6 +22,8 @@ import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.PopulationInfoOverviewDTO;
import com.elink.esua.epdc.dto.PopulationInformationDTO;
import com.elink.esua.epdc.dto.epdc.form.*;
import com.elink.esua.epdc.dto.epdc.result.*;
import com.elink.esua.epdc.entity.PopulationInformationEntity;
import java.util.List;
@ -159,4 +161,60 @@ public interface PopulationInformationService extends BaseService<PopulationInfo
* @return void
**/
void setUnemploymentRegisterTimeToNull(String id);
/**
* @Description 大屏找人接口
* @Author songyunpeng
* @Date 2020/9/14
* @Param [epdcScreenSelectPeopleFormDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenSelectPeopleResultDTO>>
**/
PageData<EpdcScreenSelectPeopleResultDTO> selectPeople(EpdcScreenSelectPeopleFormDTO epdcScreenSelectPeopleFormDTO);
/**
* @Description 大屏找人详情接口
* @Author songyunpeng
* @Date 2020/9/14
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcScreenSelectPeopleDetailResultDTO>
**/
Result<EpdcScreenSelectPeopleDetailResultDTO> selectPeopleDetail(EpdcScreenSelectPeopleDetailFormDTO dto);
/**
* @Description 房屋用途数据接口
* @Author songyunpeng
* @Date 2020/9/15
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcScreenHouseUseResultDTO>
**/
Result<EpdcScreenHouseUseResultDTO> housingUse();
/**
* @Description 网格排名
* @Author songyunpeng
* @Date 2020/9/15
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcScreenGridRankingResultDTO>
**/
PageData<EpdcScreenGridRankingResultDTO> gridRanking(EpdcScreenGridRankingFormDTO dto);
/**
* @Description 一人找房接口
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.epdc.result.EpdcScreenSelectPeopleResultDTO>
**/
PageData<EpdcScreenHouseInfoByPeopleResultDTO> selectHouseByPeople(EpdcScreenHouseInfoByPeopleFormDTO dto);
/**
* @Description 以房找人接口
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.epdc.result.EpdcScreenPopulationInfoByHouseResultDTO>
**/
PageData<EpdcScreenPopulationInfoByHouseResultDTO> selectPeopleByHouse(EpdcScreenPopulationInfoByHouseFormDTO dto);
/**
* @Description 一人找人
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.epdc.form.EpdcScreenResidentInfoByCurrentAddressFormDTO>
**/
PageData<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddress(EpdcScreenResidentInfoByCurrentAddressFormDTO dto);
}

10
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java

@ -25,6 +25,7 @@ import com.elink.esua.epdc.dto.VolunteerInfoDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcAppVolunteerListFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcCompleteVolunteerInfoFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeUpdateFormDTO;
import com.elink.esua.epdc.dto.epdc.form.v2.EpdcCompleteVolunteerInfoV2FormDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcAdjustVolunteerPointsDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcAppVolunteerListCountResultDTO;
@ -237,5 +238,12 @@ public interface VolunteerInfoService extends BaseService<VolunteerInfoEntity> {
*/
Result<Integer> insertV2VolunteerInfo(EpdcCompleteVolunteerInfoV2FormDTO formDTO);
/**
* @Description 更新公益时长
* @Author songyunpeng
* @Date 2020/9/11
* @Param [formDto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result updateKindnessTime(EpdcVolunteerKindnessTimeUpdateFormDTO formDto);
}

709
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/HousingInformationServiceImpl.java

@ -51,7 +51,7 @@ import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.math.BigDecimal;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
/**
* 房屋信息表
@ -132,22 +132,17 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
@Override
@Transactional(rollbackFor = Exception.class)
public Result save(HousingInformationDTO dto) {
if (StringUtils.isNotBlank(dto.getPropertyOwnerIdentityNo())) {
//判断产权人身份证是否合法
String result = IdentityNoUtils.IdentityNoVerification(dto.getPropertyOwnerIdentityNo());
if (result != null) {
return new Result().error("产权人身份证不合法:"+result);
}
}
if (HouseUseConstant.RENT.equals(dto.getHouseUse())) {
//判断身份证是否合法
String result = IdentityNoUtils.IdentityNoVerification(dto.getTenantIdentityNo());
if (result != null) {
return new Result().error("承租人人身份证不合法:"+result);
if (StringUtils.isNotBlank(dto.getTenantIdentityNo())) {
//判断身份证是否合法
String result = IdentityNoUtils.IdentityNoVerification(dto.getTenantIdentityNo());
if (result != null) {
return new Result().error("承租人人身份证不合法:"+result);
}
}
}
HousingInformationEntity entity = ConvertUtils.sourceToTarget(dto, HousingInformationEntity.class);
//赋值部门信息
setDept(entity);
insert(entity);
@ -159,19 +154,15 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
@Override
@Transactional(rollbackFor = Exception.class)
public Result update(HousingInformationDTO dto) {
if (StringUtils.isNotBlank(dto.getPropertyOwnerIdentityNo())) {
//判断产权人身份证是否合法
String result = IdentityNoUtils.IdentityNoVerification(dto.getPropertyOwnerIdentityNo());
if (result != null) {
return new Result().error("产权人身份证不合法:"+result);
}
}
if (HouseUseConstant.RENT.equals(dto.getHouseUse())) {
//判断身份证是否合法
String result = IdentityNoUtils.IdentityNoVerification(dto.getTenantIdentityNo());
if (result != null) {
return new Result().error("承租人人身份证不合法:"+result);
if (StringUtils.isNotBlank(dto.getTenantIdentityNo())) {
//判断身份证是否合法
String result = IdentityNoUtils.IdentityNoVerification(dto.getTenantIdentityNo());
if (result != null) {
return new Result().error("承租人人身份证不合法:"+result);
}
}
}
HousingInformationEntity entity = ConvertUtils.sourceToTarget(dto, HousingInformationEntity.class);
//赋值部门信息
@ -272,20 +263,26 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
residentParams.put("RESIDENT_ID", houseResidentEntity.getResidentId());
List<HouseResidentEntity> allHouseResidentEntities = houseResidentDao.selectByMap(residentParams);
if (allHouseResidentEntities != null && allHouseResidentEntities.size() == 1) {
//此只与此房屋关联
//此户主只与此房屋关联
populationIds.add(houseResidentEntity.getResidentId());
}
}
//删除人口信息 -- 只删与且仅与此房屋有关系的人口
//删除人口信息 -- 删户主信息,居住人信息,户主房屋关联信息,居住人户主关联信息
if (populationIds.size() > 0) {
//(1)删户主信息 - 根据人口ID删
populationInformationService.deleteBatchIds(populationIds);
//且删除此户主对应的居民信息
//根据此户主ID删除
//(3)删居住人信息 - 根据人口ID删
Map<String, Object> residentParams = new HashMap<>();
residentParams.put("HOUSE_HEAD_ID", populationIds.get(0));
houseResidentDao.deleteByMap(residentParams);
List<HouseResidentEntity> houseResidentEntityList = houseResidentDao.selectByMap(residentParams);
if(houseResidentEntityList!=null && houseResidentEntityList.size()>0){
List<String> residentIds = houseResidentEntityList.stream().map(HouseResidentEntity::getResidentId).collect(Collectors.toList());
populationInformationService.deleteBatchIds(residentIds);
//(4)删居住人关联信息 - 根据户主ID删
houseResidentDao.deleteByMap(residentParams);
}
}
//删除关联关系 -- 全删
//删除户主关联信息 - 根据房屋ID
houseResidentDao.deleteByMap(params);
}
//删除房屋信息
@ -365,7 +362,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
return new Result().ok(epdcResidentErrorResultDTOS);
}
if(basePopulationInformationExcels!=null && basePopulationInformationExcels.size()>0){
populationIdNoAndIdMap = savePopulationList(basePopulationInformationExcels, parentAndAllDeptDTO);
populationIdNoAndIdMap = savePopulationListEnd(basePopulationInformationExcels, parentAndAllDeptDTO);
}
if(baseResidentInformationExcels!=null && baseResidentInformationExcels.size()>0){
saveResidentList(baseResidentInformationExcels,populationIdNoAndIdMap);
@ -386,6 +383,11 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
return baseDao.selectBaseResidentInformationExcelList(houseHeadIds);
}
@Override
public List<HousingInformationDTO> getHouseInfoByHouseHeadID(String houseHeadId) {
return baseDao.getHouseInfoByHouseHeadID(houseHeadId);
}
/**
* @return void
* @Description 校验完成后插入居民信息
@ -420,142 +422,60 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
}
}
/**
* @return void
* @Description 校验完成后新增人口信息
* @Description 校验完成后新增人口信息
* @Author songyunpeng
* @Date 2020/8/31
* @Date 2020/8/31
* @Param [basePopulationInformationExcels]
* @return void
**/
private Map<String,String> savePopulationList(List<BasePopulationInformationExcel> basePopulationInformationExcels, ParentAndAllDeptDTO parentAndAllDeptDTO) {
//插入房屋信息
List<HousingInformationEntity> housingInformationEntityList = new ArrayList<>();
private Map<String,String> savePopulationListEnd(List<BasePopulationInformationExcel> basePopulationInformationExcels,ParentAndAllDeptDTO parentAndAllDeptDTO) {
Map<String,String> populationIdNoAndIdMap = new HashMap<>();
for (BasePopulationInformationExcel basePopulationInformationExcel : basePopulationInformationExcels) {
HousingInformationEntity housingInformationEntity = ConvertUtils.sourceToTarget(basePopulationInformationExcel, HousingInformationEntity.class);
//插入房屋信息
HousingInformationEntity housingInformationEntity = ConvertUtils.sourceToTarget(basePopulationInformationExcel,HousingInformationEntity.class);
housingInformationEntity.setGridId(parentAndAllDeptDTO.getGridId());
housingInformationEntity.setParentDeptIds(parentAndAllDeptDTO.getParentDeptIds());
housingInformationEntity.setParentDeptNames(parentAndAllDeptDTO.getParentDeptNames());
housingInformationEntity.setAllDeptIds(parentAndAllDeptDTO.getAllDeptIds());
housingInformationEntity.setAllDeptNames(parentAndAllDeptDTO.getAllDeptNames());
housingInformationEntity.setBuyingTime(DateUtil.parse(basePopulationInformationExcel.getBuyingTime()));
housingInformationEntityList.add(housingInformationEntity);
}
insertBatch(housingInformationEntityList);
//组装租赁,经营,户主,房屋人员关系表信息
List<HouseRentInfoEntity> houseRentInfoEntities = new ArrayList<>();
List<HouseBusinessInfoEntity> houseBusinessInfoEntities = new ArrayList<>();
//更新户主信息
List<PopulationInformationEntity> updatePopulationInfo = new ArrayList<>();
//插入户主信息
List<PopulationInformationEntity> insertPopulationInfo = new ArrayList<>();
//房屋户主信息 -- 户主更新
List<HouseResidentEntity> houseResidentEntityList = new ArrayList<>();
//身份证校验
List<String> identifyNoValidation = new ArrayList<>();
//存储 key:身份证 value 房子ID 身份证是可重复的
List<Map<String, String>> HouseResidentInfos = new ArrayList<>();
a:
for (HousingInformationEntity housingInformationEntity : housingInformationEntityList) {
for (BasePopulationInformationExcel basePopulationInformationExcel : basePopulationInformationExcels) {
//以产权证为唯一标识
if (housingInformationEntity.getPropertyOwnerCard().equals(basePopulationInformationExcel.getPropertyOwnerCard())) {
if (HouseUseConstant.RENT.equals(housingInformationEntity.getHouseUse())) {
//房屋租赁信息
HouseRentInfoEntity houseRentInfoEntity = ConvertUtils.sourceToTarget(basePopulationInformationExcel, HouseRentInfoEntity.class);
houseRentInfoEntity.setHouseId(housingInformationEntity.getId());
houseRentInfoEntities.add(houseRentInfoEntity);
} else if (HouseUseConstant.BUSINESS.equals(housingInformationEntity.getHouseUse())) {
//房屋经营信息
HouseBusinessInfoEntity houseBusinessInfoEntity = ConvertUtils.sourceToTarget(basePopulationInformationExcel, HouseBusinessInfoEntity.class);
houseBusinessInfoEntity.setHouseId(housingInformationEntity.getId());
houseBusinessInfoEntities.add(houseBusinessInfoEntity);
}
//插入户主信息
PopulationInformationEntity populationInformationEntity = ConvertUtils.sourceToTarget(basePopulationInformationExcel, PopulationInformationEntity.class);
PopulationInformationEntity oldPopulationInformationEntity = populationInformationService.getInfoByIdentityNo(populationInformationEntity.getResidentsIdentityNo());
if (oldPopulationInformationEntity != null) {
//身份证在列表已存在,则更新户主信息
populationInformationEntity.setId(oldPopulationInformationEntity.getId());
//先检验下户主的一些信息
validateHouseHeadInfo(populationInformationEntity, basePopulationInformationExcel);
updatePopulationInfo.add(populationInformationEntity);
//插入房屋人员关联关系表
HouseResidentEntity houseResidentEntity = new HouseResidentEntity();
houseResidentEntity.setHouseId(housingInformationEntity.getId());
houseResidentEntity.setResidentId(oldPopulationInformationEntity.getId());
houseResidentEntity.setIsHouseHead("1");
houseResidentEntityList.add(houseResidentEntity);
} else {
//先检验下户主的一些信息
validateHouseHeadInfo(populationInformationEntity, basePopulationInformationExcel);
//将新增的人员的身份证存到List,防止excel中重复的身份证增加不同的户主信息
if (!identifyNoValidation.contains(populationInformationEntity.getResidentsIdentityNo())) {
//如果不包含,才新增进去。也就是说如果重复的身份证,只取第一条信息作为户主信息
insertPopulationInfo.add(populationInformationEntity);
}
identifyNoValidation.add(populationInformationEntity.getResidentsIdentityNo());
//方便下面新增房屋人员关系表,此时存储所有的户主身份证+房子ID
Map<String, String> houseResidentInfo = new HashMap<>();
houseResidentInfo.put(populationInformationEntity.getResidentsIdentityNo(), housingInformationEntity.getId());
HouseResidentInfos.add(houseResidentInfo);
}
continue a;
}
housingInformationEntity.setAllDeptIds(parentAndAllDeptDTO.getAllDeptIds());
housingInformationEntity.setParentDeptNames(parentAndAllDeptDTO.getParentDeptNames());
housingInformationEntity.setParentDeptIds(parentAndAllDeptDTO.getParentDeptIds());
baseDao.insert(housingInformationEntity);
if(HouseUseConstant.RENT.equals(housingInformationEntity.getHouseUse())){
//房屋租赁信息
HouseRentInfoEntity houseRentInfoEntity = ConvertUtils.sourceToTarget(basePopulationInformationExcel,HouseRentInfoEntity.class);
houseRentInfoEntity.setHouseId(housingInformationEntity.getId());
houseRentInfoService.insert(houseRentInfoEntity);
}else if(HouseUseConstant.BUSINESS.equals(housingInformationEntity.getHouseUse())){
//房屋经营信息
HouseBusinessInfoEntity houseBusinessInfoEntity = ConvertUtils.sourceToTarget(basePopulationInformationExcel,HouseBusinessInfoEntity.class);
houseBusinessInfoEntity.setHouseId(housingInformationEntity.getId());
houseBusinessInfoService.insert(houseBusinessInfoEntity);
}
}
//插入租赁信息
if (houseRentInfoEntities.size() > 0) {
houseRentInfoService.insertBatch(houseRentInfoEntities);
}
//插入经营信息
if (houseBusinessInfoEntities.size() > 0) {
houseBusinessInfoService.insertBatch(houseBusinessInfoEntities);
}
//如果人口信息身份证已有,则更新人口信息
if (updatePopulationInfo.size() > 0) {
populationInformationService.updateBatchById(updatePopulationInfo);
}
//插入人口信息
if (insertPopulationInfo.size() > 0) {
populationInformationService.insertBatch(insertPopulationInfo);
//遍历存储的身份证+房子ID对应信息,组装房屋人员关系
for (Map<String, String> houseResidentInfo : HouseResidentInfos) {
Set<Map.Entry<String, String>> set = houseResidentInfo.entrySet();
for (Map.Entry<String, String> entry : set) {
String identifyNo = entry.getKey();
String houseId = entry.getValue();
//根据身份证取户主ID
for (PopulationInformationEntity populationInformationEntity : insertPopulationInfo) {
if (populationInformationEntity.getResidentsIdentityNo().equals(identifyNo)) {
HouseResidentEntity houseResidentEntity = new HouseResidentEntity();
houseResidentEntity.setHouseId(houseId);
houseResidentEntity.setResidentId(populationInformationEntity.getId());
houseResidentEntity.setIsHouseHead("1");
houseResidentEntityList.add(houseResidentEntity);
break;
}
}
}
//插入户主信息
PopulationInformationEntity populationInformationEntity = ConvertUtils.sourceToTarget(basePopulationInformationExcel,PopulationInformationEntity.class);
PopulationInformationEntity oldPopulationInformationEntity= populationInformationService.getInfoByIdentityNo(populationInformationEntity.getResidentsIdentityNo());
//校验户主信息
validateHouseHeadInfo(populationInformationEntity,basePopulationInformationExcel);
if(oldPopulationInformationEntity!=null){
//身份证在列表已存在,则更新户主信息
populationInformationEntity.setId(oldPopulationInformationEntity.getId());
populationInformationService.updateById(populationInformationEntity);
}else {
//校验户主信息
populationInformationService.insert(populationInformationEntity);
}
//插入房屋人员关联关系表
HouseResidentEntity houseResidentEntity = new HouseResidentEntity();
houseResidentEntity.setHouseId(housingInformationEntity.getId());
houseResidentEntity.setResidentId(populationInformationEntity.getId());
houseResidentEntity.setIsHouseHead("1");
houseResidentDao.insert(houseResidentEntity);
populationIdNoAndIdMap.put(basePopulationInformationExcel.getResidentsIdentityNo(),populationInformationEntity.getId());
}
//插入房屋人员关系
if (houseResidentEntityList.size() > 0) {
houseResidentService.insertBatch(houseResidentEntityList);
}
//组装人口身份证和ID信息 辅助添加居民信息
insertPopulationInfo.addAll(updatePopulationInfo);
Map<String,String> populationIdNoAndIdMap = new HashMap<>();
insertPopulationInfo.forEach(i -> {
populationIdNoAndIdMap.put(i.getResidentsIdentityNo(),i.getId());
});
return populationIdNoAndIdMap;
}
/**
* @return void
* @Description 校验excel新增时户主的一些信息
@ -564,14 +484,6 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
* @Param [populationInformationEntity]
**/
private void validateHouseHeadInfo(PopulationInformationEntity populationInformationEntity, BasePopulationInformationExcel basePopulationInformationExcel) {
//赋值失业登记时间
if (StringUtils.isNotBlank(basePopulationInformationExcel.getUnemploymentRegisterTime())) {
populationInformationEntity.setUnemploymentRegisterTime(DateUtil.parse(basePopulationInformationExcel.getUnemploymentRegisterTime()));
}
//赋值入党时间
if (StringUtils.isNotBlank(basePopulationInformationExcel.getJoinTime())) {
populationInformationEntity.setJoinTime(DateUtil.parse(basePopulationInformationExcel.getJoinTime()));
}
//如果状态为群众。清空excel中多余的入党时间和组织关系所在地
if ("0".equals(basePopulationInformationExcel.getPoliticsStatus())) {
if(StringUtils.isNotBlank(populationInformationEntity.getId())){
@ -582,35 +494,56 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
populationInformationEntity.setOrganizationalRelationshipLocation("");
}
if ("0".equals(basePopulationInformationExcel.getEmploymentStatus())) {
//如果选在岗,则清空失业原因,再就业优惠政,失业登记和失业登记时间
populationInformationEntity.setUnemploymentReason("");
populationInformationEntity.setReemploymentPermit("");
populationInformationEntity.setUnemploymentRegister("");
clearEmployedInfo(populationInformationEntity);
} else if ("1".equals(basePopulationInformationExcel.getEmploymentStatus())) {
clearUnEmployedInfo(populationInformationEntity);
} else {
clearEmployedInfo(populationInformationEntity);
clearUnEmployedInfo(populationInformationEntity);
}
if(basePopulationInformationExcel.getMotorVehicleNum()!=null && basePopulationInformationExcel.getMotorVehicleNum()==0){
//如果机动车数量为0 清空机动车类型
populationInformationEntity.setMotorVehicleCategory("");
}
}
/**
* @Description 清空在岗信息
* @Author songyunpeng
* @Date 2020/9/16
* @Param [populationInformationEntity]
* @return void
**/
private void clearUnEmployedInfo(PopulationInformationEntity populationInformationEntity){
//如果选择失业,也清空 工作单位 和工作单位地址
populationInformationEntity.setCurrentEmployer("");
populationInformationEntity.setCurrentEmployerAddress("");
//如果失业且失业登记为否,清空失业登记时间
if ("0".equals(populationInformationEntity.getUnemploymentRegister())) {
if(StringUtils.isNotBlank(populationInformationEntity.getId())){
//ID不为空为更新,此时手动置空失业登记时间时间
populationInformationService.setUnemploymentRegisterTimeToNull(populationInformationEntity.getId());
}
populationInformationEntity.setUnemploymentRegisterTime(null);
} else if ("1".equals(basePopulationInformationExcel.getEmploymentStatus())) {
//如果选择失业,也清空 工作单位 和工作单位地址
populationInformationEntity.setCurrentEmployer("");
populationInformationEntity.setCurrentEmployerAddress("");
//如果失业且失业登记为否,清空失业登记时间
if ("0".equals(populationInformationEntity.getUnemploymentRegister())) {
if(StringUtils.isNotBlank(populationInformationEntity.getId())){
//ID不为空为更新,此时手动置空失业登记时间时间
populationInformationService.setUnemploymentRegisterTimeToNull(populationInformationEntity.getId());
}
populationInformationEntity.setUnemploymentRegisterTime(null);
}
}
if(basePopulationInformationExcel.getMotorVehicleNum()==0){
//如果机动车数量为0 清空机动车类型
populationInformationEntity.setMotorVehicleCategory("");
}
/**
* @Description 清空失业
* @Author songyunpeng
* @Date 2020/9/16
* @Param [populationInformationEntity]
* @return void
**/
private void clearEmployedInfo(PopulationInformationEntity populationInformationEntity){
//如果选在岗,则清空失业原因,再就业优惠政,失业登记和失业登记时间
populationInformationEntity.setUnemploymentReason("");
populationInformationEntity.setReemploymentPermit("");
populationInformationEntity.setUnemploymentRegister("");
if(StringUtils.isNotBlank(populationInformationEntity.getId())){
//ID不为空为更新,此时手动置空失业登记时间时间
populationInformationService.setUnemploymentRegisterTimeToNull(populationInformationEntity.getId());
}
populationInformationEntity.setUnemploymentRegisterTime(null);
}
/**
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcPopulationErrorResultDTO>
* @Description 校验居住人数据
@ -732,11 +665,9 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
* @Param [basePopulationInformationExcels, populationInformationDTOS]
**/
private List<EpdcPopulationErrorResultDTO> checkPopulationExcel(List<BasePopulationInformationExcel> basePopulationInformationExcels, List<SysPopulationSimpleDictDTO> sysPopulationSimpleDictDTOS) {
List<HousingInformationDTO> housingInformationDTOS = list(new HashMap<>());
// 不匹配信息
List<EpdcPopulationErrorResultDTO> errorLineInfoList = new ArrayList<>();
EpdcPopulationErrorResultDTO errorLineInfoDto;
Map<String, String> isPropertyOwnerCard = new ConcurrentHashMap<>();
for (int i = 0; i < basePopulationInformationExcels.size(); i++) {
BasePopulationInformationExcel basePopulationInformationExcel = basePopulationInformationExcels.get(i);
String houseAddress = basePopulationInformationExcel.getHouseAddress()==null?null:basePopulationInformationExcel.getHouseAddress().trim();
@ -745,7 +676,6 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
String propertyOwner = basePopulationInformationExcel.getPropertyOwner()==null?null:basePopulationInformationExcel.getPropertyOwner().trim();
String propertyOwnerIdentityNo = basePopulationInformationExcel.getPropertyOwnerIdentityNo()==null?null:basePopulationInformationExcel.getPropertyOwnerIdentityNo().trim();
String propertyOwnerMobile = basePopulationInformationExcel.getPropertyOwnerMobile()==null?null:basePopulationInformationExcel.getPropertyOwnerMobile().trim();
String propertyOwnerCard = basePopulationInformationExcel.getPropertyOwnerCard()==null?null:basePopulationInformationExcel.getPropertyOwnerCard().trim();
String houseUse = basePopulationInformationExcel.getHouseUse()==null?null:basePopulationInformationExcel.getHouseUse().trim();
String tenantName = basePopulationInformationExcel.getTenantName()==null?null:basePopulationInformationExcel.getTenantName().trim();
String tenantIdentityNo = basePopulationInformationExcel.getTenantIdentityNo()==null?null:basePopulationInformationExcel.getTenantIdentityNo().trim();
@ -786,39 +716,17 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}else if(StringUtils.isNotBlank((houseAddress))){
basePopulationInformationExcel.setHouseAddress(houseAddress);
}
if (StringUtils.isBlank(buyingTime)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("购房时间为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
} else if (StringUtils.isNotBlank(buyingTime)) {
if (!IdentityNoUtils.isStrDate(buyingTime)) {
if(houseAddress.length()>32){
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("日期格式应为yyyy-MM-dd HH:mm:ss");
errorLineInfoDto.setErrorInfo("房屋地址字数不能大于32个字符");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
} else {
if (DateUtil.parse(buyingTime).after(new Date())) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("购房时间不能大于当前时间");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
}
basePopulationInformationExcel.setBuyingTime(buyingTime);
basePopulationInformationExcel.setHouseAddress(houseAddress);
}
if (houseArea == null) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("房屋面积为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
if (StringUtils.isNotBlank(buyingTime)) {
basePopulationInformationExcel.setBuyingTime(buyingTime);
}
if (StringUtils.isBlank(propertyOwner)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
@ -827,53 +735,35 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}else if(StringUtils.isNotBlank((propertyOwner))){
if(propertyOwner.length()>32){
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("产权人字数不能大于32个字符");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
basePopulationInformationExcel.setPropertyOwner(propertyOwner);
}
if (StringUtils.isBlank(propertyOwnerIdentityNo)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("产权人身份证号为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}else if(StringUtils.isNotBlank((propertyOwnerIdentityNo))){
if(StringUtils.isNotBlank((propertyOwnerIdentityNo))){
if(propertyOwnerIdentityNo.length()>32){
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("产权人身份证号不能大于32个字符");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
basePopulationInformationExcel.setPropertyOwnerIdentityNo(propertyOwnerIdentityNo);
}
if (StringUtils.isBlank(propertyOwnerMobile)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("产权人电话为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}else if(StringUtils.isNotBlank((propertyOwnerMobile))){
basePopulationInformationExcel.setPropertyOwnerMobile(propertyOwnerMobile);
}
if (StringUtils.isBlank(propertyOwnerCard)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("产权证为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
} else if (StringUtils.isNotBlank(propertyOwnerCard)) {
for (HousingInformationDTO housingInformationDTO : housingInformationDTOS) {
if (housingInformationDTO.getPropertyOwnerCard().equals(propertyOwnerCard)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("产权证已存在");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
}
if (isPropertyOwnerCard.containsKey(propertyOwnerCard)) {
if(StringUtils.isNotBlank((propertyOwnerMobile))){
if(propertyOwnerMobile.length()>32){
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("产权证在EXCEL已存在");
errorLineInfoDto.setErrorInfo("产权人电话不能大于32个字符");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
isPropertyOwnerCard.put(propertyOwnerCard, (i + 2) + "");
basePopulationInformationExcel.setPropertyOwnerCard(propertyOwnerCard);
basePopulationInformationExcel.setPropertyOwnerMobile(propertyOwnerMobile);
}
if (StringUtils.isBlank(houseUse)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
@ -898,6 +788,13 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}else if(StringUtils.isNotBlank((tenantName))){
if(tenantName.length()>32){
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("承租人不能大于32个字符");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
basePopulationInformationExcel.setTenantName(tenantName);
}
if (StringUtils.isBlank(tenantPhone)) {
@ -907,6 +804,13 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}else if(StringUtils.isNotBlank((tenantPhone))){
if(tenantPhone.length()>32){
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("承租人电话不能大于32个字符");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
basePopulationInformationExcel.setTenantPhone(tenantPhone);
}
if (StringUtils.isBlank(tenantIdentityNo)) {
@ -929,22 +833,24 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
}
} else if (HouseUseConstant.BUSINESS.equals(houseUse)) {
if (StringUtils.isBlank(enterpriseName)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("企业名称为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}else if(StringUtils.isNotBlank((enterpriseName))){
if(StringUtils.isNotBlank((enterpriseName))){
if(enterpriseName.length()>128){
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("企业名称不能大于128个字符");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
basePopulationInformationExcel.setEnterpriseName(enterpriseName);
}
if (StringUtils.isBlank(legalRepresentative)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("法人为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}else if(StringUtils.isNotBlank((legalRepresentative))){
if(StringUtils.isNotBlank((legalRepresentative))){
if(legalRepresentative.length()>32){
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("法人代表不能大于32个字符");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
basePopulationInformationExcel.setLegalRepresentative(legalRepresentative);
}
if (StringUtils.isBlank(enterprisePhone)) {
@ -954,15 +860,23 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}else if(StringUtils.isNotBlank((enterprisePhone))){
if(enterprisePhone.length()>32){
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("企业联系电话大于32个字符");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
basePopulationInformationExcel.setEnterprisePhone(enterprisePhone);
}
if (StringUtils.isBlank(socialUniformCode)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("社会统一代码为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}else if(StringUtils.isNotBlank((socialUniformCode))){
if(StringUtils.isNotBlank((socialUniformCode))){
if(socialUniformCode.length()>128){
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("社会统一代码不能大于128个字符");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
basePopulationInformationExcel.setSocialUniformCode(socialUniformCode);
}
}
@ -973,24 +887,25 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}else if(StringUtils.isNotBlank((residentsName))){
if(residentsName.length()>32){
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("户主姓名不能大于32个字符");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
basePopulationInformationExcel.setResidentsName(residentsName);
}
if (StringUtils.isBlank(residentsNation)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("民族为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}else if(StringUtils.isNotBlank((residentsNation))){
if(StringUtils.isNotBlank((residentsNation))){
if(residentsNation.length()>32){
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("民族不能大于32个字符");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
basePopulationInformationExcel.setResidentsNation(residentsNation);
}
if (StringUtils.isBlank(educationLevel)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("文化程度为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
if (StringUtils.isNotBlank(educationLevel)) {
boolean isMatch = false;
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) {
@ -1012,13 +927,6 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoList.add(errorLineInfoDto);
}
}
if (StringUtils.isBlank(politicsStatus)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("政治面貌为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
if (StringUtils.isNotBlank(politicsStatus)) {
boolean isMatch = false;
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) {
@ -1041,37 +949,17 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
}
}
if ("党员".equals(politicsStatus)) {
if (StringUtils.isBlank(joinTime)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("入党时间为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
} else if (StringUtils.isNotBlank(joinTime)) {
if (!IdentityNoUtils.isStrDate(joinTime)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("日期格式应为yyyy-MM-dd HH:mm:ss");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
} else {
if (DateUtil.parse(joinTime).after(new Date())) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("入党时间不能大于当前时间");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
}
if (StringUtils.isNotBlank(joinTime)) {
basePopulationInformationExcel.setJoinTime(joinTime);
}
if (StringUtils.isBlank(organizationalRelationshipLocation)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("组织关系所在地为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}else if(StringUtils.isNotBlank((organizationalRelationshipLocation))){
if(StringUtils.isNotBlank((organizationalRelationshipLocation))){
if(organizationalRelationshipLocation.length()>32){
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("组织关系所在地不能大于32个字符");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
basePopulationInformationExcel.setOrganizationalRelationshipLocation(organizationalRelationshipLocation);
}
}
@ -1103,15 +991,15 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}else if(StringUtils.isNotBlank((residentsPhone))){
if(residentsPhone.length()>32){
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("户主联系电话不能大于32个字符");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
basePopulationInformationExcel.setResidentsPhone(residentsPhone);
}
if (StringUtils.isBlank(bodyStatus)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("户主身体状况为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
if (StringUtils.isNotBlank(bodyStatus)) {
boolean isMatch = false;
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) {
@ -1133,13 +1021,6 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoList.add(errorLineInfoDto);
}
}
if (StringUtils.isBlank(maritalStatus)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("户主婚姻状况为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
if (StringUtils.isNotBlank(maritalStatus)) {
boolean isMatch = false;
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) {
@ -1162,13 +1043,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
}
}
if (StringUtils.isBlank(accountType)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("户主户口类型为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
} else if (StringUtils.isNotBlank(accountType)) {
if (StringUtils.isNotBlank(accountType)) {
boolean isMatch = false;
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) {
if (PopulationDictConstant.ACCOUNT_TYPE.equals(sysPopulationSimpleDictDTO.getDicType())) {
@ -1190,13 +1065,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
}
}
if (StringUtils.isBlank(militaryService)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("户主是否服兵役为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}else if(StringUtils.isNotBlank((militaryService))){
if(StringUtils.isNotBlank((militaryService))){
basePopulationInformationExcel.setMilitaryService(militaryService);
}
if (StringUtils.isNotBlank(militaryService) && !"0".equals(militaryService) && !"1".equals(militaryService)) {
@ -1206,22 +1075,17 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
if (StringUtils.isBlank(householdRegistrationPlace)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("户主户籍地为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}else if(StringUtils.isNotBlank((householdRegistrationPlace))){
if(StringUtils.isNotBlank((householdRegistrationPlace))){
if(householdRegistrationPlace.length()>32){
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("户籍地不能大于32个字符");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
basePopulationInformationExcel.setHouseholdRegistrationPlace(householdRegistrationPlace);
}
if (StringUtils.isBlank(employmentStatus)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("户主是否就业为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
} else if (StringUtils.isNotBlank(employmentStatus)) {
if (StringUtils.isNotBlank(employmentStatus)) {
boolean isMatch = false;
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) {
if (PopulationDictConstant.EMPLOYMENT_STATUS.equals(sysPopulationSimpleDictDTO.getDicType())) {
@ -1243,32 +1107,28 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
}
}
if ("在岗".equals(employmentStatus)) {
if (StringUtils.isBlank(currentEmployer)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("户主现工作单位为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}else if(StringUtils.isNotBlank((currentEmployer))){
if(StringUtils.isNotBlank((currentEmployer))){
if(currentEmployer.length()>128){
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("现工作单位不能大于128个字符");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
basePopulationInformationExcel.setCurrentEmployer(currentEmployer);
}
if (StringUtils.isBlank(currentEmployerAddress)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("户主现单位地址为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}else if(StringUtils.isNotBlank((currentEmployerAddress))){
if(StringUtils.isNotBlank((currentEmployerAddress))){
if(currentEmployerAddress.length()>128){
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("现单位地址不能大于128个字符");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
basePopulationInformationExcel.setCurrentEmployerAddress(currentEmployerAddress);
}
} else if ("失业".equals(employmentStatus)) {
if (StringUtils.isBlank(unemploymentReason)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("户主失业原因为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
} else if (StringUtils.isNotBlank(unemploymentReason)) {
if (StringUtils.isNotBlank(unemploymentReason)) {
boolean isMatch = false;
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) {
if (PopulationDictConstant.UNEMPLOYMENT_REASON.equals(sysPopulationSimpleDictDTO.getDicType())) {
@ -1289,13 +1149,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoList.add(errorLineInfoDto);
}
}
if (StringUtils.isBlank(reemploymentPermit)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("户主是否有再就业优惠证为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}else if(StringUtils.isNotBlank((reemploymentPermit))){
if(StringUtils.isNotBlank((reemploymentPermit))){
basePopulationInformationExcel.setReemploymentPermit(reemploymentPermit);
}
if (StringUtils.isNotBlank(reemploymentPermit) && !"0".equals(reemploymentPermit) && !"1".equals(reemploymentPermit)) {
@ -1305,13 +1159,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
if (StringUtils.isBlank(unemploymentRegister)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("户主是否失业登记为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}else if(StringUtils.isNotBlank((unemploymentRegister))){
if(StringUtils.isNotBlank((unemploymentRegister))){
basePopulationInformationExcel.setUnemploymentRegister(unemploymentRegister);
}
if (StringUtils.isNotBlank(unemploymentRegister) && !"0".equals(unemploymentRegister) && !"1".equals(unemploymentRegister)) {
@ -1322,39 +1170,12 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoList.add(errorLineInfoDto);
}
if(StringUtils.isNotBlank(unemploymentRegister) && "1".equals(unemploymentRegister)){
if (StringUtils.isBlank(unemploymentRegisterTime)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("户主失业登记时间为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
} else if (StringUtils.isNotBlank(unemploymentRegisterTime)) {
if (!IdentityNoUtils.isStrDate(unemploymentRegisterTime)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("日期格式应为yyyy-MM-dd HH:mm:ss");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
} else {
if (DateUtil.parse(unemploymentRegisterTime).after(new Date())) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("失业登记时间不能大于当前时间");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
}
if (StringUtils.isNotBlank(unemploymentRegisterTime)) {
basePopulationInformationExcel.setUnemploymentRegisterTime(unemploymentRegisterTime);
}
}
}
if (StringUtils.isBlank(familyCategory)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("户主家庭类别为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
} else if (StringUtils.isNotBlank(familyCategory)) {
if (StringUtils.isNotBlank(familyCategory)) {
boolean isMatch = false;
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) {
if (PopulationDictConstant.FAMILY_CATEGORY.equals(sysPopulationSimpleDictDTO.getDicType())) {
@ -1375,13 +1196,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoList.add(errorLineInfoDto);
}
}
if (StringUtils.isBlank(helpStatus)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("户主家庭救助情况为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
} else if (StringUtils.isNotBlank(helpStatus)) {
if (StringUtils.isNotBlank(helpStatus)) {
boolean isMatch = false;
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) {
if (PopulationDictConstant.HELP_STATUS.equals(sysPopulationSimpleDictDTO.getDicType())) {
@ -1403,20 +1218,7 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoList.add(errorLineInfoDto);
}
}
if (motorVehicleNum == null) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("机动车台数为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}
if (motorVehicleNum != null && motorVehicleNum.intValue() > 0 && StringUtils.isBlank(motorVehicleCategory)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("机动车类型为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
} else if (StringUtils.isNotBlank(motorVehicleCategory)) {
if (StringUtils.isNotBlank(motorVehicleCategory)) {
//处理多选类型
String[] motorVehicleCategoryStrings = motorVehicleCategory.split(",");
Integer matchNum = 0;
@ -1440,16 +1242,11 @@ public class HousingInformationServiceImpl extends BaseServiceImpl<HousingInform
errorLineInfoDto.setErrorInfo("机动车类型数据不匹配");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}else {
basePopulationInformationExcel.setMotorVehicleCategory(motorVehicleCategoryEnd.substring(0,motorVehicleCategoryEnd.lastIndexOf(",")));
}
basePopulationInformationExcel.setMotorVehicleCategory(motorVehicleCategoryEnd.substring(0,motorVehicleCategoryEnd.lastIndexOf(",")));
}
if (StringUtils.isBlank(dogStatus)) {
errorLineInfoDto = new EpdcPopulationErrorResultDTO();
errorLineInfoDto.setErrorLine((i + 2) + "");
errorLineInfoDto.setErrorInfo("宠物犬情况为空");
errorLineInfoDto.setSheetName("房屋信息和户主信息");
errorLineInfoList.add(errorLineInfoDto);
}else if(StringUtils.isNotBlank(dogStatus)){
if(StringUtils.isNotBlank(dogStatus)){
basePopulationInformationExcel.setDogStatus(dogStatus);
}
if (StringUtils.isNotBlank(dogStatus) && !"0".equals(dogStatus) && !"1".equals(dogStatus)) {

233
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/PopulationInformationServiceImpl.java

@ -21,16 +21,26 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.commons.tools.constant.NumConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.utils.IdentityNoUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.constant.HouseHeadRelationConstant;
import com.elink.esua.epdc.constant.HouseUseConstant;
import com.elink.esua.epdc.constant.PopulationIdentify;
import com.elink.esua.epdc.dao.HouseResidentDao;
import com.elink.esua.epdc.dao.PopulationInformationDao;
import com.elink.esua.epdc.dto.BaseResidentInformationExportDto;
import com.elink.esua.epdc.dto.HousingInformationDTO;
import com.elink.esua.epdc.dto.PopulationInfoOverviewDTO;
import com.elink.esua.epdc.dto.PopulationInformationDTO;
import com.elink.esua.epdc.dto.epdc.form.*;
import com.elink.esua.epdc.dto.epdc.result.*;
import com.elink.esua.epdc.entity.HouseResidentEntity;
import com.elink.esua.epdc.entity.HousingInformationEntity;
import com.elink.esua.epdc.entity.PopulationInformationEntity;
import com.elink.esua.epdc.feign.AdminFeignClient;
import com.elink.esua.epdc.redis.PopulationInformationRedis;
import com.elink.esua.epdc.service.HouseResidentService;
import com.elink.esua.epdc.service.HousingInformationService;
@ -40,13 +50,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* 人口信息表
* 人口信息表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-08-19
@ -63,6 +70,9 @@ public class PopulationInformationServiceImpl extends BaseServiceImpl<Population
private HouseResidentDao houseResidentDao;
@Autowired
private HousingInformationService housingInformationService;
@Autowired
private AdminFeignClient adminFeignClient;
@Override
public PageData<PopulationInformationDTO> page(Map<String, Object> params) {
@ -78,8 +88,8 @@ public class PopulationInformationServiceImpl extends BaseServiceImpl<Population
return baseDao.selectListOfPopulationInformationDTO(params);
}
private QueryWrapper<PopulationInformationEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
private QueryWrapper<PopulationInformationEntity> getWrapper(Map<String, Object> params) {
String id = (String) params.get(FieldConstant.ID_HUMP);
QueryWrapper<PopulationInformationEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
@ -98,19 +108,19 @@ public class PopulationInformationServiceImpl extends BaseServiceImpl<Population
//校验身份证信息
//1.获取表单身份证的人口信息
PopulationInformationEntity infoByIdentityNo = getInfoByIdentityNo(dto.getResidentsIdentityNo());
if(infoByIdentityNo!=null){
Map<String,Object> params = new HashMap<>();
params.put("RESIDENT_ID",infoByIdentityNo.getId());
if (infoByIdentityNo != null) {
Map<String, Object> params = new HashMap<>();
params.put("RESIDENT_ID", infoByIdentityNo.getId());
List<HouseResidentEntity> houseResidentEntities = houseResidentDao.selectByMap(params);
if(houseResidentEntities.size()>0){
if (houseResidentEntities.size() > 0) {
//2.此人有房屋信息,且为第一次提交则此时提示前端
if("0".equals(dto.getIsSubmit())){
if ("0".equals(dto.getIsSubmit())) {
StringBuffer sb = new StringBuffer();
for (HouseResidentEntity houseResidentEntity : houseResidentEntities) {
HousingInformationEntity housingInformationEntity = housingInformationService.selectById(houseResidentEntity.getHouseId());
sb.append(",\"").append(housingInformationEntity.getHouseAddress()).append("\"");
}
String result ="您在地址为"+sb.substring(1)+"下已有房产信息,点击确认则新增此房产且更新居民信息!";
String result = "您在地址为" + sb.substring(1) + "下已有房产信息,点击确认则新增此房产且更新居民信息!";
return new Result().ok(result.substring(1));
}
//2.第二次提交,则更新户主信息且新增关联信息
@ -141,68 +151,81 @@ public class PopulationInformationServiceImpl extends BaseServiceImpl<Population
@Transactional(rollbackFor = Exception.class)
public Result update(PopulationInformationDTO dto) {
PopulationInformationEntity infoByIdentityNo = selectById(dto.getId());
if(dto.getResidentsIdentityNo().equals(infoByIdentityNo.getResidentsIdentityNo())){
if (dto.getResidentsIdentityNo().equals(infoByIdentityNo.getResidentsIdentityNo())) {
PopulationInformationEntity entity = ConvertUtils.sourceToTarget(dto, PopulationInformationEntity.class);
//置空其他选择信息-防止导出时数据出错
if("0".equals(dto.getPoliticsStatus())){
if ("0".equals(dto.getPoliticsStatus())) {
//如果表单选择的是群众,则清空入党时间和组织关系所在地
this.setJionTimeToNull(entity.getId());
entity.setJoinTime(null);
entity.setOrganizationalRelationshipLocation("");
}
if("0".equals(dto.getEmploymentStatus())){
if ("0".equals(dto.getEmploymentStatus())) {
//如果表单选择的是在岗,则清空失业原因,再就业优惠政,失业登记和失业登记时间
entity.setUnemploymentReason("");
entity.setReemploymentPermit("");
entity.setUnemploymentRegister("");
this.setUnemploymentRegisterTimeToNull(entity.getId());
entity.setUnemploymentRegisterTime(null);
}
if("1".equals(dto.getEmploymentStatus())){
} else if ("1".equals(dto.getEmploymentStatus())) {
//如果选择为失业,则置空工作单位和工作地址
entity.setCurrentEmployer("");
entity.setCurrentEmployerAddress("");
if("0".equals(dto.getUnemploymentRegister())){
if ("0".equals(dto.getUnemploymentRegister())) {
//如果表单选择的是失业 且就业登记为否 则也置空失业登记时间
this.setUnemploymentRegisterTimeToNull(entity.getId());
entity.setUnemploymentRegisterTime(null);
}
} else {
//如果表单选择的是在岗,则清空失业原因,再就业优惠政,失业登记和失业登记时间
entity.setUnemploymentReason("");
entity.setReemploymentPermit("");
entity.setUnemploymentRegister("");
this.setUnemploymentRegisterTimeToNull(entity.getId());
entity.setUnemploymentRegisterTime(null);
//如果选择为失业,则置空工作单位和工作地址
entity.setCurrentEmployer("");
entity.setCurrentEmployerAddress("");
if ("0".equals(dto.getUnemploymentRegister())) {
//如果表单选择的是失业 且就业登记为否 则也置空失业登记时间
this.setUnemploymentRegisterTimeToNull(entity.getId());
entity.setUnemploymentRegisterTime(null);
}
}
if(dto.getMotorVehicleNum()==0){
if (dto.getMotorVehicleNum() == 0) {
//如果机动车数量为0 清空机动车类型
entity.setMotorVehicleCategory("");
}
updateById(entity);
return new Result();
}else {
} else {
//修改了身份证信息 - 提示信息
Map<String,Object> params = new HashMap<>();
params.put("RESIDENT_ID",infoByIdentityNo.getId());
Map<String, Object> params = new HashMap<>();
params.put("RESIDENT_ID", infoByIdentityNo.getId());
List<HouseResidentEntity> houseResidentEntities = houseResidentDao.selectByMap(params);
if(houseResidentEntities.size()>0){
if (houseResidentEntities.size() > 0) {
//2.此人有房屋信息,且为第一次提交则此时提示前端
if("0".equals(dto.getIsSubmit())){
if ("0".equals(dto.getIsSubmit())) {
StringBuffer sb = new StringBuffer();
for (HouseResidentEntity houseResidentEntity : houseResidentEntities) {
HousingInformationEntity housingInformationEntity = housingInformationService.selectById(houseResidentEntity.getHouseId());
sb.append(",\"").append(housingInformationEntity.getHouseAddress()).append("\"");
}
String result ="您在地址为"+sb.substring(1)+"下已有房产信息,点击确认则新增此房产且更新居民信息!";
String result = "您在地址为" + sb.substring(1) + "下已有房产信息,点击确认则新增此房产且更新居民信息!";
return new Result().ok(result.substring(1));
}
//2.第二次提交,则更新户主信息
PopulationInformationEntity entity = ConvertUtils.sourceToTarget(dto, PopulationInformationEntity.class);
entity.setId(infoByIdentityNo.getId());
//置空其他选择信息-防止导出时数据出错
if("0".equals(dto.getPoliticsStatus())){
if ("0".equals(dto.getPoliticsStatus())) {
//如果表单选择的是群众,则清空入党时间和组织关系所在地
this.setJionTimeToNull(entity.getId());
entity.setJoinTime(null);
entity.setOrganizationalRelationshipLocation("");
}
if("0".equals(dto.getEmploymentStatus())){
if ("0".equals(dto.getEmploymentStatus())) {
//如果表单选择的是在岗,则清空失业原因,再就业优惠政,失业登记和失业登记时间
entity.setUnemploymentReason("");
entity.setReemploymentPermit("");
@ -210,11 +233,11 @@ public class PopulationInformationServiceImpl extends BaseServiceImpl<Population
entity.setUnemploymentRegisterTime(null);
this.setUnemploymentRegisterTimeToNull(entity.getId());
}
if("1".equals(dto.getEmploymentStatus())){
if ("1".equals(dto.getEmploymentStatus())) {
//如果选择为失业,则置空工作单位和工作地址
entity.setCurrentEmployer("");
entity.setCurrentEmployerAddress("");
if("0".equals(dto.getUnemploymentRegister())){
if ("0".equals(dto.getUnemploymentRegister())) {
//如果表单选择的是失业 且就业登记为否 则也置空失业登记时间
this.setUnemploymentRegisterTimeToNull(entity.getId());
entity.setUnemploymentRegisterTime(null);
@ -239,7 +262,7 @@ public class PopulationInformationServiceImpl extends BaseServiceImpl<Population
public PopulationInformationDTO getHouseHeadInfo(String houseId) {
PopulationInformationDTO houseHeadInfo = baseDao.getHouseHeadInfo(houseId);
//处理机动车类型
if(houseHeadInfo!=null && StringUtils.isNotBlank(houseHeadInfo.getMotorVehicleCategory())){
if (houseHeadInfo != null && StringUtils.isNotBlank(houseHeadInfo.getMotorVehicleCategory())) {
String[] motorVehicleCategoryStrings = houseHeadInfo.getMotorVehicleCategory().split(",");
houseHeadInfo.setMotorVehicleCategoryList(Arrays.asList(motorVehicleCategoryStrings));
}
@ -285,4 +308,150 @@ public class PopulationInformationServiceImpl extends BaseServiceImpl<Population
baseDao.setUnemploymentRegisterTimeToNull(id);
}
@Override
public PageData<EpdcScreenSelectPeopleResultDTO> selectPeople(EpdcScreenSelectPeopleFormDTO dto) {
int pageIndex = (dto.getPageIndex() - NumConstant.ONE) * dto.getPageSize();
dto.setPageIndex(pageIndex);
List<EpdcScreenSelectPeopleResultDTO> list = baseDao.selectListPeople(dto);
return new PageData<>(list, baseDao.selectCountListPeople(dto));
}
@Override
public Result<EpdcScreenSelectPeopleDetailResultDTO> selectPeopleDetail(EpdcScreenSelectPeopleDetailFormDTO dto) {
EpdcScreenSelectPeopleDetailResultDTO epdcScreenSelectPeopleDetailResultDTO = new EpdcScreenSelectPeopleDetailResultDTO();
//根据身份标识寻找对应人员信息
if (PopulationIdentify.HOUSE_HEAD.equals(dto.getIdentifyFlag())) {
if (StringUtils.isBlank(dto.getPopulationId())) {
return new Result<EpdcScreenSelectPeopleDetailResultDTO>().error("查询产权人信息失败:人口ID为空");
}
//根据户主ID组装信息
setHouseHeadInfo(dto.getPopulationId(),epdcScreenSelectPeopleDetailResultDTO);
return new Result<EpdcScreenSelectPeopleDetailResultDTO>().ok(epdcScreenSelectPeopleDetailResultDTO);
} else if (PopulationIdentify.HOUSE_RESIDENT.equals(dto.getIdentifyFlag())) {
if (StringUtils.isBlank(dto.getPopulationId())) {
return new Result<EpdcScreenSelectPeopleDetailResultDTO>().error("查询居住人信息失败:人口ID为空");
}
//查找居住人对应的户主细腻
Map<String, Object> params = new HashMap<>();
params.put("RESIDENT_ID", dto.getPopulationId());
List<HouseResidentEntity> houseResidentEntityList = houseResidentDao.selectByMap(params);
if(houseResidentEntityList==null || houseResidentEntityList.size()==0){
return new Result<EpdcScreenSelectPeopleDetailResultDTO>().error("根据居住人查询户主失败");
}
HouseResidentEntity houseResidentEntity = houseResidentEntityList.get(0);
//根据户主ID组装信息
setHouseHeadInfo(houseResidentEntity.getHouseHeadId(),epdcScreenSelectPeopleDetailResultDTO);
return new Result<EpdcScreenSelectPeopleDetailResultDTO>().ok(epdcScreenSelectPeopleDetailResultDTO);
}
return new Result<EpdcScreenSelectPeopleDetailResultDTO>().error("查询错误:身份标识参数无法匹配");
}
private void setHouseHeadInfo(String houseHeadId,EpdcScreenSelectPeopleDetailResultDTO epdcScreenSelectPeopleDetailResultDTO ){
//如果是户主,人口信息从人口表拿
PopulationInformationEntity populationInformationEntity = this.selectById(houseHeadId);
epdcScreenSelectPeopleDetailResultDTO.setName(populationInformationEntity.getResidentsName());
epdcScreenSelectPeopleDetailResultDTO.setSex("0".equals(populationInformationEntity.getResidentsSex()) ? "女" : "男");
if (IdentityNoUtils.IdentityNoVerification(populationInformationEntity.getResidentsIdentityNo()) == null) {
epdcScreenSelectPeopleDetailResultDTO.setAge(IdentityNoUtils.getAge(populationInformationEntity.getResidentsIdentityNo()) + "");
} else {
epdcScreenSelectPeopleDetailResultDTO.setAge("");
}
epdcScreenSelectPeopleDetailResultDTO.setPhone(populationInformationEntity.getResidentsPhone());
//房屋信息
List<HousingInformationDTO> housingInformationDTOList = housingInformationService.getHouseInfoByHouseHeadID(houseHeadId);
List<HousingInfo> housingInfoList = ConvertUtils.sourceToTarget(housingInformationDTOList, HousingInfo.class);
housingInfoList.forEach(housingInfo -> {
setHouseUse(housingInfo.getHouseUse(), housingInfo);
});
epdcScreenSelectPeopleDetailResultDTO.setHousingInfo(housingInfoList);
//居住人信息
List<FamilyMember> familyMemberList = new ArrayList<>();
Set<String> houseHeadIds = new HashSet<>(1);
houseHeadIds.add(houseHeadId);
List<BaseResidentInformationExportDto> baseResidentInformationExportDtos = housingInformationService.selectBaseResidentInformationExcelList(houseHeadIds);
baseResidentInformationExportDtos.forEach(a -> {
FamilyMember familyMember = new FamilyMember();
familyMember.setName(a.getResidentsName());
familyMember.setCurrentAddress(a.getCurrentAddress());
switch (a.getHouseHeadRelation()) {
case HouseHeadRelationConstant.CHILDREN:
familyMember.setRelation("子女");
break;
case HouseHeadRelationConstant.HUSBAND_AND_WIFE:
familyMember.setRelation("夫妻");
break;
case HouseHeadRelationConstant.PARENT:
familyMember.setRelation("父母");
break;
case HouseHeadRelationConstant.OTHER:
familyMember.setRelation("其他");
break;
default:
familyMember.setRelation("");
break;
}
familyMemberList.add(familyMember);
});
epdcScreenSelectPeopleDetailResultDTO.setFamilyMember(familyMemberList);
}
@Override
public Result<EpdcScreenHouseUseResultDTO> housingUse() {
EpdcScreenHouseUseResultDTO epdcScreenHouseUseResultDTO = baseDao.selectHouseUseDataForScreen();
PopulationInfoOverviewDTO populationInfoOverview = this.getPopulationInfoOverview();
epdcScreenHouseUseResultDTO.setHouseNum(populationInfoOverview.getHouseNum());
epdcScreenHouseUseResultDTO.setPopulationNum(populationInfoOverview.getPopulationNum());
epdcScreenHouseUseResultDTO.setMotorVehicleNum(populationInfoOverview.getMotorVehicleNum());
epdcScreenHouseUseResultDTO.setPopulationNum(populationInfoOverview.getPopulationNum());
epdcScreenHouseUseResultDTO.setEnterpriseNum(populationInfoOverview.getBusiness());
return new Result<EpdcScreenHouseUseResultDTO>().ok(epdcScreenHouseUseResultDTO);
}
@Override
public PageData<EpdcScreenGridRankingResultDTO> gridRanking(EpdcScreenGridRankingFormDTO dto) {
int pageIndex = (dto.getPageIndex() - NumConstant.ONE) * dto.getPageSize();
dto.setPageIndex(pageIndex);
List<EpdcScreenGridRankingResultDTO> list = baseDao.selectListGridRanking(dto);
return new PageData<>(list, baseDao.selectCountListGridRanking(dto));
}
@Override
public PageData<EpdcScreenHouseInfoByPeopleResultDTO> selectHouseByPeople(EpdcScreenHouseInfoByPeopleFormDTO dto) {
int pageIndex = (dto.getPageIndex() - NumConstant.ONE) * dto.getPageSize();
dto.setPageIndex(pageIndex);
List<EpdcScreenHouseInfoByPeopleResultDTO> list = baseDao.selectHouseByPeople(dto);
return new PageData<>(list, baseDao.selectCountHouseByPeople(dto)); }
@Override
public PageData<EpdcScreenPopulationInfoByHouseResultDTO> selectPeopleByHouse(EpdcScreenPopulationInfoByHouseFormDTO dto) {
int pageIndex = (dto.getPageIndex() - NumConstant.ONE) * dto.getPageSize();
dto.setPageIndex(pageIndex);
List<EpdcScreenPopulationInfoByHouseResultDTO> list = baseDao.selectPeopleByHouse(dto);
return new PageData<>(list, baseDao.selectCountPeopleByHouse(dto));
}
@Override
public PageData<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddress(EpdcScreenResidentInfoByCurrentAddressFormDTO dto) {
int pageIndex = (dto.getPageIndex() - NumConstant.ONE) * dto.getPageSize();
dto.setPageIndex(pageIndex);
List<EpdcScreenResidentInfoByCurrentAddressResultDTO> list = baseDao.selectPeopleByCurrentAddress(dto);
return new PageData<>(list, baseDao.selectCountPeopleByCurrentAddress(dto));
}
private void setHouseUse(String houseUse, HousingInfo housingInfo) {
switch (houseUse) {
case HouseUseConstant.RENT:
housingInfo.setHouseUse("租赁");
break;
case HouseUseConstant.SINCE_THE_LIVING:
housingInfo.setHouseUse("自住");
break;
case HouseUseConstant.BUSINESS:
housingInfo.setHouseUse("经营");
break;
default:
housingInfo.setHouseUse("");
break;
}
}
}

12
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java

@ -28,7 +28,6 @@ import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.commons.tools.constant.NumConstant;
import com.elink.esua.epdc.commons.tools.enums.UserTagEnum;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.security.user.SecurityUser;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.constant.UserFieldConsant;
@ -37,10 +36,7 @@ import com.elink.esua.epdc.dao.VolunteerInfoDao;
import com.elink.esua.epdc.dto.ParentAndAllDeptDTO;
import com.elink.esua.epdc.dto.UserTagDTO;
import com.elink.esua.epdc.dto.VolunteerInfoDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcAppVolunteerListFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcCompleteVolunteerInfoFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeFormDTO;
import com.elink.esua.epdc.dto.epdc.form.*;
import com.elink.esua.epdc.dto.epdc.form.v2.EpdcCompleteVolunteerInfoV2FormDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcAdjustVolunteerPointsDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcAppVolunteerListCountResultDTO;
@ -445,4 +441,10 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao,
}
return new Result().ok(NumConstant.ONE);
}
@Override
public Result updateKindnessTime(EpdcVolunteerKindnessTimeUpdateFormDTO formDto) {
baseDao.updateKindnessTime(formDto);
return new Result();
}
}

BIN
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/excel/居民信息录入模板.xls

Binary file not shown.

8
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/HousingInformationDao.xml

@ -170,7 +170,6 @@
from epdc_house_resident t
left join epdc_population_information t1 on t.RESIDENT_ID = t1.ID
left join epdc_population_information t2 on t.HOUSE_HEAD_ID = t2.ID
where t.DEL_FLAG ='0' and t1.DEL_FLAG = '0' and t2.DEL_FLAG ='0'
and t.HOUSE_HEAD_ID in
<foreach collection="houseHeadIds" index="index" item="houseHeadId" open="(" separator="," close=")">
@ -178,6 +177,13 @@
</foreach>
order by t.CREATED_TIME desc
</select>
<select id="getHouseInfoByHouseHeadID" resultType="com.elink.esua.epdc.dto.HousingInformationDTO">
select t.HOUSE_ADDRESS,t.HOUSE_AREA,t.HOUSE_USE
from epdc_housing_information t
left join epdc_house_resident t1 on t1.HOUSE_ID = t.ID and t1.DEL_FLAG = '0'
where t.DEL_FLAG ='0' and t1.RESIDENT_ID = #{houseHeadId} and t1.IS_HOUSE_HEAD = '1'
</select>
</mapper>

305
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/PopulationInformationDao.xml

@ -175,6 +175,311 @@
from epdc_population_information where DEL_FLAG = 0 and RESIDENTS_IDENTITY_NO is not null and RESIDENTS_IDENTITY_NO != '')a on 1=1
where t.DEL_FLAG ='0';
</select>
<select id="selectListPeople"
resultType="com.elink.esua.epdc.dto.epdc.result.EpdcScreenSelectPeopleResultDTO">
select data.name,data.gridName,data.identityFlag,data.houseId,data.populationId,data.identity,data.CREATED_TIME,data.identity as identityName from (
select
t.RESIDENTS_NAME as name,
group_concat(DISTINCT substring_index(t2.ALL_DEPT_NAMES,'-',-1)) as gridName,
1 as identityFlag,
'户主' as identity,
'' as houseId,
t.ID as populationId,
t.CREATED_TIME
from epdc_population_information t
left join epdc_house_resident t1 on t.ID = t1.RESIDENT_ID and t1.DEL_FLAG = '0'
left join epdc_housing_information t2 on t2.ID = t1.HOUSE_ID and t2.DEL_FLAG = '0'
where t.DEL_FLAG = '0' and t.RESIDENTS_IDENTITY_NO is not null and t.RESIDENTS_IDENTITY_NO != '' and t1.IS_HOUSE_HEAD ='1'
<if test="name != null and name != ''">
and t.RESIDENTS_NAME like concat('%', #{name}, '%')
</if>
<if test="phone != null and phone != ''">
and t.RESIDENTS_PHONE like concat('%', #{phone}, '%')
</if>
<if test="communityId != null and communityId != ''">
and find_in_set(#{communityId},t2.ALL_DEPT_IDS)
</if>
<if test="gridId != null and gridId != ''">
and find_in_set(#{gridId},t2.ALL_DEPT_IDS)
</if>
group by t.ID
union all
select
t.RESIDENTS_NAME as name,
t2.gridName,
2 as identityFlag,
'居住人' as identity,
'' as houseId,
t.ID as populationId,
t.CREATED_TIME
from epdc_population_information t
left join epdc_house_resident t1 on t.ID = t1.RESIDENT_ID
left join
(select
t.ID,group_concat(DISTINCT substring_index(t2.ALL_DEPT_NAMES,'-',-1)) as gridName
from epdc_population_information t
left join epdc_house_resident t1 on t.ID = t1.RESIDENT_ID and t1.DEL_FLAG ='0'
left join epdc_housing_information t2 on t2.ID = t1.HOUSE_ID and t2.DEL_FLAG = '0'
where t.DEL_FLAG = '0' and t.RESIDENTS_IDENTITY_NO is not null and t.RESIDENTS_IDENTITY_NO != '' and t1.IS_HOUSE_HEAD ='1'
<if test="communityId != null and communityId != ''">
and find_in_set(#{communityId},t2.ALL_DEPT_IDS)
</if>
<if test="gridId != null and gridId != ''">
and find_in_set(#{gridId},t2.ALL_DEPT_IDS)
</if>
group by t.ID
)t2 on t2.ID = t1.HOUSE_HEAD_ID
where t.DEL_FLAG = '0' and t1.DEL_FLAG ='0' and t2.gridName is not null
and (t.RESIDENTS_IDENTITY_NO is null or t.RESIDENTS_IDENTITY_NO = '') and t1.IS_HOUSE_HEAD = '0'
<if test="name != null and name != ''">
and t.RESIDENTS_NAME like concat('%', #{name}, '%')
</if>
<if test="phone != null and phone != ''">
and t.RESIDENTS_PHONE like concat('%', #{phone}, '%')
</if>
group by t.ID)data
order by CREATED_TIME desc
LIMIT #{pageIndex},#{pageSize}
</select>
<select id="selectCountListPeople"
resultType="java.lang.Integer">
select count(1) from(
select data.name,data.gridName,data.identityFlag,data.houseId,data.populationId,data.identity,data.CREATED_TIME,data.identity as identityName from (
select
t.RESIDENTS_NAME as name,
group_concat(DISTINCT substring_index(t2.ALL_DEPT_NAMES,'-',-1)) as gridName,
1 as identityFlag,
'户主' as identity,
'' as houseId,
t.ID as populationId,
t.CREATED_TIME
from epdc_population_information t
left join epdc_house_resident t1 on t.ID = t1.RESIDENT_ID and t1.DEL_FLAG = '0'
left join epdc_housing_information t2 on t2.ID = t1.HOUSE_ID and t2.DEL_FLAG = '0'
where t.DEL_FLAG = '0' and t.RESIDENTS_IDENTITY_NO is not null and t.RESIDENTS_IDENTITY_NO != '' and t1.IS_HOUSE_HEAD ='1'
<if test="name != null and name != ''">
and t.RESIDENTS_NAME like concat('%', #{name}, '%')
</if>
<if test="phone != null and phone != ''">
and t.RESIDENTS_PHONE like concat('%', #{phone}, '%')
</if>
<if test="communityId != null and communityId != ''">
and find_in_set(#{communityId},t2.ALL_DEPT_IDS)
</if>
<if test="gridId != null and gridId != ''">
and find_in_set(#{gridId},t2.ALL_DEPT_IDS)
</if>
group by t.ID
union all
select
t.RESIDENTS_NAME as name,
t2.gridName,
2 as identityFlag,
'居住人' as identity,
'' as houseId,
t.ID as populationId,
t.CREATED_TIME
from epdc_population_information t
left join epdc_house_resident t1 on t.ID = t1.RESIDENT_ID
left join
(select
t.ID,group_concat(DISTINCT substring_index(t2.ALL_DEPT_NAMES,'-',-1)) as gridName
from epdc_population_information t
left join epdc_house_resident t1 on t.ID = t1.RESIDENT_ID and t1.DEL_FLAG ='0'
left join epdc_housing_information t2 on t2.ID = t1.HOUSE_ID and t2.DEL_FLAG = '0'
where t.DEL_FLAG = '0' and t.RESIDENTS_IDENTITY_NO is not null and t.RESIDENTS_IDENTITY_NO != '' and t1.IS_HOUSE_HEAD ='1'
<if test="communityId != null and communityId != ''">
and find_in_set(#{communityId},t2.ALL_DEPT_IDS)
</if>
<if test="gridId != null and gridId != ''">
and find_in_set(#{gridId},t2.ALL_DEPT_IDS)
</if>
group by t.ID
)t2 on t2.ID = t1.HOUSE_HEAD_ID
where t.DEL_FLAG = '0' and t1.DEL_FLAG ='0' and t2.gridName is not null
and (t.RESIDENTS_IDENTITY_NO is null or t.RESIDENTS_IDENTITY_NO = '') and t1.IS_HOUSE_HEAD = '0'
<if test="name != null and name != ''">
and t.RESIDENTS_NAME like concat('%', #{name}, '%')
</if>
<if test="phone != null and phone != ''">
and t.RESIDENTS_PHONE like concat('%', #{phone}, '%')
</if>
group by t.ID)data
order by CREATED_TIME desc
)a
</select>
<select id="selectHouseUseDataForScreen"
resultType="com.elink.esua.epdc.dto.epdc.result.EpdcScreenHouseUseResultDTO">
select
count(HOUSE_USE = 0 or null) as sinceTheLivingNumber,
count(HOUSE_USE = 1 or null) as rentNumber,
count(HOUSE_USE = 2 or null) as businessNumber,
ROUND(count(HOUSE_USE = 0 or null) / count(*) * 100) as sinceTheLivingNumberPercent,
ROUND(count(HOUSE_USE = 1 or null) / count(*) * 100) as rentPercent,
ROUND(count(HOUSE_USE = 2 or null) / count(*) * 100) as businessPercent
from epdc_housing_information
where DEL_FLAG = '0';
</select>
<select id="selectListGridRanking"
resultType="com.elink.esua.epdc.dto.epdc.result.EpdcScreenGridRankingResultDTO">
<if test="rankCategory!=null and rankCategory == 0">
select ifnull(houseHead.houseHeadNum,0)+IFNULL(resident.residentNum,0) as total,houseHead.gridName from(
select count(1) as houseHeadNum,GRID_ID,gridName from(
select t2.GRID_ID,substring_index(t2.ALL_DEPT_NAMES,'-',-1) as gridName
from epdc_population_information t
left join epdc_house_resident t1 on t1.RESIDENT_ID = t.ID
left join epdc_housing_information t2 on t2.ID = t1.HOUSE_ID
where t.DEL_FLAG = '0'
and t1.DEL_FLAG = '0' and t2.DEL_FLAG='0'
and t1.IS_HOUSE_HEAD ='1'
group by t2.GRID_ID,t.ID)end
group by end.GRID_ID)houseHead
left join
(select count(1) as residentNum,GRID_ID,gridName from(
select count(1),t3.GRID_ID,substring_index(t3.ALL_DEPT_NAMES,'-',-1) as gridName from epdc_population_information t
left join epdc_house_resident t1 on t.ID = t1.RESIDENT_ID
left join epdc_house_resident t2 on t1.HOUSE_HEAD_ID = t2.RESIDENT_ID
left join epdc_housing_information t3 on t3.Id =t2.HOUSE_ID
where t.DEL_FLAG ='0' and t1.IS_HOUSE_HEAD='0' and t2.DEL_FLAG ='0' and t3.DEL_FLAG ='0'
group by t3.GRID_ID,t.ID)end
group by end.GRID_ID)resident on houseHead.GRID_ID = resident.GRID_ID
order by total desc
LIMIT #{pageIndex},#{pageSize}
</if>
<if test="rankCategory!=null and rankCategory == 1">
select substring_index(ALL_DEPT_NAMES,'-',-1)gridName,count(1) as total from epdc_housing_information where DEL_FLAG ='0'
group by GRID_ID
order by total desc
LIMIT #{pageIndex},#{pageSize}
</if>
</select>
<select id="selectCountListGridRanking" resultType="java.lang.Integer">
<if test="rankCategory!=null and rankCategory == 0">
select count(1) from (
select ifnull(houseHead.houseHeadNum,0)+IFNULL(resident.residentNum,0) as total,houseHead.gridName from(
select count(1) as houseHeadNum,GRID_ID,gridName from(
select t2.GRID_ID,substring_index(t2.ALL_DEPT_NAMES,'-',-1) as gridName
from epdc_population_information t
left join epdc_house_resident t1 on t1.RESIDENT_ID = t.ID
left join epdc_housing_information t2 on t2.ID = t1.HOUSE_ID
where t.DEL_FLAG = '0'
and t1.DEL_FLAG = '0' and t2.DEL_FLAG='0'
and t1.IS_HOUSE_HEAD ='1'
group by t2.GRID_ID,t.ID)end
group by end.GRID_ID)houseHead
left join
(select count(1) as residentNum,GRID_ID,gridName from(
select count(1),t3.GRID_ID,substring_index(t3.ALL_DEPT_NAMES,'-',-1) as gridName from epdc_population_information t
left join epdc_house_resident t1 on t.ID = t1.RESIDENT_ID
left join epdc_house_resident t2 on t1.HOUSE_HEAD_ID = t2.RESIDENT_ID
left join epdc_housing_information t3 on t3.Id =t2.HOUSE_ID
where t.DEL_FLAG ='0' and t1.IS_HOUSE_HEAD='0' and t2.DEL_FLAG ='0' and t3.DEL_FLAG ='0'
group by t3.GRID_ID,t.ID)end
group by end.GRID_ID)resident on houseHead.GRID_ID = resident.GRID_ID
order by total desc)a
</if>
<if test="rankCategory!=null and rankCategory == 1">
select count(1) from (
select substring_index(ALL_DEPT_NAMES,'-',-1)gridName,count(1) as total from epdc_housing_information where DEL_FLAG ='0'
group by GRID_ID
order by total desc)a
</if>
</select>
<select id="selectHouseByPeople"
resultType="com.elink.esua.epdc.dto.epdc.result.EpdcScreenHouseInfoByPeopleResultDTO">
select
epi.ID as populationId,
1 as identityFlag,
epi.RESIDENTS_NAME as houseHeadName,
substring_index(t.ALL_DEPT_NAMES, '-', -1) gridName,
t.HOUSE_ADDRESS as houseAddress,
epi.RESIDENTS_PHONE as houseHeadPhone
from epdc_housing_information t
left join epdc_house_resident ehr on t.ID = ehr.HOUSE_ID
left join epdc_population_information epi on ehr.RESIDENT_ID = epi.ID
where t.DEL_FLAG = '0'
and ehr.DEL_FLAG = '0' and ehr.IS_HOUSE_HEAD = '1'
and epi.DEL_FLAG = '0'
<if test="houseHeadName!=null and houseHeadName!=''">
and epi.RESIDENTS_NAME like concat('%', #{houseHeadName}, '%')
</if>
LIMIT #{pageIndex},#{pageSize}
</select>
<select id="selectCountHouseByPeople"
resultType="java.lang.Integer">
select
count(1)
from epdc_housing_information t
left join epdc_house_resident ehr on t.ID = ehr.HOUSE_ID
left join epdc_population_information epi on ehr.RESIDENT_ID = epi.ID
where t.DEL_FLAG = '0'
and ehr.DEL_FLAG = '0' and ehr.IS_HOUSE_HEAD = '1'
and epi.DEL_FLAG = '0'
<if test="houseHeadName!=null and houseHeadName!=''">
and epi.RESIDENTS_NAME like concat('%', #{houseHeadName}, '%')
</if>
</select>
<select id="selectPeopleByHouse"
resultType="com.elink.esua.epdc.dto.epdc.result.EpdcScreenPopulationInfoByHouseResultDTO">
select
t.ID as populationId,
1 as identityFlag,
t.RESIDENTS_NAME as houseHeadName,
substring_index(ehi.ALL_DEPT_NAMES, '-', -1) gridName,
ehi.HOUSE_ADDRESS as houseAddress,
t.RESIDENTS_PHONE as houseHeadPhone
from epdc_population_information t
left join epdc_house_resident ehr on t.ID = ehr.RESIDENT_ID
left join epdc_housing_information ehi on ehr.HOUSE_ID = ehi.ID
where t.DEL_FLAG = '0'
and ehr.DEL_FLAG = '0' and ehr.IS_HOUSE_HEAD = '1'
and ehi.DEL_FLAG = '0'
<if test="houseAddress!=null and houseAddress!=''">
and HOUSE_ADDRESS like concat('%', #{houseAddress}, '%')
</if>
LIMIT #{pageIndex},#{pageSize}
</select>
<select id="selectCountPeopleByHouse" resultType="java.lang.Integer">
select
count(1)
from epdc_population_information t
left join epdc_house_resident ehr on t.ID = ehr.RESIDENT_ID
left join epdc_housing_information ehi on ehr.HOUSE_ID = ehi.ID
where t.DEL_FLAG = '0'
and ehr.DEL_FLAG = '0' and ehr.IS_HOUSE_HEAD = '1'
and ehi.DEL_FLAG = '0'
<if test="houseAddress!=null and houseAddress!=''">
and HOUSE_ADDRESS like concat('%', #{houseAddress}, '%')
</if>
</select>
<select id="selectPeopleByCurrentAddress"
resultType="com.elink.esua.epdc.dto.epdc.result.EpdcScreenResidentInfoByCurrentAddressResultDTO">
select
t.ID as populationId,
2 as identityFlag,
t.RESIDENTS_NAME as residentName,
t.CURRENT_ADDRESS as currentAddress
from epdc_population_information t
left join epdc_house_resident ehr on t.ID = ehr.RESIDENT_ID
where t.DEL_FLAG = '0'
and ehr.DEL_FLAG = '0' and ehr.IS_HOUSE_HEAD = '0'
<if test="currentAddress!=null and currentAddress!=''">
and CURRENT_ADDRESS like concat('%', #{currentAddress}, '%')
</if>
LIMIT #{pageIndex},#{pageSize}
</select>
<select id="selectCountPeopleByCurrentAddress" resultType="java.lang.Integer">
select
count(1)
from epdc_population_information t
left join epdc_house_resident ehr on t.ID = ehr.RESIDENT_ID
where t.DEL_FLAG = '0'
and ehr.DEL_FLAG = '0' and ehr.IS_HOUSE_HEAD = '0'
<if test="currentAddress!=null and currentAddress!=''">
and CURRENT_ADDRESS like concat('%', #{currentAddress}, '%')
</if>
</select>
</mapper>

10
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml

@ -291,4 +291,14 @@
USER_ID = #{userId}
AND DEL_FLAG = '0'
</update>
<update id="updateKindnessTime">
UPDATE epdc_volunteer_info
SET KINDNESS_TIME = ( KINDNESS_TIME + #{kindnessTime} )
WHERE
USER_ID in
<foreach collection="userIds" index="index" item="userId" open="(" separator="," close=")">
#{userId}
</foreach>
AND DEL_FLAG = '0'
</update>
</mapper>

Loading…
Cancel
Save