Browse Source

Merge remote-tracking branch 'origin/dev_ic_v2' into develop

feature/evaluate
yinzuomei 4 years ago
parent
commit
8c2041a409
  1. 12
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java
  2. 7
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java
  3. 12
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java
  4. 4
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java
  5. 7
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java
  6. 55
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java
  7. 18
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  8. 154
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java
  9. 145
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java
  10. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcSocietyOrgDTO.java
  11. 103
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandOperateLogDTO.java
  12. 178
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java
  13. 102
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandSatisfactionDTO.java
  14. 106
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandServiceDTO.java
  15. 5
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddSocietyOrgFormDTO.java
  16. 49
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java
  17. 22
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/DelCommunitySelfOrganizationFormDTO.java
  18. 83
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java
  19. 3
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditSocietyOrgFormDTO.java
  20. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/GetListSocietyOrgFormDTO.java
  21. 26
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java
  22. 26
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitFormDTO.java
  23. 31
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AssignFormDTO.java
  24. 120
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandAddFromDTO.java
  25. 10
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandRecId.java
  26. 48
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/FinishStaffFromDTO.java
  27. 44
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java
  28. 17
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/StaffCancelFormDTO.java
  29. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/SubCodeFormDTO.java
  30. 83
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java
  31. 89
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java
  32. 28
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListResultDTO.java
  33. 10
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java
  34. 61
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java
  35. 113
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java
  36. 6
      epmet-module/epmet-heart/epmet-heart-server/pom.xml
  37. 53
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/UserDemandConstant.java
  38. 64
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java
  39. 61
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java
  40. 112
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java
  41. 26
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java
  42. 183
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java
  43. 13
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java
  44. 27
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java
  45. 11
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationPersonnelDao.java
  46. 8
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyActivityDao.java
  47. 46
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java
  48. 7
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java
  49. 56
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java
  50. 8
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandOperateLogDao.java
  51. 39
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java
  52. 8
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandSatisfactionDao.java
  53. 34
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandServiceDao.java
  54. 111
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyActivityEntity.java
  55. 111
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyUnitEntity.java
  56. 4
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcSocietyOrgEntity.java
  57. 71
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandOperateLogEntity.java
  58. 146
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java
  59. 72
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandSatisfactionEntity.java
  60. 76
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandServiceEntity.java
  61. 98
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyActivityExcel.java
  62. 101
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyUnitExcel.java
  63. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcSocietyOrgExcel.java
  64. 47
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/redis/IcPartyActivityRedis.java
  65. 47
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/redis/IcPartyUnitRedis.java
  66. 8
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationPersonnelService.java
  67. 42
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java
  68. 49
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java
  69. 67
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java
  70. 23
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java
  71. 15
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcSocietyOrgService.java
  72. 130
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java
  73. 10
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java
  74. 12
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationPersonnelServiceImpl.java
  75. 138
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java
  76. 127
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java
  77. 189
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java
  78. 29
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java
  79. 58
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java
  80. 440
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java
  81. 38
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java
  82. 82
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml
  83. 4
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationPersonnelDao.xml
  84. 31
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml
  85. 49
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml
  86. 23
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml
  87. 65
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml
  88. 24
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandOperateLogDao.xml
  89. 116
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml
  90. 23
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandSatisfactionDao.xml
  91. 29
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandServiceDao.xml
  92. 41
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/SocietyOrgDao.xml
  93. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/VolunteerInfoDao.xml
  94. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlaceOrgDTO.java
  95. 4
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolRecordDTO.java
  96. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolReviewRecordDTO.java
  97. 4
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolTeamDTO.java
  98. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolTeamStaffDTO.java
  99. 41
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/MatterListDTO.java
  100. 22
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/TimeDTO.java

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

@ -6,9 +6,11 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.result.CorsConfigResultDTO;
import com.epmet.feign.fallback.EpmetAdminOpenFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import java.util.List;
import java.util.Map;
@FeignClient(name = ServiceConstant.EPMET_ADMIN_SERVER, fallbackFactory = EpmetAdminOpenFeignClientFallbackFactory.class)
//@FeignClient(name = ServiceConstant.EPMET_ADMIN_SERVER, fallbackFactory = EpmetAdminOpenFeignClientFallbackFactory.class, url = "localhost:8082")
@ -72,4 +74,14 @@ public interface EpmetAdminOpenFeignClient {
*/
@PostMapping("/sys/dict/data/relationship")
Result<List<OptionResultDTO>> getRelationshipOption();
/**
* 字典数据查询通用接口
* @Param dictType
* @Return {@link Result< Map < String, String>>}
* @Author zhaoqifeng
* @Date 2021/11/19 17:36
*/
@PostMapping("/sys/dict/data/dictMap/{dictType}")
Result<Map<String, String>> dictMap(@PathVariable("dictType") String dictType);
}

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

@ -6,9 +6,9 @@ import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.result.CorsConfigResultDTO;
import com.epmet.feign.EpmetAdminOpenFeignClient;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Map;
//@Component
public class EpmetAdminOpenFeignClientFallback implements EpmetAdminOpenFeignClient {
@ -41,4 +41,9 @@ public class EpmetAdminOpenFeignClientFallback implements EpmetAdminOpenFeignCli
public Result<List<OptionResultDTO>> getRelationshipOption() {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getRelationshipOption", null);
}
@Override
public Result<Map<String, String>> dictMap(String dictType) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "dictMap", dictType);
}
}

12
epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java

@ -150,4 +150,16 @@ public class SysDictDataController {
return new Result<List<DictListResultDTO>>().ok(sysDictDataService.dictList(formDTO.getDictType()));
}
/**
* 字典数据查询通用接口
* @Param dictType
* @Return {@link Result< Map< String, String>>}
* @Author zhaoqifeng
* @Date 2021/11/19 17:36
*/
@PostMapping("dictMap/{dictType}")
public Result<Map<String, String>> dictMap(@PathVariable("dictType") String dictType) {
return new Result<Map<String, String>>().ok(sysDictDataService.dictMap(dictType));
}
}

4
epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java

@ -9,7 +9,6 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.dto.form.DictListFormDTO;
import com.epmet.commons.tools.dto.result.DictListResultDTO;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.page.PageData;
@ -85,4 +84,7 @@ public interface SysDictDataService extends BaseService<SysDictDataEntity> {
* @Author sun
*/
List<DictListResultDTO> dictList(String dictType);
Map<String, String> dictMap(String dictType);
}

7
epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java

@ -12,7 +12,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.dto.form.DictListFormDTO;
import com.epmet.commons.tools.dto.result.DictListResultDTO;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.page.PageData;
@ -212,4 +211,10 @@ public class SysDictDataServiceImpl extends BaseServiceImpl<SysDictDataDao, SysD
return resultDTOList;
}
@Override
public Map<String, String> dictMap(String dictType) {
List<DictListResultDTO> resultDTOList = baseDao.selectDictList(dictType);
return resultDTOList.stream().collect(Collectors.toMap(DictListResultDTO::getValue, DictListResultDTO::getLabel));
}
}

55
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java

@ -0,0 +1,55 @@
package com.epmet.commons.tools.enums;
/**
* @author Administrator
*/
public enum DictTypeEnum {
/**
* 环境变量枚举
*/
UN_KNOWN("un_know", "暂不清楚", 0),
NINE_SMALL_PLACES("nine_small_places", "九小场所", 1),
EDUCATION("education", "文化程度", 2),
NATION("nation", "民族", 3),
RELATIONSHIP("relationship", "与户主关系", 4),
HOUSE("house", "住房性质", 5),
SCALE("scale", "人员规模", 6),
PARTY_UNIT_TYPE("party_unit_type", "联建单位分类", 7),
GENDER("gender", "性别", 8),
;
private final String code;
private final String name;
private final Integer sort;
DictTypeEnum(String code, String name, Integer sort) {
this.code = code;
this.name = name;
this.sort = sort;
}
public static DictTypeEnum getEnum(String code) {
DictTypeEnum[] values = DictTypeEnum.values();
for (DictTypeEnum value : values) {
if (value.getCode().equals(code)) {
return value;
}
}
return DictTypeEnum.UN_KNOWN;
}
public String getCode() {
return code;
}
public String getName() {
return name;
}
public Integer getSort(){
return sort;
}
}

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

@ -83,6 +83,13 @@ public enum EpmetErrorCode {
DOOR_NAME_EXITED(8216,"门牌号已存在"),
NEIGHBOOR_NAME_EXITED(8217,"小区名称已存在"),
DEMAND_NAME_EXITED(8218, "分类名称已存在"),
DEMAND_CAN_NOT_CANCEL(8219, "需求已完成,不可取消"),
DEMAND_CAN_NOT_ASSIGN(8220, "当前状态,不可指派"),
DEMAND_CAN_NOT_FINISH(8221, "当前状态,不能评价"),
DEMAND_FINISHED(8222,"需求已完成"),
DEMAND_CAN_NOT_UPDATE(8223,"当前状态,不可更新需求"),
DEMAND_NOT_EXITS(8224,"需求不存在"),
DEMAND_SERVICE_NOT_EXITS(8225,"服务记录不存在"),
REQUIRE_PERMISSION(8301, "您没有足够的操作权限"),
THIRD_PLAT_REQUEST_ERROR(8302, "请求第三方平台错误"),
@ -135,6 +142,17 @@ public enum EpmetErrorCode {
PATROL_REPEATED_SUBMIT_ERROR(8521, "巡查已结束,请勿重复提交"),
PATROL_END_TIME_ERROR(8522, "巡查结束时间不能小于巡查开始时间"),
TIME_FORMAT_ERROR(8523, "时间格式错误"),
// 社区自组织
COMMUNITY_SELF_ORGANIZATION_REPART_ERROR(8524, "社区自组织名称已存在"),
// 党群服务中心
PARTY_SERVICE_CENTER_ERROR(8525, "党群服务中心名称已存在"),
// 删除可预约事项存在预约记录时提示
MATTER_EXISTS_APPOINTMENT_ERROR(8526, "尚有未履行的预约存在,请确认后操作"),
// 预约某事项在某时间段存在记录时
APPOINTMENT_TIME_ERROR(8527, "该时间段已被预约,请选择其他时间段"),
// 该错误不会提示给前端,只是后端传输错误信息用。
ACCESS_SQL_FILTER_MISSION_ARGS(8701, "缺少生成权限过滤SQL所需参数"),
OPER_ADD_CUSTOMER_ROOT_AGENCY_ERROR(8702, "添加客户根级组织失败"),

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

@ -0,0 +1,154 @@
/**
* 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;
import com.epmet.commons.tools.validator.group.AddGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
/**
* 联建活动
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Data
public class IcPartyActivityDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 组织ID
*/
@NotBlank(message = "agencyId不能为空",groups = AddGroup.class)
private String agencyId;
/**
* 组织的所有上级
*/
private String pids;
/**
* 单位ID
*/
@NotBlank(message = "单位不能为空",groups = AddGroup.class)
private String unitId;
private String unitName;
/**
* 服务事项
*/
@NotBlank(message = "服务事项不能为空",groups = AddGroup.class)
private String serviceMatter;
/**
* 活动标题
*/
@NotBlank(message = "活动标题不能为空",groups = AddGroup.class)
private String title;
/**
* 活动目标
*/
@NotBlank(message = "活动目标不能为空",groups = AddGroup.class)
private String target;
/**
* 活动内容
*/
@NotBlank(message = "活动内容不能为空",groups = AddGroup.class)
private String content;
/**
* 服务人数
*/
private Integer peopleCount;
/**
* 活动时间
*/
@NotBlank(message = "活动时间不能为空",groups = AddGroup.class)
private Date activityTime;
/**
* 活动地址
*/
@NotBlank(message = "活动地址不能为空",groups = AddGroup.class)
private String address;
/**
* 活动地址经度
*/
@NotBlank(message = "活动地址不能为空",groups = AddGroup.class)
private String longitude;
/**
* 活动地址纬度
*/
@NotBlank(message = "活动地址不能为空",groups = AddGroup.class)
private String latitude;
/**
* 活动结果
*/
private String result;
/**
* 删除标识 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

145
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java

@ -0,0 +1,145 @@
/**
* 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;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 联建单位
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Data
public class IcPartyUnitDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 组织ID
*/
private String agencyId;
/**
*
*/
private String pids;
/**
* 单位名称
*/
private String unitName;
/**
* 分类 楼宇党建 两新组织 区域单位党建 机关直属部门 其他
*/
private String type;
/**
* 服务事项 多选逗号隔开
*/
private String serviceMatter;
private List<String> serviceMatterList;
/**
* 联系人
*/
private String contact;
/**
* 联系电话
*/
private String contactMobile;
/**
* 在职党员数
*/
private Integer memberCount;
/**
* 地址
*/
private String address;
/**
* 中心位置经度
*/
private String longitude;
/**
* 中心位置纬度
*/
private String latitude;
/**
* 群众满意度
*/
private String satisfaction;
/**
* 备注
*/
private String remark;
/**
* 删除标识 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

2
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/SocietyOrgDTO.java → epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcSocietyOrgDTO.java

@ -29,7 +29,7 @@ import lombok.Data;
* @since v1.0.0 2021-11-18
*/
@Data
public class SocietyOrgDTO implements Serializable {
public class IcSocietyOrgDTO implements Serializable {
private static final long serialVersionUID = 1L;

103
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandOperateLogDTO.java

@ -0,0 +1,103 @@
/**
* 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;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 居民需求操作日志表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Data
public class IcUserDemandOperateLogDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 需求id
*/
private String demandRecId;
/**
* 当前操作用户属于哪个端工作端staff居民端resi
*/
private String userType;
/**
* 当前操作用户id
*/
private String userId;
/**
* 创建需求create;撤销需求cancel;指派assign;接单take_order;完成finish;
*/
private String actionCode;
/**
* 操作时间
*/
private Date operateTime;
/**
* 删除标识0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

178
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java

@ -0,0 +1,178 @@
/**
* 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;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 居民需求记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Data
public class IcUserDemandRecDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 网格id
*/
private String gridId;
/**
* 组织id
*/
private String agencyId;
/**
* 网格的所有上级id
*/
private String gridPids;
/**
* 二级需求分类编码
*/
private String categoryCode;
/**
* 父级需求分类编码
*/
private String parentCode;
/**
* 需求内容1000字
*/
private String content;
/**
* 社区帮办community楼长帮办building_caption;党员帮办party;自身上报self_help
*/
private String reportType;
/**
* 上报人姓名
*/
private String reportUserName;
/**
* 上报人联系方式自身上报时存储注册居民的手机号
*/
private String reportUserMobile;
/**
* 自身上报时存储居民端用户id
*/
private String reportUserId;
/**
* 上报时间
*/
private Date reportTime;
/**
* 希望服务时间
*/
private Date wantServiceTime;
/**
* 小程序用户自己上报mini_resi居民信息录入的居民ic_resi_user
*/
private String demandUserType;
/**
* 需求人user.id或者ic_resi_user.id
*/
private String demandUserId;
/**
* 需求人姓名
*/
private String demandUserName;
/**
* 需求人联系电话
*/
private String demandUserMobile;
/**
* 待处理pending已取消canceled已派单assigned已接单have_order已完成finished
*/
private String status;
/**
* 完成结果已解决 resolved未解决 unresolved
*/
private String finishResult;
/**
* 取消时间
*/
private Date cancelTime;
/**
* 1已评价0未评价;评价后ic_user_satisfaction表有记录
*/
private Boolean evaluateFlag;
/**
* 删除标识0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

102
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandSatisfactionDTO.java

@ -0,0 +1,102 @@
/**
* 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;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import java.math.BigDecimal;
/**
* 居民需求评价记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Data
public class IcUserDemandSatisfactionDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键居民需求评价表
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 需求id
*/
private String demandRecId;
/**
* 当前操作用户属于哪个端工作端staff居民端resi
*/
private String userType;
/**
* 当前评价用户id可以是小程序里用户id,也可以是工作端帮忙录入需求的人
*/
private String userId;
/**
* 评价时间
*/
private Date evaluateTime;
/**
* 得分可为半星
*/
private BigDecimal score;
/**
* 删除标识0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

106
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandServiceDTO.java

@ -0,0 +1,106 @@
/**
* 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;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 居民需求服务记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Data
public class IcUserDemandServiceDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 需求id
*/
private String demandRecId;
/**
* 服务方类型志愿者volunteer社会组织social_org社区自组织community_org区域党建单位party_unit
*/
private String serviceType;
/**
* 志愿者居民端爱心互助的志愿者userId
*/
private String serverId;
/**
* 实际服务开始时间
*/
private Date serviceStartTime;
/**
* 实际服务结束时间
*/
private Date serviceEndTime;
/**
* 完成情况
*/
private String finishDesc;
/**
* 删除标识0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

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

@ -17,6 +17,7 @@
package com.epmet.dto.form;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
@ -72,12 +73,12 @@ public class AddSocietyOrgFormDTO implements Serializable {
/**
* 起始服务时间
*/
@NotBlank(message = "起始服务时间不能为空", groups = { AddSocietyOrgFormDTO.Add.class })
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date serviceStartTime;
/**
* 终止服务时间
*/
@NotBlank(message = "终止服务时间不能为空", groups = { AddSocietyOrgFormDTO.Add.class })
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date serviceEndTime;
/**
* 绑定管理员[组织下录入的工作人员]

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

@ -0,0 +1,49 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/11/19 1:47 下午
* @DESC
*/
@Data
public class CommunitySelfOrganizationListFormDTO implements Serializable {
private static final long serialVersionUID = 4202083250504143469L;
public interface CommunitySelfOrganizationListForm{}
/**
* 社区自组织名
*/
private String organizationName;
/**
* 开始时间
*/
private String startTime;
/**
* 结束时间
*/
private String endTime;
@NotNull(message = "pageNo不能为空",groups = CommunitySelfOrganizationListForm.class)
private Integer pageNo;
@NotNull(message = "pageSize不能为空",groups = CommunitySelfOrganizationListForm.class)
private Integer pageSize;
/**
* 是否分页默认true分页
*/
private Boolean isPage = true;
private String customerId;
private String agencyId;
private Integer ranking;
}

22
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/DelCommunitySelfOrganizationFormDTO.java

@ -0,0 +1,22 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/11/19 4:19 下午
* @DESC
*/
@Data
public class DelCommunitySelfOrganizationFormDTO implements Serializable {
private static final long serialVersionUID = 789228513283561471L;
public interface DelCommunitySelfOrganizationForm{}
@NotBlank(message = "orgId不能为空",groups = DelCommunitySelfOrganizationForm.class)
private String orgId;
}

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

@ -0,0 +1,83 @@
package com.epmet.dto.form;
import com.epmet.dto.IcCommunitySelfOrganizationPersonnelDTO;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* @Author zxc
* @DateTime 2021/11/18 5:32 下午
* @DESC
*/
@Data
public class EditCommunitySelfOrganizationFormDTO implements Serializable {
private static final long serialVersionUID = -4990925380900678065L;
public interface EditCommunitySelfOrganizationForm{}
/**
* 组织名称
*/
@NotBlank(message = "organizationName不能为空",groups = EditCommunitySelfOrganizationForm.class)
private String organizationName;
/**
* 组织人数
*/
@NotNull(message = "organizationPersonCount不能为空",groups = EditCommunitySelfOrganizationForm.class)
private Integer organizationPersonCount;
/**
* 负责人姓名
*/
@NotBlank(message = "principalName不能为空",groups = EditCommunitySelfOrganizationForm.class)
private String principalName;
/**
* 负责人电话
*/
@NotBlank(message = "principalPhone不能为空",groups = EditCommunitySelfOrganizationForm.class)
private String principalPhone;
/**
* 服务事项
*/
@NotBlank(message = "serviceItem不能为空",groups = EditCommunitySelfOrganizationForm.class)
private String serviceItem;
/**
* 社区自组织创建时间
*/
@NotNull(message = "organizationCreatedTime不能为空",groups = EditCommunitySelfOrganizationForm.class)
private String organizationCreatedTime;
/**
* 经度
*/
@NotBlank(message = "longitude不能为空",groups = EditCommunitySelfOrganizationForm.class)
private String longitude;
/**
* 纬度
*/
@NotBlank(message = "latitude不能为空",groups = EditCommunitySelfOrganizationForm.class)
private String latitude;
/**
* 社区自组织ID
*/
@NotBlank(message = "orgId不能为空",groups = EditCommunitySelfOrganizationForm.class)
private String orgId;
/**
* 社区自组织人员
*/
private List<IcCommunitySelfOrganizationPersonnelDTO> organizationPersonnel;
}

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

@ -17,6 +17,7 @@
package com.epmet.dto.form;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
@ -62,10 +63,12 @@ public class EditSocietyOrgFormDTO implements Serializable {
/**
* 起始服务时间
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date serviceStartTime;
/**
* 终止服务时间
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date serviceEndTime;
/**
* 绑定管理员[组织下录入的工作人员]

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

@ -47,5 +47,7 @@ public class GetListSocietyOrgFormDTO implements Serializable {
private Integer pageNo;
//每页多少条
private Integer pageSize = 20;
//token中客户Id
private String customerId;
}

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

@ -0,0 +1,26 @@
package com.epmet.dto.form;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/11/22 14:42
*/
@NoArgsConstructor
@Data
public class PartyActivityFormDTO implements Serializable {
private static final long serialVersionUID = -2510068555703677L;
private String agencyId;
private String unitId;
private String title;
private Date startTime;
private Date endTime;
private String serviceMatter;
private Integer pageNo;
private Integer pageSize;
}

26
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitFormDTO.java

@ -0,0 +1,26 @@
package com.epmet.dto.form;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/11/19 16:19
*/
@NoArgsConstructor
@Data
public class PartyUnitFormDTO implements Serializable {
private static final long serialVersionUID = 1256798619648265622L;
private String agencyId;
private String unitName;
private String serviceMatter;
private String type;
private String contact;
private String contactMobile;
private Integer pageNo;
private Integer pageSize;
}

31
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/AssignFormDTO.java

@ -0,0 +1,31 @@
package com.epmet.dto.form.demand;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
@Data
public class AssignFormDTO implements Serializable {
private static final long serialVersionUID = -8844710824469349121L;
public interface AddUserInternalGroup {
}
public interface AddUserShowGroup extends CustomerClientShowGroup {
}
@NotBlank(message = "需求id不能为空", groups = AddUserInternalGroup.class)
private String demandRecId;
@NotBlank(message = "服务方类型不能为空", groups = AddUserShowGroup.class)
private String serviceType;
@NotBlank(message = "服务方不能为空", groups = AddUserShowGroup.class)
private String serverId;
@NotBlank(message = "userId不能为空", groups = AddUserInternalGroup.class)
private String userId;
@NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class)
private String customerId;
}

120
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandAddFromDTO.java

@ -0,0 +1,120 @@
package com.epmet.dto.form.demand;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
@Data
public class DemandAddFromDTO implements Serializable {
private static final long serialVersionUID = 1589287946950749226L;
public interface AddUserInternalGroup {
}
public interface AddUserShowGroup extends CustomerClientShowGroup {
}
public interface UpdateInternalGroup {
}
@NotBlank(message = "需求id不能为空",groups = UpdateInternalGroup.class)
private String demandRecId;
private String customerId;
private String currentUserId;
/**
* 网格id
*/
@NotBlank(message = "所属网格不能为空",groups = AddUserShowGroup.class)
private String gridId;
/**
* 组织id
*/
private String agencyId;
/**
* 网格的所有上级id
*/
private String gridPids;
/**
* 二级需求分类编码
*/
@NotBlank(message = "需求类别不能为空",groups = AddUserShowGroup.class)
private String categoryCode;
/**
* 父级需求分类编码
*/
@NotBlank(message = "需求类别不能为空",groups = AddUserShowGroup.class)
private String parentCode;
/**
* 需求内容1000字
*/
@NotBlank(message = "需求内容不能为空",groups = AddUserShowGroup.class)
@Length(max = 1000,message = "需求内容至多输入1000字",groups = AddUserShowGroup.class)
private String content;
/**
* 社区帮办community楼长帮办building_caption;党员帮办party;自身上报self_help
*/
@NotBlank(message = "上报类型不能为空",groups = AddUserShowGroup.class)
private String reportType;
/**
* 上报人姓名
*/
@NotBlank(message = "上报人不能为空",groups = AddUserShowGroup.class)
private String reportUserName;
/**
* 上报人联系方式自身上报时存储注册居民的手机号
*/
@NotBlank(message = "上报人联系方式不能为空",groups = AddUserShowGroup.class)
private String reportUserMobile;
/**
* 上报时间
*/
@NotNull(message = "上报时间不能为空",groups = AddUserShowGroup.class)
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date reportTime;
/**
* 需求人user.id或者ic_resi_user.id
*/
@NotNull(message = "需求人不能为空",groups = AddUserShowGroup.class)
private String demandUserId;
/**
* 需求人姓名
*/
@NotNull(message = "需求人不能为空",groups = AddUserShowGroup.class)
private String demandUserName;
/**
* 需求人联系电话
*/
@NotNull(message = "需求人不能为空",groups = AddUserShowGroup.class)
private String demandUserMobile;
/**
* 希望服务时间
*/
@NotNull(message = "服务时间不能为空",groups = AddUserShowGroup.class)
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date wantServiceTime;
}

10
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandRecId.java

@ -0,0 +1,10 @@
package com.epmet.dto.form.demand;
import lombok.Data;
import java.io.Serializable;
@Data
public class DemandRecId implements Serializable {
private String demandRecId;
}

48
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/FinishStaffFromDTO.java

@ -0,0 +1,48 @@
package com.epmet.dto.form.demand;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data
public class FinishStaffFromDTO implements Serializable {
private static final long serialVersionUID = 591380873862126679L;
public interface AddUserInternalGroup {
}
public interface AddUserShowGroup extends CustomerClientShowGroup {
}
@NotBlank(message = "需求id不能为空", groups = AddUserInternalGroup.class)
private String demandRecId;
@NotBlank(message = "服务方不能为空", groups = AddUserShowGroup.class)
private String serverId;
@NotNull(message = "实际服务开始不能为空", groups = AddUserShowGroup.class)
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date serviceStartTime;
@NotNull(message = "实际服务结束不能为空", groups = AddUserShowGroup.class)
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date serviceEndTime;
@NotBlank(message = "完成结果不能为空", groups = AddUserShowGroup.class)
private String finishResult;
private String finishDesc;
@NotNull(message = "得分不能为空", groups = AddUserShowGroup.class)
private BigDecimal score;
@NotBlank(message = "userId不能为空", groups = AddUserInternalGroup.class)
private String userId;
@NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class)
private String customerId;
}

44
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java

@ -0,0 +1,44 @@
package com.epmet.dto.form.demand;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
@Data
public class ServiceQueryFormDTO implements Serializable {
private static final long serialVersionUID = -2738313255838176318L;
public interface AddUserInternalGroup {
}
public interface SocietyOrgInternalGroup {
}
/**
* 服务方类型志愿者volunteer社会组织social_org社区自组织community_org区域党建单位party_unit
*/
@NotBlank(message = "服务方类型不能为空", groups = AddUserInternalGroup.class)
private String serviceType;
/**
* 名称检索
*/
private String serviceName;
/**
* 列表查询条件query_demand 需求指派add_demand
*/
@NotBlank(message = "新增需求:add_demand;列表查询:query_demand", groups = SocietyOrgInternalGroup.class)
private String queryPurpose;
// --------------------------------------------------------
// 以下参数从token中获取
@NotBlank(message = "userId不能为空", groups = AddUserInternalGroup.class)
private String staffId;
@NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class)
private String customerId;
private String demandRecId;
}

17
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/StaffCancelFormDTO.java

@ -0,0 +1,17 @@
package com.epmet.dto.form.demand;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@Data
public class StaffCancelFormDTO {
public interface AddUserInternalGroup {}
@NotBlank(message = "需求id不能为空",groups = AddUserInternalGroup.class)
private String demandRecId;
@NotBlank(message = "userId不能为空", groups =AddUserInternalGroup.class)
private String userId;
@NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class)
private String customerId;
}

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

@ -12,4 +12,6 @@ public class SubCodeFormDTO implements Serializable {
private String customerId;
@NotBlank(message = "parentCategoryCode不能为空",groups = AddUserInternalGroup.class)
private String parentCategoryCode;
private String categoryName;
}

83
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java

@ -0,0 +1,83 @@
package com.epmet.dto.form.demand;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
@Data
public class UserDemandPageFormDTO extends PageFormDTO implements Serializable {
private String customerId;
private String currentStaffId;
private String gridPids;
/**
* 网格id
*/
private String gridId;
/**
* 分类的编码
*/
private String categoryCode;
/**
* 分类的级别
*/
private Integer level;
/**
* 需求人姓名
*/
private String demandUserName;
/**
* 上报时间开始
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date reportStartDate;
/**
* 上报时间截止
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date reportEndDate;
/**
* 待处理pending已取消canceled已派单assigned已接单have_order已完成finished
*/
private String status;
/**
* 服务方类型志愿者volunteer社会组织social_org社区自组织community_org区域党建单位party_unit
*/
private String serviceType;
/**
* 服务方id
*/
private String serverId;
/**
* 希望服务时间开始
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date wantServiceStartDate;
/**
* 希望截止
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date wantServiceEndDate;
}

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

@ -0,0 +1,89 @@
package com.epmet.dto.result;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.dto.IcCommunitySelfOrganizationPersonnelDTO;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* @Author zxc
* @DateTime 2021/11/19 1:47 下午
* @DESC
*/
@Data
public class CommunitySelfOrganizationListDTO implements Serializable {
private static final long serialVersionUID = 3208034033470533749L;
/**
* 排序
*/
private Integer sort;
/**
* 社区自组织人数
*/
private Integer organizationPersonCount;
/**
* 社区自组织名字
*/
private String organizationName;
/**
* 服务事项
*/
private String serviceItem;
/**
* 负责人
*/
private String principalName;
/**
* 负责人电话
*/
private String principalPhone;
/**
* 自组织创办时间
*/
private String organizationCreatedTime;
/**
* 经度
*/
private String longitude;
/**
* 纬度
*/
private String latitude;
/**
* 社区自组织ID
*/
private String orgId;
/**
* 社区自组织人员
*/
private List<IcCommunitySelfOrganizationPersonnelDTO> organizationPersonnel;
public CommunitySelfOrganizationListDTO() {
this.sort = NumConstant.ZERO;
this.organizationPersonCount = NumConstant.ZERO;
this.organizationName = "";
this.serviceItem = "";
this.principalName = "";
this.principalPhone = "";
this.organizationCreatedTime = "";
this.longitude = "";
this.latitude = "";
this.orgId = "";
this.organizationPersonnel = new ArrayList<>();
}
}

28
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListResultDTO.java

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

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

@ -17,9 +17,11 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
@ -34,7 +36,7 @@ public class GetListSocietyOrgResultDTO implements Serializable {
//集合总条数
private Integer total;
//社会组织信息
private List<SocietyOrgList> list;
private List<SocietyOrgListResultDTO> list;
@Data
public class SocietyOrgList{
@ -51,9 +53,11 @@ public class GetListSocietyOrgResultDTO implements Serializable {
//负责人电话
private String mobile;
//起始服务时间
private String serviceStartTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date serviceStartTime;
//终止服务时间
private String serviceEndTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date serviceEndTime;
//绑定管理员[组织下Id录入的工作人员]
private String adminStaffId;
//绑定管理员[组织下录入的工作人员]姓名

61
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java

@ -0,0 +1,61 @@
/**
* 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;
/**
* @Author sun
* @Description 社会组织列表查询
**/
@Data
public class SocietyOrgListResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
//所属组织Id
private String agencyId;
//社会组织Id
private String societyId;
//社会组织名称
private String societyName;
//服务事项
private String serviceMatters;
//负责人姓名
private String personInCharge;
//负责人电话
private String mobile;
//起始服务时间
//@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
//private Date serviceStartTime;
private String serviceStartTime;
//终止服务时间
private String serviceEndTime;
//绑定管理员[组织下Id录入的工作人员]
private String adminStaffId;
//绑定管理员[组织下录入的工作人员]姓名
private String adminStaffName = "";
//地址
private String address;
//经度
private String longitude;
//维度
private String dimension;
}

113
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java

@ -0,0 +1,113 @@
package com.epmet.dto.result.demand;
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;
@Data
public class DemandRecResultDTO implements Serializable {
private static final long serialVersionUID = 1140730681599839420L;
private String demandRecId;
@JsonIgnore
private String gridId;
private String gridName;
@JsonIgnore
private String categoryCode;
private String categoryName;
//社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help
private String reportType;
private String reportTypeName;
private String content;
private String reportUserName;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date reportTime;
private String demandUserId;
private String demandUser;
private String demandUserName;
private String demandUserMobile;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private String wantServiceTime;
/**
* 待处理pending已取消canceled已派单assigned已接单have_order已完成finished
*/
private String status;
private String statusName;
/**
* 完成结果已解决 resolved未解决 unresolved
*/
private String finishResult;
/**
* 取消时间
*/
private Date cancelTime;
/**
* 1已评价0未评价;评价后ic_user_satisfaction表有记录
*/
private Boolean evaluateFlag;
/**
* 得分可为半星
*/
private BigDecimal score;
/** 服务情况********************************************************************/
/** 服务情况********************************************************************/
/** 服务情况********************************************************************/
private String serviceId;
/**
* 志愿者的姓名
* 社会组织名
* 社区自组织的名字
* 区域党建单位名称
*/
private String serviceName;
/**
* 尹作梅(志愿者)
* XXX(社会组织)
* XXX(社区自组织)
* XXX(区域化党建单位)
*/
private String serviceShowName;
/**
* 服务方类型志愿者volunteer社会组织social_org社区自组织community_org区域党建单位party_unit
*/
private String serviceType;
/**
* 志愿者居民端爱心互助的志愿者userId
*/
private String serverId;
/**
* 实际服务开始时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date serviceStartTime;
/**
* 实际服务结束时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date serviceEndTime;
/**
* 完成情况
*/
private String finishDesc;
}

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

@ -82,6 +82,12 @@
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-admin-client</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>

53
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/UserDemandConstant.java

@ -0,0 +1,53 @@
package com.epmet.constant;
public interface UserDemandConstant {
/**
* 小程序用户自己上报mini_resi居民信息录入的居民ic_resi_user
*/
String MINI_RESI = "mini_resi";
String IC_RESI_USER = "ic_resi_user";
/**
* 上报类型社区帮办community楼长帮办building_caption;党员帮办party;自身上报self_help
*/
String COMMUNITY_REPORT="community";
String BUILDING_CAPTION_REPORT="building_caption";
String PARTY_REPORT="party";
String SELF_HELP_REPORT="self_help";
/**
* 待处理pending已取消canceled已派单assigned已接单have_order已完成finished
*/
String PENDING = "pending";
String CANCELED = "canceled";
String ASSIGNED = "assigned";
String HAVE_ORDER = "have_order";
String FINISHED = "finished";
/**
* 当前操作用户属于哪个端工作端staff居民端resi
*/
String STAFF="staff";
String RESI="resi";
/**
* 创建需求create;撤销需求cancel;指派assign;接单take_order;完成finish;
* 更新需求update
*/
String CREATE="create";
String UPDATE="update";
String CANCEL="cancel";
String ASSIGN="assign";
String TAKE_ORDER="take_order";
String FINISH="finish";
// 服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit;
String VOLUNTEER="volunteer";
String SOCIAL_ORG="social_org";
String COMMUNITY_ORG="community_org";
String PARTY_UNIT="party_unit";
}

64
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java

@ -20,16 +20,21 @@ 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.ConvertUtils;
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.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.IcCommunitySelfOrganizationDTO;
import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO;
import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO;
import com.epmet.dto.form.DelCommunitySelfOrganizationFormDTO;
import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.excel.IcCommunitySelfOrganizationExcel;
import com.epmet.service.IcCommunitySelfOrganizationService;
import org.springframework.beans.factory.annotation.Autowired;
@ -109,4 +114,59 @@ public class IcCommunitySelfOrganizationController {
return new Result();
}
/**
* @Description 修改社区自组织
* @param tokenDto
* @param formDTO
* @author zxc
* @date 2021/11/19 10:12 上午
*/
@PostMapping("editcommunityselforganization")
public Result editCommunitySelfOrganization(@LoginUser TokenDto tokenDto, @RequestBody EditCommunitySelfOrganizationFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, EditCommunitySelfOrganizationFormDTO.EditCommunitySelfOrganizationForm.class);
icCommunitySelfOrganizationService.editCommunitySelfOrganization(tokenDto, formDTO);
return new Result();
}
/**
* @Description 查询社区自组织列表
* @param tokenDto
* @param formDTO
* @author zxc
* @date 2021/11/19 1:59 下午
*/
@PostMapping("communityselforganizationlist")
public Result<CommunitySelfOrganizationListResultDTO> communitySelfOrganizationList(@LoginUser TokenDto tokenDto,@RequestBody CommunitySelfOrganizationListFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, CommunitySelfOrganizationListFormDTO.CommunitySelfOrganizationListForm.class);
return new Result<CommunitySelfOrganizationListResultDTO>().ok(icCommunitySelfOrganizationService.communitySelfOrganizationList(tokenDto, formDTO));
}
/**
* @Description 社区自组织删除
* @param formDTO
* @author zxc
* @date 2021/11/19 4:22 下午
*/
@PostMapping("delcommunityselforganization")
public Result delCommunitySelfOrganization(@RequestBody DelCommunitySelfOrganizationFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, DelCommunitySelfOrganizationFormDTO.DelCommunitySelfOrganizationForm.class);
icCommunitySelfOrganizationService.delCommunitySelfOrganization(formDTO);
return new Result();
}
/**
* 需求指派选择社区自组织调用此接口
* 返回需求所属社区下的 组织
*
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("servicelist")
public Result<List<OptionDTO>> queryServiceList(@LoginUser TokenDto tokenDto, @RequestBody ServiceQueryFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO,ServiceQueryFormDTO.AddUserInternalGroup.class);
return new Result<List<OptionDTO>>().ok(icCommunitySelfOrganizationService.queryServiceList(formDTO));
}
}

61
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/PlaceOrgController.java → epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java

@ -20,14 +20,13 @@ package com.epmet.controller;
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.PlaceOrgDTO;
import com.epmet.excel.PlaceOrgExcel;
import com.epmet.service.PlaceOrgService;
import com.epmet.dto.IcPartyActivityDTO;
import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.excel.IcPartyActivityExcel;
import com.epmet.service.IcPartyActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -37,58 +36,48 @@ import java.util.Map;
/**
* 九小场所下组织管理
* 联建活动
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-18
* @since v1.0.0 2021-11-19
*/
@RestController
@RequestMapping("placeorg")
public class PlaceOrgController {
@RequestMapping("icpartyactivity")
public class IcPartyActivityController {
@Autowired
private PlaceOrgService placeOrgService;
private IcPartyActivityService icPartyActivityService;
@GetMapping("page")
public Result<PageData<PlaceOrgDTO>> page(@RequestParam Map<String, Object> params){
PageData<PlaceOrgDTO> page = placeOrgService.page(params);
return new Result<PageData<PlaceOrgDTO>>().ok(page);
@PostMapping("search")
public Result<PageData<IcPartyActivityDTO>> page(@RequestBody PartyActivityFormDTO formDTO){
PageData<IcPartyActivityDTO> page = icPartyActivityService.search(formDTO);
return new Result<PageData<IcPartyActivityDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<PlaceOrgDTO> get(@PathVariable("id") String id){
PlaceOrgDTO data = placeOrgService.get(id);
return new Result<PlaceOrgDTO>().ok(data);
@PostMapping("detail")
public Result<IcPartyActivityDTO> get(@RequestBody IcPartyActivityDTO dto){
IcPartyActivityDTO data = icPartyActivityService.get(dto.getId());
return new Result<IcPartyActivityDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody PlaceOrgDTO dto){
@PostMapping("save")
public Result save(@RequestBody IcPartyActivityDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
placeOrgService.save(dto);
icPartyActivityService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody PlaceOrgDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
placeOrgService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
placeOrgService.delete(ids);
@PostMapping("delete")
public Result delete(@RequestBody IcPartyActivityDTO dto){
icPartyActivityService.delete(dto.getId());
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<PlaceOrgDTO> list = placeOrgService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, PlaceOrgExcel.class);
List<IcPartyActivityDTO> list = icPartyActivityService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, IcPartyActivityExcel.class);
}
}

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

@ -0,0 +1,112 @@
/**
* 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.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.DefaultGroup;
import com.epmet.dto.IcPartyUnitDTO;
import com.epmet.dto.form.PartyUnitFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.excel.IcPartyUnitExcel;
import com.epmet.service.IcPartyUnitService;
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 2021-11-19
*/
@RestController
@RequestMapping("icpartyunit")
public class IcPartyUnitController {
@Autowired
private IcPartyUnitService icPartyUnitService;
@PostMapping("list")
public Result<PageData<IcPartyUnitDTO>> search(@RequestBody PartyUnitFormDTO formDTO){
PageData<IcPartyUnitDTO> page = icPartyUnitService.search(formDTO);
return new Result<PageData<IcPartyUnitDTO>>().ok(page);
}
@PostMapping("detail")
public Result<IcPartyUnitDTO> get(@RequestBody IcPartyUnitDTO formDTO){
AssertUtils.isBlank(formDTO.getId(), "id");
IcPartyUnitDTO data = icPartyUnitService.get(formDTO.getId());
return new Result<IcPartyUnitDTO>().ok(data);
}
@PostMapping("save")
public Result save(@RequestBody IcPartyUnitDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
icPartyUnitService.save(dto);
return new Result();
}
@PostMapping("delete")
public Result delete(@RequestBody IcPartyUnitDTO dto){
//效验数据
AssertUtils.isBlank(dto.getId(), "id");
icPartyUnitService.delete(dto.getId());
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<IcPartyUnitDTO> list = icPartyUnitService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, IcPartyUnitExcel.class);
}
/**
* 需求指派选择区域化党建单位调用此接口
* 返回需求所属组织线上的数据
*
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("servicelist")
public Result<List<OptionDTO>> queryServiceList(@LoginUser TokenDto tokenDto, @RequestBody ServiceQueryFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO,ServiceQueryFormDTO.AddUserInternalGroup.class);
return new Result<List<OptionDTO>>().ok(icPartyUnitService.queryServiceList(formDTO));
}
@PostMapping("option")
public Result<List<OptionDTO>> option(@RequestBody IcPartyUnitDTO dto){
AssertUtils.isBlank(dto.getAgencyId(), "agencyId");
return new Result<List<OptionDTO>>().ok(icPartyUnitService.option(dto));
}
}

26
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/SocietyOrgController.java → epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java

@ -24,14 +24,18 @@ import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.AddSocietyOrgFormDTO;
import com.epmet.dto.form.EditSocietyOrgFormDTO;
import com.epmet.dto.form.GetListSocietyOrgFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.GetListSocietyOrgResultDTO;
import com.epmet.service.SocietyOrgService;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.service.IcSocietyOrgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 社会组织管理
@ -41,10 +45,10 @@ import org.springframework.web.bind.annotation.RestController;
*/
@RestController
@RequestMapping("societyorg")
public class SocietyOrgController {
public class IcSocietyOrgController {
@Autowired
private SocietyOrgService societyOrgService;
private IcSocietyOrgService societyOrgService;
/**
* @Author sun
@ -53,7 +57,7 @@ public class SocietyOrgController {
@PostMapping("add")
public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddSocietyOrgFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, AddSocietyOrgFormDTO.Add.class);
formDTO.setCustomerId(tokenDto.getToken());
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
societyOrgService.add(formDTO);
return new Result();
@ -87,7 +91,21 @@ public class SocietyOrgController {
**/
@PostMapping("getlist")
public Result<GetListSocietyOrgResultDTO> getList(@LoginUser TokenDto tokenDto, @RequestBody GetListSocietyOrgFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
return new Result<GetListSocietyOrgResultDTO>().ok(societyOrgService.getList(formDTO));
}
/**
* 需求指派选择社会组织调用此接口
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("servicelist")
public Result<List<OptionDTO>> queryServiceList(@LoginUser TokenDto tokenDto,@RequestBody ServiceQueryFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO,ServiceQueryFormDTO.AddUserInternalGroup.class,ServiceQueryFormDTO.SocietyOrgInternalGroup.class);
return new Result<List<OptionDTO>>().ok(societyOrgService.queryServiceList(formDTO));
}
}

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

@ -0,0 +1,183 @@
/**
* 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.commons.tools.validator.ValidatorUtils;
import com.epmet.constant.UserDemandConstant;
import com.epmet.dto.form.demand.*;
import com.epmet.dto.result.demand.DemandRecResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.service.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 居民需求记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Slf4j
@RestController
@RequestMapping("userdemand")
public class IcUserDemandRecController {
@Autowired
private IcUserDemandRecService icUserDemandRecService;
@Autowired
private VolunteerInfoService volunteerInfoService;
@Autowired
private IcSocietyOrgService societyOrgService;
@Autowired
private IcCommunitySelfOrganizationService icCommunitySelfOrganizationService;
@Autowired
private IcPartyUnitService icPartyUnitService;
/**
* 根据服务方类型查询 下拉框
* 服务方类型志愿者volunteer社会组织social_org社区自组织community_org区域党建单位party_unit
*
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("servicelist")
public Result<List<OptionDTO>> queryServiceList(@LoginUser TokenDto tokenDto, @RequestBody ServiceQueryFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO, ServiceQueryFormDTO.AddUserInternalGroup.class);
if (UserDemandConstant.VOLUNTEER.equals(formDTO.getServiceType())) {
return new Result<List<OptionDTO>>().ok(volunteerInfoService.queryListVolunteer(tokenDto.getCustomerId(), formDTO.getServiceName()));
} else if (UserDemandConstant.SOCIAL_ORG.equals(formDTO.getServiceType())) {
ValidatorUtils.validateEntity(formDTO, ServiceQueryFormDTO.AddUserInternalGroup.class, ServiceQueryFormDTO.SocietyOrgInternalGroup.class);
return new Result<List<OptionDTO>>().ok(societyOrgService.queryServiceList(formDTO));
} else if (UserDemandConstant.COMMUNITY_ORG.equals(formDTO.getServiceType())) {
return new Result<List<OptionDTO>>().ok(icCommunitySelfOrganizationService.queryServiceList(formDTO));
} else if (UserDemandConstant.PARTY_UNIT.equals(formDTO.getServiceType())) {
return new Result<List<OptionDTO>>().ok(icPartyUnitService.queryServiceList(formDTO));
}
return new Result<>();
}
/**
* 新增需求
*
* @param tokenDto
* @param fromDTO
* @return
*/
@PostMapping("add")
public Result<DemandRecId> add(@LoginUser TokenDto tokenDto, @RequestBody DemandAddFromDTO fromDTO){
fromDTO.setCustomerId(tokenDto.getCustomerId());
fromDTO.setCurrentUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(fromDTO,DemandAddFromDTO.AddUserShowGroup.class);
return new Result<DemandRecId>().ok(icUserDemandRecService.add(fromDTO));
}
/**
* 更新需求
* 只有待处理的才可以编辑
*
* @param tokenDto
* @param fromDTO
* @return
*/
@PostMapping("update")
public Result<DemandRecId> update(@LoginUser TokenDto tokenDto, @RequestBody DemandAddFromDTO fromDTO){
fromDTO.setCustomerId(tokenDto.getCustomerId());
fromDTO.setCurrentUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(fromDTO,DemandAddFromDTO.UpdateInternalGroup.class,DemandAddFromDTO.AddUserShowGroup.class);
return new Result<DemandRecId>().ok(icUserDemandRecService.update(fromDTO));
}
/**
* 列表查询 分页
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("pagelist")
public Result<PageData<DemandRecResultDTO>> pageList(@LoginUser TokenDto tokenDto, @RequestBody UserDemandPageFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setCurrentStaffId(tokenDto.getUserId());
return new Result<PageData<DemandRecResultDTO>>().ok(icUserDemandRecService.pageList(formDTO));
}
/**
* 取消未完成之前都可以取消
*
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("cancel")
public Result cancel(@LoginUser TokenDto tokenDto,@RequestBody StaffCancelFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO,StaffCancelFormDTO.AddUserInternalGroup.class);
icUserDemandRecService.cancel(formDTO);
return new Result();
}
/**
* 指派
* 待处理pending已取消canceled已派单assigned已接单have_order已完成finished
* 待处理+已派单才可以指派
*
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("assign")
public Result assign(@LoginUser TokenDto tokenDto,@RequestBody AssignFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO,AssignFormDTO.AddUserShowGroup.class,AssignFormDTO.AddUserInternalGroup.class);
icUserDemandRecService.assign(formDTO);
return new Result();
}
/**
* 完成并评价
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("finish")
public Result finish(@LoginUser TokenDto tokenDto,@RequestBody FinishStaffFromDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO,FinishStaffFromDTO.AddUserShowGroup.class,FinishStaffFromDTO.AddUserInternalGroup.class);
icUserDemandRecService.finish(formDTO);
return new Result();
}
}

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

@ -23,8 +23,10 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.VolunteerInfoDTO;
import com.epmet.dto.form.CommonCustomerFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.form.resi.ResiSendSmsCodeFormDTO;
import com.epmet.dto.form.resi.ResiVolunteerAuthenticateFormDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.dto.result.resi.ResiVolunteerInfoResultDTO;
import com.epmet.service.VolunteerInfoService;
import org.springframework.beans.factory.annotation.Autowired;
@ -112,4 +114,15 @@ public class ResiVolunteerController {
public Result<VolunteerInfoDTO> queryUserVolunteerInfo(@PathVariable("userId")String userId){
return new Result<VolunteerInfoDTO>().ok(volunteerInfoService.queryUserVolunteerInfo(userId));
}
/**
* 需求指派时服务对象选择志愿者调用此接口查询当前客户下所有的志愿者信息姓名手机号
*
* @param tokenDto
* @return
*/
@PostMapping("listprofile")
public Result<List<OptionDTO>> queryListVolunteer(@LoginUser TokenDto tokenDto,@RequestBody ServiceQueryFormDTO formDTO){
return new Result<List<OptionDTO>>().ok(volunteerInfoService.queryListVolunteer(tokenDto.getCustomerId(),formDTO.getServiceName()));
}
}

27
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java

@ -18,8 +18,14 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO;
import com.epmet.dto.result.CommunitySelfOrganizationListDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcCommunitySelfOrganizationEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 社区自组织表
@ -29,5 +35,24 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface IcCommunitySelfOrganizationDao extends BaseDao<IcCommunitySelfOrganizationEntity> {
/**
* @Description 自组织修改
* @param formDTO
* @author zxc
* @date 2021/11/19 2:04 下午
*/
void updateCommunitySelfOrganization(IcCommunitySelfOrganizationEntity formDTO);
/**
* @Description 查询社区自组织列表
* @param formDTO
* @author zxc
* @date 2021/11/19 2:05 下午
*/
List<CommunitySelfOrganizationListDTO> selectCommunitySelfOrganizationList(CommunitySelfOrganizationListFormDTO formDTO);
List<OptionDTO> selectListByAgencyId(@Param("customerId") String customerId,
@Param("agencyIds") List<String> agencyIds,
@Param("orgName") String orgName);
}

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

@ -20,6 +20,7 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.IcCommunitySelfOrganizationPersonnelEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 社区自组织人员表
@ -29,5 +30,13 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface IcCommunitySelfOrganizationPersonnelDao extends BaseDao<IcCommunitySelfOrganizationPersonnelEntity> {
/**
* @Description 根据社区自组织ID删除
* @param orgId
* @author zxc
* @date 2021/11/19 11:19 上午
*/
void deleteByOrgId(@Param("orgId")String orgId);
}

8
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlaceOrgDao.java → epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyActivityDao.java

@ -18,16 +18,16 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.PlaceOrgEntity;
import com.epmet.entity.IcPartyActivityEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 九小场所下组织管理
* 联建活动
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-18
* @since v1.0.0 2021-11-19
*/
@Mapper
public interface PlaceOrgDao extends BaseDao<PlaceOrgEntity> {
public interface IcPartyActivityDao extends BaseDao<IcPartyActivityEntity> {
}

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

@ -0,0 +1,46 @@
/**
* 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.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcPartyUnitEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 联建单位
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Mapper
public interface IcPartyUnitDao extends BaseDao<IcPartyUnitEntity> {
/**
* 需求指派选择区域化党建单位调用此接口
* @param agencyIds
* @param unitName
* @return
*/
List<OptionDTO> selectListByAgencyId(@Param("agencyIds") List<String> agencyIds,
@Param("unitName") String unitName,
@Param("customerId")String customerId);
}

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

@ -41,7 +41,9 @@ public interface IcResiDemandDictDao extends BaseDao<IcResiDemandDictEntity> {
String selectCategoryNames(@Param("customerId") String customerId,@Param("codeSet") Set<String> codeSet);
List<OptionDTO> selectByPCode(@Param("pcode") String pcode, @Param("customerId") String customerId);
List<OptionDTO> selectByPCode(@Param("pcode") String pcode,
@Param("customerId") String customerId,
@Param("categoryName")String categoryName);
List<DemandPageResDTO> pageSelect(@Param("customerId") String customerId, @Param("firstCategoryCode")String firstCategoryCode);
@ -60,4 +62,7 @@ public interface IcResiDemandDictDao extends BaseDao<IcResiDemandDictEntity> {
Integer selectMaxSort(@Param("customerId") String customerId,
@Param("level") int level,
@Param("parentCode") String parentCode);
List<IcResiDemandDictEntity> selectSecondCodes(@Param("customerId") String customerId, @Param("cateogryCodes") List<String> categoryCodes);
}

56
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java

@ -0,0 +1,56 @@
/**
* 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.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.form.GetListSocietyOrgFormDTO;
import com.epmet.dto.result.GetListSocietyOrgResultDTO;
import com.epmet.dto.result.SocietyOrgListResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcSocietyOrgEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 社会组织管理
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-18
*/
@Mapper
public interface IcSocietyOrgDao extends BaseDao<IcSocietyOrgEntity> {
/**
* @Author sun
* @Description 社会组织列表查询
**/
List<SocietyOrgListResultDTO> getList(GetListSocietyOrgFormDTO formDTO);
/**
* 需求指派选择社会组织调用此接口
*
* @param agencyIds
* @return
*/
List<OptionDTO> selectListByAgencyId(@Param("agencyIds")List<String> agencyIds,
@Param("societyName")String societyName,
@Param("customerId")String customerId,
@Param("queryPurpose")String queryPurpose);
}

8
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolReviewRecordDao.java → epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandOperateLogDao.java

@ -18,16 +18,16 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.PlacePatrolReviewRecordEntity;
import com.epmet.entity.IcUserDemandOperateLogEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 场所巡查复查记录
* 居民需求操作日志表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-18
* @since v1.0.0 2021-11-19
*/
@Mapper
public interface PlacePatrolReviewRecordDao extends BaseDao<PlacePatrolReviewRecordEntity> {
public interface IcUserDemandOperateLogDao extends BaseDao<IcUserDemandOperateLogEntity> {
}

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

@ -0,0 +1,39 @@
/**
* 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.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.form.demand.UserDemandPageFormDTO;
import com.epmet.dto.result.demand.DemandRecResultDTO;
import com.epmet.entity.IcUserDemandRecEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 居民需求记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Mapper
public interface IcUserDemandRecDao extends BaseDao<IcUserDemandRecEntity> {
List<DemandRecResultDTO> pageSelect(UserDemandPageFormDTO formDTO);
}

8
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/PlacePatrolTeamDao.java → epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandSatisfactionDao.java

@ -18,16 +18,16 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.PlacePatrolTeamEntity;
import com.epmet.entity.IcUserDemandSatisfactionEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 场所分队管理
* 居民需求评价记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-18
* @since v1.0.0 2021-11-19
*/
@Mapper
public interface PlacePatrolTeamDao extends BaseDao<PlacePatrolTeamEntity> {
public interface IcUserDemandSatisfactionDao extends BaseDao<IcUserDemandSatisfactionEntity> {
}

34
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandServiceDao.java

@ -0,0 +1,34 @@
/**
* 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.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.IcUserDemandServiceEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 居民需求服务记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Mapper
public interface IcUserDemandServiceDao extends BaseDao<IcUserDemandServiceEntity> {
IcUserDemandServiceEntity selectByRecId(String demandRecId);
}

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

@ -0,0 +1,111 @@
/**
* 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.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 联建活动
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_party_activity")
public class IcPartyActivityEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 组织ID
*/
private String agencyId;
/**
* 组织的所有上级
*/
private String pids;
/**
* 单位ID
*/
private String unitId;
/**
* 服务事项
*/
private String serviceMatter;
/**
* 活动标题
*/
private String title;
/**
* 活动目标
*/
private String target;
/**
* 活动内容
*/
private String content;
/**
* 服务人数
*/
private Integer peopleCount;
/**
* 活动时间
*/
private Date activityTime;
/**
* 活动地址
*/
private String address;
/**
* 活动地址经度
*/
private String longitude;
/**
* 活动地址纬度
*/
private String latitude;
/**
* 活动结果
*/
private String result;
}

111
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyUnitEntity.java

@ -0,0 +1,111 @@
/**
* 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.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 联建单位
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_party_unit")
public class IcPartyUnitEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 组织ID
*/
private String agencyId;
/**
*
*/
private String pids;
/**
* 单位名称
*/
private String unitName;
/**
* 分类 楼宇党建 两新组织 区域单位党建 机关直属部门 其他
*/
private String type;
/**
* 服务事项 多选逗号隔开
*/
private String serviceMatter;
/**
* 联系人
*/
private String contact;
/**
* 联系电话
*/
private String contactMobile;
/**
* 在职党员数
*/
private Integer memberCount;
/**
* 地址
*/
private String address;
/**
* 中心位置经度
*/
private String longitude;
/**
* 中心位置纬度
*/
private String latitude;
/**
* 群众满意度
*/
private String satisfaction;
/**
* 备注
*/
private String remark;
}

4
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/SocietyOrgEntity.java → epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcSocietyOrgEntity.java

@ -33,8 +33,8 @@ import java.util.Date;
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("society_org")
public class SocietyOrgEntity extends BaseEpmetEntity {
@TableName("ic_society_org")
public class IcSocietyOrgEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;

71
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandOperateLogEntity.java

@ -0,0 +1,71 @@
/**
* 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.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 居民需求操作日志表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_user_demand_operate_log")
public class IcUserDemandOperateLogEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 需求id
*/
private String demandRecId;
/**
* 当前操作用户属于哪个端工作端staff居民端resi
*/
private String userType;
/**
* 当前操作用户id
*/
private String userId;
/**
* 创建需求create;撤销需求cancel;指派assign;接单take_order;完成finish;
*/
private String actionCode;
/**
* 操作时间
*/
private Date operateTime;
}

146
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java

@ -0,0 +1,146 @@
/**
* 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.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 居民需求记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_user_demand_rec")
public class IcUserDemandRecEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 网格id
*/
private String gridId;
/**
* 组织id
*/
private String agencyId;
/**
* 网格的所有上级id
*/
private String gridPids;
/**
* 二级需求分类编码
*/
private String categoryCode;
/**
* 父级需求分类编码
*/
private String parentCode;
/**
* 需求内容1000字
*/
private String content;
/**
* 社区帮办community楼长帮办building_caption;党员帮办party;自身上报self_help
*/
private String reportType;
/**
* 上报人姓名
*/
private String reportUserName;
/**
* 上报人联系方式自身上报时存储注册居民的手机号
*/
private String reportUserMobile;
/**
* 自身上报时存储居民端用户id
*/
private String reportUserId;
/**
* 上报时间
*/
private Date reportTime;
/**
* 希望服务时间
*/
private Date wantServiceTime;
/**
* 小程序用户自己上报mini_resi居民信息录入的居民ic_resi_user
*/
private String demandUserType;
/**
* 需求人user.id或者ic_resi_user.id
*/
private String demandUserId;
/**
* 需求人姓名
*/
private String demandUserName;
/**
* 需求人联系电话
*/
private String demandUserMobile;
/**
* 待处理pending已取消canceled已派单assigned已接单have_order已完成finished
*/
private String status;
/**
* 完成结果已解决 resolved未解决 unresolved
*/
private String finishResult;
/**
* 取消时间
*/
private Date cancelTime;
/**
* 1已评价0未评价;评价后ic_user_satisfaction表有记录
*/
private Boolean evaluateFlag;
}

72
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandSatisfactionEntity.java

@ -0,0 +1,72 @@
/**
* 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.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.util.Date;
/**
* 居民需求评价记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_user_demand_satisfaction")
public class IcUserDemandSatisfactionEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 需求id
*/
private String demandRecId;
/**
* 当前操作用户属于哪个端工作端staff居民端resi
*/
private String userType;
/**
* 当前评价用户id可以是小程序里用户id,也可以是工作端帮忙录入需求的人
*/
private String userId;
/**
* 评价时间
*/
private Date evaluateTime;
/**
* 得分可为半星
*/
private BigDecimal score;
}

76
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandServiceEntity.java

@ -0,0 +1,76 @@
/**
* 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.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 居民需求服务记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_user_demand_service")
public class IcUserDemandServiceEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 需求id
*/
private String demandRecId;
/**
* 服务方类型志愿者volunteer社会组织social_org社区自组织community_org区域党建单位party_unit
*/
private String serviceType;
/**
* 志愿者居民端爱心互助的志愿者userId
*/
private String serverId;
/**
* 实际服务开始时间
*/
private Date serviceStartTime;
/**
* 实际服务结束时间
*/
private Date serviceEndTime;
/**
* 完成情况
*/
private String finishDesc;
}

98
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyActivityExcel.java

@ -0,0 +1,98 @@
/**
* 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.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 2021-11-19
*/
@Data
public class IcPartyActivityExcel {
@Excel(name = "主键")
private String id;
@Excel(name = "客户id")
private String customerId;
@Excel(name = "组织ID")
private String agencyId;
@Excel(name = "组织的所有上级")
private String pids;
@Excel(name = "单位ID")
private String unitId;
@Excel(name = "服务事项")
private String serviceMatter;
@Excel(name = "活动标题")
private String title;
@Excel(name = "活动目标")
private String target;
@Excel(name = "活动内容")
private String content;
@Excel(name = "服务人数")
private Integer peopleCount;
@Excel(name = "活动时间")
private Date activityTime;
@Excel(name = "活动地址")
private String address;
@Excel(name = "活动地址经度")
private String longitude;
@Excel(name = "活动地址纬度")
private String latitude;
@Excel(name = "活动结果")
private String result;
@Excel(name = "删除标识 0未删除、1已删除")
private String delFlag;
@Excel(name = "乐观锁")
private Integer revision;
@Excel(name = "创建人")
private String createdBy;
@Excel(name = "创建时间")
private Date createdTime;
@Excel(name = "更新人")
private String updatedBy;
@Excel(name = "更新时间")
private Date updatedTime;
}

101
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyUnitExcel.java

@ -0,0 +1,101 @@
/**
* 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.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 2021-11-19
*/
@Data
public class IcPartyUnitExcel {
@Excel(name = "主键")
private String id;
@Excel(name = "客户id")
private String customerId;
@Excel(name = "组织ID")
private String agencyId;
@Excel(name = "网格ID")
private String gridId;
@Excel(name = "")
private String pids;
@Excel(name = "单位名称")
private String unitName;
@Excel(name = "分类 楼宇党建 两新组织 区域单位党建 机关直属部门 其他")
private String type;
@Excel(name = "服务事项 多选逗号隔开")
private String serviceMatter;
@Excel(name = "联系人")
private String contact;
@Excel(name = "联系电话")
private String contactMobile;
@Excel(name = "在职党员数")
private Integer memberCount;
@Excel(name = "地址")
private String address;
@Excel(name = "中心位置经度")
private String longitude;
@Excel(name = "中心位置纬度")
private String latitude;
@Excel(name = "群众满意度")
private String satisfaction;
@Excel(name = "备注")
private String remark;
@Excel(name = "删除标识 0未删除、1已删除")
private String delFlag;
@Excel(name = "乐观锁")
private Integer revision;
@Excel(name = "创建人")
private String createdBy;
@Excel(name = "创建时间")
private Date createdTime;
@Excel(name = "更新人")
private String updatedBy;
@Excel(name = "更新时间")
private Date updatedTime;
}

2
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/SocietyOrgExcel.java → epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcSocietyOrgExcel.java

@ -29,7 +29,7 @@ import java.util.Date;
* @since v1.0.0 2021-11-18
*/
@Data
public class SocietyOrgExcel {
public class IcSocietyOrgExcel {
@Excel(name = "唯一标识")
private String id;

47
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/redis/IcPartyActivityRedis.java

@ -0,0 +1,47 @@
/**
* 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.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 2021-11-19
*/
@Component
public class IcPartyActivityRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

47
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/redis/IcPartyUnitRedis.java

@ -0,0 +1,47 @@
/**
* 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.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 2021-11-19
*/
@Component
public class IcPartyUnitRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

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

@ -92,4 +92,12 @@ public interface IcCommunitySelfOrganizationPersonnelService extends BaseService
* @date 2021-11-18
*/
void delete(String[] ids);
/**
* @Description 根据社区自组织ID删除
* @param orgId
* @author zxc
* @date 2021/11/19 11:18 上午
*/
void deleteByOrgId(String orgId);
}

42
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java

@ -22,6 +22,12 @@ import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dto.IcCommunitySelfOrganizationDTO;
import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO;
import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO;
import com.epmet.dto.form.DelCommunitySelfOrganizationFormDTO;
import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcCommunitySelfOrganizationEntity;
import java.util.List;
@ -103,4 +109,40 @@ public interface IcCommunitySelfOrganizationService extends BaseService<IcCommun
* @date 2021/11/19 8:33 上午
*/
void addCommunitySelfOrganization(TokenDto tokenDto, AddCommunitySelfOrganizationFormDTO formDTO);
/**
* @Description 修改社区自组织
* @param tokenDto
* @param formDTO
* @author zxc
* @date 2021/11/19 10:12 上午
*/
void editCommunitySelfOrganization(TokenDto tokenDto, EditCommunitySelfOrganizationFormDTO formDTO);
/**
* @Description 查询社区自组织列表
* @param tokenDto
* @param formDTO
* @author zxc
* @date 2021/11/19 1:59 下午
*/
CommunitySelfOrganizationListResultDTO communitySelfOrganizationList(TokenDto tokenDto, CommunitySelfOrganizationListFormDTO formDTO);
/**
* @Description 社区自组织删除
* @param formDTO
* @author zxc
* @date 2021/11/19 4:22 下午
*/
void delCommunitySelfOrganization(DelCommunitySelfOrganizationFormDTO formDTO);
/**
* 需求指派选择社区自组织调用此接口
* 返回需求所属社区下的 组织
*
* @param formDTO
* @return
*/
List<OptionDTO> queryServiceList(ServiceQueryFormDTO formDTO);
}

49
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlaceOrgService.java → epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java

@ -19,49 +19,50 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.PlaceOrgDTO;
import com.epmet.entity.PlaceOrgEntity;
import com.epmet.dto.IcPartyActivityDTO;
import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.entity.IcPartyActivityEntity;
import java.util.List;
import java.util.Map;
/**
* 九小场所下组织管理
* 联建活动
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-18
* @since v1.0.0 2021-11-19
*/
public interface PlaceOrgService extends BaseService<PlaceOrgEntity> {
public interface IcPartyActivityService extends BaseService<IcPartyActivityEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<PlaceOrgDTO>
* @param formDTO
* @return PageData<IcPartyActivityDTO>
* @author generator
* @date 2021-11-18
* @date 2021-11-19
*/
PageData<PlaceOrgDTO> page(Map<String, Object> params);
PageData<IcPartyActivityDTO> search(PartyActivityFormDTO formDTO);
/**
* 默认查询
*
* @param params
* @return java.util.List<PlaceOrgDTO>
* @return java.util.List<IcPartyActivityDTO>
* @author generator
* @date 2021-11-18
* @date 2021-11-19
*/
List<PlaceOrgDTO> list(Map<String, Object> params);
List<IcPartyActivityDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return PlaceOrgDTO
* @return IcPartyActivityDTO
* @author generator
* @date 2021-11-18
* @date 2021-11-19
*/
PlaceOrgDTO get(String id);
IcPartyActivityDTO get(String id);
/**
* 默认保存
@ -69,19 +70,9 @@ public interface PlaceOrgService extends BaseService<PlaceOrgEntity> {
* @param dto
* @return void
* @author generator
* @date 2021-11-18
*/
void save(PlaceOrgDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-11-18
* @date 2021-11-19
*/
void update(PlaceOrgDTO dto);
void save(IcPartyActivityDTO dto);
/**
* 批量删除
@ -89,7 +80,7 @@ public interface PlaceOrgService extends BaseService<PlaceOrgEntity> {
* @param ids
* @return void
* @author generator
* @date 2021-11-18
* @date 2021-11-19
*/
void delete(String[] ids);
void delete(String id);
}

67
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/PlacePatrolTeamService.java → epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java

@ -19,49 +19,52 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.PlacePatrolTeamDTO;
import com.epmet.entity.PlacePatrolTeamEntity;
import com.epmet.dto.IcPartyUnitDTO;
import com.epmet.dto.form.PartyUnitFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcPartyUnitEntity;
import java.util.List;
import java.util.Map;
/**
* 场所分队管理
* 联建单位
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-18
* @since v1.0.0 2021-11-19
*/
public interface PlacePatrolTeamService extends BaseService<PlacePatrolTeamEntity> {
public interface IcPartyUnitService extends BaseService<IcPartyUnitEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<PlacePatrolTeamDTO>
* @param formDTO
* @return PageData<IcPartyUnitDTO>
* @author generator
* @date 2021-11-18
* @date 2021-11-19
*/
PageData<PlacePatrolTeamDTO> page(Map<String, Object> params);
PageData<IcPartyUnitDTO> search(PartyUnitFormDTO formDTO);
/**
* 默认查询
*
* @param params
* @return java.util.List<PlacePatrolTeamDTO>
* @return java.util.List<IcPartyUnitDTO>
* @author generator
* @date 2021-11-18
* @date 2021-11-19
*/
List<PlacePatrolTeamDTO> list(Map<String, Object> params);
List<IcPartyUnitDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return PlacePatrolTeamDTO
* @return IcPartyUnitDTO
* @author generator
* @date 2021-11-18
* @date 2021-11-19
*/
PlacePatrolTeamDTO get(String id);
IcPartyUnitDTO get(String id);
/**
* 默认保存
@ -69,27 +72,37 @@ public interface PlacePatrolTeamService extends BaseService<PlacePatrolTeamEntit
* @param dto
* @return void
* @author generator
* @date 2021-11-18
* @date 2021-11-19
*/
void save(PlacePatrolTeamDTO dto);
void save(IcPartyUnitDTO dto);
/**
* 默认更新
* 批量删除
*
* @param dto
* @param id
* @return void
* @author generator
* @date 2021-11-18
* @date 2021-11-19
*/
void update(PlacePatrolTeamDTO dto);
void delete(String id);
/**
* 批量删除
* 需求指派选择区域化党建单位调用此接口
* 返回需求所属组织线上的数据
*
* @param ids
* @return void
* @author generator
* @date 2021-11-18
* @param formDTO
* @param formDTO
* @return
*/
List<OptionDTO> queryServiceList(ServiceQueryFormDTO formDTO);
/**
* @Description 获取组织下单位列表
* @Param dto
* @Return {@link List< OptionDTO>}
* @Author zhaoqifeng
* @Date 2021/11/22 14:35
*/
void delete(String[] ids);
List<OptionDTO> option(IcPartyUnitDTO dto);
}

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

@ -21,14 +21,12 @@ 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.IcResiDemandDictDTO;
import com.epmet.dto.form.demand.*;
import com.epmet.dto.result.demand.DemandPageResDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcResiDemandDictEntity;
import java.util.List;
import java.util.Map;
/**
* 居民需求字典表
@ -42,7 +40,6 @@ public interface IcResiDemandDictService extends BaseService<IcResiDemandDictEnt
* 默认分页
*
* @param formDTO
* @return PageData<IcResiDemandDictDTO>
* @author generator
* @date 2021-10-27
*/
@ -60,18 +57,6 @@ public interface IcResiDemandDictService extends BaseService<IcResiDemandDictEnt
*/
void addChild(AddCategoryFormDTO formDTO);
/**
* 默认查询
*
* @param params
* @return java.util.List<IcResiDemandDictDTO>
* @author generator
* @date 2021-10-27
*/
List<IcResiDemandDictDTO> list(Map<String, Object> params);
/**
* 默认更新
*
@ -116,4 +101,12 @@ public interface IcResiDemandDictService extends BaseService<IcResiDemandDictEnt
* @param formDTO
*/
void updateStatus(StatusFormDTO formDTO);
/**
* 供服务措施管理列表查询显示需求类型名称用
* @param customerId
* @param categoryCodes
* @return
*/
List<IcResiDemandDictEntity> listByCodes(String customerId, List<String> categoryCodes);
}

15
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/SocietyOrgService.java → epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcSocietyOrgService.java

@ -21,8 +21,12 @@ import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dto.form.AddSocietyOrgFormDTO;
import com.epmet.dto.form.EditSocietyOrgFormDTO;
import com.epmet.dto.form.GetListSocietyOrgFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.GetListSocietyOrgResultDTO;
import com.epmet.entity.SocietyOrgEntity;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcSocietyOrgEntity;
import java.util.List;
/**
* 社会组织管理
@ -30,7 +34,7 @@ import com.epmet.entity.SocietyOrgEntity;
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-18
*/
public interface SocietyOrgService extends BaseService<SocietyOrgEntity> {
public interface IcSocietyOrgService extends BaseService<IcSocietyOrgEntity> {
/**
* @Author sun
@ -55,4 +59,11 @@ public interface SocietyOrgService extends BaseService<SocietyOrgEntity> {
* @Description 社会组织列表查询
**/
GetListSocietyOrgResultDTO getList(GetListSocietyOrgFormDTO formDTO);
/**
* 需求指派选择社会组织调用此接口
* @param formDTO
* @return
*/
List<OptionDTO> queryServiceList(ServiceQueryFormDTO formDTO);
}

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

@ -0,0 +1,130 @@
/**
* 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.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IcUserDemandRecDTO;
import com.epmet.dto.form.demand.*;
import com.epmet.dto.result.demand.DemandRecResultDTO;
import com.epmet.entity.IcUserDemandRecEntity;
import java.util.List;
import java.util.Map;
/**
* 居民需求记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
public interface IcUserDemandRecService extends BaseService<IcUserDemandRecEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<IcUserDemandRecDTO>
* @author generator
* @date 2021-11-19
*/
PageData<IcUserDemandRecDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<IcUserDemandRecDTO>
* @author generator
* @date 2021-11-19
*/
List<IcUserDemandRecDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return IcUserDemandRecDTO
* @author generator
* @date 2021-11-19
*/
IcUserDemandRecDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-11-19
*/
void save(IcUserDemandRecDTO dto);
/**
* 更新需求
*
* @param dto
* @return void
* @author generator
* @date 2021-11-19
*/
DemandRecId update(DemandAddFromDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-11-19
*/
void delete(String[] ids);
/**
* 新增需求
*
* @param fromDTO
* @return
*/
DemandRecId add(DemandAddFromDTO fromDTO);
PageData<DemandRecResultDTO> pageList(UserDemandPageFormDTO formDTO);
/**
* 未完成之前都可以取消
*
* @param formDTO
*/
void cancel(StaffCancelFormDTO formDTO);
/**
* 指派
* 待处理pending已取消canceled已派单assigned已接单have_order已完成finished
* 待处理+已派单才可以指派
*
* @param formDTO
* @return
*/
void assign(AssignFormDTO formDTO);
/**
* 完成并评价
* @param formDTO
*/
void finish(FinishStaffFromDTO formDTO);
}

10
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java

@ -24,6 +24,7 @@ import com.epmet.dto.VolunteerInfoDTO;
import com.epmet.dto.form.CommonCustomerFormDTO;
import com.epmet.dto.form.resi.ResiSendSmsCodeFormDTO;
import com.epmet.dto.form.resi.ResiVolunteerAuthenticateFormDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.dto.result.resi.ResiVolunteerInfoResultDTO;
import com.epmet.entity.VolunteerInfoEntity;
@ -84,4 +85,13 @@ public interface VolunteerInfoService extends BaseService<VolunteerInfoEntity> {
* @return com.epmet.dto.VolunteerInfoDTO
*/
VolunteerInfoDTO queryUserVolunteerInfo(String userId);
/**
* label: 张三15764229697
* value:userId
*
* @param customerId
* @return
*/
List<OptionDTO> queryListVolunteer(String customerId,String userRealName);
}

12
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationPersonnelServiceImpl.java

@ -97,4 +97,16 @@ public class IcCommunitySelfOrganizationPersonnelServiceImpl extends BaseService
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* @Description 根据社区自组织ID删除
* @param orgId
* @author zxc
* @date 2021/11/19 11:19 上午
*/
@Transactional(rollbackFor = Exception.class)
@Override
public void deleteByOrgId(String orgId) {
baseDao.deleteByOrgId(orgId);
}
}

138
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java

@ -1,9 +1,15 @@
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
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;
@ -11,27 +17,34 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.validator.PhoneValidatorUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.IcCommunitySelfOrganizationConstant;
import com.epmet.dao.IcCommunitySelfOrganizationDao;
import com.epmet.dto.IcCommunitySelfOrganizationDTO;
import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO;
import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO;
import com.epmet.dto.form.DelCommunitySelfOrganizationFormDTO;
import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.CommunitySelfOrganizationListDTO;
import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcCommunitySelfOrganizationEntity;
import com.epmet.entity.IcCommunitySelfOrganizationPersonnelEntity;
import com.epmet.service.IcCommunitySelfOrganizationPersonnelService;
import com.epmet.service.IcCommunitySelfOrganizationService;
import com.epmet.service.IcUserDemandRecService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.xml.crypto.Data;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.*;
import static com.epmet.commons.tools.utils.DateUtils.DATE_PATTERN;
/**
* 社区自组织表
@ -44,6 +57,8 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo
@Autowired
private IcCommunitySelfOrganizationPersonnelService personnelService;
@Autowired
private IcUserDemandRecService icUserDemandRecService;
@Override
public PageData<IcCommunitySelfOrganizationDTO> page(Map<String, Object> params) {
@ -107,6 +122,14 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo
@Override
public void addCommunitySelfOrganization(TokenDto tokenDto, AddCommunitySelfOrganizationFormDTO formDTO) {
String customerId = tokenDto.getCustomerId();
LambdaQueryWrapper<IcCommunitySelfOrganizationEntity> l = new LambdaQueryWrapper<>();
l.eq(IcCommunitySelfOrganizationEntity::getOrganizationName,formDTO.getOrganizationName())
.eq(IcCommunitySelfOrganizationEntity::getCustomerId,customerId)
.eq(BaseEpmetEntity::getDelFlag, NumConstant.ZERO);
IcCommunitySelfOrganizationEntity record = baseDao.selectOne(l);
if (null != record){
throw new RenException(EpmetErrorCode.COMMUNITY_SELF_ORGANIZATION_REPART_ERROR.getCode());
}
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, tokenDto.getUserId());
if (null == staffInfo){
throw new RenException(String.format("查询人员{%s}信息失败",tokenDto.getUserId()));
@ -139,4 +162,105 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo
}
}
/**
* @Description 修改社区自组织
* 社区自组织人员为全删全增
* @param tokenDto
* @param formDTO
* @author zxc
* @date 2021/11/19 10:12 上午
*/
@Override
public void editCommunitySelfOrganization(TokenDto tokenDto, EditCommunitySelfOrganizationFormDTO formDTO) {
LambdaQueryWrapper<IcCommunitySelfOrganizationEntity> l = new LambdaQueryWrapper<>();
l.eq(IcCommunitySelfOrganizationEntity::getOrganizationName,formDTO.getOrganizationName())
.eq(IcCommunitySelfOrganizationEntity::getCustomerId,tokenDto.getCustomerId())
.eq(BaseEpmetEntity::getDelFlag, NumConstant.ZERO)
.ne(BaseEpmetEntity::getId,formDTO.getOrgId());
IcCommunitySelfOrganizationEntity record = baseDao.selectOne(l);
if (null != record){
throw new RenException(EpmetErrorCode.COMMUNITY_SELF_ORGANIZATION_REPART_ERROR.getCode());
}
IcCommunitySelfOrganizationEntity e = ConvertUtils.sourceToTarget(formDTO, IcCommunitySelfOrganizationEntity.class);
e.setOrganizationCreatedTime(DateUtils.stringToDate(formDTO.getOrganizationCreatedTime(),DATE_PATTERN));
e.setUpdatedBy(tokenDto.getUserId());
baseDao.updateCommunitySelfOrganization(e);
personnelService.deleteByOrgId(formDTO.getOrgId());
if (CollectionUtils.isNotEmpty(formDTO.getOrganizationPersonnel())){
List<IcCommunitySelfOrganizationPersonnelEntity> persons = ConvertUtils.sourceToTarget(formDTO.getOrganizationPersonnel(), IcCommunitySelfOrganizationPersonnelEntity.class);
persons.forEach(p -> {
p.setOrgId(formDTO.getOrgId());
p.setCustomerId(tokenDto.getCustomerId());
});
personnelService.insertBatch(persons);
}
}
/**
* @Description 查询社区自组织列表
* @param tokenDto
* @param formDTO
* @author zxc
* @date 2021/11/19 1:59 下午
*/
@Override
public CommunitySelfOrganizationListResultDTO communitySelfOrganizationList(TokenDto tokenDto, CommunitySelfOrganizationListFormDTO formDTO) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId());
if (null == staffInfo){
throw new RenException(String.format("查询人员{%s}信息失败",tokenDto.getUserId()));
}
formDTO.setAgencyId(staffInfo.getAgencyId());
formDTO.setCustomerId(tokenDto.getCustomerId());
final int[] i = {(formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize() + NumConstant.ONE};
CommunitySelfOrganizationListResultDTO result = new CommunitySelfOrganizationListResultDTO();
PageInfo<CommunitySelfOrganizationListDTO> objectPageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.selectCommunitySelfOrganizationList(formDTO));
result.setTotal(Integer.valueOf(String.valueOf(objectPageInfo.getTotal())));
if (CollectionUtils.isNotEmpty(objectPageInfo.getList())){
objectPageInfo.getList().forEach(l -> {
l.setSort(i[NumConstant.ZERO]);
i[NumConstant.ZERO]++;
});
result.setList(objectPageInfo.getList());
}
return result;
}
/**
* @Description 社区自组织删除
* 社区自组织表逻辑删社区自组织人员表物理删
* @param formDTO
* @author zxc
* @date 2021/11/19 4:22 下午
*/
@Override
public void delCommunitySelfOrganization(DelCommunitySelfOrganizationFormDTO formDTO) {
baseDao.deleteById(formDTO.getOrgId());
personnelService.deleteByOrgId(formDTO.getOrgId());
}
/**
* 需求指派选择社区自组织调用此接口
* 返回需求所属社区下的 组织
*
* @param formDTO
* @return
*/
@Override
public List<OptionDTO> queryServiceList(ServiceQueryFormDTO formDTO) {
List<OptionDTO> resultList=new ArrayList<>();
CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if (null == staffInfoCacheResult || StringUtils.isBlank(staffInfoCacheResult.getAgencyId())) {
throw new RenException("工作人员所属组织信息查询异常");
}
List<String> agencyIds=new ArrayList<>();
if (StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) && !NumConstant.ZERO_STR.equals(staffInfoCacheResult.getAgencyPIds())) {
if(staffInfoCacheResult.getAgencyPIds().contains(StrConstant.COLON)){
agencyIds.addAll(Arrays.asList(staffInfoCacheResult.getAgencyPIds().split(StrConstant.COLON)));
}
}
agencyIds.add(staffInfoCacheResult.getAgencyId());
resultList=baseDao.selectListByAgencyId(formDTO.getCustomerId(),agencyIds,formDTO.getServiceName());
return resultList;
}
}

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

@ -0,0 +1,127 @@
/**
* 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.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.IcPartyActivityDao;
import com.epmet.dto.IcPartyActivityDTO;
import com.epmet.dto.IcPartyUnitDTO;
import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcPartyActivityEntity;
import com.epmet.service.IcPartyActivityService;
import com.epmet.service.IcPartyUnitService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 联建活动
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Service
public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityDao, IcPartyActivityEntity> implements IcPartyActivityService {
@Resource
private IcPartyUnitService icPartyUnitService;
@Override
public PageData<IcPartyActivityDTO> search(PartyActivityFormDTO formDTO) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
LambdaQueryWrapper<IcPartyActivityEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(IcPartyActivityEntity::getAgencyId, formDTO.getAgencyId());
wrapper.eq(StringUtils.isNotBlank(formDTO.getUnitId()), IcPartyActivityEntity::getUnitId, formDTO.getUnitId());
wrapper.eq(StringUtils.isNotBlank(formDTO.getServiceMatter()), IcPartyActivityEntity::getServiceMatter, formDTO.getServiceMatter());
wrapper.like(StringUtils.isNotBlank(formDTO.getTitle()), IcPartyActivityEntity::getTitle, formDTO.getTitle());
wrapper.between(IcPartyActivityEntity::getActivityTime, formDTO.getStartTime(), formDTO.getEndTime());
wrapper.orderByDesc(IcPartyActivityEntity::getUpdatedTime);
List<IcPartyActivityEntity> list = baseDao.selectList(wrapper);
List<IcPartyActivityDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyActivityDTO.class);
IcPartyUnitDTO unitDTO = new IcPartyUnitDTO();
unitDTO.setAgencyId(formDTO.getAgencyId());
if (CollectionUtils.isNotEmpty(dtoList)) {
Map<String, String> option = icPartyUnitService.option(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
dtoList.forEach(dto -> {
dto.setUnitName(option.get(dto.getUnitId()));
});
}
PageInfo<IcPartyActivityDTO> pageInfo = new PageInfo<>(dtoList);
return new PageData<>(dtoList, pageInfo.getTotal());
}
@Override
public List<IcPartyActivityDTO> list(Map<String, Object> params) {
List<IcPartyActivityEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, IcPartyActivityDTO.class);
}
private QueryWrapper<IcPartyActivityEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<IcPartyActivityEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public IcPartyActivityDTO get(String id) {
IcPartyActivityEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, IcPartyActivityDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(IcPartyActivityDTO dto) {
IcPartyActivityEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyActivityEntity.class);
AgencyInfoCache agency = CustomerOrgRedis.getAgencyInfo(entity.getAgencyId());
entity.setPids(agency.getPids());
if(StringUtils.isBlank(entity.getId())) {
insert(entity);
} else {
updateById(entity);
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String id) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteById(id);
}
}

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

@ -0,0 +1,189 @@
/**
* 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.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.enums.DictTypeEnum;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.IcPartyUnitDao;
import com.epmet.dto.IcPartyUnitDTO;
import com.epmet.dto.IcUserDemandRecDTO;
import com.epmet.dto.form.PartyUnitFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcPartyUnitEntity;
import com.epmet.feign.EpmetAdminOpenFeignClient;
import com.epmet.service.IcPartyUnitService;
import com.epmet.service.IcUserDemandRecService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.*;
import java.util.stream.Collectors;
/**
* 联建单位
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Service
public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPartyUnitEntity> implements IcPartyUnitService {
@Resource
private EpmetAdminOpenFeignClient epmetAdminOpenFeignClient;
@Autowired
private IcUserDemandRecService icUserDemandRecService;
@Override
public PageData<IcPartyUnitDTO> search(PartyUnitFormDTO formDTO) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
LambdaQueryWrapper<IcPartyUnitEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(IcPartyUnitEntity::getAgencyId, formDTO.getAgencyId());
wrapper.like(StringUtils.isNotBlank(formDTO.getUnitName()), IcPartyUnitEntity::getUnitName, formDTO.getUnitName());
wrapper.eq(StringUtils.isNotBlank(formDTO.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, formDTO.getServiceMatter());
wrapper.eq(StringUtils.isNotBlank(formDTO.getType()), IcPartyUnitEntity::getType, formDTO.getType());
wrapper.like(StringUtils.isNotBlank(formDTO.getContact()), IcPartyUnitEntity::getContact, formDTO.getContact());
wrapper.like(StringUtils.isNotBlank(formDTO.getContactMobile()), IcPartyUnitEntity::getContactMobile, formDTO.getContactMobile());
wrapper.orderByDesc(IcPartyUnitEntity::getUpdatedTime);
List<IcPartyUnitEntity> list = baseDao.selectList(wrapper);
List<IcPartyUnitDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class);
Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode());
dtoList.forEach(item -> {
item.setType(unitTypeMap.getData().get(item.getType()));
//TODO 服务事项
if (StringUtils.isNotBlank(item.getServiceMatter())) {
List<String> matters = Arrays.asList(item.getServiceMatter().split(StrConstant.COMMA));
}
});
PageInfo<IcPartyUnitDTO> pageInfo = new PageInfo<>(dtoList);
return new PageData<>(dtoList, pageInfo.getTotal());
}
@Override
public List<IcPartyUnitDTO> list(Map<String, Object> params) {
List<IcPartyUnitEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, IcPartyUnitDTO.class);
}
private QueryWrapper<IcPartyUnitEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<IcPartyUnitEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public IcPartyUnitDTO get(String id) {
IcPartyUnitEntity entity = baseDao.selectById(id);
IcPartyUnitDTO dto = ConvertUtils.sourceToTarget(entity, IcPartyUnitDTO.class);
if (StringUtils.isNotBlank(dto.getServiceMatter())) {
dto.setServiceMatterList(Arrays.asList(dto.getServiceMatter().split(StrConstant.COMMA)));
}
return ConvertUtils.sourceToTarget(entity, IcPartyUnitDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(IcPartyUnitDTO dto) {
IcPartyUnitEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyUnitEntity.class);
AgencyInfoCache agency = CustomerOrgRedis.getAgencyInfo(entity.getAgencyId());
entity.setPids(agency.getPids());
if(StringUtils.isBlank(entity.getId())) {
insert(entity);
} else {
updateById(entity);
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String id) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteById(id);
}
/**
* 需求指派选择区域化党建单位调用此接口
* 返回需求所属组织线上的数据
*
* @param formDTO
* @return
*/
@Override
public List<OptionDTO> queryServiceList(ServiceQueryFormDTO formDTO) {
List<OptionDTO> resultList=new ArrayList<>();
IcUserDemandRecDTO icUserDemandRecDTO=icUserDemandRecService.get(formDTO.getDemandRecId());
if(null==icUserDemandRecDTO|| org.springframework.util.StringUtils.isEmpty(icUserDemandRecDTO.getGridPids())){
return resultList;
}
List<String> agencyIds=new ArrayList<>();
if(icUserDemandRecDTO.getGridPids().contains(StrConstant.COLON)){
agencyIds.addAll(Arrays.asList(icUserDemandRecDTO.getGridPids().split(StrConstant.COLON)));
}else{
agencyIds.add(icUserDemandRecDTO.getGridPids());
}
resultList=baseDao.selectListByAgencyId(agencyIds,formDTO.getServiceName(),formDTO.getCustomerId());
return resultList;
}
/**
* @Description 获取组织下单位列表
* @param dto
* @Return {@link List< OptionDTO>}
* @Author zhaoqifeng
* @Date 2021/11/22 14:35
*/
@Override
public List<OptionDTO> option(IcPartyUnitDTO dto) {
LambdaQueryWrapper<IcPartyUnitEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(IcPartyUnitEntity::getAgencyId, dto.getAgencyId());
wrapper.orderByDesc(IcPartyUnitEntity::getUpdatedTime);
wrapper.eq(StringUtils.isNotBlank(dto.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, dto.getServiceMatter());
List<IcPartyUnitEntity> list = baseDao.selectList(wrapper);
if (CollectionUtils.isEmpty(list)) {
return Collections.emptyList();
}
return list.stream().map(item -> {
OptionDTO option = new OptionDTO();
option.setValue(item.getId());
option.setLabel(item.getUnitName());
return option;
}).collect(Collectors.toList());
}
}

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

@ -25,10 +25,8 @@ import com.epmet.commons.tools.dto.result.OptionResultDTO;
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.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.IcResiDemandDictDao;
import com.epmet.dto.IcResiDemandDictDTO;
import com.epmet.dto.form.demand.*;
import com.epmet.dto.result.demand.DemandPageResDTO;
import com.epmet.dto.result.demand.OptionDTO;
@ -99,6 +97,9 @@ public class IcResiDemandDictServiceImpl extends BaseServiceImpl<IcResiDemandDic
@Transactional(rollbackFor = Exception.class)
@Override
public void addChild(AddCategoryFormDTO formDTO) {
if(NumConstant.ZERO_STR.equals(formDTO.getParentCategoryCode())){
throw new RenException("添加一级分类,调用接口/heart/icresidemanddict/addfirst");
}
if (checkCategoryName(formDTO.getCustomerId(), formDTO.getCategoryName(), NumConstant.TWO, formDTO.getParentCategoryCode(),null) > NumConstant.ZERO) {
// 名称唯一
throw new RenException(EpmetErrorCode.DEMAND_NAME_EXITED.getCode(), EpmetErrorCode.DEMAND_NAME_EXITED.getMsg());
@ -132,16 +133,6 @@ public class IcResiDemandDictServiceImpl extends BaseServiceImpl<IcResiDemandDic
return baseDao.selectCountName(customerId,categoryName,level,parentCategoryCode,id);
}
@Override
public List<IcResiDemandDictDTO> list(Map<String, Object> params) {
List<IcResiDemandDictEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, IcResiDemandDictDTO.class);
}
private QueryWrapper<IcResiDemandDictEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
@ -200,7 +191,7 @@ public class IcResiDemandDictServiceImpl extends BaseServiceImpl<IcResiDemandDic
@Override
public List<OptionDTO> querySubCodeList(SubCodeFormDTO formDTO) {
return baseDao.selectByPCode(formDTO.getParentCategoryCode(),formDTO.getCustomerId());
return baseDao.selectByPCode(formDTO.getParentCategoryCode(),formDTO.getCustomerId(),formDTO.getCategoryName());
}
@Override
@ -224,5 +215,17 @@ public class IcResiDemandDictServiceImpl extends BaseServiceImpl<IcResiDemandDic
}
}
/**
* 供服务措施管理列表查询显示需求类型名称用
*
* @param customerId
* @param categoryCodes
* @return
*/
@Override
public List<IcResiDemandDictEntity> listByCodes(String customerId, List<String> categoryCodes) {
return baseDao.selectSecondCodes(customerId,categoryCodes);
}
}

58
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/SocietyOrgServiceImpl.java → epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java

@ -19,25 +19,29 @@ package com.epmet.service.impl;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.SocietyOrgDao;
import com.epmet.dto.ProjectStaffDTO;
import com.epmet.dao.IcSocietyOrgDao;
import com.epmet.dto.form.AddSocietyOrgFormDTO;
import com.epmet.dto.form.EditSocietyOrgFormDTO;
import com.epmet.dto.form.GetListSocietyOrgFormDTO;
import com.epmet.dto.form.UserIdsFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.GetListSocietyOrgResultDTO;
import com.epmet.dto.result.SocietyOrgListResultDTO;
import com.epmet.dto.result.StaffSinGridResultDTO;
import com.epmet.entity.ActInfoEntity;
import com.epmet.entity.SocietyOrgEntity;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcSocietyOrgEntity;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.service.SocietyOrgService;
import com.epmet.service.IcSocietyOrgService;
import com.epmet.service.IcUserDemandRecService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -46,6 +50,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
@ -56,11 +61,12 @@ import java.util.stream.Collectors;
* @since v1.0.0 2021-11-18
*/
@Service
public class SocietyOrgServiceImpl extends BaseServiceImpl<SocietyOrgDao, SocietyOrgEntity> implements SocietyOrgService {
private static final Logger log = LoggerFactory.getLogger(SocietyOrgServiceImpl.class);
public class IcSocietyOrgServiceImpl extends BaseServiceImpl<IcSocietyOrgDao, IcSocietyOrgEntity> implements IcSocietyOrgService {
private static final Logger log = LoggerFactory.getLogger(IcSocietyOrgServiceImpl.class);
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Autowired
private IcUserDemandRecService icUserDemandRecService;
/**
* @Author sun
@ -69,8 +75,9 @@ public class SocietyOrgServiceImpl extends BaseServiceImpl<SocietyOrgDao, Societ
@Override
@Transactional(rollbackFor = Exception.class)
public void add(AddSocietyOrgFormDTO dto) {
SocietyOrgEntity entity = ConvertUtils.sourceToTarget(dto, SocietyOrgEntity.class);
IcSocietyOrgEntity entity = ConvertUtils.sourceToTarget(dto, IcSocietyOrgEntity.class);
CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(dto.getCustomerId(), dto.getStaffId());
entity.setAgencyId(staffInfoCache.getAgencyId());
entity.setPids(staffInfoCache.getAgencyPIds());
insert(entity);
}
@ -81,11 +88,12 @@ public class SocietyOrgServiceImpl extends BaseServiceImpl<SocietyOrgDao, Societ
**/
@Override
public void edit(EditSocietyOrgFormDTO formDTO) {
SocietyOrgEntity entity = baseDao.selectById(formDTO.getSocietyId());
IcSocietyOrgEntity entity = baseDao.selectById(formDTO.getSocietyId());
if (null == entity) {
throw new RenException(String.format("修改社会组织信息失败,社会组织信息不存在,组织Id->%s", formDTO.getSocietyId()));
}
entity = ConvertUtils.sourceToTarget(formDTO, SocietyOrgEntity.class);
entity = ConvertUtils.sourceToTarget(formDTO, IcSocietyOrgEntity.class);
entity.setId(formDTO.getSocietyId());
baseDao.updateById(entity);
}
@ -108,7 +116,7 @@ public class SocietyOrgServiceImpl extends BaseServiceImpl<SocietyOrgDao, Societ
public GetListSocietyOrgResultDTO getList(GetListSocietyOrgFormDTO formDTO) {
GetListSocietyOrgResultDTO resultDTO = new GetListSocietyOrgResultDTO();
//1.根据查询条件分页查询社会组织数据
PageInfo<GetListSocietyOrgResultDTO.SocietyOrgList> result =
PageInfo<SocietyOrgListResultDTO> result =
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.getList(formDTO));
if (CollectionUtils.isEmpty(result.getList())) {
return resultDTO;
@ -116,7 +124,7 @@ public class SocietyOrgServiceImpl extends BaseServiceImpl<SocietyOrgDao, Societ
resultDTO.setTotal((int) result.getTotal());
//2.查询被绑定管理员信息
UserIdsFormDTO dto = new UserIdsFormDTO();
List<String> staffIdList = result.getList().stream().map(GetListSocietyOrgResultDTO.SocietyOrgList::getAdminStaffId).collect(Collectors.toList());
List<String> staffIdList = result.getList().stream().map(SocietyOrgListResultDTO::getAdminStaffId).collect(Collectors.toList());
staffIdList = staffIdList.stream().distinct().collect(Collectors.toList());
dto.setUserIds(staffIdList);
Result<List<StaffSinGridResultDTO>> listResult = epmetUserOpenFeignClient.getStaffInfoList(dto);
@ -129,4 +137,28 @@ public class SocietyOrgServiceImpl extends BaseServiceImpl<SocietyOrgDao, Societ
return resultDTO;
}
/**
* 需求指派选择社会组织调用此接口
*
* @param formDTO
* @return
*/
@Override
public List<OptionDTO> queryServiceList(ServiceQueryFormDTO formDTO) {
List<OptionDTO> resultList = new ArrayList<>();
CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if (null == staffInfoCacheResult || StringUtils.isBlank(staffInfoCacheResult.getAgencyId())) {
throw new RenException("工作人员所属组织信息查询异常");
}
List<String> agencyIds = new ArrayList<>();
if (StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) && !NumConstant.ZERO_STR.equals(staffInfoCacheResult.getAgencyPIds())) {
if (staffInfoCacheResult.getAgencyPIds().contains(StrConstant.COLON)) {
agencyIds.addAll(Arrays.asList(staffInfoCacheResult.getAgencyPIds().split(StrConstant.COLON)));
}
}
agencyIds.add(staffInfoCacheResult.getAgencyId());
resultList = baseDao.selectListByAgencyId(agencyIds, formDTO.getServiceName(), formDTO.getCustomerId(), formDTO.getQueryPurpose());
return resultList;
}
}

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

@ -0,0 +1,440 @@
/**
* 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.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
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.CustomerStaffRedis;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.UserDemandConstant;
import com.epmet.dao.IcUserDemandOperateLogDao;
import com.epmet.dao.IcUserDemandRecDao;
import com.epmet.dao.IcUserDemandSatisfactionDao;
import com.epmet.dao.IcUserDemandServiceDao;
import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.IcUserDemandRecDTO;
import com.epmet.dto.form.CustomerGridFormDTO;
import com.epmet.dto.form.demand.*;
import com.epmet.dto.result.AllGridsByUserIdResultDTO;
import com.epmet.dto.result.UserBaseInfoResultDTO;
import com.epmet.dto.result.demand.DemandRecResultDTO;
import com.epmet.entity.*;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.service.IcResiDemandDictService;
import com.epmet.service.IcUserDemandRecService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
* 居民需求记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Service
public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecDao, IcUserDemandRecEntity> implements IcUserDemandRecService {
@Autowired
private IcUserDemandOperateLogDao operateLogDao;
@Autowired
private IcUserDemandServiceDao demandServiceDao;
@Autowired
private IcUserDemandSatisfactionDao demandSatisfactionDao;
@Autowired
private GovOrgOpenFeignClient govOrgOpenFeignClient;
@Autowired
private IcResiDemandDictService demandDictService;
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Override
public PageData<IcUserDemandRecDTO> page(Map<String, Object> params) {
IPage<IcUserDemandRecEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, IcUserDemandRecDTO.class);
}
@Override
public List<IcUserDemandRecDTO> list(Map<String, Object> params) {
List<IcUserDemandRecEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, IcUserDemandRecDTO.class);
}
private QueryWrapper<IcUserDemandRecEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<IcUserDemandRecEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public IcUserDemandRecDTO get(String id) {
IcUserDemandRecEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, IcUserDemandRecDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(IcUserDemandRecDTO dto) {
IcUserDemandRecEntity entity = ConvertUtils.sourceToTarget(dto, IcUserDemandRecEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public DemandRecId update(DemandAddFromDTO dto) {
IcUserDemandRecEntity origin = baseDao.selectById(dto.getDemandRecId());
if (null == origin) {
throw new RenException(EpmetErrorCode.DEMAND_NOT_EXITS.getCode(), EpmetErrorCode.DEMAND_NOT_EXITS.getMsg());
}
if(!UserDemandConstant.PENDING.equals(origin.getStatus())){
//待处理的才可以修改需求
throw new RenException(EpmetErrorCode.DEMAND_CAN_NOT_UPDATE.getCode(),EpmetErrorCode.DEMAND_CAN_NOT_UPDATE.getMsg());
}
CustomerGridFormDTO customerGridFormDTO=new CustomerGridFormDTO();
customerGridFormDTO.setGridId(dto.getGridId());
Result<CustomerGridDTO> gridInfoRes=govOrgOpenFeignClient.getGridBaseInfoByGridId(customerGridFormDTO);
if(!gridInfoRes.success()||null==gridInfoRes.getData()){
throw new RenException("查询网格信息失败");
}
IcUserDemandRecEntity updateEntity=ConvertUtils.sourceToTarget(dto,IcUserDemandRecEntity.class);
updateEntity.setAgencyId(gridInfoRes.getData().getPid());
updateEntity.setGridPids(gridInfoRes.getData().getPids());
updateEntity.setDemandUserType(UserDemandConstant.IC_RESI_USER);
updateEntity.setStatus(UserDemandConstant.PENDING);
updateEntity.setEvaluateFlag(false);
updateEntity.setId(dto.getDemandRecId());
baseDao.updateById(updateEntity);
IcUserDemandOperateLogEntity logEntity=new IcUserDemandOperateLogEntity();
logEntity.setCustomerId(dto.getCustomerId());
logEntity.setDemandRecId(dto.getDemandRecId());
logEntity.setUserType(UserDemandConstant.STAFF);
logEntity.setUserId(dto.getCurrentUserId());
logEntity.setActionCode(UserDemandConstant.UPDATE);
logEntity.setOperateTime(new Date());
operateLogDao.insert(logEntity);
DemandRecId resultDto=new DemandRecId();
resultDto.setDemandRecId(updateEntity.getId());
return resultDto;
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* 新增需求
*
* @param fromDTO
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public DemandRecId add(DemandAddFromDTO fromDTO) {
CustomerGridFormDTO customerGridFormDTO=new CustomerGridFormDTO();
customerGridFormDTO.setGridId(fromDTO.getGridId());
Result<CustomerGridDTO> gridInfoRes=govOrgOpenFeignClient.getGridBaseInfoByGridId(customerGridFormDTO);
if(!gridInfoRes.success()||null==gridInfoRes.getData()){
throw new RenException("查询网格信息失败");
}
IcUserDemandRecEntity insertEntity=ConvertUtils.sourceToTarget(fromDTO,IcUserDemandRecEntity.class);
insertEntity.setAgencyId(gridInfoRes.getData().getPid());
insertEntity.setGridPids(gridInfoRes.getData().getPids());
insertEntity.setDemandUserType(UserDemandConstant.IC_RESI_USER);
insertEntity.setStatus(UserDemandConstant.PENDING);
insertEntity.setEvaluateFlag(false);
baseDao.insert(insertEntity);
IcUserDemandOperateLogEntity logEntity=new IcUserDemandOperateLogEntity();
logEntity.setCustomerId(fromDTO.getCustomerId());
logEntity.setDemandRecId(insertEntity.getId());
logEntity.setUserType(UserDemandConstant.STAFF);
logEntity.setUserId(fromDTO.getCurrentUserId());
logEntity.setActionCode(UserDemandConstant.CREATE);
logEntity.setOperateTime(new Date());
operateLogDao.insert(logEntity);
DemandRecId resultDto=new DemandRecId();
resultDto.setDemandRecId(insertEntity.getId());
return resultDto;
}
@Override
public PageData<DemandRecResultDTO> pageList(UserDemandPageFormDTO formDTO) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getCurrentStaffId());
if (null == staffInfo) {
throw new RenException("工作人员所属组织信息查询异常");
}
if (StringUtils.isBlank(staffInfo.getAgencyPIds())) {
formDTO.setGridPids(staffInfo.getAgencyId());
} else {
if (staffInfo.getAgencyPIds().contains(StrConstant.COLON)) {
formDTO.setGridPids(staffInfo.getAgencyPIds().concat(StrConstant.COLON).concat(staffInfo.getAgencyId()));
}
}
PageInfo<DemandRecResultDTO> pageInfo= PageHelper.startPage(formDTO.getPageNo(),
formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.pageSelect(formDTO));
List<DemandRecResultDTO> list=pageInfo.getList();
if(CollectionUtils.isNotEmpty(list)){
//1、查询网格信息
List<String> gridIds=list.stream().map(DemandRecResultDTO::getGridId).collect(Collectors.toList());
Result<List<AllGridsByUserIdResultDTO>> gridInfoRes=govOrgOpenFeignClient.getGridListByGridIds(gridIds);
List<AllGridsByUserIdResultDTO> gridInfoList = gridInfoRes.success() && !CollectionUtils.isEmpty(gridInfoRes.getData()) ? gridInfoRes.getData() : new ArrayList<>();
Map<String, AllGridsByUserIdResultDTO> gridInfoMap = gridInfoList.stream().collect(Collectors.toMap(AllGridsByUserIdResultDTO::getGridId, Function.identity()));
//2、查询分类名称
List<String> categoryCodes=list.stream().map(DemandRecResultDTO::getCategoryCode).collect(Collectors.toList());
List<IcResiDemandDictEntity> dictList=demandDictService.listByCodes(formDTO.getCustomerId(),categoryCodes);
Map<String, String> dictMap = dictList.stream().collect(Collectors.toMap(IcResiDemandDictEntity::getCategoryCode, IcResiDemandDictEntity::getCategoryName));
//3、查询志愿者
// 服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit;
Map<String,String> userInfoMap=new HashMap<>();
List<String> userIdList=list.stream().filter(item->item.getServiceType().equals(UserDemandConstant.VOLUNTEER)).map(DemandRecResultDTO::getServerId).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(userIdList)){
Result<List<UserBaseInfoResultDTO>> userInfoRes = epmetUserOpenFeignClient.queryUserBaseInfo(userIdList);
if(!userInfoRes.success()||CollectionUtils.isEmpty(userInfoRes.getData())){
throw new RenException("查询志愿者信息异常");
}
userInfoMap=userInfoRes.getData().stream().collect(Collectors.toMap(UserBaseInfoResultDTO::getUserId, UserBaseInfoResultDTO::getRealName));
}
for(DemandRecResultDTO res:list){
if (null != gridInfoMap && gridInfoMap.containsKey(res.getGridId())) {
res.setGridName(gridInfoMap.get(res.getGridId()).getGridName());
}
if (null != dictMap && dictMap.containsKey(res.getCategoryCode())) {
res.setCategoryName(dictMap.get(res.getCategoryCode()));
}
if (null != userInfoMap && userInfoMap.containsKey(res.getServerId())) {
res.setServiceName(userInfoMap.get(res.getServerId()));
}
//社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help
switch(res.getReportType()){
case UserDemandConstant.COMMUNITY_REPORT :
res.setReportTypeName("社区帮办");
break;
case UserDemandConstant.BUILDING_CAPTION_REPORT :
res.setReportTypeName("楼长帮办");
break;
case UserDemandConstant.PARTY_REPORT :
res.setReportTypeName("党员帮办");
break;
case UserDemandConstant.SELF_HELP_REPORT :
res.setReportTypeName("自身上报");
break;
}
//待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished
switch(res.getStatus()){
case UserDemandConstant.PENDING :
res.setStatusName("待处理");
break;
case UserDemandConstant.CANCELED :
res.setStatusName("已取消");
break;
case UserDemandConstant.ASSIGNED :
res.setStatusName("已指派");
break;
case UserDemandConstant.HAVE_ORDER :
res.setStatusName("已接单");
break;
case UserDemandConstant.FINISHED :
res.setStatusName("已完成");
break;
}
//服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit;
switch(res.getServiceType()){
case UserDemandConstant.VOLUNTEER :
res.setServiceShowName(res.getServiceName().concat("(志愿者)"));
break;
case UserDemandConstant.SOCIAL_ORG :
res.setServiceShowName(res.getServiceName().concat("(社会组织)"));
break;
case UserDemandConstant.COMMUNITY_ORG :
res.setServiceShowName(res.getServiceName().concat("(社区自组织"));
break;
case UserDemandConstant.PARTY_UNIT :
res.setServiceShowName(res.getServiceName().concat("(区域化党建单位)"));
break;
}
}
}
return new PageData<>(list, pageInfo.getTotal());
}
/**
* 未完成之前都可以取消
*
* @param formDTO
*/
@Transactional(rollbackFor = Exception.class)
@Override
public void cancel(StaffCancelFormDTO formDTO) {
IcUserDemandRecEntity entity = baseDao.selectById(formDTO.getDemandRecId());
if (null == entity) {
throw new RenException(EpmetErrorCode.DEMAND_NOT_EXITS.getCode(), EpmetErrorCode.DEMAND_NOT_EXITS.getMsg());
}
if (UserDemandConstant.FINISH.equals(entity.getStatus())) {
//需求已完成,不可取消
throw new RenException(EpmetErrorCode.DEMAND_CAN_NOT_CANCEL.getCode(),EpmetErrorCode.DEMAND_CAN_NOT_CANCEL.getMsg());
}
//1、修改主表
//置为取消状态、设置取消时间
entity.setStatus(UserDemandConstant.CANCELED);
entity.setCancelTime(new Date());
baseDao.updateById(entity);
//2、插入操作日志
IcUserDemandOperateLogEntity logEntity = new IcUserDemandOperateLogEntity();
logEntity.setCustomerId(formDTO.getCustomerId());
logEntity.setDemandRecId(formDTO.getDemandRecId());
logEntity.setUserType(UserDemandConstant.STAFF);
logEntity.setUserId(formDTO.getUserId());
logEntity.setActionCode(UserDemandConstant.CANCEL);
logEntity.setOperateTime(entity.getCancelTime());
operateLogDao.insert(logEntity);
}
/**
* 指派
* 待处理pending已取消canceled已派单assigned已接单have_order已完成finished
* 待处理+已派单才可以指派
*
* @param formDTO
* @return
*/
@Transactional(rollbackFor = Exception.class)
@Override
public void assign(AssignFormDTO formDTO) {
IcUserDemandRecEntity entity = baseDao.selectById(formDTO.getDemandRecId());
if (null == entity) {
throw new RenException(EpmetErrorCode.DEMAND_NOT_EXITS.getCode(), EpmetErrorCode.DEMAND_NOT_EXITS.getMsg());
}
if (!UserDemandConstant.PENDING.equals(entity.getStatus()) && !UserDemandConstant.ASSIGNED.equals(entity.getStatus())) {
//待处理+已派单才可以指派
throw new RenException(EpmetErrorCode.DEMAND_CAN_NOT_ASSIGN.getCode(), EpmetErrorCode.DEMAND_CAN_NOT_ASSIGN.getMsg());
}
//1、修改主表
//置为已派单
entity.setStatus(UserDemandConstant.ASSIGNED);
baseDao.updateById(entity);
//2、插入操作日志
IcUserDemandOperateLogEntity logEntity = new IcUserDemandOperateLogEntity();
logEntity.setCustomerId(formDTO.getCustomerId());
logEntity.setDemandRecId(formDTO.getDemandRecId());
logEntity.setUserType(UserDemandConstant.STAFF);
logEntity.setUserId(formDTO.getUserId());
logEntity.setActionCode(UserDemandConstant.ASSIGN);
logEntity.setOperateTime(new Date());
operateLogDao.insert(logEntity);
//3、插入或更新服务记录
IcUserDemandServiceEntity serviceEntity=ConvertUtils.sourceToTarget(formDTO,IcUserDemandServiceEntity.class);
IcUserDemandServiceEntity origin=demandServiceDao.selectByRecId(formDTO.getDemandRecId());
if (null == origin) {
demandServiceDao.insert(serviceEntity);
}else{
serviceEntity.setId(origin.getId());
serviceEntity.setUpdatedBy(formDTO.getUserId());
demandServiceDao.updateById(serviceEntity);
}
}
/**
* 完成并评价
*
* @param formDTO
*/
@Transactional(rollbackFor = Exception.class)
@Override
public void finish(FinishStaffFromDTO formDTO) {
IcUserDemandRecEntity entity = baseDao.selectById(formDTO.getDemandRecId());
if (null == entity) {
throw new RenException(EpmetErrorCode.DEMAND_NOT_EXITS.getCode(), EpmetErrorCode.DEMAND_NOT_EXITS.getMsg());
}
if (UserDemandConstant.PENDING.equals(entity.getStatus()) ||UserDemandConstant.CANCELED.equals(entity.getStatus())) {
//待处理或者已取消的不能评价
throw new RenException(EpmetErrorCode.DEMAND_CAN_NOT_FINISH.getCode(), EpmetErrorCode.DEMAND_CAN_NOT_FINISH.getMsg());
}
if(UserDemandConstant.FINISHED.equals(entity.getStatus()) ){
//已经完成
throw new RenException(EpmetErrorCode.DEMAND_FINISHED.getCode(), EpmetErrorCode.DEMAND_FINISHED.getMsg());
}
//1、修改主表
entity.setStatus(UserDemandConstant.FINISHED);
entity.setFinishResult(formDTO.getFinishResult());
entity.setEvaluateFlag(true);
baseDao.updateById(entity);
//2、插入操作日志
IcUserDemandOperateLogEntity logEntity = new IcUserDemandOperateLogEntity();
logEntity.setCustomerId(formDTO.getCustomerId());
logEntity.setDemandRecId(formDTO.getDemandRecId());
logEntity.setUserType(UserDemandConstant.STAFF);
logEntity.setUserId(formDTO.getUserId());
logEntity.setActionCode(UserDemandConstant.FINISH);
logEntity.setOperateTime(new Date());
operateLogDao.insert(logEntity);
//3、更新服务记录
IcUserDemandServiceEntity serviceEntity=demandServiceDao.selectById(formDTO.getServerId());
if(null==serviceEntity){
throw new RenException(EpmetErrorCode.DEMAND_SERVICE_NOT_EXITS.getCode(), EpmetErrorCode.DEMAND_SERVICE_NOT_EXITS.getMsg());
}
serviceEntity.setServiceStartTime(formDTO.getServiceStartTime());
serviceEntity.setServiceEndTime(formDTO.getServiceEndTime());
serviceEntity.setFinishDesc(formDTO.getFinishDesc());
demandServiceDao.updateById(serviceEntity);
//4、插入评价
IcUserDemandSatisfactionEntity satisfactionEntity=new IcUserDemandSatisfactionEntity();
satisfactionEntity.setCustomerId(formDTO.getCustomerId());
satisfactionEntity.setDemandRecId(formDTO.getDemandRecId());
satisfactionEntity.setUserType(UserDemandConstant.STAFF);
satisfactionEntity.setUserId(formDTO.getUserId());
satisfactionEntity.setEvaluateTime(logEntity.getOperateTime());
satisfactionEntity.setScore(formDTO.getScore());
demandSatisfactionDao.insert(satisfactionEntity);
}
}

38
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java

@ -42,12 +42,16 @@ import com.epmet.dto.form.resi.ResiSendSmsCodeFormDTO;
import com.epmet.dto.form.resi.ResiVolunteerAuthenticateFormDTO;
import com.epmet.dto.result.ResiUserBaseInfoResultDTO;
import com.epmet.dto.result.SendVerificationCodeResultDTO;
import com.epmet.dto.result.UserBaseInfoResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.dto.result.resi.ResiVolunteerInfoResultDTO;
import com.epmet.entity.VolunteerInfoEntity;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.service.HeartUserInfoService;
import com.epmet.service.VolunteerInfoService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -56,6 +60,9 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
* 志愿者信息
@ -220,4 +227,35 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao,
VolunteerInfoDTO volunteerInfoDTO=baseDao.selectVolunteerInfoByUserId(userId);
return volunteerInfoDTO;
}
@Override
public List<OptionDTO> queryListVolunteer(String customerId, String userRealName) {
List<OptionDTO> resultList = new ArrayList<>();
List<String> userIds = baseDao.selectVolunteerIds(customerId);
if (CollectionUtils.isEmpty(userIds)) {
return resultList;
}
Result<List<UserBaseInfoResultDTO>> userInfoRes = epmetUserOpenFeignClient.queryUserBaseInfo(userIds);
if (userInfoRes.success() && CollectionUtils.isNotEmpty(userInfoRes.getData())) {
Map<String, UserBaseInfoResultDTO> userMap = userInfoRes.getData().stream().collect(Collectors.toMap(UserBaseInfoResultDTO::getUserId, Function.identity()));
for (String userId : userIds) {
if (userMap.containsKey(userId)) {
if (StringUtils.isNoneBlank(userRealName)) {
if (userMap.get(userId).getRealName().contains(userRealName)) {
OptionDTO optionDTO = new OptionDTO();
optionDTO.setLabel(userMap.get(userId).getRealName().concat("(").concat(userMap.get(userId).getMobile().concat(")")));
optionDTO.setValue(userId);
resultList.add(optionDTO);
}
} else {
OptionDTO optionDTO = new OptionDTO();
optionDTO.setLabel(userMap.get(userId).getRealName().concat("(").concat(userMap.get(userId).getMobile().concat(")")));
optionDTO.setValue(userId);
resultList.add(optionDTO);
}
}
}
}
return resultList;
}
}

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

@ -3,4 +3,86 @@
<mapper namespace="com.epmet.dao.IcCommunitySelfOrganizationDao">
<!-- 自组织修改 -->
<update id="updateCommunitySelfOrganization" parameterType="com.epmet.entity.IcCommunitySelfOrganizationEntity">
UPDATE ic_community_self_organization
SET ORGANIZATION_NAME = #{organizationName},
ORGANIZATION_PERSON_COUNT = #{organizationPersonCount},
PRINCIPAL_NAME = #{principalName},
PRINCIPAL_PHONE = #{principalPhone},
SERVICE_ITEM = #{serviceItem},
LONGITUDE = #{longitude},
LATITUDE = #{latitude},
ORGANIZATION_CREATED_TIME = #{organizationCreatedTime},
UPDATED_TIME = NOW(),
UPDATED_BY = #{updatedBy}
WHERE DEL_FLAG = 0
AND ID = #{orgId}
</update>
<!-- 查询社区自组织列表 -->
<resultMap id="selectCommunitySelfOrganizationListMap" type="com.epmet.dto.result.CommunitySelfOrganizationListDTO">
<result property="organizationName" column="organizationName"/>
<result property="organizationPersonCount" column="organizationPersonCount"/>
<result property="organizationCreatedTime" column="organizationCreatedTime"/>
<result property="principalName" column="principalName"/>
<result property="principalPhone" column="principalPhone"/>
<result property="serviceItem" column="serviceItem"/>
<result property="longitude" column="longitude"/>
<result property="latitude" column="latitude"/>
<result property="orgId" column="orgId"/>
<collection property="organizationPersonnel" ofType="com.epmet.dto.IcCommunitySelfOrganizationPersonnelDTO"
column="orgId" select="selectPerson"></collection>
</resultMap>
<select id="selectPerson" resultType="com.epmet.dto.IcCommunitySelfOrganizationPersonnelDTO">
select
person_name AS personName,
person_phone as personPhone
from ic_community_self_organization_personnel
where org_id = #{orgId}
and del_flag = 0
</select>
<select id="selectCommunitySelfOrganizationList" resultMap="selectCommunitySelfOrganizationListMap" parameterType="com.epmet.dto.form.CommunitySelfOrganizationListFormDTO">
SELECT
so.ORGANIZATION_NAME AS organizationName,
so.ORGANIZATION_PERSON_COUNT AS organizationPersonCount,
DATE_FORMAT(so.ORGANIZATION_CREATED_TIME,'%Y-%m-%d') AS organizationCreatedTime,
so.PRINCIPAL_NAME AS principalName,
so.PRINCIPAL_PHONE AS principalPhone,
so.SERVICE_ITEM AS serviceItem,
so.LONGITUDE AS longitude,
so.LATITUDE AS latitude,
so.ID as orgId
FROM ic_community_self_organization so
# LEFT JOIN ic_community_self_organization_personnel op ON (op.ORG_ID = so.ID AND op.DEL_FLAG = 0)
WHERE so.DEL_FLAG = 0
AND so.ORG_ID = #{agencyId}
AND so.CUSTOMER_ID = #{customerId}
<if test="null != organizationName and organizationName != '' ">
AND so.ORGANIZATION_NAME LIKE CONCAT('%',#{organizationName},'%')
</if>
<if test=" null != startTime and startTime != '' ">
AND DATE_FORMAT(so.ORGANIZATION_CREATED_TIME,'%Y%m%d') <![CDATA[ >= ]]> #{startTime}
</if>
<if test="null != endTime and endTime != '' ">
AND DATE_FORMAT(so.ORGANIZATION_CREATED_TIME,'%Y%m%d') <![CDATA[ <= ]]> #{endTime}
</if>
ORDER BY so.ORGANIZATION_CREATED_TIME DESC
</select>
<select id="selectListByAgencyId" parameterType="map" resultType="com.epmet.dto.result.demand.OptionDTO">
<foreach collection="agencyIds" item="agencyId" separator=" UNION ">
select
so.ORGANIZATION_NAME AS label,
so.id as `value`
from ic_community_self_organization so
WHERE so.DEL_FLAG = 0
AND so.ORG_ID = #{agencyId}
AND so.CUSTOMER_ID = #{customerId}
<if test="null != orgName and orgName != '' ">
and so.ORGANIZATION_NAME like concat('%',#{orgName},'%')
</if>
</foreach>
</select>
</mapper>

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

@ -3,4 +3,8 @@
<mapper namespace="com.epmet.dao.IcCommunitySelfOrganizationPersonnelDao">
<!-- 根据社区自组织ID删除 -->
<update id="deleteByOrgId">
DELETE FROM ic_community_self_organization_personnel WHERE ORG_ID = #{orgId}
</update>
</mapper>

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

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.IcPartyActivityDao">
<resultMap type="com.epmet.entity.IcPartyActivityEntity" id="icPartyActivityMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="pids" column="PIDS"/>
<result property="unitId" column="UNIT_ID"/>
<result property="serviceMatter" column="SERVICE_MATTER"/>
<result property="title" column="TITLE"/>
<result property="target" column="TARGET"/>
<result property="content" column="CONTENT"/>
<result property="peopleCount" column="PEOPLE_COUNT"/>
<result property="activityTime" column="ACTIVITY_TIME"/>
<result property="address" column="ADDRESS"/>
<result property="longitude" column="LONGITUDE"/>
<result property="latitude" column="LATITUDE"/>
<result property="result" column="RESULT"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

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

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.IcPartyUnitDao">
<resultMap type="com.epmet.entity.IcPartyUnitEntity" id="icPartyUnitMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="gridId" column="GRID_ID"/>
<result property="pids" column="PIDS"/>
<result property="unitName" column="UNIT_NAME"/>
<result property="type" column="TYPE"/>
<result property="serviceMatter" column="SERVICE_MATTER"/>
<result property="contact" column="CONTACT"/>
<result property="contactMobile" column="CONTACT_MOBILE"/>
<result property="memberCount" column="MEMBER_COUNT"/>
<result property="address" column="ADDRESS"/>
<result property="longitude" column="LONGITUDE"/>
<result property="latitude" column="LATITUDE"/>
<result property="satisfaction" column="SATISFACTION"/>
<result property="remark" column="REMARK"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="selectListByAgencyId" parameterType="map" resultType="com.epmet.dto.result.demand.OptionDTO">
<foreach collection="agencyIds" item="agencyId" separator=" UNION ">
SELECT
i.ID AS `value`,
i.UNIT_NAME AS label
FROM
ic_party_unit i
WHERE
i.DEL_FLAG = '0'
AND i.CUSTOMER_ID = #{customerId}
AND i.AGENCY_ID = #{agencyId}
<if test="null != unitName and unitName != '' ">
and i.UNIT_NAME concat('%',#{unitName},'%')
</if>
</foreach>
</select>
</mapper>

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

@ -84,6 +84,9 @@
m.DEL_FLAG = '0'
AND m.CUSTOMER_ID = #{customerId}
and m.PARENT_CODE = #{pcode}
<if test="null!=categoryName and categoryName!=''">
and m.category_name like concat('%',#{categoryName},'%')
</if>
order by m.sort asc
</select>
@ -194,4 +197,24 @@
and m.parent_code=#{parentCode}
</if>
</select>
<select id="selectSecondCodes" parameterType="map" resultType="com.epmet.entity.IcResiDemandDictEntity">
SELECT
d.CATEGORY_CODE,
d.PARENT_CODE,
concat( p.CATEGORY_NAME, '-', d.CATEGORY_NAME ) AS CATEGORY_NAME
FROM
ic_resi_demand_dict d
LEFT JOIN ic_resi_demand_dict p ON ( d.PARENT_CODE = p.CATEGORY_CODE AND p.CUSTOMER_ID = #{customerId} )
WHERE
d.DEL_FLAG = '0'
AND d.`LEVEL` = '2'
AND d.CUSTOMER_ID = #{customerId}
<if test="null!=cateogryCodes and cateogryCodes.size()>0">
and d.category_code in
<foreach item="code" collection="cateogryCodes" open="(" separator="," close=")">
#{code}
</foreach>
</if>
</select>
</mapper>

65
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.IcSocietyOrgDao">
<select id="getList" resultType="com.epmet.dto.result.SocietyOrgListResultDTO">
SELECT
agency_id agencyId,
id societyId,
society_name societyName,
service_matters serviceMatters,
person_in_charge personInCharge,
mobile mobile,
service_start_time serviceStartTime,
service_end_time serviceEndTime,
admin_staff_id adminStaffId,
address address,
longitude longitude,
dimension dimension
FROM
ic_society_org
WHERE
del_flag = '0'
<if test="customerId != null and customerId.trim() != ''">
AND customer_id = #{customerId}
</if>
<if test="societyName != null and societyName.trim() != ''">
AND society_name LIKE CONCAT('%', #{societyName}, '%')
</if>
<if test="personInCharge != null and personInCharge.trim() != ''">
AND person_in_charge LIKE CONCAT('%', #{personInCharge}, '%')
</if>
<if test="mobile != null and mobile.trim() != ''">
AND mobile = #{mobile}
</if>
<if test="serviceStartTime != null and serviceStartTime != ''">
AND service_start_time <![CDATA[>=]]> #{serviceStartTime}
</if>
<if test="serviceEndTime != null and serviceEndTime != ''">
AND service_end_time <![CDATA[<=]]> #{serviceEndTime}
</if>
ORDER BY created_time DESC
</select>
<select id="selectListByAgencyId" parameterType="map" resultType="com.epmet.dto.result.demand.OptionDTO">
<foreach collection="agencyIds" item="agencyId" separator=" UNION ">
SELECT
id as label,
society_name as `value`
FROM
ic_society_org
WHERE
del_flag = '0'
and CUSTOMER_ID=#{customerId}
and AGENCY_ID=#{agencyId}
<if test="null != queryPurpose and 'add_demand'==queryPurpose ">
and SERVICE_START_TIME &lt;= NOW()
and SERVICE_END_TIME &gt;= NOW()
</if>
<if test="null != societyName and societyName != '' ">
and society_name like concat('%',#{societyName},'%')
</if>
</foreach>
</select>
</mapper>

24
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandOperateLogDao.xml

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.IcUserDemandOperateLogDao">
<resultMap type="com.epmet.entity.IcUserDemandOperateLogEntity" id="icUserDemandOperateLogMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="demandRecId" column="DEMAND_REC_ID"/>
<result property="userType" column="USER_TYPE"/>
<result property="userId" column="USER_ID"/>
<result property="actionCode" column="ACTION_CODE"/>
<result property="operateTime" column="OPERATE_TIME"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
<result property="userName" column="USER_NAME"/>
</resultMap>
</mapper>

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

@ -0,0 +1,116 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.IcUserDemandRecDao">
<resultMap type="com.epmet.entity.IcUserDemandRecEntity" id="icUserDemandRecMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="gridId" column="GRID_ID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="gridPids" column="GRID_PIDS"/>
<result property="categoryCode" column="CATEGORY_CODE"/>
<result property="parentCode" column="PARENT_CODE"/>
<result property="content" column="CONTENT"/>
<result property="reportType" column="REPORT_TYPE"/>
<result property="reportUserName" column="REPORT_USER_NAME"/>
<result property="reportUserMobile" column="REPORT_USER_MOBILE"/>
<result property="reportUserId" column="REPORT_USER_ID"/>
<result property="reportTime" column="REPORT_TIME"/>
<result property="wantServiceTime" column="WANT_SERVICE_TIME"/>
<result property="demandUserType" column="DEMAND_USER_TYPE"/>
<result property="demandUserId" column="DEMAND_USER_ID"/>
<result property="demandUserName" column="DEMAND_USER_NAME"/>
<result property="demandUserMobile" column="DEMAND_USER_MOBILE"/>
<result property="status" column="STATUS"/>
<result property="finishResult" column="FINISH_RESULT"/>
<result property="cancelTime" column="CANCEL_TIME"/>
<result property="evaluateFlag" column="EVALUATE_FLAG"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<!-- 列表查询 -->
<select id="pageSelect" parameterType="com.epmet.dto.form.demand.UserDemandPageFormDTO" resultType="com.epmet.dto.result.demand.DemandRecResultDTO">
SELECT
r.ID as demandRecId,
r.GRID_ID as gridId,
r.CATEGORY_CODE as categoryCode,
r.CONTENT,
r.REPORT_TYPE as reportType,
r.REPORT_TIME as reportTime,
r.REPORT_USER_NAME as reportUserName,
r.`STATUS` as status,
r.DEMAND_USER_ID as demandUserId,
r.DEMAND_USER_NAME as demandUserName,
r.DEMAND_USER_MOBILE as demandUserMobile,
concat(r.DEMAND_USER_NAME,'(',r.DEMAND_USER_MOBILE,')') as demandUser,
r.WANT_SERVICE_TIME as wantServiceTime,
IFNULL(r.FINISH_RESULT,'') as finishResult,
r.CANCEL_TIME as cancelTime,
r.EVALUATE_FLAG as evaluateFlag,
IFNULL(sa.SCORE,0) as score,
IFNULL( s.SERVICE_TYPE, '' ) AS serviceType,
IFNULL( s.SERVER_ID, '' ) AS serverId,
(
CASE WHEN s.SERVICE_TYPE='social_org' then (select m1.SOCIETY_NAME as socialOrgName from ic_society_org m1 where m1.id=s.SERVER_ID)
WHEN s.SERVICE_TYPE='community_org' then (select m2.ORGANIZATION_NAME as communityName from ic_community_self_organization m2 where m2.id=s.SERVER_ID)
WHEN s.SERVICE_TYPE='party_unit' then (select m3.UNIT_NAME as partyUnitName from ic_party_unit m3 where m3.id=s.SERVER_ID)
else ''
end
) as serviceName,
s.SERVICE_START_TIME as serviceStartTime,
s.SERVICE_END_TIME as serviceEndTime,
IFNULL(s.FINISH_DESC,'') as finishDesc,
'' AS serviceShowName,
s.id as serviceId
FROM
ic_user_demand_rec r
left JOIN ic_user_demand_service s ON ( r.id = s.DEMAND_REC_ID AND s.DEL_FLAG = '0' )
left join ic_user_demand_satisfaction sa on(r.id=sa.DEMAND_REC_ID AND sa.DEL_FLAG = '0')
WHERE
r.DEL_FLAG = '0'
AND r.CUSTOMER_ID = #{customerId}
<if test="null != gridId and gridId != '' ">
and r.GRID_ID=#{gridId}
</if>
<if test="null == gridId or gridId == '' ">
AND r.GRID_PIDS LIKE concat('%',#{gridPids},'%')
</if>
<if test="null != level and level ==1">
and r.PARENT_CODE=#{categoryCode}
</if>
<if test="null != level and level ==2">
and r.CATEGORY_CODE=#{categoryCode}
</if>
<if test="null != demandUserName and demandUserName !='' ">
and r.DEMAND_USER_NAME like concat('%',#{demandUserName},'%')
</if>
<if test=" null != reportStartDate and reportStartDate != '' ">
AND DATE_FORMAT(r.REPORT_TIME,'%Y-%m-%d') <![CDATA[ >= ]]> #{reportStartDate}
</if>
<if test="null != reportEndDate and reportEndDate != '' ">
AND DATE_FORMAT(r.REPORT_TIME,'%Y-%m-%d') <![CDATA[ <= ]]> #{reportEndDate}
</if>
<if test="null != status and status != '' ">
and r.STATUS=#{status}
</if>
<if test="null != serviceType and serviceType != '' ">
and s.SERVICE_TYPE=#{serviceType}
</if>
<if test="null != serverId and serverId != '' ">
and s.SERVER_ID=#{serverId}
</if>
<if test=" null != wantServiceStartDate and wantServiceStartDate != '' ">
AND DATE_FORMAT(r.WANT_SERVICE_TIME,'%Y-%m-%d') <![CDATA[ >= ]]> #{wantServiceStartDate}
</if>
<if test="null != wantServiceEndDate and wantServiceEndDate != '' ">
AND DATE_FORMAT(r.WANT_SERVICE_TIME,'%Y-%m-%d') <![CDATA[ <= ]]> #{wantServiceEndDate}
</if>
order by r.WANT_SERVICE_TIME desc,r.CREATED_TIME asc
</select>
</mapper>

23
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandSatisfactionDao.xml

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.IcUserDemandSatisfactionDao">
<resultMap type="com.epmet.entity.IcUserDemandSatisfactionEntity" id="icUserDemandSatisfactionMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="demandRecId" column="DEMAND_REC_ID"/>
<result property="userType" column="USER_TYPE"/>
<result property="userId" column="USER_ID"/>
<result property="evaluateTime" column="EVALUATE_TIME"/>
<result property="score" column="SCORE"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

29
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandServiceDao.xml

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.IcUserDemandServiceDao">
<resultMap type="com.epmet.entity.IcUserDemandServiceEntity" id="icUserDemandServiceMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="demandRecId" column="DEMAND_REC_ID"/>
<result property="serviceType" column="SERVICE_TYPE"/>
<result property="serverId" column="SERVER_ID"/>
<result property="serviceStartTime" column="SERVICE_START_TIME"/>
<result property="serviceEndTime" column="SERVICE_END_TIME"/>
<result property="finishDesc" column="FINISH_DESC"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="selectByRecId" resultType="com.epmet.entity.IcUserDemandServiceEntity" parameterType="java.lang.String">
select m.*
from ic_user_demand_service m
where m.DEL_FLAG='0'
and m.DEMAND_REC_ID=#{demandRecId}
</select>
</mapper>

41
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/SocietyOrgDao.xml

@ -1,41 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.SocietyOrgDao">
<select id="getList" resultType="com.epmet.dto.result.GetListSocietyOrgResultDTO$SocietyOrgList">
SELECT
agency_id agencyId,
id societyId,
society_name societyName,
service_matters serviceMatters,
person_in_charge personInCharge,
mobile mobile,
service_start_time serviceStartTime,
service_end_time serviceEndTime,
admin_staff_id adminStaffId,
address address,
longitude longitude,
dimension dimension
FROM
society_org
WHERE
del_flag = '0'
<if test="societyName != null and societyName.trim() != ''">
AND society_name LIKE #{societyName}
</if>
<if test="personInCharge != null and personInCharge.trim() != ''">
AND person_in_charge LIKE #{personInCharge}
</if>
<if test="mobile != null and mobile.trim() != ''">
AND mobile = #{mobile}
</if>
<if test="serviceStartTime != null and serviceStartTime != ''">
AND date_id <![CDATA[>=]]> #{serviceStartTime}
</if>
<if test="serviceEndTime != null and serviceEndTime != ''">
AND date_id <![CDATA[<=]]> #{serviceEndTime}
</if>
</select>
</mapper>

3
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/VolunteerInfoDao.xml

@ -69,9 +69,10 @@
<!-- 查询一个客户下的所有志愿者用户Id -->
<select id="selectVolunteerIds" resultType="string">
SELECT
USER_ID
distinct USER_ID
FROM volunteer_info
WHERE DEL_FLAG = '0'
AND CUSTOMER_ID = #{customerId}
order by CREATED_TIME asc
</select>
</mapper>

2
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlaceOrgDTO.java → epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlaceOrgDTO.java

@ -29,7 +29,7 @@ import lombok.Data;
* @since v1.0.0 2021-11-18
*/
@Data
public class PlaceOrgDTO implements Serializable {
public class IcPlaceOrgDTO implements Serializable {
private static final long serialVersionUID = 1L;

4
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolRecordDTO.java → epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolRecordDTO.java

@ -29,7 +29,7 @@ import lombok.Data;
* @since v1.0.0 2021-11-18
*/
@Data
public class PlacePatrolRecordDTO implements Serializable {
public class IcPlacePatrolRecordDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ -61,7 +61,7 @@ public class PlacePatrolRecordDTO implements Serializable {
/**
* 场所类型admin库sys_dict_data表九小场所value值
*/
private String ninePlacsVal;
private String ninePlaceVal;
/**
* 场所下的组织Id

2
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolReviewRecordDTO.java → epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolReviewRecordDTO.java

@ -29,7 +29,7 @@ import lombok.Data;
* @since v1.0.0 2021-11-18
*/
@Data
public class PlacePatrolReviewRecordDTO implements Serializable {
public class IcPlacePatrolReviewRecordDTO implements Serializable {
private static final long serialVersionUID = 1L;

4
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamDTO.java → epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolTeamDTO.java

@ -29,7 +29,7 @@ import lombok.Data;
* @since v1.0.0 2021-11-18
*/
@Data
public class PlacePatrolTeamDTO implements Serializable {
public class IcPlacePatrolTeamDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ -61,7 +61,7 @@ public class PlacePatrolTeamDTO implements Serializable {
/**
* 负责场所类型admin库sys_dict_data表九小场所value值 多个值逗号分隔
*/
private String ninePlacsVals;
private String ninePlaceVals;
/**
* 分队名称

2
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/PlacePatrolTeamStaffDTO.java → epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcPlacePatrolTeamStaffDTO.java

@ -29,7 +29,7 @@ import lombok.Data;
* @since v1.0.0 2021-11-18
*/
@Data
public class PlacePatrolTeamStaffDTO implements Serializable {
public class IcPlacePatrolTeamStaffDTO implements Serializable {
private static final long serialVersionUID = 1L;

41
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/MatterListDTO.java

@ -0,0 +1,41 @@
package com.epmet.dto;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/11/22 2:41 下午
* @DESC
*/
@Data
public class MatterListDTO implements Serializable {
private static final long serialVersionUID = 493404409015559029L;
private Integer sort;
/**
* 事项名
*/
private String matterName;
/**
* 事项ID
*/
private String matterId;
/**
* 可预约时间
*/
private String allowTime;
public MatterListDTO() {
this.sort = NumConstant.ZERO;
this.matterName = "";
this.matterId = "";
this.allowTime = "";
}
}

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

@ -0,0 +1,22 @@
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/11/22 3:56 下午
* @DESC
*/
@Data
public class TimeDTO implements Serializable {
private static final long serialVersionUID = -3290964095027429971L;
private String timeId;
private Boolean isAppointment = true;
private String time;
}

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

Loading…
Cancel
Save