/**
   * @param terminalInfo
   * @param request
   * @param response
   * @param meetingType
   * @param excepts
   * @param appointmentStarttime
   * @param appointmentDuration
   * @return
   */
  @RequestMapping(params = "wetheruesedterminal")
  @ResponseBody
  public AjaxJson wetheruesedterminal(
      String id,
      String meetingType,
      String excepts,
      String appointmentStarttime,
      String appointmentDuration) {

    AjaxJson j = new AjaxJson();
    // 当前选择的终端分组可用
    message = "true";
    if (StringUtil.isNotEmpty(id)) {
      List<TerminalInfoEntity> terminals =
          terminalInfoService.getConflicts(
              id, meetingType, appointmentStarttime, appointmentDuration);
      if (null != terminals && terminals.size() > 0) {
        // 当前选择的终端分组不可用
        message = "false";
      }
    }
    j.setMsg(message);
    return j;
  }
  @RequestMapping(params = "whouesed")
  public ModelAndView whouesed(
      HttpServletRequest req,
      String id,
      String meetingType,
      String excepts,
      String appointmentStarttime,
      String appointmentDuration) {
    // 获取改组当中所有冲突的终端列表
    List<TerminalInfoEntity> terminals =
        terminalInfoService.getConflicts(
            id, meetingType, appointmentStarttime, appointmentDuration);
    // 直播会议
    if (SystemType.APP_MEETING_TYPE_1.equals(meetingType)) {
      List<MeetingInfoEntity> meetings = new ArrayList<MeetingInfoEntity>();
      for (TerminalInfoEntity t : terminals) {
        List<AuthGroupTerminalEntity> gts =
            systemService.findByProperty(AuthGroupTerminalEntity.class, "terminalid", t.getId());
        for (AuthGroupTerminalEntity agt : gts) {
          // 获取分组id
          String groupid = agt.getAuthid();
          if (StringUtil.isNotEmpty(groupid)) {
            List<AppointmentChannelInfoEntity> channels =
                systemService.findByProperty(
                    AppointmentChannelInfoEntity.class, "authortiyGroupCid", groupid);
            for (AppointmentChannelInfoEntity c : channels) {
              String meetingid = c.getMeetingid();
              MeetingInfoEntity meeting = systemService.get(MeetingInfoEntity.class, meetingid);
              if (null != meeting
                  && !meetings.contains(meeting)
                  && Integer.valueOf(SystemType.MEETING_STATE_4) != meeting.getMeetingstate()) {
                meetings.add(meeting);
              } else continue;
            }
          } else continue;
        }
      }
      req.setAttribute("conflictMeetings", meetings);

    } else if (SystemType.APP_MEETING_TYPE_3.equals(meetingType)
        && StringUtil.isNotEmpty(appointmentStarttime)
        && StringUtil.isNotEmpty(appointmentDuration)) { // 预约会议
      List<AppointmentMeetingInfoEntity> meetings = new ArrayList<AppointmentMeetingInfoEntity>();
      for (TerminalInfoEntity t : terminals) {
        List<AuthGroupTerminalEntity> gts =
            systemService.findByProperty(AuthGroupTerminalEntity.class, "terminalid", t.getId());
        for (AuthGroupTerminalEntity agt : gts) {
          // 获取分组id
          String groupid = agt.getAuthid();
          if (StringUtil.isNotEmpty(groupid)) {
            List<AppointmentChannelInfoEntity> channels =
                systemService.findByProperty(
                    AppointmentChannelInfoEntity.class, "authortiyGroupCid", groupid);
            for (AppointmentChannelInfoEntity c : channels) {
              String meetingid = c.getAppointmentid();
              AppointmentMeetingInfoEntity meeting =
                  systemService.get(AppointmentMeetingInfoEntity.class, meetingid);
              if (null != meeting && !meetings.contains(meeting)) {
                meetings.add(meeting);
              } else continue;
            }
          } else continue;
        }
      }
      req.setAttribute("conflictMeetings", meetings);
    }
    return new ModelAndView("vod/meetinginfo/conflictMeetingInfo");
  }