From f7167562105604f1e7656983d120f145db6edd12 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期五, 28 十一月 2025 13:42:31 +0800
Subject: [PATCH] 钥匙柜大屏

---
 server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/cabinet/CabinetController.java |   53 +++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 45 insertions(+), 8 deletions(-)

diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/cabinet/CabinetController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/cabinet/CabinetController.java
index fccb6f7..c0d9d91 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/cabinet/CabinetController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/web/cabinet/CabinetController.java
@@ -11,6 +11,7 @@
 import com.doumee.dao.business.dto.*;
 import com.doumee.dao.business.model.InterfaceLog;
 import com.doumee.dao.business.model.JkCabinetGrid;
+import com.doumee.dao.business.model.JkInterfaceLog;
 import com.doumee.dao.business.model.JkVersion;
 import com.doumee.dao.business.vo.AdminCabinetVO;
 import com.doumee.dao.business.vo.CabinetDetailVO;
@@ -18,6 +19,7 @@
 import com.doumee.dao.business.vo.CabinetInfoVO;
 import com.doumee.dao.web.response.DriverHomeVO;
 import com.doumee.service.business.*;
+import com.doumee.service.business.impl.JkCabinetGridServiceImpl;
 import com.doumee.service.business.third.model.ApiResponse;
 import com.hikvision.artemis.sdk.config.ArtemisConfig;
 import io.swagger.annotations.Api;
@@ -52,7 +54,10 @@
     private JkCabinetGridService jkCabinetGridService;
 
     @Autowired
-    private InterfaceLogService interfaceLogService;
+    private JkCabinetLogService jkCabinetLogService;
+
+    @Autowired
+    private JkInterfaceLogService interfaceLogService;
 
     @Autowired
     private JkIccardService jkIccardService;
@@ -86,8 +91,6 @@
         this.saveInterfaceLog(Constants.strToJson("id",id.toString()), null,"updateRunStatusById","鏇存柊閽ュ寵鏌滃湪绾跨姸鎬�");
         return ApiResponse.success("鏇存柊鎴愬姛");
     }
-
-
 
     @ApiOperation("鑾峰彇鍙鐞嗙殑閽ュ寵鏌滃垪琛� - 绠$悊鍛�")
     @GetMapping("/getAdminCabinetInfo")
@@ -172,6 +175,7 @@
         return ApiResponse.success(jkCabinetGridList);
     }
 
+
     @LoginNoRequired
     @ApiOperation("寮�鍚煖鏍� - 鍙告満")
     @PostMapping("/openGridDriver")
@@ -184,13 +188,13 @@
     @LoginNoRequired
     @ApiOperation("鑾峰彇IC鍗$敤鎴蜂富閿� - 鍙告満")
     @PostMapping("/getMemberIdByCode")
-    public ApiResponse<Integer> getMemberIdByCode(@RequestParam String code) {
-        this.saveInterfaceLog(Constants.strToJson("code",code), null,"getMemberIdByCode","鑾峰彇IC鍗$敤鎴蜂富閿� - 鍙告満");
-        return ApiResponse.success(jkIccardService.getMemberIdByCode(code));
+    public ApiResponse<Integer> getMemberIdByCode(@RequestBody QueryUserByCodeDTO dto) {
+        this.saveInterfaceLog(JSONObject.toJSONString(dto), null,"getMemberIdByCode","鑾峰彇IC鍗$敤鎴蜂富閿� - 鍙告満");
+        return ApiResponse.success(jkIccardService.getMemberIdByCode(dto));
     }
 
     private void saveInterfaceLog(String s, String result,String url,String name) {
-        InterfaceLog hkMonitoryLogDO=new InterfaceLog();
+        JkInterfaceLog hkMonitoryLogDO=new JkInterfaceLog();
         hkMonitoryLogDO.setType(0);
         hkMonitoryLogDO.setCreateDate(new Date());
         hkMonitoryLogDO.setIsdeleted(0);
@@ -201,12 +205,12 @@
         interfaceLogService.create(hkMonitoryLogDO);
     }
 
-
     @LoginNoRequired
     @ApiOperation("閰掔簿妫�娴嬪憡璀�")
     @PostMapping("/alcoholTestAlarm")
     public ApiResponse alcoholTestAlarm(@RequestBody AlcoholTestAlarmDTO dto) {
         jkCabinetGridService.alcoholTestAlarm(dto);
+        this.saveInterfaceLog(JSONObject.toJSONString(dto), null,"閰掔簿妫�娴嬪憡璀�","閰掔簿妫�娴嬪憡璀�");
         return ApiResponse.success("鎿嶄綔鎴愬姛");
     }
 
@@ -217,8 +221,41 @@
     @PostMapping("/timeOutUnCloseAlarm")
     public ApiResponse timeOutUnCloseAlarm(@RequestBody TimeOutCloseGridDTO dto) {
         jkCabinetGridService.timeOutUnCloseAlarm(dto);
+        this.saveInterfaceLog(JSONObject.toJSONString(dto), null,"timeOutUnCloseAlarm","鏌滄牸寮�闂ㄨ秴鏃舵湭鍏抽棴鍛婅");
         return ApiResponse.success("鎿嶄綔鎴愬姛");
     }
 
 
+    @LoginNoRequired
+    @ApiOperation("閽ュ寵鏌滃績璺虫帴鍙�")
+    @GetMapping("/heartbeat")
+    public ApiResponse heartbeat() {
+        return ApiResponse.success("閾炬帴鎴愬姛");
+    }
+
+
+    @LoginNoRequired
+    @ApiOperation("鍚屾鏌滄牸瀹為檯閽ュ寵鏁版嵁")
+    @PostMapping("/syncGridData")
+    public ApiResponse syncGridData(@RequestBody SyncCabinetDTO dto) {
+        jkCabinetGridService.syncGridData(dto);
+        this.saveInterfaceLog(JSONObject.toJSONString(dto), null,"syncGridData","鍚屾鏌滄牸瀹為檯閽ュ寵鏁版嵁");
+        return ApiResponse.success("鎿嶄綔鎴愬姛");
+    }
+
+
+    @Autowired
+    private JkCabinetGridServiceImpl impl;
+
+    @LoginNoRequired
+    @ApiOperation("testTimeOutBackAlarm")
+    @GetMapping("/testTimeOutBackAlarm")
+    public ApiResponse testTimeOutBackAlarm() {
+        jkCabinetLogService.timeOutUnBackAlarm(impl);
+        return ApiResponse.success("鎿嶄綔鎴愬姛");
+    }
+
+
+
+
 }

--
Gitblit v1.9.3