| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.shop.domain.dto.MerAgencyTaskPageDto; |
| | | import com.ruoyi.shop.domain.dto.MgtShopTaskPageDto; |
| | | import com.ruoyi.shop.domain.dto.StaffAgencyPageDto; |
| | | import com.ruoyi.shop.domain.pojo.task.AgencyTaskRecord; |
| | | import com.ruoyi.shop.domain.pojo.task.TaskFile; |
| | | import com.ruoyi.shop.domain.vo.MerAgencyTaskRecordPageVo; |
| | | import com.ruoyi.shop.domain.vo.MgtAgencyTaskRecordPageVo; |
| | | import com.ruoyi.shop.domain.vo.StaffAgencyTaskRecordPageVo; |
| | | import com.ruoyi.shop.mapper.task.AgencyTaskRecordMapper; |
| | | import com.ruoyi.shop.service.task.AgencyTaskRecordService; |
| | | import com.ruoyi.shop.service.task.TaskFileService; |
| | |
| | | } |
| | | return mgtAgencyTaskRecordPageVoList; |
| | | } |
| | | |
| | | /** |
| | | * @description 员工端分页获取经销商跟进任务记录列表 |
| | | * @author jqs |
| | | * @date 2023/7/14 19:24 |
| | | * @param page |
| | | * @param staffAgencyPageDto |
| | | * @return List<StaffAgencyTaskRecordPageVo> |
| | | */ |
| | | @Override |
| | | public List<StaffAgencyTaskRecordPageVo> pageStaffAgencyTaskRecord(Page page, StaffAgencyPageDto staffAgencyPageDto){ |
| | | List<StaffAgencyTaskRecordPageVo> agencyTaskRecordPageVoList = agencyTaskRecordMapper.pageStaffAgencyTaskRecord(page, staffAgencyPageDto); |
| | | if(agencyTaskRecordPageVoList!=null&&!agencyTaskRecordPageVoList.isEmpty()){ |
| | | Long followId; |
| | | List<TaskFile> taskFileList; |
| | | List<String> picture = new ArrayList<>(); |
| | | List<String> video = new ArrayList<>(); |
| | | List<String> audio = new ArrayList<>(); |
| | | Long userId; |
| | | SysUser sysUser; |
| | | for(StaffAgencyTaskRecordPageVo staffAgencyTaskRecordPageVo : agencyTaskRecordPageVoList){ |
| | | //获取任务用户信息 |
| | | userId = staffAgencyTaskRecordPageVo.getUserId(); |
| | | sysUser = remoteUserService.getSysUser(userId).getData(); |
| | | staffAgencyTaskRecordPageVo.setUserName(sysUser.getNickName()); |
| | | staffAgencyTaskRecordPageVo.setUserPicture(sysUser.getAvatar()); |
| | | //获取任务详情文件 |
| | | followId = staffAgencyTaskRecordPageVo.getFollowId(); |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,1); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | picture = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | } |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,2); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | video = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | } |
| | | taskFileList = taskFileService.listByFollowIdAndFollowType(followId,3); |
| | | if(taskFileList!=null&&!taskFileList.isEmpty()){ |
| | | audio = taskFileList.stream().map(k->k.getFileUrl()).collect(Collectors.toList()); |
| | | } |
| | | staffAgencyTaskRecordPageVo.setPicture(picture); |
| | | staffAgencyTaskRecordPageVo.setVideo(video); |
| | | staffAgencyTaskRecordPageVo.setAudio(audio); |
| | | } |
| | | } |
| | | |
| | | return agencyTaskRecordPageVoList; |
| | | } |
| | | |
| | | |
| | | } |