Browse Source

Merge branch 'master' of http://121.42.41.42:7070/r/epmet-cloud into dev_vaccine_change

master
yinzuomei 3 years ago
parent
commit
cb2a52ddd7
  1. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  2. 1
      epmet-gateway/pom.xml
  3. 3
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
  4. 18
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerStaffDao.xml
  5. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActContentDTO.java
  6. 10
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActInfoDTO.java
  7. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActSummaryDTO.java
  8. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/LatestActContentDTO.java
  9. 10
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/LatestActInfoDTO.java
  10. 36
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/ActPageFormDTO.java
  11. 5
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/AuditUserFormDTO.java
  12. 21
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/FinishActFormDTO.java
  13. 6
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/GrantPointsFormDTO.java
  14. 4
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActContentFormDTO.java
  15. 10
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActInfoFormDTO.java
  16. 10
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/RePublishFormDTO.java
  17. 4
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActDetailResultDTO.java
  18. 183
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActDetailResultDTO.java
  19. 106
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPageResDTO.java
  20. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPreviewContentResultDTO.java
  21. 108
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActUserResDTO.java
  22. 5
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActDetailResultDTO.java
  23. 5
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActResultDTO.java
  24. 5
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActDetailResultDTO.java
  25. 5
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActResultDTO.java
  26. 5
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActDetailResultDTO.java
  27. 5
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActResultDTO.java
  28. 5
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ReEditActInfoResultDTO.java
  29. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/GrantPointsController.java
  30. 72
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java
  31. 34
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActUserController.java
  32. 8
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java
  33. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceRecordDao.java
  34. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActContentEntity.java
  35. 10
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActInfoEntity.java
  36. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActSummaryEntity.java
  37. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/LatestActContentEntity.java
  38. 11
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/LatestActInfoEntity.java
  39. 22
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActService.java
  40. 8
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActUserService.java
  41. 24
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/GrantPointsServiceImpl.java
  42. 1
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectServiceImpl.java
  43. 21
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordServiceImpl.java
  44. 143
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java
  45. 49
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java
  46. 12
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.22__act_addcol.sql
  47. 4
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.23__acttel.sql
  48. 74
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml
  49. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectDao.xml
  50. 4
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordDao.xml
  51. 10
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java
  52. 34
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java
  53. 2
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/OssService.java
  54. 4
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java
  55. 17
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcBuildingDTO.java
  56. 6
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcHouseDTO.java
  57. 15
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcNeighborHoodDTO.java
  58. 44
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcOrganizationCodeInfoDTO.java
  59. 25
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseInformationFormDTO.java
  60. 15
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBulidingAddFormDTO.java
  61. 5
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseAddFormDTO.java
  62. 13
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcNeighborHoodAddFormDTO.java
  63. 23
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingCountResultDTO.java
  64. 26
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingListResultDTO.java
  65. 25
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityCountResultDTO.java
  66. 28
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridCountListResultDTO.java
  67. 26
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridStatisticsResultDTO.java
  68. 22
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HomeListResultDTO.java
  69. 5
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoResultDTO.java
  70. 120
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcBulidingDetailDTO.java
  71. 25
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodCountResultDTO.java
  72. 28
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodListResultDTO.java
  73. 26
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/OrganizationCodeResultDTO.java
  74. 24
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/OrganizationCommunityDTO.java
  75. 18
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitCountResultDTO.java
  76. 22
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitListResultDTO.java
  77. 32
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/enums/OrganizationTypeEnums.java
  78. 291
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java
  79. 82
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcOrganizationCodeInfoController.java
  80. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java
  81. 28
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java
  82. 30
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingUnitDao.java
  83. 11
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java
  84. 122
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java
  85. 63
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcOrganizationCodeInfoDao.java
  86. 15
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcBuildingEntity.java
  87. 10
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcBuildingUnitEntity.java
  88. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java
  89. 15
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcNeighborHoodEntity.java
  90. 45
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcOrganizationCodeInfoEntity.java
  91. 33
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcOrganizationCodeInfoExcel.java
  92. 30
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/IcOrganizationCodeInfoRedis.java
  93. 112
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseInformationService.java
  94. 13
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingService.java
  95. 13
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingUnitService.java
  96. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcNeighborHoodService.java
  97. 116
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcOrganizationCodeInfoService.java
  98. 66
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java
  99. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
  100. 405
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java

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

@ -160,6 +160,7 @@ public enum EpmetErrorCode {
ERROR_DATE(8533, "不合理日期"),
CHECK_PHONE_ERROR(8534, "号码不合法"),
TITLE_AND_CONTENT_ERROR(8535, "标题和内容不能同时为空"),
// 该错误不会提示给前端,只是后端传输错误信息用。
ACCESS_SQL_FILTER_MISSION_ARGS(8701, "缺少生成权限过滤SQL所需参数"),

1
epmet-gateway/pom.xml

@ -275,6 +275,7 @@
<gateway.routes.epmet-admin-server.uri>lb://epmet-admin-server</gateway.routes.epmet-admin-server.uri>
<!-- 4、OSS服务 -->
<gateway.routes.epmet-oss-server.uri>lb://epmet-oss-server</gateway.routes.epmet-oss-server.uri>
<!-- <gateway.routes.epmet-oss-server.uri>http://localhost:8083</gateway.routes.epmet-oss-server.uri>-->
<!-- 5、消息服务 -->
<gateway.routes.epmet-message-server.uri>lb://epmet-message-server</gateway.routes.epmet-message-server.uri>
<!-- 6、工作流服务 -->

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

@ -688,6 +688,9 @@ public class EpmetUserServiceImpl implements EpmetUserService {
//1.分页查询排好序的工作人员Id列表【原本1/2步可以用一个sql,但涉及2需要按1的顺序排序,sql复杂且效率低,所以拆开】
LinkedList<String> staffIds = customerStaffDao.selectOrderRole(formDTO);
//2.批量查询工作人员信息,按传入顺序排序
if(CollectionUtils.isEmpty(staffIds)){
return new ArrayList<>();
}
List<ListStaffResultDTO> resultList = customerStaffDao.selectStaffList(staffIds);
return resultList;
}

18
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerStaffDao.xml

@ -116,16 +116,18 @@
customer_staff
WHERE
del_flag = '0'
AND user_id IN
<foreach item="staffId" collection="staffIds" open="(" separator="," close=")">
#{staffId}
</foreach>
ORDER BY field(
user_id,
<foreach item="staffId" collection="staffIds" separator=",">
<if test="staffIds != null and staffIds.size() > 0">
AND user_id IN
<foreach item="staffId" collection="staffIds" open="(" separator="," close=")">
#{staffId}
</foreach>
)
ORDER BY field(
user_id,
<foreach item="staffId" collection="staffIds" separator=",">
#{staffId}
</foreach>
)
</if>
</select>
<select id="selectByStaffId" resultType="com.epmet.dataaggre.dto.epmetuser.CustomerStaffDTO">

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

@ -50,7 +50,7 @@ public class ActContentDTO implements Serializable {
private String content;
/**
* 内容类型 图片img文字text
* 内容类型 图片img文字text;富文本rich_text
*/
private String contentType;

10
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActInfoDTO.java

@ -193,6 +193,11 @@ public class ActInfoDTO implements Serializable {
*/
private String sponsorId;
/**
* 主办方全路径包含自身id
*/
private String sponsorPath;
/**
* 活动主办方名称机关或网格的名称
*/
@ -238,6 +243,11 @@ public class ActInfoDTO implements Serializable {
*/
private Boolean summaryFlag;
/**
* true:富文本false: 原来小程序那种发布内容
*/
private Boolean richTextFlag;
/**
* 乐观锁
*/

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

@ -50,7 +50,7 @@ public class ActSummaryDTO implements Serializable {
private String content;
/**
* 内容类型 图片img文字text
* 内容类型 图片img文字text;富文本rich_text
*/
private String contentType;

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

@ -50,7 +50,7 @@ public class LatestActContentDTO implements Serializable {
private String content;
/**
* 内容类型 图片img文字text
* 内容类型 图片img文字text;富文本rich_text
*/
private String contentType;

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

@ -154,6 +154,11 @@ public class LatestActInfoDTO implements Serializable {
*/
private String sponsorId;
/**
* 主办方全路径包含自身id
*/
private String sponsorPath;
/**
* 活动主办方名称机关或网格的名称
*/
@ -179,6 +184,11 @@ public class LatestActInfoDTO implements Serializable {
*/
private Boolean auditSwitch;
/**
* true:富文本false: 原来小程序那种发布内容
*/
private Boolean richTextFlag;
/**
* 活动类型爱心活动heart 联建活动party
*/

36
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/ActPageFormDTO.java

@ -0,0 +1,36 @@
package com.epmet.dto.form.work;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import java.io.Serializable;
/**
* 爱心互助列表入参DTO
*/
@Data
public class ActPageFormDTO extends PageFormDTO implements Serializable {
private static final long serialVersionUID = 6473824879249274683L;
/**
* 活动标题
*/
private String title;
/**
* 活动预计开始时间
*/
private String actStartTime;
/**
* 活动预计结束时间
*/
private String actEndTime;
/**
* 状态 已发布/报名中published 已取消canceled; 已结束finished
*/
private String status;
/**
* tokenDto获取
*/
private String customerId;
private String userId;
}

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

@ -3,6 +3,7 @@ package com.epmet.dto.form.work;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
@ -12,6 +13,7 @@ import java.io.Serializable;
* @author yinzuomei@elink-cn.com
* @date 2020/7/23 17:28
*/
@Valid
@Data
public class AuditUserFormDTO implements Serializable {
private static final long serialVersionUID = 243279409415285207L;
@ -28,4 +30,7 @@ public class AuditUserFormDTO implements Serializable {
@NotBlank(message = "拒绝理由不能为空", groups = {RefusedUserShowGroup.class})
private String rejectReason;
@NotBlank(message = "type不能为空【通过:pass;拒绝:refused】", groups = {AddUserInternalGroup.class})
private String type;
}

21
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/FinishActFormDTO.java

@ -0,0 +1,21 @@
package com.epmet.dto.form.work;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
/**
* @Description
* @Author yzm
* @Date 2022/6/30 19:22
*/
@Data
public class FinishActFormDTO extends SaveActualTimeFormDTO implements Serializable {
private static final long serialVersionUID = -4352058593501077516L;
@NotNull(message = "分值不能为空",groups =AddUserInternalGroup.class )
private Integer reward;
private List<GrantPointsFormDTO> userList;
}

6
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/GrantPointsFormDTO.java

@ -4,6 +4,7 @@ import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
@ -27,4 +28,9 @@ public class GrantPointsFormDTO implements Serializable {
@NotBlank(message = "理由不能为空", groups = {DenyUserShowGroup.class})
private String denyRewardReason;
/**
* true:给分false不给分
*/
@NotNull(message = "请选择是否给分", groups = DenyUserShowGroup.class)
private Boolean grantPoint;
}

4
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActContentFormDTO.java

@ -29,8 +29,8 @@ public class PublishActContentFormDTO implements Serializable {
private String content;
/**
* 内容类型 图片img文字text
* 内容类型 图片img文字text;富文本rich_text
*/
@NotBlank(message = "内容类型不能为空,图片:img;文字:text", groups = {UserInternalGroup.class})
@NotBlank(message = "内容类型 图片:img;文字:text;富文本:rich_text", groups = {UserInternalGroup.class})
private String contentType;
}

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

@ -165,6 +165,11 @@ public class PublishActInfoFormDTO implements Serializable {
@NotBlank(message = "主办方id不能为空", groups = {AddUserInternalGroup.class})
private String sponsorId;
/**
* 主办方全路径包含自身id
*/
private String sponsorPath;
/**
* 主办方类型以网格名义grid , 以机关名义 agency
*/
@ -212,4 +217,9 @@ public class PublishActInfoFormDTO implements Serializable {
private String serviceMatter;
@NotEmpty(message = "服务事项不能为空", groups = {AddPartyActivityGroup.class})
private List<String> serviceMatterList;
/**
* true:富文本false: 原来小程序那种发布内容
*/
private Boolean richTextFlag;
}

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

@ -173,6 +173,11 @@ public class RePublishFormDTO implements Serializable {
@NotBlank(message = "主办方id不能为空", groups = {AddUserInternalGroup.class})
private String sponsorId;
/**
* 主办方全路径包含自身id
*/
private String sponsorPath;
/**
* 主办方类型以网格名义grid , 以机关名义 agency
*/
@ -221,4 +226,9 @@ public class RePublishFormDTO implements Serializable {
private String serviceMatter;
@NotEmpty(message = "服务事项不能为空", groups = {PublishActInfoFormDTO.AddPartyActivityGroup.class})
private List<String> serviceMatterList;
/**
* true:富文本false: 原来小程序那种发布内容
*/
private Boolean richTextFlag;
}

4
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActDetailResultDTO.java

@ -203,4 +203,8 @@ public class ResiActDetailResultDTO implements Serializable {
private String serviceMatterName;
private List<String> serviceMatterList;
private List<String> serviceMatterNameList;
/**
* true:富文本false: 原来小程序那种发布内容
*/
private Boolean richTextFlag;
}

183
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActDetailResultDTO.java

@ -0,0 +1,183 @@
package com.epmet.dto.result.work;
import com.epmet.dto.result.resi.ResiActSummaryResultDTO;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @Description
* @Author yzm
* @Date 2022/6/30 16:47
*/
@Data
public class ActDetailResultDTO implements Serializable {
private static final long serialVersionUID = 4235569576711312094L;
private String actId;
/**
* 活动标题
*/
private String title;
/**
* 封面图
*/
private String coverPic;
/**
* 活动地点
*/
private String actAddress;
/**
* 活动地点-经度
*/
private BigDecimal actLongitude;
/**
* 活动地点-纬度
*/
private BigDecimal actLatitude;
/**
* 活动预计开始时间yyyy-MM-dd HH:mm
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date actStartTime;
/**
* 活动预计结束时间yyyy-MM-dd HH:mm
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date actEndTime;
/**
* 活动人数
*/
private Integer actQuota;
/**
* 活动积分
*/
private Integer reward;
/**
* 报名审核true只有志愿者才可以参加活动false: 只要是居民就可以参加活动
*/
private Boolean volunteerLimit;
/**
* 报名审核 true: 需人工审核 false: 无需审核
*/
private Boolean auditSwitch;
/**
* 报名截止时间yyyy-MM-dd HH:mm
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date signUpEndTime;
/**
* 报名条件
*/
private String requirement;
/**
* 签到开始时间yyyy-MM-dd HH:mm
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date signInStartTime;
/**
* 签到结束时间: yyyy-MM-dd HH:mm
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date signInEndTime;
/**
* 签到地址
*/
private String signInAddress;
/**
* 签到地址-纬度
*/
private BigDecimal signInLatitude;
/**
* 签到地址-经度
*/
private BigDecimal signInLongitude;
/**
* 签到有效范围()
*/
private Integer signInRadius;
/**
* 主办方id
*/
private String sponsorId;
/**
* 主办方全路径包含自身id
*/
private String sponsorPath;
/**
* 主办方类型以网格名义grid , 以机关名义 agency
*/
private String sponsorType;
/**
* 主办方名称
*/
private String sponsorName;
/**
* 联系人
*/
private String sponsorContacts;
/**
* 联系电话
*/
private String sponsorTel;
/**
* 活动类型爱心活动heart 联建活动party
*/
@JsonIgnore
private String actType;
@JsonIgnore
private String createdBy;
/**
* true:富文本false: 原来小程序那种发布内容
*/
private Boolean richTextFlag;
/**
* true我发布的false,其他人发布的
*/
private Boolean isMyPublish;
private List<ActPreviewContentResultDTO> actContent;
/**
* 1已经总结0未总结
*/
private Boolean summaryFlag;
/**
* 只有填写了总结的才有内容
*/
List<ResiActSummaryResultDTO> summaryContent;
}

106
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActPageResDTO.java

@ -0,0 +1,106 @@
package com.epmet.dto.result.work;
import com.epmet.dto.form.work.PublishActInfoFormDTO;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
/**
* @Description
* @Author yzm
* @Date 2022/6/30 14:15
*/
@Data
public class ActPageResDTO implements Serializable {
private static final long serialVersionUID = 5330377961022020364L;
/**
*活动id
*/
private String actId;
/**
*活动标题
*/
private String title;
/**
* 活动地点
*/
private String actAddress;
/**
* 活动预计开始时间yyyy-MM-dd HH:mm
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date actStartTime;
/**
* 活动预计结束时间yyyy-MM-dd HH:mm
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date actEndTime;
/**
* 报名截止时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date signUpEndTime;
/**
* 报名开始时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date signUpStartTime;
/**
* 活动状态报名中signing_up截止报名: end_sign_up; 已开始 in_progress; 已报满 enough
*/
private String status="";
/**
* true:富文本false: 原来小程序那种发布内容
*/
private Boolean richTextFlag;
/**
* true我发布的false,其他人发布的
*/
private Boolean isMyPublish;
/**
* true:固定名额 false 不限制名额
*/
@JsonIgnore
private Boolean actQuotaCategory;
/**
* 活动名额人数
*/
@JsonIgnore
private Integer actQuota;
/**
* 已报名人数
*/
@JsonIgnore
private Integer signedUp;
/**
* 1已经总结0未总结
*/
private Boolean summaryFlag;
/**
* 活动积分
*/
private Integer reward;
/**
* 报名审核 true: 需人工审核 false: 无需审核
*/
@NotNull(message = "报名审核方式不能为空", groups = {PublishActInfoFormDTO.AddUserInternalGroup.class})
private Boolean auditSwitch;
}

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

@ -19,7 +19,7 @@ public class ActPreviewContentResultDTO implements Serializable {
private String content;
/**
* 内容类型 图片img文字text
* 内容类型 图片img文字text;富文本rich_text
*/
private String contentType;
}

108
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActUserResDTO.java

@ -0,0 +1,108 @@
package com.epmet.dto.result.work;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @Description
* @Author yzm
* @Date 2022/6/30 17:58
*/
@Data
public class ActUserResDTO implements Serializable {
private static final long serialVersionUID = 7621004224467504031L;
/**
* 主键
*/
private String actUserRelationId;
/**
* 活动id
*/
private String actId;
/**
* 用户id
*/
private String userId;
/**
* 姓名
*/
private String realName;
/**
* 昵称
*/
private String nickName;
/**
* 联系方式
*/
private String mobile;
/**
* 身份证号
*/
private String idNum;
/**
* 报名时间yyyy-MM-dd HH:mm:ss
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date signUpTime;
/**
* true: 是志愿者 false : 不是志愿者
*/
private Boolean volunteerFlag;
/**
* 实际参加活动个数
*/
private Integer signInActNum;
/**
* 报名活动个数
*/
private Integer signUpActNum;
/**
* 获得积分活动个数
*/
private Integer obtainPointsActNum;
/**
* 已处理: handled; 默认"",重新处理时reward_flag置为空字符串
*/
private String processFlag;
/**
* 已签到:signed_in; 默认""
*/
private String signInFlag;
/**
* 已给分agree, 不给分deny 默认""
*/
private String rewardFlag;
/**
* 当前状态已报名/待审核auditing
审核通过passed
审核不通过refused
取消报名canceled
*/
private String status;
public ActUserResDTO(){
this.signInActNum=0;
this.signUpActNum=0;
this.obtainPointsActNum=0;
}
}

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

@ -174,4 +174,9 @@ public class CanceledActDetailResultDTO implements Serializable {
private String serviceMatterName;
private List<String> serviceMatterList;
private List<String> serviceMatterNameList;
/**
* true:富文本false: 原来小程序那种发布内容
*/
private Boolean richTextFlag;
}

5
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActResultDTO.java

@ -61,4 +61,9 @@ public class CanceledActResultDTO implements Serializable {
* 活动类型 爱心活动heart 联建活动party
*/
private String actType;
/**
* true:富文本false: 原来小程序那种发布内容
*/
private Boolean richTextFlag;
}

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

@ -164,4 +164,9 @@ public class FinishedActDetailResultDTO implements Serializable {
private String serviceMatterName;
private List<String> serviceMatterList;
private List<String> serviceMatterNameList;
/**
* true:富文本false: 原来小程序那种发布内容
*/
private Boolean richTextFlag;
}

5
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActResultDTO.java

@ -63,4 +63,9 @@ public class FinishedActResultDTO implements Serializable {
* 活动类型 爱心活动heart 联建活动party
*/
private String actType;
/**
* true:富文本false: 原来小程序那种发布内容
*/
private Boolean richTextFlag;
}

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

@ -159,4 +159,9 @@ public class InProgressActDetailResultDTO implements Serializable {
private String serviceMatterName;
private List<String> serviceMatterList;
private List<String> serviceMatterNameList;
/**
* true:富文本false: 原来小程序那种发布内容
*/
private Boolean richTextFlag;
}

5
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActResultDTO.java

@ -87,4 +87,9 @@ public class InProgressActResultDTO implements Serializable {
* 活动类型 爱心活动heart 联建活动party
*/
private String actType;
/**
* true:富文本false: 原来小程序那种发布内容
*/
private Boolean richTextFlag;
}

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

@ -176,4 +176,9 @@ public class ReEditActInfoResultDTO implements Serializable {
private String serviceMatterName;
private List<String> serviceMatterList;
private List<String> serviceMatterNameList;
/**
* true:富文本false: 原来小程序那种发布内容
*/
private Boolean richTextFlag;
}

2
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/GrantPointsController.java

@ -54,6 +54,7 @@ public class GrantPointsController {
**/
@PostMapping("deny")
public Result deny(@RequestBody GrantPointsFormDTO formDTO){
formDTO.setGrantPoint(false);
ValidatorUtils.validateEntity(formDTO, GrantPointsFormDTO.DenyUserShowGroup.class);
grantPointsService.deny(formDTO);
return new Result();
@ -68,6 +69,7 @@ public class GrantPointsController {
**/
@PostMapping("agree")
public Result agree(@RequestBody GrantPointsFormDTO formDTO){
formDTO.setGrantPoint(true);
ValidatorUtils.validateEntity(formDTO, GrantPointsFormDTO.AddUserInternalGroup.class);
grantPointsService.agree(formDTO);
return new Result();

72
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java

@ -1,6 +1,8 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
@ -57,11 +59,16 @@ public class WorkActController {
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.work.PublishActResultDTO>
* @author yinzuomei
* @description 发布活动
* @description 发布活动-----废弃现在使用publishV2
* @Date 2020/7/21 18:32
**/
@PostMapping("publish")
public Result<PublishActResultDTO> publishAct(@RequestBody PublishActInfoFormDTO formDTO) {
public Result<PublishActResultDTO> publishAct(@LoginUser TokenDto tokenDto,@RequestBody PublishActInfoFormDTO formDTO) {
if (AppClientConstant.CLIENT_WEB.equals(tokenDto.getClient())) {
formDTO.setRichTextFlag(true);
} else {
formDTO.setRichTextFlag(false);
}
ValidatorUtils.validateEntity(formDTO, PublishActInfoFormDTO.AddUserShowGroup.class, PublishActInfoFormDTO.AddUserInternalGroup.class);
for (PublishActContentFormDTO actContentFormDTO : formDTO.getActContent()) {
ValidatorUtils.validateEntity(actContentFormDTO,
@ -73,7 +80,12 @@ public class WorkActController {
}
@PostMapping("publishV2")
public Result<PublishActResultDTO> publishActV2(@RequestBody PublishActInfoFormDTO formDTO) {
public Result<PublishActResultDTO> publishActV2(@LoginUser TokenDto tokenDto ,@RequestBody PublishActInfoFormDTO formDTO) {
if (AppClientConstant.CLIENT_WEB.equals(tokenDto.getClient())) {
formDTO.setRichTextFlag(true);
} else {
formDTO.setRichTextFlag(false);
}
if (ActConstant.HEART.equals(formDTO.getActType())) {
ValidatorUtils.validateEntity(formDTO, PublishActInfoFormDTO.AddUserShowGroup.class, PublishActInfoFormDTO.AddUserInternalGroup.class);
} else {
@ -260,11 +272,16 @@ public class WorkActController {
* @param rePublishFormDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.work.PublishActResultDTO>
* @author yinzuomei
* @description 重新发布活动
* @description 重新发布活动-----废弃现在使用republishV2
* @Date 2020/7/27 13:55
**/
@PostMapping("republish")
public Result<PublishActResultDTO> rePublish(@RequestBody RePublishFormDTO rePublishFormDTO) {
public Result<PublishActResultDTO> rePublish(@LoginUser TokenDto tokenDto,@RequestBody RePublishFormDTO rePublishFormDTO) {
if (AppClientConstant.CLIENT_WEB.equals(tokenDto.getClient())) {
rePublishFormDTO.setRichTextFlag(true);
} else {
rePublishFormDTO.setRichTextFlag(false);
}
ValidatorUtils.validateEntity(rePublishFormDTO, RePublishFormDTO.AddUserShowGroup.class, RePublishFormDTO.AddUserInternalGroup.class);
for (PublishActContentFormDTO actContentFormDTO : rePublishFormDTO.getActContent()) {
ValidatorUtils.validateEntity(actContentFormDTO,
@ -276,9 +293,14 @@ public class WorkActController {
}
@PostMapping("republishV2")
public Result<PublishActResultDTO> rePublishV2(@RequestBody RePublishFormDTO rePublishFormDTO) {
public Result<PublishActResultDTO> rePublishV2(@LoginUser TokenDto tokenDto,@RequestBody RePublishFormDTO rePublishFormDTO) {
if (AppClientConstant.CLIENT_WEB.equals(tokenDto.getClient())) {
rePublishFormDTO.setRichTextFlag(true);
} else {
rePublishFormDTO.setRichTextFlag(false);
}
if (ActConstant.HEART.equals(rePublishFormDTO.getActType())) {
ValidatorUtils.validateEntity(rePublishFormDTO, PublishActInfoFormDTO.AddUserShowGroup.class, PublishActInfoFormDTO.AddUserInternalGroup.class);
ValidatorUtils.validateEntity(rePublishFormDTO, RePublishFormDTO.AddUserShowGroup.class, RePublishFormDTO.AddUserInternalGroup.class);
} else {
ValidatorUtils.validateEntity(rePublishFormDTO, RePublishFormDTO.AddUserShowGroup.class, RePublishFormDTO.AddUserInternalGroup.class);
}
@ -291,5 +313,41 @@ public class WorkActController {
return new Result<PublishActResultDTO>().ok(workActService.rePublishV2(rePublishFormDTO));
}
/**
* 数字社区-爱心互助活动列表查询当前客户下的所有活动限制活动类型是爱心活动
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("pagelist")
public Result<PageData<ActPageResDTO>> pageList(@LoginUser TokenDto tokenDto, @RequestBody ActPageFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
PageData<ActPageResDTO> page = workActService.pageList(formDTO);
return new Result<PageData<ActPageResDTO>>().ok(page);
}
/**
* 数字社区查看活动详情
*
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("detail")
public Result<ActDetailResultDTO> queryActDetail(@LoginUser TokenDto tokenDto, @RequestBody ActIdFormDTO formDTO) {
return new Result<ActDetailResultDTO>().ok(workActService.queryActDetail(formDTO.getActId(), tokenDto.getUserId()));
}
/**
* 数字社区结束活动
* @param formDTO
* @return
*/
@PostMapping("finish")
public Result finish(@RequestBody FinishActFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO,SaveActualTimeFormDTO.AddUserInternalGroup.class,SaveActualTimeFormDTO.UserShowGroup.class);
workActService.finish(formDTO);
return new Result();
}
}

34
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActUserController.java

@ -1,7 +1,9 @@
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constant.ActConstant;
import com.epmet.dto.form.work.AactUserDetailFormDTO;
import com.epmet.dto.form.work.ActIdFormDTO;
import com.epmet.dto.form.work.AuditUserFormDTO;
@ -130,6 +132,7 @@ public class WorkActUserController {
**/
@PostMapping("auditpass")
public Result auditPass(@RequestBody AuditUserFormDTO formDTO){
formDTO.setType(ActConstant.ACT_USER_STATUS_PASSED);
ValidatorUtils.validateEntity(formDTO, AuditUserFormDTO.AddUserInternalGroup.class);
workActUserService.auditPass(formDTO.getActUserRelationId());
return new Result();
@ -144,6 +147,7 @@ public class WorkActUserController {
**/
@PostMapping("auditrefuse")
public Result auditrefuse(@RequestBody AuditUserFormDTO formDTO){
formDTO.setType(ActConstant.ACT_USER_STATUS_REFUSED);
ValidatorUtils.validateEntity(formDTO, AuditUserFormDTO.RefusedUserShowGroup.class);
workActUserService.auditRefuse(formDTO);
return new Result();
@ -174,4 +178,34 @@ public class WorkActUserController {
ValidatorUtils.validateEntity(formDTO, ActIdFormDTO.AddUserInternalGroup.class);
return new Result<List<CanceledUserResultDTO>>().ok(workActUserService.queryCanceledUserList(formDTO));
}
/**
* 数字社区查看人员列表报名审核查看人员活动结束发放积分页面人员列表
* @param formDTO
* @return
*/
@PostMapping("userlist")
public Result<PageData<ActUserResDTO>> queryUserList(@RequestBody ActIdFormDTO formDTO){
return new Result<PageData<ActUserResDTO>>().ok(workActUserService.queryUserList(formDTO.getActId()));
}
/**
* 批量审核通过拒绝调用原来的接口
* @param formDTOList
* @return
*/
@PostMapping("audit-user")
public Result auditUser(@RequestBody List<AuditUserFormDTO> formDTOList) {
ValidatorUtils.validateEntity(formDTOList);
for (AuditUserFormDTO formDTO : formDTOList) {
if (ActConstant.ACT_USER_STATUS_REFUSED.equals(formDTO.getType())) {
workActUserService.auditRefuse(formDTO);
} else if (ActConstant.ACT_USER_STATUS_PASSED.equals(formDTO.getType())) {
workActUserService.auditPass(formDTO.getActUserRelationId());
}
}
return new Result();
}
}

8
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java

@ -24,6 +24,7 @@ import com.epmet.dto.form.resi.ResiActDetailFormDTO;
import com.epmet.dto.form.resi.ResiLatestActFormDTO;
import com.epmet.dto.form.resi.ResiMyActFormDTO;
import com.epmet.dto.form.work.ActListCommonFormDTO;
import com.epmet.dto.form.work.ActPageFormDTO;
import com.epmet.dto.result.resi.*;
import com.epmet.dto.result.work.*;
import com.epmet.entity.ActInfoEntity;
@ -319,4 +320,11 @@ public interface ActInfoDao extends BaseDao<ActInfoEntity> {
* @return java.util.List<com.epmet.dto.ActInfoDTO>
*/
List<ActInfoDTO> selectPublishedAct(@Param("staffId") String staffId);
/**
* 数字社区-爱心互助活动列表查询当前客户下的所有活动限制活动类型是爱心活动
* @param formDTO
* @return
*/
List<ActPageResDTO> pageList(ActPageFormDTO formDTO);
}

3
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceRecordDao.java

@ -25,5 +25,6 @@ public interface IcServiceRecordDao extends BaseDao<IcServiceRecordEntity> {
@Param("serviceTimeStart") Date serviceTimeStart,
@Param("serviceTimeEnd") Date serviceTimeEnd,
@Param("serviceStatus") String serviceStatus,
@Param("satisfaction") String satisfaction);
@Param("satisfaction") String satisfaction,
@Param("searchOrgIdPath") String searchOrgIdPath);
}

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

@ -48,7 +48,7 @@ public class ActContentEntity extends BaseEpmetEntity {
private String content;
/**
* 内容类型 图片img文字text
* 内容类型 图片img文字text;富文本rich_text
*/
private String contentType;

10
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActInfoEntity.java

@ -171,6 +171,11 @@ public class ActInfoEntity extends BaseEpmetEntity {
*/
private String sponsorId;
/**
* 主办方全路径包含自身id
*/
private String sponsorPath;
/**
* 活动主办方名称机关或网格的名称
*/
@ -216,6 +221,11 @@ public class ActInfoEntity extends BaseEpmetEntity {
*/
private Boolean summaryFlag;
/**
* true:富文本false: 原来小程序那种发布内容
*/
private Boolean richTextFlag;
/**
* 活动类型爱心活动heart 联建活动party
*/

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

@ -48,7 +48,7 @@ public class ActSummaryEntity extends BaseEpmetEntity {
private String content;
/**
* 内容类型 图片img文字text
* 内容类型 图片img文字text;富文本rich_text
*/
private String contentType;

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

@ -48,7 +48,7 @@ public class LatestActContentEntity extends BaseEpmetEntity {
private String content;
/**
* 内容类型 图片img文字text
* 内容类型 图片img文字text;富文本rich_text
*/
private String contentType;

11
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/LatestActInfoEntity.java

@ -153,6 +153,11 @@ public class LatestActInfoEntity extends BaseEpmetEntity {
*/
private String sponsorId;
/**
* 主办方全路径包含自身id
*/
private String sponsorPath;
/**
* 活动主办方名称机关或网格的名称
*/
@ -177,6 +182,12 @@ public class LatestActInfoEntity extends BaseEpmetEntity {
* 审核开关1报名人员需要人工审核0不需要
*/
private Boolean auditSwitch;
/**
* true:富文本false: 原来小程序那种发布内容
*/
private Boolean richTextFlag;
/**
* 数据库新增ACT_INFO_ID字段act_info.id
*/

22
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActService.java

@ -1,5 +1,6 @@
package com.epmet.service;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.form.work.*;
import com.epmet.dto.result.work.*;
@ -148,4 +149,25 @@ public interface WorkActService {
PublishActResultDTO rePublish(RePublishFormDTO rePublishFormDTO);
PublishActResultDTO rePublishV2(RePublishFormDTO rePublishFormDTO);
void testGrantPoint(TestGrantFormDTO formDTO);
/**
* 数字社区-爱心互助活动列表查询当前客户下的所有活动限制活动类型是爱心活动
* @param formDTO
* @return
*/
PageData<ActPageResDTO> pageList(ActPageFormDTO formDTO);
/**
* 数字社区查看活动详情
* @param actId
* @param userId
* @return
*/
ActDetailResultDTO queryActDetail(String actId, String userId);
/**
*
* @param formDTO
*/
void finish(FinishActFormDTO formDTO);
}

8
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActUserService.java

@ -1,5 +1,6 @@
package com.epmet.service;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.form.work.AactUserDetailFormDTO;
import com.epmet.dto.form.work.ActIdFormDTO;
import com.epmet.dto.form.work.AuditUserFormDTO;
@ -141,4 +142,11 @@ public interface WorkActUserService {
* @Date 2020/7/24 12:52
**/
Boolean getVolunteerFlag(String userId);
/**
* 数字社区查看人员列表报名审核查看人员活动结束发放积分页面人员列表
* @param actId
* @return
*/
PageData<ActUserResDTO> queryUserList(String actId);
}

24
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/GrantPointsServiceImpl.java

@ -1,5 +1,6 @@
package com.epmet.service.impl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
@ -108,19 +109,14 @@ public class GrantPointsServiceImpl implements GrantPointsService {
@Transactional(rollbackFor = Exception.class)
public void agree(GrantPointsFormDTO formDTO) {
//是否是待处理
ActUserRelationDTO actUserRelationDTO=actUserRelationService.get(formDTO.getActUserRelationId());
if(null==actUserRelationDTO){
logger.warn("积分发放-给分act_user_relation is null,actUserRelationId="+formDTO.getActUserRelationId());
return;
}
//如果是已处理直接返回
if(ActConstant.HANDLED.equals(actUserRelationDTO.getProcessFlag())){
logger.info("积分发放-给分act_user_relation already handled,actUserRelationId="+formDTO.getActUserRelationId());
ActUserRelationDTO actUserRelationDTO=actUserRelationService.get(formDTO.getActUserRelationId());
if (null == actUserRelationDTO || ActConstant.HANDLED.equals(actUserRelationDTO.getProcessFlag())) {
return;
}
//查取分值
ActInfoDTO actInfoDTO=actInfoService.get(actUserRelationDTO.getActId());
if (null == actInfoDTO || ActConstant.ACT_STATUS_FINISHED.equals(actInfoDTO.getActStatus())) {
if (null == actInfoDTO || ActConstant.ACT_STATUS_FINISHED.equals(actInfoDTO.getActStatus())|| NumConstant.ZERO==actInfoDTO.getReward()) {
logger.warn("积分发放-给分act_info is null or act_info is finished");
return;
}
@ -152,20 +148,14 @@ public class GrantPointsServiceImpl implements GrantPointsService {
@Override
@Transactional(rollbackFor = Exception.class)
public void deny(GrantPointsFormDTO formDTO) {
//是否是待处理
ActUserRelationDTO actUserRelationDTO=actUserRelationService.get(formDTO.getActUserRelationId());
if(null==actUserRelationDTO){
logger.warn("积分发放-不给分act_user_relation is null,actUserRelationId="+formDTO.getActUserRelationId());
return;
}
//如果是已处理直接返回
if(ActConstant.HANDLED.equals(actUserRelationDTO.getProcessFlag())){
logger.info("积分发放-不给分act_user_relation already handled,actUserRelationId="+formDTO.getActUserRelationId());
ActUserRelationDTO actUserRelationDTO=actUserRelationService.get(formDTO.getActUserRelationId());
if (null == actUserRelationDTO || ActConstant.HANDLED.equals(actUserRelationDTO.getProcessFlag())) {
return;
}
//查取分值
ActInfoDTO actInfoDTO=actInfoService.get(actUserRelationDTO.getActId());
if (null == actInfoDTO || ActConstant.ACT_STATUS_FINISHED.equals(actInfoDTO.getActStatus())) {
if (null == actInfoDTO || ActConstant.ACT_STATUS_FINISHED.equals(actInfoDTO.getActStatus())|| NumConstant.ZERO==actInfoDTO.getReward()) {
logger.warn("积分发放-不给分act_info is null or act_info is finished");
return;
}

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

@ -150,6 +150,7 @@ public class IcServiceProjectServiceImpl extends BaseServiceImpl<IcServiceProjec
if (null == staffInfo){
throw new EpmetException("未查询到此工作人员"+formDTO.getUserId());
}
//查询当前组织及下级 的数据
formDTO.setAgencyId(staffInfo.getAgencyId());
PageInfo<ServiceProjectListResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.getServiceProjectList(formDTO));
if (CollectionUtils.isNotEmpty(pageInfo.getList())){

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

@ -2,15 +2,18 @@ package com.epmet.service.impl;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.DictTypeEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.EpmetRequestHolder;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.*;
import com.epmet.dto.IcNeighborHoodDTO;
@ -147,8 +150,22 @@ public class IcServiceRecordServiceImpl extends BaseServiceImpl<IcServiceRecordD
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), msg, msg);
}
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(EpmetRequestHolder.getLoginUserCustomerId(),
EpmetRequestHolder.getLoginUserId());
// 当前组织的PIDS。只查询当前组织及下级的服务记录
String searchOrgIdPath = "";
if (StringUtils.isBlank(staffInfo.getAgencyPIds()) || "0".equals(staffInfo.getAgencyPIds())) {
searchOrgIdPath = staffInfo.getAgencyId();
} else {
searchOrgIdPath = staffInfo.getAgencyPIds().concat(":").concat(staffInfo.getAgencyId());
}
PageHelper.startPage(pageNo, pageSize);
List<ServiceProjectRecordResultDTO> records = baseDao.listServiceRecords(serviceCategoryKey, serviceProjectName, serviceOrgName, serviceTimeStart, serviceTimeEnd, serviceStatus, satisfaction);
List<ServiceProjectRecordResultDTO> records = baseDao.listServiceRecords(
serviceCategoryKey, serviceProjectName, serviceOrgName, serviceTimeStart, serviceTimeEnd, serviceStatus, satisfaction, searchOrgIdPath);
PageInfo<ServiceProjectRecordResultDTO> pi = new PageInfo<>(records);
// 补充信息
@ -260,7 +277,7 @@ public class IcServiceRecordServiceImpl extends BaseServiceImpl<IcServiceRecordD
if ("0".equals(agencyInfo.getPid())) {
return new String[]{ agencyInfo.getId(), agencyInfo.getOrganizationName() };
}
return new String[]{ agencyInfo.getPids().concat(":").concat(agencyInfo.getPid()), agencyInfo.getOrganizationName() };
return new String[]{ agencyInfo.getPids().concat(":").concat(agencyInfo.getId()), agencyInfo.getOrganizationName() };
} else if ("grid".equals(scopeObjectType)) {
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(scopeObjectId);
// 网格的pids是到社区的

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

@ -9,6 +9,7 @@ import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.scan.param.ImgScanParamDTO;
@ -27,6 +28,7 @@ import com.epmet.dto.*;
import com.epmet.dto.form.SystemMsgFormDTO;
import com.epmet.dto.form.UserMessageFormDTO;
import com.epmet.dto.form.WxSubscribeMessageFormDTO;
import com.epmet.dto.form.resi.ResiActContentFormDTO;
import com.epmet.dto.form.work.*;
import com.epmet.dto.result.ActSponsorResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
@ -35,6 +37,9 @@ import com.epmet.entity.*;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.service.*;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -108,7 +113,8 @@ public class WorkActServiceImpl implements WorkActService {
private IcActivityUnitRelationService icActivityUnitRelationService;
@Resource
private IcActivityServiceRelationService icActivityServiceRelationService;
@Autowired
private ActPointLogService actPointLogService;
/**
* @author yinzuomei
@ -304,6 +310,10 @@ public class WorkActServiceImpl implements WorkActService {
* @Date 2020/7/21 19:20
**/
private void auditAct(PublishActInfoFormDTO formDTO) {
if(formDTO.getRichTextFlag()){
// true:富文本;false: 原来小程序那种发布内容
return;
}
//1、活动标题
if (StringUtils.isNotBlank(formDTO.getTitle())) {
this.auditActTitle(formDTO.getTitle());
@ -341,6 +351,9 @@ public class WorkActServiceImpl implements WorkActService {
* @Date 2020/7/27 14:01
**/
private void auditRePublishAct(RePublishFormDTO formDTO) {
if(formDTO.getRichTextFlag()){
return;
}
//1、活动标题
if (StringUtils.isNotBlank(formDTO.getTitle())) {
this.auditActTitle(formDTO.getTitle());
@ -1346,7 +1359,11 @@ public class WorkActServiceImpl implements WorkActService {
imgList.add(actContent.getContent());
}
}
this.auditActContent(textList,imgList);
//
if(!actInfoDTO.getRichTextFlag()){
//不是富文本的走审核
this.auditActContent(textList,imgList);
}
//插入act_summary记录
int orderNum=1;
for(PublishActContentFormDTO actContentFormDTO:formDTO.getActSummary()){
@ -1621,4 +1638,126 @@ public class WorkActServiceImpl implements WorkActService {
});
return content.get();
}
/**
* @param formDTO
* @return 数字社区-爱心互助活动列表查询当前客户下的所有活动限制活动类型是爱心活动
*/
@Override
public PageData<ActPageResDTO> pageList(ActPageFormDTO formDTO) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage());
List<ActPageResDTO> list = actInfoDao.pageList(formDTO);
if (CollectionUtils.isNotEmpty(list)) {
Date nowDate = new Date();
for (ActPageResDTO actPageResDTO : list) {
// 进行中的重新设置状态
if (ActConstant.ACT_STATUS_PUBLISHED.equals(actPageResDTO.getStatus())) {
// 活动状态:报名中:signing_up;截止报名: end_sign_up; 已开始: in_progress; 已报满: enough
if (!NumConstant.ONE_STR.equals(DateUtils.comparteDate(nowDate, actPageResDTO.getSignUpEndTime()))) {
logger.info(String.format("当前时间%s报名截止时间%s处于报名中",
DateUtils.format(nowDate, DateUtils.DATE_TIME_PATTERN),
DateUtils.format(actPageResDTO.getSignUpEndTime(), DateUtils.DATE_TIME_PATTERN)));
// 截止报名时间之前(包含报名时间截止时间点)
if (!actPageResDTO.getActQuotaCategory()) {
// 如果是不限制名额,则显示报名中
actPageResDTO.setStatus("signing_up");
logger.info("活动不限制名额,界面显示 报名中");
continue;
} else {
// 固定名额,且已报名人数<活动需要人数显示报名中
if (actPageResDTO.getActQuota() > actPageResDTO.getSignedUp()) {
logger.info("活动限制名额,未报满,界面显示报名中");
actPageResDTO.setStatus("signing_up");
continue;
} else if (actPageResDTO.getActQuota().equals(actPageResDTO.getSignedUp())) {
actPageResDTO.setStatus("enough");
logger.info("活动限制名额,且已报满,界面显示已报满");
continue;
}
}
} else if (NumConstant.ONE_STR.equals(DateUtils.comparteDate(nowDate, actPageResDTO.getSignUpEndTime()))
&& NumConstant.ONE_NEG_STR.equals(DateUtils.comparteDate(nowDate, actPageResDTO.getActStartTime()))) {
logger.info(String.format("当前时间%s报名截止时间%s活动预计开始时间%s界面显示截止报名",
DateUtils.format(nowDate, DateUtils.DATE_TIME_PATTERN),
DateUtils.format(actPageResDTO.getSignUpEndTime(), DateUtils.DATE_TIME_PATTERN),
DateUtils.format(actPageResDTO.getActStartTime(), DateUtils.DATE_TIME_PATTERN)));
// 活动报名截止-活动预计开始之间显示截止报名
actPageResDTO.setStatus("end_sign_up");
continue;
} else if (!NumConstant.ONE_NEG_STR.equals(DateUtils.comparteDate(nowDate, actPageResDTO.getActStartTime()))) {
logger.info(String.format("当前时间%s活动预计开始时间%s界面显示已开始",
DateUtils.format(nowDate, DateUtils.DATE_TIME_PATTERN),
DateUtils.format(actPageResDTO.getActStartTime(), DateUtils.DATE_TIME_PATTERN)));
// 活动预计开始时间点之后,包含活动预计开始时间点,显示 已开始
actPageResDTO.setStatus("in_progress");
continue;
}
}
}
}
PageInfo<ActPageResDTO> pageInfo = new PageInfo<>(list);
return new PageData<>(list, pageInfo.getTotal());
}
/**
* 数字社区查看活动详情
*
* @param actId
* @param userId
* @return
*/
@Override
public ActDetailResultDTO queryActDetail(String actId, String userId) {
ActInfoEntity actInfoEntity=actInfoDao.selectById(actId);
ActDetailResultDTO resultDTO=ConvertUtils.sourceToTarget(actInfoEntity,ActDetailResultDTO.class);
resultDTO.setActId(actId);
//查询活动详情
List<ActPreviewContentResultDTO> list = actContentDao.selectByActId(actId);
resultDTO.setActContent(list);
//当前活动是否是我发布的
if(resultDTO.getCreatedBy().equals(loginUserUtil.getLoginUserId())){
resultDTO.setIsMyPublish(true);
}else{
resultDTO.setIsMyPublish(false);
}
if(resultDTO.getSummaryFlag()){
ResiActContentFormDTO resiActContentFormDTO=new ResiActContentFormDTO();
resiActContentFormDTO.setActId(actId);
resultDTO.setSummaryContent(actSummaryDao.selectListSummary(resiActContentFormDTO));
}
return resultDTO;
}
/**
* @param formDTO
*/
@Transactional(rollbackFor = Exception.class)
@Override
public void finish(FinishActFormDTO formDTO) {
// 1、保存活动实际开始、结束时间
saveActualTime(formDTO);
// 2、积分大于0的->发放积分
if (formDTO.getReward() > NumConstant.ZERO) {
for (GrantPointsFormDTO grantPointsFormDTO : formDTO.getUserList()) {
ActUserRelationDTO actUserRelationDTO = actUserRelationService.get(grantPointsFormDTO.getActUserRelationId());
// 更新act_user_relation改为已处理,给分
actUserRelationDTO.setProcessFlag(ActConstant.HANDLED);
actUserRelationDTO.setRewardFlag(grantPointsFormDTO.getGrantPoint() ? ActConstant.ACT_USER_STATUS_AGREE : ActConstant.ACT_USER_STATUS_DENY);
actUserRelationDTO.setDenyRewardReason(StrConstant.EPMETY_STR);
actUserRelationService.update(actUserRelationDTO);
// 增加一条act_point_log
ActPointLogDTO actPointLogDTO = new ActPointLogDTO();
actPointLogDTO.setActId(actUserRelationDTO.getActId());
actPointLogDTO.setUserId(actUserRelationDTO.getUserId());
actPointLogDTO.setPoints(formDTO.getReward());
actPointLogDTO.setOperateType(grantPointsFormDTO.getGrantPoint() ? ActConstant.ACT_USER_STATUS_AGREE : ActConstant.ACT_USER_STATUS_DENY);
actPointLogDTO.setRemark(grantPointsFormDTO.getGrantPoint() ? StrConstant.EPMETY_STR : grantPointsFormDTO.getDenyRewardReason());
actPointLogService.save(actPointLogDTO);
}
}
// 3、结束活动
finishAct(formDTO.getActId());
}
}

49
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java

@ -6,7 +6,9 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.ActConstant;
import com.epmet.constant.ActMessageConstant;
@ -36,6 +38,7 @@ import com.epmet.service.ActInfoService;
import com.epmet.service.ActUserRelationService;
import com.epmet.service.HeartUserInfoService;
import com.epmet.service.WorkActUserService;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -46,6 +49,8 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
/**
* 工作端活动人员相关api
@ -775,4 +780,48 @@ public class WorkActUserServiceImpl implements WorkActUserService {
}
return resultUserList.getData().get(0);
}
/**
* 数字社区查看人员列表报名审核查看人员活动结束发放积分页面人员列表
*
* @param actId
* @return
*/
@Override
public PageData<ActUserResDTO> queryUserList(String actId) {
List<ActUserResDTO> list = new ArrayList<>();
// 活动相关人员
List<ActUserRelationDTO> actUserRelationDTOList = actUserRelationService.getUserList(actId, StrConstant.EPMETY_STR);
if (null == actUserRelationDTOList || actUserRelationDTOList.size() == 0) {
return new PageData<>(list, NumConstant.ZERO);
}
// 查询人员id集合
Set<String> userIdList = actUserRelationDTOList.stream().map(ActUserRelationDTO::getUserId).collect(Collectors.toSet());
// 查询出用户基本信息
List<UserBaseInfoResultDTO> userInfoList = this.queryUserBaseInfoList(new ArrayList<>(userIdList));
for (ActUserRelationDTO actUserRelationDTO : actUserRelationDTOList) {
ActUserResDTO resultDTO = ConvertUtils.sourceToTarget(actUserRelationDTO,ActUserResDTO.class);
resultDTO.setActUserRelationId(actUserRelationDTO.getId());
resultDTO.setSignUpTime(actUserRelationDTO.getCreatedTime());
// true: 是志愿者 false : 不是志愿者
resultDTO.setVolunteerFlag(getVolunteerFlag(actUserRelationDTO.getUserId()));
// 赋值基本信息
for (UserBaseInfoResultDTO userBaseInfoResultDTO : userInfoList) {
if (actUserRelationDTO.getUserId().equals(userBaseInfoResultDTO.getUserId())) {
resultDTO.setRealName(StringUtils.isNotBlank(userBaseInfoResultDTO.getRealName()) ? userBaseInfoResultDTO.getRealName() : StrConstant.EPMETY_STR);
resultDTO.setNickName(StringUtils.isNotBlank(userBaseInfoResultDTO.getNickname()) ? userBaseInfoResultDTO.getNickname() : StrConstant.EPMETY_STR);
resultDTO.setMobile(StringUtils.isNotBlank(userBaseInfoResultDTO.getMobile()) ? userBaseInfoResultDTO.getMobile() : StrConstant.EPMETY_STR);
resultDTO.setIdNum(StringUtils.isNotBlank(userBaseInfoResultDTO.getIdNum()) ? userBaseInfoResultDTO.getIdNum() : StrConstant.EPMETY_STR);
break;
}
}
HistoricalActInfo historicalActInfo = this.getHistoricalActInfo(resultDTO.getUserId(), actId);
resultDTO.setSignInActNum(historicalActInfo.getSignInActNum());
resultDTO.setSignUpActNum(historicalActInfo.getSignUpActNum());
resultDTO.setObtainPointsActNum(historicalActInfo.getObtainPointsActNum());
list.add(resultDTO);
}
PageInfo<ActUserResDTO> pageInfo = new PageInfo<>(list);
return new PageData<>(list, pageInfo.getTotal());
}
}

12
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.22__act_addcol.sql

@ -0,0 +1,12 @@
alter table act_content MODIFY COLUMN CONTENT_TYPE varchar(32) NOT NULL COMMENT '内容类型 图片:img;文字:text;富文本:rich_text';
alter table act_content MODIFY COLUMN CONTENT LONGTEXT not null COMMENT '内容';
alter table act_info add COLUMN RICH_TEXT_FLAG TINYINT(1) not null DEFAULT '0' COMMENT '1:富文本;0:不是' AFTER SUMMARY_FLAG;
alter table latest_act_info add COLUMN RICH_TEXT_FLAG TINYINT(1) not null DEFAULT '0' COMMENT '1:富文本;0:不是' AFTER AUDIT_SWITCH;
alter table latest_act_content MODIFY COLUMN CONTENT_TYPE varchar(32) NOT NULL COMMENT '内容类型 图片:img;文字:text;富文本:rich_text';
alter table latest_act_content MODIFY COLUMN CONTENT LONGTEXT not null COMMENT '内容';
alter table act_summary MODIFY COLUMN CONTENT LONGTEXT not null COMMENT '总结内容';
alter table act_summary MODIFY CONTENT_TYPE VARCHAR(32)not null COMMENT '内容类型 图片:img;文字:text;富文本:rich_text';
alter table act_info add COLUMN SPONSOR_PATH VARCHAR(512) comment '主办方全路径包含自身id' AFTER SPONSOR_ID;
alter table latest_act_info add COLUMN SPONSOR_PATH VARCHAR(512) comment '主办方全路径包含自身id' AFTER SPONSOR_ID;

4
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.23__acttel.sql

@ -0,0 +1,4 @@
alter table act_info MODIFY COLUMN
`SPONSOR_TEL` varchar(64) NOT NULL COMMENT '联系电话' AFTER SPONSOR_CONTACTS;
alter table latest_act_info MODIFY COLUMN `SPONSOR_TEL` varchar(64)COMMENT '联系电话' AFTER SPONSOR_CONTACTS;

74
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml

@ -449,7 +449,8 @@
i.UNIT_ID AS unitId,
i.SERVICE_MATTER AS serviceMatter,
i.TARGET AS target,
i.act_type as actType
i.act_type as actType,
i.RICH_TEXT_FLAG as richTextFlag
FROM
act_info i
LEFT JOIN (SELECT count(1) signupNum, re.ACT_ID from act_user_relation re WHERE re.DEL_FLAG = '0' AND re.`STATUS` != 'refused' AND re.`STATUS` != 'canceled' GROUP BY re.ACT_ID) c ON c.ACT_ID = i.ID
@ -534,7 +535,8 @@
ai.SIGN_UP_END_TIME as signUpEndTime,
ai.SIGN_UP_START_TIME as signUpStartTime,
ai.ACT_ADDRESS as actAddress,
ai.act_type as actType
ai.act_type as actType,
ai.RICH_TEXT_FLAG as richTextFlag
FROM
act_info ai
WHERE
@ -556,7 +558,8 @@
ai.CANCEL_TIME AS cancelTime,
ai.CANCEL_REASON AS cancelReason,
ai.ACT_ADDRESS as actAddress,
ai.act_type as actType
ai.act_type as actType,
ai.RICH_TEXT_FLAG as richTextFlag
FROM
act_info ai
WHERE
@ -579,7 +582,8 @@
ai.ACTUAL_START_TIME as actualStartTime,
ai.ACTUAL_END_TIME as actualEndTime,
ai.ACT_ADDRESS as actAddress,
ai.act_type as actType
ai.act_type as actType,
ai.RICH_TEXT_FLAG as richTextFlag
FROM
act_info ai
WHERE
@ -669,7 +673,8 @@
ai.ACT_TYPE,
ai.UNIT_ID,
ai.SERVICE_MATTER,
ai.TARGET
ai.TARGET,
ai.RICH_TEXT_FLAG as richTextFlag
FROM
act_info ai
WHERE
@ -706,7 +711,8 @@
ai.ACT_TYPE,
ai.UNIT_ID,
ai.SERVICE_MATTER,
ai.TARGET
ai.TARGET,
ai.RICH_TEXT_FLAG as richTextFlag
FROM
act_info ai
WHERE
@ -749,7 +755,8 @@
ai.ACT_TYPE,
ai.UNIT_ID,
ai.SERVICE_MATTER,
ai.TARGET
ai.TARGET,
ai.RICH_TEXT_FLAG as richTextFlag
FROM
act_info ai
WHERE
@ -798,4 +805,57 @@
AND ACT_STATUS = 'published'
AND CREATED_BY = #{staffId}
</select>
<!-- 分页查询爱心活动-->
<select id="pageList" parameterType="com.epmet.dto.form.work.ActPageFormDTO" resultType="com.epmet.dto.result.work.ActPageResDTO">
SELECT
ai.id AS actId,
ai.TITLE AS title,
ai.ACT_ADDRESS as actAddress,
ai.ACT_START_TIME AS actStartTime,
ai.ACT_END_TIME AS actEndTime,
ai.SIGN_UP_END_TIME as signUpEndTime,
ai.SIGN_UP_START_TIME as signUpStartTime,
ai.ACT_STATUS as status,
ai.RICH_TEXT_FLAG as richTextFlag,
(
case when ai.CREATED_BY =#{userId} then 1
else 0
end
)as isMyPublish,
ai.ACT_QUOTA_CATEGORY AS actQuotaCategory,
ai.ACT_QUOTA AS actQuota,
(
SELECT
count( aur.id )
FROM
act_user_relation aur
WHERE
aur.ACT_ID = ai.ID
AND aur.DEL_FLAG = '0'
AND ( aur.`STATUS` = 'auditing' OR aur.`STATUS` = 'passed' )
) AS signedUp,
ai.SUMMARY_FLAG as summaryFlag,
ai.REWARD as reward,
ai.AUDIT_SWITCH as auditSwitch
FROM
act_info ai
WHERE
ai.DEL_FLAG = '0'
<if test='null != status and "" != status'>
AND ai.ACT_STATUS = #{status}
</if>
<if test='null != title and "" != title'>
AND ai.TITLE like concat('%',#{title},'%')
</if>
<if test='null != actStartTime and "" != actStartTime'>
AND DATE_FORMAT(ai.ACT_START_TIME,'%Y-%m-%d %H:%i') &gt;= #{actStartTime}
</if>
<if test='null != actEndTime and "" != actEndTime'>
AND DATE_FORMAT(ai.ACT_END_TIME,'%Y-%m-%d %H:%i') &lt;= #{actEndTime}
</if>
and ai.CUSTOMER_ID= #{customerId}
and ai.act_type = 'heart'
order by ai.CREATED_TIME desc
</select>
</mapper>

2
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectDao.xml

@ -43,7 +43,7 @@
AND ID = #{serviceProjectId}
</if>
<if test='null != agencyId and agencyId != "" '>
AND AGENCY_ID = #{agencyId}
AND AGENCY_ID_PATH like concat( '%',#{agencyId},'%')
</if>
<if test='null != serviceCategoryKey and serviceCategoryKey != "" '>
AND SERVICE_CATEGORY_KEY = #{serviceCategoryKey}

4
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordDao.xml

@ -36,6 +36,7 @@
record.SERVICE_STATUS,
record.SERVICE_PEOPLE_NUMBER
from ic_service_record record
inner join ic_service_scope scope on (scope.DEL_FLAG = '0' and record.ID = scope.SERVICE_RECORD_ID)
left join ic_service_feedback feedback on (record.ID = feedback.SERVICE_RECORD_ID)
<where>
record.DEL_FLAG = '0'
@ -61,6 +62,9 @@
<if test="satisfaction != null and satisfaction != ''">
and feedback.SATISFACTION = #{satisfaction}
</if>
<if test="searchOrgIdPath != null and searchOrgIdPath != ''">
and scope.OBJECT_ID_PATH like CONCAT(#{searchOrgIdPath}, '%')
</if>
</where>
order by record.CREATED_TIME desc
</select>

10
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java

@ -1,9 +1,11 @@
package com.epmet.service.impl;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.StatsFormDTO;
import com.epmet.feign.DataStatisticalOpenFeignClient;
import com.epmet.service.StatsProjectService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -24,7 +26,9 @@ public class StatsProjectServiceImpl implements StatsProjectService {
@Override
public Result agencyProjectStats(String params) {
StatsFormDTO formDTO = new StatsFormDTO();
formDTO.setDate(params);
if (StringUtils.isNotBlank(params)) {
formDTO = JSON.parseObject(params, StatsFormDTO.class);
}
return dataStatisticalOpenFeignClient.agencyProjectStats(formDTO);
}
@ -35,7 +39,9 @@ public class StatsProjectServiceImpl implements StatsProjectService {
@Override
public Result gridProjectStats(String params) {
StatsFormDTO formDTO = new StatsFormDTO();
formDTO.setDate(params);
if (StringUtils.isNotBlank(params)) {
formDTO = JSON.parseObject(params, StatsFormDTO.class);
}
return dataStatisticalOpenFeignClient.gridProjectStats(formDTO);
}
}

34
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java

@ -158,7 +158,7 @@ public class OssController {
*/
@PostMapping("compressuploadimg")
public Result<UploadImgResultDTO> compressUploadImg(@RequestParam("file") MultipartFile file) {
return ossService.compressUploadImg(file, null);
return ossService.compressUploadImg(file, null,200L);
}
@PostMapping("uploadwximg")
@ -254,15 +254,19 @@ public class OssController {
throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getCode()
, EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getMsg());
}
}
Result<UploadImgResultDTO> result =null;
String originFileName = file.getOriginalFilename();
String format = "-" + originFileName.substring(originFileName.lastIndexOf(".") + NumConstant.ONE) + "-";
format = format.toLowerCase();
int compressSize = 2 * 1024 * 1024;
// 如果是图片,超过2M的压缩一下
if (ModuleConstant.PROJECT_FILE_IMAGE.contains(format) && file.getSize() > compressSize) {
// 单个图片10M
result= ossService.compressUploadImg(file, null, 2 * 1024);
} else {
// 校验文件大小,不超过2m
long maxSize = 2 * 1024 * 1024;
if (size > maxSize) {
throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getCode()
, EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getMsg());
}
result=ossService.uploadImg(file, null);
}
Result<UploadImgResultDTO> result = ossService.uploadImg(file, null);
if (result != null && result.success() ){
UploadImgResultDTO data = result.getData();
if ( data!= null && StringUtils.isNotBlank(data.getUrl())){
@ -350,7 +354,13 @@ public class OssController {
if (size > maxSize) {
throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getCode(), EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getMsg());
}
// 如果是图片,超过2M的压缩一下
if (ModuleConstant.PROJECT_FILE_IMAGE.contains(format)) {//单个图片10M
int compressSize = 2 * 1024 * 1024;
if(file.getSize()>compressSize){
return ossService.compressUploadImg(file, null,2 * 1024);
}
}
return ossService.uploadVariedFile(file);
}
@ -410,7 +420,11 @@ public class OssController {
throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getCode()
, EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getMsg());
}
//如果图片大于2M压缩一下
int compressSize = 2 * 1024 * 1024;
if(file.getSize()>compressSize){
return ossService.compressUploadImg(file, null,2 * 1024);
}
return ossService.uploadImgV2(file, PrivacyType.EXTERNAL, customerId);
}

2
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/OssService.java

@ -31,7 +31,7 @@ public interface OssService extends BaseService<OssEntity> {
Result<UploadImgResultDTO> uploadImg(MultipartFile file, String privacy);
Result<UploadImgResultDTO> compressUploadImg(MultipartFile file, String privacy);
Result<UploadImgResultDTO> compressUploadImg(MultipartFile file, String privacy,long desFileSize);
Result<UploadImgResultDTO> extUpload(MultipartFile file, String fileName, String privacy);

4
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java

@ -101,7 +101,7 @@ public class OssServiceImpl extends BaseServiceImpl<OssDao, OssEntity> implement
}
@Override
public Result<UploadImgResultDTO> compressUploadImg(MultipartFile file, String privacy) {
public Result<UploadImgResultDTO> compressUploadImg(MultipartFile file, String privacy,long desFileSize) {
if (file.isEmpty()) {
return new Result<UploadImgResultDTO>().error(ModuleErrorCode.UPLOAD_FILE_EMPTY);
}
@ -110,7 +110,7 @@ public class OssServiceImpl extends BaseServiceImpl<OssDao, OssEntity> implement
String url = null;
String ossDomain = null;
try {
byte[] fileBytes = compressPicCycle(file.getBytes(),200L,0.3);
byte[] fileBytes = compressPicCycle(file.getBytes(),desFileSize,0.3);
AbstractCloudStorageService storageService = OssFactory.build();
url = storageService.uploadSuffix(fileBytes, extension, privacy);
ossDomain = storageService.getOssDomain(privacy);

17
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcBuildingDTO.java

@ -141,4 +141,19 @@ public class IcBuildingDTO implements Serializable {
*/
private Date updatedTime;
}
/**
* 楼栋编码
*/
private String coding;
/**
* 楼栋系统编码
*/
private String sysCoding;
/**
* 实有人口数
*/
private Integer realPerson;
}

6
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcHouseDTO.java

@ -157,4 +157,8 @@ public class IcHouseDTO implements Serializable {
*/
private String remark;
}
/**
* 房屋可编辑编码
*/
private String coding;
}

15
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcNeighborHoodDTO.java

@ -129,4 +129,19 @@ public class IcNeighborHoodDTO implements Serializable {
*/
private Date updatedTime;
/**
* 小区编码
*/
private String coding;
/**
* 小区系统编码
*/
private String sysCoding;
/**
* 实有楼栋数
*/
private Integer realBuilding;
}

44
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcOrganizationCodeInfoDTO.java

@ -0,0 +1,44 @@
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
/**
* 小区/楼栋/房屋编码辅助表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-06-27
*/
@Data
public class IcOrganizationCodeInfoDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 社区id
*/
private String communityId;
/**
* 该社区下最大的小区编码序列号
*/
private String neighborMaxNum;
/**
* 该社区下最大的楼栋编码序列号
*/
private String buildingMaxNum;
/**
* 该社区下最大的房屋编码序列号
*/
private String houseMaxNum;
}

25
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseInformationFormDTO.java

@ -0,0 +1,25 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/6/28 15:06
*/
@Data
public class HouseInformationFormDTO extends PageFormDTO implements Serializable {
private static final long serialVersionUID = 2348447479132364176L;
private String customerId;
private String staffId;
private String communityId;
private String gridId;
private String neighborHoodId;
private String buildingId;
private String unitId;
private String name;
private String sort = "1";
}

15
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBulidingAddFormDTO.java

@ -110,7 +110,7 @@ public class IcBulidingAddFormDTO implements Serializable {
* 坐标位置
*/
private String location;
private String coordinatePosition;
/**
@ -135,7 +135,20 @@ public class IcBulidingAddFormDTO implements Serializable {
*/
private String buildingLeaderMobile;
/**
* 楼栋编码
*/
private String coding;
/**
* 楼栋系统编码
*/
private String sysCoding;
/**
* 实有人口数
*/
private Integer realPerson;
}

5
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseAddFormDTO.java

@ -108,4 +108,9 @@ public class IcHouseAddFormDTO implements Serializable {
private BigDecimal sort = NumConstant.ZERO_DECIMAL;
/**
* 房屋可编辑编码
*/
private String coding;
}

13
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcNeighborHoodAddFormDTO.java

@ -99,7 +99,20 @@ public class IcNeighborHoodAddFormDTO extends PageFormDTO {
private String latitude;
/**
* 小区编码
*/
private String coding;
/**
* 小区系统编码
*/
private String sysCoding;
/**
* 实有楼栋数
*/
private Integer realBuilding;
}

23
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingCountResultDTO.java

@ -0,0 +1,23 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/6/28 16:49
*/
@NoArgsConstructor
@Data
public class BuildingCountResultDTO {
private String buildingId;
private String buildingName;
private String buildingType;
private Integer unitCount = 0;
private Integer houseCount = 0;
private Integer personCount = 0;
private Integer unitRealCount = 0;
private Integer houseRealCount = 0;
private Integer personRealCount = 0;
}

26
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingListResultDTO.java

@ -0,0 +1,26 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/6/28 16:45
*/
@NoArgsConstructor
@Data
public class BuildingListResultDTO implements Serializable {
private static final long serialVersionUID = -1423424057500044373L;
private String id;
private String name;
private Integer unitCoun = 0;
private Integer houseCount = 0;
private Integer personCount = 0;
private Integer differHouseCount = 0;
private Integer differPersonCount = 0;
private Integer houseRealCount = 0;
private Integer personRealCount = 0;
}

25
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityCountResultDTO.java

@ -0,0 +1,25 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/6/28 15:24
*/
@NoArgsConstructor
@Data
public class CommunityCountResultDTO implements Serializable {
private static final long serialVersionUID = -1677303397440121269L;
private String id;
private String name;
private Integer buildingCount = 0;
private Integer houseCount = 0;
private Integer personCount = 0;
private Integer buildingRealCount = 0;
private Integer houseRealCount = 0;
private Integer personRealCount = 0;
}

28
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridCountListResultDTO.java

@ -0,0 +1,28 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/6/28 15:35
*/
@NoArgsConstructor
@Data
public class GridCountListResultDTO implements Serializable {
private static final long serialVersionUID = -7938740461257344347L;
private String id;
private String name;
private Integer buildingCount = 0;
private Integer houseCount = 0;
private Integer personCount = 0;
private Integer differBuildingCount = 0;
private Integer differHouseCount = 0;
private Integer differPersonCount = 0;
private Integer buildingRealCount = 0;
private Integer houseRealCount = 0;
private Integer personRealCount = 0;
}

26
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridStatisticsResultDTO.java

@ -0,0 +1,26 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/6/28 15:37
*/
@NoArgsConstructor
@Data
public class GridStatisticsResultDTO implements Serializable {
private static final long serialVersionUID = -2022337690871957027L;
private String gridId;
private String gridName;
private Integer buildingCount = 0;
private Integer houseCount = 0;
private Integer personCount = 0;
private Integer buildingRealCount = 0;
private Integer houseRealCount = 0;
private Integer personRealCount = 0;
}

22
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HomeListResultDTO.java

@ -0,0 +1,22 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/6/28 17:00
*/
@NoArgsConstructor
@Data
public class HomeListResultDTO implements Serializable {
private static final long serialVersionUID = -1098032063828430218L;
private String id;
private String name;
private Integer personCount = 0;
private String houseType;
private String houseCode;
}

5
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoResultDTO.java

@ -103,4 +103,9 @@ public class HouseInfoResultDTO implements Serializable {
* 备注
*/
private String remark;
/**
* 房屋可编辑编码
*/
private String coding;
}

120
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcBulidingDetailDTO.java

@ -0,0 +1,120 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
@Data
public class IcBulidingDetailDTO implements Serializable {
private static final long serialVersionUID = 1L;
private String buildingId;
/**
* 组织id
*/
private String agencyId;
/**
* 网格id
*/
private String gridId;
/**
* 小区id
*/
private String neighborHoodId;
/**
* 楼栋名称
*/
private String buildingName;
/**
* 楼栋类型
*/
private String type;
/**
* 排序
*/
private BigDecimal sort;
/**
* 总单元数
*/
private Integer totalUnitNum;
/**
* 总楼层总数
*/
private Integer totalFloorNum;
/**
* 总户数
*/
private Integer totalHouseNum;
/**
* 坐标位置
*/
private String coordinatePosition;
/**
* 中心点位经度
*/
private String longitude;
/**
* 中心点位纬度
*/
private String latitude;
/**
* 楼长姓名
*/
private String buildingLeaderName;
/**
* 楼长电话
*/
private String buildingLeaderMobile;
/**
* 楼栋编码
*/
private String coding;
/**
* 实有人口数
*/
private Integer realPerson;
}

25
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodCountResultDTO.java

@ -0,0 +1,25 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/6/28 16:41
*/
@NoArgsConstructor
@Data
public class NeighborHoodCountResultDTO implements Serializable {
private static final long serialVersionUID = 4148009467129407023L;
private String neighborHoodId;
private String neighborHoodName;
private Integer buildingCount = 0;
private Integer houseCount = 0;
private Integer personCount = 0;
private Integer buildingRealCount = 0;
private Integer houseRealCount = 0;
private Integer personRealCount = 0;
}

28
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodListResultDTO.java

@ -0,0 +1,28 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/6/28 16:21
*/
@NoArgsConstructor
@Data
public class NeighborHoodListResultDTO implements Serializable {
private static final long serialVersionUID = -5333918463141094854L;
private String id;
private String name;
private Integer buildingCount = 0;
private Integer houseCount = 0;
private Integer personCount = 0;
private Integer differBuildingCount = 0;
private Integer differHouseCount = 0;
private Integer differPersonCount = 0;
private Integer buildingRealCount = 0;
private Integer houseRealCount = 0;
private Integer personRealCount = 0;
}

26
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/OrganizationCodeResultDTO.java

@ -0,0 +1,26 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @program: epmet-cloud
* @description:小区-楼栋-房屋编码
* @author: wangtong
* @create: 2022-06-29 09:51
**/
@Data
public class OrganizationCodeResultDTO implements Serializable {
/**
* 可编辑的楼栋编码
*/
private String coding;
/**
* 不可编辑的楼栋编码
*/
private String sysCoding;
}

24
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/OrganizationCommunityDTO.java

@ -0,0 +1,24 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @program: epmet-cloud
* @description:
* @author: wangtong
* @create: 2022-06-29 10:13
**/
@Data
public class OrganizationCommunityDTO implements Serializable {
private String communityId;
private String areaCode;
private String coding;
private String sysCoding;
}

18
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitCountResultDTO.java

@ -0,0 +1,18 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/6/28 16:56
*/
@NoArgsConstructor
@Data
public class UnitCountResultDTO {
private String unitId;
private String unitName;
private Integer houseCount = 0;
private Integer personCount = 0;
}

22
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitListResultDTO.java

@ -0,0 +1,22 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/6/28 16:53
*/
@NoArgsConstructor
@Data
public class UnitListResultDTO implements Serializable {
private static final long serialVersionUID = -8750897881106004416L;
private String id;
private String name;
private Integer houseCount = 0;
private Integer personCount = 0;
private Integer differHouseCount = 0;
}

32
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/enums/OrganizationTypeEnums.java

@ -0,0 +1,32 @@
package com.epmet.enums;
public enum OrganizationTypeEnums {
COMM("community","社区"),
NEI("neighbor","小区"),
BUI("building","楼栋"),
UNIT("unit","单元");
private String code;
private String name;
OrganizationTypeEnums(String code, String name) {
this.code = code;
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

291
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java

@ -0,0 +1,291 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.HouseInformationFormDTO;
import com.epmet.dto.result.*;
import com.epmet.entity.IcNeighborHoodEntity;
import com.epmet.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* 双实信息相关
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-10-25
*/
@RestController
@RequestMapping("houseInformation")
public class HouseInformationController {
@Autowired
private IcNeighborHoodService icNeighborHoodService;
@Autowired
private IcBuildingService icBuildingService;
@Autowired
private IcBuildingUnitService icBuildingUnitService;
@Resource
private HouseInformationService houseInformationService;
@Autowired
private IcOrganizationCodeInfoService icOrganizationCodeInfoService;
/**
* @describe: 双实录入小区详情
* @author wangtong
* @date 2022/6/28 10:48
* @params [neighborhoodId]
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.IcNeighborHoodDTO>
*/
@PostMapping("neighborhoodDetail/{neighborhoodId}")
public Result<IcNeighborHoodEntity> neighborhoodDetail(@PathVariable("neighborhoodId") String neighborhoodId){
return icNeighborHoodService.neighborhoodDetail(neighborhoodId);
}
/**
* @describe: 双实录入楼栋详情
* @author wangtong
* @date 2022/6/28 14:30
* @params [buildingId]
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.IcBuildingDTO>
*/
@PostMapping("getBuildingDetail/{buildingId}")
public Result<IcBulidingDetailDTO> getBuildingDetail(@PathVariable("buildingId") String buildingId){
return icBuildingService.getBuildingDetail(buildingId);
}
/**
* @describe: 双实录入单元详情
* @author wangtong
* @date 2022/6/28 15:00
* @params [unitId]
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.IcBuildingUnitDTO>
*/
@PostMapping("getUnitDetail/{unitId}")
public Result<HouseInfoResultDTO> getUnitDetail(@PathVariable("unitId") String unitId){
return icBuildingUnitService.getUnitDetail(unitId);
}
/**
* 双实录入社区录入数据统计
*
* @Param tokenDTO
* @Param formDTO
* @Return {@link Result<CommunityCountResultDTO>}
* @Author zhaoqifeng
* @Date 2022/6/28 15:32
*/
@PostMapping("getCommunityCount")
public Result<CommunityCountResultDTO> getCommunityCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) {
formDTO.setCustomerId(tokenDTO.getCustomerId());
formDTO.setStaffId(tokenDTO.getUserId());
return new Result<CommunityCountResultDTO>().ok(houseInformationService.getCommunityCount(formDTO));
}
/**
* 双实录入社区-网格列表
*
* @Param tokenDTO
* @Param formDTO
* @Return {@link Result<PageData<GridCountListResultDTO>>}
* @Author zhaoqifeng
* @Date 2022/6/28 15:42
*/
@PostMapping("getGridList")
public Result<PageData<GridCountListResultDTO>> getGridList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) {
formDTO.setCustomerId(tokenDTO.getCustomerId());
formDTO.setStaffId(tokenDTO.getUserId());
return new Result<PageData<GridCountListResultDTO>>().ok(houseInformationService.getGridList(formDTO));
}
/**
* 双实录入网格录入数据统计
*
* @Param tokenDTO
* @Param formDTO
* @Return {@link Result<GridStatisticsResultDTO>}
* @Author zhaoqifeng
* @Date 2022/6/28 15:42
*/
@PostMapping("getGridCount")
public Result<GridStatisticsResultDTO> getGridCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) {
formDTO.setCustomerId(tokenDTO.getCustomerId());
formDTO.setStaffId(tokenDTO.getUserId());
return new Result<GridStatisticsResultDTO>().ok(houseInformationService.getGridCount(formDTO));
}
/**
* 双实录入网格-小区列表
*
* @Param tokenDTO
* @Param formDTO
* @Return {@link Result<PageData<NeighborHoodListResultDTO>>}
* @Author zhaoqifeng
* @Date 2022/6/28 16:23
*/
@PostMapping("getNeighborHoodList")
public Result<PageData<NeighborHoodListResultDTO>> getNeighborHoodList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) {
formDTO.setCustomerId(tokenDTO.getCustomerId());
formDTO.setStaffId(tokenDTO.getUserId());
return new Result<PageData<NeighborHoodListResultDTO>>().ok(houseInformationService.getNeighborHoodList(formDTO));
}
/**
* 双实录入小区录入数据统计
*
* @Param tokenDTO
* @Param formDTO
* @Return {@link Result<NeighborHoodCountResultDTO>}
* @Author zhaoqifeng
* @Date 2022/6/28 16:44
*/
@PostMapping("getNeighborHoodCount")
public Result<NeighborHoodCountResultDTO> getNeighborHoodCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) {
formDTO.setCustomerId(tokenDTO.getCustomerId());
formDTO.setStaffId(tokenDTO.getUserId());
return new Result<NeighborHoodCountResultDTO>().ok(houseInformationService.getNeighborHoodCount(formDTO));
}
/**
* 双实录入小区-楼栋列表
*
* @Param tokenDTO
* @Param formDTO
* @Return {@link Result<PageData<BuildingListResultDTO>>}
* @Author zhaoqifeng
* @Date 2022/6/28 16:47
*/
@PostMapping("getBuildingList")
public Result<PageData<BuildingListResultDTO>> getBuildingList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) {
formDTO.setCustomerId(tokenDTO.getCustomerId());
formDTO.setStaffId(tokenDTO.getUserId());
return new Result<PageData<BuildingListResultDTO>>().ok(houseInformationService.getBuildingList(formDTO));
}
/**
* 双实录入楼栋录入数据统计
*
* @Param tokenDTO
* @Param formDTO
* @Return {@link Result<BuildingCountResultDTO>}
* @Author zhaoqifeng
* @Date 2022/6/28 16:51
*/
@PostMapping("getBuildingCount")
public Result<BuildingCountResultDTO> getBuildingCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) {
formDTO.setCustomerId(tokenDTO.getCustomerId());
formDTO.setStaffId(tokenDTO.getUserId());
return new Result<BuildingCountResultDTO>().ok(houseInformationService.getBuildingCount(formDTO));
}
/**
* 双实录入楼栋-单元列表
*
* @Param tokenDTO
* @Param formDTO
* @Return {@link Result<PageData<UnitListResultDTO>>}
* @Author zhaoqifeng
* @Date 2022/6/28 16:55
*/
@PostMapping("getUnitList")
public Result<PageData<UnitListResultDTO>> getUnitList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) {
formDTO.setCustomerId(tokenDTO.getCustomerId());
formDTO.setStaffId(tokenDTO.getUserId());
return new Result<PageData<UnitListResultDTO>>().ok(houseInformationService.getUnitList(formDTO));
}
/**
* 双实录入单元录入数据统计
*
* @Param tokenDTO
* @Param formDTO
* @Return {@link Result<UnitCountResultDTO>}
* @Author zhaoqifeng
* @Date 2022/6/28 16:57
*/
@PostMapping("getUnitCount")
public Result<UnitCountResultDTO> getUnitCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) {
formDTO.setCustomerId(tokenDTO.getCustomerId());
formDTO.setStaffId(tokenDTO.getUserId());
return new Result<UnitCountResultDTO>().ok(houseInformationService.getUnitCount(formDTO));
}
/**
* 双实录入单元-房屋列表
*
* @Param tokenDTO
* @Param formDTO
* @Return {@link Result<PageData<HomeListResultDTO>>}
* @Author zhaoqifeng
* @Date 2022/6/28 17:02
*/
@PostMapping("getHouseList")
public Result<PageData<HomeListResultDTO>> getHouseList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) {
formDTO.setCustomerId(tokenDTO.getCustomerId());
formDTO.setStaffId(tokenDTO.getUserId());
return new Result<PageData<HomeListResultDTO>>().ok(houseInformationService.getHouseList(formDTO));
}
/**
* @describe: 双实录入获取小区编码
* @author wangtong
* @date 2022/6/29 9:59
* @params [tokenDTO, gridId]
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.OrganizationCodeResultDTO>
*/
@PostMapping("getNeighborHoodCoding/{gridId}")
public Result<OrganizationCodeResultDTO> getNeighborHoodCoding(@LoginUser TokenDto tokenDTO, @PathVariable("gridId") String gridId) {
return icOrganizationCodeInfoService.getNeighborHoodCoding(tokenDTO.getCustomerId(),gridId,false);
}
/**
* @describe: 双实录入获取楼栋编码
* @author wangtong
* @date 2022/6/29 9:59
* @params [tokenDTO, neighborhoodId]
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.OrganizationCodeResultDTO>
*/
@PostMapping("getBuildingCoding/{neighborhoodId}")
public Result<OrganizationCodeResultDTO> getBuildingCoding(@LoginUser TokenDto tokenDTO, @PathVariable("neighborhoodId") String neighborhoodId) {
return icOrganizationCodeInfoService.getBuildingCoding(tokenDTO.getCustomerId(),neighborhoodId,false);
}
/**
* @describe: 双实录入获取房屋编码
* @author wangtong
* @date 2022/6/29 9:59
* @params [tokenDTO, unitId]
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.OrganizationCodeResultDTO>
*/
@PostMapping("getHouseCoding/{unitId}")
public Result<OrganizationCodeResultDTO> getHouseCoding(@LoginUser TokenDto tokenDTO, @PathVariable("unitId") String unitId) {
return icOrganizationCodeInfoService.getHouseCoding(tokenDTO.getCustomerId(),unitId,false);
}
}

82
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcOrganizationCodeInfoController.java

@ -0,0 +1,82 @@
package com.epmet.controller;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.IcOrganizationCodeInfoDTO;
import com.epmet.excel.IcOrganizationCodeInfoExcel;
import com.epmet.service.IcOrganizationCodeInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 小区/楼栋/房屋编码辅助表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-06-27
*/
@RestController
@RequestMapping("icOrganizationCodeInfo")
public class IcOrganizationCodeInfoController {
@Autowired
private IcOrganizationCodeInfoService icOrganizationCodeInfoService;
@RequestMapping("page")
public Result<PageData<IcOrganizationCodeInfoDTO>> page(@RequestParam Map<String, Object> params){
PageData<IcOrganizationCodeInfoDTO> page = icOrganizationCodeInfoService.page(params);
return new Result<PageData<IcOrganizationCodeInfoDTO>>().ok(page);
}
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
public Result<IcOrganizationCodeInfoDTO> get(@PathVariable("id") String id){
IcOrganizationCodeInfoDTO data = icOrganizationCodeInfoService.get(id);
return new Result<IcOrganizationCodeInfoDTO>().ok(data);
}
@NoRepeatSubmit
@PostMapping("save")
public Result save(@RequestBody IcOrganizationCodeInfoDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
icOrganizationCodeInfoService.save(dto);
return new Result();
}
@NoRepeatSubmit
@PostMapping("update")
public Result update(@RequestBody IcOrganizationCodeInfoDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
icOrganizationCodeInfoService.update(dto);
return new Result();
}
@PostMapping("delete")
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
icOrganizationCodeInfoService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<IcOrganizationCodeInfoDTO> list = icOrganizationCodeInfoService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, IcOrganizationCodeInfoExcel.class);
}
}

9
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java

@ -384,4 +384,13 @@ public interface CustomerGridDao extends BaseDao<CustomerGridEntity> {
int updateTotalUser(@Param("gridId") String gridId, @Param("incrCount") long incrCount);
List<String> getDelGridIdList(@Param("agencyId") String agencyId);
/**
* @describe: 通过网格id获取社区行政编码
* @author wangtong
* @date 2022/6/29 10:16
* @params [gridId]
* @return com.epmet.dto.result.OrganizationCommunityDTO
*/
OrganizationCommunityDTO selectCommunityByGridId(@Param("gridId") String gridId);
}

28
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java

@ -196,4 +196,32 @@ public interface IcBuildingDao extends BaseDao<IcBuildingEntity> {
*/
Integer selectUnitCount(@Param("buildingId")String buildingId);
/**
* @describe: 获取楼栋详情
* @author wangtong
* @date 2022/6/28 16:16
* @params [buildingId]
* @return com.epmet.dto.result.IcBulidingDetailDTO
*/
IcBulidingDetailDTO getBuildingDetail(@Param("buildingId") String buildingId);
/**
* @describe: 查询社区id及楼栋编码
* @author wangtong
* @date 2022/6/29 14:39
* @params [buildingId]
* @return com.epmet.dto.result.OrganizationCommunityDTO
*/
OrganizationCommunityDTO selectCommunityByBuildingId(@Param("buildingId") String buildingId);
/**
* @describe: 通过可编辑编码查询
* @author wangtong
* @date 2022/6/29 14:57
* @params [coding]
* @return com.epmet.entity.IcBuildingEntity
*/
IcBuildingEntity selectByCoding(@Param("coding") String coding,
@Param("id") String id);
}

30
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingUnitDao.java

@ -18,6 +18,8 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.result.HouseInfoResultDTO;
import com.epmet.dto.result.OrganizationCommunityDTO;
import com.epmet.entity.IcBuildingUnitEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -50,4 +52,30 @@ public interface IcBuildingUnitDao extends BaseDao<IcBuildingUnitEntity> {
*/
void delUnit(@Param("ids")List<String> ids);
}
/**
* @describe: 获取单元详情
* @author wangtong
* @date 2022/6/28 17:03
* @params [unitId]
* @return com.epmet.dto.result.HouseInfoResultDTO
*/
HouseInfoResultDTO getUnitDetail(@Param("unitId") String unitId);
/**
* @describe: 通过可编辑编码查询
* @author wangtong
* @date 2022/6/29 14:59
* @params [coding]
* @return com.epmet.entity.IcBuildingUnitEntity
*/
IcBuildingUnitEntity selectByCoding(@Param("coding") String coding);
/**
* @describe: 查询社区id及单元编码
* @author wangtong
* @date 2022/6/29 15:15
* @params [buildingId]
* @return com.epmet.dto.result.OrganizationCommunityDTO
*/
OrganizationCommunityDTO selectCommunityByUnitId(@Param("unitId") String unitId);
}

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

@ -176,9 +176,18 @@ public interface IcHouseDao extends BaseDao<IcHouseEntity> {
/**
* desc:更新房屋的屋内居民数 及更新时间 不更新 更新人以及 resiNumber没有变化的 记录
*
* @param houseId,
* @param houseId,
* @param resiNumber
* @return
*/
int updateIcHouseResiNumber(String houseId, Integer resiNumber);
/**
* @return com.epmet.entity.IcHouseEntity
* @describe: 通过可编辑的编码查询
* @author wangtong
* @date 2022/6/29 15:24
* @params [coding]
*/
IcHouseEntity selectByCoding(@Param("coding") String coding);
}

122
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java

@ -21,8 +21,9 @@ import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IcNeighborHoodDTO;
import com.epmet.dto.ImportGeneralDTO;
import com.epmet.dto.NeighborHoodAndManagementDTO;
import com.epmet.dto.form.HouseInformationFormDTO;
import com.epmet.dto.form.IcNeighborHoodListFormDTO;
import com.epmet.dto.result.IcNeighborHoodResultDTO;
import com.epmet.dto.result.*;
import com.epmet.entity.IcHouseEntity;
import com.epmet.entity.IcNeighborHoodEntity;
import com.epmet.excel.IcNeighborHoodExcel;
@ -91,4 +92,123 @@ public interface IcNeighborHoodDao extends BaseDao<IcNeighborHoodEntity> {
void updateOneNeighborHood(ImportGeneralDTO info);
String getAreaCode(@Param("neighborHoodId")String neighborHoodId);
/**
* @describe: 查询社区id及小区编码
* @author wangtong
* @date 2022/6/29 13:35
* @params [neighborhoodId]
* @return com.epmet.dto.result.OrganizationCommunityDTO
*/
OrganizationCommunityDTO selectCommunityByNeiId(@Param("neighborhoodId") String neighborhoodId);
/**
* @describe: 通过可编辑的编码查询
* @author wangtong
* @date 2022/6/29 14:08
* @params [coding]
* @return com.epmet.entity.IcNeighborHoodEntity
*/
IcNeighborHoodEntity selectByCoding(@Param("coding") String coding,
@Param("id") String id);
/**
* 社区录入数据统计
*
* @Param communityId
* @Return {@link CommunityCountResultDTO}
* @Author zhaoqifeng
* @Date 2022/6/28 17:16
*/
CommunityCountResultDTO getCommunityCount(HouseInformationFormDTO formDTO);
/**
* 双实录入社区-网格列表
*
* @Param formDTO
* @Return {@link List< GridCountListResultDTO>}
* @Author zhaoqifeng
* @Date 2022/6/29 11:06
*/
List<GridCountListResultDTO> getGridList(HouseInformationFormDTO formDTO);
/**
* 双实录入网格录入数据统计
*
* @Param formDTO
* @Return {@link GridStatisticsResultDTO}
* @Author zhaoqifeng
* @Date 2022/6/29 13:52
*/
GridStatisticsResultDTO getGridCount(HouseInformationFormDTO formDTO);
/**
* 双实录入网格-小区列表
*
* @Param formDTO
* @Return {@link List<NeighborHoodListResultDTO>}
* @Author zhaoqifeng
* @Date 2022/6/29 14:11
*/
List<NeighborHoodListResultDTO> getNeighborHoodList(HouseInformationFormDTO formDTO);
/**
* 双实录入小区录入数据统计
*
* @Param formDTO
* @Return {@link NeighborHoodCountResultDTO}
* @Author zhaoqifeng
* @Date 2022/6/29 14:27
*/
NeighborHoodCountResultDTO getNeighborHoodCount(HouseInformationFormDTO formDTO);
/**
* 双实录入小区-楼栋列表
*
* @Param formDTO
* @Return {@link List< BuildingListResultDTO>}
* @Author zhaoqifeng
* @Date 2022/6/29 14:50
*/
List<BuildingListResultDTO> getBuildingList(HouseInformationFormDTO formDTO);
/**
* 双实录入楼栋录入数据统计
*
* @Param formDTO
* @Return {@link BuildingCountResultDTO}
* @Author zhaoqifeng
* @Date 2022/6/29 15:44
*/
BuildingCountResultDTO getBuildingCount(HouseInformationFormDTO formDTO);
/**
* 双实录入楼栋-单元列表
*
* @Param formDTO
* @Return {@link List<UnitListResultDTO>}
* @Author zhaoqifeng
* @Date 2022/6/29 16:07
*/
List<UnitListResultDTO> getUnitList(HouseInformationFormDTO formDTO);
/**
* 双实录入单元录入数据统计
*
* @Param formDTO
* @Return {@link UnitCountResultDTO}
* @Author zhaoqifeng
* @Date 2022/6/29 16:06
*/
UnitCountResultDTO getUnitCount(HouseInformationFormDTO formDTO);
/**
* 双实录入单元-房屋列表
*
* @Param formDTO
* @Return {@link List<HomeListResultDTO>}
* @Author zhaoqifeng
* @Date 2022/6/29 16:48
*/
List<HomeListResultDTO> getHouseList(HouseInformationFormDTO formDTO);
}

63
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcOrganizationCodeInfoDao.java

@ -0,0 +1,63 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.IcOrganizationCodeInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 小区/楼栋/房屋编码辅助表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-06-27
*/
@Mapper
public interface IcOrganizationCodeInfoDao extends BaseDao<IcOrganizationCodeInfoEntity> {
/**
* @describe: 通过客户id和社区id查询
* @author wangtong
* @date 2022/6/29 10:24
* @params [customerId, communityId]
* @return com.epmet.entity.IcOrganizationCodeInfoEntity
*/
IcOrganizationCodeInfoEntity selectByIdAndType(@Param("customerId") String customerId,
@Param("sysId") String sysId,
@Param("sysType") String sysType);
/**
* @describe: 根据客户id和社区id更新小区编号
* @author wangtong
* @date 2022/6/29 10:53
* @params [communEntity]
* @return void
*/
void updateMaxNumByIdAndType(IcOrganizationCodeInfoEntity communEntity);
// /**
// * @describe: 根据客户id和社区id更新楼栋编号
// * @author wangtong
// * @date 2022/6/29 14:51
// * @params [buildingEntity]
// * @return void
// */
// void updateBuildingByCuIdAndCoId(IcOrganizationCodeInfoEntity buildingEntity);
//
// /**
// * @describe: 根据客户id和社区id更新单元编号
// * @author wangtong
// * @date 2022/6/29 15:01
// * @params [unitEntity]
// * @return void
// */
// void updateUnitByCuIdAndCoId(IcOrganizationCodeInfoEntity unitEntity);
//
// /**
// * @describe: 根据客户id和社区id更新房屋编号
// * @author wangtong
// * @date 2022/6/29 15:25
// * @params [houseEntity]
// * @return void
// */
// void updateHouseByCuIdAndCoId(IcOrganizationCodeInfoEntity houseEntity);
}

15
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcBuildingEntity.java

@ -107,4 +107,19 @@ public class IcBuildingEntity extends BaseEpmetEntity {
*/
private String coordinatePosition;
/**
* 楼栋编码
*/
private String coding;
/**
* 楼栋系统编码
*/
private String sysCoding;
/**
* 实有人口数
*/
private Integer realPerson;
}

10
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcBuildingUnitEntity.java

@ -55,4 +55,14 @@ public class IcBuildingUnitEntity extends BaseEpmetEntity {
*/
private String unitName;
/**
* 楼栋编码
*/
private String coding;
/**
* 楼栋系统编码
*/
private String sysCoding;
}

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java

@ -132,4 +132,8 @@ public class IcHouseEntity extends BaseEpmetEntity {
* 居住人数
*/
private Integer resiNumber;
/**
* 房屋可编辑编码
*/
private String coding;
}

15
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcNeighborHoodEntity.java

@ -101,4 +101,19 @@ public class IcNeighborHoodEntity extends BaseEpmetEntity {
@TableField(exist = false)
private String propertyName;
/**
* 小区编码
*/
private String coding;
/**
* 小区系统编码
*/
private String sysCoding;
/**
* 实有楼栋数
*/
private Integer realBuilding;
}

45
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcOrganizationCodeInfoEntity.java

@ -0,0 +1,45 @@
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 小区/楼栋/房屋编码辅助表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-06-27
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_organization_code_info")
public class IcOrganizationCodeInfoEntity{
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 社区/小区/楼栋/单元id
*/
private String sysId;
/**
* 类型
* 社区community
* 小区neighbor
* 楼栋building
* 单元unit
*/
private String sysType;
/**
* 最大数
*/
private String maxNum;
}

33
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcOrganizationCodeInfoExcel.java

@ -0,0 +1,33 @@
package com.epmet.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 小区/楼栋/房屋编码辅助表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-06-27
*/
@Data
public class IcOrganizationCodeInfoExcel {
@Excel(name = "客户id")
private String customerId;
@Excel(name = "社区id")
private String communityId;
@Excel(name = "该社区下最大的小区编码序列号")
private String neighborMaxNum;
@Excel(name = "该社区下最大的楼栋编码序列号")
private String buildingMaxNum;
@Excel(name = "该社区下最大的房屋编码序列号")
private String houseMaxNum;
}

30
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/IcOrganizationCodeInfoRedis.java

@ -0,0 +1,30 @@
package com.epmet.redis;
import com.epmet.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 小区/楼栋/房屋编码辅助表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-06-27
*/
@Component
public class IcOrganizationCodeInfoRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

112
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseInformationService.java

@ -0,0 +1,112 @@
package com.epmet.service;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.form.HouseInformationFormDTO;
import com.epmet.dto.result.*;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/6/28 15:14
*/
public interface HouseInformationService {
/**
* 双实录入社区录入数据统计
*
* @Param formDTO
* @Return {@link CommunityCountResultDTO}
* @Author zhaoqifeng
* @Date 2022/6/28 15:31
*/
CommunityCountResultDTO getCommunityCount(HouseInformationFormDTO formDTO);
/**
* 双实录入社区-网格列表
*
* @Param formDTO
* @Return {@link PageData<GridCountListResultDTO>}
* @Author zhaoqifeng
* @Date 2022/6/28 15:41
*/
PageData<GridCountListResultDTO> getGridList(HouseInformationFormDTO formDTO);
/**
* 双实录入网格录入数据统计
*
* @Param formDTO
* @Return {@link GridStatisticsResultDTO}
* @Author zhaoqifeng
* @Date 2022/6/28 15:41
*/
GridStatisticsResultDTO getGridCount(HouseInformationFormDTO formDTO);
/**
* 双实录入网格-小区列表
*
* @Param formDTO
* @Return {@link PageData<NeighborHoodListResultDTO>}
* @Author zhaoqifeng
* @Date 2022/6/28 16:24
*/
PageData<NeighborHoodListResultDTO> getNeighborHoodList(HouseInformationFormDTO formDTO);
/**
* 双实录入小区录入数据统计
*
* @Param formDTO
* @Return {@link NeighborHoodCountResultDTO}
* @Author zhaoqifeng
* @Date 2022/6/28 16:43
*/
NeighborHoodCountResultDTO getNeighborHoodCount(HouseInformationFormDTO formDTO);
/**
* 双实录入小区-楼栋列表
*
* @Param formDTO
* @Return {@link PageData<BuildingListResultDTO>}
* @Author zhaoqifeng
* @Date 2022/6/28 16:47
*/
PageData<BuildingListResultDTO> getBuildingList(HouseInformationFormDTO formDTO);
/**
* 双实录入楼栋录入数据统计
*
* @Param formDTO
* @Return {@link BuildingCountResultDTO}
* @Author zhaoqifeng
* @Date 2022/6/28 16:50
*/
BuildingCountResultDTO getBuildingCount(HouseInformationFormDTO formDTO);
/**
* 双实录入楼栋-单元列表
*
* @Param formDTO
* @Return {@link PageData<UnitListResultDTO>}
* @Author zhaoqifeng
* @Date 2022/6/28 16:54
*/
PageData<UnitListResultDTO> getUnitList(HouseInformationFormDTO formDTO);
/**
* 双实录入单元录入数据统计
*
* @Param formDTO
* @Return {@link UnitCountResultDTO}
* @Author zhaoqifeng
* @Date 2022/6/28 16:57
*/
UnitCountResultDTO getUnitCount(HouseInformationFormDTO formDTO);
/**
* 双实录入单元-房屋列表
*
* @Param formDTO
* @Return {@link PageData<HomeListResultDTO>}
* @Author zhaoqifeng
* @Date 2022/6/28 17:01
*/
PageData<HomeListResultDTO> getHouseList(HouseInformationFormDTO formDTO);
}

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

@ -20,8 +20,10 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.IcBuildingDTO;
import com.epmet.dto.ImportGeneralDTO;
import com.epmet.dto.result.IcBulidingDetailDTO;
import com.epmet.entity.IcBuildingEntity;
import java.util.List;
@ -122,4 +124,13 @@ public interface IcBuildingService extends BaseService<IcBuildingEntity> {
* @date 2022/4/27 13:29
*/
void updateBuilding(ImportGeneralDTO info);
}
/**
* @describe: 双实录入楼栋详情
* @author wangtong
* @date 2022/6/28 14:30
* @params [buildingId]
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.IcBuildingDTO>
*/
Result<IcBulidingDetailDTO> getBuildingDetail(String buildingId);
}

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

@ -20,7 +20,9 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.IcBuildingUnitDTO;
import com.epmet.dto.result.HouseInfoResultDTO;
import com.epmet.entity.IcBuildingUnitEntity;
import java.util.List;
@ -112,4 +114,13 @@ public interface IcBuildingUnitService extends BaseService<IcBuildingUnitEntity>
* @Date 2022/2/14 15:42
*/
IcBuildingUnitDTO getUnitInfo(String buildingId, String unitName);
}
/**
* @describe: 双实录入单元详情
* @author wangtong
* @date 2022/6/28 15:00
* @params [unitId]
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.IcBuildingUnitDTO>
*/
Result<HouseInfoResultDTO> getUnitDetail(String unitId);
}

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

@ -172,4 +172,13 @@ public interface IcNeighborHoodService extends BaseService<IcNeighborHoodEntity>
* @date 2022/4/27 10:33
*/
void neighborHoodPropertyUpdate(List<NeighborHoodAndManagementDTO> updateNeighborHoodAndManagement);
/**
* @describe: 双实录入小区详情
* @author wangtong
* @date 2022/6/28 15:04
* @params [neighborhoodId]
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.IcNeighborHoodDTO>
*/
Result<IcNeighborHoodEntity> neighborhoodDetail(String neighborhoodId);
}

116
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcOrganizationCodeInfoService.java

@ -0,0 +1,116 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.IcOrganizationCodeInfoDTO;
import com.epmet.dto.result.OrganizationCodeResultDTO;
import com.epmet.entity.IcOrganizationCodeInfoEntity;
import java.util.List;
import java.util.Map;
/**
* 小区/楼栋/房屋编码辅助表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-06-27
*/
public interface IcOrganizationCodeInfoService extends BaseService<IcOrganizationCodeInfoEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<IcOrganizationCodeInfoDTO>
* @author generator
* @date 2022-06-27
*/
PageData<IcOrganizationCodeInfoDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<IcOrganizationCodeInfoDTO>
* @author generator
* @date 2022-06-27
*/
List<IcOrganizationCodeInfoDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return IcOrganizationCodeInfoDTO
* @author generator
* @date 2022-06-27
*/
IcOrganizationCodeInfoDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2022-06-27
*/
void save(IcOrganizationCodeInfoDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2022-06-27
*/
void update(IcOrganizationCodeInfoDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2022-06-27
*/
void delete(String[] ids);
/**
* @describe: 双实录入获取小区编码
* @author wangtong
* @date 2022/6/29 9:59
* @params [tokenDTO, gridId]
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.OrganizationCodeResultDTO>
*/
Result<OrganizationCodeResultDTO> getNeighborHoodCoding(String customerId, String gridId,Boolean updateFlag);
/**
* @describe: 双实录入获取楼栋编码
* @author wangtong
* @date 2022/6/29 9:59
* @params [tokenDTO, neighborhoodId]
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.OrganizationCodeResultDTO>
*/
Result<OrganizationCodeResultDTO> getBuildingCoding(String customerId, String neighborhoodId,Boolean updateFlag);
/**
* @describe: 双实录入获取单元编码
* @author wangtong
* @date 2022/6/29 9:59
* @params [tokenDTO, neighborhoodId]
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.OrganizationCodeResultDTO>
*/
Result<OrganizationCodeResultDTO> getUnitCoding(String customerId, String buildingId,Boolean updateFlag);
/**
* @describe: 双实录入获取房屋编码
* @author wangtong
* @date 2022/6/29 9:59
* @params [tokenDTO, unitId]
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.OrganizationCodeResultDTO>
*/
Result<OrganizationCodeResultDTO> getHouseCoding(String customerId, String unitId,Boolean updateFlag);
}

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

@ -33,15 +33,13 @@ import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.entity.*;
import com.epmet.enums.BuildingTypeEnums;
import com.epmet.enums.OrganizationTypeEnums;
import com.epmet.excel.IcBuildingExcel;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.model.BuildingInfoModel;
import com.epmet.model.ImportBuildingInfoListener;
import com.epmet.redis.IcHouseRedis;
import com.epmet.service.BuildingService;
import com.epmet.service.IcBuildingService;
import com.epmet.service.IcBuildingUnitService;
import com.epmet.service.IcNeighborHoodService;
import com.epmet.service.*;
import com.epmet.util.ExcelPoiUtils;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
@ -91,6 +89,13 @@ public class BuildingServiceImpl implements BuildingService {
private EpmetCommonServiceOpenFeignClient epmetCommonServiceOpenFeignClient;
@Autowired
private ExecutorService executorService;
@Autowired
private IcOrganizationCodeInfoService icOrganizationCodeInfoService;
@Autowired
private IcOrganizationCodeInfoDao icOrganizationCodeInfoDao;
@Autowired
private IcOrganizationCodeInfoServiceImpl icOrganizationCodeInfoServiceImpl;
@Override
@Transactional(rollbackFor = Exception.class)
@ -100,6 +105,14 @@ public class BuildingServiceImpl implements BuildingService {
if (null != count && count > 0) {
throw new RenException(EpmetErrorCode.BUILDING_NAME_EXITED.getCode(), EpmetErrorCode.BUILDING_NAME_EXITED.getMsg());
}
//楼栋编码不可重复
if(org.apache.commons.lang3.StringUtils.isNotBlank(formDTO.getCoding())){
IcBuildingEntity isHaveCoding = icBuildingDao.selectByCoding(formDTO.getCoding(),null);
if(null != isHaveCoding){
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "该楼栋编码已存在,请勿重复!","该楼栋编码已存在,请勿重复!");
}
updateBuildingMaxNum(customerId,formDTO);
}
IcBuildingDTO icBuildingDTO = ConvertUtils.sourceToTarget(formDTO, IcBuildingDTO.class);
icBuildingDTO.setCustomerId(customerId);
IcBuildingEntity entity = ConvertUtils.sourceToTarget(icBuildingDTO, IcBuildingEntity.class);
@ -114,12 +127,42 @@ public class BuildingServiceImpl implements BuildingService {
icBuildingUnit.setBuildingId(entity.getId());
icBuildingUnit.setUnitName((i + 1) + "单元");
icBuildingUnit.setUnitNum(String.valueOf(i + 1));
Result<OrganizationCodeResultDTO> codeResult = icOrganizationCodeInfoService.getUnitCoding(customerId,entity.getId(),true);
if(!codeResult.success() || null == codeResult.getData()){
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "生成单元编码异常,请联系管理员","生成单元编码异常,请联系管理员");
}
icBuildingUnit.setCoding(codeResult.getData().getCoding());
icBuildingUnit.setSysCoding(codeResult.getData().getSysCoding());
unitList.add(icBuildingUnit);
}
icBuildingUnitService.insertBatch(unitList, NumConstant.ONE_HUNDRED);
}
/**
* @describe: 如果编码未改动提交则最大数+1
* @author wangtong
* @date 2022/7/5 10:43
* @params [formDTO]
* @return void
*/
private void updateBuildingMaxNum(String customerId,IcBulidingAddFormDTO formDTO){
//如果是自增的,则最大数+1
IcOrganizationCodeInfoEntity communEntity = icOrganizationCodeInfoDao.selectByIdAndType(customerId, formDTO.getNeighborHoodId(), OrganizationTypeEnums.NEI.getCode());
Integer buildMaxNum = org.apache.commons.lang3.StringUtils.isBlank(communEntity.getMaxNum())?1:Integer.valueOf(communEntity.getMaxNum()) + 1;
Integer submitMaxNum = null;
try {
submitMaxNum = Integer.valueOf(formDTO.getCoding().substring(formDTO.getCoding().length()-3));
}catch (Exception e){
e.printStackTrace();
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "编码转换失败", "编码转换失败");
}
if(buildMaxNum.intValue() == submitMaxNum.intValue()){
communEntity.setMaxNum(icOrganizationCodeInfoServiceImpl.getNewMaxIndex(3, buildMaxNum));
icOrganizationCodeInfoDao.updateMaxNumByIdAndType(communEntity);
}
}
@Override
public List<BuildingTreeLevelDTO> treeList(String customerId, String staffId) {
CustomerStaffInfoCacheResult agency = CustomerStaffRedis.getStaffInfo(customerId, staffId);
@ -440,6 +483,15 @@ public class BuildingServiceImpl implements BuildingService {
throw new RenException(EpmetErrorCode.ORG_EDIT_FAILED.getCode(), "楼栋单元下存在房屋,无法更新");
}
}
//楼栋编码不可重复
formDTO.setSysCoding(null);
if(org.apache.commons.lang3.StringUtils.isNotBlank(formDTO.getCoding())){
IcBuildingEntity isHaveCoding = icBuildingDao.selectByCoding(formDTO.getCoding(),formDTO.getBuildingId());
if(null != isHaveCoding){
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "该楼栋编码已存在,请勿重复!","该楼栋编码已存在,请勿重复!");
}
updateBuildingMaxNum(customerId,formDTO);
}
IcBuildingDTO icBuildingDTO = ConvertUtils.sourceToTarget(formDTO, IcBuildingDTO.class);
icBuildingDTO.setId(formDTO.getBuildingId());
icBuildingDTO.setCustomerId(customerId);
@ -481,6 +533,12 @@ public class BuildingServiceImpl implements BuildingService {
icBuildingUnit.setCustomerId(customerId);
icBuildingUnit.setUnitName(unitNum + "单元");
icBuildingUnit.setUnitNum(unitNum);
Result<OrganizationCodeResultDTO> codeResult = icOrganizationCodeInfoService.getUnitCoding(customerId,icBuilding.getId(),true);
if(!codeResult.success() || null == codeResult.getData()){
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "生成单元编码异常,请联系管理员","生成单元编码异常,请联系管理员");
}
icBuildingUnit.setCoding(codeResult.getData().getCoding());
icBuildingUnit.setSysCoding(codeResult.getData().getSysCoding());
unitList.add(icBuildingUnit);
}
}

5
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java

@ -710,6 +710,9 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao
boolean party = false;
//网格指导员角色
boolean gridParty = false;
//2022.7.5 pc端党建声音可选发布范围为当前组织及下级组织的网格,不在区分角色
party = true;
/*
for (CustomerStaffRoleListResultDTO role : RoleList) {
if (CustomerAgencyConstant.PARTY_PRINCIPALS.equals(role.getRoleKey())) {
party = true;
@ -720,7 +723,7 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao
}
if (!party && !gridParty) {
return returnDTO;
}
}*/
//4:根据不同角色查询不同数据
CustomerAgencyEntity agencyEntity = baseDao.selectById(staffAgencyDTO.getAgencyId());

405
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java

@ -0,0 +1,405 @@
package com.epmet.service.impl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.CustomerAgencyDao;
import com.epmet.dao.IcNeighborHoodDao;
import com.epmet.dto.form.HouseInformationFormDTO;
import com.epmet.dto.form.IcUserCountFormDTO;
import com.epmet.dto.result.*;
import com.epmet.entity.CustomerAgencyEntity;
import com.epmet.enums.BuildingTypeEnums;
import com.epmet.enums.HouseRentFlagEnums;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.service.HouseInformationService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/6/28 15:14
*/
@Slf4j
@Service
public class HouseInformationServiceImpl implements HouseInformationService {
@Resource
private IcNeighborHoodDao icNeighborHoodDao;
@Resource
private CustomerAgencyDao customerAgencyDao;
@Resource
private EpmetUserOpenFeignClient userOpenFeignClient;
/**
* 双实录入社区录入数据统计
*
* @param formDTO
* @Param formDTO
* @Return {@link CommunityCountResultDTO}
* @Author zhaoqifeng
* @Date 2022/6/28 15:31
*/
@Override
public CommunityCountResultDTO getCommunityCount(HouseInformationFormDTO formDTO) {
if (StringUtils.isEmpty(formDTO.getCommunityId())) {
//获取工作人员所属组织
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if(null == staffInfo) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取用户信息失败", "获取用户信息失败");
}
formDTO.setCommunityId(staffInfo.getAgencyId());
}
String orgName;
CustomerAgencyEntity agency = customerAgencyDao.selectById(formDTO.getCommunityId());
if (null == agency) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "社区不存在", "社区不存在");
}
CustomerAgencyEntity parentAgency = customerAgencyDao.selectById(agency.getPid());
if (null == parentAgency) {
orgName = agency.getOrganizationName();
} else {
orgName = parentAgency.getOrganizationName() + agency.getOrganizationName();
}
//获取工作人员信息
CommunityCountResultDTO result = icNeighborHoodDao.getCommunityCount(formDTO);
result.setId(agency.getId());
result.setName(orgName);
//获取录入人口数
IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO();
countFormDTO.setOrgType(NumConstant.ZERO_STR);
countFormDTO.setOrgId(formDTO.getCommunityId());
countFormDTO.setType(NumConstant.ZERO_STR);
Map<String, Integer> map = getMapResult(countFormDTO);
if (map.containsKey(formDTO.getCommunityId())) {
result.setPersonCount(map.get(formDTO.getCommunityId()));
}
return result;
}
/**
* 双实录入社区-网格列表
*
* @param formDTO
* @Param formDTO
* @Return {@link PageData<GridCountListResultDTO>}
* @Author zhaoqifeng
* @Date 2022/6/28 15:41
*/
@Override
public PageData<GridCountListResultDTO> getGridList(HouseInformationFormDTO formDTO) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
List<GridCountListResultDTO> list = icNeighborHoodDao.getGridList(formDTO);
PageInfo<GridCountListResultDTO> pageInfo = new PageInfo<>(list);
if (CollectionUtils.isNotEmpty(list)) {
//获取录入人口数
IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO();
countFormDTO.setOrgType(NumConstant.ZERO_STR);
countFormDTO.setOrgId(formDTO.getCommunityId());
countFormDTO.setType(NumConstant.ONE_STR);
Map<String, Integer> map = getMapResult(countFormDTO);
list.forEach(item -> {
if (map.containsKey(item.getId())) {
item.setPersonCount(map.get(item.getId()));
}
item.setDifferPersonCount(item.getPersonRealCount() - item.getPersonCount());
});
}
return new PageData<>(list, pageInfo.getTotal());
}
/**
* 双实录入网格录入数据统计
*
* @param formDTO
* @Param formDTO
* @Return {@link GridStatisticsResultDTO}
* @Author zhaoqifeng
* @Date 2022/6/28 15:41
*/
@Override
public GridStatisticsResultDTO getGridCount(HouseInformationFormDTO formDTO) {
GridStatisticsResultDTO result = icNeighborHoodDao.getGridCount(formDTO);
//获取录入人口数
IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO();
countFormDTO.setOrgType(NumConstant.ONE_STR);
countFormDTO.setOrgId(formDTO.getGridId());
countFormDTO.setType(NumConstant.ZERO_STR);
Map<String, Integer> map = getMapResult(countFormDTO);
if (map.containsKey(formDTO.getGridId())) {
result.setPersonCount(map.get(formDTO.getGridId()));
}
return result;
}
/**
* 双实录入网格-小区列表
*
* @param formDTO
* @Param formDTO
* @Return {@link PageData<NeighborHoodListResultDTO>}
* @Author zhaoqifeng
* @Date 2022/6/28 16:24
*/
@Override
public PageData<NeighborHoodListResultDTO> getNeighborHoodList(HouseInformationFormDTO formDTO) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
List<NeighborHoodListResultDTO> list = icNeighborHoodDao.getNeighborHoodList(formDTO);
PageInfo<NeighborHoodListResultDTO> pageInfo = new PageInfo<>(list);
if (CollectionUtils.isNotEmpty(list)) {
//获取录入人口数
IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO();
countFormDTO.setOrgType(NumConstant.ONE_STR);
countFormDTO.setOrgId(formDTO.getGridId());
countFormDTO.setType(NumConstant.ONE_STR);
Map<String, Integer> map = getMapResult(countFormDTO);
list.forEach(item -> {
if (map.containsKey(item.getId())) {
item.setPersonCount(map.get(item.getId()));
}
item.setDifferPersonCount(item.getPersonRealCount() - item.getPersonCount());
});
}
return new PageData<>(list, pageInfo.getTotal());
}
/**
* 双实录入小区录入数据统计
*
* @param formDTO
* @Param formDTO
* @Return {@link NeighborHoodCountResultDTO}
* @Author zhaoqifeng
* @Date 2022/6/28 16:43
*/
@Override
public NeighborHoodCountResultDTO getNeighborHoodCount(HouseInformationFormDTO formDTO) {
NeighborHoodCountResultDTO result = icNeighborHoodDao.getNeighborHoodCount(formDTO);
//获取录入人口数
IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO();
countFormDTO.setOrgType(NumConstant.TWO_STR);
countFormDTO.setOrgId(formDTO.getNeighborHoodId());
countFormDTO.setType(NumConstant.ZERO_STR);
Map<String, Integer> map = getMapResult(countFormDTO);
if (map.containsKey(formDTO.getNeighborHoodId())) {
result.setPersonCount(map.get(formDTO.getNeighborHoodId()));
}
return result;
}
/**
* 双实录入小区-楼栋列表
*
* @param formDTO
* @Param formDTO
* @Return {@link PageData<BuildingListResultDTO>}
* @Author zhaoqifeng
* @Date 2022/6/28 16:47
*/
@Override
public PageData<BuildingListResultDTO> getBuildingList(HouseInformationFormDTO formDTO) {
List<BuildingListResultDTO> list;
long total = 0;
//获取录入人口数
IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO();
countFormDTO.setOrgType(NumConstant.TWO_STR);
countFormDTO.setOrgId(formDTO.getNeighborHoodId());
countFormDTO.setType(NumConstant.ONE_STR);
Map<String, Integer> map = getMapResult(countFormDTO);
if (!NumConstant.FIVE_STR.equals(formDTO.getSort())) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
list = icNeighborHoodDao.getBuildingList(formDTO);
PageInfo<BuildingListResultDTO> pageInfo = new PageInfo<>(list);
total = pageInfo.getTotal();
if (CollectionUtils.isNotEmpty(list)) {
list.forEach(item -> {
if (map.containsKey(item.getId())) {
item.setPersonCount(map.get(item.getId()));
}
item.setDifferPersonCount(item.getPersonRealCount() - item.getPersonCount());
});
}
} else {
list = icNeighborHoodDao.getBuildingList(formDTO);
if (CollectionUtils.isNotEmpty(list)) {
total = list.size();
list.forEach(item -> {
if (map.containsKey(item.getId())) {
item.setPersonCount(map.get(item.getId()));
}
item.setDifferPersonCount(item.getPersonRealCount() - item.getPersonCount());
});
//排序
list = list.stream().sorted(Comparator.comparing(BuildingListResultDTO::getDifferPersonCount).reversed()).collect(Collectors.toList());
//分页
list = list.stream().skip((long)(formDTO.getPageNo() - 1) * formDTO.getPageSize()).limit(formDTO.getPageSize()).collect(Collectors.toList());
}
}
return new PageData<>(list, total);
}
/**
* 双实录入楼栋录入数据统计
*
* @param formDTO
* @Param formDTO
* @Return {@link BuildingCountResultDTO}
* @Author zhaoqifeng
* @Date 2022/6/28 16:50
*/
@Override
public BuildingCountResultDTO getBuildingCount(HouseInformationFormDTO formDTO) {
BuildingCountResultDTO result = icNeighborHoodDao.getBuildingCount(formDTO);
//获取录入人口数
IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO();
countFormDTO.setOrgType(NumConstant.THREE_STR);
countFormDTO.setOrgId(formDTO.getBuildingId());
countFormDTO.setType(NumConstant.ZERO_STR);
Map<String, Integer> map = getMapResult(countFormDTO);
if (map.containsKey(formDTO.getBuildingId())) {
result.setPersonCount(map.get(formDTO.getBuildingId()));
}
result.setBuildingType(BuildingTypeEnums.getTypeValue(result.getBuildingType()));
return result;
}
/**
* 双实录入楼栋-单元列表
*
* @param formDTO
* @Param formDTO
* @Return {@link PageData<UnitListResultDTO>}
* @Author zhaoqifeng
* @Date 2022/6/28 16:54
*/
@Override
public PageData<UnitListResultDTO> getUnitList(HouseInformationFormDTO formDTO) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
List<UnitListResultDTO> list = icNeighborHoodDao.getUnitList(formDTO);
PageInfo<UnitListResultDTO> pageInfo = new PageInfo<>(list);
if (CollectionUtils.isNotEmpty(list)) {
//获取录入人口数
IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO();
countFormDTO.setOrgType(NumConstant.THREE_STR);
countFormDTO.setOrgId(formDTO.getBuildingId());
countFormDTO.setType(NumConstant.ONE_STR);
Map<String, Integer> map = getMapResult(countFormDTO);
list.forEach(item -> {
if (map.containsKey(item.getId())) {
item.setPersonCount(map.get(item.getId()));
}
});
}
return new PageData<>(list, pageInfo.getTotal());
}
/**
* 双实录入单元录入数据统计
*
* @param formDTO
* @Param formDTO
* @Return {@link UnitCountResultDTO}
* @Author zhaoqifeng
* @Date 2022/6/28 16:57
*/
@Override
public UnitCountResultDTO getUnitCount(HouseInformationFormDTO formDTO) {
UnitCountResultDTO result = icNeighborHoodDao.getUnitCount(formDTO);
//获取录入人口数
IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO();
countFormDTO.setOrgType(NumConstant.FOUR_STR);
countFormDTO.setOrgId(formDTO.getUnitId());
countFormDTO.setType(NumConstant.ZERO_STR);
Map<String, Integer> map = getMapResult(countFormDTO);
if (map.containsKey(formDTO.getUnitId())) {
result.setPersonCount(map.get(formDTO.getUnitId()));
}
return result;
}
/**
* 双实录入单元-房屋列表
*
* @param formDTO
* @Param formDTO
* @Return {@link PageData<HomeListResultDTO>}
* @Author zhaoqifeng
* @Date 2022/6/28 17:01
*/
@Override
public PageData<HomeListResultDTO> getHouseList(HouseInformationFormDTO formDTO) {
List<HomeListResultDTO> list = null;
long total = 0;
//获取录入人口数
IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO();
countFormDTO.setOrgType(NumConstant.FOUR_STR);
countFormDTO.setOrgId(formDTO.getUnitId());
countFormDTO.setType(NumConstant.ONE_STR);
Map<String, Integer> map = getMapResult(countFormDTO);
if (!NumConstant.TWO_STR.equals(formDTO.getSort())) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
list = icNeighborHoodDao.getHouseList(formDTO);
PageInfo<HomeListResultDTO> pageInfo = new PageInfo<>(list);
total = pageInfo.getTotal();
if (CollectionUtils.isNotEmpty(list)) {
list.forEach(item -> {
item.setHouseType(HouseRentFlagEnums.getTypeValue(item.getHouseType()));
if (map.containsKey(item.getId())) {
item.setPersonCount(map.get(item.getId()));
}
});
}
} else {
list = icNeighborHoodDao.getHouseList(formDTO);
if (CollectionUtils.isNotEmpty(list)) {
total = list.size();
list.forEach(item -> {
item.setHouseType(HouseRentFlagEnums.getTypeValue(item.getHouseType()));
if (map.containsKey(item.getId())) {
item.setPersonCount(map.get(item.getId()));
}
});
//排序
list = list.stream().sorted(Comparator.comparing(HomeListResultDTO::getPersonCount).reversed()).collect(Collectors.toList());
//分页
list = list.stream().skip((long)(formDTO.getPageNo() - 1) * formDTO.getPageSize()).limit(formDTO.getPageSize()).collect(Collectors.toList());
}
}
return new PageData<>(list, total);
}
private Map<String, Integer> getMapResult(IcUserCountFormDTO countFormDTO) {
Result<Map<String, Integer>> result = userOpenFeignClient.getIcUserCount(countFormDTO);
if (!result.success()) {
log.warn("查询录入人数失败");
return Collections.emptyMap();
}
return result.getData();
}
}

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

Loading…
Cancel
Save