From 1b7a35ff790fc52bfecb4e7a0fb318eac986ac46 Mon Sep 17 00:00:00 2001 From: 18756 <1875631620@qq.com> Date: 星期四, 22 八月 2024 14:41:15 +0800 Subject: [PATCH] 会议室功能访问签到记录8.22 --- src/main/java/com/product/administration/controller/ConferenceManagerController.java | 75 +++++++++++++++++++++++++++++++------ 1 files changed, 62 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/product/administration/controller/ConferenceManagerController.java b/src/main/java/com/product/administration/controller/ConferenceManagerController.java index d1c0944..f44c41b 100644 --- a/src/main/java/com/product/administration/controller/ConferenceManagerController.java +++ b/src/main/java/com/product/administration/controller/ConferenceManagerController.java @@ -11,7 +11,6 @@ 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; @@ -19,9 +18,7 @@ import com.product.module.sys.config.SystemErrorCode; import com.product.module.sys.version.ApiVersion; import com.product.util.BaseUtil; -import org.omg.CORBA.DATA_CONVERSION; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -518,19 +515,19 @@ * @throws IOException * @throws WriterException */ - @GetMapping("/get_QrCode/{version}") + @PostMapping("/get_QrCode/{version}") @ApiVersion(1) - public void getQrCode(String uuid,HttpServletRequest request, HttpServletResponse response) throws IOException, WriterException { + public void getQrCode(HttpServletRequest request, HttpServletResponse response) throws IOException, WriterException { //鑾峰彇鍙傛暟 FieldSetEntity fse = null; - /* Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA); + Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA); if (bean != null) { RequestParameterEntity reqp = (RequestParameterEntity) bean; fse = reqp.getFormData(); - if(fse!=null && !StringUtils.isEmpty(fse.getString("uuid"))){*/ - // String uuid = fse.getString("uuid"); + if(fse!=null && !StringUtils.isEmpty(fse.getString("uuid"))){ + String uuid = fse.getString("uuid"); // 璁剧疆鍝嶅簲娴佷俊鎭� response.setContentType("image/jpg"); response.setHeader("Pragma", "no-cache"); @@ -549,9 +546,8 @@ BitMatrix bitMatrix = conferenceManagerService.getQrCode(jsonData.toString()); //浠ユ祦鐨勫舰寮忚緭鍑哄埌鍓嶇 MatrixToImageWriter.writeToStream(bitMatrix , "jpg" , stream); - - // } - //} + } + } } @@ -580,12 +576,18 @@ } + /** + * 浼氳绛惧埌鍔熻兘 + * @param request + * @return + * @throws ParseException + */ @PostMapping("/conference_sign/{version}") @ApiVersion(1) public String ConferenceSign(HttpServletRequest request) throws ParseException { //鑾峰彇鍙傛暟 FieldSetEntity fse = null; - /*Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA); + Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA); if (bean != null) { RequestParameterEntity reqp = (RequestParameterEntity) bean; fse = reqp.getFormData(); @@ -593,11 +595,58 @@ //鍒ゆ柇鍙傛暟鏄惁涓虹┖ 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()); - }*/ + } String s = conferenceManagerService.ConferenceSign(fse); return OK(s); } + /** + * 鑾峰彇绛惧埌鎴栬�呰闂俊鎭� + * @param request + * @return + */ + @PostMapping("/get_signOrVisit_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); + + } + + /** + * 鍙戦�佹秷鎭� + * @param request + * @return + */ + @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()); + } + conferenceManagerService.sendMsg(fse); + return OK(); + } + + } -- Gitblit v1.9.2