|
|
@ -22,13 +22,17 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
import com.epmet.commons.tools.constant.MqConstant; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
|
import com.epmet.commons.tools.dto.form.mq.MqBaseMsgDTO; |
|
|
|
import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg; |
|
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
|
import com.epmet.commons.tools.enums.EventEnum; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.redis.RedisKeys; |
|
|
|
import com.epmet.commons.tools.redis.RedisUtils; |
|
|
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
@ -231,10 +235,29 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao, |
|
|
|
return volunteerInfoDTO; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* pc指派需求给志愿者时,根据工作人员登录的组织,显示组织下的志愿者。 |
|
|
|
* |
|
|
|
* @param customerId |
|
|
|
* @param staffId |
|
|
|
* @param userRealName |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<OptionDTO> queryListVolunteer(String customerId, String userRealName) { |
|
|
|
public List<OptionDTO> queryListVolunteer(String customerId, String staffId,String userRealName) { |
|
|
|
CustomerStaffInfoCacheResult staffInfo=CustomerStaffRedis.getStaffInfo(customerId,staffId); |
|
|
|
if (null == staffInfo) { |
|
|
|
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "查询工作人员信息异常"); |
|
|
|
} |
|
|
|
// 如果是根级组织的工作人员,agencyPids="";正常是以英文冒号隔开
|
|
|
|
String pids=""; |
|
|
|
if(StringUtils.isBlank(staffInfo.getAgencyPIds())||NumConstant.ZERO_STR.equals(staffInfo.getAgencyPIds())){ |
|
|
|
pids=staffInfo.getAgencyId(); |
|
|
|
}else{ |
|
|
|
pids=staffInfo.getAgencyPIds().concat(StrConstant.COLON).concat(staffInfo.getAgencyId()); |
|
|
|
} |
|
|
|
List<OptionDTO> resultList = new ArrayList<>(); |
|
|
|
List<String> userIds = baseDao.selectVolunteerIds(customerId); |
|
|
|
List<String> userIds = baseDao.selectVolunteerByPids(customerId,pids); |
|
|
|
if (CollectionUtils.isEmpty(userIds)) { |
|
|
|
return resultList; |
|
|
|
} |
|
|
|