| | |
| | | import com.product.administration.service.ide.IConferenceManagerService; |
| | | import com.product.core.config.CoreConst; |
| | | import com.product.core.controller.support.AbstractBaseController; |
| | | import com.product.core.entity.DataTableEntity; |
| | | import com.product.core.entity.FieldSetEntity; |
| | | import com.product.core.entity.RequestParameterEntity; |
| | | import com.product.core.exception.BaseException; |
| | | import com.product.core.permission.PermissionService; |
| | | import com.product.module.sys.config.SystemErrorCode; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.OutputStream; |
| | | import java.text.DateFormat; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | |
| | | public String listConferenceRoom(HttpServletRequest request) { |
| | | try { |
| | | //获取参数 |
| | | FieldSetEntity fse = null; |
| | | Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA); |
| | | if (bean != null) { |
| | | RequestParameterEntity reqp = (RequestParameterEntity) bean; |
| | | fse = reqp.getFormData(); |
| | | } |
| | | //判断参数是否为空 |
| | | if (bean == null || fse == null) { |
| | | return this.error(com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getValue(), com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | // 判断表名是否正常 |
| | | if (fse.getTableName() == null || !CmnConst.PRODUCT_OA_CONFERENCE_ROOM_CONFIG.equals(fse.getTableName())) { |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request, CmnConst.PRODUCT_OA_CONFERENCE_ROOM_CONFIG); |
| | | // 判断分页参数是否正常 |
| | | if (StringUtils.isEmpty(fse.getString(CmnConst.PAGESIZE)) |
| | | || StringUtils.isEmpty(fse.getString(CmnConst.CPAGE))) { |
| | |
| | | public String findCconferenceRoom(HttpServletRequest request) { |
| | | try { |
| | | //获取参数 |
| | | FieldSetEntity fse = null; |
| | | Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA); |
| | | if (bean != null) { |
| | | RequestParameterEntity reqp = (RequestParameterEntity) bean; |
| | | fse = reqp.getFormData(); |
| | | } |
| | | //判断参数是否为空 |
| | | if (bean == null || fse == null) { |
| | | return this.error(com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getValue(), com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | // 判断表名是否正常 |
| | | if (fse.getTableName() == null || !CmnConst.PRODUCT_OA_CONFERENCE_ROOM_CONFIG.equals(fse.getTableName())) { |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request, CmnConst.PRODUCT_OA_CONFERENCE_ROOM_CONFIG); |
| | | // 判断uuid是否正常 |
| | | if (StringUtils.isEmpty(fse.getUUID())) { |
| | | return this.error(SystemCode.SYSTEM_FORM_COUNT.getValue(), SystemCode.SYSTEM_FORM_COUNT.getText()); |
| | |
| | | @ApiVersion(1) |
| | | public String saveCconferenceRoom(HttpServletRequest request) { |
| | | try { |
| | | //获取参数 |
| | | FieldSetEntity fse = null; |
| | | Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA); |
| | | if (bean != null) { |
| | | RequestParameterEntity reqp = (RequestParameterEntity) bean; |
| | | fse = reqp.getFormData(); |
| | | } |
| | | //判断参数是否为空 |
| | | if (bean == null || fse == null) { |
| | | return this.error(com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getValue(), com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | // 判断表名是否正常 |
| | | if (fse.getTableName() == null || !CmnConst.PRODUCT_OA_CONFERENCE_ROOM_CONFIG.equals(fse.getTableName())) { |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request, CmnConst.PRODUCT_OA_CONFERENCE_ROOM_CONFIG); |
| | | //数据操作的权限验证 |
| | | if (!permissionService.validDataPermission(fse, CoreConst.DATA_PERMISSION_VALID_TYPE_ORG)) { |
| | | return this.error(SystemErrorCode.SYSTEM_NOT_OPER_PERMISSION.getValue(), SystemErrorCode.SYSTEM_NOT_OPER_PERMISSION.getText()); |
| | |
| | | public String deleteCconferenceRoom(HttpServletRequest request) { |
| | | try { |
| | | //获取参数 |
| | | FieldSetEntity fse = null; |
| | | Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA); |
| | | if (bean != null) { |
| | | RequestParameterEntity reqp = (RequestParameterEntity) bean; |
| | | fse = reqp.getFormData(); |
| | | } |
| | | //判断参数是否为空 |
| | | if (bean == null || fse == null) { |
| | | return this.error(com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getValue(), com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | // 判断表名是否正常 |
| | | if (fse.getTableName() == null || !CmnConst.PRODUCT_OA_CONFERENCE_ROOM_CONFIG.equals(fse.getTableName())) { |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request, CmnConst.PRODUCT_OA_CONFERENCE_ROOM_CONFIG); |
| | | // 判断uuid是否正常 |
| | | if (StringUtils.isEmpty(fse.getUUID())) { |
| | | return this.error(SystemCode.SYSTEM_FORM_COUNT.getValue(), SystemCode.SYSTEM_FORM_COUNT.getText()); |
| | |
| | | |
| | | |
| | | /** |
| | | * 会议申请 |
| | | * 会议室申请 |
| | | * |
| | | * @param request |
| | | * @return |
| | |
| | | public String listConferenceApply(HttpServletRequest request) { |
| | | try { |
| | | //获取参数 |
| | | FieldSetEntity fse = null; |
| | | Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA); |
| | | if (bean != null) { |
| | | RequestParameterEntity reqp = (RequestParameterEntity) bean; |
| | | fse = reqp.getFormData(); |
| | | } |
| | | //判断参数是否为空 |
| | | if (bean == null || fse == null) { |
| | | return this.error(com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getValue(), com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | // 判断表名是否正常 |
| | | if (fse.getTableName() == null || !CmnConst.PRODUCT_OA_CONFERENCE_APPLY.equals(fse.getTableName())) { |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request, CmnConst.PRODUCT_OA_CONFERENCE_APPLY); |
| | | // 判断分页参数是否正常 |
| | | if (StringUtils.isEmpty(fse.getString(CmnConst.PAGESIZE)) |
| | | || StringUtils.isEmpty(fse.getString(CmnConst.CPAGE))) { |
| | |
| | | public String findCconferenceApply(HttpServletRequest request) { |
| | | try { |
| | | //获取参数 |
| | | FieldSetEntity fse = null; |
| | | Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA); |
| | | if (bean != null) { |
| | | RequestParameterEntity reqp = (RequestParameterEntity) bean; |
| | | fse = reqp.getFormData(); |
| | | } |
| | | //判断参数是否为空 |
| | | if (bean == null || fse == null) { |
| | | return this.error(com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getValue(), com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | // 判断表名是否正常 |
| | | if (fse.getTableName() == null || !CmnConst.PRODUCT_OA_CONFERENCE_APPLY.equals(fse.getTableName())) { |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request, CmnConst.PRODUCT_OA_CONFERENCE_APPLY); |
| | | // 判断uuid是否正常 |
| | | if (StringUtils.isEmpty(fse.getUUID())) { |
| | | return this.error(SystemCode.SYSTEM_FORM_COUNT.getValue(), SystemCode.SYSTEM_FORM_COUNT.getText()); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 会议室保存 |
| | | * 会议室申请保存 |
| | | * |
| | | * @param request |
| | | * @return |
| | |
| | | @ApiVersion(1) |
| | | public String saveCconferenceApply(HttpServletRequest request) { |
| | | try { |
| | | //获取参数 |
| | | FieldSetEntity fse = null; |
| | | Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA); |
| | | if (bean != null) { |
| | | RequestParameterEntity reqp = (RequestParameterEntity) bean; |
| | | fse = reqp.getFormData(); |
| | | } |
| | | //判断参数是否为空 |
| | | if (bean == null || fse == null) { |
| | | return this.error(com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getValue(), com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | // 判断表名是否正常 |
| | | if (fse.getTableName() == null || !CmnConst.PRODUCT_OA_CONFERENCE_APPLY.equals(fse.getTableName())) { |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request, CmnConst.PRODUCT_OA_CONFERENCE_APPLY); |
| | | //数据操作的权限验证 |
| | | if (!permissionService.validDataPermission(fse, CoreConst.DATA_PERMISSION_VALID_TYPE_ORG)) { |
| | | return this.error(SystemErrorCode.SYSTEM_NOT_OPER_PERMISSION.getValue(), SystemErrorCode.SYSTEM_NOT_OPER_PERMISSION.getText()); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 会议室删除 |
| | | * 会议室申请删除 |
| | | * |
| | | * @param request |
| | | * @return |
| | |
| | | @ApiVersion(1) |
| | | public String deleteCconferenceApply(HttpServletRequest request) { |
| | | try { |
| | | //获取参数 |
| | | FieldSetEntity fse = null; |
| | | Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA); |
| | | if (bean != null) { |
| | | RequestParameterEntity reqp = (RequestParameterEntity) bean; |
| | | fse = reqp.getFormData(); |
| | | } |
| | | //判断参数是否为空 |
| | | if (bean == null || fse == null) { |
| | | return this.error(com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getValue(), com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | // 判断表名是否正常 |
| | | if (fse.getTableName() == null || !CmnConst.PRODUCT_OA_CONFERENCE_APPLY.equals(fse.getTableName())) { |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request, CmnConst.PRODUCT_OA_CONFERENCE_APPLY); |
| | | // 判断uuid是否正常 |
| | | if (StringUtils.isEmpty(fse.getUUID())) { |
| | | return this.error(SystemCode.SYSTEM_FORM_COUNT.getValue(), SystemCode.SYSTEM_FORM_COUNT.getText()); |
| | |
| | | @ApiVersion(1) |
| | | public String conferenceRoomUsage(HttpServletRequest request) { |
| | | try { |
| | | //获取参数 |
| | | FieldSetEntity fse = null; |
| | | Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA); |
| | | if (bean != null) { |
| | | RequestParameterEntity reqp = (RequestParameterEntity) bean; |
| | | fse = reqp.getFormData(); |
| | | } |
| | | //判断参数是否为空 |
| | | if (bean == null || fse == null) { |
| | | return this.error(com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getValue(), com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | // 判断表名是否正常 |
| | | if (fse.getTableName() == null || !CmnConst.PRODUCT_OA_CONFERENCE_APPLY.equals(fse.getTableName())) { |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request, CmnConst.PRODUCT_OA_CONFERENCE_APPLY); |
| | | return conferenceManagerService.getConferenceRoomUsage(fse); |
| | | } catch (BaseException e) { |
| | | e.printStackTrace(); |
| | | return this.error(e.getCode(), e.getMessage()); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return this.error(SystemCode.CONFERENCE_ROOM_GET_FIAL.getValue(), SystemCode.CONFERENCE_ROOM_GET_FIAL.getText() + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 会议预约看板功能 |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @PostMapping("/meeting-kanban/{version}") |
| | | @ApiVersion(1) |
| | | public String getKanbanData(HttpServletRequest request){ |
| | | try { |
| | | //获取参数 |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request); |
| | | DataTableEntity dtKanban = conferenceManagerService.getKanBanData(fse); |
| | | return OK_List(dtKanban); |
| | | } catch (BaseException e) { |
| | | e.printStackTrace(); |
| | | return this.error(e.getCode(), e.getMessage()); |
| | | } catch (Exception e) { |
| | |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @PostMapping("/get_kb_Data/{version}") |
| | | @ApiVersion(1) |
| | | public String getkbData(HttpServletRequest request){ |
| | | |
| | | //获取参数 |
| | | FieldSetEntity fse = null; |
| | | Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA); |
| | | if (bean != null) { |
| | | RequestParameterEntity reqp = (RequestParameterEntity) bean; |
| | | fse = reqp.getFormData(); |
| | | } |
| | | //判断参数是否为空 |
| | | if (bean == null || fse == null) { |
| | | return this.error(com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getValue(), com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | List kbData = conferenceManagerService.getKbData(fse); |
| | | |
| | | return OK(kbData); |
| | | |
| | | } |
| | | // @PostMapping("/get_kb_Data/{version}") |
| | | // @ApiVersion(1) |
| | | // public String getkbData(HttpServletRequest request){ |
| | | // try { |
| | | // //获取参数 |
| | | // FieldSetEntity fse = BaseUtil.getFieldSetEntity(request); |
| | | // List kbData = conferenceManagerService.getkbData(fse); |
| | | // return OK(kbData); |
| | | // } catch (BaseException e) { |
| | | // e.printStackTrace(); |
| | | // return this.error(e.getCode(), e.getMessage()); |
| | | // } catch (Exception e) { |
| | | // e.printStackTrace(); |
| | | // return this.error(SystemCode.CONFERENCE_ROOM_GET_FIAL.getValue(), SystemCode.CONFERENCE_ROOM_GET_FIAL.getText() + e.getMessage()); |
| | | // } |
| | | // } |
| | | |
| | | /** |
| | | * 获取会议预约详情 |
| | |
| | | @PostMapping("/get_Meeting_Details/{version}") |
| | | @ApiVersion(1) |
| | | public String getMeetingDetails(HttpServletRequest request){ |
| | | //获取参数 |
| | | FieldSetEntity fse = null; |
| | | Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA); |
| | | if (bean != null) { |
| | | RequestParameterEntity reqp = (RequestParameterEntity) bean; |
| | | fse = reqp.getFormData(); |
| | | try { |
| | | //获取参数 |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request); |
| | | List meetingDetails = conferenceManagerService.getMeetingDetails(fse); |
| | | return OK(meetingDetails); |
| | | } catch (BaseException e) { |
| | | e.printStackTrace(); |
| | | return this.error(e.getCode(), e.getMessage()); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return this.error(SystemCode.CONFERENCE_ROOM_GET_FIAL.getValue(), SystemCode.CONFERENCE_ROOM_GET_FIAL.getText() + e.getMessage()); |
| | | } |
| | | //判断参数是否为空 |
| | | if (bean == null || fse == null) { |
| | | return this.error(com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getValue(), com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | List meetingDetails = conferenceManagerService.getMeetingDetails(fse); |
| | | return OK(meetingDetails); |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | @PostMapping("/save_or_update_meeting_info/{version}") |
| | | @ApiVersion(1) |
| | | public String saveOrUpdateMeetingInfo(HttpServletRequest request){ |
| | | |
| | | //获取参数 |
| | | FieldSetEntity fse = null; |
| | | Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA); |
| | | if (bean != null) { |
| | | RequestParameterEntity reqp = (RequestParameterEntity) bean; |
| | | fse = reqp.getFormData(); |
| | | try { |
| | | //获取参数 |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request); |
| | | HashMap hashMap = conferenceManagerService.saveOrUpdateMeetingInfo(fse); |
| | | return OK(hashMap); |
| | | } catch (BaseException e) { |
| | | e.printStackTrace(); |
| | | return this.error(e.getCode(), e.getMessage()); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return this.error(SystemCode.CONFERENCE_ROOM_GET_FIAL.getValue(), SystemCode.CONFERENCE_ROOM_GET_FIAL.getText() + e.getMessage()); |
| | | } |
| | | //判断参数是否为空 |
| | | if (bean == null || fse == null) { |
| | | return this.error(com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getValue(), com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | HashMap hashMap = conferenceManagerService.saveOrUpdateMeetingInfo(fse); |
| | | return OK(hashMap); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | public void getQrCode(HttpServletRequest request, HttpServletResponse response) throws IOException, WriterException { |
| | | |
| | | //获取参数 |
| | | FieldSetEntity fse = null; |
| | | Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA); |
| | | if (bean != null) { |
| | | RequestParameterEntity reqp = (RequestParameterEntity) bean; |
| | | fse = reqp.getFormData(); |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request); |
| | | if(!StringUtils.isEmpty(fse.getString("uuid"))){ |
| | | String uuid = fse.getString("uuid"); |
| | | // 设置响应流信息 |
| | | response.setContentType("image/jpg"); |
| | | response.setHeader("Pragma", "no-cache"); |
| | | response.setHeader("Cache-Control", "no-cache"); |
| | | response.setDateHeader("Expires", 0); |
| | | |
| | | if(fse!=null && !StringUtils.isEmpty(fse.getString("uuid"))){ |
| | | String uuid = fse.getString("uuid"); |
| | | // 设置响应流信息 |
| | | response.setContentType("image/jpg"); |
| | | response.setHeader("Pragma", "no-cache"); |
| | | response.setHeader("Cache-Control", "no-cache"); |
| | | response.setDateHeader("Expires", 0); |
| | | OutputStream stream = response.getOutputStream(); |
| | | |
| | | OutputStream stream = response.getOutputStream(); |
| | | |
| | | JSONObject jsonData = new JSONObject(); |
| | | jsonData.put("uuid",uuid); |
| | | Date date = new Date(); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String formatDate = dateFormat.format(date); |
| | | jsonData.put("date",formatDate); |
| | | //获取一个二维码图片 |
| | | BitMatrix bitMatrix = conferenceManagerService.getQrCode(jsonData.toString()); |
| | | //以流的形式输出到前端 |
| | | MatrixToImageWriter.writeToStream(bitMatrix , "jpg" , stream); |
| | | } |
| | | JSONObject jsonData = new JSONObject(); |
| | | jsonData.put("uuid",uuid); |
| | | Date date = new Date(); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String formatDate = dateFormat.format(date); |
| | | jsonData.put("date",formatDate); |
| | | //获取一个二维码图片 |
| | | BitMatrix bitMatrix = conferenceManagerService.getQrCode(jsonData.toString()); |
| | | //以流的形式输出到前端 |
| | | MatrixToImageWriter.writeToStream(bitMatrix , "jpg" , stream); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @PostMapping("/cancel_and_start/{version}") |
| | | @ApiVersion(1) |
| | | public String CancelAndStart(HttpServletRequest request){ |
| | | public String CancelAndStart(HttpServletRequest request){ |
| | | //获取参数 |
| | | FieldSetEntity fse = null; |
| | | Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA); |
| | | if (bean != null) { |
| | | RequestParameterEntity reqp = (RequestParameterEntity) bean; |
| | | fse = reqp.getFormData(); |
| | | } |
| | | //判断参数是否为空 |
| | | if (bean == null || fse == null) { |
| | | return this.error(com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getValue(), com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request); |
| | | conferenceManagerService.CancelAndStart(fse); |
| | | return OK(); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/conference_sign/{version}") |
| | | @ApiVersion(1) |
| | | public String ConferenceSign(HttpServletRequest request) throws ParseException { |
| | | public String ConferenceSign(HttpServletRequest request) throws ParseException { |
| | | //获取参数 |
| | | FieldSetEntity fse = null; |
| | | Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA); |
| | | if (bean != null) { |
| | | RequestParameterEntity reqp = (RequestParameterEntity) bean; |
| | | fse = reqp.getFormData(); |
| | | } |
| | | //判断参数是否为空 |
| | | if (bean == null || fse == null) { |
| | | return this.error(com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getValue(), com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request); |
| | | String s = conferenceManagerService.ConferenceSign(fse); |
| | | return OK(s); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取签到或者访问信息 |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @PostMapping("/get_signOrVisit_info/{version}") |
| | | @PostMapping("/get_sign_or_visit_info/{version}") |
| | | @ApiVersion(1) |
| | | public String getSignOrVisitInfo(HttpServletRequest request){ |
| | | |
| | | FieldSetEntity fse = null; |
| | | Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA); |
| | | if (bean != null) { |
| | | RequestParameterEntity reqp = (RequestParameterEntity) bean; |
| | | fse = reqp.getFormData(); |
| | | } |
| | | //判断参数是否为空 |
| | | if (bean == null || fse == null) { |
| | | return this.error(com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getValue(), com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | HashMap signInfo = conferenceManagerService.getSignOrVisitInfo(fse); |
| | | return OK(signInfo); |
| | | |
| | | public String getMeetingSignOrVisit(HttpServletRequest request){ |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request); |
| | | return OK_List(conferenceManagerService.getMeetingSignOrVisit(fse)); |
| | | } |
| | | |
| | | /** |
| | | * 获取签到或者访问信息 |
| | | * @param request |
| | | * @return |
| | | */ |
| | | // @PostMapping("/get_signOrVisit_info/{version}") |
| | | // @ApiVersion(1) |
| | | // public String getSignOrVisitInfo(HttpServletRequest request){ |
| | | // FieldSetEntity fse = BaseUtil.getFieldSetEntity(request); |
| | | // HashMap signInfo = conferenceManagerService.getSignOrVisitInfo(fse); |
| | | // return OK(signInfo); |
| | | // } |
| | | /** |
| | | * 获取会议纪要列表 |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @PostMapping("/get_sign_or_visit_info/{version}") |
| | | @ApiVersion(1) |
| | | public String listMeetingMinute(HttpServletRequest request) { |
| | | try { |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request); |
| | | // 判断分页参数是否正常 |
| | | if (StringUtils.isEmpty(fse.getString(CmnConst.PAGESIZE)) |
| | | || StringUtils.isEmpty(fse.getString(CmnConst.CPAGE))) { |
| | | return this.error(SystemCode.SYSTEM_FORM_COUNT.getValue(), SystemCode.SYSTEM_FORM_COUNT.getText()); |
| | | } |
| | | return OK_List(conferenceManagerService.listMeetingMinute(fse)); |
| | | } catch (BaseException e) { |
| | | e.printStackTrace(); |
| | | return this.error(e.getCode(), e.getMessage()); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return this.error(SystemCode.CONFERENCE_APPLY_FIND_FIAL.getValue(), SystemCode.CONFERENCE_APPLY_FIND_FIAL.getText() + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 发送消息 |
| | |
| | | @PostMapping("/sendMsg/{version}") |
| | | @ApiVersion(1) |
| | | public String sendMsg(HttpServletRequest request){ |
| | | FieldSetEntity fse = null; |
| | | Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA); |
| | | if (bean != null) { |
| | | RequestParameterEntity reqp = (RequestParameterEntity) bean; |
| | | fse = reqp.getFormData(); |
| | | } |
| | | //判断参数是否为空 |
| | | if (bean == null || fse == null) { |
| | | return this.error(com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getValue(), com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request); |
| | | conferenceManagerService.sendMsg(fse); |
| | | return OK(); |
| | | } |
| | | |
| | | |
| | | |
| | | } |