package com.usky.meeting.service;

import com.alibaba.fastjson.JSONObject;
import com.usky.common.core.bean.CommonPage;
import com.usky.meeting.controller.web.SignOnOutRequestVO;
import com.usky.meeting.domain.MeetingInfo;
import com.usky.common.mybatis.core.CrudService;
import com.usky.meeting.service.dto.DmMeetingDto;
import com.usky.meeting.service.dto.DmMeetingDtoV2;
import com.usky.meeting.service.vo.MeetingInfoRequestVO;
import com.usky.meeting.service.vo.MyMeetingInfoRequestVO;
import org.springframework.data.repository.query.Param;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.text.ParseException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 会议表(预约成功) 服务类
 * </p>
 *
 * @author zyj
 * @since 2024-03-08
 */
public interface MeetingInfoService extends CrudService<MeetingInfo> {

    /**
     * 获取当日会议预约数量
     * @return  Map<String,Object>
     */
    Map<String,Object> meetingSummary(Integer tenantId);

    /**
     * 获取当年会议预约数量
     * @return  Map<String,Object>
     */
    Map<String,Object> meetingSummaryByYear(String year, Integer tenantId);


    JSONObject getMeetingRoomUsageByDayV2(Long roomId, String dayTime, Integer tenantId) throws ParseException;

    /**
     * 获取当月会议室得使用情况
     * @param roomId 会议室id
     * @param monthTime 获取会议室情况得日期
     * @return  JSONArray
     */
    List<Integer> getMeetingRoomUsageByMonth(Long roomId, String monthTime, Integer tenantId) throws ParseException;

    DmMeetingDto add(DmMeetingDto resources);

    CommonPage<MeetingInfo> meetingInfoList(MeetingInfoRequestVO requestVO);

    void cancel(Long meetingId);

    CommonPage<MeetingInfo> myMeetingList(MyMeetingInfoRequestVO requestVO);

    List<Map<String,Object>> meetingSignList(Long meetingId);

    void signOnOut(SignOnOutRequestVO requestVO);

    void updateMeetingInfoStatus();
}
