Explorar o código

fix 海康摄像头喇叭,删除自动说明文档相关

tjf hai 1 semana
pai
achega
5c286f944e
Modificáronse 43 ficheiros con 1128 adicións e 1524 borrados
  1. BIN=BIN
      AudioFile/123.pcm
  2. 0 0
      AudioFile/DecodeSaveData.pcm
  3. BIN=BIN
      AudioFile/DeviceSaveData.g711
  4. 0 0
      AudioFile/此文件夹中放入发送给设备的音频文件.txt
  5. 0 94
      README.md
  6. 0 12
      bin/clean.bat
  7. 0 12
      bin/package.bat
  8. 0 14
      bin/run.bat
  9. BIN=BIN
      doc/若依环境使用手册.docx
  10. 0 22
      pom.xml
  11. 0 24
      ruoyi-admin/pom.xml
  12. 15 11
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
  13. 6 6
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/OcrController.java
  14. 91 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/manage/PreventUserController.java
  15. 0 27
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/ServerController.java
  16. 0 183
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/TestController.java
  17. 0 125
      ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java
  18. 5 5
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/IdCardVo.java
  19. 5 5
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/SysUserIdcardVo.java
  20. 4 0
      ruoyi-common/src/main/java/com/ruoyi/common/utils/IdCardUtil.java
  21. 1 9
      ruoyi-framework/pom.xml
  22. 1 1
      ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
  23. 0 240
      ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/Server.java
  24. 0 101
      ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Cpu.java
  25. 0 130
      ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Jvm.java
  26. 0 61
      ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Mem.java
  27. 0 84
      ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Sys.java
  28. 0 114
      ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/SysFile.java
  29. 11 1
      ruoyi-system/pom.xml
  30. 1 2
      ruoyi-system/src/main/java/com/ruoyi/hk/AlarmDataParse.java
  31. 1 1
      ruoyi-system/src/main/java/com/ruoyi/hk/CommonMethod/osSelect.java
  32. 1 1
      ruoyi-system/src/main/java/com/ruoyi/hk/FMSGCallBack_V31.java
  33. 25 24
      ruoyi-system/src/main/java/com/ruoyi/hk/HCNetSDK.java
  34. 227 60
      ruoyi-system/src/main/java/com/ruoyi/hk/HkUtils.java
  35. 14 1
      ruoyi-system/src/main/java/com/ruoyi/manage/domain/ClockSet.java
  36. 327 0
      ruoyi-system/src/main/java/com/ruoyi/manage/domain/PreventUser.java
  37. 62 0
      ruoyi-system/src/main/java/com/ruoyi/manage/mapper/PreventUserMapper.java
  38. 62 0
      ruoyi-system/src/main/java/com/ruoyi/manage/service/IPreventUserService.java
  39. 97 0
      ruoyi-system/src/main/java/com/ruoyi/manage/service/impl/PreventUserServiceImpl.java
  40. 6 1
      ruoyi-system/src/main/resources/mapper/manage/ClockSetMapper.xml
  41. 166 0
      ruoyi-system/src/main/resources/mapper/manage/PreventUserMapper.xml
  42. 0 67
      ry.bat
  43. 0 86
      ry.sh

BIN=BIN
AudioFile/123.pcm


+ 0 - 0
AudioFile/DecodeSaveData.pcm


BIN=BIN
AudioFile/DeviceSaveData.g711


+ 0 - 0
AudioFile/此文件夹中放入发送给设备的音频文件.txt


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 94
README.md


+ 0 - 12
bin/clean.bat

@@ -1,12 +0,0 @@
-@echo off
-echo.
-echo [信息] 清理工程target生成路径。
-echo.
-
-%~d0
-cd %~dp0
-
-cd ..
-call mvn clean
-
-pause

+ 0 - 12
bin/package.bat

@@ -1,12 +0,0 @@
-@echo off
-echo.
-echo [信息] 打包Web工程,生成war/jar包文件。
-echo.
-
-%~d0
-cd %~dp0
-
-cd ..
-call mvn clean package -Dmaven.test.skip=true
-
-pause

+ 0 - 14
bin/run.bat

@@ -1,14 +0,0 @@
-@echo off
-echo.
-echo [信息] 使用Jar命令运行Web工程。
-echo.
-
-cd %~dp0
-cd ../ruoyi-admin/target
-
-set JAVA_OPTS=-Xms256m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
-
-java -jar %JAVA_OPTS% ruoyi-admin.jar
-
-cd bin
-pause

BIN=BIN
doc/若依环境使用手册.docx


+ 0 - 22
pom.xml

@@ -21,11 +21,9 @@
         <spring-boot.version>2.5.15</spring-boot.version>
         <druid.version>1.2.23</druid.version>
         <bitwalker.version>1.21</bitwalker.version>
-        <swagger.version>3.0.0</swagger.version>
         <kaptcha.version>2.3.3</kaptcha.version>
         <pagehelper.boot.version>1.4.7</pagehelper.boot.version>
         <fastjson.version>2.0.53</fastjson.version>
-        <oshi.version>6.6.5</oshi.version>
         <commons.io.version>2.13.0</commons.io.version>
         <poi.version>4.1.2</poi.version>
         <velocity.version>2.3</velocity.version>
@@ -122,26 +120,6 @@
                 <version>${pagehelper.boot.version}</version>
             </dependency>
 
-            <!-- 获取系统信息 -->
-            <dependency>
-                <groupId>com.github.oshi</groupId>
-                <artifactId>oshi-core</artifactId>
-                <version>${oshi.version}</version>
-            </dependency>
-
-            <!-- Swagger3依赖 -->
-            <dependency>
-                <groupId>io.springfox</groupId>
-                <artifactId>springfox-boot-starter</artifactId>
-                <version>${swagger.version}</version>
-                <exclusions>
-                    <exclusion>
-                        <groupId>io.swagger</groupId>
-                        <artifactId>swagger-models</artifactId>
-                    </exclusion>
-                </exclusions>
-            </dependency>
-
             <!-- io常用工具类 -->
             <dependency>
                 <groupId>commons-io</groupId>

+ 0 - 24
ruoyi-admin/pom.xml

@@ -16,17 +16,6 @@
     </description>
 
     <dependencies>
-        <!--海康威视-->
-        <dependency>
-            <groupId>net.java.jna</groupId>
-            <artifactId>jna</artifactId>
-            <version>1.0.0</version>
-        </dependency>
-        <dependency>
-            <groupId>net.java.examples</groupId>
-            <artifactId>examples</artifactId>
-            <version>1.0.0</version>
-        </dependency>
         <!--转图片用-->
         <dependency>
             <groupId>commons-fileupload</groupId>
@@ -40,19 +29,6 @@
             <optional>true</optional> <!-- 表示依赖不会传递 -->
         </dependency>
 
-        <!-- swagger3-->
-        <dependency>
-            <groupId>io.springfox</groupId>
-            <artifactId>springfox-boot-starter</artifactId>
-        </dependency>
-
-        <!-- 防止进入swagger页面报类型转换错误,排除3.0.0中的引用,手动增加1.6.2版本 -->
-        <dependency>
-            <groupId>io.swagger</groupId>
-            <artifactId>swagger-models</artifactId>
-            <version>1.6.2</version>
-        </dependency>
-
         <!-- Mysql驱动包 -->
         <dependency>
             <groupId>mysql</groupId>

+ 15 - 11
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java

@@ -1,9 +1,12 @@
 package com.ruoyi.web.controller.common;
 
-import java.util.ArrayList;
-import java.util.List;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import com.ruoyi.common.config.RuoYiConfig;
+import com.ruoyi.common.constant.Constants;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.file.FileUploadUtils;
+import com.ruoyi.common.utils.file.FileUtils;
+import com.ruoyi.framework.config.ServerConfig;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -13,13 +16,11 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
-import com.ruoyi.common.config.RuoYiConfig;
-import com.ruoyi.common.constant.Constants;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.common.utils.file.FileUploadUtils;
-import com.ruoyi.common.utils.file.FileUtils;
-import com.ruoyi.framework.config.ServerConfig;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * 通用请求处理
@@ -83,7 +84,10 @@ public class CommonController
             String fileName = FileUploadUtils.upload(filePath, file);
             String url = serverConfig.getUrl() + fileName;
             AjaxResult ajax = AjaxResult.success();
+            //服务器路径
+            String urlOnline = filePath + fileName.replace("/profile/upload", "");
             ajax.put("url", url);
+            ajax.put("urlOnline", urlOnline);
             ajax.put("fileName", fileName);
             ajax.put("newFileName", FileUtils.getName(fileName));
             ajax.put("originalFilename", file.getOriginalFilename());

+ 6 - 6
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/OcrController.java

@@ -41,11 +41,11 @@ public class OcrController {
     @PostMapping("/ocrIdCard")
     @RepeatSubmit(interval = 1000, message = "请求过于频繁")
     public AjaxResult ocrIdCard(@RequestBody IdCardVo idCardVo) {
-        if (StringUtils.isEmpty(idCardVo.getAppkey())) {
+        if (StringUtils.isEmpty(idCardVo.getAppKey())) {
             return AjaxResult.error("appKey不能为空");
         }
         //查询appKey是否存在
-        AppManage appManage = appManageService.selectAppManageByAppKey(idCardVo.getAppkey());
+        AppManage appManage = appManageService.selectAppManageByAppKey(idCardVo.getAppKey());
         if (appManage == null) {
             return AjaxResult.error("非法访问");
         }
@@ -62,11 +62,11 @@ public class OcrController {
     @RepeatSubmit(interval = 1000, message = "请求过于频繁")
     public AjaxResult ocrSampleAliYun(@RequestBody SysUserIdcardVo sysUserIdcardVo) {
 
-        if (StringUtils.isEmpty(sysUserIdcardVo.getAppkey())) {
+        if (StringUtils.isEmpty(sysUserIdcardVo.getAppKey())) {
             return AjaxResult.error("appKey不能为空");
         }
         //查询appKey是否存在
-        AppManage appManage = appManageService.selectAppManageByAppKey(sysUserIdcardVo.getAppkey());
+        AppManage appManage = appManageService.selectAppManageByAppKey(sysUserIdcardVo.getAppKey());
         if (appManage == null) {
             return AjaxResult.error("非法访问");
         }
@@ -82,11 +82,11 @@ public class OcrController {
     @PostMapping("/ocrSampleAliYunH")
     @RepeatSubmit(interval = 1000, message = "请求过于频繁")
     public AjaxResult ocrSampleAliYunH(@RequestBody SysUserIdcardVo sysUserIdcardVo) {
-        if (StringUtils.isEmpty(sysUserIdcardVo.getAppkey())) {
+        if (StringUtils.isEmpty(sysUserIdcardVo.getAppKey())) {
             return AjaxResult.error("appKey不能为空");
         }
         //查询appKey是否存在
-        AppManage appManage = appManageService.selectAppManageByAppKey(sysUserIdcardVo.getAppkey());
+        AppManage appManage = appManageService.selectAppManageByAppKey(sysUserIdcardVo.getAppKey());
         if (appManage == null) {
             return AjaxResult.error("非法访问");
         }

+ 91 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/manage/PreventUserController.java

@@ -0,0 +1,91 @@
+package com.ruoyi.web.controller.manage;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.manage.domain.PreventUser;
+import com.ruoyi.manage.service.IPreventUserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 防溺水人员信息Controller
+ *
+ * @author boman
+ * @date 2025-08-05
+ */
+@RestController
+@RequestMapping("/manage/preventUser")
+public class PreventUserController extends BaseController {
+    @Autowired
+    private IPreventUserService preventUserService;
+
+    /**
+     * 查询防溺水人员信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('manage:preventUser:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(PreventUser preventUser) {
+        startPage();
+        List<PreventUser> list = preventUserService.selectPreventUserList(preventUser);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出防溺水人员信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('manage:preventUser:export')")
+    @Log(title = "防溺水人员信息", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, PreventUser preventUser) {
+        List<PreventUser> list = preventUserService.selectPreventUserList(preventUser);
+        ExcelUtil<PreventUser> util = new ExcelUtil<PreventUser>(PreventUser.class);
+        util.exportExcel(response, list, "防溺水人员信息数据");
+    }
+
+    /**
+     * 获取防溺水人员信息详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('manage:preventUser:query')")
+    @GetMapping(value = "/{preventUserId}")
+    public AjaxResult getInfo(@PathVariable("preventUserId") Long preventUserId) {
+        return success(preventUserService.selectPreventUserByPreventUserId(preventUserId));
+    }
+
+    /**
+     * 新增防溺水人员信息
+     */
+    @PreAuthorize("@ss.hasPermi('manage:preventUser:add')")
+    @Log(title = "防溺水人员信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody PreventUser preventUser) {
+        return toAjax(preventUserService.insertPreventUser(preventUser));
+    }
+
+    /**
+     * 修改防溺水人员信息
+     */
+    @PreAuthorize("@ss.hasPermi('manage:preventUser:edit')")
+    @Log(title = "防溺水人员信息", businessType = BusinessType.UPDATE)
+    @PostMapping("/put")
+    public AjaxResult edit(@RequestBody PreventUser preventUser) {
+        return toAjax(preventUserService.updatePreventUser(preventUser));
+    }
+
+    /**
+     * 删除防溺水人员信息
+     */
+    @PreAuthorize("@ss.hasPermi('manage:preventUser:remove')")
+    @Log(title = "防溺水人员信息", businessType = BusinessType.DELETE)
+    @GetMapping("/delete/{preventUserIds}")
+    public AjaxResult remove(@PathVariable Long[] preventUserIds) {
+        return toAjax(preventUserService.deletePreventUserByPreventUserIds(preventUserIds));
+    }
+}

+ 0 - 27
ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/ServerController.java

@@ -1,27 +0,0 @@
-package com.ruoyi.web.controller.monitor;
-
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.framework.web.domain.Server;
-
-/**
- * 服务器监控
- * 
- * @author ruoyi
- */
-@RestController
-@RequestMapping("/monitor/server")
-public class ServerController
-{
-    @PreAuthorize("@ss.hasPermi('monitor:server:list')")
-    @GetMapping()
-    public AjaxResult getInfo() throws Exception
-    {
-        Server server = new Server();
-        server.copyTo();
-        return AjaxResult.success(server);
-    }
-}

+ 0 - 183
ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/TestController.java

@@ -1,183 +0,0 @@
-package com.ruoyi.web.controller.tool;
-
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.common.utils.StringUtils;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import io.swagger.annotations.ApiOperation;
-
-/**
- * swagger 用户测试方法
- * 
- * @author ruoyi
- */
-@Api("用户信息管理")
-@RestController
-@RequestMapping("/test/user")
-public class TestController extends BaseController
-{
-    private final static Map<Integer, UserEntity> users = new LinkedHashMap<Integer, UserEntity>();
-    {
-        users.put(1, new UserEntity(1, "admin", "admin123", "15888888888"));
-        users.put(2, new UserEntity(2, "ry", "admin123", "15666666666"));
-    }
-
-    @ApiOperation("获取用户列表")
-    @GetMapping("/list")
-    public R<List<UserEntity>> userList()
-    {
-        List<UserEntity> userList = new ArrayList<UserEntity>(users.values());
-        return R.ok(userList);
-    }
-
-    @ApiOperation("获取用户详细")
-    @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
-    @GetMapping("/{userId}")
-    public R<UserEntity> getUser(@PathVariable Integer userId)
-    {
-        if (!users.isEmpty() && users.containsKey(userId))
-        {
-            return R.ok(users.get(userId));
-        }
-        else
-        {
-            return R.fail("用户不存在");
-        }
-    }
-
-    @ApiOperation("新增用户")
-    @ApiImplicitParams({
-        @ApiImplicitParam(name = "userId", value = "用户id", dataType = "Integer", dataTypeClass = Integer.class),
-        @ApiImplicitParam(name = "username", value = "用户名称", dataType = "String", dataTypeClass = String.class),
-        @ApiImplicitParam(name = "password", value = "用户密码", dataType = "String", dataTypeClass = String.class),
-        @ApiImplicitParam(name = "mobile", value = "用户手机", dataType = "String", dataTypeClass = String.class)
-    })
-    @PostMapping("/save")
-    public R<String> save(UserEntity user)
-    {
-        if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
-        {
-            return R.fail("用户ID不能为空");
-        }
-        users.put(user.getUserId(), user);
-        return R.ok();
-    }
-
-    @ApiOperation("更新用户")
-    @PutMapping("/update")
-    public R<String> update(@RequestBody UserEntity user)
-    {
-        if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
-        {
-            return R.fail("用户ID不能为空");
-        }
-        if (users.isEmpty() || !users.containsKey(user.getUserId()))
-        {
-            return R.fail("用户不存在");
-        }
-        users.remove(user.getUserId());
-        users.put(user.getUserId(), user);
-        return R.ok();
-    }
-
-    @ApiOperation("删除用户信息")
-    @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
-    @DeleteMapping("/{userId}")
-    public R<String> delete(@PathVariable Integer userId)
-    {
-        if (!users.isEmpty() && users.containsKey(userId))
-        {
-            users.remove(userId);
-            return R.ok();
-        }
-        else
-        {
-            return R.fail("用户不存在");
-        }
-    }
-}
-
-@ApiModel(value = "UserEntity", description = "用户实体")
-class UserEntity
-{
-    @ApiModelProperty("用户ID")
-    private Integer userId;
-
-    @ApiModelProperty("用户名称")
-    private String username;
-
-    @ApiModelProperty("用户密码")
-    private String password;
-
-    @ApiModelProperty("用户手机")
-    private String mobile;
-
-    public UserEntity()
-    {
-
-    }
-
-    public UserEntity(Integer userId, String username, String password, String mobile)
-    {
-        this.userId = userId;
-        this.username = username;
-        this.password = password;
-        this.mobile = mobile;
-    }
-
-    public Integer getUserId()
-    {
-        return userId;
-    }
-
-    public void setUserId(Integer userId)
-    {
-        this.userId = userId;
-    }
-
-    public String getUsername()
-    {
-        return username;
-    }
-
-    public void setUsername(String username)
-    {
-        this.username = username;
-    }
-
-    public String getPassword()
-    {
-        return password;
-    }
-
-    public void setPassword(String password)
-    {
-        this.password = password;
-    }
-
-    public String getMobile()
-    {
-        return mobile;
-    }
-
-    public void setMobile(String mobile)
-    {
-        this.mobile = mobile;
-    }
-}

+ 0 - 125
ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java

@@ -1,125 +0,0 @@
-package com.ruoyi.web.core.config;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import com.ruoyi.common.config.RuoYiConfig;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.models.auth.In;
-import springfox.documentation.builders.ApiInfoBuilder;
-import springfox.documentation.builders.PathSelectors;
-import springfox.documentation.builders.RequestHandlerSelectors;
-import springfox.documentation.service.ApiInfo;
-import springfox.documentation.service.ApiKey;
-import springfox.documentation.service.AuthorizationScope;
-import springfox.documentation.service.Contact;
-import springfox.documentation.service.SecurityReference;
-import springfox.documentation.service.SecurityScheme;
-import springfox.documentation.spi.DocumentationType;
-import springfox.documentation.spi.service.contexts.SecurityContext;
-import springfox.documentation.spring.web.plugins.Docket;
-
-/**
- * Swagger2的接口配置
- * 
- * @author ruoyi
- */
-@Configuration
-public class SwaggerConfig
-{
-    /** 系统基础配置 */
-    @Autowired
-    private RuoYiConfig ruoyiConfig;
-
-    /** 是否开启swagger */
-    @Value("${swagger.enabled}")
-    private boolean enabled;
-
-    /** 设置请求的统一前缀 */
-    @Value("${swagger.pathMapping}")
-    private String pathMapping;
-
-    /**
-     * 创建API
-     */
-    @Bean
-    public Docket createRestApi()
-    {
-        return new Docket(DocumentationType.OAS_30)
-                // 是否启用Swagger
-                .enable(enabled)
-                // 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息)
-                .apiInfo(apiInfo())
-                // 设置哪些接口暴露给Swagger展示
-                .select()
-                // 扫描所有有注解的api,用这种方式更灵活
-                .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
-                // 扫描指定包中的swagger注解
-                // .apis(RequestHandlerSelectors.basePackage("com.ruoyi.project.tool.swagger"))
-                // 扫描所有 .apis(RequestHandlerSelectors.any())
-                .paths(PathSelectors.any())
-                .build()
-                /* 设置安全模式,swagger可以设置访问token */
-                .securitySchemes(securitySchemes())
-                .securityContexts(securityContexts())
-                .pathMapping(pathMapping);
-    }
-
-    /**
-     * 安全模式,这里指定token通过Authorization头请求头传递
-     */
-    private List<SecurityScheme> securitySchemes()
-    {
-        List<SecurityScheme> apiKeyList = new ArrayList<SecurityScheme>();
-        apiKeyList.add(new ApiKey("Authorization", "Authorization", In.HEADER.toValue()));
-        return apiKeyList;
-    }
-
-    /**
-     * 安全上下文
-     */
-    private List<SecurityContext> securityContexts()
-    {
-        List<SecurityContext> securityContexts = new ArrayList<>();
-        securityContexts.add(
-                SecurityContext.builder()
-                        .securityReferences(defaultAuth())
-                        .operationSelector(o -> o.requestMappingPattern().matches("/.*"))
-                        .build());
-        return securityContexts;
-    }
-
-    /**
-     * 默认的安全上引用
-     */
-    private List<SecurityReference> defaultAuth()
-    {
-        AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
-        AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
-        authorizationScopes[0] = authorizationScope;
-        List<SecurityReference> securityReferences = new ArrayList<>();
-        securityReferences.add(new SecurityReference("Authorization", authorizationScopes));
-        return securityReferences;
-    }
-
-    /**
-     * 添加摘要信息
-     */
-    private ApiInfo apiInfo()
-    {
-        // 用ApiInfoBuilder进行定制
-        return new ApiInfoBuilder()
-                // 设置标题
-                .title("标题:若依管理系统_接口文档")
-                // 描述
-                .description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
-                // 作者信息
-                .contact(new Contact(ruoyiConfig.getName(), null, null))
-                // 版本
-                .version("版本号:" + ruoyiConfig.getVersion())
-                .build();
-    }
-}

+ 5 - 5
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/IdCardVo.java

@@ -27,7 +27,7 @@ public class IdCardVo implements Serializable {
      */
     private String idCardSide;
 
-    private String appkey;
+    private String appKey;
 
     public String getIdCardSide() {
         return idCardSide;
@@ -61,12 +61,12 @@ public class IdCardVo implements Serializable {
         this.image = image;
     }
 
-    public String getAppkey() {
-        return appkey;
+    public String getAppKey() {
+        return appKey;
     }
 
-    public void setAppkey(String appkey) {
-        this.appkey = appkey;
+    public void setAppKey(String appKey) {
+        this.appKey = appKey;
     }
 
     @Override

+ 5 - 5
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/SysUserIdcardVo.java

@@ -67,7 +67,7 @@ public class SysUserIdcardVo extends BaseEntity
      */
     private String returnUrl;
 
-    private String appkey;
+    private String appKey;
     //唯一标识
     private String certifyId;
 
@@ -193,12 +193,12 @@ public class SysUserIdcardVo extends BaseEntity
         return delFlag;
     }
 
-    public String getAppkey() {
-        return appkey;
+    public String getAppKey() {
+        return appKey;
     }
 
-    public void setAppkey(String appkey) {
-        this.appkey = appkey;
+    public void setAppKey(String appKey) {
+        this.appKey = appKey;
     }
 
     @Override

+ 4 - 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/IdCardUtil.java

@@ -186,9 +186,13 @@ public class IdCardUtil {
                     String name = JSON.parseObject(jsonObjectWordsResult.getString("姓名")).getString("words");
                     String address = JSON.parseObject(jsonObjectWordsResult.getString("住址")).getString("words");
                     String idCard = JSON.parseObject(jsonObjectWordsResult.getString("公民身份号码")).getString("words");
+                    String birthdate = JSON.parseObject(jsonObjectWordsResult.getString("出生")).getString("words");
+                    String gender = JSON.parseObject(jsonObjectWordsResult.getString("性别")).getString("words");
                     map.put("realName", name);
                     map.put("address", address);
                     map.put("idCard", idCard);
+                    map.put("birthdate", birthdate);
+                    map.put("gender", gender);
                 } else if (BACK.equals(idCardSide)) {
                     String date = JSON.parseObject(jsonObjectWordsResult.getString("失效日期")).getString("words");
                     map.put("expirationDate", date);

+ 1 - 9
ruoyi-framework/pom.xml

@@ -16,9 +16,8 @@
     </description>
 
     <dependencies>
-
         <!-- SpringBoot Web容器 -->
-         <dependency>
+        <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-web</artifactId>
         </dependency>
@@ -46,13 +45,6 @@
                 </exclusion>
             </exclusions>
         </dependency>
-
-        <!-- 获取系统信息 -->
-        <dependency>
-            <groupId>com.github.oshi</groupId>
-            <artifactId>oshi-core</artifactId>
-        </dependency>
-
         <!-- 系统模块-->
         <dependency>
             <groupId>com.ruoyi</groupId>

+ 1 - 1
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java

@@ -115,7 +115,7 @@ public class SecurityConfig
                     // 静态资源,可匿名访问
                     .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
                     .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
-                    .antMatchers("/sendSms/sendLoginSms").permitAll()
+                    .antMatchers("/sendSms/sendLoginSms","/ocr/**").permitAll()
                     // 除上面外的所有请求全部需要鉴权认证
                     .anyRequest().authenticated();
             })

+ 0 - 240
ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/Server.java

@@ -1,240 +0,0 @@
-package com.ruoyi.framework.web.domain;
-
-import java.net.UnknownHostException;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Properties;
-import com.ruoyi.common.utils.Arith;
-import com.ruoyi.common.utils.ip.IpUtils;
-import com.ruoyi.framework.web.domain.server.Cpu;
-import com.ruoyi.framework.web.domain.server.Jvm;
-import com.ruoyi.framework.web.domain.server.Mem;
-import com.ruoyi.framework.web.domain.server.Sys;
-import com.ruoyi.framework.web.domain.server.SysFile;
-import oshi.SystemInfo;
-import oshi.hardware.CentralProcessor;
-import oshi.hardware.CentralProcessor.TickType;
-import oshi.hardware.GlobalMemory;
-import oshi.hardware.HardwareAbstractionLayer;
-import oshi.software.os.FileSystem;
-import oshi.software.os.OSFileStore;
-import oshi.software.os.OperatingSystem;
-import oshi.util.Util;
-
-/**
- * 服务器相关信息
- * 
- * @author ruoyi
- */
-public class Server
-{
-    private static final int OSHI_WAIT_SECOND = 1000;
-    
-    /**
-     * CPU相关信息
-     */
-    private Cpu cpu = new Cpu();
-
-    /**
-     * 內存相关信息
-     */
-    private Mem mem = new Mem();
-
-    /**
-     * JVM相关信息
-     */
-    private Jvm jvm = new Jvm();
-
-    /**
-     * 服务器相关信息
-     */
-    private Sys sys = new Sys();
-
-    /**
-     * 磁盘相关信息
-     */
-    private List<SysFile> sysFiles = new LinkedList<SysFile>();
-
-    public Cpu getCpu()
-    {
-        return cpu;
-    }
-
-    public void setCpu(Cpu cpu)
-    {
-        this.cpu = cpu;
-    }
-
-    public Mem getMem()
-    {
-        return mem;
-    }
-
-    public void setMem(Mem mem)
-    {
-        this.mem = mem;
-    }
-
-    public Jvm getJvm()
-    {
-        return jvm;
-    }
-
-    public void setJvm(Jvm jvm)
-    {
-        this.jvm = jvm;
-    }
-
-    public Sys getSys()
-    {
-        return sys;
-    }
-
-    public void setSys(Sys sys)
-    {
-        this.sys = sys;
-    }
-
-    public List<SysFile> getSysFiles()
-    {
-        return sysFiles;
-    }
-
-    public void setSysFiles(List<SysFile> sysFiles)
-    {
-        this.sysFiles = sysFiles;
-    }
-
-    public void copyTo() throws Exception
-    {
-        SystemInfo si = new SystemInfo();
-        HardwareAbstractionLayer hal = si.getHardware();
-
-        setCpuInfo(hal.getProcessor());
-
-        setMemInfo(hal.getMemory());
-
-        setSysInfo();
-
-        setJvmInfo();
-
-        setSysFiles(si.getOperatingSystem());
-    }
-
-    /**
-     * 设置CPU信息
-     */
-    private void setCpuInfo(CentralProcessor processor)
-    {
-        // CPU信息
-        long[] prevTicks = processor.getSystemCpuLoadTicks();
-        Util.sleep(OSHI_WAIT_SECOND);
-        long[] ticks = processor.getSystemCpuLoadTicks();
-        long nice = ticks[TickType.NICE.getIndex()] - prevTicks[TickType.NICE.getIndex()];
-        long irq = ticks[TickType.IRQ.getIndex()] - prevTicks[TickType.IRQ.getIndex()];
-        long softirq = ticks[TickType.SOFTIRQ.getIndex()] - prevTicks[TickType.SOFTIRQ.getIndex()];
-        long steal = ticks[TickType.STEAL.getIndex()] - prevTicks[TickType.STEAL.getIndex()];
-        long cSys = ticks[TickType.SYSTEM.getIndex()] - prevTicks[TickType.SYSTEM.getIndex()];
-        long user = ticks[TickType.USER.getIndex()] - prevTicks[TickType.USER.getIndex()];
-        long iowait = ticks[TickType.IOWAIT.getIndex()] - prevTicks[TickType.IOWAIT.getIndex()];
-        long idle = ticks[TickType.IDLE.getIndex()] - prevTicks[TickType.IDLE.getIndex()];
-        long totalCpu = user + nice + cSys + idle + iowait + irq + softirq + steal;
-        cpu.setCpuNum(processor.getLogicalProcessorCount());
-        cpu.setTotal(totalCpu);
-        cpu.setSys(cSys);
-        cpu.setUsed(user);
-        cpu.setWait(iowait);
-        cpu.setFree(idle);
-    }
-
-    /**
-     * 设置内存信息
-     */
-    private void setMemInfo(GlobalMemory memory)
-    {
-        mem.setTotal(memory.getTotal());
-        mem.setUsed(memory.getTotal() - memory.getAvailable());
-        mem.setFree(memory.getAvailable());
-    }
-
-    /**
-     * 设置服务器信息
-     */
-    private void setSysInfo()
-    {
-        Properties props = System.getProperties();
-        sys.setComputerName(IpUtils.getHostName());
-        sys.setComputerIp(IpUtils.getHostIp());
-        sys.setOsName(props.getProperty("os.name"));
-        sys.setOsArch(props.getProperty("os.arch"));
-        sys.setUserDir(props.getProperty("user.dir"));
-    }
-
-    /**
-     * 设置Java虚拟机
-     */
-    private void setJvmInfo() throws UnknownHostException
-    {
-        Properties props = System.getProperties();
-        jvm.setTotal(Runtime.getRuntime().totalMemory());
-        jvm.setMax(Runtime.getRuntime().maxMemory());
-        jvm.setFree(Runtime.getRuntime().freeMemory());
-        jvm.setVersion(props.getProperty("java.version"));
-        jvm.setHome(props.getProperty("java.home"));
-    }
-
-    /**
-     * 设置磁盘信息
-     */
-    private void setSysFiles(OperatingSystem os)
-    {
-        FileSystem fileSystem = os.getFileSystem();
-        List<OSFileStore> fsArray = fileSystem.getFileStores();
-        for (OSFileStore fs : fsArray)
-        {
-            long free = fs.getUsableSpace();
-            long total = fs.getTotalSpace();
-            long used = total - free;
-            SysFile sysFile = new SysFile();
-            sysFile.setDirName(fs.getMount());
-            sysFile.setSysTypeName(fs.getType());
-            sysFile.setTypeName(fs.getName());
-            sysFile.setTotal(convertFileSize(total));
-            sysFile.setFree(convertFileSize(free));
-            sysFile.setUsed(convertFileSize(used));
-            sysFile.setUsage(Arith.mul(Arith.div(used, total, 4), 100));
-            sysFiles.add(sysFile);
-        }
-    }
-
-    /**
-     * 字节转换
-     * 
-     * @param size 字节大小
-     * @return 转换后值
-     */
-    public String convertFileSize(long size)
-    {
-        long kb = 1024;
-        long mb = kb * 1024;
-        long gb = mb * 1024;
-        if (size >= gb)
-        {
-            return String.format("%.1f GB", (float) size / gb);
-        }
-        else if (size >= mb)
-        {
-            float f = (float) size / mb;
-            return String.format(f > 100 ? "%.0f MB" : "%.1f MB", f);
-        }
-        else if (size >= kb)
-        {
-            float f = (float) size / kb;
-            return String.format(f > 100 ? "%.0f KB" : "%.1f KB", f);
-        }
-        else
-        {
-            return String.format("%d B", size);
-        }
-    }
-}

+ 0 - 101
ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Cpu.java

@@ -1,101 +0,0 @@
-package com.ruoyi.framework.web.domain.server;
-
-import com.ruoyi.common.utils.Arith;
-
-/**
- * CPU相关信息
- * 
- * @author ruoyi
- */
-public class Cpu
-{
-    /**
-     * 核心数
-     */
-    private int cpuNum;
-
-    /**
-     * CPU总的使用率
-     */
-    private double total;
-
-    /**
-     * CPU系统使用率
-     */
-    private double sys;
-
-    /**
-     * CPU用户使用率
-     */
-    private double used;
-
-    /**
-     * CPU当前等待率
-     */
-    private double wait;
-
-    /**
-     * CPU当前空闲率
-     */
-    private double free;
-
-    public int getCpuNum()
-    {
-        return cpuNum;
-    }
-
-    public void setCpuNum(int cpuNum)
-    {
-        this.cpuNum = cpuNum;
-    }
-
-    public double getTotal()
-    {
-        return Arith.round(Arith.mul(total, 100), 2);
-    }
-
-    public void setTotal(double total)
-    {
-        this.total = total;
-    }
-
-    public double getSys()
-    {
-        return Arith.round(Arith.mul(sys / total, 100), 2);
-    }
-
-    public void setSys(double sys)
-    {
-        this.sys = sys;
-    }
-
-    public double getUsed()
-    {
-        return Arith.round(Arith.mul(used / total, 100), 2);
-    }
-
-    public void setUsed(double used)
-    {
-        this.used = used;
-    }
-
-    public double getWait()
-    {
-        return Arith.round(Arith.mul(wait / total, 100), 2);
-    }
-
-    public void setWait(double wait)
-    {
-        this.wait = wait;
-    }
-
-    public double getFree()
-    {
-        return Arith.round(Arith.mul(free / total, 100), 2);
-    }
-
-    public void setFree(double free)
-    {
-        this.free = free;
-    }
-}

+ 0 - 130
ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Jvm.java

@@ -1,130 +0,0 @@
-package com.ruoyi.framework.web.domain.server;
-
-import java.lang.management.ManagementFactory;
-import com.ruoyi.common.utils.Arith;
-import com.ruoyi.common.utils.DateUtils;
-
-/**
- * JVM相关信息
- * 
- * @author ruoyi
- */
-public class Jvm
-{
-    /**
-     * 当前JVM占用的内存总数(M)
-     */
-    private double total;
-
-    /**
-     * JVM最大可用内存总数(M)
-     */
-    private double max;
-
-    /**
-     * JVM空闲内存(M)
-     */
-    private double free;
-
-    /**
-     * JDK版本
-     */
-    private String version;
-
-    /**
-     * JDK路径
-     */
-    private String home;
-
-    public double getTotal()
-    {
-        return Arith.div(total, (1024 * 1024), 2);
-    }
-
-    public void setTotal(double total)
-    {
-        this.total = total;
-    }
-
-    public double getMax()
-    {
-        return Arith.div(max, (1024 * 1024), 2);
-    }
-
-    public void setMax(double max)
-    {
-        this.max = max;
-    }
-
-    public double getFree()
-    {
-        return Arith.div(free, (1024 * 1024), 2);
-    }
-
-    public void setFree(double free)
-    {
-        this.free = free;
-    }
-
-    public double getUsed()
-    {
-        return Arith.div(total - free, (1024 * 1024), 2);
-    }
-
-    public double getUsage()
-    {
-        return Arith.mul(Arith.div(total - free, total, 4), 100);
-    }
-
-    /**
-     * 获取JDK名称
-     */
-    public String getName()
-    {
-        return ManagementFactory.getRuntimeMXBean().getVmName();
-    }
-
-    public String getVersion()
-    {
-        return version;
-    }
-
-    public void setVersion(String version)
-    {
-        this.version = version;
-    }
-
-    public String getHome()
-    {
-        return home;
-    }
-
-    public void setHome(String home)
-    {
-        this.home = home;
-    }
-
-    /**
-     * JDK启动时间
-     */
-    public String getStartTime()
-    {
-        return DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, DateUtils.getServerStartDate());
-    }
-
-    /**
-     * JDK运行时间
-     */
-    public String getRunTime()
-    {
-        return DateUtils.timeDistance(DateUtils.getNowDate(), DateUtils.getServerStartDate());
-    }
-
-    /**
-     * 运行参数
-     */
-    public String getInputArgs()
-    {
-        return ManagementFactory.getRuntimeMXBean().getInputArguments().toString();
-    }
-}

+ 0 - 61
ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Mem.java

@@ -1,61 +0,0 @@
-package com.ruoyi.framework.web.domain.server;
-
-import com.ruoyi.common.utils.Arith;
-
-/**
- * 內存相关信息
- * 
- * @author ruoyi
- */
-public class Mem
-{
-    /**
-     * 内存总量
-     */
-    private double total;
-
-    /**
-     * 已用内存
-     */
-    private double used;
-
-    /**
-     * 剩余内存
-     */
-    private double free;
-
-    public double getTotal()
-    {
-        return Arith.div(total, (1024 * 1024 * 1024), 2);
-    }
-
-    public void setTotal(long total)
-    {
-        this.total = total;
-    }
-
-    public double getUsed()
-    {
-        return Arith.div(used, (1024 * 1024 * 1024), 2);
-    }
-
-    public void setUsed(long used)
-    {
-        this.used = used;
-    }
-
-    public double getFree()
-    {
-        return Arith.div(free, (1024 * 1024 * 1024), 2);
-    }
-
-    public void setFree(long free)
-    {
-        this.free = free;
-    }
-
-    public double getUsage()
-    {
-        return Arith.mul(Arith.div(used, total, 4), 100);
-    }
-}

+ 0 - 84
ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Sys.java

@@ -1,84 +0,0 @@
-package com.ruoyi.framework.web.domain.server;
-
-/**
- * 系统相关信息
- * 
- * @author ruoyi
- */
-public class Sys
-{
-    /**
-     * 服务器名称
-     */
-    private String computerName;
-
-    /**
-     * 服务器Ip
-     */
-    private String computerIp;
-
-    /**
-     * 项目路径
-     */
-    private String userDir;
-
-    /**
-     * 操作系统
-     */
-    private String osName;
-
-    /**
-     * 系统架构
-     */
-    private String osArch;
-
-    public String getComputerName()
-    {
-        return computerName;
-    }
-
-    public void setComputerName(String computerName)
-    {
-        this.computerName = computerName;
-    }
-
-    public String getComputerIp()
-    {
-        return computerIp;
-    }
-
-    public void setComputerIp(String computerIp)
-    {
-        this.computerIp = computerIp;
-    }
-
-    public String getUserDir()
-    {
-        return userDir;
-    }
-
-    public void setUserDir(String userDir)
-    {
-        this.userDir = userDir;
-    }
-
-    public String getOsName()
-    {
-        return osName;
-    }
-
-    public void setOsName(String osName)
-    {
-        this.osName = osName;
-    }
-
-    public String getOsArch()
-    {
-        return osArch;
-    }
-
-    public void setOsArch(String osArch)
-    {
-        this.osArch = osArch;
-    }
-}

+ 0 - 114
ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/SysFile.java

@@ -1,114 +0,0 @@
-package com.ruoyi.framework.web.domain.server;
-
-/**
- * 系统文件相关信息
- * 
- * @author ruoyi
- */
-public class SysFile
-{
-    /**
-     * 盘符路径
-     */
-    private String dirName;
-
-    /**
-     * 盘符类型
-     */
-    private String sysTypeName;
-
-    /**
-     * 文件类型
-     */
-    private String typeName;
-
-    /**
-     * 总大小
-     */
-    private String total;
-
-    /**
-     * 剩余大小
-     */
-    private String free;
-
-    /**
-     * 已经使用量
-     */
-    private String used;
-
-    /**
-     * 资源的使用率
-     */
-    private double usage;
-
-    public String getDirName()
-    {
-        return dirName;
-    }
-
-    public void setDirName(String dirName)
-    {
-        this.dirName = dirName;
-    }
-
-    public String getSysTypeName()
-    {
-        return sysTypeName;
-    }
-
-    public void setSysTypeName(String sysTypeName)
-    {
-        this.sysTypeName = sysTypeName;
-    }
-
-    public String getTypeName()
-    {
-        return typeName;
-    }
-
-    public void setTypeName(String typeName)
-    {
-        this.typeName = typeName;
-    }
-
-    public String getTotal()
-    {
-        return total;
-    }
-
-    public void setTotal(String total)
-    {
-        this.total = total;
-    }
-
-    public String getFree()
-    {
-        return free;
-    }
-
-    public void setFree(String free)
-    {
-        this.free = free;
-    }
-
-    public String getUsed()
-    {
-        return used;
-    }
-
-    public void setUsed(String used)
-    {
-        this.used = used;
-    }
-
-    public double getUsage()
-    {
-        return usage;
-    }
-
-    public void setUsage(double usage)
-    {
-        this.usage = usage;
-    }
-}

+ 11 - 1
ruoyi-system/pom.xml

@@ -16,7 +16,17 @@
     </description>
 
     <dependencies>
-
+        <!--海康威视-->
+        <dependency>
+            <groupId>net.java.jna</groupId>
+            <artifactId>jna</artifactId>
+            <version>1.0.0</version>
+        </dependency>
+        <dependency>
+            <groupId>net.java.examples</groupId>
+            <artifactId>examples</artifactId>
+            <version>1.0.0</version>
+        </dependency>
         <!-- 通用工具-->
         <dependency>
             <groupId>com.ruoyi</groupId>

+ 1 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/hk/AlarmDataParse.java → ruoyi-system/src/main/java/com/ruoyi/hk/AlarmDataParse.java

@@ -1,4 +1,4 @@
-package com.ruoyi.web.controller.hk;
+package com.ruoyi.hk;
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONObject;
@@ -10,7 +10,6 @@ import com.ruoyi.system.service.ISysNoticeService;
 import com.sun.jna.Pointer;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
-
 import javax.annotation.PostConstruct;
 import java.io.File;
 import java.io.FileNotFoundException;

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/hk/CommonMethod/osSelect.java → ruoyi-system/src/main/java/com/ruoyi/hk/CommonMethod/osSelect.java

@@ -1,4 +1,4 @@
-package com.ruoyi.web.controller.hk.CommonMethod;
+package com.ruoyi.hk.CommonMethod;
 
 /**
  * @author

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/hk/FMSGCallBack_V31.java → ruoyi-system/src/main/java/com/ruoyi/hk/FMSGCallBack_V31.java

@@ -1,5 +1,5 @@
 
-package com.ruoyi.web.controller.hk;
+package com.ruoyi.hk;
 
 import com.sun.jna.Pointer;
 

+ 25 - 24
ruoyi-admin/src/main/java/com/ruoyi/web/controller/hk/HCNetSDK.java → ruoyi-system/src/main/java/com/ruoyi/hk/HCNetSDK.java

@@ -1,4 +1,4 @@
-package com.ruoyi.web.controller.hk;
+package com.ruoyi.hk;
 
 import com.sun.jna.*;
 import com.sun.jna.examples.win32.W32API;
@@ -338,8 +338,8 @@ public interface HCNetSDK extends Library {
     public static final int NET_DVR_SUPPORT_BLTSHRINKY = 0x10;//显卡BLT支持Y轴缩小;如果不支持,系统会用软件方法转换;
     public static final int NET_DVR_SUPPORT_BLTSTRETCHX = 0x20;//显卡BLT支持X轴放大;如果不支持,系统会用软件方法转换;
     public static final int NET_DVR_SUPPORT_BLTSTRETCHY = 0x40;//显卡BLT支持Y轴放大;如果不支持,系统会用软件方法转换;
-    public static final int NET_DVR_SUPPORT_SSE = 0x80;//CPU支持SSE指令,Intel Pentium3以上支持SSE指令;
-    public static final int NET_DVR_SUPPORT_MMX = 0x100;//CPU支持MMX指令集,Intel Pentium3以上支持SSE指令;
+    public static final int NET_DVR_SUPPORT_SSE = 0x80;//CPU支持SSE指令, Pentium3以上支持SSE指令;
+    public static final int NET_DVR_SUPPORT_MMX = 0x100;//CPU支持MMX指令集, Pentium3以上支持SSE指令;
     /**********************
      * 云台控制命令 begin
      *************************/
@@ -4399,8 +4399,11 @@ DVR实现巡航数据结构
 
     //语音对讲参数
     public static class NET_DVR_COMPRESSION_AUDIO extends Structure {
-        public byte byAudioEncType;   //音频编码类型 0-G722; 1-G711
-        public byte[] byres = new byte[7];//这里保留音频的压缩参数
+        public byte byAudioEncType;   //0- G722,1- G711_U,2- G711_A,5- MP2L2,6- G726,7- AAC,8- PCM,9-G722,10-G723,11-G729,12-AAC_LC,13-AAC_LD,14-Opus,15-MP3,16-ADPCM
+        public byte  byAudioSamplingRate;//音频采样率 0-默认,1-16kHZ,2-32kHZ,3-48kHZ, 4- 44.1kHZ,5-8kHZ
+        public byte  byAudioBitRate;// 音频码率 参考 BITRATE_ENCODE_INDEX
+        public byte[]  byres=new byte[4];//这里保留音频的压缩参数
+        public byte  bySupport;//bySupport Bit0表示 Mp2l2前4个字节的含义表示后面内容音频数据长度
     }
 
     public static class NET_DVR_AUDIODEC_INFO extends Structure {
@@ -4593,14 +4596,14 @@ DVR实现巡航数据结构
         public short wDuration;            //行为事件触发时间阈值: 1-120秒,建议5秒,判断是有效报警的时间  在ATM系统中触发文件阈值为 1-1000秒
         public byte bySensitivity;        //灵敏度参数,范围[1-100]
         public byte byRate;               //占比:区域内所有未报警目标尺寸目标占区域面积的比重,归一化为-;
-    /*
-    检测目标,可支持多选,具体定义为:
-    0~所有目标(表示不锁定检测目标,所有目标都将进行检测)
-    0x01 ~ 人,
-    0x02 ~ 车,
-    0x04 ~ 其他,
-    该字段支持多选,按位取值,例如3表示1+2.
-    */
+        /*
+        检测目标,可支持多选,具体定义为:
+        0~所有目标(表示不锁定检测目标,所有目标都将进行检测)
+        0x01 ~ 人,
+        0x02 ~ 车,
+        0x04 ~ 其他,
+        该字段支持多选,按位取值,例如3表示1+2.
+        */
         public byte byDetectionTarget;
         public byte byPriority;//优先级,0~低,1~中,2~高
         public byte byAlarmConfidence;    //报警置信度, 0-低,1-较低,2-较高,3-高
@@ -5032,7 +5035,7 @@ DVR实现巡航数据结构
         public byte byBright;                        //车牌亮度
         public byte byLicenseLen;                    //车牌字符个数
         public byte byEntireBelieve;                //整个车牌的置信度,-100
-        public byte byRegion;                       // 区域索引值 0-保留,1-欧洲(EU),2-俄语区域(ER),3-欧洲&(EU&CIS) ,4-中东(ME),0xff-所有
+        public byte byRegion;                       // 区域索引值 0-保留,1-欧洲(EU),3-欧洲&(EU&CIS) ,4-中东(ME),0xff-所有
         public byte byCountry;                      // 国家索引值,参照枚举COUNTRY_INDEX(不支持"COUNTRY_ALL = 0xff, //ALL  全部")
         public byte byArea;                         //区域(省份),各国家内部区域枚举,阿联酋参照 EMI_AREA
         public byte byPlateSize;                    //车牌尺寸,0~未知,1~long, 2~short(中东车牌使用)
@@ -7081,7 +7084,7 @@ DVR实现巡航数据结构
 
     //人体特征识别结果结构体
     public static class NET_VCA_HUMAN_FEATURE extends Structure {
-        public byte byRes3;    
+        public byte byRes3;
         public byte bySex;         //性别, 0-表示“未知”(算法不支持),1 – 男 , 2 – 女, 0xff-算法支持,但是没有识别出来
         public byte byEyeGlass;    //是否戴眼镜 0-表示“未知”(算法不支持),1 – 不戴, 2 – 戴,0xff-算法支持,但是没有识别出来
         //抓拍图片人脸年龄的使用方式,如byAge为15,byAgeDeviation为1,表示,实际人脸图片年龄的为14-16之间
@@ -8429,7 +8432,7 @@ DVR实现巡航数据结构
      34-皖,0xff-全部
      */
         public byte byProvince;//省份索引值
-        public byte byRegion;// 区域索引值 0-保留,1-欧洲,2-俄语区域, 3-欧洲&(EU&CIS),4-中东(Middle East)
+        public byte byRegion;// 区域索引值 0-保留,1-欧洲, 3-欧洲&(EU&CIS),4-中东(Middle East)
         public byte byCountry;//国家索引,参照枚举COUNTRY_INDEX(不支持“COUNTRY_ALL = 0xff,//ALL 全部”)
         public short wPlatePixelWidthMin;//车牌像素识别宽度最小值(单位是像素)当前推荐范围[130,500]
         public short wPlatePixelWidthMax;//车牌像素识别宽度最大值(单位是像素)当前推荐范围[130,500]
@@ -9058,10 +9061,6 @@ DVR实现巡航数据结构
     5-HIK 3.8-16mm F1.5(HV3816P-8MPIR)
     6-HIK 11-40mm F1.7 (HV1140P-8MPIR)
     7-HIK 2.7-12mm F1.2(TV2712P-MPIR)
-    8- MZ5721D-12MPIR
-    9- MZ1555D-12MPIR
-    10- MZ5721D-12MPIR(RS485)
-    11- MZ1555D-12MPIR(RS485)
     */
         public byte byIrisMode;
         public byte byMirror;  /* 镜像:0 off,1- leftright,2- updown,3-center 4-Auto*/
@@ -9544,14 +9543,14 @@ DVR实现巡航数据结构
     }
 
     public static interface FVoiceDataCallBack_V30 extends Callback {
-        public void invoke(int lVoiceComHandle, Pointer pRecvDataBuffer, int dwBufSize, byte byAudioFlag, Pointer pUser);
+        public void invoke(int lVoiceComHandle, Pointer pRecvDataBuffer, int dwBufSize, byte byAudioFlag, int pUser);
     }
 
     public static interface FVoiceDataCallBack_MR extends Callback {
         public void invoke(int lVoiceComHandle, Pointer pRecvDataBuffer, int dwBufSize, byte byAudioFlag, int dwUser);
     }
 
-    public static interface FVoiceDataCallBack_MR_V30 extends Callback {
+    public static interface FVoiceDataCallback_MR_V30 extends Callback {
         public void invoke(int lVoiceComHandle, Pointer pRecvDataBuffer, int dwBufSize, byte byAudioFlag, Pointer pUser);
     }
 
@@ -9877,9 +9876,11 @@ DVR实现巡航数据结构
     boolean NET_DVR_StopVoiceCom(int lVoiceComHandle);
 
     //语音转发
+
+    boolean NET_DVR_GetCurrentAudioCompress(int lUserID, NET_DVR_COMPRESSION_AUDIO lpCompressAudio);
     int NET_DVR_StartVoiceCom_MR(int lUserID, FVoiceDataCallBack_MR fVoiceDataCallBack, int dwUser);
 
-    int NET_DVR_StartVoiceCom_MR_V30(int lUserID, int dwVoiceChan, FVoiceDataCallBack_MR_V30 fVoiceDataCallBack, Pointer pUser);
+    int NET_DVR_StartVoiceCom_MR_V30(int lUserID, int dwVoiceChan, FVoiceDataCallback_MR_V30 fVoiceDataCallBack, Pointer pUser);
 
     boolean NET_DVR_VoiceComSendData(int lVoiceComHandle, byte[] pSendBuf, int dwBufSize);
 
@@ -9931,7 +9932,7 @@ DVR实现巡航数据结构
     void NET_DVR_ReleaseG722Decoder(Pointer pDecHandle);
 
     //G711: Win64、Linux32、Linux64
-    Pointer NET_DVR_InitG711Encoder(Pointer enc_info); //NET_DVR_AUDIOENC_INFO
+    Pointer NET_DVR_InitG711Encoder(NET_DVR_AUDIOENC_INFO enc_info);//NET_DVR_AUDIOENC_INFO//NET_DVR_AUDIOENC_INFO
 
     boolean NET_DVR_EncodeG711Frame(Pointer handle, NET_DVR_AUDIOENC_PROCESS_PARAM p_enc_proc_param);
 

+ 227 - 60
ruoyi-admin/src/main/java/com/ruoyi/web/controller/hk/BjsbController.java → ruoyi-system/src/main/java/com/ruoyi/hk/HkUtils.java

@@ -1,25 +1,42 @@
-package com.ruoyi.web.controller.hk;
+package com.ruoyi.hk;
 
 import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.web.controller.hk.CommonMethod.osSelect;
+import com.ruoyi.hk.CommonMethod.osSelect;
 import com.sun.jna.Native;
 import com.sun.jna.Pointer;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
 
 /**
  * @Author: tjf
- * @Date: 2025/6/6 星期五 16:03
+ * @Date: 2025/8/12 星期二 9:23
  * @Describe:
  */
-@RestController
-@RequestMapping("/hk")
-public class BjsbController {
+public class HkUtils {
+    static int lUserID = -1;
     static HCNetSDK hCNetSDK = null;
-    static int lUserID = -1;//用户句柄
+    static int lVoiceComHandle = -1; //语音对讲句柄
+    static int Count = 0;
+    static int PCM_SEND = 1920;
     static int lAlarmHandle = -1;
     static FMSGCallBack_V31 fMSFCallBack_V31 = null; //报警布防回调函数
+    static cbVoicePcmDataCallBack_MR_V30 cbVoicePcmDataCallBack_mr_v30 = null;
+
+    /**
+     * 海康摄像头音频转发
+     */
+    static class cbVoicePcmDataCallBack_MR_V30 implements HCNetSDK.FVoiceDataCallback_MR_V30 {
+        public void invoke(int lVoiceComHandle, Pointer pRecvDataBuffer, int dwBufSize, byte byAudioFlag, Pointer pUser) {
+            if (Count == 250) {//降低打印频率
+                System.out.println("-----=cbVoiceDataCallBack_MR_V30 enter---------");
+                Count = 0;
+            }
+            Count++;
+        }
+    }
+
     /**
      * 根据不同操作系统选择不同的库文件和库路径
      *
@@ -34,9 +51,10 @@ public class BjsbController {
                     if (osSelect.isWindows())
                         //win系统加载库路径
                         strDllPath = System.getProperty("user.dir") + "\\lib\\HCNetSDK.dll";
+
                     else if (osSelect.isLinux())
                         //Linux系统加载库路径
-                        strDllPath = System.getProperty("user.dir") + "/libOne/libhcnetsdk.so";
+                        strDllPath = System.getProperty("user.dir") + "/lib/libhcnetsdk.so";
                     hCNetSDK = (HCNetSDK) Native.loadLibrary(strDllPath, HCNetSDK.class);
                 } catch (Exception ex) {
                     System.out.println("loadLibrary: " + strDllPath + " Error: " + ex.getMessage());
@@ -47,11 +65,207 @@ public class BjsbController {
         return true;
     }
 
+    /**
+     * 登录设备,支持 V40 和 V30 版本,功能一致。
+     *
+     * @param ip   设备IP地址
+     * @param port SDK端口,默认为设备的8000端口
+     * @param user 设备用户名
+     * @param psw  设备密码
+     * @return 登录成功返回用户ID,失败返回-1
+     */
+    public static int loginDevice(String ip, short port, String user, String psw) {
+        // 创建设备登录信息和设备信息对象
+        HCNetSDK.NET_DVR_USER_LOGIN_INFO loginInfo = new HCNetSDK.NET_DVR_USER_LOGIN_INFO();
+        HCNetSDK.NET_DVR_DEVICEINFO_V40 deviceInfo = new HCNetSDK.NET_DVR_DEVICEINFO_V40();
+
+        // 设置设备IP地址
+        byte[] deviceAddress = new byte[HCNetSDK.NET_DVR_DEV_ADDRESS_MAX_LEN];
+        byte[] ipBytes = ip.getBytes();
+        System.arraycopy(ipBytes, 0, deviceAddress, 0, Math.min(ipBytes.length, deviceAddress.length));
+        loginInfo.sDeviceAddress = deviceAddress;
+
+        // 设置用户名和密码
+        byte[] userName = new byte[HCNetSDK.NET_DVR_LOGIN_USERNAME_MAX_LEN];
+        byte[] password = psw.getBytes();
+        System.arraycopy(user.getBytes(), 0, userName, 0, Math.min(user.length(), userName.length));
+        System.arraycopy(password, 0, loginInfo.sPassword, 0, Math.min(password.length, loginInfo.sPassword.length));
+        loginInfo.sUserName = userName;
+
+        // 设置端口和登录模式
+        loginInfo.wPort = port;
+        loginInfo.bUseAsynLogin = false; // 同步登录
+        loginInfo.byLoginMode = 0; // 使用SDK私有协议
+
+        // 执行登录操作
+        int userID = hCNetSDK.NET_DVR_Login_V40(loginInfo, deviceInfo);
+        if (userID == -1) {
+            System.err.println("登录失败,错误码为: " + hCNetSDK.NET_DVR_GetLastError());
+        } else {
+            System.out.println(ip + " 设备登录成功!");
+            // 处理通道号逻辑
+            int startDChan = deviceInfo.struDeviceV30.byStartDChan;
+            System.out.println("预览起始通道号: " + startDChan);
+        }
+        return userID; // 返回登录结果
+    }
+
+    /**
+     * 获取音频编码参数
+     *
+     * @param userID 设备注册句柄
+     */
+    public static void getCurrentAudioCompress(int userID) {
+        HCNetSDK.NET_DVR_COMPRESSION_AUDIO net_dvr_compression_audio = new HCNetSDK.NET_DVR_COMPRESSION_AUDIO();
+        boolean b_AudioCompress = hCNetSDK.NET_DVR_GetCurrentAudioCompress(userID, net_dvr_compression_audio);
+        if (b_AudioCompress == false) {
+            System.out.println("获取音频编码格式参数失败,错误码为" + hCNetSDK.NET_DVR_GetLastError());
+            return;
+        }
+        net_dvr_compression_audio.read();
+        System.out.println("音频编码类型:" + net_dvr_compression_audio.byAudioEncType);
+        System.out.println("音频采样率:" + net_dvr_compression_audio.byAudioSamplingRate);
+        return;
+    }
+
+    /**
+     * 设备注销
+     */
+    public static boolean logout() {
+
+        if (hCNetSDK.NET_DVR_Logout(lUserID)) {
+            System.out.println("注销成功");
+        }
+
+        return true;
+    }
+
+    /**
+     * 给对应摄像头发送音频
+     *
+     * @return
+     */
+    public static AjaxResult sendAudio() throws InterruptedException, IOException {
+        if (hCNetSDK == null) {
+            if (!createSDKInstance()) {
+                System.out.println("Load SDK fail");
+                return AjaxResult.error("Load SDK fail");
+            }
+        }
+        //linux系统建议调用以下接口加载组件库
+        if (osSelect.isLinux()) {
+            HCNetSDK.BYTE_ARRAY ptrByteArray1 = new HCNetSDK.BYTE_ARRAY(256);
+            HCNetSDK.BYTE_ARRAY ptrByteArray2 = new HCNetSDK.BYTE_ARRAY(256);
+            //这里是库的绝对路径,请根据实际情况修改,注意改路径必须有访问权限
+            String strPath1 = System.getProperty("user.dir") + "/lib/libcrypto.so.1.1";
+            String strPath2 = System.getProperty("user.dir") + "/lib/libssl.so.1.1";
+            System.arraycopy(strPath1.getBytes(), 0, ptrByteArray1.byValue, 0, strPath1.length());
+            ptrByteArray1.write();
+            hCNetSDK.NET_DVR_SetSDKInitCfg(HCNetSDK.NET_SDK_INIT_CFG_LIBEAY_PATH, ptrByteArray1.getPointer());
+            System.arraycopy(strPath2.getBytes(), 0, ptrByteArray2.byValue, 0, strPath2.length());
+            ptrByteArray2.write();
+            hCNetSDK.NET_DVR_SetSDKInitCfg(HCNetSDK.NET_SDK_INIT_CFG_SSLEAY_PATH, ptrByteArray2.getPointer());
+            String strPathCom = System.getProperty("user.dir") + "/lib/";
+            HCNetSDK.NET_DVR_LOCAL_SDK_PATH struComPath = new HCNetSDK.NET_DVR_LOCAL_SDK_PATH();
+            System.arraycopy(strPathCom.getBytes(), 0, struComPath.sPath, 0, strPathCom.length());
+            struComPath.write();
+            hCNetSDK.NET_DVR_SetSDKInitCfg(HCNetSDK.NET_SDK_INIT_CFG_SDK_PATH, struComPath.getPointer());
+        }
+        boolean initSuc = hCNetSDK.NET_DVR_Init();
+        if (initSuc != true) {
+            System.out.println("初始化失败");
+        }
+        hCNetSDK.NET_DVR_SetLogToFile(3, "./sdkLog", false);
+        //设备登录 需要设备信息
+        lUserID = HkUtils.loginDevice("10.90.90.68", (short) 8000, "admin", "zxy123456");
+        //获取设备音频编码参数,确定转发音频参数
+        HkUtils.getCurrentAudioCompress(lUserID);
+        System.out.println("\n[Module]开启PCM语音转发示例代码");
+        HkUtils.startTransPCMData(lUserID);
+        HkUtils.logout();
+        //释放SDK
+        hCNetSDK.NET_DVR_Cleanup();
+        return AjaxResult.success();
+    }
+    /**
+     * :: 生成临时WAV文件
+     * powershell -Command "Add-Type -AssemblyName System.Speech; $speak = New-Object System.Speech.Synthesis.SpeechSynthesizer; $speak.SetOutputToWaveFile('%USERPROFILE%\Desktop\temp.wav'); $speak.Speak('测试'); $speak.Dispose()"
+     *
+     * :: 转换为PCM
+     * ffmpeg -i "%USERPROFILE%\Desktop\temp.wav" -f s16le -acodec pcm_s16le -ar 16000 -ac 1 "%USERPROFILE%\Desktop\123.pcm"
+     *
+     * :: 清理临时文件
+     * del "%USERPROFILE%\Desktop\temp.wav"
+     */
+    /**
+     * pcm音频转发
+     *
+     * @param luserID
+     */
+    public static void startTransPCMData(int luserID) {
+        //设置语音PCM回调函数
+        if (cbVoicePcmDataCallBack_mr_v30 == null) {
+            cbVoicePcmDataCallBack_mr_v30 = new cbVoicePcmDataCallBack_MR_V30();
+        }
+        lVoiceComHandle = hCNetSDK.NET_DVR_StartVoiceCom_MR_V30(lUserID, 1, cbVoicePcmDataCallBack_mr_v30, null);
+        if (lVoiceComHandle < 0) {
+            System.out.println("NET_DVR_StartVoiceCom_MR_V30 error," + hCNetSDK.NET_DVR_GetLastError());
+            hCNetSDK.NET_DVR_Logout(lUserID);
+            hCNetSDK.NET_DVR_Cleanup();
+            return;
+        }
+        System.out.println("NET_DVR_StartVoiceCom_MR_V30 suss\n");
+        //读取发送到设备的PCM音频文件,视频采样率和位数需要和设备编码参数保持一致
+        File m_hStreamFile = new File(System.getProperty("user.dir") + "\\AudioFile\\123.pcm");
+        try {
+            // 获取文件的输入流
+            FileInputStream inputStream = new FileInputStream(m_hStreamFile);
+            int PCMdataLength = 0;
+            try {
+                //返回文件的总字节数
+                PCMdataLength = inputStream.available();
+            } catch (IOException e1) {
+                e1.printStackTrace();
+            }
+            if (PCMdataLength < 0) {
+                System.out.println("MP3 file dataSize < 0");
+                return;
+            }
+            HCNetSDK.BYTE_ARRAY ptrVoicePcmByte = new HCNetSDK.BYTE_ARRAY(PCMdataLength);
+            try {
+                inputStream.read(ptrVoicePcmByte.byValue);
+            } catch (IOException e2) {
+                e2.printStackTrace();
+            }
+            ptrVoicePcmByte.write();
+            for (int i = 0; i < PCMdataLength / PCM_SEND; i++) {
+                HCNetSDK.BYTE_ARRAY ptrPcmSend = new HCNetSDK.BYTE_ARRAY(PCM_SEND);
+                System.arraycopy(ptrVoicePcmByte.byValue, i * PCM_SEND, ptrPcmSend.byValue, 0, PCM_SEND);
+                ptrPcmSend.write();
+                if (hCNetSDK.NET_DVR_VoiceComSendData(lVoiceComHandle, ptrPcmSend.byValue, PCM_SEND) == false) {
+                    System.out.println("NET_DVR_VoiceComSendData failed, error code:" + hCNetSDK.NET_DVR_GetLastError());
+                } else {
+                    System.out.println("NET_DVR_VoiceComSendData:" + PCM_SEND + ":succeed ,data is " + i * PCM_SEND);
+                }
+                //需要实时速率发送数据
+                try {
+                    Thread.sleep(40);
+                } catch (InterruptedException e) {
+                    // TODO Auto-generated catch block
+                    e.printStackTrace();
+                }
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+            return;
+        }
+        return;
+    }
+
     /**
      * 获取表计数据
      */
-    @PostMapping("/getBj")
-    public AjaxResult getBj() {
+    public static AjaxResult getBj() {
         if (hCNetSDK == null) {
             if (!createSDKInstance()) {
                 System.out.println("Load SDK fail");
@@ -128,52 +342,6 @@ public class BjsbController {
         }
     }
 
-
-    /**
-     * 登录设备,支持 V40 和 V30 版本,功能一致。
-     *
-     * @param ip   设备IP地址
-     * @param port SDK端口,默认为设备的8000端口
-     * @param user 设备用户名
-     * @param psw  设备密码
-     * @return 登录成功返回用户ID,失败返回-1
-     */
-    public static int loginDevice(String ip, short port, String user, String psw) {
-        // 创建设备登录信息和设备信息对象
-        HCNetSDK.NET_DVR_USER_LOGIN_INFO loginInfo = new HCNetSDK.NET_DVR_USER_LOGIN_INFO();
-        HCNetSDK.NET_DVR_DEVICEINFO_V40 deviceInfo = new HCNetSDK.NET_DVR_DEVICEINFO_V40();
-
-        // 设置设备IP地址
-        byte[] deviceAddress = new byte[HCNetSDK.NET_DVR_DEV_ADDRESS_MAX_LEN];
-        byte[] ipBytes = ip.getBytes();
-        System.arraycopy(ipBytes, 0, deviceAddress, 0, Math.min(ipBytes.length, deviceAddress.length));
-        loginInfo.sDeviceAddress = deviceAddress;
-
-        // 设置用户名和密码
-        byte[] userName = new byte[HCNetSDK.NET_DVR_LOGIN_USERNAME_MAX_LEN];
-        byte[] password = psw.getBytes();
-        System.arraycopy(user.getBytes(), 0, userName, 0, Math.min(user.length(), userName.length));
-        System.arraycopy(password, 0, loginInfo.sPassword, 0, Math.min(password.length, loginInfo.sPassword.length));
-        loginInfo.sUserName = userName;
-
-        // 设置端口和登录模式
-        loginInfo.wPort = port;
-        loginInfo.bUseAsynLogin = false; // 同步登录
-        loginInfo.byLoginMode = 0; // 使用SDK私有协议
-
-        // 执行登录操作
-        int userID = hCNetSDK.NET_DVR_Login_V40(loginInfo, deviceInfo);
-        if (userID == -1) {
-            System.err.println("登录失败,错误码为: " + hCNetSDK.NET_DVR_GetLastError());
-        } else {
-            System.out.println(ip + " 设备登录成功!");
-            // 处理通道号逻辑
-            int startDChan = deviceInfo.struDeviceV30.byStartDChan;
-            System.out.println("预览起始通道号: " + startDChan);
-        }
-        return userID; // 返回登录结果
-    }
-
     /**
      * 报警主机注销用户,释放资源
      */
@@ -198,5 +366,4 @@ public class BjsbController {
         }
         return AjaxResult.error("报警主机注销用户失败,错误号:" + hCNetSDK.NET_DVR_GetLastError());
     }
-
 }

+ 14 - 1
ruoyi-system/src/main/java/com/ruoyi/manage/domain/ClockSet.java

@@ -17,6 +17,10 @@ public class ClockSet extends BaseEntity
 
     /** 打卡时间设置id */
     private Long clockSetId;
+    /**
+     * 名称
+     */
+    private String clockName;
 
     /** 上午上班时间 */
     //@JsonFormat(pattern = "yyyy-MM-dd")
@@ -38,7 +42,15 @@ public class ClockSet extends BaseEntity
     @Excel(name = "下午下班时间", width = 30, dateFormat = "yyyy-MM-dd")
     private String clockEndPm;
 
-    public void setClockSetId(Long clockSetId) 
+    public String getClockName() {
+        return clockName;
+    }
+
+    public void setClockName(String clockName) {
+        this.clockName = clockName;
+    }
+
+    public void setClockSetId(Long clockSetId)
     {
         this.clockSetId = clockSetId;
     }
@@ -83,6 +95,7 @@ public class ClockSet extends BaseEntity
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("clockName", getClockName())
             .append("clockSetId", getClockSetId())
             .append("clockBeginAm", getClockBeginAm())
             .append("clockEndAm", getClockEndAm())

+ 327 - 0
ruoyi-system/src/main/java/com/ruoyi/manage/domain/PreventUser.java

@@ -0,0 +1,327 @@
+package com.ruoyi.manage.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 防溺水人员信息对象 prevent_user
+ * 
+ * @author boman
+ * @date 2025-08-05
+ */
+public class PreventUser extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 防溺水人员信息id */
+    private Long preventUserId;
+
+    /** 身份证号码 */
+    @Excel(name = "身份证号码")
+    private String idCard;
+
+    /** 真实姓名 */
+    @Excel(name = "真实姓名")
+    private String realName;
+
+    /** 失效日期 */
+    @Excel(name = "失效日期")
+    private String expirationDate;
+
+    /** 手机号码 */
+    @Excel(name = "手机号码")
+    private String phoneNumber;
+
+    /** 性别 */
+    @Excel(name = "性别")
+    private String gender;
+
+    /** 出生年月 */
+    @Excel(name = "出生年月")
+    private String birthdate;
+
+    /** 物业id */
+    @Excel(name = "物业id")
+    private Long wyId;
+
+    /** 居住地址 */
+    @Excel(name = "居住地址")
+    private String address;
+
+    /** 正面地址URL */
+    @Excel(name = "正面地址URL")
+    private String front;
+
+    /** 反面地址URL */
+    @Excel(name = "反面地址URL")
+    private String back;
+
+    /** 学校id */
+    @Excel(name = "学校id")
+    private Long schoolId;
+
+    /** 学校名称 */
+    @Excel(name = "学校名称")
+    private String schoolName;
+
+    /** 班级id */
+    @Excel(name = "班级id")
+    private Long classId;
+
+    /** 班级名称 */
+    @Excel(name = "班级名称")
+    private String className;
+
+    /** 家长姓名 */
+    @Excel(name = "家长姓名")
+    private String parentName;
+
+    /** 家长电话 */
+    @Excel(name = "家长电话")
+    private String parentPhoneNumber;
+
+    /** 学生证照片 */
+    @Excel(name = "学生证照片")
+    private String studentIdCardPhoto;
+
+    /** 类型 */
+    @Excel(name = "类型")
+    private String type;
+
+    /** 状态 */
+    @Excel(name = "状态")
+    private String status;
+
+    public void setPreventUserId(Long preventUserId) 
+    {
+        this.preventUserId = preventUserId;
+    }
+
+    public Long getPreventUserId() 
+    {
+        return preventUserId;
+    }
+
+    public void setIdCard(String idCard) 
+    {
+        this.idCard = idCard;
+    }
+
+    public String getIdCard() 
+    {
+        return idCard;
+    }
+
+    public void setRealName(String realName) 
+    {
+        this.realName = realName;
+    }
+
+    public String getRealName() 
+    {
+        return realName;
+    }
+
+    public void setExpirationDate(String expirationDate) 
+    {
+        this.expirationDate = expirationDate;
+    }
+
+    public String getExpirationDate() 
+    {
+        return expirationDate;
+    }
+
+    public void setPhoneNumber(String phoneNumber) 
+    {
+        this.phoneNumber = phoneNumber;
+    }
+
+    public String getPhoneNumber() 
+    {
+        return phoneNumber;
+    }
+
+    public void setGender(String gender) 
+    {
+        this.gender = gender;
+    }
+
+    public String getGender() 
+    {
+        return gender;
+    }
+
+    public void setBirthdate(String birthdate) 
+    {
+        this.birthdate = birthdate;
+    }
+
+    public String getBirthdate() 
+    {
+        return birthdate;
+    }
+
+    public void setWyId(Long wyId) 
+    {
+        this.wyId = wyId;
+    }
+
+    public Long getWyId() 
+    {
+        return wyId;
+    }
+
+    public void setAddress(String address) 
+    {
+        this.address = address;
+    }
+
+    public String getAddress() 
+    {
+        return address;
+    }
+
+    public void setFront(String front) 
+    {
+        this.front = front;
+    }
+
+    public String getFront() 
+    {
+        return front;
+    }
+
+    public void setBack(String back) 
+    {
+        this.back = back;
+    }
+
+    public String getBack() 
+    {
+        return back;
+    }
+
+    public void setSchoolId(Long schoolId) 
+    {
+        this.schoolId = schoolId;
+    }
+
+    public Long getSchoolId() 
+    {
+        return schoolId;
+    }
+
+    public void setSchoolName(String schoolName) 
+    {
+        this.schoolName = schoolName;
+    }
+
+    public String getSchoolName() 
+    {
+        return schoolName;
+    }
+
+    public void setClassId(Long classId) 
+    {
+        this.classId = classId;
+    }
+
+    public Long getClassId() 
+    {
+        return classId;
+    }
+
+    public void setClassName(String className) 
+    {
+        this.className = className;
+    }
+
+    public String getClassName() 
+    {
+        return className;
+    }
+
+    public void setParentName(String parentName) 
+    {
+        this.parentName = parentName;
+    }
+
+    public String getParentName() 
+    {
+        return parentName;
+    }
+
+    public void setParentPhoneNumber(String parentPhoneNumber) 
+    {
+        this.parentPhoneNumber = parentPhoneNumber;
+    }
+
+    public String getParentPhoneNumber() 
+    {
+        return parentPhoneNumber;
+    }
+
+    public void setStudentIdCardPhoto(String studentIdCardPhoto) 
+    {
+        this.studentIdCardPhoto = studentIdCardPhoto;
+    }
+
+    public String getStudentIdCardPhoto() 
+    {
+        return studentIdCardPhoto;
+    }
+
+    public void setType(String type) 
+    {
+        this.type = type;
+    }
+
+    public String getType() 
+    {
+        return type;
+    }
+
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("preventUserId", getPreventUserId())
+            .append("idCard", getIdCard())
+            .append("realName", getRealName())
+            .append("expirationDate", getExpirationDate())
+            .append("phoneNumber", getPhoneNumber())
+            .append("gender", getGender())
+            .append("birthdate", getBirthdate())
+            .append("wyId", getWyId())
+            .append("address", getAddress())
+            .append("front", getFront())
+            .append("back", getBack())
+            .append("schoolId", getSchoolId())
+            .append("schoolName", getSchoolName())
+            .append("classId", getClassId())
+            .append("className", getClassName())
+            .append("parentName", getParentName())
+            .append("parentPhoneNumber", getParentPhoneNumber())
+            .append("studentIdCardPhoto", getStudentIdCardPhoto())
+            .append("type", getType())
+            .append("status", getStatus())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 62 - 0
ruoyi-system/src/main/java/com/ruoyi/manage/mapper/PreventUserMapper.java

@@ -0,0 +1,62 @@
+package com.ruoyi.manage.mapper;
+
+import com.ruoyi.manage.domain.PreventUser;
+
+import java.util.List;
+
+/**
+ * 防溺水人员信息Mapper接口
+ * 
+ * @author boman
+ * @date 2025-08-05
+ */
+public interface PreventUserMapper 
+{
+    /**
+     * 查询防溺水人员信息
+     * 
+     * @param preventUserId 防溺水人员信息主键
+     * @return 防溺水人员信息
+     */
+    public PreventUser selectPreventUserByPreventUserId(Long preventUserId);
+
+    /**
+     * 查询防溺水人员信息列表
+     * 
+     * @param preventUser 防溺水人员信息
+     * @return 防溺水人员信息集合
+     */
+    public List<PreventUser> selectPreventUserList(PreventUser preventUser);
+
+    /**
+     * 新增防溺水人员信息
+     * 
+     * @param preventUser 防溺水人员信息
+     * @return 结果
+     */
+    public int insertPreventUser(PreventUser preventUser);
+
+    /**
+     * 修改防溺水人员信息
+     * 
+     * @param preventUser 防溺水人员信息
+     * @return 结果
+     */
+    public int updatePreventUser(PreventUser preventUser);
+
+    /**
+     * 删除防溺水人员信息
+     * 
+     * @param preventUserId 防溺水人员信息主键
+     * @return 结果
+     */
+    public int deletePreventUserByPreventUserId(Long preventUserId);
+
+    /**
+     * 批量删除防溺水人员信息
+     * 
+     * @param preventUserIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deletePreventUserByPreventUserIds(Long[] preventUserIds);
+}

+ 62 - 0
ruoyi-system/src/main/java/com/ruoyi/manage/service/IPreventUserService.java

@@ -0,0 +1,62 @@
+package com.ruoyi.manage.service;
+
+import com.ruoyi.manage.domain.PreventUser;
+
+import java.util.List;
+
+/**
+ * 防溺水人员信息Service接口
+ * 
+ * @author boman
+ * @date 2025-08-05
+ */
+public interface IPreventUserService 
+{
+    /**
+     * 查询防溺水人员信息
+     * 
+     * @param preventUserId 防溺水人员信息主键
+     * @return 防溺水人员信息
+     */
+    public PreventUser selectPreventUserByPreventUserId(Long preventUserId);
+
+    /**
+     * 查询防溺水人员信息列表
+     * 
+     * @param preventUser 防溺水人员信息
+     * @return 防溺水人员信息集合
+     */
+    public List<PreventUser> selectPreventUserList(PreventUser preventUser);
+
+    /**
+     * 新增防溺水人员信息
+     * 
+     * @param preventUser 防溺水人员信息
+     * @return 结果
+     */
+    public int insertPreventUser(PreventUser preventUser);
+
+    /**
+     * 修改防溺水人员信息
+     * 
+     * @param preventUser 防溺水人员信息
+     * @return 结果
+     */
+    public int updatePreventUser(PreventUser preventUser);
+
+    /**
+     * 批量删除防溺水人员信息
+     * 
+     * @param preventUserIds 需要删除的防溺水人员信息主键集合
+     * @return 结果
+     */
+    public int deletePreventUserByPreventUserIds(Long[] preventUserIds);
+
+    /**
+     * 删除防溺水人员信息信息
+     * 
+     * @param preventUserId 防溺水人员信息主键
+     * @return 结果
+     */
+    public int deletePreventUserByPreventUserId(Long preventUserId);
+}

+ 97 - 0
ruoyi-system/src/main/java/com/ruoyi/manage/service/impl/PreventUserServiceImpl.java

@@ -0,0 +1,97 @@
+package com.ruoyi.manage.service.impl;
+
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.manage.domain.PreventUser;
+import com.ruoyi.manage.mapper.PreventUserMapper;
+import com.ruoyi.manage.service.IPreventUserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 防溺水人员信息Service业务层处理
+ * 
+ * @author boman
+ * @date 2025-08-05
+ */
+@Service
+public class PreventUserServiceImpl implements IPreventUserService 
+{
+    @Autowired
+    private PreventUserMapper preventUserMapper;
+
+    /**
+     * 查询防溺水人员信息
+     * 
+     * @param preventUserId 防溺水人员信息主键
+     * @return 防溺水人员信息
+     */
+    @Override
+    public PreventUser selectPreventUserByPreventUserId(Long preventUserId)
+    {
+        return preventUserMapper.selectPreventUserByPreventUserId(preventUserId);
+    }
+
+    /**
+     * 查询防溺水人员信息列表
+     * 
+     * @param preventUser 防溺水人员信息
+     * @return 防溺水人员信息
+     */
+    @Override
+    public List<PreventUser> selectPreventUserList(PreventUser preventUser)
+    {
+        return preventUserMapper.selectPreventUserList(preventUser);
+    }
+
+    /**
+     * 新增防溺水人员信息
+     * 
+     * @param preventUser 防溺水人员信息
+     * @return 结果
+     */
+    @Override
+    public int insertPreventUser(PreventUser preventUser)
+    {
+        preventUser.setCreateTime(DateUtils.getNowDate());
+        return preventUserMapper.insertPreventUser(preventUser);
+    }
+
+    /**
+     * 修改防溺水人员信息
+     * 
+     * @param preventUser 防溺水人员信息
+     * @return 结果
+     */
+    @Override
+    public int updatePreventUser(PreventUser preventUser)
+    {
+        preventUser.setUpdateTime(DateUtils.getNowDate());
+        return preventUserMapper.updatePreventUser(preventUser);
+    }
+
+    /**
+     * 批量删除防溺水人员信息
+     * 
+     * @param preventUserIds 需要删除的防溺水人员信息主键
+     * @return 结果
+     */
+    @Override
+    public int deletePreventUserByPreventUserIds(Long[] preventUserIds)
+    {
+        return preventUserMapper.deletePreventUserByPreventUserIds(preventUserIds);
+    }
+
+    /**
+     * 删除防溺水人员信息信息
+     * 
+     * @param preventUserId 防溺水人员信息主键
+     * @return 结果
+     */
+    @Override
+    public int deletePreventUserByPreventUserId(Long preventUserId)
+    {
+        return preventUserMapper.deletePreventUserByPreventUserId(preventUserId);
+    }
+}

+ 6 - 1
ruoyi-system/src/main/resources/mapper/manage/ClockSetMapper.xml

@@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
     <resultMap type="ClockSet" id="ClockSetResult">
         <result property="clockSetId"    column="clock_set_id"    />
+        <result property="clockName"    column="clock_name"    />
         <result property="clockBeginAm"    column="clock_begin_am"    />
         <result property="clockEndAm"    column="clock_end_am"    />
         <result property="clockBeginPm"    column="clock_begin_pm"    />
@@ -18,12 +19,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectClockSetVo">
-        select clock_set_id, clock_begin_am, clock_end_am, clock_begin_pm, clock_end_pm, create_by, create_time, update_by, update_time, remark from clock_set
+        select clock_set_id,clock_name, clock_begin_am, clock_end_am, clock_begin_pm, clock_end_pm, create_by, create_time, update_by, update_time, remark from clock_set
     </sql>
 
     <select id="selectClockSetList" parameterType="ClockSet" resultMap="ClockSetResult">
         <include refid="selectClockSetVo"/>
         <where>  
+            <if test="clockName != null "> and clock_name = #{clockName}</if>
             <if test="clockBeginAm != null "> and clock_begin_am = #{clockBeginAm}</if>
             <if test="clockEndAm != null "> and clock_end_am = #{clockEndAm}</if>
             <if test="clockBeginPm != null "> and clock_begin_pm = #{clockBeginPm}</if>
@@ -39,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <insert id="insertClockSet" parameterType="ClockSet" useGeneratedKeys="true" keyProperty="clockSetId">
         insert into clock_set
         <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="clockName != null">clock_name,</if>
             <if test="clockBeginAm != null">clock_begin_am,</if>
             <if test="clockEndAm != null">clock_end_am,</if>
             <if test="clockBeginPm != null">clock_begin_pm,</if>
@@ -50,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="remark != null">remark,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="clockName != null">#{clockName},</if>
             <if test="clockBeginAm != null">#{clockBeginAm},</if>
             <if test="clockEndAm != null">#{clockEndAm},</if>
             <if test="clockBeginPm != null">#{clockBeginPm},</if>
@@ -65,6 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <update id="updateClockSet" parameterType="ClockSet">
         update clock_set
         <trim prefix="SET" suffixOverrides=",">
+            <if test="clockName != null">clock_name = #{clockName},</if>
             <if test="clockBeginAm != null">clock_begin_am = #{clockBeginAm},</if>
             <if test="clockEndAm != null">clock_end_am = #{clockEndAm},</if>
             <if test="clockBeginPm != null">clock_begin_pm = #{clockBeginPm},</if>

+ 166 - 0
ruoyi-system/src/main/resources/mapper/manage/PreventUserMapper.xml

@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.manage.mapper.PreventUserMapper">
+    
+    <resultMap type="PreventUser" id="PreventUserResult">
+        <result property="preventUserId"    column="prevent_user_id"    />
+        <result property="idCard"    column="id_card"    />
+        <result property="realName"    column="real_name"    />
+        <result property="expirationDate"    column="expiration_date"    />
+        <result property="phoneNumber"    column="phone_number"    />
+        <result property="gender"    column="gender"    />
+        <result property="birthdate"    column="birthdate"    />
+        <result property="wyId"    column="wy_id"    />
+        <result property="address"    column="address"    />
+        <result property="front"    column="front"    />
+        <result property="back"    column="back"    />
+        <result property="schoolId"    column="school_id"    />
+        <result property="schoolName"    column="school_name"    />
+        <result property="classId"    column="class_id"    />
+        <result property="className"    column="class_name"    />
+        <result property="parentName"    column="parent_name"    />
+        <result property="parentPhoneNumber"    column="parent_phone_number"    />
+        <result property="studentIdCardPhoto"    column="student_id_card_photo"    />
+        <result property="type"    column="type"    />
+        <result property="status"    column="status"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectPreventUserVo">
+        select prevent_user_id, id_card, real_name, expiration_date, phone_number, gender, birthdate, wy_id, address, front, back, school_id, school_name, class_id, class_name, parent_name, parent_phone_number, student_id_card_photo, type, status, create_by, create_time, update_by, update_time, remark from prevent_user
+    </sql>
+
+    <select id="selectPreventUserList" parameterType="PreventUser" resultMap="PreventUserResult">
+        <include refid="selectPreventUserVo"/>
+        <where>  
+            <if test="idCard != null  and idCard != ''"> and id_card = #{idCard}</if>
+            <if test="realName != null  and realName != ''"> and real_name like concat('%', #{realName}, '%')</if>
+            <if test="expirationDate != null  and expirationDate != ''"> and expiration_date = #{expirationDate}</if>
+            <if test="phoneNumber != null  and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>
+            <if test="gender != null  and gender != ''"> and gender = #{gender}</if>
+            <if test="birthdate != null  and birthdate != ''"> and birthdate = #{birthdate}</if>
+            <if test="wyId != null "> and wy_id = #{wyId}</if>
+            <if test="address != null  and address != ''"> and address = #{address}</if>
+            <if test="front != null  and front != ''"> and front = #{front}</if>
+            <if test="back != null  and back != ''"> and back = #{back}</if>
+            <if test="schoolId != null "> and school_id = #{schoolId}</if>
+            <if test="schoolName != null  and schoolName != ''"> and school_name like concat('%', #{schoolName}, '%')</if>
+            <if test="classId != null "> and class_id = #{classId}</if>
+            <if test="className != null  and className != ''"> and class_name like concat('%', #{className}, '%')</if>
+            <if test="parentName != null  and parentName != ''"> and parent_name like concat('%', #{parentName}, '%')</if>
+            <if test="parentPhoneNumber != null  and parentPhoneNumber != ''"> and parent_phone_number = #{parentPhoneNumber}</if>
+            <if test="studentIdCardPhoto != null  and studentIdCardPhoto != ''"> and student_id_card_photo = #{studentIdCardPhoto}</if>
+            <if test="type != null  and type != ''"> and type = #{type}</if>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+        </where>
+    </select>
+    
+    <select id="selectPreventUserByPreventUserId" parameterType="Long" resultMap="PreventUserResult">
+        <include refid="selectPreventUserVo"/>
+        where prevent_user_id = #{preventUserId}
+    </select>
+
+    <insert id="insertPreventUser" parameterType="PreventUser" useGeneratedKeys="true" keyProperty="preventUserId">
+        insert into prevent_user
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="idCard != null and idCard != ''">id_card,</if>
+            <if test="realName != null and realName != ''">real_name,</if>
+            <if test="expirationDate != null and expirationDate != ''">expiration_date,</if>
+            <if test="phoneNumber != null">phone_number,</if>
+            <if test="gender != null">gender,</if>
+            <if test="birthdate != null">birthdate,</if>
+            <if test="wyId != null">wy_id,</if>
+            <if test="address != null and address != ''">address,</if>
+            <if test="front != null and front != ''">front,</if>
+            <if test="back != null and back != ''">back,</if>
+            <if test="schoolId != null">school_id,</if>
+            <if test="schoolName != null and schoolName != ''">school_name,</if>
+            <if test="classId != null">class_id,</if>
+            <if test="className != null and className != ''">class_name,</if>
+            <if test="parentName != null">parent_name,</if>
+            <if test="parentPhoneNumber != null">parent_phone_number,</if>
+            <if test="studentIdCardPhoto != null">student_id_card_photo,</if>
+            <if test="type != null">type,</if>
+            <if test="status != null">status,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="idCard != null and idCard != ''">#{idCard},</if>
+            <if test="realName != null and realName != ''">#{realName},</if>
+            <if test="expirationDate != null and expirationDate != ''">#{expirationDate},</if>
+            <if test="phoneNumber != null">#{phoneNumber},</if>
+            <if test="gender != null">#{gender},</if>
+            <if test="birthdate != null">#{birthdate},</if>
+            <if test="wyId != null">#{wyId},</if>
+            <if test="address != null and address != ''">#{address},</if>
+            <if test="front != null and front != ''">#{front},</if>
+            <if test="back != null and back != ''">#{back},</if>
+            <if test="schoolId != null">#{schoolId},</if>
+            <if test="schoolName != null and schoolName != ''">#{schoolName},</if>
+            <if test="classId != null">#{classId},</if>
+            <if test="className != null and className != ''">#{className},</if>
+            <if test="parentName != null">#{parentName},</if>
+            <if test="parentPhoneNumber != null">#{parentPhoneNumber},</if>
+            <if test="studentIdCardPhoto != null">#{studentIdCardPhoto},</if>
+            <if test="type != null">#{type},</if>
+            <if test="status != null">#{status},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updatePreventUser" parameterType="PreventUser">
+        update prevent_user
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="idCard != null and idCard != ''">id_card = #{idCard},</if>
+            <if test="realName != null and realName != ''">real_name = #{realName},</if>
+            <if test="expirationDate != null and expirationDate != ''">expiration_date = #{expirationDate},</if>
+            <if test="phoneNumber != null">phone_number = #{phoneNumber},</if>
+            <if test="gender != null">gender = #{gender},</if>
+            <if test="birthdate != null">birthdate = #{birthdate},</if>
+            <if test="wyId != null">wy_id = #{wyId},</if>
+            <if test="address != null and address != ''">address = #{address},</if>
+            <if test="front != null and front != ''">front = #{front},</if>
+            <if test="back != null and back != ''">back = #{back},</if>
+            <if test="schoolId != null">school_id = #{schoolId},</if>
+            <if test="schoolName != null and schoolName != ''">school_name = #{schoolName},</if>
+            <if test="classId != null">class_id = #{classId},</if>
+            <if test="className != null and className != ''">class_name = #{className},</if>
+            <if test="parentName != null">parent_name = #{parentName},</if>
+            <if test="parentPhoneNumber != null">parent_phone_number = #{parentPhoneNumber},</if>
+            <if test="studentIdCardPhoto != null">student_id_card_photo = #{studentIdCardPhoto},</if>
+            <if test="type != null">type = #{type},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where prevent_user_id = #{preventUserId}
+    </update>
+
+    <delete id="deletePreventUserByPreventUserId" parameterType="Long">
+        delete from prevent_user where prevent_user_id = #{preventUserId}
+    </delete>
+
+    <delete id="deletePreventUserByPreventUserIds" parameterType="String">
+        delete from prevent_user where prevent_user_id in 
+        <foreach item="preventUserId" collection="array" open="(" separator="," close=")">
+            #{preventUserId}
+        </foreach>
+    </delete>
+</mapper>

+ 0 - 67
ry.bat

@@ -1,67 +0,0 @@
-@echo off
-
-rem jar平级目录
-set AppName=ruoyi-admin.jar
-
-rem JVM参数
-set JVM_OPTS="-Dname=%AppName%  -Duser.timezone=Asia/Shanghai -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDateStamps  -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC -XX:+UseParallelOldGC"
-
-
-ECHO.
-	ECHO.  [1] 启动%AppName%
-	ECHO.  [2] 关闭%AppName%
-	ECHO.  [3] 重启%AppName%
-	ECHO.  [4] 启动状态 %AppName%
-	ECHO.  [5] 退 出
-ECHO.
-
-ECHO.请输入选择项目的序号:
-set /p ID=
-	IF "%id%"=="1" GOTO start
-	IF "%id%"=="2" GOTO stop
-	IF "%id%"=="3" GOTO restart
-	IF "%id%"=="4" GOTO status
-	IF "%id%"=="5" EXIT
-PAUSE
-:start
-    for /f "usebackq tokens=1-2" %%a in (`jps -l ^| findstr %AppName%`) do (
-		set pid=%%a
-		set image_name=%%b
-	)
-	if  defined pid (
-		echo %%is running
-		PAUSE
-	)
-
-start javaw %JVM_OPTS% -jar %AppName%
-
-echo  starting……
-echo  Start %AppName% success...
-goto:eof
-
-rem 函数stop通过jps命令查找pid并结束进程
-:stop
-	for /f "usebackq tokens=1-2" %%a in (`jps -l ^| findstr %AppName%`) do (
-		set pid=%%a
-		set image_name=%%b
-	)
-	if not defined pid (echo process %AppName% does not exists) else (
-		echo prepare to kill %image_name%
-		echo start kill %pid% ...
-		rem 根据进程ID,kill进程
-		taskkill /f /pid %pid%
-	)
-goto:eof
-:restart
-	call :stop
-    call :start
-goto:eof
-:status
-	for /f "usebackq tokens=1-2" %%a in (`jps -l ^| findstr %AppName%`) do (
-		set pid=%%a
-		set image_name=%%b
-	)
-	if not defined pid (echo process %AppName% is dead ) else (
-		echo %image_name% is running
-	)
-goto:eof

+ 0 - 86
ry.sh

@@ -1,86 +0,0 @@
-#!/bin/sh
-# ./ry.sh start 启动 stop 停止 restart 重启 status 状态
-AppName=ruoyi-admin.jar
-
-# JVM参数
-JVM_OPTS="-Dname=$AppName  -Duser.timezone=Asia/Shanghai -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDateStamps  -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC -XX:+UseParallelOldGC"
-APP_HOME=`pwd`
-LOG_PATH=$APP_HOME/logs/$AppName.log
-
-if [ "$1" = "" ];
-then
-    echo -e "\033[0;31m 未输入操作名 \033[0m  \033[0;34m {start|stop|restart|status} \033[0m"
-    exit 1
-fi
-
-if [ "$AppName" = "" ];
-then
-    echo -e "\033[0;31m 未输入应用名 \033[0m"
-    exit 1
-fi
-
-function start()
-{
-    PID=`ps -ef |grep java|grep $AppName|grep -v grep|awk '{print $2}'`
-
-	if [ x"$PID" != x"" ]; then
-	    echo "$AppName is running..."
-	else
-		nohup java $JVM_OPTS -jar $AppName > /dev/null 2>&1 &
-		echo "Start $AppName success..."
-	fi
-}
-
-function stop()
-{
-    echo "Stop $AppName"
-
-	PID=""
-	query(){
-		PID=`ps -ef |grep java|grep $AppName|grep -v grep|awk '{print $2}'`
-	}
-
-	query
-	if [ x"$PID" != x"" ]; then
-		kill -TERM $PID
-		echo "$AppName (pid:$PID) exiting..."
-		while [ x"$PID" != x"" ]
-		do
-			sleep 1
-			query
-		done
-		echo "$AppName exited."
-	else
-		echo "$AppName already stopped."
-	fi
-}
-
-function restart()
-{
-    stop
-    sleep 2
-    start
-}
-
-function status()
-{
-    PID=`ps -ef |grep java|grep $AppName|grep -v grep|wc -l`
-    if [ $PID != 0 ];then
-        echo "$AppName is running..."
-    else
-        echo "$AppName is not running..."
-    fi
-}
-
-case $1 in
-    start)
-    start;;
-    stop)
-    stop;;
-    restart)
-    restart;;
-    status)
-    status;;
-    *)
-
-esac

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio