ard-work/src/main/java/com/ruoyi/alarm/access/controller/ArdAlarmAccessController.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/accessAlarm/controller/ArdAlarmAccessController.java 修改 @@ -1,9 +1,9 @@ package com.ruoyi.alarm.accessAlarm.controller; package com.ruoyi.alarm.access.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; import com.ruoyi.alarm.accessAlarm.domain.ArdAlarmAccess; import com.ruoyi.alarm.accessAlarm.service.IArdAlarmAccessService; import com.ruoyi.alarm.access.domain.ArdAlarmAccess; import com.ruoyi.alarm.access.service.IArdAlarmAccessService; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; ard-work/src/main/java/com/ruoyi/alarm/access/domain/ArdAlarmAccess.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/accessAlarm/domain/ArdAlarmAccess.java 修改 @@ -1,10 +1,8 @@ package com.ruoyi.alarm.accessAlarm.domain; package com.ruoyi.alarm.access.domain; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; 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; ard-work/src/main/java/com/ruoyi/alarm/access/mapper/ArdAlarmAccessMapper.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/accessAlarm/mapper/ArdAlarmAccessMapper.java 修改 @@ -1,8 +1,7 @@ package com.ruoyi.alarm.accessAlarm.mapper; package com.ruoyi.alarm.access.mapper; import java.util.List; import com.ruoyi.alarm.accessAlarm.domain.ArdAlarmAccess; import com.ruoyi.alarm.externalAlarm.domain.ArdAlarmExternal; import com.ruoyi.alarm.access.domain.ArdAlarmAccess; import org.apache.ibatis.annotations.Param; ard-work/src/main/java/com/ruoyi/alarm/access/service/IArdAlarmAccessService.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/accessAlarm/service/IArdAlarmAccessService.java 修改 @@ -1,7 +1,7 @@ package com.ruoyi.alarm.accessAlarm.service; package com.ruoyi.alarm.access.service; import java.util.List; import com.ruoyi.alarm.accessAlarm.domain.ArdAlarmAccess; import com.ruoyi.alarm.access.domain.ArdAlarmAccess; /** ard-work/src/main/java/com/ruoyi/alarm/access/service/impl/ArdAlarmAccessServiceImpl.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/accessAlarm/service/impl/ArdAlarmAccessServiceImpl.java 修改 @@ -1,10 +1,10 @@ package com.ruoyi.alarm.accessAlarm.service.impl; package com.ruoyi.alarm.access.service.impl; import java.util.List; import com.ruoyi.alarm.accessAlarm.domain.ArdAlarmAccess; import com.ruoyi.alarm.accessAlarm.mapper.ArdAlarmAccessMapper; import com.ruoyi.alarm.accessAlarm.service.IArdAlarmAccessService; import com.ruoyi.alarm.access.domain.ArdAlarmAccess; import com.ruoyi.alarm.access.mapper.ArdAlarmAccessMapper; import com.ruoyi.alarm.access.service.IArdAlarmAccessService; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; ard-work/src/main/java/com/ruoyi/alarm/apponekey/controller/ArdAlarmApponekeyController.java
对比新文件 @@ -0,0 +1,104 @@ package com.ruoyi.alarm.apponekey.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; 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.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.alarm.apponekey.domain.ArdAlarmApponekey; import com.ruoyi.alarm.apponekey.service.IArdAlarmApponekeyService; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.core.page.TableDataInfo; /** * app一键报警Controller * * @author ard * @date 2023-07-21 */ @RestController @RequestMapping("/alarm/apponekey") public class ArdAlarmApponekeyController extends BaseController { @Autowired private IArdAlarmApponekeyService ardAlarmApponekeyService; /** * 查询app一键报警列表 */ @PreAuthorize("@ss.hasPermi('alarm:apponekey:list')") @GetMapping("/list") public TableDataInfo list(ArdAlarmApponekey ardAlarmApponekey) { startPage(); List<ArdAlarmApponekey> list = ardAlarmApponekeyService.selectArdAlarmApponekeyList(ardAlarmApponekey); return getDataTable(list); } /** * 导出app一键报警列表 */ @PreAuthorize("@ss.hasPermi('alarm:apponekey:export')") @Log(title = "app一键报警", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, ArdAlarmApponekey ardAlarmApponekey) { List<ArdAlarmApponekey> list = ardAlarmApponekeyService.selectArdAlarmApponekeyList(ardAlarmApponekey); ExcelUtil<ArdAlarmApponekey> util = new ExcelUtil<ArdAlarmApponekey>(ArdAlarmApponekey.class); util.exportExcel(response, list, "app一键报警数据"); } /** * 获取app一键报警详细信息 */ @PreAuthorize("@ss.hasPermi('alarm:apponekey:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") String id) { return success(ardAlarmApponekeyService.selectArdAlarmApponekeyById(id)); } /** * 新增app一键报警 */ @PreAuthorize("@ss.hasPermi('alarm:apponekey:add')") @Log(title = "app一键报警", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody ArdAlarmApponekey ardAlarmApponekey) { return toAjax(ardAlarmApponekeyService.insertArdAlarmApponekey(ardAlarmApponekey)); } /** * 修改app一键报警 */ @PreAuthorize("@ss.hasPermi('alarm:apponekey:edit')") @Log(title = "app一键报警", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody ArdAlarmApponekey ardAlarmApponekey) { return toAjax(ardAlarmApponekeyService.updateArdAlarmApponekey(ardAlarmApponekey)); } /** * 删除app一键报警 */ @PreAuthorize("@ss.hasPermi('alarm:apponekey:remove')") @Log(title = "app一键报警", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable String[] ids) { return toAjax(ardAlarmApponekeyService.deleteArdAlarmApponekeyByIds(ids)); } } ard-work/src/main/java/com/ruoyi/alarm/apponekey/domain/ArdAlarmApponekey.java
对比新文件 @@ -0,0 +1,168 @@ package com.ruoyi.alarm.apponekey.domain; import com.fasterxml.jackson.annotation.JsonFormat; 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; import java.util.Date; /** * app一键报警对象 ard_alarm_apponekey * * @author ard * @date 2023-07-21 */ public class ArdAlarmApponekey extends BaseEntity { private static final long serialVersionUID = 1L; /** * ID */ private String id; /** * app用户ID */ @Excel(name = "app用户ID") private String userId; /** * app用户姓名 */ @Excel(name = "app用户姓名") private String name; /** * 经度 */ @Excel(name = "经度") private Double longitude; /** * 纬度 */ @Excel(name = "纬度") private Double latitude; /** * 高层 */ @Excel(name = "高层") private Double altitude; /** * 录像url */ @Excel(name = "录像url") private String recordUrl; /** * 查看时间 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @Excel(name = "查看时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") private Date viewTime; /** * 报警总数 */ private Integer total; /** * 未读报警数量 */ private Integer count; public Date getViewTime() { return viewTime; } public void setViewTime(Date viewTime) { this.viewTime = viewTime; } public Integer getTotal() { return total; } public void setTotal(Integer total) { this.total = total; } public Integer getCount() { return count; } public void setCount(Integer count) { this.count = count; } public String getName() { return name; } public void setName(String name) { this.name = name; } public void setId(String id) { this.id = id; } public String getId() { return id; } public void setUserId(String userId) { this.userId = userId; } public String getUserId() { return userId; } public void setLongitude(Double longitude) { this.longitude = longitude; } public Double getLongitude() { return longitude; } public void setLatitude(Double latitude) { this.latitude = latitude; } public Double getLatitude() { return latitude; } public void setAltitude(Double altitude) { this.altitude = altitude; } public Double getAltitude() { return altitude; } public void setRecordUrl(String recordUrl) { this.recordUrl = recordUrl; } public String getRecordUrl() { return recordUrl; } @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) .append("id", getId()) .append("userId", getUserId()) .append("longitude", getLongitude()) .append("latitude", getLatitude()) .append("altitude", getAltitude()) .append("recordUrl", getRecordUrl()) .append("createTime", getCreateTime()) .toString(); } } ard-work/src/main/java/com/ruoyi/alarm/apponekey/mapper/ArdAlarmApponekeyMapper.java
对比新文件 @@ -0,0 +1,70 @@ package com.ruoyi.alarm.apponekey.mapper; import java.util.List; import com.ruoyi.alarm.access.domain.ArdAlarmAccess; import com.ruoyi.alarm.apponekey.domain.ArdAlarmApponekey; import org.apache.ibatis.annotations.Param; /** * app一键报警Mapper接口 * * @author ard * @date 2023-07-21 */ public interface ArdAlarmApponekeyMapper { /** * 查询app一键报警 * * @param id app一键报警主键 * @return app一键报警 */ public ArdAlarmApponekey selectArdAlarmApponekeyById(String id); /** * 查询app一键报警列表 * * @param ardAlarmApponekey app一键报警 * @return app一键报警集合 */ public List<ArdAlarmApponekey> selectArdAlarmApponekeyList(ArdAlarmApponekey ardAlarmApponekey); /** * 新增app一键报警 * * @param ardAlarmApponekey app一键报警 * @return 结果 */ public int insertArdAlarmApponekey(ArdAlarmApponekey ardAlarmApponekey); /** * 修改app一键报警 * * @param ardAlarmApponekey app一键报警 * @return 结果 */ public int updateArdAlarmApponekey(ArdAlarmApponekey ardAlarmApponekey); /** * 删除app一键报警 * * @param id app一键报警主键 * @return 结果 */ public int deleteArdAlarmApponekeyById(String id); /** * 批量删除app一键报警 * * @param ids 需要删除的数据主键集合 * @return 结果 */ public int deleteArdAlarmApponekeyByIds(String[] ids); int selectCountByAlarmTime(@Param("refreshTime") String refreshTime); public List<ArdAlarmApponekey> selectListAllByCommand(@Param("refreshTime") String refreshTime); public int updateViewTimeByUserId(@Param("userId")String userId,@Param("createTime") String createTime,@Param("viewTime") String viewTime); } ard-work/src/main/java/com/ruoyi/alarm/apponekey/service/IArdAlarmApponekeyService.java
对比新文件 @@ -0,0 +1,61 @@ package com.ruoyi.alarm.apponekey.service; import java.util.List; import com.ruoyi.alarm.apponekey.domain.ArdAlarmApponekey; /** * app一键报警Service接口 * * @author ard * @date 2023-07-21 */ public interface IArdAlarmApponekeyService { /** * 查询app一键报警 * * @param id app一键报警主键 * @return app一键报警 */ public ArdAlarmApponekey selectArdAlarmApponekeyById(String id); /** * 查询app一键报警列表 * * @param ardAlarmApponekey app一键报警 * @return app一键报警集合 */ public List<ArdAlarmApponekey> selectArdAlarmApponekeyList(ArdAlarmApponekey ardAlarmApponekey); /** * 新增app一键报警 * * @param ardAlarmApponekey app一键报警 * @return 结果 */ public int insertArdAlarmApponekey(ArdAlarmApponekey ardAlarmApponekey); /** * 修改app一键报警 * * @param ardAlarmApponekey app一键报警 * @return 结果 */ public int updateArdAlarmApponekey(ArdAlarmApponekey ardAlarmApponekey); /** * 批量删除app一键报警 * * @param ids 需要删除的app一键报警主键集合 * @return 结果 */ public int deleteArdAlarmApponekeyByIds(String[] ids); /** * 删除app一键报警信息 * * @param id app一键报警主键 * @return 结果 */ public int deleteArdAlarmApponekeyById(String id); } ard-work/src/main/java/com/ruoyi/alarm/apponekey/service/impl/ArdAlarmApponekeyServiceImpl.java
对比新文件 @@ -0,0 +1,89 @@ package com.ruoyi.alarm.apponekey.service.impl; import java.util.List; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.alarm.apponekey.mapper.ArdAlarmApponekeyMapper; import com.ruoyi.alarm.apponekey.domain.ArdAlarmApponekey; import com.ruoyi.alarm.apponekey.service.IArdAlarmApponekeyService; /** * app一键报警Service业务层处理 * * @author ard * @date 2023-07-21 */ @Service public class ArdAlarmApponekeyServiceImpl implements IArdAlarmApponekeyService { @Autowired private ArdAlarmApponekeyMapper ardAlarmApponekeyMapper; /** * 查询app一键报警 * * @param id app一键报警主键 * @return app一键报警 */ @Override public ArdAlarmApponekey selectArdAlarmApponekeyById(String id) { return ardAlarmApponekeyMapper.selectArdAlarmApponekeyById(id); } /** * 查询app一键报警列表 * * @param ardAlarmApponekey app一键报警 * @return app一键报警 */ @Override public List<ArdAlarmApponekey> selectArdAlarmApponekeyList(ArdAlarmApponekey ardAlarmApponekey) { return ardAlarmApponekeyMapper.selectArdAlarmApponekeyList(ardAlarmApponekey); } /** * 新增app一键报警 * * @param ardAlarmApponekey app一键报警 * @return 结果 */ @Override public int insertArdAlarmApponekey(ArdAlarmApponekey ardAlarmApponekey) { return ardAlarmApponekeyMapper.insertArdAlarmApponekey(ardAlarmApponekey); } /** * 修改app一键报警 * * @param ardAlarmApponekey app一键报警 * @return 结果 */ @Override public int updateArdAlarmApponekey(ArdAlarmApponekey ardAlarmApponekey) { return ardAlarmApponekeyMapper.updateArdAlarmApponekey(ardAlarmApponekey); } /** * 批量删除app一键报警 * * @param ids 需要删除的app一键报警主键 * @return 结果 */ @Override public int deleteArdAlarmApponekeyByIds(String[] ids) { return ardAlarmApponekeyMapper.deleteArdAlarmApponekeyByIds(ids); } /** * 删除app一键报警信息 * * @param id app一键报警主键 * @return 结果 */ @Override public int deleteArdAlarmApponekeyById(String id) { return ardAlarmApponekeyMapper.deleteArdAlarmApponekeyById(id); } } ard-work/src/main/java/com/ruoyi/alarm/camera/controller/ArdAlarmCameraController.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/cameraAlarm/controller/ArdAlarmCameraController.java 修改 @@ -1,9 +1,9 @@ package com.ruoyi.alarm.cameraAlarm.controller; package com.ruoyi.alarm.camera.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; import com.ruoyi.alarm.cameraAlarm.domain.ArdAlarmCamera; import com.ruoyi.alarm.cameraAlarm.service.IArdAlarmCameraService; import com.ruoyi.alarm.camera.domain.ArdAlarmCamera; import com.ruoyi.alarm.camera.service.IArdAlarmCameraService; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; ard-work/src/main/java/com/ruoyi/alarm/camera/domain/ArdAlarmCamera.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/cameraAlarm/domain/ArdAlarmCamera.java 修改 @@ -1,4 +1,4 @@ package com.ruoyi.alarm.cameraAlarm.domain; package com.ruoyi.alarm.camera.domain; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; ard-work/src/main/java/com/ruoyi/alarm/camera/mapper/ArdAlarmCameraMapper.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/cameraAlarm/mapper/ArdAlarmCameraMapper.java 修改 @@ -1,8 +1,7 @@ package com.ruoyi.alarm.cameraAlarm.mapper; package com.ruoyi.alarm.camera.mapper; import java.util.List; import com.ruoyi.alarm.cameraAlarm.domain.ArdAlarmCamera; import com.ruoyi.alarm.tubeAlarm.domain.ArdAlarmTube; import com.ruoyi.alarm.camera.domain.ArdAlarmCamera; import org.apache.ibatis.annotations.Param; ard-work/src/main/java/com/ruoyi/alarm/camera/service/IArdAlarmCameraService.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/cameraAlarm/service/IArdAlarmCameraService.java 修改 @@ -1,7 +1,7 @@ package com.ruoyi.alarm.cameraAlarm.service; package com.ruoyi.alarm.camera.service; import java.util.List; import com.ruoyi.alarm.cameraAlarm.domain.ArdAlarmCamera; import com.ruoyi.alarm.camera.domain.ArdAlarmCamera; /** * 通用光电报警Service接口 * ard-work/src/main/java/com/ruoyi/alarm/camera/service/impl/ArdAlarmCameraServiceImpl.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/cameraAlarm/service/impl/ArdAlarmCameraServiceImpl.java 修改 @@ -1,9 +1,9 @@ package com.ruoyi.alarm.cameraAlarm.service.impl; package com.ruoyi.alarm.camera.service.impl; import java.util.List; import com.ruoyi.alarm.cameraAlarm.domain.ArdAlarmCamera; import com.ruoyi.alarm.cameraAlarm.mapper.ArdAlarmCameraMapper; import com.ruoyi.alarm.cameraAlarm.service.IArdAlarmCameraService; import com.ruoyi.alarm.camera.domain.ArdAlarmCamera; import com.ruoyi.alarm.camera.mapper.ArdAlarmCameraMapper; import com.ruoyi.alarm.camera.service.IArdAlarmCameraService; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; ard-work/src/main/java/com/ruoyi/alarm/external/controller/ArdAlarmExternalController.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/externalAlarm/controller/ArdAlarmExternalController.java 修改 @@ -1,10 +1,10 @@ package com.ruoyi.alarm.externalAlarm.controller; package com.ruoyi.alarm.external.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; import com.ruoyi.alarm.externalAlarm.domain.ArdAlarmExternal; import com.ruoyi.alarm.externalAlarm.service.IArdAlarmExternalService; import com.ruoyi.alarm.external.domain.ArdAlarmExternal; import com.ruoyi.alarm.external.service.IArdAlarmExternalService; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; ard-work/src/main/java/com/ruoyi/alarm/external/domain/ArdAlarmExternal.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/externalAlarm/domain/ArdAlarmExternal.java 修改 @@ -1,11 +1,9 @@ package com.ruoyi.alarm.externalAlarm.domain; package com.ruoyi.alarm.external.domain; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; 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; ard-work/src/main/java/com/ruoyi/alarm/external/mapper/ArdAlarmExternalMapper.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/externalAlarm/mapper/ArdAlarmExternalMapper.java 修改 @@ -1,8 +1,7 @@ package com.ruoyi.alarm.externalAlarm.mapper; package com.ruoyi.alarm.external.mapper; import java.util.List; import com.ruoyi.alarm.externalAlarm.domain.ArdAlarmExternal; import com.ruoyi.alarm.radarAlarm.domain.ArdAlarmRadar; import com.ruoyi.alarm.external.domain.ArdAlarmExternal; import org.apache.ibatis.annotations.Param; /** ard-work/src/main/java/com/ruoyi/alarm/external/service/IArdAlarmExternalService.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/externalAlarm/service/IArdAlarmExternalService.java 修改 @@ -1,7 +1,7 @@ package com.ruoyi.alarm.externalAlarm.service; package com.ruoyi.alarm.external.service; import java.util.List; import com.ruoyi.alarm.externalAlarm.domain.ArdAlarmExternal; import com.ruoyi.alarm.external.domain.ArdAlarmExternal; /** ard-work/src/main/java/com/ruoyi/alarm/external/service/impl/ArdAlarmExternalServiceImpl.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/externalAlarm/service/impl/ArdAlarmExternalServiceImpl.java 修改 @@ -1,9 +1,9 @@ package com.ruoyi.alarm.externalAlarm.service.impl; package com.ruoyi.alarm.external.service.impl; import java.util.List; import com.ruoyi.alarm.externalAlarm.domain.ArdAlarmExternal; import com.ruoyi.alarm.externalAlarm.mapper.ArdAlarmExternalMapper; import com.ruoyi.alarm.externalAlarm.service.IArdAlarmExternalService; import com.ruoyi.alarm.external.domain.ArdAlarmExternal; import com.ruoyi.alarm.external.mapper.ArdAlarmExternalMapper; import com.ruoyi.alarm.external.service.IArdAlarmExternalService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; ard-work/src/main/java/com/ruoyi/alarm/global/controller/GlobalAlarmController.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/globalAlarm/controller/GlobalAlarmController.java 修改 @@ -1,12 +1,12 @@ package com.ruoyi.alarm.globalAlarm.controller; package com.ruoyi.alarm.global.controller; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiSupport; import com.ruoyi.alarm.globalAlarm.domain.GlobalAlarmCondition; import com.ruoyi.alarm.globalAlarm.domain.GlobalAlarmData; import com.ruoyi.alarm.globalAlarm.domain.GuidePriorityQueue; import com.ruoyi.alarm.globalAlarm.domain.GuideTask; import com.ruoyi.alarm.globalAlarm.service.IGlobalAlarmService; import com.ruoyi.alarm.global.domain.GlobalAlarmCondition; import com.ruoyi.alarm.global.domain.GlobalAlarmData; import com.ruoyi.alarm.global.domain.GuidePriorityQueue; import com.ruoyi.alarm.global.domain.GuideTask; import com.ruoyi.alarm.global.service.IGlobalAlarmService; import com.ruoyi.common.annotation.Anonymous; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; ard-work/src/main/java/com/ruoyi/alarm/global/domain/GlobalAlarmCondition.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/globalAlarm/domain/GlobalAlarmCondition.java 修改 @@ -1,4 +1,4 @@ package com.ruoyi.alarm.globalAlarm.domain; package com.ruoyi.alarm.global.domain; import com.ruoyi.common.core.domain.BaseEntity; import io.swagger.annotations.ApiModel; ard-work/src/main/java/com/ruoyi/alarm/global/domain/GlobalAlarmData.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/globalAlarm/domain/GlobalAlarmData.java 修改 @@ -1,4 +1,4 @@ package com.ruoyi.alarm.globalAlarm.domain; package com.ruoyi.alarm.global.domain; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; ard-work/src/main/java/com/ruoyi/alarm/global/domain/GuidePriorityQueue.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/globalAlarm/domain/GuidePriorityQueue.java 修改 @@ -1,11 +1,7 @@ package com.ruoyi.alarm.globalAlarm.domain; package com.ruoyi.alarm.global.domain; import lombok.AllArgsConstructor; import lombok.Data; import lombok.extern.slf4j.Slf4j; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.*; import java.util.concurrent.PriorityBlockingQueue; ard-work/src/main/java/com/ruoyi/alarm/global/domain/GuideTask.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/globalAlarm/domain/GuideTask.java 修改 @@ -1,10 +1,8 @@ package com.ruoyi.alarm.globalAlarm.domain; package com.ruoyi.alarm.global.domain; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.util.Date; /** * @Description: 引导任务 ard-work/src/main/java/com/ruoyi/alarm/global/service/IGlobalAlarmService.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/globalAlarm/service/IGlobalAlarmService.java 修改 @@ -1,9 +1,8 @@ package com.ruoyi.alarm.globalAlarm.service; package com.ruoyi.alarm.global.service; import com.ruoyi.alarm.globalAlarm.domain.GlobalAlarmCondition; import com.ruoyi.alarm.globalAlarm.domain.GlobalAlarmData; import com.ruoyi.alarm.global.domain.GlobalAlarmCondition; import com.ruoyi.alarm.global.domain.GlobalAlarmData; import java.util.Date; import java.util.List; import java.util.Map; ard-work/src/main/java/com/ruoyi/alarm/global/service/impl/GlobalAlarmServiceImpl.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/globalAlarm/service/impl/GlobalAlarmServiceImpl.java 修改 @@ -1,24 +1,26 @@ package com.ruoyi.alarm.globalAlarm.service.impl; package com.ruoyi.alarm.global.service.impl; import com.alibaba.fastjson2.JSONObject; import com.ruoyi.alarm.accessAlarm.domain.ArdAlarmAccess; import com.ruoyi.alarm.accessAlarm.mapper.ArdAlarmAccessMapper; import com.ruoyi.alarm.cameraAlarm.domain.ArdAlarmCamera; import com.ruoyi.alarm.cameraAlarm.mapper.ArdAlarmCameraMapper; import com.ruoyi.alarm.externalAlarm.domain.ArdAlarmExternal; import com.ruoyi.alarm.externalAlarm.mapper.ArdAlarmExternalMapper; import com.ruoyi.alarm.globalAlarm.domain.GlobalAlarmCondition; import com.ruoyi.alarm.globalAlarm.domain.GlobalAlarmData; import com.ruoyi.alarm.globalAlarm.domain.GuidePriorityQueue; import com.ruoyi.alarm.globalAlarm.domain.GuideTask; import com.ruoyi.alarm.globalAlarm.service.IGlobalAlarmService; import com.ruoyi.alarm.radarAlarm.domain.ArdAlarmRadar; import com.ruoyi.alarm.radarAlarm.domain.RadarAlarmData; import com.ruoyi.alarm.radarAlarm.mapper.ArdAlarmRadarMapper; import com.ruoyi.alarm.stealAlarm.domain.ArdAlarmStealelec; import com.ruoyi.alarm.stealAlarm.mapper.ArdAlarmStealelecMapper; import com.ruoyi.alarm.tubeAlarm.domain.ArdAlarmTube; import com.ruoyi.alarm.tubeAlarm.mapper.ArdAlarmTubeMapper; import com.ruoyi.alarm.access.domain.ArdAlarmAccess; import com.ruoyi.alarm.access.mapper.ArdAlarmAccessMapper; import com.ruoyi.alarm.apponekey.domain.ArdAlarmApponekey; import com.ruoyi.alarm.apponekey.mapper.ArdAlarmApponekeyMapper; import com.ruoyi.alarm.camera.domain.ArdAlarmCamera; import com.ruoyi.alarm.camera.mapper.ArdAlarmCameraMapper; import com.ruoyi.alarm.external.domain.ArdAlarmExternal; import com.ruoyi.alarm.external.mapper.ArdAlarmExternalMapper; import com.ruoyi.alarm.global.domain.GlobalAlarmCondition; import com.ruoyi.alarm.global.domain.GlobalAlarmData; import com.ruoyi.alarm.global.domain.GuidePriorityQueue; import com.ruoyi.alarm.global.domain.GuideTask; import com.ruoyi.alarm.global.service.IGlobalAlarmService; import com.ruoyi.alarm.radar.domain.ArdAlarmRadar; import com.ruoyi.alarm.radar.domain.RadarAlarmData; import com.ruoyi.alarm.radar.mapper.ArdAlarmRadarMapper; import com.ruoyi.alarm.steal.domain.ArdAlarmStealelec; import com.ruoyi.alarm.steal.mapper.ArdAlarmStealelecMapper; import com.ruoyi.alarm.tube.domain.ArdAlarmTube; import com.ruoyi.alarm.tube.mapper.ArdAlarmTubeMapper; import com.ruoyi.alarmpoints.tube.domain.ArdTubes; import com.ruoyi.alarmpoints.tube.domain.ArdTubesDetails; import com.ruoyi.alarmpoints.tube.mapper.ArdTubesDetailsMapper; @@ -63,6 +65,8 @@ @Slf4j(topic = "mqtt") public class GlobalAlarmServiceImpl implements IGlobalAlarmService { //region 依赖注入 @Resource private ArdAlarmApponekeyMapper ardAlarmApponekeyMapper; @Resource private ArdEquipExternalMapper ardEquipExternalMapper; @Resource @@ -120,6 +124,8 @@ countMap.put("1005", count1005); int count1006 = ardAlarmAccessMapper.selectCountByAlarmTime(refreshTime); countMap.put("1006", count1006); int count1009 = ardAlarmApponekeyMapper.selectCountByAlarmTime(refreshTime); countMap.put("1009", count1009); int count1014 = ardAlarmTubeMapper.selectCountByAlarmTime(refreshTime); countMap.put("1014", count1014); map.put("20000", countMap); @@ -237,6 +243,20 @@ .setTotal(ardAlarmRadar.getTotal()); return globalAlarmData; }).collect(Collectors.toList()); case 1009: List<ArdAlarmApponekey> ardAlarmApponekeys = ardAlarmApponekeyMapper.selectListAllByCommand(refreshTime); return ardAlarmApponekeys.stream() .map(ardAlarmApponekey -> { GlobalAlarmData globalAlarmData = new GlobalAlarmData() .setId(ardAlarmApponekey.getId()) .setName(ardAlarmApponekey.getName()) .setAlarmTime(ardAlarmApponekey.getCreateTime()) .setLongitude(ardAlarmApponekey.getLongitude()) .setLatitude(ardAlarmApponekey.getLatitude()) .setCount(ardAlarmApponekey.getCount()) .setTotal(ardAlarmApponekey.getTotal()); return globalAlarmData; }).collect(Collectors.toList()); case 1014: List<ArdAlarmTube> ardAlarmTubes = ardAlarmTubeMapper.selectListAllByCommand(refreshTime); return ardAlarmTubes.stream() @@ -318,6 +338,12 @@ aaa.setPageSize(pageSize); aaa.setAlarmType("防区报警"); return ardAlarmAccessMapper.selectArdAlarmAccessList(aaa); case 1009: ArdAlarmApponekey aaak = new ArdAlarmApponekey(); aaak.setParams(params); aaak.setPageNum(pageNum); aaak.setPageSize(pageSize); return ardAlarmApponekeyMapper.selectArdAlarmApponekeyList(aaak); case 1014: ArdAlarmTube aat = new ArdAlarmTube(); aat.setParams(params); @@ -383,6 +409,14 @@ String alarmTime = fmt.format(ardAlarmAccess.getAlarmTime()); ardAlarmAccessMapper.updateViewTimeByAcsId(acsId, alarmTime, DateUtils.getTime()); return ardAlarmAccess; } case 1009: ArdAlarmApponekey ardAlarmApponekey = ardAlarmApponekeyMapper.selectArdAlarmApponekeyById(condition.getId()); if (StringUtils.isNotNull(ardAlarmApponekey)) { String userId = ardAlarmApponekey.getUserId(); String alarmTime = fmt.format(ardAlarmApponekey.getCreateTime()); ardAlarmApponekeyMapper.updateViewTimeByUserId(userId, alarmTime, DateUtils.getTime()); return ardAlarmApponekey; } case 1014: ArdAlarmTube ardAlarmTube = ardAlarmTubeMapper.selectArdAlarmTubeById(condition.getId()); @@ -622,6 +656,15 @@ } //endregion break; case "apponekey": //region app一键报警 ArdAlarmApponekey ardAlarmApponekey = JSONObject.parseObject(message, ArdAlarmApponekey.class); int aaak = ardAlarmApponekeyMapper.insertArdAlarmApponekey(ardAlarmApponekey); if (aaak > 0) { log.debug("apponekey入库成功:" + ardAlarmApponekey); } //endregion break; } } catch (Exception ex) { log.error("接收报警异常:" + ex.getMessage()); ard-work/src/main/java/com/ruoyi/alarm/global/service/impl/QueueManager.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/globalAlarm/service/impl/QueueManager.java 修改 @@ -1,19 +1,15 @@ package com.ruoyi.alarm.globalAlarm.service.impl; package com.ruoyi.alarm.global.service.impl; import com.ruoyi.alarm.globalAlarm.domain.GuidePriorityQueue; import com.ruoyi.alarm.globalAlarm.domain.GuideTask; import com.ruoyi.alarm.global.domain.GuidePriorityQueue; import com.ruoyi.alarm.global.domain.GuideTask; import com.ruoyi.common.utils.StringUtils; import lombok.extern.slf4j.Slf4j; import org.apache.tomcat.util.threads.TaskThread; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.stereotype.Component; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.PriorityBlockingQueue; import static jdk.nashorn.internal.runtime.regexp.joni.Config.log; /** * @ClassName QueueManager ard-work/src/main/java/com/ruoyi/alarm/global/service/impl/QueueTaskExecutor.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/globalAlarm/service/impl/QueueTaskExecutor.java 修改 @@ -1,14 +1,14 @@ package com.ruoyi.alarm.globalAlarm.service.impl; package com.ruoyi.alarm.global.service.impl; import com.ruoyi.alarm.accessAlarm.domain.ArdAlarmAccess; import com.ruoyi.alarm.accessAlarm.service.IArdAlarmAccessService; import com.ruoyi.alarm.externalAlarm.domain.ArdAlarmExternal; import com.ruoyi.alarm.externalAlarm.service.IArdAlarmExternalService; import com.ruoyi.alarm.globalAlarm.domain.GuideTask; import com.ruoyi.alarm.radarAlarm.domain.ArdAlarmRadar; import com.ruoyi.alarm.radarAlarm.service.IArdAlarmRadarService; import com.ruoyi.alarm.tubeAlarm.domain.ArdAlarmTube; import com.ruoyi.alarm.tubeAlarm.service.IArdAlarmTubeService; import com.ruoyi.alarm.access.domain.ArdAlarmAccess; import com.ruoyi.alarm.access.service.IArdAlarmAccessService; import com.ruoyi.alarm.external.domain.ArdAlarmExternal; import com.ruoyi.alarm.external.service.IArdAlarmExternalService; import com.ruoyi.alarm.global.domain.GuideTask; import com.ruoyi.alarm.radar.domain.ArdAlarmRadar; import com.ruoyi.alarm.radar.service.IArdAlarmRadarService; import com.ruoyi.alarm.tube.domain.ArdAlarmTube; import com.ruoyi.alarm.tube.service.IArdAlarmTubeService; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.device.camera.domain.CameraCmd; import com.ruoyi.device.hiksdk.service.IHikClientService; ard-work/src/main/java/com/ruoyi/alarm/radar/controller/ArdAlarmRadarController.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/radarAlarm/controller/ArdAlarmRadarController.java 修改 @@ -1,10 +1,10 @@ package com.ruoyi.alarm.radarAlarm.controller; package com.ruoyi.alarm.radar.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; import com.ruoyi.alarm.radarAlarm.domain.ArdAlarmRadar; import com.ruoyi.alarm.radarAlarm.service.IArdAlarmRadarService; import com.ruoyi.alarm.radar.domain.ArdAlarmRadar; import com.ruoyi.alarm.radar.service.IArdAlarmRadarService; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; ard-work/src/main/java/com/ruoyi/alarm/radar/domain/ArdAlarmRadar.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/radarAlarm/domain/ArdAlarmRadar.java 修改 @@ -1,7 +1,6 @@ package com.ruoyi.alarm.radarAlarm.domain; package com.ruoyi.alarm.radar.domain; import java.util.Date; import java.util.List; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; ard-work/src/main/java/com/ruoyi/alarm/radar/domain/RadarAlarmData.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/radarAlarm/domain/RadarAlarmData.java 修改 @@ -1,4 +1,4 @@ package com.ruoyi.alarm.radarAlarm.domain; package com.ruoyi.alarm.radar.domain; import com.fasterxml.jackson.annotation.JsonFormat; import com.ruoyi.common.annotation.Excel; ard-work/src/main/java/com/ruoyi/alarm/radar/mapper/ArdAlarmRadarMapper.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/radarAlarm/mapper/ArdAlarmRadarMapper.java 修改 @@ -1,6 +1,6 @@ package com.ruoyi.alarm.radarAlarm.mapper; package com.ruoyi.alarm.radar.mapper; import com.ruoyi.alarm.radarAlarm.domain.ArdAlarmRadar; import com.ruoyi.alarm.radar.domain.ArdAlarmRadar; import org.apache.ibatis.annotations.Param; import java.util.Date; ard-work/src/main/java/com/ruoyi/alarm/radar/service/IArdAlarmRadarService.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/radarAlarm/service/IArdAlarmRadarService.java 修改 @@ -1,6 +1,6 @@ package com.ruoyi.alarm.radarAlarm.service; package com.ruoyi.alarm.radar.service; import com.ruoyi.alarm.radarAlarm.domain.ArdAlarmRadar; import com.ruoyi.alarm.radar.domain.ArdAlarmRadar; import java.util.List; ard-work/src/main/java/com/ruoyi/alarm/radar/service/impl/ArdAlarmRadarServiceImpl.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/radarAlarm/service/impl/ArdAlarmRadarServiceImpl.java 修改 @@ -1,10 +1,10 @@ package com.ruoyi.alarm.radarAlarm.service.impl; package com.ruoyi.alarm.radar.service.impl; import java.util.List; import com.ruoyi.alarm.radarAlarm.domain.ArdAlarmRadar; import com.ruoyi.alarm.radarAlarm.mapper.ArdAlarmRadarMapper; import com.ruoyi.alarm.radarAlarm.service.IArdAlarmRadarService; import com.ruoyi.alarm.radar.domain.ArdAlarmRadar; import com.ruoyi.alarm.radar.mapper.ArdAlarmRadarMapper; import com.ruoyi.alarm.radar.service.IArdAlarmRadarService; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; ard-work/src/main/java/com/ruoyi/alarm/steal/controller/ardAlarmStealElecController.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/stealAlarm/controller/ardAlarmStealElecController.java 修改 @@ -1,4 +1,4 @@ package com.ruoyi.alarm.stealAlarm.controller; package com.ruoyi.alarm.steal.controller; import com.ruoyi.common.annotation.Anonymous; import org.springframework.web.bind.annotation.RestController; ard-work/src/main/java/com/ruoyi/alarm/steal/domain/ArdAlarmStealelec.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/stealAlarm/domain/ArdAlarmStealelec.java 修改 @@ -1,4 +1,4 @@ package com.ruoyi.alarm.stealAlarm.domain; package com.ruoyi.alarm.steal.domain; import com.fasterxml.jackson.annotation.JsonFormat; import com.ruoyi.common.annotation.Excel; ard-work/src/main/java/com/ruoyi/alarm/steal/mapper/ArdAlarmStealelecMapper.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/stealAlarm/mapper/ArdAlarmStealelecMapper.java 修改 @@ -1,11 +1,8 @@ package com.ruoyi.alarm.stealAlarm.mapper; package com.ruoyi.alarm.steal.mapper; import com.ruoyi.alarm.globalAlarm.domain.GlobalAlarmCondition; import com.ruoyi.alarm.stealAlarm.domain.ArdAlarmStealelec; import com.ruoyi.alarm.tubeAlarm.domain.ArdAlarmTube; import com.ruoyi.alarm.global.domain.GlobalAlarmCondition; import com.ruoyi.alarm.steal.domain.ArdAlarmStealelec; import org.apache.ibatis.annotations.Param; import java.util.Date; import java.util.List; ard-work/src/main/java/com/ruoyi/alarm/steal/service/IStealElecAlarmService.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/stealAlarm/service/IStealElecAlarmService.java 修改 @@ -1,8 +1,7 @@ package com.ruoyi.alarm.stealAlarm.service; package com.ruoyi.alarm.steal.service; import com.ruoyi.alarm.stealAlarm.domain.ArdAlarmStealelec; import com.ruoyi.alarm.steal.domain.ArdAlarmStealelec; import java.util.Date; import java.util.List; ard-work/src/main/java/com/ruoyi/alarm/steal/service/impl/IStealElecAlarmServiceImpl.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/stealAlarm/service/impl/IStealElecAlarmServiceImpl.java 修改 @@ -1,13 +1,13 @@ package com.ruoyi.alarm.stealAlarm.service.impl; package com.ruoyi.alarm.steal.service.impl; import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSONObject; import com.ruoyi.alarm.stealAlarm.domain.ArdAlarmStealelec; import com.ruoyi.alarm.stealAlarm.service.IStealElecAlarmService; import com.ruoyi.alarm.steal.domain.ArdAlarmStealelec; import com.ruoyi.alarm.steal.service.IStealElecAlarmService; import com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWell; import com.ruoyi.alarmpoints.well.mapper.ArdAlarmpointsWellMapper; import com.ruoyi.alarm.stealAlarm.mapper.ArdAlarmStealelecMapper; import com.ruoyi.alarm.steal.mapper.ArdAlarmStealelecMapper; import com.ruoyi.system.service.ISysConfigService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; ard-work/src/main/java/com/ruoyi/alarm/tube/controller/ArdAlarmTubeController.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/tubeAlarm/controller/ArdAlarmTubeController.java 修改 @@ -1,11 +1,10 @@ package com.ruoyi.alarm.tubeAlarm.controller; package com.ruoyi.alarm.tube.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; import com.ruoyi.alarm.tubeAlarm.domain.ArdAlarmTube; import com.ruoyi.alarm.tubeAlarm.service.IArdAlarmTubeService; import io.swagger.annotations.ApiOperation; import com.ruoyi.alarm.tube.domain.ArdAlarmTube; import com.ruoyi.alarm.tube.service.IArdAlarmTubeService; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; ard-work/src/main/java/com/ruoyi/alarm/tube/domain/ArdAlarmTube.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/tubeAlarm/domain/ArdAlarmTube.java 修改 @@ -1,12 +1,10 @@ package com.ruoyi.alarm.tubeAlarm.domain; package com.ruoyi.alarm.tube.domain; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import lombok.ToString; 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; ard-work/src/main/java/com/ruoyi/alarm/tube/mapper/ArdAlarmTubeMapper.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/tubeAlarm/mapper/ArdAlarmTubeMapper.java 修改 @@ -1,9 +1,8 @@ package com.ruoyi.alarm.tubeAlarm.mapper; package com.ruoyi.alarm.tube.mapper; import java.util.List; import com.ruoyi.alarm.stealAlarm.domain.ArdAlarmStealelec; import com.ruoyi.alarm.tubeAlarm.domain.ArdAlarmTube; import com.ruoyi.alarm.tube.domain.ArdAlarmTube; import org.apache.ibatis.annotations.Param; ard-work/src/main/java/com/ruoyi/alarm/tube/service/IArdAlarmTubeService.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/tubeAlarm/service/IArdAlarmTubeService.java 修改 @@ -1,8 +1,8 @@ package com.ruoyi.alarm.tubeAlarm.service; package com.ruoyi.alarm.tube.service; import java.util.List; import com.ruoyi.alarm.tubeAlarm.domain.ArdAlarmTube; import com.ruoyi.alarm.tube.domain.ArdAlarmTube; /** * 管线泄露报警Service接口 ard-work/src/main/java/com/ruoyi/alarm/tube/service/impl/ArdAlarmTubeServiceImpl.java
文件名从 ard-work/src/main/java/com/ruoyi/alarm/tubeAlarm/service/impl/ArdAlarmTubeServiceImpl.java 修改 @@ -1,8 +1,8 @@ package com.ruoyi.alarm.tubeAlarm.service.impl; package com.ruoyi.alarm.tube.service.impl; import com.ruoyi.alarm.tubeAlarm.domain.ArdAlarmTube; import com.ruoyi.alarm.tubeAlarm.mapper.ArdAlarmTubeMapper; import com.ruoyi.alarm.tubeAlarm.service.IArdAlarmTubeService; import com.ruoyi.alarm.tube.domain.ArdAlarmTube; import com.ruoyi.alarm.tube.mapper.ArdAlarmTubeMapper; import com.ruoyi.alarm.tube.service.IArdAlarmTubeService; import com.ruoyi.common.utils.DateUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; ard-work/src/main/java/com/ruoyi/alarmpoints/elecwall/controller/ArdWallController.java
对比新文件 @@ -0,0 +1,104 @@ package com.ruoyi.alarmpoints.elecwall.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; 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.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.alarmpoints.elecwall.domain.ArdWall; import com.ruoyi.alarmpoints.elecwall.service.IArdWallService; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.core.page.TableDataInfo; /** * 电子围栏管理Controller * * @author ard * @date 2023-07-20 */ @RestController @RequestMapping("/alarmpoints/wall") public class ArdWallController extends BaseController { @Autowired private IArdWallService ardWallService; /** * 查询电子围栏管理列表 */ @PreAuthorize("@ss.hasPermi('alarmpoints:wall:list')") @GetMapping("/list") public TableDataInfo list(ArdWall ardWall) { startPage(); List<ArdWall> list = ardWallService.selectArdWallList(ardWall); return getDataTable(list); } /** * 导出电子围栏管理列表 */ @PreAuthorize("@ss.hasPermi('alarmpoints:wall:export')") @Log(title = "电子围栏管理", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, ArdWall ardWall) { List<ArdWall> list = ardWallService.selectArdWallList(ardWall); ExcelUtil<ArdWall> util = new ExcelUtil<ArdWall>(ArdWall.class); util.exportExcel(response, list, "电子围栏管理数据"); } /** * 获取电子围栏管理详细信息 */ @PreAuthorize("@ss.hasPermi('alarmpoints:wall:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") String id) { return success(ardWallService.selectArdWallById(id)); } /** * 新增电子围栏管理 */ @PreAuthorize("@ss.hasPermi('alarmpoints:wall:add')") @Log(title = "电子围栏管理", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody ArdWall ardWall) { return toAjax(ardWallService.insertArdWall(ardWall)); } /** * 修改电子围栏管理 */ @PreAuthorize("@ss.hasPermi('alarmpoints:wall:edit')") @Log(title = "电子围栏管理", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody ArdWall ardWall) { return toAjax(ardWallService.updateArdWall(ardWall)); } /** * 删除电子围栏管理 */ @PreAuthorize("@ss.hasPermi('alarmpoints:wall:remove')") @Log(title = "电子围栏管理", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable String[] ids) { return toAjax(ardWallService.deleteArdWallByIds(ids)); } } ard-work/src/main/java/com/ruoyi/alarmpoints/elecwall/domain/ArdWall.java
对比新文件 @@ -0,0 +1,125 @@ package com.ruoyi.alarmpoints.elecwall.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; /** * 电子围栏管理对象 ard_wall * * @author ard * @date 2023-07-20 */ public class ArdWall extends BaseEntity { private static final long serialVersionUID = 1L; /** ID */ private String id; /** 名称 */ @Excel(name = "名称") private String wallName; /** 范围 */ @Excel(name = "范围") private String wallPoi; /** 类型 */ @Excel(name = "类型") private String type; /** 颜色 */ @Excel(name = "颜色") private String color; /** 所属部门 */ @Excel(name = "所属部门") private Integer deptId; /** 所属用户 */ @Excel(name = "所属用户") private String userId; public void setId(String id) { this.id = id; } public String getId() { return id; } public void setWallName(String wallName) { this.wallName = wallName; } public String getWallName() { return wallName; } public void setWallPoi(String wallPoi) { this.wallPoi = wallPoi; } public String getWallPoi() { return wallPoi; } public void setType(String type) { this.type = type; } public String getType() { return type; } public void setColor(String color) { this.color = color; } public String getColor() { return color; } public void setDeptId(Integer deptId) { this.deptId = deptId; } public Integer getDeptId() { return deptId; } public void setUserId(String userId) { this.userId = userId; } public String getUserId() { return userId; } @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("id", getId()) .append("wallName", getWallName()) .append("wallPoi", getWallPoi()) .append("type", getType()) .append("color", getColor()) .append("deptId", getDeptId()) .append("userId", getUserId()) .append("createBy", getCreateBy()) .append("createTime", getCreateTime()) .append("updateBy", getUpdateBy()) .append("updateTime", getUpdateTime()) .toString(); } } ard-work/src/main/java/com/ruoyi/alarmpoints/elecwall/mapper/ArdWallMapper.java
对比新文件 @@ -0,0 +1,61 @@ package com.ruoyi.alarmpoints.elecwall.mapper; import java.util.List; import com.ruoyi.alarmpoints.elecwall.domain.ArdWall; /** * 电子围栏管理Mapper接口 * * @author ard * @date 2023-07-20 */ public interface ArdWallMapper { /** * 查询电子围栏管理 * * @param id 电子围栏管理主键 * @return 电子围栏管理 */ public ArdWall selectArdWallById(String id); /** * 查询电子围栏管理列表 * * @param ardWall 电子围栏管理 * @return 电子围栏管理集合 */ public List<ArdWall> selectArdWallList(ArdWall ardWall); /** * 新增电子围栏管理 * * @param ardWall 电子围栏管理 * @return 结果 */ public int insertArdWall(ArdWall ardWall); /** * 修改电子围栏管理 * * @param ardWall 电子围栏管理 * @return 结果 */ public int updateArdWall(ArdWall ardWall); /** * 删除电子围栏管理 * * @param id 电子围栏管理主键 * @return 结果 */ public int deleteArdWallById(String id); /** * 批量删除电子围栏管理 * * @param ids 需要删除的数据主键集合 * @return 结果 */ public int deleteArdWallByIds(String[] ids); } ard-work/src/main/java/com/ruoyi/alarmpoints/elecwall/service/IArdWallService.java
对比新文件 @@ -0,0 +1,61 @@ package com.ruoyi.alarmpoints.elecwall.service; import java.util.List; import com.ruoyi.alarmpoints.elecwall.domain.ArdWall; /** * 电子围栏管理Service接口 * * @author ard * @date 2023-07-20 */ public interface IArdWallService { /** * 查询电子围栏管理 * * @param id 电子围栏管理主键 * @return 电子围栏管理 */ public ArdWall selectArdWallById(String id); /** * 查询电子围栏管理列表 * * @param ardWall 电子围栏管理 * @return 电子围栏管理集合 */ public List<ArdWall> selectArdWallList(ArdWall ardWall); /** * 新增电子围栏管理 * * @param ardWall 电子围栏管理 * @return 结果 */ public int insertArdWall(ArdWall ardWall); /** * 修改电子围栏管理 * * @param ardWall 电子围栏管理 * @return 结果 */ public int updateArdWall(ArdWall ardWall); /** * 批量删除电子围栏管理 * * @param ids 需要删除的电子围栏管理主键集合 * @return 结果 */ public int deleteArdWallByIds(String[] ids); /** * 删除电子围栏管理信息 * * @param id 电子围栏管理主键 * @return 结果 */ public int deleteArdWallById(String id); } ard-work/src/main/java/com/ruoyi/alarmpoints/elecwall/service/impl/ArdWallServiceImpl.java
对比新文件 @@ -0,0 +1,95 @@ package com.ruoyi.alarmpoints.elecwall.service.impl; import java.util.List; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.uuid.IdUtils; import org.springframework.stereotype.Service; import com.ruoyi.alarmpoints.elecwall.mapper.ArdWallMapper; import com.ruoyi.alarmpoints.elecwall.domain.ArdWall; import com.ruoyi.alarmpoints.elecwall.service.IArdWallService; import javax.annotation.Resource; /** * 电子围栏管理Service业务层处理 * * @author ard * @date 2023-07-20 */ @Service public class ArdWallServiceImpl implements IArdWallService { @Resource private ArdWallMapper ardWallMapper; /** * 查询电子围栏管理 * * @param id 电子围栏管理主键 * @return 电子围栏管理 */ @Override public ArdWall selectArdWallById(String id) { return ardWallMapper.selectArdWallById(id); } /** * 查询电子围栏管理列表 * * @param ardWall 电子围栏管理 * @return 电子围栏管理 */ @Override public List<ArdWall> selectArdWallList(ArdWall ardWall) { return ardWallMapper.selectArdWallList(ardWall); } /** * 新增电子围栏管理 * * @param ardWall 电子围栏管理 * @return 结果 */ @Override public int insertArdWall(ArdWall ardWall) { ardWall.setId(IdUtils.simpleUUID()); ardWall.setCreateBy(SecurityUtils.getUsername()); ardWall.setCreateTime(DateUtils.getNowDate()); return ardWallMapper.insertArdWall(ardWall); } /** * 修改电子围栏管理 * * @param ardWall 电子围栏管理 * @return 结果 */ @Override public int updateArdWall(ArdWall ardWall) { ardWall.setUpdateBy(SecurityUtils.getUsername()); ardWall.setUpdateTime(DateUtils.getNowDate()); return ardWallMapper.updateArdWall(ardWall); } /** * 批量删除电子围栏管理 * * @param ids 需要删除的电子围栏管理主键 * @return 结果 */ @Override public int deleteArdWallByIds(String[] ids) { return ardWallMapper.deleteArdWallByIds(ids); } /** * 删除电子围栏管理信息 * * @param id 电子围栏管理主键 * @return 结果 */ @Override public int deleteArdWallById(String id) { return ardWallMapper.deleteArdWallById(id); } } ard-work/src/main/java/com/ruoyi/constant/CamPriority.java
@@ -23,6 +23,7 @@ priorityMap.put("sys_radar_pumpshutdown", 800);//雷达抽油机停机 priorityMap.put("sys_external", 700);//外联报警 priorityMap.put("sys_access_control", 600);//门禁报警 priorityMap.put("sys_app_onekey", 500);//app一键报警 priorityMap.put("sys_patrol_inspect", 1);//巡检 } } ard-work/src/main/java/com/ruoyi/device/hiksdk/util/hikSdkUtil/LoginResultCallBack.java
@@ -1,19 +1,15 @@ package com.ruoyi.device.hiksdk.util.hikSdkUtil; import com.ruoyi.alarm.globalAlarm.domain.GuidePriorityQueue; import com.ruoyi.alarm.globalAlarm.domain.GuideTask; import com.ruoyi.alarm.global.domain.GuidePriorityQueue; import com.ruoyi.alarm.global.domain.GuideTask; import com.ruoyi.common.utils.spring.SpringUtils; import com.ruoyi.device.camera.domain.ArdCameras; import com.ruoyi.device.camera.mapper.ArdCamerasMapper; import com.ruoyi.device.camera.service.IArdCamerasService; import com.ruoyi.device.hiksdk.common.GlobalVariable; import com.sun.jna.Pointer; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; import javax.annotation.Resource; import java.util.Comparator; import java.util.PriorityQueue; import java.util.concurrent.PriorityBlockingQueue; /** ard-work/src/main/java/com/ruoyi/media/service/impl/MediaService.java
@@ -6,32 +6,59 @@ import com.ruoyi.media.service.IMediaService; import com.ruoyi.utils.forest.MediaClient; import com.ruoyi.utils.tools.ArdTool; import com.sun.jna.Platform; import io.minio.messages.Item; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import javax.annotation.PostConstruct; import javax.annotation.Resource; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * @Description: * @Description: 流媒体业务 * @ClassName: MediaService * @Author: 刘苏义 * @Date: 2023年07月13日9:28 * @Version: 1.0 **/ @Service @Slf4j public class MediaService implements IMediaService { @Resource MediaClient mediaClient; @Value("${mediamtx.host}") String mediamtxHost; @PostConstruct public void initMediaMtx() { if (Platform.isWindows()) { String exePath = System.getProperty("user.dir") + File.separator + "lib" + File.separator + "mediamtx" + File.separator + "mediamtx.exe"; String ymlPath = System.getProperty("user.dir") + File.separator + "lib" + File.separator + "mediamtx" + File.separator + "mediamtx.yml"; try { // 构建启动命令,使用cmd /c start命令来启动可执行程序并显示命令提示符窗口 String[] cmd = {"cmd", "/c", "start", exePath,ymlPath}; ProcessBuilder processBuilder = new ProcessBuilder(cmd); processBuilder.redirectErrorStream(true); // 将错误输出重定向到标准输出 Process process = processBuilder.start(); // 如果你想等待程序完成 int exitCode = process.waitFor(); } catch (IOException | InterruptedException e) { e.printStackTrace(); } } } @Override public String addPath(String name, String rtspPath,String mode) { public String addPath(String name, String rtspPath, String mode) { String rtspUrl = "rtsp://" + mediamtxHost + ":8554/"; Conf mediaInfo = new Conf(); //-vcodec libx264 //指定视频编码器为 libx264,使用 H.264 编码格式进行视频压缩 @@ -46,14 +73,12 @@ //GPU硬解码编码 -hwaccel cuvid -c:v h264_cuvid 使用cuda解码 -c:v h264_nvenc 使用cuda编码 //String cmd = "ffmpeg -hwaccel cuvid -c:v h264_cuvid -rtsp_transport udp -i \"" + rtspPath + "\" -c:v h264_nvenc -r 25 -threads 4 -b:v 4096k -f rtsp rtsp://localhost:$RTSP_PORT/$MTX_PATH"; if(mode.equals("1")) { if (mode.equals("1")) { mediaInfo.setRunondemand(cmd); mediaInfo.setRunondemandrestart(true); } else{ mediaInfo.setRunoninit(cmd); mediaInfo.setRunoninitrestart(true); } else { mediaInfo.setRunoninit(cmd); mediaInfo.setRunoninitrestart(true); } mediaClient.addPath(name, mediaInfo); return rtspUrl + name; @@ -67,13 +92,10 @@ info.setName(name); String runoninit; String runondemand = item.getConf().getRunondemand(); if (StringUtils.isNotEmpty(runondemand)) { runoninit= item.getConf().getRunondemand(); if (StringUtils.isNotEmpty(runondemand)) { runoninit = item.getConf().getRunondemand(); info.setMode("1"); } else { } else { runoninit = item.getConf().getRunoninit(); info.setMode("2"); } @@ -89,8 +111,7 @@ @Override public void removePath(String[] names) { for(String name:names) { for (String name : names) { mediaClient.removePath(name); } } @@ -109,13 +130,10 @@ info.setName(name); String runoninit; String runondemand = item.getConf().getRunondemand(); if (StringUtils.isNotEmpty(runondemand)) { runoninit= item.getConf().getRunondemand(); if (StringUtils.isNotEmpty(runondemand)) { runoninit = item.getConf().getRunondemand(); info.setMode("1"); } else { } else { runoninit = item.getConf().getRunoninit(); info.setMode("2"); } @@ -208,8 +226,7 @@ String rtspUrl = "rtsp://" + mediamtxHost + ":8554/" + name; info.setRtspUrl(rtspUrl); Source source = item.getSource(); if(source==null) { if (source == null) { continue; } RtspSession rtspSession = getRtspSessionById(source.getId()); @@ -228,13 +245,10 @@ //RTSP源地址 String runondemand = item.getConf().getRunondemand(); String runoninit; if(StringUtils.isNotEmpty(runondemand)) { runoninit = item.getConf().getRunondemand(); } else { runoninit = item.getConf().getRunoninit(); if (StringUtils.isNotEmpty(runondemand)) { runoninit = item.getConf().getRunondemand(); } else { runoninit = item.getConf().getRunoninit(); } String regex = "rtsp://[^\\s\"]+"; Pattern pattern = Pattern.compile(regex); ard-work/src/main/java/com/ruoyi/rongcloud/controller/RongCloudController.java
@@ -2,6 +2,7 @@ import com.ruoyi.common.annotation.Anonymous; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.utils.uuid.IdUtils; import com.ruoyi.device.hiksdk.config.MinioClientSingleton; import com.ruoyi.device.hiksdk.util.minio.MinioUtils; import com.ruoyi.rongcloud.service.RongCloudService; ard-work/src/main/java/com/ruoyi/utils/mqtt/MqttConsumerCallback.java
@@ -1,6 +1,6 @@ package com.ruoyi.utils.mqtt; import com.ruoyi.alarm.globalAlarm.service.impl.GlobalAlarmServiceImpl; import com.ruoyi.alarm.global.service.impl.GlobalAlarmServiceImpl; import com.ruoyi.common.utils.spring.SpringUtils; import lombok.extern.slf4j.Slf4j; import org.eclipse.paho.client.mqttv3.*; ard-work/src/main/resources/mapper/alarm/ArdAlarmAccessMapper.xml
@@ -2,7 +2,7 @@ <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.ruoyi.alarm.accessAlarm.mapper.ArdAlarmAccessMapper"> <mapper namespace="com.ruoyi.alarm.access.mapper.ArdAlarmAccessMapper"> <resultMap type="ArdAlarmAccess" id="ArdAlarmAccessResult"> <result property="id" column="id" /> ard-work/src/main/resources/mapper/alarm/ArdAlarmApponekeyMapper.xml
对比新文件 @@ -0,0 +1,124 @@ <?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.alarm.apponekey.mapper.ArdAlarmApponekeyMapper"> <resultMap type="ArdAlarmApponekey" id="ArdAlarmApponekeyResult"> <result property="id" column="id" /> <result property="userId" column="user_id" /> <result property="name" column="name" /> <result property="longitude" column="longitude" /> <result property="latitude" column="latitude" /> <result property="altitude" column="altitude" /> <result property="recordUrl" column="record_url" /> <result property="createTime" column="create_time" /> <result property="viewTime" column="view_time" /> </resultMap> <sql id="selectArdAlarmApponekeyVo"> select id, user_id,name, longitude, latitude, altitude, record_url, create_time,view_time from ard_alarm_apponekey </sql> <select id="selectArdAlarmApponekeyList" parameterType="ArdAlarmApponekey" resultMap="ArdAlarmApponekeyResult"> <include refid="selectArdAlarmApponekeyVo"/> <where> </where> </select> <select id="selectArdAlarmApponekeyById" parameterType="String" resultMap="ArdAlarmApponekeyResult"> <include refid="selectArdAlarmApponekeyVo"/> where id = #{id} </select> <insert id="insertArdAlarmApponekey" parameterType="ArdAlarmApponekey"> insert into ard_alarm_apponekey <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null">id,</if> <if test="userId != null">user_id,</if> <if test="name != null">name,</if> <if test="longitude != null">longitude,</if> <if test="latitude != null">latitude,</if> <if test="altitude != null">altitude,</if> <if test="recordUrl != null">record_url,</if> <if test="createTime != null">create_time,</if> <if test="viewTime != null">view_time,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null">#{id},</if> <if test="userId != null">#{userId},</if> <if test="name != null">#{name},</if> <if test="longitude != null">#{longitude},</if> <if test="latitude != null">#{latitude},</if> <if test="altitude != null">#{altitude},</if> <if test="recordUrl != null">#{recordUrl},</if> <if test="createTime != null">#{createTime},</if> <if test="viewTime != null">#{viewTime},</if> </trim> </insert> <update id="updateArdAlarmApponekey" parameterType="ArdAlarmApponekey"> update ard_alarm_apponekey <trim prefix="SET" suffixOverrides=","> <if test="userId != null">user_id = #{userId},</if> <if test="name != null">name = #{name},</if> <if test="longitude != null">longitude = #{longitude},</if> <if test="latitude != null">latitude = #{latitude},</if> <if test="altitude != null">altitude = #{altitude},</if> <if test="recordUrl != null">record_url = #{recordUrl},</if> <if test="createTime != null">create_time = #{createTime},</if> <if test="viewTime != null">view_time = #{viewTime},</if> </trim> where id = #{id} </update> <delete id="deleteArdAlarmApponekeyById" parameterType="String"> delete from ard_alarm_apponekey where id = #{id} </delete> <delete id="deleteArdAlarmApponekeyByIds" parameterType="String"> delete from ard_alarm_apponekey where id in <foreach item="id" collection="array" open="(" separator="," close=")"> #{id} </foreach> </delete> <select id="selectCountByAlarmTime" resultType="Integer"> SELECT COUNT(DISTINCT aaak.user_id) FROM ard_alarm_apponekey aaak WHERE aaak.create_time >= CURRENT_TIMESTAMP - INTERVAL '%${refreshTime}%' MINUTE and aaak.view_time is null </select> <select id="selectListAllByCommand" resultMap="ArdAlarmApponekeyResult"> SELECT T.* FROM ( SELECT aaa.ID, aaa.user_id, aaa.NAME, aaa.create_time, aaa.longitude, aaa.latitude, aaa.altitude, aaa.record_url, ROW_NUMBER () OVER ( PARTITION BY aaa.NAME ORDER BY aaa.create_time DESC ) AS rn, COUNT ( CASE WHEN aaa.view_time IS NULL THEN 1 END ) OVER ( PARTITION BY aaa.NAME ) AS COUNT, COUNT ( aaa.create_time ) OVER ( PARTITION BY aaa.NAME ) AS total FROM ard_alarm_apponekey aaa WHERE aaa.create_time >= ( CURRENT_TIMESTAMP - INTERVAL '%${refreshTime}%' MINUTE ) ORDER BY aaa.create_time DESC ) T WHERE T.rn = 1 </select> <update id="updateViewTimeByUserId" parameterType="String"> update ard_alarm_apponekey set view_time=#{viewTime} where user_id = #{userId} and create_time <= #{createTime} and view_time is null </update> </mapper> ard-work/src/main/resources/mapper/alarm/ArdAlarmCameraMapper.xml
@@ -2,7 +2,7 @@ <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.ruoyi.alarm.cameraAlarm.mapper.ArdAlarmCameraMapper"> <mapper namespace="com.ruoyi.alarm.camera.mapper.ArdAlarmCameraMapper"> <resultMap type="ArdAlarmCamera" id="ArdAlarmCameraResult"> <result property="id" column="id" /> ard-work/src/main/resources/mapper/alarm/ArdAlarmExternalMapper.xml
@@ -2,7 +2,7 @@ <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.ruoyi.alarm.externalAlarm.mapper.ArdAlarmExternalMapper"> <mapper namespace="com.ruoyi.alarm.external.mapper.ArdAlarmExternalMapper"> <resultMap type="ArdAlarmExternal" id="ArdAlarmExternalResult"> <result property="id" column="id" /> ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarMapper.xml
@@ -2,7 +2,7 @@ <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.ruoyi.alarm.radarAlarm.mapper.ArdAlarmRadarMapper"> <mapper namespace="com.ruoyi.alarm.radar.mapper.ArdAlarmRadarMapper"> <resultMap type="ArdAlarmRadar" id="ArdAlarmRadarResult"> <result property="id" column="id"/> <result property="name" column="name"/> ard-work/src/main/resources/mapper/alarm/ArdAlarmStealelecMapper.xml
@@ -1,6 +1,6 @@ <?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.alarm.stealAlarm.mapper.ArdAlarmStealelecMapper"> <mapper namespace="com.ruoyi.alarm.steal.mapper.ArdAlarmStealelecMapper"> <resultMap id="BaseResultMap" type="ArdAlarmStealelec"> <id column="id" property="id"/> <result column="name" property="name"/> ard-work/src/main/resources/mapper/alarm/ArdAlarmTubeMapper.xml
@@ -2,7 +2,7 @@ <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.ruoyi.alarm.tubeAlarm.mapper.ArdAlarmTubeMapper"> <mapper namespace="com.ruoyi.alarm.tube.mapper.ArdAlarmTubeMapper"> <resultMap type="ArdAlarmTube" id="ArdAlarmTubeResult"> <result property="id" column="id"/> ard-work/src/main/resources/mapper/alarmpoints/ArdWallMapper.xml
对比新文件 @@ -0,0 +1,99 @@ <?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.alarmpoints.elecwall.mapper.ArdWallMapper"> <resultMap type="ArdWall" id="ArdWallResult"> <result property="id" column="id" /> <result property="wallName" column="wall_name" /> <result property="wallPoi" column="wall_poi" /> <result property="type" column="type" /> <result property="color" column="color" /> <result property="deptId" column="dept_id" /> <result property="userId" column="user_id" /> <result property="createBy" column="create_by" /> <result property="createTime" column="create_time" /> <result property="updateBy" column="update_by" /> <result property="updateTime" column="update_time" /> </resultMap> <sql id="selectArdWallVo"> select id, wall_name, wall_poi, type, color, dept_id, user_id, create_by, create_time, update_by, update_time from ard_wall </sql> <select id="selectArdWallList" parameterType="ArdWall" resultMap="ArdWallResult"> <include refid="selectArdWallVo"/> <where> <if test="wallName != null and wallName != ''"> and wall_name like '%'||#{wallName}||'%'</if> <if test="wallPoi != null and wallPoi != ''"> and wall_poi = #{wallPoi}</if> <if test="type != null and type != ''"> and type = #{type}</if> <if test="color != null and color != ''"> and color = #{color}</if> <if test="deptId != null "> and dept_id = #{deptId}</if> <if test="userId != null and userId != ''"> and user_id = #{userId}</if> </where> </select> <select id="selectArdWallById" parameterType="String" resultMap="ArdWallResult"> <include refid="selectArdWallVo"/> where id = #{id} </select> <insert id="insertArdWall" parameterType="ArdWall"> insert into ard_wall <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null">id,</if> <if test="wallName != null">wall_name,</if> <if test="wallPoi != null">wall_poi,</if> <if test="type != null">type,</if> <if test="color != null">color,</if> <if test="deptId != null">dept_id,</if> <if test="userId != null">user_id,</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> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null">#{id},</if> <if test="wallName != null">#{wallName},</if> <if test="wallPoi != null">#{wallPoi},</if> <if test="type != null">#{type},</if> <if test="color != null">#{color},</if> <if test="deptId != null">#{deptId},</if> <if test="userId != null">#{userId},</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> </trim> </insert> <update id="updateArdWall" parameterType="ArdWall"> update ard_wall <trim prefix="SET" suffixOverrides=","> <if test="wallName != null">wall_name = #{wallName},</if> <if test="wallPoi != null">wall_poi = #{wallPoi},</if> <if test="type != null">type = #{type},</if> <if test="color != null">color = #{color},</if> <if test="deptId != null">dept_id = #{deptId},</if> <if test="userId != null">user_id = #{userId},</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> </trim> where id = #{id} </update> <delete id="deleteArdWallById" parameterType="String"> delete from ard_wall where id = #{id} </delete> <delete id="deleteArdWallByIds" parameterType="String"> delete from ard_wall where id in <foreach item="id" collection="array" open="(" separator="," close=")"> #{id} </foreach> </delete> </mapper> lib/mediamtx/LICENSE
对比新文件 @@ -0,0 +1,21 @@ MIT License Copyright (c) 2019 aler9 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. lib/mediamtx/mediamtx.exeBinary files differ
lib/mediamtx/mediamtx.yml
对比新文件 @@ -0,0 +1,466 @@ ############################################### # General parameters # Sets the verbosity of the program; available values are "error", "warn", "info", "debug". logLevel: info # Destinations of log messages; available values are "stdout", "file" and "syslog". logDestinations: [stdout] # If "file" is in logDestinations, this is the file which will receive the logs. logFile: mediamtx.log # Timeout of read operations. readTimeout: 10s # Timeout of write operations. writeTimeout: 10s # Number of read buffers. # A higher value allows a wider throughput, a lower value allows to save RAM. readBufferCount: 512 # Maximum size of payload of outgoing UDP packets. # This can be decreased to avoid fragmentation on networks with a low UDP MTU. udpMaxPayloadSize: 1472 # HTTP URL to perform external authentication. # Every time a user wants to authenticate, the server calls this URL # with the POST method and a body containing: # { # "ip": "ip", # "user": "user", # "password": "password", # "path": "path", # "protocol": "rtsp|rtmp|hls|webrtc", # "id": "id", # "action": "read|publish", # "query": "query" # } # If the response code is 20x, authentication is accepted, otherwise # it is discarded. externalAuthenticationURL: # Enable the HTTP API. api: yes # Address of the API listener. apiAddress: 192.168.1.227:9997 # Enable Prometheus-compatible metrics. metrics: no # Address of the metrics listener. metricsAddress: 192.168.1.227:9998 # Enable pprof-compatible endpoint to monitor performances. pprof: no # Address of the pprof listener. pprofAddress: 192.168.1.227:9999 # Command to run when a client connects to the server. # Prepend ./ to run an executable in the current folder (example: "./ffmpeg") # This is terminated with SIGINT when a client disconnects from the server. # The following environment variables are available: # * RTSP_PORT: RTSP server port runOnConnect: # Restart the command if it exits. runOnConnectRestart: no ############################################### # RTSP parameters # Disable support for the RTSP protocol. rtspDisable: no # List of enabled RTSP transport protocols. # UDP is the most performant, but doesn't work when there's a NAT/firewall between # server and clients, and doesn't support encryption. # UDP-multicast allows to save bandwidth when clients are all in the same LAN. # TCP is the most versatile, and does support encryption. # The handshake is always performed with TCP. protocols: [udp, multicast, tcp] # Encrypt handshakes and TCP streams with TLS (RTSPS). # Available values are "no", "strict", "optional". encryption: "no" # Address of the TCP/RTSP listener. This is needed only when encryption is "no" or "optional". rtspAddress: :8554 # Address of the TCP/TLS/RTSPS listener. This is needed only when encryption is "strict" or "optional". rtspsAddress: :8322 # Address of the UDP/RTP listener. This is needed only when "udp" is in protocols. rtpAddress: :8000 # Address of the UDP/RTCP listener. This is needed only when "udp" is in protocols. rtcpAddress: :8001 # IP range of all UDP-multicast listeners. This is needed only when "multicast" is in protocols. multicastIPRange: 224.1.0.0/16 # Port of all UDP-multicast/RTP listeners. This is needed only when "multicast" is in protocols. multicastRTPPort: 8002 # Port of all UDP-multicast/RTCP listeners. This is needed only when "multicast" is in protocols. multicastRTCPPort: 8003 # Path to the server key. This is needed only when encryption is "strict" or "optional". # This can be generated with: # openssl genrsa -out server.key 2048 # openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650 serverKey: server.key # Path to the server certificate. This is needed only when encryption is "strict" or "optional". serverCert: server.crt # Authentication methods. Available are "basic" and "digest". # "digest" doesn't provide any additional security and is available for compatibility reasons only. authMethods: [basic] ############################################### # RTMP parameters # Disable support for the RTMP protocol. rtmpDisable: no # Address of the RTMP listener. This is needed only when encryption is "no" or "optional". rtmpAddress: :1935 # Encrypt connections with TLS (RTMPS). # Available values are "no", "strict", "optional". rtmpEncryption: "no" # Address of the RTMPS listener. This is needed only when encryption is "strict" or "optional". rtmpsAddress: :1936 # Path to the server key. This is needed only when encryption is "strict" or "optional". # This can be generated with: # openssl genrsa -out server.key 2048 # openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650 rtmpServerKey: server.key # Path to the server certificate. This is needed only when encryption is "strict" or "optional". rtmpServerCert: server.crt ############################################### # HLS parameters # Disable support for the HLS protocol. hlsDisable: no # Address of the HLS listener. hlsAddress: :8888 # Enable TLS/HTTPS on the HLS server. # This is required for Low-Latency HLS. hlsEncryption: no # Path to the server key. This is needed only when encryption is yes. # This can be generated with: # openssl genrsa -out server.key 2048 # openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650 hlsServerKey: server.key # Path to the server certificate. hlsServerCert: server.crt # By default, HLS is generated only when requested by a user. # This option allows to generate it always, avoiding the delay between request and generation. hlsAlwaysRemux: no # Variant of the HLS protocol to use. Available options are: # * mpegts - uses MPEG-TS segments, for maximum compatibility. # * fmp4 - uses fragmented MP4 segments, more efficient. # * lowLatency - uses Low-Latency HLS. hlsVariant: lowLatency # Number of HLS segments to keep on the server. # Segments allow to seek through the stream. # Their number doesn't influence latency. hlsSegmentCount: 7 # Minimum duration of each segment. # A player usually puts 3 segments in a buffer before reproducing the stream. # The final segment duration is also influenced by the interval between IDR frames, # since the server changes the duration in order to include at least one IDR frame # in each segment. hlsSegmentDuration: 1s # Minimum duration of each part. # A player usually puts 3 parts in a buffer before reproducing the stream. # Parts are used in Low-Latency HLS in place of segments. # Part duration is influenced by the distance between video/audio samples # and is adjusted in order to produce segments with a similar duration. hlsPartDuration: 200ms # Maximum size of each segment. # This prevents RAM exhaustion. hlsSegmentMaxSize: 50M # Value of the Access-Control-Allow-Origin header provided in every HTTP response. # This allows to play the HLS stream from an external website. hlsAllowOrigin: '*' # List of IPs or CIDRs of proxies placed before the HLS server. # If the server receives a request from one of these entries, IP in logs # will be taken from the X-Forwarded-For header. hlsTrustedProxies: [] # Directory in which to save segments, instead of keeping them in the RAM. # This decreases performance, since reading from disk is less performant than # reading from RAM, but allows to save RAM. hlsDirectory: '' ############################################### # WebRTC parameters # Disable support for the WebRTC protocol. webrtcDisable: no # Address of the WebRTC listener. webrtcAddress: :8889 # Enable TLS/HTTPS on the WebRTC server. webrtcEncryption: no # Path to the server key. # This can be generated with: # openssl genrsa -out server.key 2048 # openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650 webrtcServerKey: server.key # Path to the server certificate. webrtcServerCert: server.crt # Value of the Access-Control-Allow-Origin header provided in every HTTP response. # This allows to play the WebRTC stream from an external website. webrtcAllowOrigin: '*' # List of IPs or CIDRs of proxies placed before the WebRTC server. # If the server receives a request from one of these entries, IP in logs # will be taken from the X-Forwarded-For header. webrtcTrustedProxies: [] # List of ICE servers. webrtcICEServers2: # URL can point to a STUN, TURN or TURNS server. # STUN servers are used to obtain the public IP of server and clients. They are # needed when server and clients are on different LANs. # TURN/TURNS servers are needed when a direct connection between server and # clients is not possible. All traffic is routed through them. - url: stun:stun.l.google.com:19302 # if user is "AUTH_SECRET", then authentication is secret based. # the secret must be inserted into the password field. username: '' password: '' # List of public IP addresses that are to be used as a host. # This is used typically for servers that are behind 1:1 D-NAT. webrtcICEHostNAT1To1IPs: [] # Address of a ICE UDP listener in format host:port. # If filled, ICE traffic will pass through a single UDP port, # allowing the deployment of the server inside a container or behind a NAT. webrtcICEUDPMuxAddress: # Address of a ICE TCP listener in format host:port. # If filled, ICE traffic will pass through a single TCP port, # allowing the deployment of the server inside a container or behind a NAT. # Setting this parameter forces usage of the TCP protocol, which is not # optimal for WebRTC. webrtcICETCPMuxAddress: ############################################### # Path parameters # These settings are path-dependent, and the map key is the name of the path. # It's possible to use regular expressions by using a tilde as prefix. # For example, "~^(test1|test2)$" will match both "test1" and "test2". # For example, "~^prefix" will match all paths that start with "prefix". # The settings under the path "all" are applied to all paths that do not match # another entry. paths: all: # Source of the stream. This can be: # * publisher -> the stream is published by a RTSP or RTMP client # * rtsp://existing-url -> the stream is pulled from another RTSP server / camera # * rtsps://existing-url -> the stream is pulled from another RTSP server / camera with RTSPS # * rtmp://existing-url -> the stream is pulled from another RTMP server / camera # * rtmps://existing-url -> the stream is pulled from another RTMP server / camera with RTMPS # * http://existing-url/stream.m3u8 -> the stream is pulled from another HLS server # * https://existing-url/stream.m3u8 -> the stream is pulled from another HLS server with HTTPS # * udp://ip:port -> the stream is pulled from UDP, by listening on the specified IP and port # * redirect -> the stream is provided by another path or server # * rpiCamera -> the stream is provided by a Raspberry Pi Camera source: publisher ############################################### # General path parameters # If the source is a URL, and the source certificate is self-signed # or invalid, you can provide the fingerprint of the certificate in order to # validate it anyway. It can be obtained by running: # openssl s_client -connect source_ip:source_port </dev/null 2>/dev/null | sed -n '/BEGIN/,/END/p' > server.crt # openssl x509 -in server.crt -noout -fingerprint -sha256 | cut -d "=" -f2 | tr -d ':' sourceFingerprint: # If the source is a URL, it will be pulled only when at least # one reader is connected, saving bandwidth. sourceOnDemand: no # If sourceOnDemand is "yes", readers will be put on hold until the source is # ready or until this amount of time has passed. sourceOnDemandStartTimeout: 10s # If sourceOnDemand is "yes", the source will be closed when there are no # readers connected and this amount of time has passed. sourceOnDemandCloseAfter: 10s ############################################### # Authentication path parameters # Username required to publish. # SHA256-hashed values can be inserted with the "sha256:" prefix. publishUser: # Password required to publish. # SHA256-hashed values can be inserted with the "sha256:" prefix. publishPass: # IPs or networks (x.x.x.x/24) allowed to publish. publishIPs: [] # Username required to read. # SHA256-hashed values can be inserted with the "sha256:" prefix. readUser: # password required to read. # SHA256-hashed values can be inserted with the "sha256:" prefix. readPass: # IPs or networks (x.x.x.x/24) allowed to read. readIPs: [] ############################################### # Publisher path parameters (when source is "publisher") # do not allow another client to disconnect the current publisher and publish in its place. disablePublisherOverride: no # if no one is publishing, redirect readers to this path. # It can be can be a relative path (i.e. /otherstream) or an absolute RTSP URL. fallback: ############################################### # RTSP path parameters (when source is a RTSP or a RTSPS URL) # protocol used to pull the stream. available values are "automatic", "udp", "multicast", "tcp". sourceProtocol: automatic # support sources that don't provide server ports or use random server ports. This is a security issue # and must be used only when interacting with sources that require it. sourceAnyPortEnable: no # range header to send to the source, in order to start streaming from the specified offset. # available values: # * clock: Absolute time # * npt: Normal Play Time # * smpte: SMPTE timestamps relative to the start of the recording rtspRangeType: # available values: # * clock: UTC ISO 8601 combined date and time string, e.g. 20230812T120000Z # * npt: duration such as "300ms", "1.5m" or "2h45m", valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h" # * smpte: duration such as "300ms", "1.5m" or "2h45m", valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h" rtspRangeStart: ############################################### # Redirect path parameters (when source is "redirect") # RTSP URL which clients will be redirected to. sourceRedirect: ############################################### # Raspberry Pi Camera path parameters (when source is "rpiCamera") # ID of the camera rpiCameraCamID: 0 # width of frames rpiCameraWidth: 1920 # height of frames rpiCameraHeight: 1080 # flip horizontally rpiCameraHFlip: false # flip vertically rpiCameraVFlip: false # brightness [-1, 1] rpiCameraBrightness: 0 # contrast [0, 16] rpiCameraContrast: 1 # saturation [0, 16] rpiCameraSaturation: 1 # sharpness [0, 16] rpiCameraSharpness: 1 # exposure mode. # values: normal, short, long, custom rpiCameraExposure: normal # auto-white-balance mode. # values: auto, incandescent, tungsten, fluorescent, indoor, daylight, cloudy, custom rpiCameraAWB: auto # denoise operating mode. # values: off, cdn_off, cdn_fast, cdn_hq rpiCameraDenoise: "off" # fixed shutter speed, in microseconds. rpiCameraShutter: 0 # metering mode of the AEC/AGC algorithm. # values: centre, spot, matrix, custom rpiCameraMetering: centre # fixed gain rpiCameraGain: 0 # EV compensation of the image [-10, 10] rpiCameraEV: 0 # Region of interest, in format x,y,width,height rpiCameraROI: # tuning file rpiCameraTuningFile: # sensor mode, in format [width]:[height]:[bit-depth]:[packing] # bit-depth and packing are optional. rpiCameraMode: # frames per second rpiCameraFPS: 30 # period between IDR frames rpiCameraIDRPeriod: 60 # bitrate rpiCameraBitrate: 1000000 # H264 profile rpiCameraProfile: main # H264 level rpiCameraLevel: '4.1' # Autofocus mode # values: auto, manual, continuous rpiCameraAfMode: auto # Autofocus range # values: normal, macro, full rpiCameraAfRange: normal # Autofocus speed # values: normal, fast rpiCameraAfSpeed: normal # Lens position (for manual autofocus only), will be set to focus to a specific distance # calculated by the following formula: d = 1 / value # Examples: 0 moves the lens to infinity. # 0.5 moves the lens to focus on objects 2m away. # 2 moves the lens to focus on objects 50cm away. rpiCameraLensPosition: 0.0 # Specifies the autofocus window, in the form x,y,width,height where the coordinates # are given as a proportion of the entire image. rpiCameraAfWindow: # enables printing text on each frame. rpiCameraTextOverlayEnable: false # text that is printed on each frame. # format is the one of the strftime() function. rpiCameraTextOverlay: '%Y-%m-%d %H:%M:%S - MediaMTX' ############################################### # external commands path parameters # Command to run when this path is initialized. # This can be used to publish a stream and keep it always opened. # Prepend ./ to run an executable in the current folder (example: "./ffmpeg") # This is terminated with SIGINT when the program closes. # The following environment variables are available: # * MTX_PATH: path name # * RTSP_PORT: RTSP server port # * G1, G2, ...: regular expression groups, if path name is # a regular expression. runOnInit: # Restart the command if it exits. runOnInitRestart: no # Command to run when this path is requested. # This can be used to publish a stream on demand. # Prepend ./ to run an executable in the current folder (example: "./ffmpeg") # This is terminated with SIGINT when the path is not requested anymore. # The following environment variables are available: # * MTX_PATH: path name # * RTSP_PORT: RTSP server port # * G1, G2, ...: regular expression groups, if path name is # a regular expression. runOnDemand: # Restart the command if it exits. runOnDemandRestart: no # Readers will be put on hold until the runOnDemand command starts publishing # or until this amount of time has passed. runOnDemandStartTimeout: 10s # The command will be closed when there are no # readers connected and this amount of time has passed. runOnDemandCloseAfter: 10s # Command to run when the stream is ready to be read, whether it is # published by a client or pulled from a server / camera. # Prepend ./ to run an executable in the current folder (example: "./ffmpeg") # This is terminated with SIGINT when the stream is not ready anymore. # The following environment variables are available: # * MTX_PATH: path name # * RTSP_PORT: RTSP server port # * G1, G2, ...: regular expression groups, if path name is # a regular expression. runOnReady: # Restart the command if it exits. runOnReadyRestart: no # Command to run when a clients starts reading. # Prepend ./ to run an executable in the current folder (example: "./ffmpeg") # This is terminated with SIGINT when a client stops reading. # The following environment variables are available: # * MTX_PATH: path name # * RTSP_PORT: RTSP server port # * G1, G2, ...: regular expression groups, if path name is # a regular expression. runOnRead: # Restart the command if it exits. runOnReadRestart: no ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
@@ -6,9 +6,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiSupport; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import io.swagger.annotations.*; import org.apache.commons.lang3.ArrayUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; @@ -41,14 +39,13 @@ /** * 用户信息 * * * @author ruoyi */ @Api(tags = "用户信息") @RestController @RequestMapping("/system/user") @Api(tags = "用户信息") public class SysUserController extends BaseController { public class SysUserController extends BaseController { @Autowired private ISysUserService userService; @@ -64,12 +61,9 @@ /** * 获取用户列表 */ @ApiOperationSupport(includeParameters={"user.userId"}) @PreAuthorize("@ss.hasPermi('system:user:list')") @GetMapping("/list") public TableDataInfo list(SysUser user) { public TableDataInfo list(SysUser user) { startPage(); List<SysUser> list = userService.selectUserList(user); return getDataTable(list); @@ -78,8 +72,7 @@ @Log(title = "用户管理", businessType = BusinessType.EXPORT) @PreAuthorize("@ss.hasPermi('system:user:export')") @PostMapping("/export") public void export(HttpServletResponse response, SysUser user) { public void export(HttpServletResponse response, SysUser user) { List<SysUser> list = userService.selectUserList(user); ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class); util.exportExcel(response, list, "用户数据"); @@ -88,8 +81,7 @@ @Log(title = "用户管理", businessType = BusinessType.IMPORT) @PreAuthorize("@ss.hasPermi('system:user:import')") @PostMapping("/importData") public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception { public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception { ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class); List<SysUser> userList = util.importExcel(file.getInputStream()); String operName = getUsername(); @@ -98,8 +90,7 @@ } @PostMapping("/importTemplate") public void importTemplate(HttpServletResponse response) { public void importTemplate(HttpServletResponse response) { ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class); util.importTemplateExcel(response, "用户数据"); } @@ -108,16 +99,14 @@ * 根据用户编号获取详细信息 */ @PreAuthorize("@ss.hasPermi('system:user:query')") @GetMapping(value = { "/", "/{userId}" }) public AjaxResult getInfo(@PathVariable(value = "userId", required = false) String userId) { @GetMapping(value = {"/", "/{userId}"}) public AjaxResult getInfo(@PathVariable(value = "userId", required = false) String userId) { userService.checkUserDataScope(userId); AjaxResult ajax = AjaxResult.success(); List<SysRole> roles = roleService.selectRoleAll(); ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList())); ajax.put("posts", postService.selectPostAll()); if (StringUtils.isNotNull(userId)) { if (StringUtils.isNotNull(userId)) { SysUser sysUser = userService.selectUserById(userId); ajax.put(AjaxResult.DATA_TAG, sysUser); ajax.put("postIds", postService.selectPostListByUserId(userId)); @@ -133,20 +122,14 @@ @PreAuthorize("@ss.hasPermi('system:user:add')") @Log(title = "用户管理", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@Validated @RequestBody SysUser user) { if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user))) { public AjaxResult add(@Validated @RequestBody SysUser user) { if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user))) { return error("新增用户'" + user.getUserName() + "'失败,登录账号已存在"); } else if (StringUtils.isNotEmpty(user.getPhonenumber()) && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) { } else if (StringUtils.isNotEmpty(user.getPhonenumber()) && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) { return error("新增用户'" + user.getUserName() + "'失败,手机号码已存在"); } else if (StringUtils.isNotEmpty(user.getEmail()) && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user))) { } else if (StringUtils.isNotEmpty(user.getEmail()) && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user))) { return error("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在"); } user.setCreateBy(getUsername()); @@ -161,22 +144,16 @@ @PreAuthorize("@ss.hasPermi('system:user:edit')") @Log(title = "用户管理", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@Validated @RequestBody SysUser user) { public AjaxResult edit(@Validated @RequestBody SysUser user) { userService.checkUserAllowed(user); userService.checkUserDataScope(user.getUserId()); if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user))) { if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user))) { return error("修改用户'" + user.getUserName() + "'失败,登录账号已存在"); } else if (StringUtils.isNotEmpty(user.getPhonenumber()) && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) { } else if (StringUtils.isNotEmpty(user.getPhonenumber()) && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) { return error("修改用户'" + user.getUserName() + "'失败,手机号码已存在"); } else if (StringUtils.isNotEmpty(user.getEmail()) && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user))) { } else if (StringUtils.isNotEmpty(user.getEmail()) && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user))) { return error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在"); } user.setUpdateBy(getUsername()); @@ -189,10 +166,8 @@ @PreAuthorize("@ss.hasPermi('system:user:remove')") @Log(title = "用户管理", businessType = BusinessType.DELETE) @DeleteMapping("/{userIds}") public AjaxResult remove(@PathVariable String[] userIds) { if (ArrayUtils.contains(userIds, getUserId())) { public AjaxResult remove(@PathVariable String[] userIds) { if (ArrayUtils.contains(userIds, getUserId())) { return error("当前用户不能删除"); } return toAjax(userService.deleteUserByIds(userIds)); @@ -204,8 +179,7 @@ @PreAuthorize("@ss.hasPermi('system:user:resetPwd')") @Log(title = "用户管理", businessType = BusinessType.UPDATE) @PutMapping("/resetPwd") public AjaxResult resetPwd(@RequestBody SysUser user) { public AjaxResult resetPwd(@RequestBody SysUser user) { userService.checkUserAllowed(user); userService.checkUserDataScope(user.getUserId()); user.setPassword(SecurityUtils.encryptPassword(user.getPassword())); @@ -219,8 +193,7 @@ @PreAuthorize("@ss.hasPermi('system:user:edit')") @Log(title = "用户管理", businessType = BusinessType.UPDATE) @PutMapping("/changeStatus") public AjaxResult changeStatus(@RequestBody SysUser user) { public AjaxResult changeStatus(@RequestBody SysUser user) { userService.checkUserAllowed(user); userService.checkUserDataScope(user.getUserId()); user.setUpdateBy(getUsername()); @@ -233,8 +206,7 @@ @PreAuthorize("@ss.hasPermi('system:user:query')") @GetMapping("/authRole/{userId}") @ApiOperation("根据用户编号获取授权角色") public AjaxResult authRole(@PathVariable("userId") String userId) { public AjaxResult authRole(@PathVariable("userId") String userId) { AjaxResult ajax = AjaxResult.success(); SysUser user = userService.selectUserById(userId); List<SysRole> roles = roleService.selectRolesByUserId(userId); @@ -249,8 +221,7 @@ @PreAuthorize("@ss.hasPermi('system:user:edit')") @Log(title = "用户管理", businessType = BusinessType.GRANT) @PutMapping("/authRole") public AjaxResult insertAuthRole(String userId, Long[] roleIds) { public AjaxResult insertAuthRole(String userId, Long[] roleIds) { userService.checkUserDataScope(userId); userService.insertUserAuth(userId, roleIds); return success(); @@ -261,8 +232,7 @@ */ @PreAuthorize("@ss.hasPermi('system:user:list')") @GetMapping("/deptTree") public AjaxResult deptTree(SysDept dept) { public AjaxResult deptTree(SysDept dept) { return success(deptService.selectDeptTreeList(dept)); } } ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/TokenService.java
@@ -144,7 +144,6 @@ loginUser.setLoginTime(System.currentTimeMillis()); if(StringUtils.isNull(loginUser.getIsApp())) { loginUser.setExpireTime(loginUser.getLoginTime() + expireTime * MILLIS_MINUTE); // 根据uuid将loginUser缓存 String userKey = getTokenKey(loginUser.getToken()); ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/AlarmTask.java
@@ -1,21 +1,13 @@ package com.ruoyi.quartz.task; import com.ruoyi.alarm.globalAlarm.domain.GuidePriorityQueue; import com.ruoyi.alarm.globalAlarm.domain.GuideTask; import com.ruoyi.alarm.globalAlarm.service.IGlobalAlarmService; import com.ruoyi.alarm.stealAlarm.domain.ArdAlarmStealelec; import com.ruoyi.alarm.stealAlarm.service.IStealElecAlarmService; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.utils.LonlatConver; import com.ruoyi.alarm.global.domain.GuidePriorityQueue; import com.ruoyi.alarm.global.domain.GuideTask; import com.ruoyi.alarm.global.service.IGlobalAlarmService; import com.ruoyi.common.utils.spring.SpringUtils; import com.ruoyi.common.websocket.util.WebSocketUtils; import com.ruoyi.device.camera.service.IArdCamerasService; import com.ruoyi.system.service.ISysUserService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; import javax.annotation.Resource; import java.text.SimpleDateFormat; import java.util.*; import java.util.concurrent.PriorityBlockingQueue;