| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.google.common.base.Joiner; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenMicroListDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishFeedbackVO; |
| | |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishVO; |
| | | import com.panzhihua.common.model.vos.community.TodoEventsVO; |
| | | import com.panzhihua.common.model.vos.community.screen.work.MicroListVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserVO; |
| | | import com.panzhihua.common.utlis.SensitiveUtil; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.ComActMicroWishDAO; |
| | | import com.panzhihua.service_community.dao.ComActMicroWishFeedbackMapper; |
| | | import com.panzhihua.service_community.dao.ComActMicroWishOperationRecordMapper; |
| | |
| | | } |
| | | } |
| | | comActMicroWishVO1.setSponsorPhone(SensitiveUtil.desensitizedPhoneNumber(comActMicroWishVO1.getSponsorPhone())); |
| | | //查询处理人 |
| | | comActMicroWishVO1.setResponsibleName(this.getWishHandleName(comActMicroWishVO1.getHandleId())); |
| | | }); |
| | | iPage.setRecords(records); |
| | | } |
| | |
| | | if(!idList.isEmpty()){ |
| | | comActMicroWishVO.setIdList(idList); |
| | | } |
| | | //查询处理人 |
| | | comActMicroWishVO.setResponsibleName(this.getWishHandleName(comActMicroWishVO.getHandleId())); |
| | | return R.ok(comActMicroWishVO); |
| | | } |
| | | |
| | |
| | | comActMicroWishDO.setResponsibleId(responsibleId); |
| | | comActMicroWishDO.setStatus(3);//进行中 |
| | | comActMicroWishDO.setForm(1); |
| | | if(comActMicroWishVO.getHandleIds() != null && comActMicroWishVO.getHandleIds().size() > 0){ |
| | | comActMicroWishDO.setHandleId(Joiner.on(",").join(comActMicroWishVO.getHandleIds())); |
| | | } |
| | | //添加操作记录 |
| | | comActMicroWishOperationRecordDO.setType(ComActMicroWishOperationRecordDO.type.fp); |
| | | comActMicroWishOperationRecordDO.setContent("分配心愿"); |
| | |
| | | comActMicroWishDO.setResponsibleId(responsibleId); |
| | | comActMicroWishDO.setStatus(3);//待确认 |
| | | comActMicroWishDO.setForm(2); |
| | | if(comActMicroWishVO.getHandleIds() != null && comActMicroWishVO.getHandleIds().size() > 0){ |
| | | comActMicroWishDO.setHandleId(Joiner.on(",").join(comActMicroWishVO.getHandleIds())); |
| | | } |
| | | //添加操作记录 |
| | | comActMicroWishOperationRecordDO.setType(ComActMicroWishOperationRecordDO.type.fp); |
| | | comActMicroWishOperationRecordDO.setContent("分配心愿"); |
| | |
| | | } |
| | | return R.ok(microListVOIPage); |
| | | } |
| | | |
| | | /** |
| | | * 微心愿处理人列表 |
| | | * @param communityId 社区id |
| | | * @param type 处理人类型(1.后台用户 2.党员 3.志愿者) |
| | | * @return 处理人列表 |
| | | */ |
| | | @Override |
| | | public R wishHandleListAdmin(Long communityId,Integer type){ |
| | | return R.ok(comActMicroWishDAO.getWishHandleListAdmin(type,communityId)); |
| | | } |
| | | |
| | | /** |
| | | * 拼接处理人 |
| | | * @param handleId 处理人id字符串 |
| | | * @return 处理人名称 |
| | | */ |
| | | private String getWishHandleName(String handleId){ |
| | | StringBuffer sb = new StringBuffer(); |
| | | if(StringUtils.isNotEmpty(handleId)){ |
| | | String []handleIds = handleId.split(","); |
| | | if(handleIds.length > 0){ |
| | | for (String id : handleIds) { |
| | | SysUserVO user = comActMicroWishDAO.getUserByUserId(Long.parseLong(id)); |
| | | if(user != null){ |
| | | if(user.getType().equals(SysUserVO.type.xcx)){ |
| | | if(user.getIsPartymember().equals(SysUserVO.isOk.yes)){ |
| | | sb.append(user.getName() + "(党员),"); |
| | | }else if(user.getIsVolunteer().equals(SysUserVO.isOk.yes)){ |
| | | sb.append(user.getName() + "(志愿者),"); |
| | | }else{ |
| | | sb.append(user.getName()); |
| | | } |
| | | }else if(user.getType().equals(SysUserVO.type.sqht)){ |
| | | sb.append(user.getName() + "(后台用户),"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | String result = sb.toString(); |
| | | if(result.length() > 0){ |
| | | result = result.substring(0,result.length()-1); |
| | | } |
| | | return result; |
| | | } |
| | | } |