|
|
@ -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<com.epmet.dto.result.work.AuditingActUserResultDTO> |
|
|
@ -48,13 +48,13 @@ public class WorkActUserServiceImpl implements WorkActUserService { |
|
|
|
public List<AuditingActUserResultDTO> getAuditingList(AuditingActUserFormDTO formDTO) { |
|
|
|
List<AuditingActUserResultDTO> list=new ArrayList<>(); |
|
|
|
//查询出待审核的人员列表
|
|
|
|
List<ActUserRelationDTO> actUserRelationDTOList=actUserRelationService.getAuditingUserList(formDTO.getActId()); |
|
|
|
List<ActUserRelationDTO> 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<String> userIdList=actUserRelationService.getAuditingUserIds(formDTO.getActId()); |
|
|
|
List<String> userIdList=actUserRelationService.getUserIdList(formDTO.getActId(), ActConstant.ACT_USER_STATUS_AUDITING); |
|
|
|
//根据待审核的人员集合,查询出用户基本信息
|
|
|
|
List<UserBaseInfoResultDTO> userInfoList=this.queryUserBaseInfo(userIdList); |
|
|
|
for(ActUserRelationDTO actUserRelationDTO:actUserRelationDTOList){ |
|
|
@ -90,13 +90,13 @@ public class WorkActUserServiceImpl implements WorkActUserService { |
|
|
|
public List<PassedActUserResultDTO> getPassedList(AuditingActUserFormDTO formDTO) { |
|
|
|
List<PassedActUserResultDTO> resultList=new ArrayList<>(); |
|
|
|
//查询已通过的人员列表
|
|
|
|
List<ActUserRelationDTO> actUserRelationDTOList=actUserRelationService.getPassedList(formDTO.getActId()); |
|
|
|
List<ActUserRelationDTO> 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<String> userIdList=actUserRelationService.getPassedListUserIds(formDTO.getActId()); |
|
|
|
List<String> userIdList=actUserRelationService.getUserIdList(formDTO.getActId(), ActConstant.ACT_USER_STATUS_PASSED); |
|
|
|
//根据已通过的人员集合,查询出用户基本信息
|
|
|
|
List<UserBaseInfoResultDTO> userInfoList=this.queryUserBaseInfo(userIdList); |
|
|
|
for(ActUserRelationDTO actUserRelationDTO:actUserRelationDTOList){ |
|
|
@ -133,13 +133,13 @@ public class WorkActUserServiceImpl implements WorkActUserService { |
|
|
|
public List<RejectedActUserResultDTO> getRejectedlist(AuditingActUserFormDTO formDTO) { |
|
|
|
List<RejectedActUserResultDTO> resultList=new ArrayList<>(); |
|
|
|
//查询已拒绝的人员列表
|
|
|
|
List<ActUserRelationDTO> actUserRelationDTOList=actUserRelationService.getRejectedList(formDTO.getActId()); |
|
|
|
List<ActUserRelationDTO> 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<String> userIdList=actUserRelationService.getRejectedListUserIds(formDTO.getActId()); |
|
|
|
List<String> userIdList=actUserRelationService.getUserIdList(formDTO.getActId(), ActConstant.ACT_USER_STATUS_REFUSED); |
|
|
|
//根据已拒绝的人员集合,查询出用户基本信息
|
|
|
|
List<UserBaseInfoResultDTO> userInfoList=this.queryUserBaseInfo(userIdList); |
|
|
|
for(ActUserRelationDTO actUserRelationDTO:actUserRelationDTOList){ |
|
|
@ -177,13 +177,13 @@ public class WorkActUserServiceImpl implements WorkActUserService { |
|
|
|
public List<CanceledActUserResultDTO> getCanceledList(AuditingActUserFormDTO formDTO) { |
|
|
|
List<CanceledActUserResultDTO> resultList=new ArrayList<>(); |
|
|
|
//查询已取消的人员列表
|
|
|
|
List<ActUserRelationDTO> actUserRelationDTOList=actUserRelationService.getRejectedList(formDTO.getActId()); |
|
|
|
List<ActUserRelationDTO> 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<String> userIdList=actUserRelationService.getRejectedListUserIds(formDTO.getActId()); |
|
|
|
List<String> userIdList=actUserRelationService.getUserIdList(formDTO.getActId(), ActConstant.ACT_USER_STATUS_CANCELD); |
|
|
|
//根据已取消的人员集合,查询出用户基本信息
|
|
|
|
List<UserBaseInfoResultDTO> 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 : 不是志愿者
|
|
|
|