diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/pom.xml b/ludu-module-datacenter/ludu-module-datacenter-biz/pom.xml
index 4d2dea9cd..674b94125 100644
--- a/ludu-module-datacenter/ludu-module-datacenter-biz/pom.xml
+++ b/ludu-module-datacenter/ludu-module-datacenter-biz/pom.xml
@@ -122,6 +122,12 @@
spring-cloud-starter-openfeign
+
+ com.hikvision.ga
+ artemis-http-client
+ 1.1.3
+
+
diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/CameraApi.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/CameraApi.java
new file mode 100644
index 000000000..a3927a034
--- /dev/null
+++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/CameraApi.java
@@ -0,0 +1,138 @@
+package cn.iocoder.yudao.module.datacenter.controller;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.module.datacenter.controller.app.camera.vo.CameraDO;
+import cn.iocoder.yudao.module.datacenter.controller.app.camera.vo.CameraDTO;
+import cn.iocoder.yudao.module.datacenter.controller.app.camera.vo.CameraPageReqVO;
+import cn.iocoder.yudao.module.datacenter.controller.app.camera.vo.RegionCameraListDTO;
+import cn.iocoder.yudao.module.datacenter.controller.app.region.vo.RegionDTO;
+import cn.iocoder.yudao.module.datacenter.service.camera.CameraService;
+import cn.iocoder.yudao.module.datacenter.service.region.RegionService;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import javax.validation.Valid;
+import java.util.*;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+@Tag(name = "大屏服务 - 监控点")
+@RestController
+@RequestMapping("/camera")
+@Validated
+public class CameraApi {
+ @Resource
+ private CameraService cameraService;
+
+ @Resource
+ private RegionService regionService;
+
+ @GetMapping("/selectCameraByPageAndCondition")
+ @Operation(summary = "分页条件查询监控点信息")
+ @DS("hiking")
+ public Map selectCameraByPageAndCondition(@Valid CameraPageReqVO pageReqVO) {
+// System.out.println(name);
+// CameraPageReqVO cameraPageReqVO = new CameraPageReqVO();
+// cameraPageReqVO.setName(name);
+ PageResult cameraPage = cameraService.getCameraPage(pageReqVO);
+ List cameraDTOList = new ArrayList<>();
+ cameraPage.getList().forEach(cameraDO -> {
+ CameraDTO cameraDTO = new CameraDTO();
+ cameraDTO.setCameraType(cameraDO.getCameraType());
+ cameraDTO.setCameraName(cameraDO.getCameraName());
+ cameraDTO.setId(cameraDO.getId());
+ cameraDTO.setStatus(cameraDO.getStatus());
+ cameraDTOList.add(cameraDTO);
+ });
+ Map result = new HashMap<>();
+ result.put("cameraDTOList", cameraDTOList);
+ result.put("total", cameraPage.getTotal());
+
+ return result;
+ }
+
+ @GetMapping("/selectPreviewUrlByCameraIndexCode")
+ @Operation(summary = "获取监控点预览流URL")
+ public Map selectPreviewUrlByCameraIndexCode(String cameraIndexCode, Integer streamType, String protocol, Integer transmode, String expand, String streamform) {
+ Map result = new HashMap<>();
+// String previewUrl = cameraService.getPreviewUrl(cameraIndexCode, streamType, protocol, transmode, expand, streamform);
+// result.put("previewUrl", previewUrl);
+ result.put("previewUrl", "");
+ result.put("传入的参数", "cameraIndexCode:" + cameraIndexCode + " streamType:" + streamType + " protocol:" + protocol + " transmode:" + transmode + " expand:" + expand + " streamform:" + streamform);
+ result.put("status", "success");
+ return result;
+ }
+
+ @GetMapping("/selectPlayBackUrlByCameraIndexCode")
+ @Operation(summary = "获取监控点回放流URL")
+ public Map selectPlayBackUrlByCameraIndexCode(String cameraIndexCode, Integer recordLocation, String protocol, Integer transmode, String beginTime, String endTime, String uuid, String expand, String streamform, Integer lockType) {
+ Map result = new HashMap<>();
+// String playBack = cameraService.getPlayBackUrl(cameraIndexCode,recordLocation, protocol, transmode, beginTime, endTime, uuid, expand, streamform,lockType);
+// result.put("previewUrl", playBack);
+// result.put("playBackUrl", "");
+ result.put("传入的参数", "cameraIndexCode:" + cameraIndexCode + " recordLocation:" + recordLocation + " protocol:" + protocol + " transmode:" + transmode + " beginTime:" + beginTime + " endTime:" + endTime + " uuid:" + uuid + " expand:" + expand + " streamform:" + streamform + " lockType:" + lockType);
+ result.put("status", "success");
+ return result;
+ }
+
+ @GetMapping("/selZoom")
+ @Operation(summary = "监控点3D缩放")
+ public Map selZoom(String cameraIndexCode, Integer startX, Integer startY, Integer endX, Integer endY) {
+ Map result = new HashMap<>();
+ String selZoomResult = cameraService.selZoom(cameraIndexCode, startX, startY, endX, endY);
+ result.put("selZoomResult", selZoomResult);
+// result.put("selZoomResult", "");
+ result.put("传入的参数", "cameraIndexCode:" + cameraIndexCode + " startX:" + startX + " startY:" + startY + " endX:" + endX + " endY:" + endY);
+ result.put("status", "success");
+ return result;
+ }
+
+ @GetMapping("/controlling")
+ @Operation(summary = "云台控制")
+ public Map controlling(String cameraIndexCode, Integer action, String command, Integer speed, Integer presetIndex) {
+ Map result = new HashMap<>();
+// String controllingResult = cameraService.controlling(cameraIndexCode,action, command, speed, presetIndex);
+// result.put("selZoomResult", controllingResult);
+ result.put("controllingResult", "");
+ result.put("传入的参数", "cameraIndexCode:" + cameraIndexCode + " action:" + action + " command:" + command + " speed:" + speed + " presetIndex:" + presetIndex);
+ result.put("status", "success");
+ return result;
+ }
+
+ @GetMapping("/selectCameraByRegionIndexCode")
+ @Operation(summary = "根据区域编码获取监控点信息")
+ @DS("hiking")
+ public Map selectCameraByRegionIndexCode(String regionIndexCode) {
+ Map result = new HashMap<>();
+ List cameraDTOS = cameraService.selectCameraByRegionIndexCode(regionIndexCode);
+ result.put("cameraDTOS", cameraDTOS);
+ System.out.println(result);
+ return result;
+ }
+
+ @GetMapping("/rtspTest")
+ @Operation(summary = "rtsp推流测试")
+ public Map rtspTest() {
+ Map result = new HashMap<>();
+ result.put("rtsp_url", "rtsp://192.168.1.7/stream");
+ return result;
+ }
+
+ @GetMapping("/selectCameraIndexCodeByCameraName")
+ @Operation(summary = "根据监控点名称获取监控点编码")
+ @DS("hiking")
+ public Map selectCameraIndexCodeByCameraName(String cameraName) {
+ System.out.println(cameraName);
+ Map result = new HashMap<>();
+ String cameraIndexCode = cameraService.selectCameraIndexCodeByCameraName(cameraName);
+ result.put("cameraIndexCode", cameraIndexCode);
+ return result;
+ }
+}
diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/RegionApi.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/RegionApi.java
new file mode 100644
index 000000000..c661315f3
--- /dev/null
+++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/RegionApi.java
@@ -0,0 +1,31 @@
+package cn.iocoder.yudao.module.datacenter.controller;
+
+import cn.iocoder.yudao.module.datacenter.controller.app.camera.vo.CameraDTO;
+import cn.iocoder.yudao.module.datacenter.controller.app.camera.vo.RegionCameraListDTO;
+import cn.iocoder.yudao.module.datacenter.controller.app.region.vo.RegionDTO;
+import cn.iocoder.yudao.module.datacenter.service.camera.CameraService;
+import cn.iocoder.yudao.module.datacenter.service.region.RegionService;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@Tag(name = "大屏服务 - 区域")
+@RestController
+@RequestMapping("/region")
+@Validated
+public class RegionApi {
+ @Resource
+ private RegionService regionService;
+
+ @GetMapping("/list")
+ @DS("hiking")
+ public List list() {
+ return regionService.getRegionList();
+ }
+}
diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/camera/vo/CameraDO.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/camera/vo/CameraDO.java
new file mode 100644
index 000000000..c850f4643
--- /dev/null
+++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/camera/vo/CameraDO.java
@@ -0,0 +1,234 @@
+package cn.iocoder.yudao.module.datacenter.controller.app.camera.vo;
+
+import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
+import com.baomidou.mybatisplus.annotation.KeySequence;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.*;
+
+import java.math.BigDecimal;
+
+/**
+ * 资源 DO
+ *
+ * @author 管理员
+ */
+@TableName("hiking_camera")
+@KeySequence("hiking_camera_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class CameraDO extends BaseDO {
+
+ /**
+ * 主键
+ */
+ @TableId
+ private Long id;
+ /**
+ * 监控点唯一标识
+ */
+ private String cameraIndexCode;
+ /**
+ * 海拔
+ */
+ private String altitude;
+ /**
+ * 监控点类型
+ *
+ * 枚举 {@link TODO camera_type 对应的类}
+ */
+ private Integer cameraType;
+ /**
+ * 监控点类型说明
+ */
+ private String cameraTypeName;
+ /**
+ * 资源类型
+ */
+ private String resourceType;
+ /**
+ * 设备能力集
+ */
+ private String capabilitySet;
+ /**
+ * 能力集说明
+ */
+ private String capabilitySetName;
+ /**
+ * 智能分析能力集
+ */
+ private String intelligentSet;
+ /**
+ * 智能分析能力集说明
+ */
+ private String intelligentSetName;
+ /**
+ * 通道编号
+ */
+ private String channelNo;
+ /**
+ * 通道类型说明
+ */
+ private String channelTypeName;
+ /**
+ * 所属编码设备唯一标识
+ */
+ private String encodeDevIndexCode;
+ /**
+ * 所属设备类型
+ */
+ private String encodeDevResourceType;
+ /**
+ * 所属设备类型说明
+ */
+ private String encodeDevResourceTypeName;
+ /**
+ * 监控点国标编号
+ */
+ private String gbIndexCode;
+ /**
+ * 键盘控制码
+ */
+ private String keyBoardCode;
+ /**
+ * 摄像机像素
+ */
+ private String pixel;
+ /**
+ * 云镜类型
+ */
+ private String ptz;
+ /**
+ * 云镜类型说明
+ */
+ private String ptzName;
+ /**
+ * 云台控制
+ */
+ private String ptzController;
+ /**
+ * 云台控制说明
+ */
+ private String ptzControllerName;
+ /**
+ * 录像存储位置说明
+ */
+ private String recordLocationName;
+ /**
+ * 在线状态
+ */
+ private String status;
+ /**
+ * 在线状态说明
+ */
+ private String statusName;
+ /**
+ * 传输协议
+ */
+ private Integer transType;
+ /**
+ * 传输协议说明
+ */
+ private String transTypeName;
+ /**
+ * 接入协议
+ */
+ private String treatyType;
+ /**
+ * 接入协议说明
+ */
+ private String treatyTypeName;
+ /**
+ * 可视域相关
+ */
+ private String viewshed;
+ /**
+ * 唯一编码
+ */
+ private String indexCode;
+ /**
+ * 监控点国标编号
+ */
+ private String externalIndexCode;
+ /**
+ * 资源名称
+ */
+ private String cameraName;
+ /**
+ * 通道号
+ */
+ private Integer chanNum;
+ /**
+ * 级联编号
+ */
+ private String cascadeCode;
+ /**
+ * 父级资源编号
+ */
+ private String parentIndexCode;
+ /**
+ * 经度
+ */
+ private BigDecimal longitude;
+ /**
+ * 纬度
+ */
+ private BigDecimal latitude;
+ /**
+ * 海拔高度
+ */
+ private String elevation;
+ /**
+ * 能力集
+ */
+ private String capability;
+ /**
+ * 录像存储位置
+ */
+ private String recordLocation;
+ /**
+ * 通道子类型
+ */
+ private String channelType;
+ /**
+ * 所属区域
+ */
+ private String regionIndexCode;
+ /**
+ * 所属区域路径
+ */
+ private String regionPath;
+ /**
+ * 安装位置
+ */
+ private String installLocation;
+ /**
+ * 数据在界面上的显示顺序
+ */
+ private Integer disOrder;
+ /**
+ * 资源唯一编码
+ */
+ private String resourceIndexCode;
+ /**
+ * 解码模式
+ */
+ private String decodeTag;
+ /**
+ * 监控点关联对讲唯一标志
+ */
+ private String cameraRelateTalk;
+ /**
+ * 所属区域路径
+ */
+ private String regionName;
+ /**
+ * 区域路径名称
+ */
+ private String regionPathName;
+
+}
\ No newline at end of file
diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/camera/vo/CameraDTO.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/camera/vo/CameraDTO.java
new file mode 100644
index 000000000..54c944648
--- /dev/null
+++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/camera/vo/CameraDTO.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.datacenter.controller.app.camera.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+@Schema(description = "监控点 Response DTO")
+@Data
+public class CameraDTO {
+ @Schema(description = "监控点ID")
+ private Long id;
+
+ @Schema(description = "监控点名称")
+ private String cameraName;
+
+ @Schema(description = "监控点类型")
+ private Integer cameraType;
+
+ @Schema(description = "监控点状态")
+ private String status;
+
+ private Integer leaf = 1;
+// @Schema(description = "预览URL")
+// private String previewUrl;
+//
+// @Schema(description = "回放URL")
+// private String playBackUrl;
+
+}
diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/camera/vo/CameraPageReqVO.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/camera/vo/CameraPageReqVO.java
new file mode 100644
index 000000000..003dd1624
--- /dev/null
+++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/camera/vo/CameraPageReqVO.java
@@ -0,0 +1,47 @@
+package cn.iocoder.yudao.module.datacenter.controller.app.camera.vo;
+
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
+
+@Schema(description = "管理后台 - 资源分页 Request VO")
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+public class CameraPageReqVO extends PageParam {
+
+ @Schema(description = "监控点类型说明")
+ private String cameraTypeName;
+
+ @Schema(description = "资源类型")
+ private String resourceType;
+
+ @Schema(description = "通道类型说明")
+ private String channelTypeName;
+
+ @Schema(description = "传输协议说明")
+ private String transTypeName;
+
+ @Schema(description = "接入协议说明")
+ private String treatyTypeName;
+
+ @Schema(description = "资源名称")
+ private String cameraName;
+
+ @Schema(description = "安装位置")
+ private String installLocation;
+
+ @Schema(description = "创建时间")
+ @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+ private String[] createTime;
+
+ @Schema(description = "更新时间")
+ @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+ private String[] updateTime;
+
+}
\ No newline at end of file
diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/camera/vo/CameraRespVO.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/camera/vo/CameraRespVO.java
new file mode 100644
index 000000000..52612b0a0
--- /dev/null
+++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/camera/vo/CameraRespVO.java
@@ -0,0 +1,174 @@
+package cn.iocoder.yudao.module.datacenter.controller.app.camera.vo;
+
+import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
+import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Schema(description = "管理后台 - 资源 Response VO")
+@Data
+@ExcelIgnoreUnannotated
+public class CameraRespVO {
+
+ @Schema(description = "监控点唯一标识")
+ @ExcelProperty("监控点唯一标识")
+ private String cameraIndexCode;
+
+ @Schema(description = "海拔")
+ @ExcelProperty("海拔")
+ private String altitude;
+
+ @Schema(description = "监控点类型")
+ @ExcelProperty(value = "监控点类型", converter = DictConvert.class)
+ @DictFormat("camera_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
+ private Integer cameraType;
+
+ @Schema(description = "监控点类型说明")
+ @ExcelProperty("监控点类型说明")
+ private String cameraTypeName;
+
+ @Schema(description = "资源类型")
+ @ExcelProperty("资源类型")
+ private String resourceType;
+
+ @Schema(description = "设备能力集")
+ @ExcelProperty("设备能力集")
+ private String capabilitySet;
+
+ @Schema(description = "能力集说明")
+ @ExcelProperty("能力集说明")
+ private String capabilitySetName;
+
+ @Schema(description = "通道编号")
+ @ExcelProperty("通道编号")
+ private String channelNo;
+
+ @Schema(description = "通道类型说明")
+ @ExcelProperty("通道类型说明")
+ private String channelTypeName;
+
+ @Schema(description = "所属编码设备唯一标识")
+ @ExcelProperty("所属编码设备唯一标识")
+ private String encodeDevIndexCode;
+
+ @Schema(description = "监控点国标编号")
+ @ExcelProperty("监控点国标编号")
+ private String gbIndexCode;
+
+ @Schema(description = "键盘控制码")
+ @ExcelProperty("键盘控制码")
+ private String keyBoardCode;
+
+ @Schema(description = "录像存储位置说明")
+ @ExcelProperty("录像存储位置说明")
+ private String recordLocationName;
+
+ @Schema(description = "传输协议")
+ @ExcelProperty("传输协议")
+ private Integer transType;
+
+ @Schema(description = "传输协议说明")
+ @ExcelProperty("传输协议说明")
+ private String transTypeName;
+
+ @Schema(description = "接入协议")
+ @ExcelProperty("接入协议")
+ private String treatyType;
+
+ @Schema(description = "接入协议说明")
+ @ExcelProperty("接入协议说明")
+ private String treatyTypeName;
+
+ @Schema(description = "唯一编码")
+ @ExcelProperty("唯一编码")
+ private String indexCode;
+
+ @Schema(description = "监控点国标编号")
+ @ExcelProperty("监控点国标编号")
+ private String externalIndexCode;
+
+ @Schema(description = "资源名称")
+ @ExcelProperty("资源名称")
+ private String cameraName;
+
+ @Schema(description = "通道号")
+ @ExcelProperty("通道号")
+ private Integer chanNum;
+
+ @Schema(description = "级联编号")
+ @ExcelProperty("级联编号")
+ private String cascadeCode;
+
+ @Schema(description = "父级资源编号")
+ @ExcelProperty("父级资源编号")
+ private String parentIndexCode;
+
+ @Schema(description = "经度")
+ @ExcelProperty("经度")
+ private BigDecimal longitude;
+
+ @Schema(description = "纬度")
+ @ExcelProperty("纬度")
+ private BigDecimal latitude;
+
+ @Schema(description = "海拔高度")
+ @ExcelProperty("海拔高度")
+ private String elevation;
+
+ @Schema(description = "能力集")
+ @ExcelProperty("能力集")
+ private String capability;
+
+ @Schema(description = "录像存储位置")
+ @ExcelProperty("录像存储位置")
+ private String recordLocation;
+
+ @Schema(description = "通道子类型")
+ @ExcelProperty("通道子类型")
+ private String channelType;
+
+ @Schema(description = "所属区域")
+ @ExcelProperty("所属区域")
+ private String regionIndexCode;
+
+ @Schema(description = "所属区域路径")
+ @ExcelProperty("所属区域路径")
+ private String regionPath;
+
+ @Schema(description = "安装位置")
+ @ExcelProperty("安装位置")
+ private String installLocation;
+
+ @Schema(description = "创建时间")
+ @ExcelProperty("创建时间")
+ private String createTime;
+
+ @Schema(description = "更新时间")
+ @ExcelProperty("更新时间")
+ private String updateTime;
+
+ @Schema(description = "资源唯一编码")
+ @ExcelProperty("资源唯一编码")
+ private String resourceIndexCode;
+
+ @Schema(description = "解码模式")
+ @ExcelProperty("解码模式")
+ private String decodeTag;
+
+ @Schema(description = "监控点关联对讲唯一标志")
+ @ExcelProperty("监控点关联对讲唯一标志")
+ private String cameraRelateTalk;
+
+ @Schema(description = "所属区域路径")
+ @ExcelProperty("所属区域路径")
+ private String regionName;
+
+ @Schema(description = "区域路径名称")
+ @ExcelProperty("区域路径名称")
+ private String regionPathName;
+
+}
\ No newline at end of file
diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/camera/vo/CameraSaveReqVO.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/camera/vo/CameraSaveReqVO.java
new file mode 100644
index 000000000..fb2a6c79a
--- /dev/null
+++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/camera/vo/CameraSaveReqVO.java
@@ -0,0 +1,129 @@
+package cn.iocoder.yudao.module.datacenter.controller.app.camera.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Schema(description = "管理后台 - 资源新增/修改 Request VO")
+@Data
+public class CameraSaveReqVO {
+
+ @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
+ private Long id;
+
+ @Schema(description = "监控点唯一标识")
+ private String cameraIndexCode;
+
+ @Schema(description = "海拔")
+ private String altitude;
+
+ @Schema(description = "监控点类型")
+ private Integer cameraType;
+
+ @Schema(description = "监控点类型说明")
+ private String cameraTypeName;
+
+ @Schema(description = "资源类型")
+ private String resourceType;
+
+ @Schema(description = "设备能力集")
+ private String capabilitySet;
+
+ @Schema(description = "能力集说明")
+ private String capabilitySetName;
+
+ @Schema(description = "通道编号")
+ private String channelNo;
+
+ @Schema(description = "通道类型说明")
+ private String channelTypeName;
+
+ @Schema(description = "所属编码设备唯一标识")
+ private String encodeDevIndexCode;
+
+ @Schema(description = "监控点国标编号")
+ private String gbIndexCode;
+
+ @Schema(description = "键盘控制码")
+ private String keyBoardCode;
+
+ @Schema(description = "录像存储位置说明")
+ private String recordLocationName;
+
+ @Schema(description = "传输协议")
+ private Integer transType;
+
+ @Schema(description = "传输协议说明")
+ private String transTypeName;
+
+ @Schema(description = "接入协议")
+ private String treatyType;
+
+ @Schema(description = "接入协议说明")
+ private String treatyTypeName;
+
+ @Schema(description = "唯一编码")
+ private String indexCode;
+
+ @Schema(description = "监控点国标编号")
+ private String externalIndexCode;
+
+ @Schema(description = "资源名称")
+ private String cameraName;
+
+ @Schema(description = "通道号")
+ private Integer chanNum;
+
+ @Schema(description = "级联编号")
+ private String cascadeCode;
+
+ @Schema(description = "父级资源编号")
+ private String parentIndexCode;
+
+ @Schema(description = "经度")
+ private BigDecimal longitude;
+
+ @Schema(description = "纬度")
+ private BigDecimal latitude;
+
+ @Schema(description = "海拔高度")
+ private String elevation;
+
+ @Schema(description = "能力集")
+ private String capability;
+
+ @Schema(description = "录像存储位置")
+ private String recordLocation;
+
+ @Schema(description = "通道子类型")
+ private String channelType;
+
+ @Schema(description = "所属区域")
+ private String regionIndexCode;
+
+ @Schema(description = "所属区域路径")
+ private String regionPath;
+
+ @Schema(description = "安装位置")
+ private String installLocation;
+
+ @Schema(description = "数据在界面上的显示顺序")
+ private Integer disOrder;
+
+ @Schema(description = "资源唯一编码")
+ private String resourceIndexCode;
+
+ @Schema(description = "解码模式")
+ private String decodeTag;
+
+ @Schema(description = "监控点关联对讲唯一标志")
+ private String cameraRelateTalk;
+
+ @Schema(description = "所属区域路径")
+ private String regionName;
+
+ @Schema(description = "区域路径名称")
+ private String regionPathName;
+
+}
\ No newline at end of file
diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/camera/vo/RegionCameraListDTO.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/camera/vo/RegionCameraListDTO.java
new file mode 100644
index 000000000..26f02f3ff
--- /dev/null
+++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/camera/vo/RegionCameraListDTO.java
@@ -0,0 +1,24 @@
+package cn.iocoder.yudao.module.datacenter.controller.app.camera.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Schema(description = "区域 Response DTO")
+@Data
+public class RegionCameraListDTO {
+ @Schema(description = "区域唯一编码")
+ private String regionIndexCode;
+ @Schema(description = "区域名称")
+ private String regionName;
+ @Schema(description = "父区域唯一编码")
+ private String parentIndexCode;
+ @Schema(description = "是否为叶子节点")
+ private Integer leaf;
+ @Schema(description = "子区域")
+ private List children = new ArrayList<>();
+ @Schema(description = "摄像头列表")
+ private List cameraList = new ArrayList<>();
+}
diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/checkticket/CheckTicketApi.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/checkticket/CheckTicketApi.java
index 5924a2d58..44fb094d1 100644
--- a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/checkticket/CheckTicketApi.java
+++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/checkticket/CheckTicketApi.java
@@ -26,12 +26,20 @@ public class CheckTicketApi {
@Resource
private LoginClient loginClient;
+// @GetMapping()
+// @Operation(summary = "获得日期当天的检票人数")
+// public Long checkTicketTotal(String starTime, String endTime, String checkStationName) {
+// String replace = starTime.replace("-", "");
+// String replace1 = endTime.replace("-", "");
+// return checkTicketService.checkTicketTotal(replace,replace1, checkStationName);
+// }
+
@GetMapping()
- @Operation(summary = "获得日期当天的检票人数")
- public Long checkTicketTotal(String starTime, String endTime) {
+ @Operation(summary = "获得日期当天某检查点的检票人数")
+ public Long checkTicketTotal(String starTime, String endTime, String checkStationName) {
String replace = starTime.replace("-", "");
String replace1 = endTime.replace("-", "");
- return checkTicketService.checkTicketTotal(replace,replace1);
+ return checkTicketService.checkTicketTotal(replace,replace1, checkStationName);
}
@GetMapping("/qushi")
diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/region/vo/RegionDO.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/region/vo/RegionDO.java
new file mode 100644
index 000000000..7f869507f
--- /dev/null
+++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/region/vo/RegionDO.java
@@ -0,0 +1,90 @@
+package cn.iocoder.yudao.module.datacenter.controller.app.region.vo;
+
+import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
+import com.baomidou.mybatisplus.annotation.KeySequence;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.*;
+
+/**
+ * 区域 DO
+ *
+ * @author 管理员
+ */
+@TableName("hiking_region")
+@KeySequence("hiking_region_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class RegionDO extends BaseDO {
+
+ /**
+ * 主键
+ */
+ @TableId
+ private Long id;
+ /**
+ * 区域唯一标识码
+ */
+ private String indexCode;
+ /**
+ * 区域名称
+ */
+ private String name;
+ /**
+ * 父级区域唯一标识码
+ */
+ private String parentIndexCode;
+ /**
+ * 树编号
+ */
+ private String treeCode;
+ /**
+ * 区域类型
+ */
+ private Integer regionType;
+ /**
+ * 区域完整路径
+ */
+ private String regionPath;
+ /**
+ * 是否为叶子节点
+ */
+ private Integer leaf;
+ /**
+ * 级联平台标识
+ */
+ private String cascadeCode;
+ /**
+ * 区域标识
+ */
+ private Integer cascadeType;
+ /**
+ * 区域类型
+ */
+ private Integer catalogType;
+ /**
+ * 权限码
+ */
+ private String authCodes;
+ /**
+ * 外码
+ */
+ private String externalIndexCode;
+ /**
+ * 父外码
+ */
+ private String parentExternalIndexCode;
+ /**
+ * 同级区域顺序
+ */
+ private Integer sort;
+ /**
+ * 资源状态
+ */
+ private Integer status;
+
+}
\ No newline at end of file
diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/region/vo/RegionDTO.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/region/vo/RegionDTO.java
new file mode 100644
index 000000000..afed8b5f1
--- /dev/null
+++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/region/vo/RegionDTO.java
@@ -0,0 +1,22 @@
+package cn.iocoder.yudao.module.datacenter.controller.app.region.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Schema(description = "区域 Response DTO")
+@Data
+public class RegionDTO {
+ @Schema(description = "区域唯一编码")
+ private String regionIndexCode;
+ @Schema(description = "区域名称")
+ private String regionName;
+ @Schema(description = "父区域唯一编码")
+ private String parentIndexCode;
+ @Schema(description = "是否为叶子节点")
+ private Integer leaf;
+ @Schema(description = "子区域")
+ private List children = new ArrayList<>();
+}
diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/region/vo/RegionPageReqVO.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/region/vo/RegionPageReqVO.java
new file mode 100644
index 000000000..e61c575e0
--- /dev/null
+++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/region/vo/RegionPageReqVO.java
@@ -0,0 +1,43 @@
+package cn.iocoder.yudao.module.datacenter.controller.app.region.vo;
+
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.time.LocalDateTime;
+
+import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
+
+@Schema(description = "管理后台 - 区域分页 Request VO")
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+public class RegionPageReqVO extends PageParam {
+
+ @Schema(description = "区域唯一标识码")
+ private String indexCode;
+
+ @Schema(description = "区域名称")
+ private String name;
+
+ @Schema(description = "区域类型")
+ private Integer regionType;
+
+ @Schema(description = "区域类型")
+ private Integer catalogType;
+
+ @Schema(description = "创建时间")
+ @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+ private LocalDateTime[] createTime;
+
+ @Schema(description = "更新时间")
+ @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+ private LocalDateTime[] updateTime;
+
+ @Schema(description = "资源状态")
+ private Integer status;
+
+}
\ No newline at end of file
diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/region/vo/RegionRespVO.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/region/vo/RegionRespVO.java
new file mode 100644
index 000000000..39700c1bd
--- /dev/null
+++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/region/vo/RegionRespVO.java
@@ -0,0 +1,59 @@
+package cn.iocoder.yudao.module.datacenter.controller.app.region.vo;
+
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+@Schema(description = "管理后台 - 区域 Response VO")
+@Data
+@ExcelIgnoreUnannotated
+public class RegionRespVO {
+
+ @Schema(description = "区域唯一标识码")
+ @ExcelProperty("区域唯一标识码")
+ private String indexCode;
+
+ @Schema(description = "区域名称")
+ @ExcelProperty("区域名称")
+ private String name;
+
+ @Schema(description = "区域类型")
+ @ExcelProperty("区域类型")
+ private Integer regionType;
+
+ @Schema(description = "区域完整路径")
+ @ExcelProperty("区域完整路径")
+ private String regionPath;
+
+ @Schema(description = "区域类型")
+ @ExcelProperty("区域类型")
+ private Integer catalogType;
+
+ @Schema(description = "权限码")
+ @ExcelProperty("权限码")
+ private String authCodes;
+
+ @Schema(description = "外码")
+ @ExcelProperty("外码")
+ private String externalIndexCode;
+
+ @Schema(description = "父外码")
+ @ExcelProperty("父外码")
+ private String parentExternalIndexCode;
+
+ @Schema(description = "创建时间")
+ @ExcelProperty("创建时间")
+ private LocalDateTime createTime;
+
+ @Schema(description = "更新时间")
+ @ExcelProperty("更新时间")
+ private LocalDateTime updateTime;
+
+ @Schema(description = "资源状态")
+ @ExcelProperty("资源状态")
+ private Integer status;
+
+}
\ No newline at end of file
diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/region/vo/RegionSaveReqVO.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/region/vo/RegionSaveReqVO.java
new file mode 100644
index 000000000..674e01c7f
--- /dev/null
+++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/region/vo/RegionSaveReqVO.java
@@ -0,0 +1,58 @@
+package cn.iocoder.yudao.module.datacenter.controller.app.region.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+@Schema(description = "管理后台 - 区域新增/修改 Request VO")
+@Data
+public class RegionSaveReqVO {
+
+ @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
+ private Long id;
+
+ @Schema(description = "区域唯一标识码")
+ private String indexCode;
+
+ @Schema(description = "区域名称")
+ private String name;
+
+ @Schema(description = "父级区域唯一标识码")
+ private String parentIndexCode;
+
+ @Schema(description = "树编号")
+ private String treeCode;
+
+ @Schema(description = "区域类型")
+ private Integer regionType;
+
+ @Schema(description = "区域完整路径")
+ private String regionPath;
+
+ @Schema(description = "是否为叶子节点")
+ private Integer leaf;
+
+ @Schema(description = "级联平台标识")
+ private String cascadeCode;
+
+ @Schema(description = "区域标识")
+ private Integer cascadeType;
+
+ @Schema(description = "区域类型")
+ private Integer catalogType;
+
+ @Schema(description = "权限码")
+ private String authCodes;
+
+ @Schema(description = "外码")
+ private String externalIndexCode;
+
+ @Schema(description = "父外码")
+ private String parentExternalIndexCode;
+
+ @Schema(description = "同级区域顺序")
+ private Integer sort;
+
+ @Schema(description = "资源状态")
+ private Integer status;
+
+}
\ No newline at end of file
diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/saledata/SaleDataApi.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/saledata/SaleDataApi.java
index 7847219ac..dcdebcca2 100644
--- a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/saledata/SaleDataApi.java
+++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/saledata/SaleDataApi.java
@@ -27,6 +27,7 @@ public class SaleDataApi {
@GetMapping()
@Operation(summary = "获得输入日期的当天总售票数")
public Long checkTicketTotal(String starTime, String endTime) {
+ System.out.println("checkTicketTotal");
String replace = starTime.replace("-", "");
String replace1 = endTime.replace("-", "");
return saleDataService.countBySddate(replace, replace1);
@@ -135,6 +136,13 @@ public class SaleDataApi {
return saleDataService.findyearJun(saleDataService.findEventsLastYear());
}
+
+ @GetMapping("/thisyear/nianjunCount")
+ @Operation(summary = "查询某年年度售票数量")
+ public Integer findCountthisyear(Integer year) {
+ System.out.println(saleDataService.findEventsByYear(year));
+ return saleDataService.findEventsByYear(year).size();
+ }
// @GetMapping("/test")
// public void testMethod(){
//
diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/dal/mongodb/checkticket/CheckTicketRepository.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/dal/mongodb/checkticket/CheckTicketRepository.java
index ab6b24cf0..9dacba05b 100644
--- a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/dal/mongodb/checkticket/CheckTicketRepository.java
+++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/dal/mongodb/checkticket/CheckTicketRepository.java
@@ -14,8 +14,8 @@ public interface CheckTicketRepository extends MongoRepository findByName(String q, PageRequest pageable);
- @Query("{'checkticketdate':{'$gte': ?0, '$lt': ?1}}")
- List countByCheckticketdateBetween(String starTime, String endTime);
+ @Query("{'checkticketdate':{'$gte': ?0, '$lt': ?1}, 'checkstationname': {'$regex': ?2, '$options': 'i'}}")
+ List countByCheckticketdateBetween(String starTime, String endTime, String checkStationName);
@Query("{'checktickettime':{'$gte': ?0, '$lt': ?1},'checkticketdate':{'$dt': ?2}}")
List findByTimestampBetweenAndCheckticketdate(String startTime, String endTime,String day);
diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/dal/mongodb/saledata/SaleDataTodayRepository.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/dal/mongodb/saledata/SaleDataTodayRepository.java
index 549cebd70..aea877cc2 100644
--- a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/dal/mongodb/saledata/SaleDataTodayRepository.java
+++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/dal/mongodb/saledata/SaleDataTodayRepository.java
@@ -36,12 +36,43 @@ public interface SaleDataTodayRepository extends MongoRepository {
+
+ default PageResult selectPage(CameraPageReqVO reqVO) {
+ return selectPage(reqVO, new LambdaQueryWrapperX()
+ .likeIfPresent(CameraDO::getCameraTypeName, reqVO.getCameraTypeName())
+ .eqIfPresent(CameraDO::getResourceType, reqVO.getResourceType())
+ .likeIfPresent(CameraDO::getChannelTypeName, reqVO.getChannelTypeName())
+ .likeIfPresent(CameraDO::getTransTypeName, reqVO.getTransTypeName())
+ .likeIfPresent(CameraDO::getTreatyTypeName, reqVO.getTreatyTypeName())
+ .likeIfPresent(CameraDO::getCameraName, reqVO.getCameraName())
+ .eqIfPresent(CameraDO::getInstallLocation, reqVO.getInstallLocation())
+ .betweenIfPresent(CameraDO::getCreateTime, reqVO.getCreateTime())
+ .betweenIfPresent(CameraDO::getUpdateTime, reqVO.getUpdateTime())
+ .orderByDesc(CameraDO::getId));
+ }
+
+ default List selectCameraByRegionIndexCode(String regionIndexCode) {
+ return selectList(new LambdaQueryWrapperX().eq(CameraDO::getRegionIndexCode, regionIndexCode));
+ }
+
+ default String selectCameraIndexCodeByCameraName(String cameraName) {
+ return selectOne(new LambdaQueryWrapperX().eq(CameraDO::getCameraName, cameraName)).getCameraIndexCode();
+ }
+}
\ No newline at end of file
diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/service/camera/CameraService.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/service/camera/CameraService.java
new file mode 100644
index 000000000..4644e8caf
--- /dev/null
+++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/service/camera/CameraService.java
@@ -0,0 +1,66 @@
+package cn.iocoder.yudao.module.datacenter.service.camera;
+
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.module.datacenter.controller.app.camera.vo.CameraDO;
+import cn.iocoder.yudao.module.datacenter.controller.app.camera.vo.CameraDTO;
+import cn.iocoder.yudao.module.datacenter.controller.app.camera.vo.CameraPageReqVO;
+import cn.iocoder.yudao.module.datacenter.controller.app.camera.vo.CameraSaveReqVO;
+
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ * 资源 Service 接口
+ *
+ * @author 管理员
+ */
+public interface CameraService {
+
+ /**
+ * 创建资源
+ *
+ * @param createReqVO 创建信息
+ * @return 编号
+ */
+ Long createCamera(@Valid CameraSaveReqVO createReqVO);
+
+ /**
+ * 更新资源
+ *
+ * @param updateReqVO 更新信息
+ */
+ void updateCamera(@Valid CameraSaveReqVO updateReqVO);
+
+ /**
+ * 删除资源
+ *
+ * @param id 编号
+ */
+ void deleteCamera(Long id);
+
+ /**
+ * 获得资源
+ *
+ * @param id 编号
+ * @return 资源
+ */
+ CameraDO getCamera(Long id);
+
+ /**
+ * 获得资源分页
+ *
+ * @param pageReqVO 分页查询
+ * @return 资源分页
+ */
+ PageResult getCameraPage(CameraPageReqVO pageReqVO);
+
+ String getPreviewUrl(String cameraIndexCode, Integer streamType, String protocol, Integer transmode, String expand, String streamform);
+ String getPlayBackUrl(String cameraIndexCode, Integer recordLocation, String protocol, Integer transmode, String beginTime, String endTime, String uuid, String expand, String streamform, Integer lockType);
+
+ String selZoom(String cameraIndexCode,int startX,int startY,int endX,int endY);
+ String controlling(String cameraIndexCode, Integer action, String command, Integer speed, Integer presetIndex);
+
+ List selectCameraByRegionIndexCode(String regionIndexCode);
+
+ String selectCameraIndexCodeByCameraName(String cameraName);
+}
\ No newline at end of file
diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/service/camera/CameraServiceImpl.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/service/camera/CameraServiceImpl.java
new file mode 100644
index 000000000..e3794bdab
--- /dev/null
+++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/service/camera/CameraServiceImpl.java
@@ -0,0 +1,164 @@
+package cn.iocoder.yudao.module.datacenter.service.camera;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
+import cn.iocoder.yudao.module.datacenter.controller.app.camera.vo.CameraDO;
+import cn.iocoder.yudao.module.datacenter.controller.app.camera.vo.CameraDTO;
+import cn.iocoder.yudao.module.datacenter.controller.app.camera.vo.CameraPageReqVO;
+import cn.iocoder.yudao.module.datacenter.controller.app.camera.vo.CameraSaveReqVO;
+import cn.iocoder.yudao.module.datacenter.dal.mysql.camera.CameraMapper;
+import cn.iocoder.yudao.module.datacenter.utlis.IntegrationURL;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+import org.springframework.validation.annotation.Validated;
+
+import javax.annotation.Resource;
+
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
+
+
+/**
+ * 资源 Service 实现类
+ *
+ * @author 管理员
+ */
+@Service
+@Validated
+public class CameraServiceImpl implements CameraService {
+
+ @Resource
+ private CameraMapper cameraMapper;
+ private ObjectMapper objectMapper;
+ @Resource
+ private RedisTemplate redisTemplate;
+ private static final String ACCESS_TOKEN_KEY = "hikingAPI:access_token";
+
+
+ public String getAccessToken() {
+ // 检查 Redis 中是否有 access_token
+ String accessToken = (String) redisTemplate.opsForValue().get(ACCESS_TOKEN_KEY);
+ if (!StringUtils.isEmpty(accessToken)) {
+ System.out.println("使用缓存的token:" + accessToken);
+ return accessToken; // 如果存在则直接返回
+ }
+
+ // 如果没有,调用 API 获取并存入 Redis
+ System.out.println("获取新的token");
+ String accessTokenUrlResp = IntegrationURL.getAccessTokenURL();
+ try {
+
+ JsonNode jsonNode = objectMapper.readTree(accessTokenUrlResp);
+ accessToken = jsonNode.get("access_token").asText();
+
+ // 将 access_token 存入 Redis,设置过期时间为 11 小时(有效期12小时)
+ redisTemplate.opsForValue().set(ACCESS_TOKEN_KEY, accessToken, 11, TimeUnit.HOURS);
+ } catch (Exception e) {
+
+ e.printStackTrace();
+ }
+ return accessToken;
+ }
+
+ public void deleteAccessToken() {
+ redisTemplate.delete(ACCESS_TOKEN_KEY);
+ }
+
+
+ public Boolean checkToken(String result) {
+ try {
+
+ JsonNode jsonNode = objectMapper.readTree(result);
+ String code = jsonNode.path("code").asText();
+ if ("0x02401007".equals(code)) {
+ System.out.println("token失效,重新获取");
+ deleteAccessToken();
+ return false;
+ }
+ } catch (JsonProcessingException e) {
+ e.printStackTrace();
+ }
+ return true;
+ }
+
+ @Override
+ public Long createCamera(CameraSaveReqVO createReqVO) {
+ // 插入
+ CameraDO camera = BeanUtils.toBean(createReqVO, CameraDO.class);
+ cameraMapper.insert(camera);
+ // 返回
+ return camera.getId();
+ }
+
+ @Override
+ public void updateCamera(CameraSaveReqVO updateReqVO) {
+ // 校验存在
+ validateCameraExists(updateReqVO.getId());
+ // 更新
+ CameraDO updateObj = BeanUtils.toBean(updateReqVO, CameraDO.class);
+ cameraMapper.updateById(updateObj);
+ }
+
+ @Override
+ public void deleteCamera(Long id) {
+ // 校验存在
+ validateCameraExists(id);
+ // 删除
+ cameraMapper.deleteById(id);
+ }
+
+ private void validateCameraExists(Long id) {
+ if (cameraMapper.selectById(id) == null) {
+ throw exception(new ErrorCode(88888, "监控不存在"));
+ }
+ }
+
+ @Override
+ public CameraDO getCamera(Long id) {
+ return cameraMapper.selectById(id);
+ }
+
+ @Override
+ public PageResult getCameraPage(CameraPageReqVO pageReqVO) {
+ return cameraMapper.selectPage(pageReqVO);
+ }
+
+ @Override
+ public String getPreviewUrl(String cameraIndexCode, Integer streamType, String protocol, Integer transmode, String expand, String streamform) {
+ return IntegrationURL.getPreviewURL(cameraIndexCode, streamType, protocol, transmode, expand, streamform, getAccessToken());
+ }
+
+ @Override
+ public String getPlayBackUrl(String cameraIndexCode, Integer recordLocation, String protocol, Integer transmode, String beginTime, String endTime, String uuid, String expand, String streamform, Integer lockType) {
+ return IntegrationURL.getPlaybackURL(cameraIndexCode,recordLocation, protocol, transmode, beginTime, endTime, uuid, expand, streamform,lockType, getAccessToken());
+ }
+
+ @Override
+ public String selZoom(String cameraIndexCode,int startX,int startY,int endX,int endY) {
+ return IntegrationURL.getControlURL(cameraIndexCode, startX, startY, endX, endY, getAccessToken());
+ }
+
+ @Override
+ public String controlling(String cameraIndexCode, Integer action, String command, Integer speed, Integer presetIndex) {
+ return IntegrationURL.getYunTaiOperationURL(cameraIndexCode, action, command, speed, presetIndex, getAccessToken());
+ }
+
+ @Override
+ public List selectCameraByRegionIndexCode(String regionIndexCode) {
+ List cameraDOS = cameraMapper.selectCameraByRegionIndexCode(regionIndexCode);
+ return BeanUtil.copyToList(cameraDOS, CameraDTO.class);
+ }
+
+ @Override
+ public String selectCameraIndexCodeByCameraName(String cameraName) {
+ return cameraMapper.selectCameraIndexCodeByCameraName(cameraName);
+ }
+}
\ No newline at end of file
diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/service/checkticket/CheckTicketService.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/service/checkticket/CheckTicketService.java
index de6bbb056..fbd735149 100644
--- a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/service/checkticket/CheckTicketService.java
+++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/service/checkticket/CheckTicketService.java
@@ -24,5 +24,5 @@ public interface CheckTicketService {
* @param starTime 日期
* @return long 检票人数
*/
- public long checkTicketTotal(String starTime, String endTime);
+ public long checkTicketTotal(String starTime, String endTime, String checkStationName);
}
\ No newline at end of file
diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/service/checkticket/CheckTicketServiceImpl.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/service/checkticket/CheckTicketServiceImpl.java
index 97cc043b3..cd7ed1983 100644
--- a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/service/checkticket/CheckTicketServiceImpl.java
+++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/service/checkticket/CheckTicketServiceImpl.java
@@ -92,7 +92,7 @@ public class CheckTicketServiceImpl implements CheckTicketService {
}
@Override
- public long checkTicketTotal(String starTime, String endTime) {
+ public long checkTicketTotal(String starTime, String endTime, String checkStationName) {
// 创建 DateTimeFormatter 实例以解析指定日期的格式
DateTimeFormatter inputFormatter = DateTimeFormatter.ofPattern("yyyyMMdd");
// 解析指定日期字符串为 LocalDate 对象
@@ -102,7 +102,7 @@ public class CheckTicketServiceImpl implements CheckTicketService {
// 格式化指定日期和下一天
DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern("yyyyMMdd");
String formattedNextDay = nextDay.format(outputFormatter);
- return checkTicketRepository.countByCheckticketdateBetween(starTime,formattedNextDay).size();
+ return checkTicketRepository.countByCheckticketdateBetween(starTime,formattedNextDay, checkStationName).size();
}
public String publicMethod(String endTime){
diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/service/saledata/SaleDataService.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/service/saledata/SaleDataService.java
index 3bd51e375..e3c8b213b 100644
--- a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/service/saledata/SaleDataService.java
+++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/service/saledata/SaleDataService.java
@@ -44,6 +44,7 @@ public interface SaleDataService {
* @return
*/
public List findEventsLastYear();
+ public List findEventsByYear(int year);
public List findEventsLastYear(String starTime, String endTime);
/**
* 查询今年1月1日到12月31日的全部数据
diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/service/saledata/SaleDataServiceImpl.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/service/saledata/SaleDataServiceImpl.java
index 946dbe961..31de06628 100644
--- a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/service/saledata/SaleDataServiceImpl.java
+++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/service/saledata/SaleDataServiceImpl.java
@@ -97,6 +97,7 @@ public class SaleDataServiceImpl implements SaleDataService {
@Override
public List