|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.metadata.IPage; | 
|---|
|  |  |  | import com.doumee.api.BaseController; | 
|---|
|  |  |  | import com.doumee.config.annotation.LoginNoRequired; | 
|---|
|  |  |  | import com.doumee.core.annotation.trace.Trace; | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.model.LoginUserInfo; | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.core.utils.DateUtil; | 
|---|
|  |  |  | import com.doumee.dao.admin.request.BusinessOverDTO; | 
|---|
|  |  |  | import com.doumee.dao.business.model.Bookings; | 
|---|
|  |  |  | import com.doumee.dao.system.vo.UserResponse; | 
|---|
|  |  |  | import com.doumee.dao.web.request.BookingsRequest; | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.doumee.dao.web.response.MeetingDetailResponse; | 
|---|
|  |  |  | import com.doumee.dao.web.response.MeetingListResponse; | 
|---|
|  |  |  | import com.doumee.dao.web.response.MonthDataResponse; | 
|---|
|  |  |  | import com.doumee.dao.web.response.RoomDetailResponse; | 
|---|
|  |  |  | import com.doumee.service.business.BookingsService; | 
|---|
|  |  |  | import com.doumee.service.system.SystemUserService; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiImplicitParams({ | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "id", value = "会议主键", required = true), | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public ApiResponse<MeetingDetailResponse> meetingDetail(@RequestParam Integer id) { | 
|---|
|  |  |  | return ApiResponse.success("查询成功", bookingsService.getMeetingDetail(id)); | 
|---|
|  |  |  | public ApiResponse<MeetingDetailResponse> meetingDetail(@RequestParam Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | return ApiResponse.success("查询成功", bookingsService.getMeetingDetail(id,getLoginUser(token).getId())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("取消会议预约") | 
|---|
|  |  |  | @GetMapping("/reservationCancel") | 
|---|
|  |  |  | @ApiImplicitParams({ | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "id", value = "会议主键", required = true), | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public ApiResponse reservationCancel(@RequestParam Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | @PostMapping("/reservationCancel") | 
|---|
|  |  |  | public ApiResponse reservationCancel(@RequestBody BusinessOverDTO businessOverDTO,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | LoginUserInfo user = getLoginUser(token); | 
|---|
|  |  |  | bookingsService.reservationCancel(id,user.getId()); | 
|---|
|  |  |  | businessOverDTO.setUserId(user.getId()); | 
|---|
|  |  |  | bookingsService.reservationCancel(businessOverDTO); | 
|---|
|  |  |  | return ApiResponse.success("操作成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("提前结束会议") | 
|---|
|  |  |  | @PostMapping("/reservationOver") | 
|---|
|  |  |  | public ApiResponse reservationOver(@RequestBody BusinessOverDTO businessOverDTO,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | LoginUserInfo user = getLoginUser(token); | 
|---|
|  |  |  | businessOverDTO.setUserId(user.getId()); | 
|---|
|  |  |  | bookingsService.reservationOver(businessOverDTO); | 
|---|
|  |  |  | return ApiResponse.success("操作成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("提前开始会议") | 
|---|
|  |  |  | @PostMapping("/startEarly") | 
|---|
|  |  |  | public ApiResponse startEarly(@RequestBody BusinessOverDTO businessOverDTO,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | LoginUserInfo user = getLoginUser(token); | 
|---|
|  |  |  | businessOverDTO.setUserId(user.getId()); | 
|---|
|  |  |  | businessOverDTO.setStartType(Constants.ZERO); | 
|---|
|  |  |  | bookingsService.startEarly(businessOverDTO); | 
|---|
|  |  |  | return ApiResponse.success("操作成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("开始会议") | 
|---|
|  |  |  | @PostMapping("/start") | 
|---|
|  |  |  | public ApiResponse start(@RequestBody BusinessOverDTO businessOverDTO,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | LoginUserInfo user = getLoginUser(token); | 
|---|
|  |  |  | businessOverDTO.setUserId(user.getId()); | 
|---|
|  |  |  | businessOverDTO.setStartType(Constants.ONE); | 
|---|
|  |  |  | bookingsService.start(businessOverDTO); | 
|---|
|  |  |  | return ApiResponse.success("操作成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @LoginNoRequired | 
|---|
|  |  |  | @ApiOperation("会议屏信息") | 
|---|
|  |  |  | @GetMapping("/meetScreenData") | 
|---|
|  |  |  | @ApiImplicitParams({ | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "roomId", value = "会议室主键", required = true), | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public ApiResponse<RoomDetailResponse> meetScreenData(@RequestParam Integer roomId) { | 
|---|
|  |  |  | return ApiResponse.success("查询成功",bookingsService.getRoomDetail(roomId)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|