From f8805dcb9cbfda1182761d3c1c9e345f53db3452 Mon Sep 17 00:00:00 2001
From: 叶松 <2217086471@qq.com>
Date: 星期四, 16 十一月 2023 09:17:24 +0800
Subject: [PATCH] 料仓搅拌站大屏书写
---
hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/controller/FaceController.java | 41 +++++++++++++++++++++++++++++++++++++++--
1 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/controller/FaceController.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/controller/FaceController.java
index e8fab3e..e8aad12 100644
--- a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/controller/FaceController.java
+++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/controller/FaceController.java
@@ -12,6 +12,12 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Base64;
+
@RestController
@RequestMapping("face")
public class FaceController {
@@ -76,8 +82,39 @@
@RequestMapping("/deleteNotify")
- public JSONObject deleteNotify(){
- faceServer.deleteNotify();
+ public JSONObject deleteNotify(@RequestBody String mess){
+ faceServer.removeNotify(mess);
+ JSONObject jsonObject = new JSONObject();
+ jsonObject.put("code",0);
+ jsonObject.put("msg","OK");
+ jsonObject.put("success",true);
+ return jsonObject;
+ }
+
+ @RequestMapping("/showFaceImg")
+ public void showFaceImg(String recordId, HttpServletResponse response){
+ String oriStr = faceServer.queryOriStrById(recordId);
+ byte[] bytes = Base64.getDecoder().decode(oriStr);
+ OutputStream outputStream = null;
+ try {
+ outputStream = response.getOutputStream();
+ outputStream.write(bytes);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ } finally {
+ try {
+ if (outputStream!=null) {
+ outputStream.close();
+ }
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+
+ @RequestMapping("/allPerson")
+ public JSONObject allPerson(@RequestBody String mess){
+ faceServer.allPerson(mess);
JSONObject jsonObject = new JSONObject();
jsonObject.put("code",0);
jsonObject.put("msg","OK");
--
Gitblit v1.9.3