Browse Source

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

feature/syp_points
songyunpeng 5 years ago
parent
commit
e1a6bed212
  1. 67
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiActApplyController.java
  2. 35
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/AppVolunteerRankFeignClient.java
  3. 19
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/AppVolunteerRankFeignClientFallback.java
  4. 30
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppVolunteerRankService.java
  5. 49
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java
  6. 177
      esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActApplyInfoDTO.java
  7. 145
      esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActApplyInfoFormDTO.java
  8. 33
      esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActApplyRecordFormDTO.java
  9. 88
      esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/result/ActApplyDetailResultDTO.java
  10. 56
      esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/result/ActApplyRecordResultDTO.java
  11. 158
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActApplyInfoController.java
  12. 4
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActUserRelationController.java
  13. 44
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActApplyInfoDao.java
  14. 145
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActApplyInfoEntity.java
  15. 107
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/excel/ActApplyInfoExcel.java
  16. 47
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/redis/ActApplyInfoRedis.java
  17. 123
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActApplyInfoService.java
  18. 8
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActUserRelationService.java
  19. 146
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActApplyInfoServiceImpl.java
  20. 5
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserRelationServiceImpl.java
  21. 47
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActApplyInfoDao.xml
  22. 4
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerInfoController.java
  23. 11
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java
  24. 12
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java

67
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiActApplyController.java

@ -0,0 +1,67 @@
package com.elink.esua.epdc.controller;
import com.elink.esua.epdc.activity.form.ActApplyInfoFormDTO;
import com.elink.esua.epdc.activity.form.ActApplyRecordFormDTO;
import com.elink.esua.epdc.activity.result.ActApplyDetailResultDTO;
import com.elink.esua.epdc.activity.result.ActApplyRecordResultDTO;
import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.annotation.LoginUser;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.service.AppVolunteerRankService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* APP爱心排名
*
* @author wanggongfeng
* @date 2019/12/17 10:30
*/
@RestController
@RequestMapping("heart/actApply")
public class ApiActApplyController {
@Autowired
private AppVolunteerRankService appVolunteerRankService;
/**
* @Description 我要申请
* @Author songyunpeng
* @Date 2020/10/26
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@PostMapping("applyAct")
public Result addApply(@LoginUser TokenDto userDetail, @RequestBody ActApplyInfoFormDTO dto){
ValidatorUtils.validateEntity(dto);
return appVolunteerRankService.addApply(userDetail,dto);
}
/**
* @Description 活动申请记录
* @Author songyunpeng
* @Date 2020/10/26
* @Param [userId]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.activity.result.ActApplyRecordResultDTO>
**/
@GetMapping("applyRecord")
public Result<List<ActApplyRecordResultDTO>> applyRecord(@LoginUser TokenDto userDetail,ActApplyRecordFormDTO actApplyRecordFormDTO){
ValidatorUtils.validateEntity(actApplyRecordFormDTO);
return appVolunteerRankService.applyRecord(userDetail,actApplyRecordFormDTO);
}
/**
* @Description 活动详情
* @Author songyunpeng
* @Date 2020/10/26
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.activity.result.ActApplyDetailResultDTO>
**/
@GetMapping("applyActDetail/{id}")
public Result<ActApplyDetailResultDTO> applyActDetail(@PathVariable String id){
return appVolunteerRankService.applyActDetail(id);
}
}

35
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/AppVolunteerRankFeignClient.java

@ -1,11 +1,18 @@
package com.elink.esua.epdc.feign;
import com.elink.esua.epdc.activity.form.ActApplyInfoFormDTO;
import com.elink.esua.epdc.activity.form.ActApplyRecordFormDTO;
import com.elink.esua.epdc.activity.result.ActApplyDetailResultDTO;
import com.elink.esua.epdc.activity.result.ActApplyRecordResultDTO;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.feign.fallback.AppVolunteerRankFeignClientFallback;
import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
@ -25,4 +32,32 @@ public interface AppVolunteerRankFeignClient {
*/
@GetMapping("heart/volunteer/leaderboard")
Result<List<EpdcVolunteerRankDTO>> leaderboard();
/**
* @Description 我要申请
* @Author songyunpeng
* @Date 2020/10/27
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@PostMapping("heart/actapplyinfo/addApply")
Result addApply(@RequestBody ActApplyInfoFormDTO dto);
/**
* @Description 活动申请记录
* @Author songyunpeng
* @Date 2020/10/27
* @Param [actApplyRecordFormDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.activity.result.ActApplyRecordResultDTO>>
**/
@GetMapping("heart/actapplyinfo/applyRecord")
Result<List<ActApplyRecordResultDTO>> applyRecord(@RequestBody ActApplyRecordFormDTO actApplyRecordFormDTO);
/**
* @Description 活动详情
* @Author songyunpeng
* @Date 2020/10/27
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.activity.result.ActApplyDetailResultDTO>
**/
@GetMapping("heart/actapplyinfo/applyActDetail/{id}")
Result<ActApplyDetailResultDTO> applyActDetail(@PathVariable String id);
}

19
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/AppVolunteerRankFeignClientFallback.java

@ -1,5 +1,9 @@
package com.elink.esua.epdc.feign.fallback;
import com.elink.esua.epdc.activity.form.ActApplyInfoFormDTO;
import com.elink.esua.epdc.activity.form.ActApplyRecordFormDTO;
import com.elink.esua.epdc.activity.result.ActApplyDetailResultDTO;
import com.elink.esua.epdc.activity.result.ActApplyRecordResultDTO;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
@ -21,5 +25,20 @@ public class AppVolunteerRankFeignClientFallback implements AppVolunteerRankFeig
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "leaderboard");
}
@Override
public Result addApply(ActApplyInfoFormDTO dto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "addApply",dto);
}
@Override
public Result<List<ActApplyRecordResultDTO>> applyRecord(ActApplyRecordFormDTO actApplyRecordFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "applyRecord",actApplyRecordFormDTO);
}
@Override
public Result<ActApplyDetailResultDTO> applyActDetail(String id) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "applyActDetail",id);
}
}

30
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppVolunteerRankService.java

@ -1,5 +1,10 @@
package com.elink.esua.epdc.service;
import com.elink.esua.epdc.activity.form.ActApplyInfoFormDTO;
import com.elink.esua.epdc.activity.form.ActApplyRecordFormDTO;
import com.elink.esua.epdc.activity.result.ActApplyDetailResultDTO;
import com.elink.esua.epdc.activity.result.ActApplyRecordResultDTO;
import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO;
@ -18,5 +23,28 @@ public interface AppVolunteerRankService {
*/
Result<List<EpdcVolunteerRankDTO>> leaderboard();
/**
* @Description 我要申请
* @Author songyunpeng
* @Date 2020/10/27
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result addApply(TokenDto tokenDto, ActApplyInfoFormDTO dto);
/**
* @Description 审核记录
* @Author songyunpeng
* @Date 2020/10/27
* @Param [actApplyRecordFormDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.activity.result.ActApplyRecordResultDTO>>
**/
Result<List<ActApplyRecordResultDTO>> applyRecord(TokenDto userDetail,ActApplyRecordFormDTO actApplyRecordFormDTO);
/**
* @Description 活动详情
* @Author songyunpeng
* @Date 2020/10/27
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.activity.result.ActApplyDetailResultDTO>
**/
Result<ActApplyDetailResultDTO> applyActDetail(String id);
}

49
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java

@ -1,6 +1,13 @@
package com.elink.esua.epdc.service.impl;
import com.elink.esua.epdc.activity.form.ActApplyInfoFormDTO;
import com.elink.esua.epdc.activity.form.ActApplyRecordFormDTO;
import com.elink.esua.epdc.activity.result.ActApplyDetailResultDTO;
import com.elink.esua.epdc.activity.result.ActApplyRecordResultDTO;
import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.ParentAndAllDeptDTO;
import com.elink.esua.epdc.feign.AdminFeignClient;
import com.elink.esua.epdc.feign.AppVolunteerRankFeignClient;
import com.elink.esua.epdc.service.AppVolunteerRankService;
import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO;
@ -21,7 +28,8 @@ public class AppVolunteerRankServiceImpl implements AppVolunteerRankService {
@Autowired
private AppVolunteerRankFeignClient appVolunteerRankFeignClient;
@Autowired
private AdminFeignClient adminFeignClient;
/**
* 获取排行榜
* @Author wanggongfeng
@ -33,4 +41,43 @@ public class AppVolunteerRankServiceImpl implements AppVolunteerRankService {
return dataResult;
}
@Override
public Result addApply(TokenDto userDetail, ActApplyInfoFormDTO dto) {
if (null == userDetail.getUserId()) {
return new Result().error("获取用户信息失败");
}
//获取所有上级机构名称和ID拼接
Result<ParentAndAllDeptDTO> dtoResult = adminFeignClient.getParentAndAllDept(userDetail.getGridId());
ParentAndAllDeptDTO deptDTO = dtoResult.getData();
// 父所有部门
dto.setParentDeptIds(deptDTO.getParentDeptIds());
dto.setParentDeptNames(deptDTO.getParentDeptNames());
// 所有部门
dto.setAllDeptIds(deptDTO.getAllDeptIds());
dto.setAllDeptNames(deptDTO.getAllDeptNames());
// 网格
dto.setGrid(deptDTO.getGrid());
dto.setGridId(deptDTO.getGridId());
dto.setMobile(userDetail.getMobile());
dto.setFaceImg(userDetail.getFaceImg());
dto.setRealName(userDetail.getRealName());
dto.setNickname(userDetail.getNickname());
dto.setApplyUserId(userDetail.getUserId());
return appVolunteerRankFeignClient.addApply(dto);
}
@Override
public Result<List<ActApplyRecordResultDTO>> applyRecord(TokenDto userDetail,ActApplyRecordFormDTO actApplyRecordFormDTO) {
if (null == userDetail.getUserId()) {
return new Result().error("获取用户信息失败");
}
actApplyRecordFormDTO.setUserId(userDetail.getUserId());
return appVolunteerRankFeignClient.applyRecord(actApplyRecordFormDTO);
}
@Override
public Result<ActApplyDetailResultDTO> applyActDetail(String id) {
return appVolunteerRankFeignClient.applyActDetail(id);
}
}

177
esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActApplyInfoDTO.java

@ -0,0 +1,177 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.activity;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 活动申请信息表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@Data
public class ActApplyInfoDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 申请人ID
*/
private String applyUserId;
/**
* 申请人昵称
*/
private String nickname;
/**
* 申请人头像
*/
private String faceImg;
/**
* 申请人手机号
*/
private String mobile;
/**
* 申请人真实姓名
*/
private String realName;
/**
* 志愿服务标题
*/
private String actTitle;
/**
* 志愿服务内容
*/
private String actContent;
/**
* 地点
*/
private String actAddress;
/**
* 活动开始时间
*/
private Date actStartTime;
/**
* 活动结束时间
*/
private Date actEndTime;
/**
* 需要人数
*/
private Integer actPeopleNum;
/**
* 联系人
*/
private String actContacts;
/**
* 联系电话
*/
private String actTel;
/**
* 活动状态 0待审核 1审核通过 2审核不通过
*/
private String actStatus;
/**
* 不通过原因
*/
private String noPassReason;
/**
* 申请网格ID
*/
private Long gridId;
/**
* 网格名
*/
private String grid;
/**
* 父所有部门
*/
private String parentDeptIds;
/**
* 父所有部门
*/
private String parentDeptNames;
/**
* 所有部门ID
*/
private String allDeptIds;
/**
* 所有部门名称
*/
private String allDeptNames;
/**
* 删除标识 0未删除 1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

145
esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActApplyInfoFormDTO.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.elink.esua.epdc.activity.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;
/**
* 活动申请信息表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@Data
public class ActApplyInfoFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 申请人ID
*/
private String applyUserId;
/**
* 申请人昵称
*/
private String nickname;
/**
* 申请人头像
*/
private String faceImg;
/**
* 申请人手机号
*/
private String mobile;
/**
* 申请人真实姓名
*/
private String realName;
/**
* 志愿服务标题
*/
@NotBlank(message = "志愿服务标题不能为空")
@Size(min = 0,max = 40,message = "志愿服务标题在40字以内")
private String actTitle;
/**
* 志愿服务内容
*/
@NotBlank(message = "志愿服务内容不能为空")
@Size(min = 0,max = 500,message = "志愿服务内容在500字以内")
private String actContent;
/**
* 地点
*/
@NotBlank(message = "地点不能为空")
private String actAddress;
/**
* 活动开始时间
*/
@NotNull(message = "活动开始时间不能为空")
private Date actStartTime;
/**
* 活动结束时间
*/
@NotNull(message = "活动结束时间不能为空")
private Date actEndTime;
/**
* 需要人数
*/
@NotNull(message = "需要人数不能为空")
private Integer actPeopleNum;
/**
* 联系人
*/
@NotBlank(message = "联系人不能为空")
private String actContacts;
/**
* 联系电话
*/
@NotBlank(message = "联系电话不能为空")
@Size(min = 0,max = 20,message = "联系电话在20字以内")
private String actTel;
/**
* 申请网格ID
*/
private Long gridId;
/**
* 网格名
*/
private String grid;
/**
* 父所有部门
*/
private String parentDeptIds;
/**
* 父所有部门
*/
private String parentDeptNames;
/**
* 所有部门ID
*/
private String allDeptIds;
/**
* 所有部门名称
*/
private String allDeptNames;
}

33
esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActApplyRecordFormDTO.java

@ -0,0 +1,33 @@
package com.elink.esua.epdc.activity.form;
import lombok.Data;
import javax.validation.constraints.Min;
import java.io.Serializable;
/**
* 申请记录查询表单
*
* @author zhangyong
* @since v1.0.0 2020-05-20
*/
@Data
public class ActApplyRecordFormDTO implements Serializable {
private static final long serialVersionUID = 2379520294973498819L;
/**
* 用户ID
*/
private String userId;
/**
* 页码
*/
@Min(value = 1, message = "页码必须大于0")
private Integer pageIndex;
/**
* 页容量
*/
@Min(value = 1, message = "页容量必须大于0")
private Integer pageSize;
}

88
esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/result/ActApplyDetailResultDTO.java

@ -0,0 +1,88 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.activity.result;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 活动申请信息表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@Data
public class ActApplyDetailResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 志愿服务标题
*/
private String actTitle;
/**
* 志愿服务内容
*/
private String actContent;
/**
* 地点
*/
private String actAddress;
/**
* 活动开始时间
*/
private Date actStartTime;
/**
* 活动结束时间
*/
private Date actEndTime;
/**
* 需要人数
*/
private Integer actPeopleNum;
/**
* 联系人
*/
private String actContacts;
/**
* 联系电话
*/
private String actTel;
/**
* 活动状态 0待审核 1审核通过 2审核不通过
*/
private String actStatus;
/**
* 不通过原因
*/
private String noPassReason;
}

56
esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/result/ActApplyRecordResultDTO.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.elink.esua.epdc.activity.result;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 活动申请记录结果
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@Data
public class ActApplyRecordResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private String id;
/**
* 活动标题
*/
private String actTitle;
/**
* 活动申请时间
*/
private Date createdTime;
/**
* 审核状态
*/
private String actStatus;
}

158
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActApplyInfoController.java

@ -0,0 +1,158 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.activity.controller;
import com.elink.esua.epdc.activity.ActApplyInfoDTO;
import com.elink.esua.epdc.activity.form.ActApplyInfoFormDTO;
import com.elink.esua.epdc.activity.form.ActApplyRecordFormDTO;
import com.elink.esua.epdc.activity.result.ActApplyDetailResultDTO;
import com.elink.esua.epdc.activity.result.ActApplyRecordResultDTO;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.modules.activity.excel.ActApplyInfoExcel;
import com.elink.esua.epdc.modules.activity.service.ActApplyInfoService;
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 qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@RestController
@RequestMapping("actapplyinfo")
public class ActApplyInfoController {
@Autowired
private ActApplyInfoService actApplyInfoService;
@GetMapping("page")
public Result<PageData<ActApplyInfoDTO>> page(@RequestParam Map<String, Object> params){
PageData<ActApplyInfoDTO> page = actApplyInfoService.page(params);
return new Result<PageData<ActApplyInfoDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<ActApplyInfoDTO> get(@PathVariable("id") String id){
ActApplyInfoDTO data = actApplyInfoService.get(id);
return new Result<ActApplyInfoDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody ActApplyInfoDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
actApplyInfoService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody ActApplyInfoDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
actApplyInfoService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
actApplyInfoService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<ActApplyInfoDTO> list = actApplyInfoService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, ActApplyInfoExcel.class);
}
/**
* @Description 审核
* @Author songyunpeng
* @Date 2020/10/26
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@PostMapping("review")
public Result reviewApply(@RequestBody ActApplyInfoDTO dto){
return actApplyInfoService.reviewApply(dto);
}
/**
* @Description 我要申请
* @Author songyunpeng
* @Date 2020/10/26
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@PostMapping("addApply")
public Result addApply(@RequestBody ActApplyInfoFormDTO dto){
return actApplyInfoService.addApply(dto);
}
/**
* @Description 活动申请记录
* @Author songyunpeng
* @Date 2020/10/26
* @Param [userId]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.activity.result.ActApplyRecordResultDTO>
**/
@GetMapping("applyRecord")
public Result<List<ActApplyRecordResultDTO>> applyRecord(@RequestBody ActApplyRecordFormDTO actApplyRecordFormDTO){
return actApplyInfoService.applyRecord(actApplyRecordFormDTO);
}
/**
* @Description 活动详情
* @Author songyunpeng
* @Date 2020/10/26
* @Param [id]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.activity.result.ActApplyDetailResultDTO>
**/
@GetMapping("applyActDetail/{id}")
public Result<ActApplyDetailResultDTO> applyActDetail(@PathVariable String id){
ActApplyDetailResultDTO actApplyDetailResultDTO = ConvertUtils.sourceToTarget(actApplyInfoService.get(id), ActApplyDetailResultDTO.class);
switch(actApplyDetailResultDTO.getActStatus()){
case "0":
actApplyDetailResultDTO.setActStatus("待审核");
break;
case "1":
actApplyDetailResultDTO.setActStatus("审核通过");
break;
case "2":
actApplyDetailResultDTO.setActStatus("审核不通过");
break;
default:
actApplyDetailResultDTO.setActStatus("");
break;
}
return new Result<ActApplyDetailResultDTO>().ok(actApplyDetailResultDTO);
}
}

4
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActUserRelationController.java

@ -101,8 +101,8 @@ public class ActUserRelationController {
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
String fileName = "报名人员-" + formatter.format(currentTime);
PageData<ActUserRelationResultDTO> page = actUserRelationService.getActUserRelationPageFromPC(params);
List<ActUserRelationResultDTO> list = formatConversion(page.getList());
List<ActUserRelationResultDTO> page = actUserRelationService.exportActUserRelationListPC(params);
List<ActUserRelationResultDTO> list = formatConversion(page);
ExcelUtils.exportExcelToTarget(response, fileName, list, ActUserRelationExcel.class);
}

44
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActApplyInfoDao.java

@ -0,0 +1,44 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.activity.dao;
import com.elink.esua.epdc.activity.form.ActApplyRecordFormDTO;
import com.elink.esua.epdc.activity.result.ActApplyRecordResultDTO;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.modules.activity.entity.ActApplyInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 活动申请信息表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@Mapper
public interface ActApplyInfoDao extends BaseDao<ActApplyInfoEntity> {
/**
* @Description 查询活动申请记录
* @Author songyunpeng
* @Date 2020/10/26
* @Param [actApplyRecordFormDTO]
* @return java.util.List<com.elink.esua.epdc.activity.result.ActApplyRecordResultDTO>
**/
List<ActApplyRecordResultDTO> selectListActApplyRecord(ActApplyRecordFormDTO actApplyRecordFormDTO);
}

145
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActApplyInfoEntity.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.elink.esua.epdc.modules.activity.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 活动申请信息表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("epdc_act_apply_info")
public class ActApplyInfoEntity extends BaseEpdcEntity {
private static final long serialVersionUID = 1L;
/**
* 申请人ID
*/
private String applyUserId;
/**
* 申请人昵称
*/
private String nickname;
/**
* 申请人头像
*/
private String faceImg;
/**
* 申请人手机号
*/
private String mobile;
/**
* 申请人真实姓名
*/
private String realName;
/**
* 志愿服务标题
*/
private String actTitle;
/**
* 志愿服务内容
*/
private String actContent;
/**
* 地点
*/
private String actAddress;
/**
* 活动开始时间
*/
private Date actStartTime;
/**
* 活动结束时间
*/
private Date actEndTime;
/**
* 需要人数
*/
private Integer actPeopleNum;
/**
* 联系人
*/
private String actContacts;
/**
* 联系电话
*/
private String actTel;
/**
* 活动状态 0待审核 1审核通过 2审核不通过
*/
private String actStatus;
/**
* 不通过原因
*/
private String noPassReason;
/**
* 申请网格ID
*/
private Long gridId;
/**
* 网格名
*/
private String grid;
/**
* 父所有部门
*/
private String parentDeptIds;
/**
* 父所有部门
*/
private String parentDeptNames;
/**
* 所有部门ID
*/
private String allDeptIds;
/**
* 所有部门名称
*/
private String allDeptNames;
}

107
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/excel/ActApplyInfoExcel.java

@ -0,0 +1,107 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.activity.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 活动申请信息表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@Data
public class ActApplyInfoExcel {
@Excel(name = "主键")
private String id;
@Excel(name = "申请人ID")
private String applyUserId;
@Excel(name = "志愿服务标题")
private String actTitle;
@Excel(name = "志愿服务内容")
private String actContent;
@Excel(name = "地点")
private String actAddress;
@Excel(name = "活动开始时间")
private Date actStartTime;
@Excel(name = "活动结束时间")
private Date actEndTime;
@Excel(name = "需要人数")
private Integer actPeopleNum;
@Excel(name = "联系人")
private String actContacts;
@Excel(name = "联系电话")
private String actTel;
@Excel(name = "活动状态 0:待审核 1:审核通过 2:审核不通过")
private String actStatus;
@Excel(name = "不通过原因")
private String noPassReason;
@Excel(name = "申请网格ID")
private String gridId;
@Excel(name = "网格名")
private String grid;
@Excel(name = "父所有部门")
private String parentDeptIds;
@Excel(name = "父所有部门")
private String parentDeptNames;
@Excel(name = "所有部门ID")
private String allDeptIds;
@Excel(name = "所有部门名称")
private String allDeptNames;
@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;
}

47
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/redis/ActApplyInfoRedis.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.elink.esua.epdc.modules.activity.redis;
import com.elink.esua.epdc.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 活动申请信息表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@Component
public class ActApplyInfoRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

123
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActApplyInfoService.java

@ -0,0 +1,123 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.activity.service;
import com.elink.esua.epdc.activity.ActApplyInfoDTO;
import com.elink.esua.epdc.activity.form.ActApplyInfoFormDTO;
import com.elink.esua.epdc.activity.form.ActApplyRecordFormDTO;
import com.elink.esua.epdc.activity.result.ActApplyRecordResultDTO;
import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.modules.activity.entity.ActApplyInfoEntity;
import java.util.List;
import java.util.Map;
/**
* 活动申请信息表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
public interface ActApplyInfoService extends BaseService<ActApplyInfoEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<ActApplyInfoDTO>
* @author generator
* @date 2020-10-22
*/
PageData<ActApplyInfoDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<ActApplyInfoDTO>
* @author generator
* @date 2020-10-22
*/
List<ActApplyInfoDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return ActApplyInfoDTO
* @author generator
* @date 2020-10-22
*/
ActApplyInfoDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2020-10-22
*/
void save(ActApplyInfoDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2020-10-22
*/
void update(ActApplyInfoDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2020-10-22
*/
void delete(String[] ids);
/**
* @Description 审核
* @Author songyunpeng
* @Date 2020/10/26
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result reviewApply(ActApplyInfoDTO dto);
/**
* @Description 我要申请
* @Author songyunpeng
* @Date 2020/10/26
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result addApply(ActApplyInfoFormDTO dto);
/**
* @Description 活动申请记录
* @Author songyunpeng
* @Date 2020/10/26
* @Param [userId]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.activity.result.ActApplyRecordResultDTO>
**/
Result<List<ActApplyRecordResultDTO>> applyRecord(ActApplyRecordFormDTO actApplyRecordFormDTO);
}

8
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActUserRelationService.java

@ -166,4 +166,12 @@ public interface ActUserRelationService extends BaseService<ActUserRelationEntit
*/
Result updateAuditDefaultStatus(String actId);
/**
* 根据查询条件将首页展示的 活动报名人员信息导出(不分页)
* @param params
* @return java.util.List<com.elink.esua.epdc.activity.result.ActUserRelationResultDTO>
* @Author zhangyong
* @Date 14:26 2020-10-29
**/
List<ActUserRelationResultDTO> exportActUserRelationListPC(Map<String, Object> params);
}

146
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActApplyInfoServiceImpl.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.elink.esua.epdc.modules.activity.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.elink.esua.epdc.activity.ActApplyInfoDTO;
import com.elink.esua.epdc.activity.form.ActApplyInfoFormDTO;
import com.elink.esua.epdc.activity.form.ActApplyRecordFormDTO;
import com.elink.esua.epdc.activity.result.ActApplyRecordResultDTO;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.commons.tools.constant.NumConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.modules.activity.dao.ActApplyInfoDao;
import com.elink.esua.epdc.modules.activity.entity.ActApplyInfoEntity;
import com.elink.esua.epdc.modules.activity.redis.ActApplyInfoRedis;
import com.elink.esua.epdc.modules.activity.service.ActApplyInfoService;
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.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 活动申请信息表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-10-22
*/
@Service
public class ActApplyInfoServiceImpl extends BaseServiceImpl<ActApplyInfoDao, ActApplyInfoEntity> implements ActApplyInfoService {
@Autowired
private ActApplyInfoRedis actApplyInfoRedis;
@Override
public PageData<ActApplyInfoDTO> page(Map<String, Object> params) {
IPage<ActApplyInfoEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, ActApplyInfoDTO.class);
}
@Override
public List<ActApplyInfoDTO> list(Map<String, Object> params) {
List<ActApplyInfoEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, ActApplyInfoDTO.class);
}
private QueryWrapper<ActApplyInfoEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<ActApplyInfoEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public ActApplyInfoDTO get(String id) {
ActApplyInfoEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, ActApplyInfoDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(ActApplyInfoDTO dto) {
ActApplyInfoEntity entity = ConvertUtils.sourceToTarget(dto, ActApplyInfoEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(ActApplyInfoDTO dto) {
ActApplyInfoEntity entity = ConvertUtils.sourceToTarget(dto, ActApplyInfoEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
public Result reviewApply(ActApplyInfoDTO dto) {
if("2".equals(dto.getActStatus()) && "".equals(dto.getNoPassReason())){
return new Result().error("请填写不通过理由!");
}
ActApplyInfoEntity entity = ConvertUtils.sourceToTarget(dto, ActApplyInfoEntity.class);
updateById(entity);
return new Result();
}
@Override
public Result addApply(ActApplyInfoFormDTO dto) {
if(dto.getActStartTime().before(new Date())){
return new Result().error("开始时间不能小于当前时间");
}
if(dto.getActStartTime().getTime() == dto.getActEndTime().getTime()){
return new Result().error("开始时间不能等于结束时间");
}
if(dto.getActStartTime().after(dto.getActEndTime())){
return new Result().error("开始时间不能大于结束时间");
}
ActApplyInfoEntity entity = ConvertUtils.sourceToTarget(dto, ActApplyInfoEntity.class);
insert(entity);
return new Result();
}
@Override
public Result<List<ActApplyRecordResultDTO>> applyRecord(ActApplyRecordFormDTO actApplyRecordFormDTO) {
int pageIndex = (actApplyRecordFormDTO.getPageIndex() - NumConstant.ONE) * actApplyRecordFormDTO.getPageSize();
actApplyRecordFormDTO.setPageIndex(pageIndex);
List<ActApplyRecordResultDTO> actApplyRecordResultDTOS = this.baseDao.selectListActApplyRecord(actApplyRecordFormDTO);
return new Result<List<ActApplyRecordResultDTO>>().ok(actApplyRecordResultDTOS);
}
}

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

@ -499,6 +499,11 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl<ActUserRelationD
return new Result().ok("该活动对已报名的志愿者自动审核成功");
}
@Override
public List<ActUserRelationResultDTO> exportActUserRelationListPC(Map<String, Object> params) {
return baseDao.getActUserRelationPageFromPC(params);
}
//自动审核 定时任务 消息通知
private void sendNotice(ActUserRelationDTO actUserRelationDTO, String actUserDefaultState, ActInfoDTO actInfoDTO) {
EpdcInformationFormDTO informationFormDTO = new EpdcInformationFormDTO();

47
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActApplyInfoDao.xml

@ -0,0 +1,47 @@
<?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.elink.esua.epdc.modules.activity.dao.ActApplyInfoDao">
<resultMap type="com.elink.esua.epdc.modules.activity.entity.ActApplyInfoEntity" id="actApplyInfoMap">
<result property="id" column="ID"/>
<result property="applyUserId" column="APPLY_USER_ID"/>
<result property="mobile" column="MOBILE"/>
<result property="faceImg" column="FACE_IMG"/>
<result property="realName" column="REAL_NAME"/>
<result property="nickname" column="NICKNAME"/>
<result property="actTitle" column="ACT_TITLE"/>
<result property="actContent" column="ACT_CONTENT"/>
<result property="actAddress" column="ACT_ADDRESS"/>
<result property="actStartTime" column="ACT_START_TIME"/>
<result property="actEndTime" column="ACT_END_TIME"/>
<result property="actPeopleNum" column="ACT_PEOPLE_NUM"/>
<result property="actContacts" column="ACT_CONTACTS"/>
<result property="actTel" column="ACT_TEL"/>
<result property="actStatus" column="ACT_STATUS"/>
<result property="noPassReason" column="NO_PASS_REASON"/>
<result property="gridId" column="GRID_ID"/>
<result property="grid" column="GRID"/>
<result property="parentDeptIds" column="PARENT_DEPT_IDS"/>
<result property="parentDeptNames" column="PARENT_DEPT_NAMES"/>
<result property="allDeptIds" column="ALL_DEPT_IDS"/>
<result property="allDeptNames" column="ALL_DEPT_NAMES"/>
<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="selectListActApplyRecord"
resultType="com.elink.esua.epdc.activity.result.ActApplyRecordResultDTO">
select ID,ACT_TITLE,CREATED_TIME,
ACT_STATUS
from epdc_act_apply_info
where APPLY_USER_ID = #{userId}
order by CREATED_TIME desc
LIMIT #{pageIndex},#{pageSize}
</select>
</mapper>

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

@ -144,8 +144,8 @@ public class VolunteerInfoController {
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
String fileName = "志愿者-" + formatter.format(currentTime);
PageData<VolunteerInfoDTO> page = volunteerInfoService.volunteerInfo(params);
List<VolunteerInfoDTO> list = formatConversion(page.getList());
List<VolunteerInfoDTO> page = volunteerInfoService.exportVolunteerList(params);
List<VolunteerInfoDTO> list = formatConversion(page);
ExcelUtils.exportExcelToTarget(response, fileName, list, VolunteerInfoExcel.class);
}

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

@ -239,11 +239,20 @@ public interface VolunteerInfoService extends BaseService<VolunteerInfoEntity> {
Result<Integer> insertV2VolunteerInfo(EpdcCompleteVolunteerInfoV2FormDTO formDTO);
/**
* @Description 更新公益时长
* @Description 更新公益时长
* @Author songyunpeng
* @Date 2020/9/11
* @Param [formDto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result updateKindnessTime(EpdcVolunteerKindnessTimeUpdateFormDTO formDto);
/**
* 根据查询条件将首页展示的 志愿者列表信息导出(不分页)
* @param params
* @return java.util.List<com.elink.esua.epdc.dto.VolunteerInfoDTO>
* @Author zhangyong
* @Date 14:18 2020-10-29
**/
List<VolunteerInfoDTO> exportVolunteerList(Map<String, Object> params);
}

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

@ -447,4 +447,16 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao,
baseDao.updateKindnessTime(formDto);
return new Result();
}
@Override
public List<VolunteerInfoDTO> exportVolunteerList(Map<String, Object> params) {
String streetId = MapUtil.getStr(params, "streetId");
String communityId = MapUtil.getStr(params, "communityId");
String deptId = StringUtils.isNotBlank(streetId) ? streetId :
StringUtils.isNotBlank(communityId) ? communityId : MapUtil.getStr(params, "gridId");
params.put("deptId", deptId);
return baseDao.volunteerInfoList(params);
}
}

Loading…
Cancel
Save