瀏覽代碼

app在线更新,海康威视平台对接

LIVE_YE 11 月之前
父節點
當前提交
b186dd1ef7
共有 21 個文件被更改,包括 947 次插入4 次删除
  1. 54 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/camera/CameraController.java
  2. 101 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/UpdateAppController.java
  3. 1 1
      ruoyi-admin/src/main/resources/application-druid.yml
  4. 7 0
      ruoyi-common/pom.xml
  5. 1 1
      ruoyi-common/src/main/java/com/ruoyi/common/utils/file/MimeTypeUtils.java
  6. 96 0
      ruoyi-common/src/main/java/com/ruoyi/common/utils/hkws/GetCameraPreviewURL.java
  7. 1 1
      ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
  8. 13 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/PersonnelManagement.java
  9. 122 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/UpdateApp.java
  10. 107 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CameraInfoVo.java
  11. 66 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/UpdateAppMapper.java
  12. 11 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/CameraService.java
  13. 64 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IUpdateAppService.java
  14. 1 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BomanReservatServiceImpl.java
  15. 77 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CameraServiceImpl.java
  16. 110 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UpdateAppServiceImpl.java
  17. 1 0
      ruoyi-system/src/main/resources/mapper/system/AccessRecordMapper.xml
  18. 1 0
      ruoyi-system/src/main/resources/mapper/system/BomanReservatConfigTimeMapper.xml
  19. 1 0
      ruoyi-system/src/main/resources/mapper/system/BomanReservatMapper.xml
  20. 9 1
      ruoyi-system/src/main/resources/mapper/system/PersonnelManagementMapper.xml
  21. 103 0
      ruoyi-system/src/main/resources/mapper/system/UpdateAppMapper.xml

+ 54 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/camera/CameraController.java

@@ -0,0 +1,54 @@
+package com.ruoyi.web.controller.camera;
+
+import com.alibaba.fastjson2.JSONObject;
+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.system.domain.PersonnelManagement;
+import com.ruoyi.system.domain.vo.CameraInfoVo;
+import com.ruoyi.system.service.CameraService;
+import com.ruoyi.system.service.IPersonnelManagementService;
+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 ruoyi
+ * @date 2024-02-28
+ */
+@RestController
+@RequestMapping("/camera")
+public class CameraController extends BaseController {
+
+    @Autowired
+    private CameraService cameraService;
+
+    /**
+     * 查询安防设备列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:camera:list')")
+    @GetMapping("/list")
+    public AjaxResult list(CameraInfoVo cameraInfoVo) {
+        return cameraService.selectCameraList(cameraInfoVo);
+    }
+
+
+    /**
+     * 获取设备视频地址
+     */
+    @PreAuthorize("@ss.hasPermi('system:camera:video')")
+    @GetMapping("/video/{cameraIndexCode}")
+    public AjaxResult video(@PathVariable String cameraIndexCode) {
+        return cameraService.video(cameraIndexCode);
+    }
+
+
+}

+ 101 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/UpdateAppController.java

@@ -0,0 +1,101 @@
+package com.ruoyi.web.controller.system;
+
+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.system.domain.UpdateApp;
+import com.ruoyi.system.service.IUpdateAppService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Controller
+ * 
+ * @author ruoyi
+ * @date 2023-02-16
+ */
+@RestController
+@RequestMapping("/system/app")
+public class UpdateAppController extends BaseController
+{
+    @Autowired
+    private IUpdateAppService updateAppService;
+
+    /**
+     * 查询【请填写功能名称】列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(UpdateApp updateApp)
+    {
+        startPage();
+        List<UpdateApp> list = updateAppService.selectUpdateAppList(updateApp);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出【请填写功能名称】列表
+     */
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, UpdateApp updateApp)
+    {
+        List<UpdateApp> list = updateAppService.selectUpdateAppList(updateApp);
+        ExcelUtil<UpdateApp> util = new ExcelUtil<UpdateApp>(UpdateApp.class);
+        util.exportExcel(response, list, "【请填写功能名称】数据");
+    }
+
+    /**
+     * 获取【请填写功能名称】详细信息
+     */
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(updateAppService.selectUpdateAppById(id));
+    }
+
+    /**
+     * 新增【请填写功能名称】
+     */
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody UpdateApp updateApp)
+    {
+        return toAjax(updateAppService.insertUpdateApp(updateApp));
+    }
+
+    /**
+     * 修改【请填写功能名称】
+     */
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
+    @PostMapping("/put")
+    public AjaxResult edit(@RequestBody UpdateApp updateApp)
+    {
+        return toAjax(updateAppService.updateUpdateApp(updateApp));
+    }
+
+    /**
+     * 删除【请填写功能名称】
+     */
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
+    @GetMapping("/delete/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(updateAppService.deleteUpdateAppByIds(ids));
+    }
+
+
+    /**
+     * 获取当前最新版本数据
+     */
+    @GetMapping(value = "/new")
+    public AjaxResult getInfoNew(UpdateApp updateApp)
+    {
+        return success(updateAppService.getInfoNew(updateApp));
+    }
+}

+ 1 - 1
ruoyi-admin/src/main/resources/application-druid.yml

@@ -37,7 +37,7 @@ spring:
         # 端口,默认为6379
         port: 20001
         # 数据库索引
-        database: 7
+        database: 8
         # 密码
         password: Boman123
         # 连接超时时间

+ 7 - 0
ruoyi-common/pom.xml

@@ -126,6 +126,13 @@
             <artifactId>javax.servlet-api</artifactId>
         </dependency>
 
+        <!--Hikvision OpenAPI安全认证库 -->
+        <dependency>
+            <groupId>com.hikvision.ga</groupId>
+            <artifactId>artemis-http-client</artifactId>
+            <version>1.1.3</version>
+        </dependency>
+
     </dependencies>
 
 </project>

+ 1 - 1
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/MimeTypeUtils.java

@@ -36,7 +36,7 @@ public class MimeTypeUtils
             // 视频格式
             "mp4", "avi", "rmvb",
             // pdf
-            "pdf" };
+            "pdf","wgt","apk" };
 
     public static String getExtension(String prefix)
     {

+ 96 - 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/hkws/GetCameraPreviewURL.java

@@ -0,0 +1,96 @@
+package com.ruoyi.common.utils.hkws;
+
+import com.hikvision.artemis.sdk.ArtemisHttpUtil;
+import com.hikvision.artemis.sdk.config.ArtemisConfig;
+import com.alibaba.fastjson2.JSONObject;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class GetCameraPreviewURL {
+
+    public static String GetCameraPreviewURL(String url,String body) {
+
+        /**
+         * STEP1:设置平台参数,根据实际情况,设置host appkey appsecret 三个参数.
+         */
+        ArtemisConfig.host = "60.171.161.56:1443"; // 平台的ip端口
+        ArtemisConfig.appKey = "25679504";  // 密钥appkey
+        ArtemisConfig.appSecret = "9F3cOy6JnpHeOeDOYcgP";// 密钥appSecret
+
+        /**
+         * STEP2:设置OpenAPI接口的上下文
+         */
+        final String ARTEMIS_PATH = "/artemis";
+
+        /**
+         * STEP3:设置接口的URI地址
+         */
+        //final String previewURLsApi = ARTEMIS_PATH + "/api/resource/v1/cameras";
+        final String previewURLsApi = ARTEMIS_PATH + url;
+        Map<String, String> path = new HashMap<String, String>(2) {
+            {
+                put("https://", previewURLsApi);//根据现场环境部署确认是http还是https
+            }
+        };
+
+        /**
+         * STEP4:设置参数提交方式
+         */
+        String contentType = "application/json";
+        /**
+         * STEP6:调用接口
+         */
+        String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, contentType , null);// post请求application/json类型参数
+        return result;
+    }
+
+   /* public static void main(String[] args) {
+
+        *//**
+         * STEP3:设置接口的URI地址
+         *//*
+        String url = "/api/resource/v2/door/search";
+
+        *//**
+         * STEP5:组装请求参数
+         *//*
+        JSONObject jsonBody = new JSONObject();
+        jsonBody.put("pageNo", 1);
+        jsonBody.put("pageSize", 60);
+        *//*jsonBody.put("receptionistId", "123v453673dsferf12312");
+        JSONObject jsonBody2 = new JSONObject();
+        jsonBody2.put("defaultPrivilegeGroupFlag","1");
+        String[] privilegeGroupIds = {"793d155-3cc3-4b2a-bb23-8507552863"};
+        jsonBody2.put("privilegeGroupIds",privilegeGroupIds);
+        jsonBody.put("visitorPermissionSet",jsonBody2);
+
+        jsonBody.put("visitStartTime", "2024-06-28T15:00:00+08:00");
+        jsonBody.put("visitEndTime", "2024-06-28T19:00:00+08:00");
+        jsonBody.put("visitPurpose",  "参观");
+        List<JSONObject> jSONObjectList = new ArrayList<>();
+        JSONObject jsonBody3 = new JSONObject();
+        jsonBody3.put("visitorName","张三");
+        jsonBody3.put("gender",1);
+        jsonBody3.put("phoneNo","18297543143");
+        jsonBody3.put("plateNo","浙A12345");
+        jsonBody3.put("certificateType",111);
+        jsonBody3.put("certificateNo","312488198704015698");
+        jsonBody3.put("certAddr","江苏南京");
+        jsonBody3.put("certIssuer","南京市政府");
+        jsonBody3.put("nation",1);
+        jsonBody3.put("birthplace","江苏南京");
+        jsonBody3.put("visitorPhoto","cMc8yMjIfE87ujdq0nvyPcKodJ3XPpvt//2Q==");
+        jsonBody3.put("visitorWorkUnit","海康威视");
+        jsonBody3.put("visitorAddress","人民路一号");
+        jSONObjectList.add(jsonBody3);
+
+        jsonBody.put("visitorInfoList", jSONObjectList);*//*
+
+
+
+
+        String result = GetCameraPreviewURL(url,jsonBody.toString());
+        System.out.println("result结果示例: " + result);
+    }*/
+}

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

@@ -114,7 +114,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
                 .antMatchers("/login", "/register", "/captchaImage").permitAll()
                 // 静态资源,可匿名访问
                 .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
-                .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
+                .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**","/system/app/new").permitAll()
                 // 除上面外的所有请求全部需要鉴权认证
                 .anyRequest().authenticated()
                 .and()

+ 13 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/PersonnelManagement.java

@@ -42,6 +42,11 @@ public class PersonnelManagement extends BaseEntity
     @Excel(name = "门禁")
     private String guard;
 
+    /** 是否启用  0:是,1:否 */
+    @Excel(name = "是否启用  0:是,1:否")
+    private String isEnable;
+
+
     /** 创建部门 */
     @Excel(name = "创建部门")
     private Long createDept;
@@ -119,6 +124,14 @@ public class PersonnelManagement extends BaseEntity
         return createDept;
     }
 
+    public String getIsEnable() {
+        return isEnable;
+    }
+
+    public void setIsEnable(String isEnable) {
+        this.isEnable = isEnable;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 122 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/UpdateApp.java

@@ -0,0 +1,122 @@
+package com.ruoyi.system.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 【请填写功能名称】对象 update_app
+ * 
+ * @author ruoyi
+ * @date 2023-02-16
+ */
+public class UpdateApp extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /**  */
+    private Long id;
+
+    /** 系统:Android:安卓系统,Apple:苹果系统 */
+    @Excel(name = "系统:Android:安卓系统,Apple:苹果系统")
+    private String model;
+
+    /** 版本名称 */
+    @Excel(name = "版本名称")
+    private String name;
+
+    /** 版本号 */
+    @Excel(name = "版本号")
+    private String code;
+
+    /** 版本描述 */
+    @Excel(name = "版本描述")
+    private String description;
+
+    /** 下载地址 */
+    @Excel(name = "下载地址")
+    private String path;
+
+    /** 是否有效 0:失效 1:有效 */
+    @Excel(name = "是否有效 0:失效 1:有效")
+    private String isDel;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setModel(String model) 
+    {
+        this.model = model;
+    }
+
+    public String getModel() 
+    {
+        return model;
+    }
+    public void setName(String name) 
+    {
+        this.name = name;
+    }
+
+    public String getName() 
+    {
+        return name;
+    }
+    public void setCode(String code) 
+    {
+        this.code = code;
+    }
+
+    public String getCode() 
+    {
+        return code;
+    }
+    public void setDescription(String description) 
+    {
+        this.description = description;
+    }
+
+    public String getDescription() 
+    {
+        return description;
+    }
+    public void setPath(String path) 
+    {
+        this.path = path;
+    }
+
+    public String getPath() 
+    {
+        return path;
+    }
+    public void setIsDel(String isDel) 
+    {
+        this.isDel = isDel;
+    }
+
+    public String getIsDel() 
+    {
+        return isDel;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("model", getModel())
+            .append("name", getName())
+            .append("code", getCode())
+            .append("description", getDescription())
+            .append("path", getPath())
+            .append("isDel", getIsDel())
+            .append("createTime", getCreateTime())
+            .toString();
+    }
+}

+ 107 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/CameraInfoVo.java

@@ -0,0 +1,107 @@
+package com.ruoyi.system.domain.vo;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 人员管理对象 personnel_management
+ * 
+ * @author ruoyi
+ * @date 2024-02-28
+ */
+public class CameraInfoVo extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 名称,模糊搜索,最大长度32 */
+    private String name;
+
+    /** 区域编号,可以为空;支持根据区域批量查询; */
+    private String[] regionIndexCodes;
+
+    /** true时,搜索regionIndexCodes及其子孙区域的资源;
+     false时,只搜索 regionIndexCodes的资源;
+     isSubRegion不为空,regionIndexCodes也不可为空 */
+    private String isSubRegion;
+
+    /** 当前页码 */
+    private int pageNo;
+
+    /** 分页大小 */
+    private int pageSize;
+
+    /** 权限码集合 */
+    private String[] authCodes;
+
+    /** 排序字段,注意:排序字段必须是查询条件,否则返回参数错误 */
+    private String orderBy;
+
+    /** 降序升序,降序:desc 升序:asc */
+    private String orderType;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String[] getRegionIndexCodes() {
+        return regionIndexCodes;
+    }
+
+    public void setRegionIndexCodes(String[] regionIndexCodes) {
+        this.regionIndexCodes = regionIndexCodes;
+    }
+
+    public String getIsSubRegion() {
+        return isSubRegion;
+    }
+
+    public void setIsSubRegion(String isSubRegion) {
+        this.isSubRegion = isSubRegion;
+    }
+
+    public int getPageNo() {
+        return pageNo;
+    }
+
+    public void setPageNo(int pageNo) {
+        this.pageNo = pageNo;
+    }
+
+    public int getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(int pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    public String[] getAuthCodes() {
+        return authCodes;
+    }
+
+    public void setAuthCodes(String[] authCodes) {
+        this.authCodes = authCodes;
+    }
+
+    public String getOrderBy() {
+        return orderBy;
+    }
+
+    public void setOrderBy(String orderBy) {
+        this.orderBy = orderBy;
+    }
+
+    public String getOrderType() {
+        return orderType;
+    }
+
+    public void setOrderType(String orderType) {
+        this.orderType = orderType;
+    }
+}

+ 66 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/UpdateAppMapper.java

@@ -0,0 +1,66 @@
+package com.ruoyi.system.mapper;
+
+import com.ruoyi.system.domain.UpdateApp;
+
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-02-16
+ */
+public interface UpdateAppMapper 
+{
+    /**
+     * 查询【请填写功能名称】
+     * 
+     * @param id 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    public UpdateApp selectUpdateAppById(Long id);
+
+    /**
+     * 查询【请填写功能名称】列表
+     * 
+     * @param updateApp 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+    public List<UpdateApp> selectUpdateAppList(UpdateApp updateApp);
+
+    /**
+     * 新增【请填写功能名称】
+     * 
+     * @param updateApp 【请填写功能名称】
+     * @return 结果
+     */
+    public int insertUpdateApp(UpdateApp updateApp);
+
+    /**
+     * 修改【请填写功能名称】
+     * 
+     * @param updateApp 【请填写功能名称】
+     * @return 结果
+     */
+    public int updateUpdateApp(UpdateApp updateApp);
+
+    /**
+     * 删除【请填写功能名称】
+     * 
+     * @param id 【请填写功能名称】主键
+     * @return 结果
+     */
+    public int deleteUpdateAppById(Long id);
+
+    /**
+     * 批量删除【请填写功能名称】
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteUpdateAppByIds(Long[] ids);
+
+    UpdateApp getInfo(UpdateApp updateApp);
+
+    void updateUpdateAppAll(UpdateApp update);
+}

+ 11 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/CameraService.java

@@ -0,0 +1,11 @@
+package com.ruoyi.system.service;
+
+import com.alibaba.fastjson2.JSONObject;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.system.domain.vo.CameraInfoVo;
+
+public interface CameraService {
+    AjaxResult selectCameraList(CameraInfoVo cameraInfoVo);
+
+    AjaxResult video(String cameraIndexCode);
+}

+ 64 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IUpdateAppService.java

@@ -0,0 +1,64 @@
+package com.ruoyi.system.service;
+
+import com.ruoyi.system.domain.UpdateApp;
+
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-02-16
+ */
+public interface IUpdateAppService 
+{
+    /**
+     * 查询【请填写功能名称】
+     * 
+     * @param id 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    public UpdateApp selectUpdateAppById(Long id);
+
+    /**
+     * 查询【请填写功能名称】列表
+     * 
+     * @param updateApp 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+    public List<UpdateApp> selectUpdateAppList(UpdateApp updateApp);
+
+    /**
+     * 新增【请填写功能名称】
+     * 
+     * @param updateApp 【请填写功能名称】
+     * @return 结果
+     */
+    public int insertUpdateApp(UpdateApp updateApp);
+
+    /**
+     * 修改【请填写功能名称】
+     * 
+     * @param updateApp 【请填写功能名称】
+     * @return 结果
+     */
+    public int updateUpdateApp(UpdateApp updateApp);
+
+    /**
+     * 批量删除【请填写功能名称】
+     * 
+     * @param ids 需要删除的【请填写功能名称】主键集合
+     * @return 结果
+     */
+    public int deleteUpdateAppByIds(Long[] ids);
+
+    /**
+     * 删除【请填写功能名称】信息
+     * 
+     * @param id 【请填写功能名称】主键
+     * @return 结果
+     */
+    public int deleteUpdateAppById(Long id);
+
+    UpdateApp getInfoNew(UpdateApp updateApp);
+}

+ 1 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BomanReservatServiceImpl.java

@@ -55,6 +55,7 @@ public class BomanReservatServiceImpl implements IBomanReservatService
     @Override
     public int insertBomanReservat(BomanReservat bomanReservat)
     {
+
         bomanReservat.setCreateTime(DateUtils.getNowDate());
         return bomanReservatMapper.insertBomanReservat(bomanReservat);
     }

+ 77 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CameraServiceImpl.java

@@ -0,0 +1,77 @@
+package com.ruoyi.system.service.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONArray;
+import com.alibaba.fastjson2.JSONObject;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.exception.ServiceException;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.hkws.GetCameraPreviewURL;
+import com.ruoyi.system.domain.vo.CameraInfoVo;
+import com.ruoyi.system.service.CameraService;
+import org.apache.poi.ss.usermodel.DateUtil;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+
+
+/**
+ * 监控Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2024-06-25
+ */
+@Service
+public class CameraServiceImpl implements CameraService {
+    @Override
+    public AjaxResult selectCameraList(CameraInfoVo cameraInfoVo) {
+        /**
+         * STEP3:设置接口的URI地址
+         */
+        String url = "/api/resource/v2/camera/search";
+
+        /**
+         * STEP5:组装请求参数
+         */
+        String body = JSONArray.toJSONString(cameraInfoVo);
+
+        /*JSONObject jsonBody = new JSONObject();
+        jsonBody.put("cameraIndexCode", "8e59cc5559904589938be47888e5214a");
+        jsonBody.put("streamType", 0);
+        jsonBody.put("protocol", "httpflv");
+        jsonBody.put("transmode", 1);
+        jsonBody.put("expand", "streamform=ps");*/
+       /* jsonBody.put("pageNo", 1);
+        jsonBody.put("pageSize", 30);*/
+
+        String result = GetCameraPreviewURL.GetCameraPreviewURL(url,body);
+        JSONObject jsonObject = JSON.parseObject(result);
+        return AjaxResult.success(jsonObject);
+    }
+
+    @Override
+    public AjaxResult video(String cameraIndexCode) {
+        if(StringUtils.isEmpty(cameraIndexCode)){
+            throw new ServiceException("参数错误");
+        }
+        /**
+         * STEP3:设置接口的URI地址
+         */
+        String url = "/api/video/v2/cameras/previewURLs";
+
+        /**
+         * STEP5:组装请求参数
+         */
+        JSONObject jsonBody = new JSONObject();
+        jsonBody.put("cameraIndexCode", cameraIndexCode);
+        jsonBody.put("streamType", 0);
+        jsonBody.put("protocol", "httpflv");
+        jsonBody.put("transmode", 1);
+        jsonBody.put("expand", "streamform=ps");
+
+        String result = GetCameraPreviewURL.GetCameraPreviewURL(url,jsonBody.toString());
+        JSONObject jsonObject = JSON.parseObject(result);
+        return AjaxResult.success(jsonObject);
+    }
+}

+ 110 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UpdateAppServiceImpl.java

@@ -0,0 +1,110 @@
+package com.ruoyi.system.service.impl;
+
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.UpdateApp;
+import com.ruoyi.system.mapper.UpdateAppMapper;
+import com.ruoyi.system.service.IUpdateAppService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2023-02-16
+ */
+@Service
+public class UpdateAppServiceImpl implements IUpdateAppService 
+{
+    @Autowired
+    private UpdateAppMapper updateAppMapper;
+
+    /**
+     * 查询【请填写功能名称】
+     * 
+     * @param id 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public UpdateApp selectUpdateAppById(Long id)
+    {
+        return updateAppMapper.selectUpdateAppById(id);
+    }
+
+    /**
+     * 查询【请填写功能名称】列表
+     * 
+     * @param updateApp 【请填写功能名称】
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public List<UpdateApp> selectUpdateAppList(UpdateApp updateApp)
+    {
+        return updateAppMapper.selectUpdateAppList(updateApp);
+    }
+
+    /**
+     * 新增【请填写功能名称】
+     * 
+     * @param updateApp 【请填写功能名称】
+     * @return 结果
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public int insertUpdateApp(UpdateApp updateApp)
+    {
+        //将之前的数据全改为失效
+        UpdateApp update = new UpdateApp();
+        update.setIsDel("0");
+        update.setModel(updateApp.getModel());
+        updateAppMapper.updateUpdateAppAll(update);
+        //保存当前数据
+        updateApp.setCreateTime(DateUtils.getNowDate());
+        return updateAppMapper.insertUpdateApp(updateApp);
+    }
+
+    /**
+     * 修改【请填写功能名称】
+     * 
+     * @param updateApp 【请填写功能名称】
+     * @return 结果
+     */
+    @Override
+    public int updateUpdateApp(UpdateApp updateApp)
+    {
+        return updateAppMapper.updateUpdateApp(updateApp);
+    }
+
+    /**
+     * 批量删除【请填写功能名称】
+     * 
+     * @param ids 需要删除的【请填写功能名称】主键
+     * @return 结果
+     */
+    @Override
+    public int deleteUpdateAppByIds(Long[] ids)
+    {
+        return updateAppMapper.deleteUpdateAppByIds(ids);
+    }
+
+    /**
+     * 删除【请填写功能名称】信息
+     * 
+     * @param id 【请填写功能名称】主键
+     * @return 结果
+     */
+    @Override
+    public int deleteUpdateAppById(Long id)
+    {
+        return updateAppMapper.deleteUpdateAppById(id);
+    }
+
+    @Override
+    public UpdateApp getInfoNew(UpdateApp updateApp) {
+        updateApp.setIsDel("Y");
+        return updateAppMapper.getInfo(updateApp);
+    }
+}

+ 1 - 0
ruoyi-system/src/main/resources/mapper/system/AccessRecordMapper.xml

@@ -43,6 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="humanFaceData != null  and humanFaceData != ''"> and human_face_data = #{humanFaceData}</if>
             <if test="createDept != null "> and create_dept = #{createDept}</if>
         </where>
+        order by create_time desc
     </select>
     
     <select id="selectAccessRecordByRecordId" parameterType="Long" resultMap="AccessRecordResult">

+ 1 - 0
ruoyi-system/src/main/resources/mapper/system/BomanReservatConfigTimeMapper.xml

@@ -35,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="reservatConfigStatus != null  and reservatConfigStatus != ''"> and reservat_config_status = #{reservatConfigStatus}</if>
             <if test="createDept != null "> and create_dept = #{createDept}</if>
         </where>
+        order by reservat_config_time_begin
     </select>
     
     <select id="selectBomanReservatConfigTimeByReservatConfigTimeId" parameterType="Long" resultMap="BomanReservatConfigTimeResult">

+ 1 - 0
ruoyi-system/src/main/resources/mapper/system/BomanReservatMapper.xml

@@ -59,6 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="accessPassword != null  and accessPassword != ''"> and access_password = #{accessPassword}</if>
             <if test="createDept != null "> and create_dept = #{createDept}</if>
         </where>
+        order by create_time desc
     </select>
     
     <select id="selectBomanReservatByReservatId" parameterType="Long" resultMap="BomanReservatResult">

+ 9 - 1
ruoyi-system/src/main/resources/mapper/system/PersonnelManagementMapper.xml

@@ -12,6 +12,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="deptName"    column="dept_name"    />
         <result property="humanFaceData"    column="human_face_data"    />
         <result property="guard"    column="guard"    />
+
+        <result property="isEnable"    column="is_enable"    />
+
         <result property="createDept"    column="create_dept"    />
         <result property="createBy"    column="create_by"    />
         <result property="createTime"    column="create_time"    />
@@ -21,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectPersonnelManagementVo">
-        select personne_id, personne_name, personne_phone, dept_id, dept_name, human_face_data, guard, create_dept, create_by, create_time, update_by, update_time, remark from personnel_management
+        select personne_id, personne_name, personne_phone, dept_id, dept_name, human_face_data, guard,is_enable, create_dept, create_by, create_time, update_by, update_time, remark from personnel_management
     </sql>
 
     <select id="selectPersonnelManagementList" parameterType="PersonnelManagement" resultMap="PersonnelManagementResult">
@@ -33,8 +36,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptName != null  and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
             <if test="humanFaceData != null  and humanFaceData != ''"> and human_face_data = #{humanFaceData}</if>
             <if test="guard != null  and guard != ''"> and guard = #{guard}</if>
+            <if test="isEnable != null  and isEnable != ''"> and is_enable = #{isEnable}</if>
             <if test="createDept != null "> and create_dept = #{createDept}</if>
         </where>
+        order by create_time desc
     </select>
     
     <select id="selectPersonnelManagementByPersonneId" parameterType="Long" resultMap="PersonnelManagementResult">
@@ -51,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptName != null">dept_name,</if>
             <if test="humanFaceData != null">human_face_data,</if>
             <if test="guard != null">guard,</if>
+            <if test="isEnable != null "> is_enable ,</if>
             <if test="createDept != null">create_dept,</if>
             <if test="createBy != null">create_by,</if>
             <if test="createTime != null">create_time,</if>
@@ -65,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptName != null">#{deptName},</if>
             <if test="humanFaceData != null">#{humanFaceData},</if>
             <if test="guard != null">#{guard},</if>
+            <if test="isEnable != null "> #{isEnable},</if>
             <if test="createDept != null">#{createDept},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="createTime != null">#{createTime},</if>
@@ -83,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptName != null">dept_name = #{deptName},</if>
             <if test="humanFaceData != null">human_face_data = #{humanFaceData},</if>
             <if test="guard != null">guard = #{guard},</if>
+            <if test="isEnable != null "> is_enable = #{isEnable},</if>
             <if test="createDept != null">create_dept = #{createDept},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createTime != null">create_time = #{createTime},</if>

+ 103 - 0
ruoyi-system/src/main/resources/mapper/system/UpdateAppMapper.xml

@@ -0,0 +1,103 @@
+<?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.system.mapper.UpdateAppMapper">
+    
+    <resultMap type="UpdateApp" id="UpdateAppResult">
+        <result property="id"    column="id"    />
+        <result property="model"    column="model"    />
+        <result property="name"    column="name"    />
+        <result property="code"    column="code"    />
+        <result property="description"    column="description"    />
+        <result property="path"    column="path"    />
+        <result property="isDel"    column="is_del"    />
+        <result property="createTime"    column="create_time"    />
+    </resultMap>
+
+    <sql id="selectUpdateAppVo">
+        select id, model, name, code, description, path, is_del, create_time from update_app
+    </sql>
+
+    <select id="selectUpdateAppList" parameterType="UpdateApp" resultMap="UpdateAppResult">
+        <include refid="selectUpdateAppVo"/>
+        <where>  
+            <if test="model != null  and model != ''"> and model = #{model}</if>
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="code != null  and code != ''"> and code = #{code}</if>
+            <if test="description != null  and description != ''"> and description = #{description}</if>
+            <if test="path != null  and path != ''"> and path = #{path}</if>
+            <if test="isDel != null  and isDel != ''"> and is_del = #{isDel}</if>
+        </where>
+    </select>
+    
+    <select id="selectUpdateAppById" parameterType="Long" resultMap="UpdateAppResult">
+        <include refid="selectUpdateAppVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertUpdateApp" parameterType="UpdateApp">
+        insert into update_app
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="model != null">model,</if>
+            <if test="name != null">name,</if>
+            <if test="code != null">code,</if>
+            <if test="description != null">description,</if>
+            <if test="path != null">path,</if>
+            <if test="isDel != null">is_del,</if>
+            <if test="createTime != null">create_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="model != null">#{model},</if>
+            <if test="name != null">#{name},</if>
+            <if test="code != null">#{code},</if>
+            <if test="description != null">#{description},</if>
+            <if test="path != null">#{path},</if>
+            <if test="isDel != null">#{isDel},</if>
+            <if test="createTime != null">#{createTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateUpdateApp" parameterType="UpdateApp">
+        update update_app
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="model != null">model = #{model},</if>
+            <if test="name != null">name = #{name},</if>
+            <if test="code != null">code = #{code},</if>
+            <if test="description != null">description = #{description},</if>
+            <if test="path != null">path = #{path},</if>
+            <if test="isDel != null">is_del = #{isDel},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteUpdateAppById" parameterType="Long">
+        delete from update_app where id = #{id}
+    </delete>
+
+    <delete id="deleteUpdateAppByIds" parameterType="String">
+        delete from update_app where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <select id="getInfo" parameterType="UpdateApp" resultMap="UpdateAppResult">
+        <include refid="selectUpdateAppVo"/>
+        <where>
+            <if test="model != null  and model != ''"> and model = #{model}</if>
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="code != null  and code != ''"> and code = #{code}</if>
+            <if test="description != null  and description != ''"> and description = #{description}</if>
+            <if test="path != null  and path != ''"> and path = #{path}</if>
+            <if test="isDel != null  and isDel != ''"> and is_del = #{isDel}</if>
+        </where>
+    </select>
+    <update id="updateUpdateAppAll" parameterType="UpdateApp">
+        update update_app set is_del = #{isDel}
+        where model = #{model}
+    </update>
+</mapper>