From 394d19ca078d342474a8803db3186452348ac113 Mon Sep 17 00:00:00 2001
From: 许鹏程 <1821349743@qq.com>
Date: 星期五, 23 八月 2024 16:17:09 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/main/java/com/product/administration/controller/ConferenceManagerController.java |  229 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 229 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/product/administration/controller/ConferenceManagerController.java b/src/main/java/com/product/administration/controller/ConferenceManagerController.java
index c39458f..28102cc 100644
--- a/src/main/java/com/product/administration/controller/ConferenceManagerController.java
+++ b/src/main/java/com/product/administration/controller/ConferenceManagerController.java
@@ -2,6 +2,9 @@
 
 import com.alibaba.druid.util.StringUtils;
 import com.alibaba.fastjson.JSONObject;
+import com.google.zxing.WriterException;
+import com.google.zxing.client.j2se.MatrixToImageWriter;
+import com.google.zxing.common.BitMatrix;
 import com.product.administration.config.CmnConst;
 import com.product.administration.config.SystemCode;
 import com.product.administration.service.ConferenceManagerService;
@@ -21,6 +24,14 @@
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
 
 /**
  * @Author cheng
@@ -419,4 +430,222 @@
         }
     }
 
+    /**
+     * 浼氳棰勭害鐪嬫澘鍔熻兘
+     * @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);
+
+    }
+
+    /**
+     * 鑾峰彇浼氳棰勭害璇︽儏
+     * @param request
+     * @return
+     */
+    @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();
+        }
+        //鍒ゆ柇鍙傛暟鏄惁涓虹┖
+        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);
+
+    }
+
+    /**
+     * 浼氳瀹ら绾︿繚瀛樻洿鏂板姛鑳�
+     * @param request
+     * @return
+     */
+
+    @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();
+        }
+        //鍒ゆ柇鍙傛暟鏄惁涓虹┖
+        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);
+
+    }
+
+
+    /**
+     * 浼氳绠$悊绛惧埌浜岀淮鐮�
+     * @param request
+     * @param response
+     * @throws IOException
+     * @throws WriterException
+     */
+    @PostMapping("/get_QrCode/{version}")
+    @ApiVersion(1)
+    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();
+
+            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();
+
+                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);
+           }
+        }
+
+
+    }
+
+    /**
+     * 棰勭害浼氳鍙栨秷寮�鍚姛鑳�
+     * @param request
+     * @return
+     */
+    @PostMapping("/cancel_and_start/{version}")
+    @ApiVersion(1)
+    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());
+        }
+        conferenceManagerService.CancelAndStart(fse);
+        return OK();
+    }
+
+
+    /**
+     * 浼氳绛惧埌鍔熻兘
+     * @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);
+        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());
+        }
+        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