|  |  |  | 
|---|
|  |  |  | import com.doumee.dao.business.join.*; | 
|---|
|  |  |  | import com.doumee.dao.business.model.*; | 
|---|
|  |  |  | import com.doumee.dao.business.vo.RoomStatisticsVo; | 
|---|
|  |  |  | import com.doumee.dao.system.MultifileMapper; | 
|---|
|  |  |  | import com.doumee.dao.system.SystemUserMapper; | 
|---|
|  |  |  | import com.doumee.dao.system.dto.UserStatisticsDTO; | 
|---|
|  |  |  | import com.doumee.dao.system.join.NoticesJoinMapper; | 
|---|
|  |  |  | import com.doumee.dao.system.model.Notices; | 
|---|
|  |  |  | import com.doumee.dao.system.model.SystemDepartment; | 
|---|
|  |  |  | import com.doumee.dao.system.model.SystemDepartmentUser; | 
|---|
|  |  |  | import com.doumee.dao.system.model.SystemUser; | 
|---|
|  |  |  | import com.doumee.dao.system.model.*; | 
|---|
|  |  |  | import com.doumee.dao.system.vo.UserStatisticsVo; | 
|---|
|  |  |  | import com.doumee.dao.web.request.BookingsRequest; | 
|---|
|  |  |  | import com.doumee.dao.web.request.MeetingPageRequest; | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.doumee.service.business.BookingsService; | 
|---|
|  |  |  | import com.doumee.service.business.DevicesService; | 
|---|
|  |  |  | import com.doumee.service.business.ProjectsService; | 
|---|
|  |  |  | import com.doumee.service.system.NoticesService; | 
|---|
|  |  |  | import com.doumee.service.system.SystemUserService; | 
|---|
|  |  |  | import com.github.yulichang.wrapper.MPJLambdaWrapper; | 
|---|
|  |  |  | import org.apache.commons.lang3.StringUtils; | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void deleteById(Integer id) { | 
|---|
|  |  |  | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); | 
|---|
|  |  |  | public void deleteById(Integer id,LoginUserInfo user) { | 
|---|
|  |  |  | Bookings bookings = new Bookings(); | 
|---|
|  |  |  | bookings.setId(id); | 
|---|
|  |  |  | bookings.setIsdeleted(MeetConstants.ONE); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void delete(Bookings bookings) { | 
|---|
|  |  |  | public void delete(Bookings bookings,LoginUserInfo user) { | 
|---|
|  |  |  | UpdateWrapper<Bookings> deleteWrapper = new UpdateWrapper<>(bookings); | 
|---|
|  |  |  | bookingsMapper.delete(deleteWrapper); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void deleteByIdInBatch(List<Integer> ids) { | 
|---|
|  |  |  | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); | 
|---|
|  |  |  | public void deleteByIdInBatch(List<Integer> ids,LoginUserInfo user) { | 
|---|
|  |  |  | if (CollectionUtils.isEmpty(ids)) { | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | if(dbBookings.getStatus().equals(MeetConstants.ONE)){ | 
|---|
|  |  |  | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "本次操作失败,预约状态已流转"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | LoginUserInfo user = new LoginUserInfo(); | 
|---|
|  |  |  | user.setId(bookings.getCreator()); | 
|---|
|  |  |  | LoginUserInfo user = bookings.getLoginUserInfo(); | 
|---|
|  |  |  | isCreateParamValid(bookings, user); | 
|---|
|  |  |  | bookings.setEditDate(new Date()); | 
|---|
|  |  |  | bookings.setEditor(user.getId()); | 
|---|
|  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void cancelById(Bookings bs) { | 
|---|
|  |  |  | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); | 
|---|
|  |  |  | if(user == null){ | 
|---|
|  |  |  | user = bs.getLoginUserInfo(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | /* | 
|---|
|  |  |  | if(Objects.isNull(bookings)||bookings.getId()==null){ | 
|---|
|  |  |  | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), ResponseStatus.BAD_REQUEST.getMessage()); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | queryWrapper.orderByDesc(Bookings::getCreateDate); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String path = systemDictDataBiz.queryByCode(MeetConstants.SYSTEM, MeetConstants.FILE_DIR).getCode() + systemDictDataBiz.queryByCode(MeetConstants.OSS, MeetConstants.PROJECTS).getCode(); | 
|---|
|  |  |  | String path = systemDictDataBiz.queryByCode(MeetConstants.FTP, MeetConstants.FTP_RESOURCE_PATH).getCode() + systemDictDataBiz.queryByCode(MeetConstants.FTP, MeetConstants.PROJECTS).getCode(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | SimpleDateFormat format = new SimpleDateFormat("MM-dd HH:mm"); | 
|---|
|  |  |  | SimpleDateFormat format1 = new SimpleDateFormat("HH:mm"); | 
|---|
|  |  |  | 
|---|
|  |  |  | queryWrapper.orderByDesc(Bookings::getCreateDate); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //        String path = systemDictDataBiz.queryByCode(MeetConstants.OSS, MeetConstants.RESOURCE_PATH).getCode() + systemDictDataBiz.queryByCode(MeetConstants.OSS, MeetConstants.PROJECTS).getCode(); | 
|---|
|  |  |  | String path = systemDictDataBiz.queryByCode(MeetConstants.SYSTEM, MeetConstants.FILE_DIR).getCode() + systemDictDataBiz.queryByCode(MeetConstants.OSS, MeetConstants.PROJECTS).getCode(); | 
|---|
|  |  |  | String path = systemDictDataBiz.queryByCode(MeetConstants.FTP, MeetConstants.FTP_RESOURCE_PATH).getCode() + systemDictDataBiz.queryByCode(MeetConstants.FTP, MeetConstants.PROJECTS).getCode(); | 
|---|
|  |  |  | Bookings result = bookingsJoinMapper.selectOne(queryWrapper.last("limit 1")); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (result != null) { | 
|---|
|  |  |  | 
|---|
|  |  |  | .orderByDesc(!Objects.isNull(pageWrap.getModel().getStatus())&&pageWrap.getModel().getStatus().equals(MeetConstants.TWO),"a.START_TIME") | 
|---|
|  |  |  | .orderByAsc(Objects.isNull(pageWrap.getModel().getStatus())||pageWrap.getModel().getStatus().equals(MeetConstants.ONE),"a.START_TIME") | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | String prefixUrl = systemDictDataBiz.queryByCode(MeetConstants.SYSTEM, MeetConstants.FILE_DIR).getCode() + systemDictDataBiz.queryByCode(MeetConstants.OSS, MeetConstants.PROJECTS).getCode(); | 
|---|
|  |  |  | ; | 
|---|
|  |  |  | String path = systemDictDataBiz.queryByCode(MeetConstants.FTP, MeetConstants.FTP_RESOURCE_PATH).getCode() + systemDictDataBiz.queryByCode(MeetConstants.FTP, MeetConstants.PROJECTS).getCode(); | 
|---|
|  |  |  | page.getRecords().forEach(i -> { | 
|---|
|  |  |  | i.setPrefixUrl(prefixUrl); | 
|---|
|  |  |  | i.setPrefixUrl(path); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | return page; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | //参会人员列表 | 
|---|
|  |  |  | SystemUser param = new SystemUser(); | 
|---|
|  |  |  | List<SystemUser> userResponseList = systemUserService.findList(param); | 
|---|
|  |  |  | String avatarPath = systemDictDataBiz.queryByCode(MeetConstants.SYSTEM, MeetConstants.FILE_DIR).getCode() + systemDictDataBiz.queryByCode(MeetConstants.OSS, MeetConstants.PROJECTS).getCode(); | 
|---|
|  |  |  | String avatarPath = systemDictDataBiz.queryByCode(MeetConstants.FTP, MeetConstants.FTP_RESOURCE_PATH).getCode() + systemDictDataBiz.queryByCode(MeetConstants.FTP, MeetConstants.MEMBER_IMG).getCode(); | 
|---|
|  |  |  | userResponseList.forEach(i -> { | 
|---|
|  |  |  | if(StringUtils.isNotBlank(i.getAvatar())){ | 
|---|
|  |  |  | i.setAvatar(avatarPath+i.getAvatar()); | 
|---|
|  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | meetingDetailResponse.setUserResponseList(userResponseList); | 
|---|
|  |  |  | //服务项 | 
|---|
|  |  |  | String projectsPath = systemDictDataBiz.queryByCode(MeetConstants.SYSTEM, MeetConstants.FILE_DIR).getCode() + systemDictDataBiz.queryByCode(MeetConstants.OSS, MeetConstants.PROJECTS).getCode(); | 
|---|
|  |  |  | String projectsPath = systemDictDataBiz.queryByCode(MeetConstants.FTP, MeetConstants.FTP_RESOURCE_PATH).getCode() + systemDictDataBiz.queryByCode(MeetConstants.FTP, MeetConstants.PROJECTS).getCode(); | 
|---|
|  |  |  | List<ProjectsResponse> projectsResponseList = projectsService.getProjectsList(id, MeetConstants.ONE); | 
|---|
|  |  |  | projectsResponseList.forEach(i -> { | 
|---|
|  |  |  | i.setPrefixUrl(projectsPath); | 
|---|
|  |  |  | 
|---|
|  |  |  | .eq("ISDELETED",MeetConstants.ZERO) | 
|---|
|  |  |  | .eq("SEND_NOTICE", MeetConstants.ZERO) | 
|---|
|  |  |  | .apply(" now() >= SUBDATE(START_TIME,interval + " + minute + " minute) ") | 
|---|
|  |  |  | .apply(" ROOM_ID in ( select r.id from rooms r where r.ISDELETED = 0 and r.STATUS = 0  )") | 
|---|
|  |  |  | .apply(" ROOM_ID in ( select r.id from meeting_rooms r where r.ISDELETED = 0 and r.STATUS = 0  )") | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | for (Bookings bookings : bookingsList) { | 
|---|
|  |  |  | bookings.setSendNotice(MeetConstants.ONE); | 
|---|