From 995837f5abaf84d5852647264c6e3f69d24ca83f Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 22 Jul 2020 18:35:11 +0800 Subject: [PATCH] =?UTF-8?q?heart-work:=E6=8A=A5=E5=90=8D=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?-=E6=A6=82=E8=A6=81=E7=BB=9F=E8=AE=A1v1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/work/ActSignUpStatResultDTO.java | 61 +++++++++++++++++++ .../java/com/epmet/constant/ActConstant.java | 20 ++++++ .../controller/WorkActUserController.java | 20 ++++-- .../main/java/com/epmet/dao/ActInfoDao.java | 10 +++ .../com/epmet/dao/ActUserRelationDao.java | 49 ++++----------- .../java/com/epmet/entity/ActInfoEntity.java | 2 +- .../epmet/service/ActUserRelationService.java | 43 +++---------- .../com/epmet/service/WorkActUserService.java | 14 +++-- .../impl/ActUserRelationServiceImpl.java | 56 ++++------------- .../service/impl/WorkActUserServiceImpl.java | 57 +++++++++++++---- .../src/main/resources/mapper/ActInfoDao.xml | 13 ++++ .../resources/mapper/ActUserRelationDao.xml | 57 +++-------------- epmet-user/epmet-user-server/pom.xml | 2 +- 13 files changed, 219 insertions(+), 185 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActSignUpStatResultDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActSignUpStatResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActSignUpStatResultDTO.java new file mode 100644 index 0000000000..960af1c3b5 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActSignUpStatResultDTO.java @@ -0,0 +1,61 @@ +package com.epmet.dto.result.work; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 报名审核-概要统计 返参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2020/7/22 16:44 + */ +@Data +public class ActSignUpStatResultDTO implements Serializable { + private static final long serialVersionUID = 3218353394763939617L; + /** + * 活动id + */ + private String actId; + /** + * 活动标题 + */ + private String title; + /** + * true:固定名额 false: 不限制名额 + */ + private Boolean actQuotaCategory; + /** + * 活动名额 + */ + private Integer actQuota; + + + + + /** + * 剩余报名名额 + */ + private Integer residueNum; + /** + * 待审核总人数 + */ + private Integer auditingNum; + /** + * 已通过总人数 + */ + private Integer passedNum; + /** + * 已拒绝总人数 + */ + private Integer refusedNum; + /** + * 已取消总人数 + */ + private Integer canceledNum; + + /** + * 已报名(待审核+已通过) + */ + private Integer totalSignUp; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActConstant.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActConstant.java index 0ee7df0ae7..5b6016b8b1 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActConstant.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActConstant.java @@ -67,4 +67,24 @@ public interface ActConstant { * 活动操作日志:重新发布活动 */ String ACT_OPER_TYPE_UPDATE="update"; + + /** + * (1)act_user_relation表的status:已报名/待审核auditing, + */ + String ACT_USER_STATUS_AUDITING="auditing"; + + /** + * (2)act_user_relation表的status:审核通过passed, + */ + String ACT_USER_STATUS_PASSED="passed"; + + /** + * (3)act_user_relation表的status:审核不通过refused + */ + String ACT_USER_STATUS_REFUSED="refused"; + + /** + * (4)act_user_relation表的status:取消报名canceld, + */ + String ACT_USER_STATUS_CANCELD="canceld"; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActUserController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActUserController.java index a67c5f4459..78e5f52ce4 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActUserController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActUserController.java @@ -3,10 +3,7 @@ package com.epmet.controller; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.work.AuditingActUserFormDTO; -import com.epmet.dto.result.work.AuditingActUserResultDTO; -import com.epmet.dto.result.work.CanceledActUserResultDTO; -import com.epmet.dto.result.work.PassedActUserResultDTO; -import com.epmet.dto.result.work.RejectedActUserResultDTO; +import com.epmet.dto.result.work.*; import com.epmet.service.WorkActUserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; @@ -85,4 +82,19 @@ public class WorkActUserController { List list=workActUserService.getCanceledList(formDTO); return new Result>().ok(list); } + + /** + * @return com.epmet.commons.tools.utils.Result + * @param formDTO + * @author yinzuomei + * @description 报名审核-概要统计 + * @Date 2020/7/22 16:43 + **/ + @PostMapping("signupstat") + public Result getActSignUpStat(@RequestBody AuditingActUserFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, AuditingActUserFormDTO.AddUserInternalGroup.class); + ActSignUpStatResultDTO resultDTO=workActUserService.getActSignUpStat(formDTO.getActId()); + return new Result().ok(resultDTO); + } + } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java index ddd1dc1088..dfe34da353 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java @@ -23,6 +23,7 @@ import com.epmet.dto.form.resi.ResiActBaseFormDTO; import com.epmet.dto.form.resi.ResiLatestActFormDTO; import com.epmet.dto.form.resi.ResiMyActFormDTO; import com.epmet.dto.result.resi.*; +import com.epmet.dto.result.work.ActSignUpStatResultDTO; import com.epmet.entity.ActInfoEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -174,4 +175,13 @@ public interface ActInfoDao extends BaseDao { * @Date 17:39 2020-07-20 **/ ActInfoDTO queryActAccordingToActIdAndUserId(@Param("actId") String actId, @Param("userId") String userId); + + /** + * @return com.epmet.dto.result.work.ActSignUpStatResultDTO + * @param actId + * @author yinzuomei + * @description 报名审核-概要统计:活动基本信息 + * @Date 2020/7/22 17:08 + **/ + ActSignUpStatResultDTO getActSignUpStat(String actId); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActUserRelationDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActUserRelationDao.java index 1aa248d4d3..facb735601 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActUserRelationDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActUserRelationDao.java @@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.ActUserRelationDTO; import com.epmet.entity.ActUserRelationEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -34,56 +35,30 @@ import java.util.List; public interface ActUserRelationDao extends BaseDao { /** - * @return java.util.List * @param actId 活动id + * @return java.util.List * @author yinzuomei - * @description 根据活动id,查询待审核人员关系记录 + * @description 根据活动id,当前状态(已报名/待审核auditing,审核通过passed,审核不通过refused取消报名canceld,)查询待审核人员关系记录 * @Date 2020/7/21 22:41 **/ - List selectAuditingUserList(String actId); + List selecUserList(@Param("actId") String actId,@Param("status") String status); /** - * @return java.util.List * @param actId 活动id - * @author yinzuomei - * @description 根据活动id,查询待审核人员,返回用户id集合 - * @Date 2020/7/21 22:45 - **/ - List selectAuditingUserIds(String actId); - - /** - * @return java.util.List - * @param actId - * @author yinzuomei - * @description 根据活动id,查询已通过人员关系记录 - * @Date 2020/7/22 15:33 - **/ - List selectPassedList(String actId); - - /** * @return java.util.List - * @param actId * @author yinzuomei - * @description 根据活动id,查询已通过人员,返回用户id集合 - * @Date 2020/7/22 15:38 - **/ - List selectPassedListUserIds(String actId); - - /** - * @return java.util.List - * @param actId - * @author yinzuomei - * @description 根据活动id,查询已拒绝人员关系记录 - * @Date 2020/7/22 16:20 + * @description 根据活动id,当前状态(已报名/待审核auditing,审核通过passed,审核不通过refused取消报名canceld,)返回用户id集合 + * @Date 2020/7/21 22:45 **/ - List selectRejectedList(String actId); + List selectUserIdList(@Param("actId") String actId,@Param("status") String status); /** - * @return java.util.List + * @return java.lang.Integer * @param actId + * @param status * @author yinzuomei - * @description 根据活动id,查询已拒绝人员,返回用户id集合 - * @Date 2020/7/22 16:20 + * @description 根据活动id, 用户状态,统计用户数eg:待审核总数,审核通过总数,已拒绝总数,已取消报名总数 + * @Date 2020/7/22 18:20 **/ - List selectRejectedListUserIds(String actId); + Integer selectCountUser(@Param("actId") String actId, @Param("status")String status); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActInfoEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActInfoEntity.java index 7681415b68..e227b29ed5 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActInfoEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActInfoEntity.java @@ -125,7 +125,7 @@ public class ActInfoEntity extends BaseEpmetEntity { private Integer signInRadius; /** - * 活动名额类型(0-不限名额,1-固定名额) + * 活动名额类型(0(false)-不限名额,1(true)-固定名额) */ private Boolean actQuotaCategory; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActUserRelationService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActUserRelationService.java index c96dcb9d94..a93a4936cd 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActUserRelationService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActUserRelationService.java @@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.ActUserRelationDTO; import com.epmet.entity.ActUserRelationEntity; +import org.apache.ibatis.annotations.Param; import java.util.List; import java.util.Map; @@ -96,54 +97,30 @@ public interface ActUserRelationService extends BaseService * @param actId + * @param status 当前状态(已报名/待审核auditing,审核通过passed,审核不通过refused取消报名canceld,) * @author yinzuomei * @description 根据活动id,查询待审核人员关系记录 * @Date 2020/7/21 22:40 **/ - List getAuditingUserList(String actId); + List getUserList(@Param("actId") String actId,@Param("status") String status); /** * @return java.util.List * @param actId + * @param status 当前状态(已报名/待审核auditing,审核通过passed,审核不通过refused取消报名canceld,) * @author yinzuomei * @description 根据活动id,查询待审核人员,返回用户id集合 * @Date 2020/7/21 22:44 **/ - List getAuditingUserIds(String actId); + List getUserIdList(@Param("actId") String actId,@Param("status")String status); /** - * @return java.util.List - * @param actId - * @author yinzuomei - * @description 查询已通过的人员列表 - * @Date 2020/7/22 15:31 - **/ - List getPassedList(String actId); - - /** - * @return java.util.List - * @param actId - * @author yinzuomei - * @description 查询已通过的人员列表 userId集合 - * @Date 2020/7/22 15:37 - **/ - List getPassedListUserIds(String actId); - - /** - * @return java.util.List - * @param actId - * @author yinzuomei - * @description 查询已拒绝过的人员列表 - * @Date 2020/7/22 16:19 - **/ - List getRejectedList(String actId); - - /** - * @return java.util.List + * @return java.lang.Integer * @param actId + * @param status * @author yinzuomei - * @description 查询已拒绝的人员列表 userId集合 - * @Date 2020/7/22 16:19 + * @description 根据活动id,用户状态,统计用户数 + * @Date 2020/7/22 18:17 **/ - List getRejectedListUserIds(String actId); + Integer selectCountUser(@Param("actId") String actId, @Param("status") String status); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActUserService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActUserService.java index c319566125..82b846a23a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActUserService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActUserService.java @@ -1,10 +1,7 @@ package com.epmet.service; import com.epmet.dto.form.work.AuditingActUserFormDTO; -import com.epmet.dto.result.work.AuditingActUserResultDTO; -import com.epmet.dto.result.work.CanceledActUserResultDTO; -import com.epmet.dto.result.work.PassedActUserResultDTO; -import com.epmet.dto.result.work.RejectedActUserResultDTO; +import com.epmet.dto.result.work.*; import java.util.List; @@ -50,4 +47,13 @@ public interface WorkActUserService { * @Date 2020/7/22 16:35 **/ List getCanceledList(AuditingActUserFormDTO formDTO); + + /** + * @return com.epmet.dto.result.work.ActSignUpStatResultDTO + * @param actId + * @author yinzuomei + * @description 报名审核-概要统计 + * @Date 2020/7/22 17:02 + **/ + ActSignUpStatResultDTO getActSignUpStat(String actId); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActUserRelationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActUserRelationServiceImpl.java index 516b0fa31d..06cb2f96ed 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActUserRelationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActUserRelationServiceImpl.java @@ -103,74 +103,42 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl - * @author yinzuomei - * @description 根据活动id,查询待审核人员关系记录 - * @Date 2020/7/21 22:40 - **/ - @Override - public List getAuditingUserList(String actId) { - return baseDao.selectAuditingUserList(actId); - } - - /** - * @param actId - * @return java.util.List - * @author yinzuomei - * @description 根据活动id,查询待审核人员,返回用户id集合 - * @Date 2020/7/21 22:44 - **/ - @Override - public List getAuditingUserIds(String actId) { - return baseDao.selectAuditingUserIds(actId); - } - - /** - * @param actId + * @param status 当前状态(已报名/待审核auditing,审核通过passed,审核不通过refused取消报名canceld,) * @return java.util.List * @author yinzuomei * @description 查询已通过的人员列表 * @Date 2020/7/22 15:31 **/ @Override - public List getPassedList(String actId) { - return baseDao.selectPassedList(actId); + public List getUserList(String actId, String status) { + return baseDao.selecUserList(actId, status); } /** * @param actId + * @param status 当前状态(已报名/待审核auditing,审核通过passed,审核不通过refused取消报名canceld,) * @return java.util.List * @author yinzuomei * @description 查询已通过的人员列表 userId集合 * @Date 2020/7/22 15:37 **/ @Override - public List getPassedListUserIds(String actId) { - return baseDao.selectPassedListUserIds(actId); + public List getUserIdList(String actId, String status) { + return baseDao.selectUserIdList(actId, status); } /** * @param actId - * @return java.util.List + * @param status + * @return java.lang.Integer * @author yinzuomei - * @description 查询已拒绝过的人员列表 - * @Date 2020/7/22 16:19 + * @description 根据活动id, 用户状态,统计用户数eg:待审核总数,审核通过总数,已拒绝总数,已取消报名总数 + * @Date 2020/7/22 18:17 **/ @Override - public List getRejectedList(String actId) { - return baseDao.selectRejectedList(actId); + public Integer selectCountUser(String actId, String status) { + return baseDao.selectCountUser(actId, status); } - /** - * @param actId - * @return java.util.List - * @author yinzuomei - * @description 查询已拒绝的人员列表 userId集合 - * @Date 2020/7/22 16:19 - **/ - @Override - public List getRejectedListUserIds(String actId) { - return baseDao.selectRejectedListUserIds(actId); - } } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java index bb4d0c546e..a28beae020 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java @@ -1,14 +1,13 @@ package com.epmet.service.impl; import com.epmet.commons.tools.utils.Result; +import com.epmet.constant.ActConstant; +import com.epmet.dao.ActInfoDao; import com.epmet.dto.ActUserRelationDTO; import com.epmet.dto.HeartUserInfoDTO; import com.epmet.dto.form.work.AuditingActUserFormDTO; import com.epmet.dto.result.UserBaseInfoResultDTO; -import com.epmet.dto.result.work.AuditingActUserResultDTO; -import com.epmet.dto.result.work.CanceledActUserResultDTO; -import com.epmet.dto.result.work.PassedActUserResultDTO; -import com.epmet.dto.result.work.RejectedActUserResultDTO; +import com.epmet.dto.result.work.*; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.service.ActUserRelationService; import com.epmet.service.HeartUserInfoService; @@ -36,7 +35,8 @@ public class WorkActUserServiceImpl implements WorkActUserService { private HeartUserInfoService heartUserInfoService; @Autowired private EpmetUserOpenFeignClient epmetUserOpenFeignClient; - + @Autowired + private ActInfoDao actInfoDao; /** * @param formDTO * @return java.util.List @@ -48,13 +48,13 @@ public class WorkActUserServiceImpl implements WorkActUserService { public List getAuditingList(AuditingActUserFormDTO formDTO) { List list=new ArrayList<>(); //查询出待审核的人员列表 - List actUserRelationDTOList=actUserRelationService.getAuditingUserList(formDTO.getActId()); + List actUserRelationDTOList=actUserRelationService.getUserList(formDTO.getActId(), ActConstant.ACT_USER_STATUS_AUDITING); if(null==actUserRelationDTOList||actUserRelationDTOList.size()==0){ logger.info(String.format("当前活动,actId=%s待审核列表为空",formDTO.getActId())); return list; } //查询出待审核的人员id集合 - List userIdList=actUserRelationService.getAuditingUserIds(formDTO.getActId()); + List userIdList=actUserRelationService.getUserIdList(formDTO.getActId(), ActConstant.ACT_USER_STATUS_AUDITING); //根据待审核的人员集合,查询出用户基本信息 List userInfoList=this.queryUserBaseInfo(userIdList); for(ActUserRelationDTO actUserRelationDTO:actUserRelationDTOList){ @@ -90,13 +90,13 @@ public class WorkActUserServiceImpl implements WorkActUserService { public List getPassedList(AuditingActUserFormDTO formDTO) { List resultList=new ArrayList<>(); //查询已通过的人员列表 - List actUserRelationDTOList=actUserRelationService.getPassedList(formDTO.getActId()); + List actUserRelationDTOList=actUserRelationService.getUserList(formDTO.getActId(), ActConstant.ACT_USER_STATUS_PASSED); if(null==actUserRelationDTOList||actUserRelationDTOList.size()==0){ logger.info(String.format("当前活动,actId=%s已通过列表为空",formDTO.getActId())); return resultList; } //查询已通过审核的人员id集合 - List userIdList=actUserRelationService.getPassedListUserIds(formDTO.getActId()); + List userIdList=actUserRelationService.getUserIdList(formDTO.getActId(), ActConstant.ACT_USER_STATUS_PASSED); //根据已通过的人员集合,查询出用户基本信息 List userInfoList=this.queryUserBaseInfo(userIdList); for(ActUserRelationDTO actUserRelationDTO:actUserRelationDTOList){ @@ -133,13 +133,13 @@ public class WorkActUserServiceImpl implements WorkActUserService { public List getRejectedlist(AuditingActUserFormDTO formDTO) { List resultList=new ArrayList<>(); //查询已拒绝的人员列表 - List actUserRelationDTOList=actUserRelationService.getRejectedList(formDTO.getActId()); + List actUserRelationDTOList=actUserRelationService.getUserList(formDTO.getActId(), ActConstant.ACT_USER_STATUS_REFUSED); if(null==actUserRelationDTOList||actUserRelationDTOList.size()==0){ logger.info(String.format("当前活动,actId=%s已拒绝列表为空",formDTO.getActId())); return resultList; } //查询已拒绝审核的人员id集合 - List userIdList=actUserRelationService.getRejectedListUserIds(formDTO.getActId()); + List userIdList=actUserRelationService.getUserIdList(formDTO.getActId(), ActConstant.ACT_USER_STATUS_REFUSED); //根据已拒绝的人员集合,查询出用户基本信息 List userInfoList=this.queryUserBaseInfo(userIdList); for(ActUserRelationDTO actUserRelationDTO:actUserRelationDTOList){ @@ -177,13 +177,13 @@ public class WorkActUserServiceImpl implements WorkActUserService { public List getCanceledList(AuditingActUserFormDTO formDTO) { List resultList=new ArrayList<>(); //查询已取消的人员列表 - List actUserRelationDTOList=actUserRelationService.getRejectedList(formDTO.getActId()); + List actUserRelationDTOList=actUserRelationService.getUserList(formDTO.getActId(), ActConstant.ACT_USER_STATUS_CANCELD); if(null==actUserRelationDTOList||actUserRelationDTOList.size()==0){ logger.info(String.format("当前活动,actId=%s已取消报名列表为空",formDTO.getActId())); return resultList; } //查询已取消审核的人员id集合 - List userIdList=actUserRelationService.getRejectedListUserIds(formDTO.getActId()); + List userIdList=actUserRelationService.getUserIdList(formDTO.getActId(), ActConstant.ACT_USER_STATUS_CANCELD); //根据已取消的人员集合,查询出用户基本信息 List userInfoList=this.queryUserBaseInfo(userIdList); for(ActUserRelationDTO actUserRelationDTO:actUserRelationDTOList){ @@ -210,6 +210,37 @@ public class WorkActUserServiceImpl implements WorkActUserService { return resultList; } + /** + * @param actId + * @return com.epmet.dto.result.work.ActSignUpStatResultDTO + * @author yinzuomei + * @description 报名审核-概要统计 + * @Date 2020/7/22 17:02 + **/ + @Override + public ActSignUpStatResultDTO getActSignUpStat(String actId) { + ActSignUpStatResultDTO actInfo=actInfoDao.getActSignUpStat(actId); + if(null!=actInfo){ + //待审核总人数 + actInfo.setAuditingNum(actUserRelationService.selectCountUser(actId,ActConstant.ACT_USER_STATUS_AUDITING)); + //已通过总人数 + actInfo.setPassedNum(actUserRelationService.selectCountUser(actId,ActConstant.ACT_USER_STATUS_PASSED)); + //已拒绝总人数 + actInfo.setRefusedNum(actUserRelationService.selectCountUser(actId,ActConstant.ACT_USER_STATUS_REFUSED)); + //已取消总人数 + actInfo.setCanceledNum(actUserRelationService.selectCountUser(actId,ActConstant.ACT_USER_STATUS_CANCELD)); + //true:固定名额 false: 不限制名额 + if(actInfo.getActQuotaCategory()){ + Integer totalSignUp=actInfo.getAuditingNum()+actInfo.getPassedNum(); + actInfo.setTotalSignUp(totalSignUp); + //剩余报名名额 + Integer residueNum=actInfo.getActQuota()-totalSignUp; + actInfo.setResidueNum(residueNum); + } + } + return actInfo; + } + private Boolean getVolunteerFlag(String userId) { HeartUserInfoDTO heartUserInfoDTO=heartUserInfoService.getByUserId(userId); //true: 是志愿者 false : 不是志愿者 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml index bf0d043bf6..3f9eb4a072 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml @@ -362,4 +362,17 @@ AND i.ID = #{actId} AND u.USER_ID = #{userId} + + diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActUserRelationDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActUserRelationDao.xml index 17beff7a83..f7531ff65a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActUserRelationDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActUserRelationDao.xml @@ -25,79 +25,40 @@ - - SELECT aur.* FROM act_user_relation aur WHERE aur.DEL_FLAG = '0' - AND aur.`STATUS` = 'auditing' + AND aur.`STATUS` = #{status} AND aur.ACT_ID = #{actId} order by aur.CREATED_TIME desc - - SELECT distinct aur.USER_ID as userIds FROM act_user_relation aur WHERE aur.DEL_FLAG = '0' - AND aur.`STATUS` = 'auditing' + AND aur.`STATUS` =#{status} AND aur.ACT_ID = #{actId} order by aur.CREATED_TIME desc - - - - - - - - - SELECT - distinct aur.USER_ID as userIds + COUNT(1) AS TOTAL FROM act_user_relation aur WHERE aur.DEL_FLAG = '0' - AND aur.`STATUS` = 'refused' + AND aur.`STATUS` =#{status} AND aur.ACT_ID = #{actId} - order by aur.AUDIT_TIME desc \ No newline at end of file diff --git a/epmet-user/epmet-user-server/pom.xml b/epmet-user/epmet-user-server/pom.xml index 2c3f938f56..3d8b415889 100644 --- a/epmet-user/epmet-user-server/pom.xml +++ b/epmet-user/epmet-user-server/pom.xml @@ -137,7 +137,7 @@ 6379 123456 - true + false 122.152.200.70:8848 fcd6fc8f-ca3a-4b01-8026-2b05cdc5976b