| | |
| | | String alarmType; |
| | | Date receiveTime; |
| | | double[] targetPosition; |
| | | GuidePTZ guidePTZ; |
| | | String wellId; |
| | | } |
| | |
| | | * 引导目标经纬度 |
| | | */ |
| | | double[] targetPosition; |
| | | |
| | | /** 引导PTZ值 */ |
| | | private GuidePTZ guidePTZ; |
| | | |
| | | } |
| | |
| | | Double longitude = well.getLongitude(); |
| | | Double latitude = well.getLatitude(); |
| | | String targetId = ardAlarmRadar.getTargetId(); |
| | | GuidePTZ guidePTZ = new GuidePTZ(); |
| | | guidePTZ.setP1(well.getGuideP1()); |
| | | guidePTZ.setT1(well.getGuideT1()); |
| | | guidePTZ.setZ1(well.getGuideZ1()); |
| | | guidePTZ.setP2(well.getGuideP2()); |
| | | guidePTZ.setT2(well.getGuideT2()); |
| | | guidePTZ.setZ2(well.getGuideZ2()); |
| | | switch (ardAlarmRadar.getAlarmType()) { |
| | | case "运动目标检测": |
| | | ArdAlarmRadarMove ardAlarmRadarMove = new ArdAlarmRadarMove(); |
| | |
| | | ardAlarmRadarMove.setLatitude(latitude); |
| | | ardAlarmRadarMove.setUpdateTime(radarAlarmData.getAlarmTime()); |
| | | ardAlarmRadarMove.setRadarId(radarId); |
| | | ardAlarmRadarMove.setGuidePTZ(guidePTZ); |
| | | // |
| | | ardAlarmRadarMoveHandler(ardAlarmRadarMove); |
| | | break; |
| | | case "热源检测": |
| | |
| | | ardAlarmRadarFire.setAlarmType("热源检测"); |
| | | ardAlarmRadarFire.setLongitude(longitude); |
| | | ardAlarmRadarFire.setLatitude(latitude); |
| | | ardAlarmRadarFire.setGuidePTZ(guidePTZ); |
| | | ardAlarmRadarFire.setRadarId(radarId); |
| | | ardAlarmRadarFire.setUpdateTime(radarAlarmData.getAlarmTime()); |
| | | // |
| | | ardAlarmRadarFireHandler(ardAlarmRadarFire); |
| | | break; |
| | | case "雷达抽油机停机": |
| | |
| | | ardAlarmRadarPump.setUpdateTime(radarAlarmData.getAlarmTime()); |
| | | ardAlarmRadarPump.setLongitude(well.getLongitude()); |
| | | ardAlarmRadarPump.setLatitude(well.getLatitude()); |
| | | ardAlarmRadarPump.setGuidePTZ(guidePTZ); |
| | | // |
| | | ardAlarmRadarPumpHandler(ardAlarmRadarPump); |
| | | break; |
| | | } |
| | |
| | | //外联防区名称就是兴趣点,查兴趣点坐标 |
| | | String defenseName = ardAlarmExternal.getDefenseName(); |
| | | ArdAlarmpointsWell well = ardAlarmpointsWellMapper.selectArdAlarmpointsWellByWellId(defenseName); |
| | | GuidePTZ guidePTZ = new GuidePTZ(); |
| | | |
| | | if (StringUtils.isNotNull(well)) { |
| | | ardAlarmExternal.setLongitude(well.getLongitude()); |
| | | ardAlarmExternal.setLatitude(well.getLatitude()); |
| | | guidePTZ.setP1(well.getGuideP1()); |
| | | guidePTZ.setT1(well.getGuideT1()); |
| | | guidePTZ.setZ1(well.getGuideZ1()); |
| | | guidePTZ.setP2(well.getGuideP2()); |
| | | guidePTZ.setT2(well.getGuideT2()); |
| | | guidePTZ.setZ2(well.getGuideZ2()); |
| | | } |
| | | int aae = ardAlarmExternalMapper.insertArdAlarmExternal(ardAlarmExternal); |
| | | if (aae > 0) { |
| | |
| | | .setAlarmType("sys_external") |
| | | .setReceiveTime(ardAlarmExternal.getCreateTime()) |
| | | .setTargetPosition(coordinate) |
| | | .setGuidePTZ(guidePTZ); |
| | | .setWellId(well.getId()); |
| | | messagesEnqueued(guideDataDto); |
| | | } |
| | | //endregion |
| | |
| | | return; |
| | | } |
| | | guideTask.setPriority(Integer.valueOf(priority)); |
| | | guideTask.setTargetPosition(guideDataDto.getTargetPosition());//目标经纬度 |
| | | if (guideDataDto.getGuidePTZ() != null) { |
| | | guideTask.setGuidePTZ(guideDataDto.getGuidePTZ());//目标PTZ |
| | | } |
| | | guideTask.setTargetPosition(guideDataDto.getTargetPosition());//引导井ID |
| | | //消息入队 |
| | | queueHandler.addTaskToQueue(cameraId, guideTask); |
| | | //打印队列 |
| | |
| | | |
| | | //获取相机引导入队 |
| | | private void getCameraGuideToQueue(GuideDataDto guideDataDto) { |
| | | |
| | | //获取雷达所在塔上的大光电 |
| | | ArdCameras cameraWithTower = ardEquipRadarMapper.getCameraByRadar(guideDataDto.getRadarId()); |
| | | if (StringUtils.isNotNull(cameraWithTower)) { |
| | |
| | | .setAlarmId(ardAlarmRadarMove.getId()) |
| | | .setAlarmType(ardAlarmRadarMove.getAlarmType()) |
| | | .setReceiveTime(ardAlarmRadarMove.getCreateTime()) |
| | | .setTargetPosition(coordinate) |
| | | .setGuidePTZ(ardAlarmRadarMove.getGuidePTZ()); |
| | | .setTargetPosition(coordinate); |
| | | getCameraGuideToQueue(guideDataDto);//获取相机入队 |
| | | } |
| | | |
| | |
| | | .setAlarmId(ardAlarmRadarFire.getId()) |
| | | .setAlarmType(ardAlarmRadarFire.getAlarmType()) |
| | | .setReceiveTime(ardAlarmRadarFire.getCreateTime()) |
| | | .setTargetPosition(coordinate) |
| | | .setGuidePTZ(ardAlarmRadarFire.getGuidePTZ()); |
| | | .setTargetPosition(coordinate); |
| | | getCameraGuideToQueue(guideDataDto);//获取相机入队 |
| | | } |
| | | |
| | |
| | | .setAlarmId(ardAlarmRadarPump.getId()) |
| | | .setAlarmType(ardAlarmRadarPump.getAlarmType()) |
| | | .setReceiveTime(ardAlarmRadarPump.getCreateTime()) |
| | | .setTargetPosition(coordinate) |
| | | .setGuidePTZ(ardAlarmRadarPump.getGuidePTZ()); |
| | | .setTargetPosition(coordinate); |
| | | getCameraGuideToQueue(guideDataDto);//获取相机入队 |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 雷达目标移动报警处理 |
| | |
| | | import com.ruoyi.alarm.tube.domain.ArdAlarmTube; |
| | | import com.ruoyi.alarm.tube.service.IArdAlarmTubeService; |
| | | import com.ruoyi.common.constant.CacheConstants; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.spring.SpringUtils; |
| | | import com.ruoyi.device.camera.domain.ArdCameras; |
| | |
| | | } |
| | | log.debug("新任务入队:" + task.getAlarmId()); |
| | | guideTaskQueue.add(task); |
| | | /*获取该相机的当前执行线程-----弃用*/ |
| | | //TaskThread currentTaskThread = threadMap.get(cameraId); |
| | | ////如果队列当前线程正在运行,若入队任务优先级大于当前任务优先级,则终止当前线程 |
| | | //if (currentTaskThread != null){ |
| | | // if (task.getPriority() > currentTaskThread.getCurrentTask().getPriority()) { |
| | | // currentTaskThread.getThread().interrupt(); |
| | | // } |
| | | // if (!currentTaskThread.getThread().isAlive()) { |
| | | // Thread newThread = createThread(cameraId, guideTaskQueue); |
| | | // threadMap.put(cameraId, new TaskThread(newThread, task)); |
| | | // newThread.start(); |
| | | // } |
| | | //} |
| | | ////如果队列当前没有线程正在运行,则启动新线程 |
| | | //else { |
| | | // Thread newThread = createThread(cameraId, guideTaskQueue); |
| | | // threadMap.put(cameraId, new TaskThread(newThread, task)); |
| | | // newThread.start(); |
| | | //} |
| | | } |
| | | |
| | | @Async("guideExecutor") |
| | |
| | | } |
| | | log.debug("执行新任务:【" + newTask.getAlarmId() + "】"); |
| | | log.debug("剩余任务数:【" + guideTasks.size() + "】"); |
| | | // 异步处理任务,并获取Future |
| | | // 处理任务 |
| | | processTask(newTask); |
| | | } |
| | | try { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | //异步处理任务 |
| | | public void processTask(GuideTask guideTask) { |
| | | try { |
| | | if (!IsEnableGuide(guideTask.getCameraId())) { |
| | |
| | | CameraCmd cmd = new CameraCmd(); |
| | | cmd.setCameraId(guideTask.getCameraId()); |
| | | cmd.setChanNo(guideTask.getChanNo()); |
| | | cmd.setTargetPosition(guideTask.getTargetPosition()); |
| | | cmd.setOperator(guideTask.getAlarmType()); |
| | | cmd.setExpired(30); |
| | | cmd.setRecordBucketName("record"); |
| | | Map<String, Double> ptzMap = new HashMap<>(); |
| | | switch (guideTask.getChanNo()) { |
| | | case 1: |
| | | ptzMap.put("p", guideTask.getGuidePTZ().getP1()); |
| | | ptzMap.put("t", guideTask.getGuidePTZ().getT1()); |
| | | ptzMap.put("z", guideTask.getGuidePTZ().getZ1()); |
| | | break; |
| | | case 2: |
| | | ptzMap.put("p", guideTask.getGuidePTZ().getP2()); |
| | | ptzMap.put("t", guideTask.getGuidePTZ().getT2()); |
| | | ptzMap.put("z", guideTask.getGuidePTZ().getZ2()); |
| | | break; |
| | | } |
| | | cmd.setPtzMap(ptzMap); |
| | | cmd.setRecordObjectName("alarm_" + guideTask.getAlarmId()); |
| | | cmd.setTargetPosition(guideTask.getTargetPosition()); |
| | | cmd.setRecordObjectName("alarmGuide/"+ DateUtils.getDateYYYYMMDD()+"/"+guideTask.getAlarmType()+"/"+guideTask.getAlarmId()); |
| | | ICameraSdkService cameraSdkService = SpringUtils.getBean(ICameraSdkService.class); |
| | | log.debug("开始引导"); |
| | | boolean guideRes = false; |
| | | boolean recordFlag = false; |
| | | if (cmd.getPtzMap().get("p") != null) { |
| | | //p值存在 优先引导ptz |
| | | guideRes = cameraSdkService.setPtz(cmd); |
| | | } else { |
| | | guideRes = cameraSdkService.guideTargetPosition(cmd); |
| | | } |
| | | boolean guideRes = cameraSdkService.guideTargetPosition(cmd); |
| | | if (guideRes) { |
| | | log.debug("引导成功"); |
| | | cameraSdkService.controlLock(cmd);//上锁 |
| | |
| | | |
| | | import java.util.Date; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.alarm.global.domain.GuidePTZ; |
| | | 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; |
| | | |
| | |
| | | * 雷达ID |
| | | */ |
| | | private String radarId; |
| | | |
| | | /** 引导PTZ值 */ |
| | | private GuidePTZ guidePTZ; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import java.util.Date; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.alarm.global.domain.GuidePTZ; |
| | | 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; |
| | | |
| | |
| | | * 雷达ID |
| | | */ |
| | | private String RadarId; |
| | | |
| | | |
| | | /** 引导PTZ值 */ |
| | | private GuidePTZ guidePTZ; |
| | | |
| | | } |
| | |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.alarm.global.domain.GuidePTZ; |
| | | 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; |
| | | |
| | |
| | | * 雷达ID |
| | | */ |
| | | private String radarId; |
| | | /** |
| | | * 引导PTZ值 |
| | | */ |
| | | private GuidePTZ guidePTZ; |
| | | |
| | | |
| | | } |
| 对比新文件 |
| | |
| | | package com.ruoyi.alarmpoints.well.controller; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | 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.well.domain.ArdWellGuideCamera; |
| | | import com.ruoyi.alarmpoints.well.service.IArdWellGuideCameraService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * 井关联引导相机Controller |
| | | * |
| | | * @author ard |
| | | * @date 2024-01-15 |
| | | */ |
| | | @Api(tags = "井关联引导相机接口") |
| | | @RestController |
| | | @RequestMapping("/well/guidecamera") |
| | | public class ArdWellGuideCameraController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IArdWellGuideCameraService ardWellGuideCameraService; |
| | | |
| | | /** |
| | | * 查询井关联引导相机列表 |
| | | */ |
| | | @ApiOperation("查询井关联引导相机列表") |
| | | @PreAuthorize("@ss.hasPermi('well:guidecamera:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ArdWellGuideCamera ardWellGuideCamera) |
| | | { |
| | | startPage(); |
| | | List<ArdWellGuideCamera> list = ardWellGuideCameraService.selectArdWellGuideCameraList(ardWellGuideCamera); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导出井关联引导相机列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('well:guidecamera:export')") |
| | | @Log(title = "井关联引导相机", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ArdWellGuideCamera ardWellGuideCamera) |
| | | { |
| | | List<ArdWellGuideCamera> list = ardWellGuideCameraService.selectArdWellGuideCameraList(ardWellGuideCamera); |
| | | ExcelUtil<ArdWellGuideCamera> util = new ExcelUtil<ArdWellGuideCamera>(ArdWellGuideCamera.class); |
| | | util.exportExcel(response, list, "井关联引导相机数据"); |
| | | } |
| | | |
| | | /** |
| | | * 获取井关联引导相机详细信息 |
| | | */ |
| | | @ApiOperation("获取井关联引导相机详细信息") |
| | | @PreAuthorize("@ss.hasPermi('well:guidecamera:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") String id) |
| | | { |
| | | return success(ardWellGuideCameraService.selectArdWellGuideCameraById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增井关联引导相机 |
| | | */ |
| | | @ApiOperation("新增井关联引导相机") |
| | | @PreAuthorize("@ss.hasPermi('well:guidecamera:add')") |
| | | @Log(title = "井关联引导相机", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ArdWellGuideCamera ardWellGuideCamera) |
| | | { |
| | | return toAjax(ardWellGuideCameraService.insertArdWellGuideCamera(ardWellGuideCamera)); |
| | | } |
| | | |
| | | /** |
| | | * 修改井关联引导相机 |
| | | */ |
| | | @ApiOperation("修改井关联引导相机") |
| | | @PreAuthorize("@ss.hasPermi('well:guidecamera:edit')") |
| | | @Log(title = "井关联引导相机", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ArdWellGuideCamera ardWellGuideCamera) |
| | | { |
| | | return toAjax(ardWellGuideCameraService.updateArdWellGuideCamera(ardWellGuideCamera)); |
| | | } |
| | | |
| | | /** |
| | | * 删除井关联引导相机 |
| | | */ |
| | | @ApiOperation("删除井关联引导相机") |
| | | @PreAuthorize("@ss.hasPermi('well:guidecamera:remove')") |
| | | @Log(title = "井关联引导相机", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable String[] ids) |
| | | { |
| | | return toAjax(ardWellGuideCameraService.deleteArdWellGuideCameraByIds(ids)); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.alarmpoints.well.domain; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | |
| | | /** 用户id */ |
| | | private String userId; |
| | | |
| | | /** 引导P1值 */ |
| | | private Double guideP1; |
| | | |
| | | /** 引导T1值 */ |
| | | private Double guideT1; |
| | | |
| | | /** 引导Z1值 */ |
| | | private Double guideZ1; |
| | | |
| | | /** 引导P2值 */ |
| | | private Double guideP2; |
| | | |
| | | /** 引导T2值 */ |
| | | private Double guideT2; |
| | | |
| | | /** 引导Z2值 */ |
| | | private Double guideZ2; |
| | | |
| | | @TableField(exist = false) |
| | | private String type; |
| | | |
| | | /** 关联引导相机列表 */ |
| | | List<ArdWellGuideCamera> ardWellGuideCameraList; |
| | | |
| | | } |
| 对比新文件 |
| | |
| | | package com.ruoyi.alarmpoints.well.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_well_guide_camera |
| | | * |
| | | * @author ard |
| | | * @date 2024-01-15 |
| | | */ |
| | | public class ArdWellGuideCamera extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主键 */ |
| | | private String id; |
| | | |
| | | /** 相机ID */ |
| | | @Excel(name = "相机ID") |
| | | private String cameraId; |
| | | |
| | | /** 可见光p值 */ |
| | | @Excel(name = "可见光p值") |
| | | private Double p1; |
| | | |
| | | /** 可见光t值 */ |
| | | @Excel(name = "可见光t值") |
| | | private Double t1; |
| | | |
| | | /** 可见光z值 */ |
| | | @Excel(name = "可见光z值") |
| | | private Double z1; |
| | | |
| | | /** 热红外p值 */ |
| | | @Excel(name = "热红外p值") |
| | | private Double p2; |
| | | |
| | | /** 热红外t值 */ |
| | | @Excel(name = "热红外t值") |
| | | private Double t2; |
| | | |
| | | /** 热红外z值 */ |
| | | @Excel(name = "热红外z值") |
| | | private Double z2; |
| | | |
| | | /** 井ID */ |
| | | @Excel(name = "井ID") |
| | | private String wellId; |
| | | |
| | | public void setId(String id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setCameraId(String cameraId) |
| | | { |
| | | this.cameraId = cameraId; |
| | | } |
| | | |
| | | public String getCameraId() |
| | | { |
| | | return cameraId; |
| | | } |
| | | public void setP1(Double p1) |
| | | { |
| | | this.p1 = p1; |
| | | } |
| | | |
| | | public Double getP1() |
| | | { |
| | | return p1; |
| | | } |
| | | public void setT1(Double t1) |
| | | { |
| | | this.t1 = t1; |
| | | } |
| | | |
| | | public Double getT1() |
| | | { |
| | | return t1; |
| | | } |
| | | public void setZ1(Double z1) |
| | | { |
| | | this.z1 = z1; |
| | | } |
| | | |
| | | public Double getZ1() |
| | | { |
| | | return z1; |
| | | } |
| | | public void setP2(Double p2) |
| | | { |
| | | this.p2 = p2; |
| | | } |
| | | |
| | | public Double getP2() |
| | | { |
| | | return p2; |
| | | } |
| | | public void setT2(Double t2) |
| | | { |
| | | this.t2 = t2; |
| | | } |
| | | |
| | | public Double getT2() |
| | | { |
| | | return t2; |
| | | } |
| | | public void setZ2(Double z2) |
| | | { |
| | | this.z2 = z2; |
| | | } |
| | | |
| | | public Double getZ2() |
| | | { |
| | | return z2; |
| | | } |
| | | public void setWellId(String wellId) |
| | | { |
| | | this.wellId = wellId; |
| | | } |
| | | |
| | | public String getWellId() |
| | | { |
| | | return wellId; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("cameraId", getCameraId()) |
| | | .append("p1", getP1()) |
| | | .append("t1", getT1()) |
| | | .append("z1", getZ1()) |
| | | .append("p2", getP2()) |
| | | .append("t2", getT2()) |
| | | .append("z2", getZ2()) |
| | | .append("wellId", getWellId()) |
| | | .toString(); |
| | | } |
| | | } |
| 对比新文件 |
| | |
| | | package com.ruoyi.alarmpoints.well.domain; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | /** |
| | | * @Description: 井关联引导ptz列表 |
| | | * @ClassName: GuideCamera |
| | | * @Author: 刘苏义 |
| | | * @Date: 2024年01月15日15:30:54 |
| | | **/ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class GuideCamera { |
| | | Long id; |
| | | String cameraId;//相机 |
| | | Double p1; |
| | | Double t1; |
| | | Double z1; |
| | | Double p2; |
| | | Double t2; |
| | | Double z2; |
| | | String wellId;//井id |
| | | } |
| 对比新文件 |
| | |
| | | package com.ruoyi.alarmpoints.well.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.alarmpoints.well.domain.ArdWellGuideCamera; |
| | | |
| | | /** |
| | | * 井关联引导相机Mapper接口 |
| | | * |
| | | * @author ard |
| | | * @date 2024-01-15 |
| | | */ |
| | | public interface ArdWellGuideCameraMapper |
| | | { |
| | | /** |
| | | * 查询井关联引导相机 |
| | | * |
| | | * @param id 井关联引导相机主键 |
| | | * @return 井关联引导相机 |
| | | */ |
| | | public ArdWellGuideCamera selectArdWellGuideCameraById(String id); |
| | | |
| | | /** |
| | | * 查询井关联引导相机列表 |
| | | * |
| | | * @param ardWellGuideCamera 井关联引导相机 |
| | | * @return 井关联引导相机集合 |
| | | */ |
| | | public List<ArdWellGuideCamera> selectArdWellGuideCameraList(ArdWellGuideCamera ardWellGuideCamera); |
| | | |
| | | /** |
| | | * 新增井关联引导相机 |
| | | * |
| | | * @param ardWellGuideCamera 井关联引导相机 |
| | | * @return 结果 |
| | | */ |
| | | public int insertArdWellGuideCamera(ArdWellGuideCamera ardWellGuideCamera); |
| | | |
| | | /** |
| | | * 修改井关联引导相机 |
| | | * |
| | | * @param ardWellGuideCamera 井关联引导相机 |
| | | * @return 结果 |
| | | */ |
| | | public int updateArdWellGuideCamera(ArdWellGuideCamera ardWellGuideCamera); |
| | | |
| | | /** |
| | | * 删除井关联引导相机 |
| | | * |
| | | * @param id 井关联引导相机主键 |
| | | * @return 结果 |
| | | */ |
| | | public int deleteArdWellGuideCameraById(String id); |
| | | |
| | | /** |
| | | * 批量删除井关联引导相机 |
| | | * |
| | | * @param ids 需要删除的数据主键集合 |
| | | * @return 结果 |
| | | */ |
| | | public int deleteArdWellGuideCameraByIds(String[] ids); |
| | | } |
| 对比新文件 |
| | |
| | | package com.ruoyi.alarmpoints.well.service; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.alarmpoints.well.domain.ArdWellGuideCamera; |
| | | |
| | | /** |
| | | * 井关联引导相机Service接口 |
| | | * |
| | | * @author ard |
| | | * @date 2024-01-15 |
| | | */ |
| | | public interface IArdWellGuideCameraService |
| | | { |
| | | /** |
| | | * 查询井关联引导相机 |
| | | * |
| | | * @param id 井关联引导相机主键 |
| | | * @return 井关联引导相机 |
| | | */ |
| | | public ArdWellGuideCamera selectArdWellGuideCameraById(String id); |
| | | |
| | | /** |
| | | * 查询井关联引导相机列表 |
| | | * |
| | | * @param ardWellGuideCamera 井关联引导相机 |
| | | * @return 井关联引导相机集合 |
| | | */ |
| | | public List<ArdWellGuideCamera> selectArdWellGuideCameraList(ArdWellGuideCamera ardWellGuideCamera); |
| | | |
| | | /** |
| | | * 新增井关联引导相机 |
| | | * |
| | | * @param ardWellGuideCamera 井关联引导相机 |
| | | * @return 结果 |
| | | */ |
| | | public int insertArdWellGuideCamera(ArdWellGuideCamera ardWellGuideCamera); |
| | | |
| | | /** |
| | | * 修改井关联引导相机 |
| | | * |
| | | * @param ardWellGuideCamera 井关联引导相机 |
| | | * @return 结果 |
| | | */ |
| | | public int updateArdWellGuideCamera(ArdWellGuideCamera ardWellGuideCamera); |
| | | |
| | | /** |
| | | * 批量删除井关联引导相机 |
| | | * |
| | | * @param ids 需要删除的井关联引导相机主键集合 |
| | | * @return 结果 |
| | | */ |
| | | public int deleteArdWellGuideCameraByIds(String[] ids); |
| | | |
| | | /** |
| | | * 删除井关联引导相机信息 |
| | | * |
| | | * @param id 井关联引导相机主键 |
| | | * @return 结果 |
| | | */ |
| | | public int deleteArdWellGuideCameraById(String id); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWell; |
| | | import com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWellDeptVo; |
| | | import com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWellParam; |
| | | import com.ruoyi.alarmpoints.well.domain.RTU_DATA_YJ_8; |
| | | import com.ruoyi.alarmpoints.well.domain.*; |
| | | import com.ruoyi.alarmpoints.well.mapper.ArdAlarmpointsWellMapper; |
| | | import com.ruoyi.alarmpoints.well.mapper.ArdWellGuideCameraMapper; |
| | | import com.ruoyi.alarmpoints.well.service.IArdAlarmpointsWellService; |
| | | import com.ruoyi.common.annotation.DataScope; |
| | | import com.ruoyi.common.core.domain.entity.SysConfig; |
| | |
| | | private static final Logger log = LoggerFactory.getLogger(ArdAlarmpointsWellServiceImpl.class); |
| | | @Resource |
| | | private ArdAlarmpointsWellMapper ardAlarmpointsWellMapper; |
| | | @Resource |
| | | private ArdWellGuideCameraMapper ardWellGuideCameraMapper; |
| | | |
| | | @Autowired |
| | | protected Validator validator; |
| | | |
| | |
| | | ardAlarmpointsWell.setUpdateTime(DateUtils.getNowDate()); |
| | | return ardAlarmpointsWellMapper.updateArdAlarmpointsWell(ardAlarmpointsWell); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public int updateArdAlarmpointsWellByWellId(ArdAlarmpointsWell ardAlarmpointsWell) { |
| | |
| | | ardAlarmpointsWell.setUpdateTime(DateUtils.getNowDate()); |
| | | return ardAlarmpointsWellMapper.updateArdAlarmpointsWellByWellId(ardAlarmpointsWell); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除井管理 |
| | | * |
| | |
| | | }else{ |
| | | result.put("updateTime",""); |
| | | } |
| | | if(ardAlarmpointsWell.getGuideP1() != null){ |
| | | result.put("guideP1",ardAlarmpointsWell.getGuideP1()); |
| | | }else{ |
| | | result.put("guideP1",""); |
| | | } |
| | | if(ardAlarmpointsWell.getGuideP2() != null){ |
| | | result.put("guideP2",ardAlarmpointsWell.getGuideP2()); |
| | | }else{ |
| | | result.put("guideP2",""); |
| | | } |
| | | if(ardAlarmpointsWell.getGuideT1() != null){ |
| | | result.put("guideT1",ardAlarmpointsWell.getGuideT1()); |
| | | }else{ |
| | | result.put("guideT1",""); |
| | | } |
| | | if(ardAlarmpointsWell.getGuideT2() != null){ |
| | | result.put("guideT2",ardAlarmpointsWell.getGuideT2()); |
| | | }else{ |
| | | result.put("guideT2",""); |
| | | } |
| | | if(ardAlarmpointsWell.getGuideZ1() != null){ |
| | | result.put("guideZ1",ardAlarmpointsWell.getGuideZ1()); |
| | | }else{ |
| | | result.put("guideZ1",""); |
| | | } |
| | | if(ardAlarmpointsWell.getGuideZ2() != null){ |
| | | result.put("guideZ2",ardAlarmpointsWell.getGuideZ2()); |
| | | }else{ |
| | | result.put("guideZ2",""); |
| | | } |
| | | //if(ardAlarmpointsWell.getGuideP1() != null){ |
| | | // result.put("guideP1",ardAlarmpointsWell.getGuideP1()); |
| | | //}else{ |
| | | // result.put("guideP1",""); |
| | | //} |
| | | //if(ardAlarmpointsWell.getGuideP2() != null){ |
| | | // result.put("guideP2",ardAlarmpointsWell.getGuideP2()); |
| | | //}else{ |
| | | // result.put("guideP2",""); |
| | | //} |
| | | //if(ardAlarmpointsWell.getGuideT1() != null){ |
| | | // result.put("guideT1",ardAlarmpointsWell.getGuideT1()); |
| | | //}else{ |
| | | // result.put("guideT1",""); |
| | | //} |
| | | //if(ardAlarmpointsWell.getGuideT2() != null){ |
| | | // result.put("guideT2",ardAlarmpointsWell.getGuideT2()); |
| | | //}else{ |
| | | // result.put("guideT2",""); |
| | | //} |
| | | //if(ardAlarmpointsWell.getGuideZ1() != null){ |
| | | // result.put("guideZ1",ardAlarmpointsWell.getGuideZ1()); |
| | | //}else{ |
| | | // result.put("guideZ1",""); |
| | | //} |
| | | //if(ardAlarmpointsWell.getGuideZ2() != null){ |
| | | // result.put("guideZ2",ardAlarmpointsWell.getGuideZ2()); |
| | | //}else{ |
| | | // result.put("guideZ2",""); |
| | | //} |
| | | if(config.size() != 0){ |
| | | String oracle = config.get(0).getConfigValue(); |
| | | String[] oracleArr = oracle.split(";"); |
| 对比新文件 |
| | |
| | | package com.ruoyi.alarmpoints.well.service.impl; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import java.util.ArrayList; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.alarmpoints.well.mapper.ArdWellGuideCameraMapper; |
| | | import com.ruoyi.alarmpoints.well.domain.ArdWellGuideCamera; |
| | | import com.ruoyi.alarmpoints.well.service.IArdWellGuideCameraService; |
| | | |
| | | /** |
| | | * 井关联引导相机Service业务层处理 |
| | | * |
| | | * @author ard |
| | | * @date 2024-01-15 |
| | | */ |
| | | @Service |
| | | public class ArdWellGuideCameraServiceImpl implements IArdWellGuideCameraService { |
| | | @Autowired |
| | | private ArdWellGuideCameraMapper ardWellGuideCameraMapper; |
| | | |
| | | /** |
| | | * 查询井关联引导相机 |
| | | * |
| | | * @param id 井关联引导相机主键 |
| | | * @return 井关联引导相机 |
| | | */ |
| | | @Override |
| | | public ArdWellGuideCamera selectArdWellGuideCameraById(String id) { |
| | | return ardWellGuideCameraMapper.selectArdWellGuideCameraById(id); |
| | | } |
| | | |
| | | /** |
| | | * 查询井关联引导相机列表 |
| | | * |
| | | * @param ardWellGuideCamera 井关联引导相机 |
| | | * @return 井关联引导相机 |
| | | */ |
| | | @Override |
| | | public List<ArdWellGuideCamera> selectArdWellGuideCameraList(ArdWellGuideCamera ardWellGuideCamera) { |
| | | return ardWellGuideCameraMapper.selectArdWellGuideCameraList(ardWellGuideCamera); |
| | | } |
| | | |
| | | /** |
| | | * 新增井关联引导相机 |
| | | * |
| | | * @param ardWellGuideCamera 井关联引导相机 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int insertArdWellGuideCamera(ArdWellGuideCamera ardWellGuideCamera) { |
| | | ardWellGuideCamera.setId(IdUtils.simpleUUID()); |
| | | return ardWellGuideCameraMapper.insertArdWellGuideCamera(ardWellGuideCamera); |
| | | } |
| | | |
| | | /** |
| | | * 修改井关联引导相机 |
| | | * |
| | | * @param ardWellGuideCamera 井关联引导相机 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int updateArdWellGuideCamera(ArdWellGuideCamera ardWellGuideCamera) { |
| | | return ardWellGuideCameraMapper.updateArdWellGuideCamera(ardWellGuideCamera); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除井关联引导相机 |
| | | * |
| | | * @param ids 需要删除的井关联引导相机主键 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteArdWellGuideCameraByIds(String[] ids) { |
| | | return ardWellGuideCameraMapper.deleteArdWellGuideCameraByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * 删除井关联引导相机信息 |
| | | * |
| | | * @param id 井关联引导相机主键 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteArdWellGuideCameraById(String id) { |
| | | return ardWellGuideCameraMapper.deleteArdWellGuideCameraById(id); |
| | | } |
| | | } |
| | |
| | | private ICameraSdkService cameraSdkService;
|
| | | @Resource
|
| | | private IArdCamerasService ardCamerasService;
|
| | |
|
| | | @Autowired
|
| | | private IArdCameraNoGuideZoneService ardCameraNoGuideZoneService;
|
| | |
|
| | |
|
| | | @RequestMapping("/preview")
|
| | | private String preview() {
|
| | |
| | | return toAjax(cameraSdkService.guideTargetPosition(cmd));
|
| | | }
|
| | |
|
| | | @ApiOperation("指向目标井")
|
| | | @PostMapping("/setTargetWell")
|
| | | @Log(title = "指向目标井", businessType = BusinessType.CONTROL)
|
| | | @ApiOperationSupport(includeParameters = {"cmd.wellId"})
|
| | | public @ResponseBody
|
| | | AjaxResult setTargetWell(@RequestBody CameraCmd cmd) {
|
| | | cmd.setOperator(SecurityUtils.getUserId());
|
| | | return cameraSdkService.guideTargetWell(cmd);
|
| | | }
|
| | |
|
| | | @ApiOperation("设置零方位角")
|
| | | @PostMapping("/setZeroPTZ")
|
| | |
| | | |
| | | /*目标经纬度*/ |
| | | double[] targetPosition; |
| | | /*目标井*/ |
| | | String wellId; |
| | | |
| | | /*当前操作者*/ |
| | | String operator; |
| | |
| | | package com.ruoyi.device.camera.service;
|
| | |
|
| | | import com.ruoyi.common.core.domain.AjaxResult;
|
| | | import com.ruoyi.device.camera.domain.ArdCameras;
|
| | | import com.ruoyi.device.camera.domain.CameraCmd;
|
| | | import org.springframework.scheduling.annotation.Async;
|
| | |
| | | //获取ptz范围
|
| | | Map<String, Object> getPtzScope(CameraCmd cmd);
|
| | |
|
| | | //设置ptz
|
| | | boolean setPtz(CameraCmd cmd);
|
| | |
|
| | | //设置零方位角
|
| | |
| | | //引导目标位置
|
| | | boolean guideTargetPosition(CameraCmd cmd);
|
| | |
|
| | | //引导目标井
|
| | | AjaxResult guideTargetWell(CameraCmd cmd);
|
| | |
|
| | | //录像
|
| | | String record(CameraCmd cmd);
|
| | |
|
| | |
| | | package com.ruoyi.device.camera.service.impl;
|
| | |
|
| | | import com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWell;
|
| | | import com.ruoyi.alarmpoints.well.domain.ArdWellGuideCamera;
|
| | | import com.ruoyi.alarmpoints.well.service.IArdAlarmpointsWellService;
|
| | | import com.ruoyi.common.annotation.SdkOperate;
|
| | | import com.ruoyi.common.constant.CacheConstants;
|
| | | import com.ruoyi.common.core.domain.AjaxResult;
|
| | | import com.ruoyi.common.core.redis.RedisCache;
|
| | | import com.ruoyi.common.utils.SecurityUtils;
|
| | | import com.ruoyi.common.utils.StringUtils;
|
| | | import com.ruoyi.device.camera.domain.ArdCameras;
|
| | | import com.ruoyi.device.camera.domain.CameraCmd;
|
| | | import com.ruoyi.device.camera.service.IArdCamerasService;
|
| | | import com.ruoyi.device.camera.service.ICameraSdkService;
|
| | | import com.ruoyi.device.camera.factory.CameraSDK;
|
| | | import com.ruoyi.device.camera.factory.CameraSDKFactory;
|
| | | import com.ruoyi.device.noguidezone.domain.ArdCameraNoGuideZone;
|
| | | import com.ruoyi.device.noguidezone.service.IArdCameraNoGuideZoneService;
|
| | | import com.ruoyi.utils.gis.GisUtil;
|
| | | import com.ruoyi.utils.gis.Point;
|
| | | import com.ruoyi.utils.sdk.common.GlobalVariable;
|
| | | import com.ruoyi.utils.tools.ArdTool;
|
| | | import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;
|
| | | import lombok.extern.slf4j.Slf4j;
|
| | | import org.springframework.boot.ApplicationArguments;
|
| | | import org.springframework.boot.ApplicationRunner;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import java.util.Date;
|
| | | import java.util.HashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | | import java.util.*;
|
| | |
|
| | |
|
| | | /**
|
| | |
| | | private RedisCache redisCache;
|
| | | @Resource
|
| | | private CameraSDKFactory cameraSDKFactory;
|
| | | @Resource
|
| | | private IArdAlarmpointsWellService ardAlarmpointsWellService;
|
| | | @Resource
|
| | | private IArdCameraNoGuideZoneService ardCameraNoGuideZoneService;
|
| | |
|
| | | /**
|
| | | * 启动线程方法,用于执行初始化登录相机的逻辑
|
| | |
| | | }
|
| | |
|
| | | //云台控制
|
| | | @SdkOperate
|
| | | @Override
|
| | | public boolean pTZControl(CameraCmd cmd) {
|
| | | try {
|
| | |
| | |
|
| | | //设置预置位
|
| | | @Override
|
| | | @SdkOperate
|
| | | public boolean setPreset(CameraCmd cmd) {
|
| | | boolean result = false;
|
| | | try {
|
| | |
| | |
|
| | | //调用预置位
|
| | | @Override
|
| | | @SdkOperate
|
| | | public boolean gotoPreset(CameraCmd cmd) {
|
| | | boolean result = false;
|
| | | try {
|
| | |
| | | }
|
| | |
|
| | | //抓图
|
| | | @SdkOperate
|
| | | @Override
|
| | | public String picCutCate(CameraCmd cmd) {
|
| | | String url = "";
|
| | |
| | | }
|
| | |
|
| | | //设置ptz
|
| | | @SdkOperate
|
| | | @Override
|
| | | public boolean setPtz(CameraCmd cmd) {
|
| | | boolean result = false;
|
| | |
| | | if(gdtype.equals("1")) {
|
| | | //大光电使用高精度ptz设置
|
| | | result = cameraSDK.setPtz(cmd);
|
| | | }else
|
| | | {
|
| | | } else {
|
| | | result = cameraSDK.setPtz1(cmd);
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | //设置零方位角
|
| | | @SdkOperate
|
| | | @Override
|
| | | public boolean setZeroPtz(CameraCmd cmd) {
|
| | | boolean result = false;
|
| | |
| | | }
|
| | |
|
| | | //引导指向目标
|
| | | @SdkOperate
|
| | | @Override
|
| | | public boolean guideTargetPosition(CameraCmd cmd) {
|
| | | boolean result = false;
|
| | |
| | | }
|
| | | } catch (Exception ex) {
|
| | | log.error("引导指向目标异常:" + ex.getMessage());
|
| | | }
|
| | | return result;
|
| | | }
|
| | |
|
| | | //引导指向井
|
| | | @Override
|
| | | public AjaxResult guideTargetWell(CameraCmd cmd) {
|
| | |
|
| | | //按日夜切换配置获取相机通道
|
| | | Integer chanNo = ArdTool.getChannelBydayNightTime(redisCache.getCacheObject("sys_config:dayNightTime"));
|
| | | cmd.setChanNo(chanNo);
|
| | |
|
| | | //获取井
|
| | | ArdAlarmpointsWell well = ardAlarmpointsWellService.selectArdAlarmpointsWellById(cmd.getWellId());
|
| | | if (well == null) {
|
| | | return AjaxResult.error("井不存在");
|
| | | }
|
| | | cmd.setTargetPosition(new double[]{well.getLongitude(), well.getLatitude()});
|
| | |
|
| | | //获取井配置的引导相机列表
|
| | | List<ArdWellGuideCamera> ardWellGuideCameraList = well.getArdWellGuideCameraList();
|
| | | if (ardWellGuideCameraList != null && ardWellGuideCameraList.size() > 0) {
|
| | | //获取相机和井的距离进行排序,取出最近的一个相机
|
| | | Map<String, Double> distanceMap = new HashMap<>();
|
| | | for (ArdWellGuideCamera ardWellGuideCamera : ardWellGuideCameraList) {
|
| | | ArdCameras cameras = ardCamerasService.selectArdCamerasById(ardWellGuideCamera.getCameraId());
|
| | | if (cameras == null) {
|
| | | continue;
|
| | | }
|
| | | double[] targetPosition = new double[]{well.getLongitude(), well.getLatitude()};
|
| | | double[] camPosition = new double[]{cameras.getLongitude(), cameras.getLatitude()};
|
| | | double distance = GisUtil.getDistance(targetPosition, camPosition);
|
| | | distanceMap.put(ardWellGuideCamera.getCameraId(), distance);//存入缓存map
|
| | | }
|
| | | //从缓存里取出距离最近相机ID
|
| | | String cameraId = ArdTool.getKeyByMinValue(distanceMap);
|
| | | cmd.setCameraId(cameraId);
|
| | | //获取最近相机的对象
|
| | | Optional<ArdWellGuideCamera> first = ardWellGuideCameraList.stream().filter(s -> s.getCameraId().equals(cameraId)).findFirst();
|
| | | if(first.isPresent())
|
| | | {
|
| | | ArdWellGuideCamera ardWellGuideCamera = first.get();
|
| | | Map<String, Double> ptzMap = null;
|
| | | //通过通道获取预置位
|
| | | switch (chanNo) {
|
| | | case 1:
|
| | | if (ardWellGuideCamera.getP1() != null) {
|
| | | ptzMap = new HashMap<>();
|
| | | ptzMap.put("p", ardWellGuideCamera.getP1());
|
| | | ptzMap.put("t", ardWellGuideCamera.getT1());
|
| | | ptzMap.put("z", ardWellGuideCamera.getZ1());
|
| | | }
|
| | | break;
|
| | | case 2:
|
| | | if (ardWellGuideCamera.getP2() != null) {
|
| | | ptzMap = new HashMap<>();
|
| | | ptzMap.put("p", ardWellGuideCamera.getP2());
|
| | | ptzMap.put("t", ardWellGuideCamera.getT2());
|
| | | ptzMap.put("z", ardWellGuideCamera.getZ2());
|
| | | }
|
| | | break;
|
| | |
|
| | | }
|
| | | //引导
|
| | | if (ptzMap != null) {
|
| | | //使用ptz引导
|
| | | cmd.setPtzMap(ptzMap);
|
| | | boolean res = setPtz(cmd);
|
| | | if (!res) {
|
| | | return AjaxResult.error("ptz引导失败", "cameraId:" + cameraId);
|
| | | }
|
| | | return AjaxResult.success("ptz引导成功", "cameraId:" + cameraId);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | log.debug("未找到ptz引导相机,查找最近相机");
|
| | |
|
| | | //从附近相机找最近的一个相机
|
| | | String cameraId = getCameraByNear(new double[]{well.getLongitude(), well.getLatitude()});
|
| | | cmd.setCameraId(cameraId);
|
| | | if ("".equals(cameraId)) {
|
| | | return AjaxResult.error("未找到引导相机");
|
| | | }
|
| | | //判断禁引区
|
| | | if (isInPolygon(cameraId, new Double[]{well.getLongitude(), well.getLatitude()})) {
|
| | | return AjaxResult.error("井位置属于相机禁止引导区域");
|
| | | }
|
| | | //按井坐标开始引导
|
| | | if (!guideTargetPosition(cmd)) {
|
| | | return AjaxResult.error("井坐标引导失败", "cameraId:" + cameraId);
|
| | | }
|
| | | return AjaxResult.success("井坐标引导成功", "cameraId:" + cameraId);
|
| | |
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取最近距离的光电
|
| | | * 1-相机在线
|
| | | * 2-开启报警引导功能
|
| | | * 3-配置了最大可视距离
|
| | | */
|
| | | private String getCameraByNear(double[] targetPosition) {
|
| | | String minDistanceCameraId = "";
|
| | | try {
|
| | | //获取所有大光电
|
| | | List<Object> Objects = redisCache.getListKey(CacheConstants.CAMERA_LIST_KEY);
|
| | | //统计所有大光电可视范围内与报警点的距离
|
| | | Map<String, Double> distanceMap = new HashMap<>();
|
| | | for (Object obj : Objects) {
|
| | | ArdCameras camera = (ArdCameras) obj;
|
| | |
|
| | | if (!GlobalVariable.loginMap.containsKey(camera.getId())) {
|
| | | log.debug("该光电未登录");
|
| | | continue;
|
| | | }
|
| | | if (camera.getCamMaxVisibleDistance() == null) {
|
| | | log.debug("该光电未配置最大可视距离");
|
| | | continue;
|
| | | }
|
| | | if (camera.getCamAlarmGuideEnable().equals(0)) {
|
| | | log.debug("该光电未开启报警引导");
|
| | | continue;
|
| | | }
|
| | |
|
| | | double[] camPosition = new double[]{camera.getLongitude(), camera.getLatitude()};
|
| | | double distance = GisUtil.getDistance(targetPosition, camPosition);
|
| | | if (distance != 0.0 && distance <= camera.getCamMaxVisibleDistance()) {
|
| | | distanceMap.put(camera.getId(), distance);
|
| | | if (StringUtils.isNull(camera.getCamAlarmGuideEnable())) {
|
| | | camera.setCamAlarmGuideEnable(0);
|
| | | }
|
| | | }
|
| | | }
|
| | | if (distanceMap.size() > 0) {
|
| | | log.debug("尝试查找最近光电");
|
| | | //获取距离字典中最近的一个相机ID
|
| | | minDistanceCameraId = ArdTool.getKeyByMinValue(distanceMap);
|
| | | log.debug("查找到最近光电:" + minDistanceCameraId);
|
| | | }
|
| | | } catch (Exception ex) {
|
| | | log.error("获取附近开启报警引导功能光电异常:" + ex.getMessage());
|
| | | }
|
| | | return minDistanceCameraId;
|
| | | }
|
| | |
|
| | | //判断相机和引导位置是否在禁止引导区域
|
| | | public boolean isInPolygon(String cameraId, Double[] targetPosition) {
|
| | | boolean result = false;
|
| | | //拦截手动引导
|
| | | ArdCameraNoGuideZone ardCameraNoGuideZone = new ArdCameraNoGuideZone();
|
| | | ardCameraNoGuideZone.setCameraId(cameraId);
|
| | | ardCameraNoGuideZone.setEnabled("1");
|
| | | //获取当前相机的禁引可视域列表
|
| | | List<ArdCameraNoGuideZone> ardCameraNoGuideZones = ardCameraNoGuideZoneService.selectArdCameraNoGuideZoneList(ardCameraNoGuideZone);
|
| | | if (ardCameraNoGuideZones.size() > 0) {
|
| | | //获取到当前相机的坐标集合
|
| | | for (ArdCameraNoGuideZone zone : ardCameraNoGuideZones) {
|
| | | String[] parts = zone.getPoi().split(",");
|
| | | List<Point> pointList = new ArrayList<>();
|
| | | for (int i = 0; i < parts.length; i += 3) {
|
| | | Point point = new Point();
|
| | | point.setLongitude(Double.valueOf(parts[i]));
|
| | | point.setLatitude(Double.valueOf(parts[i + 1]));
|
| | | pointList.add(point);
|
| | | }
|
| | | double lon = targetPosition[0];
|
| | | double lat = targetPosition[1];
|
| | | Point targetPoint = new Point(lon, lat);
|
| | | //判断引导目标是否在坐标集合组成的多边形内
|
| | | boolean inPolygon = GisUtil.isInPolygon(targetPoint, pointList);
|
| | | if (inPolygon) {
|
| | | result = inPolygon;
|
| | | }
|
| | | }
|
| | | }
|
| | | return result;
|
| | | }
|
| | |
| | | }
|
| | | return true;
|
| | | }
|
| | |
|
| | |
|
| | | //录像
|
| | | @SdkOperate
|
| | |
| | | }
|
| | | return map;
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | |
| | | cmd.setTargetPosition(targetPositon);
|
| | | cmd.setOperator("sys_patrol_inspect");
|
| | | cmd.setExpired(step.getRecordingTime() * 60);
|
| | | Map<String, Double> ptzMap = new HashMap<>();
|
| | | switch (channel) {
|
| | | case 1:
|
| | | ptzMap.put("p", well.getGuideP1());
|
| | | ptzMap.put("t", well.getGuideT1());
|
| | | ptzMap.put("z", well.getGuideZ1());
|
| | | break;
|
| | | case 2:
|
| | | ptzMap.put("p", well.getGuideP2());
|
| | | ptzMap.put("t", well.getGuideT2());
|
| | | ptzMap.put("z", well.getGuideZ2());
|
| | | break;
|
| | | }
|
| | | cmd.setPtzMap(ptzMap);
|
| | | boolean setTargetPosition;
|
| | | if (cmd.getPtzMap().get("p") != null) {
|
| | | setTargetPosition = cameraSdkService.setPtz(cmd);
|
| | | } else {
|
| | | setTargetPosition = cameraSdkService.guideTargetPosition(cmd);
|
| | | }
|
| | |
|
| | | boolean setTargetPosition = cameraSdkService.guideTargetPosition(cmd);
|
| | | if (setTargetPosition) {
|
| | | /*控制相机巡检成功,开始录像*/
|
| | | cameraSdkService.recordStart(cmd);
|
| | |
| | | cmd.setTargetPosition(targetPositon);
|
| | | cmd.setOperator("sys_patrol_inspect");
|
| | | cmd.setExpired(step.getRecordingTime() * 60);
|
| | | Map<String, Double> ptzMap = new HashMap<>();
|
| | | switch (channel) {
|
| | | case 1:
|
| | | ptzMap.put("p", well.getGuideP1());
|
| | | ptzMap.put("t", well.getGuideT1());
|
| | | ptzMap.put("z", well.getGuideZ1());
|
| | | break;
|
| | | case 2:
|
| | | ptzMap.put("p", well.getGuideP2());
|
| | | ptzMap.put("t", well.getGuideT2());
|
| | | ptzMap.put("z", well.getGuideZ2());
|
| | | break;
|
| | | }
|
| | | cmd.setPtzMap(ptzMap);
|
| | | boolean setTargetPosition;
|
| | | if (cmd.getPtzMap().get("p") != null) {
|
| | | setTargetPosition = cameraSdkService.setPtz(cmd);
|
| | | } else {
|
| | | setTargetPosition = cameraSdkService.guideTargetPosition(cmd);
|
| | | }
|
| | | boolean setTargetPosition = cameraSdkService.guideTargetPosition(cmd);
|
| | | if (!setTargetPosition) {
|
| | | /*控制失败,当前步骤启动时间置null*/
|
| | | ardVideoInspectTask.setCurrentStepStartTime("");
|
| | |
| | | cmd.setChanNo(channel);
|
| | | cmd.setOperator("sys_patrol_inspect");
|
| | | cmd.setRecordBucketName("record");
|
| | | cmd.setRecordObjectName("inspect_" + IdUtils.fastSimpleUUID());
|
| | | cmd.setRecordObjectName("inspectGuide/" + DateUtils.getDateYYYYMMDD()+"/"+ IdUtils.fastSimpleUUID());
|
| | | String url = cameraSdkService.recordStopToMinio(cmd);
|
| | | /*插入巡检记录*/
|
| | | ArdVideoInspectRecord ardVideoInspectRecord = new ArdVideoInspectRecord();
|
| | |
| | | import com.ruoyi.alarm.global.domain.GuidePriorityQueue; |
| | | import com.ruoyi.alarm.global.domain.GuideTask; |
| | | import com.ruoyi.alarm.global.service.impl.QueueHandler; |
| | | import com.ruoyi.common.annotation.SdkOperate; |
| | | import com.ruoyi.common.utils.file.FileUtils; |
| | | import com.ruoyi.common.utils.file.MimeTypeUtils; |
| | | import com.ruoyi.common.utils.spring.SpringUtils; |
| | |
| | | * 2023/10/17 8:28:13 |
| | | */ |
| | | @Override |
| | | @SdkOperate |
| | | public boolean pTZControl(CameraCmd cmd) { |
| | | String cameraId = cmd.getCameraId(); |
| | | boolean enable = cmd.isEnable(); |
| | |
| | | * @修改人和其它信息 注意俯仰角度负值需要加上360得到的正值进行设置 |
| | | */ |
| | | @Override |
| | | @SdkOperate |
| | | public boolean setPtz(CameraCmd cmd) { |
| | | String cameraId = cmd.getCameraId(); |
| | | Integer chanNo = cmd.getChanNo(); |
| | |
| | | * @修改人和其它信息 注意俯仰角度负值需要加上360得到的正值进行设置 |
| | | */ |
| | | @Override |
| | | @SdkOperate |
| | | public boolean setZeroPtz(CameraCmd cmd) { |
| | | String cameraId = cmd.getCameraId(); |
| | | Integer chanNo = cmd.getChanNo(); |
| | |
| | | import com.ruoyi.alarm.global.domain.GuidePriorityQueue; |
| | | import com.ruoyi.alarm.global.domain.GuideTask; |
| | | import com.ruoyi.alarm.global.service.impl.QueueHandler; |
| | | import com.ruoyi.common.annotation.SdkOperate; |
| | | import com.ruoyi.common.utils.file.FileUtils; |
| | | import com.ruoyi.common.utils.file.MimeTypeUtils; |
| | | import com.ruoyi.common.utils.spring.SpringUtils; |
| | |
| | | * @修改人和其它信息 |
| | | */ |
| | | @Override |
| | | @SdkOperate |
| | | public boolean pTZControl(CameraCmd cmd) { |
| | | String cameraId = cmd.getCameraId(); |
| | | boolean enable = cmd.isEnable(); |
| | |
| | | * @修改人和其它信息 注意俯仰角度负值需要加上360得到的正值进行设置 |
| | | */ |
| | | @Override |
| | | @SdkOperate |
| | | public boolean setPtz1(CameraCmd cmd) { |
| | | String cameraId = cmd.getCameraId(); |
| | | Integer channelNum = cmd.getChanNo(); |
| | |
| | | * @修改人和其它信息 注意俯仰角度负值向下负值 |
| | | */ |
| | | @Override |
| | | @SdkOperate |
| | | public boolean setPtz(CameraCmd cmd) { |
| | | try { |
| | | String cameraId = cmd.getCameraId(); |
| | |
| | | } |
| | | |
| | | @Override |
| | | @SdkOperate |
| | | public boolean guideTargetPosition(CameraCmd cmd) { |
| | | String cameraId = cmd.getCameraId(); |
| | | Integer channelNum = cmd.getChanNo(); |
| | | Integer chanNo = cmd.getChanNo(); |
| | | if (!GlobalVariable.loginMap.containsKey(cameraId)) { |
| | | return false; |
| | | } |
| | |
| | | m_ptzPosCurrent.wZoomPos = (short) (Integer.parseInt(z, 16)); |
| | | Pointer point = m_ptzPosCurrent.getPointer(); |
| | | m_ptzPosCurrent.write(); |
| | | boolean bool = hCNetSDK.NET_DVR_SetDVRConfig(userId, NET_DVR_SET_PTZPOS, channelNum, point, m_ptzPosCurrent.size()); |
| | | boolean bool = hCNetSDK.NET_DVR_SetDVRConfig(userId, NET_DVR_SET_PTZPOS, chanNo, point, m_ptzPosCurrent.size()); |
| | | if (!bool) { |
| | | int code = hCNetSDK.NET_DVR_GetLastError(); |
| | | log.error("设置ptz失败,请稍后重试" + code); |
| | |
| | | * @修改人和其它信息 注意俯仰角度负值需要加上360得到的正值进行设置 |
| | | */ |
| | | @Override |
| | | @SdkOperate |
| | | public boolean setZeroPtz(CameraCmd cmd) { |
| | | String cameraId = cmd.getCameraId(); |
| | | Integer channelNum = cmd.getChanNo(); |
| | |
| | | * @return |
| | | */ |
| | | public static String getKeyByMinValue(Map<String, Double> map) { |
| | | if (map == null) return null; |
| | | if (map == null||map.size()==0) return null; |
| | | List<Map.Entry<String, Double>> list = new ArrayList(map.entrySet()); |
| | | Collections.sort(list, (o1, o2) -> (o1.getValue().intValue() - o2.getValue().intValue())); |
| | | String min = list.get(0).getKey(); |
| | |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="guideP1" column="guide_p1"/> |
| | | <result property="guideT1" column="guide_t1"/> |
| | | <result property="guideZ1" column="guide_z1"/> |
| | | <result property="guideP2" column="guide_p2"/> |
| | | <result property="guideT2" column="guide_t2"/> |
| | | <result property="guideZ2" column="guide_z2"/> |
| | | <!-- 子查询,关联 ard_well_guide_camera 表 --> |
| | | <collection property="ardWellGuideCameraList" ofType="java.util.List" select="getArdWellGuideCameraListByWellId" column="id"/> |
| | | </resultMap> |
| | | <select id="getArdWellGuideCameraListByWellId" resultType="ArdWellGuideCamera"> |
| | | SELECT * FROM ard_well_guide_camera WHERE well_id = #{id} |
| | | </select> |
| | | |
| | | <resultMap type="ArdAlarmpointsWell" id="wellResult"> |
| | | <result property="id" column="id"/> |
| | |
| | | c.create_by, |
| | | c.create_time, |
| | | c.update_by, |
| | | c.update_time, |
| | | c.guide_p1, |
| | | c.guide_t1, |
| | | c.guide_z1, |
| | | c.guide_p2, |
| | | c.guide_t2, |
| | | c.guide_z2 |
| | | c.update_time |
| | | from ard_alarmpoints_well c |
| | | left join sys_dept d on d.dept_id = c.dept_id |
| | | left join sys_user u on u.user_id = c.user_id |
| | |
| | | |
| | | <select id="selectArdAlarmpointsWellById" parameterType="String" resultMap="ArdAlarmpointsWellResult"> |
| | | <include refid="selectArdAlarmpointsWellVo"/> |
| | | where id = #{id} |
| | | where c.id = #{id} |
| | | </select> |
| | | <select id="selectArdAlarmpointsWellByWellId" parameterType="String" resultMap="ArdAlarmpointsWellResult"> |
| | | <include refid="selectArdAlarmpointsWellVo"/> |
| | |
| | | </foreach> |
| | | </delete> |
| | | <select id="checkWellIdExists" resultType="ArdAlarmpointsWell"> |
| | | SELECT * FROM ard_alarmpoints_well WHERE well_id = #{wellId} limit 1 |
| | | SELECT * |
| | | FROM ard_alarmpoints_well |
| | | WHERE well_id = #{wellId} limit 1 |
| | | </select> |
| | | |
| | | <select id="wellByPlanId" parameterType="String" resultMap="wellResult"> |
| | | select ard_app_patrolpoint.alarmpoints_id as id,ard_alarmpoints_well.well_id, ard_app_patrolpoint."type",ard_alarmpoints_well.longitude,ard_alarmpoints_well.latitude from ard_alarmpoints_well LEFT JOIN ard_app_patrolpoint on ard_app_patrolpoint.alarmpoints_id = ard_alarmpoints_well.id where ard_alarmpoints_well.id in (select alarmpoints_id from ard_app_patrolpoint where patrolplan_id = #{id}) |
| | | GROUP BY ard_app_patrolpoint.alarmpoints_id,ard_alarmpoints_well.well_id,ard_app_patrolpoint."type",ard_alarmpoints_well.longitude,ard_alarmpoints_well.latitude |
| | | select ard_app_patrolpoint.alarmpoints_id as id, |
| | | ard_alarmpoints_well.well_id, |
| | | ard_app_patrolpoint."type", |
| | | ard_alarmpoints_well.longitude, |
| | | ard_alarmpoints_well.latitude |
| | | from ard_alarmpoints_well |
| | | LEFT JOIN ard_app_patrolpoint on ard_app_patrolpoint.alarmpoints_id = ard_alarmpoints_well.id |
| | | where ard_alarmpoints_well.id in (select alarmpoints_id from ard_app_patrolpoint where patrolplan_id = #{id}) |
| | | GROUP BY ard_app_patrolpoint.alarmpoints_id, ard_alarmpoints_well.well_id, ard_app_patrolpoint."type", |
| | | ard_alarmpoints_well.longitude, ard_alarmpoints_well.latitude |
| | | </select> |
| | | |
| | | <select id="wellListDept" parameterType="List" resultType="com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWellDeptVo"> |
| | | <select id="wellListDept" parameterType="List" |
| | | resultType="com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWellDeptVo"> |
| | | Select well.id,well.well_id,well.well_number,well.oil_production,well.well_block,well.production_date, |
| | | well.displacement_mode,well.surrounding_environment,well.well_type,well.installed_load,well.metering_station, |
| | | well.transfer_station,well.dehydration_station,well.run_status,well.longitude,well.latitude,well.altitude,well.dept_id, |
| 对比新文件 |
| | |
| | | <?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.well.mapper.ArdWellGuideCameraMapper"> |
| | | |
| | | <resultMap type="ArdWellGuideCamera" id="ArdWellGuideCameraResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="cameraId" column="camera_id" /> |
| | | <result property="p1" column="p1" /> |
| | | <result property="t1" column="t1" /> |
| | | <result property="z1" column="z1" /> |
| | | <result property="p2" column="p2" /> |
| | | <result property="t2" column="t2" /> |
| | | <result property="z2" column="z2" /> |
| | | <result property="wellId" column="well_id" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectArdWellGuideCameraVo"> |
| | | select id, camera_id, p1, t1, z1, p2, t2, z2, well_id from ard_well_guide_camera |
| | | </sql> |
| | | |
| | | <select id="selectArdWellGuideCameraList" parameterType="ArdWellGuideCamera" resultMap="ArdWellGuideCameraResult"> |
| | | <include refid="selectArdWellGuideCameraVo"/> |
| | | <where> |
| | | <if test="cameraId != null and cameraId != ''"> and camera_id = #{cameraId}</if> |
| | | <if test="p1 != null "> and p1 = #{p1}</if> |
| | | <if test="t1 != null "> and t1 = #{t1}</if> |
| | | <if test="z1 != null "> and z1 = #{z1}</if> |
| | | <if test="p2 != null "> and p2 = #{p2}</if> |
| | | <if test="t2 != null "> and t2 = #{t2}</if> |
| | | <if test="z2 != null "> and z2 = #{z2}</if> |
| | | <if test="wellId != null and wellId != ''"> and well_id = #{wellId}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectArdWellGuideCameraById" parameterType="String" resultMap="ArdWellGuideCameraResult"> |
| | | <include refid="selectArdWellGuideCameraVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertArdWellGuideCamera" parameterType="ArdWellGuideCamera"> |
| | | insert into ard_well_guide_camera |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="cameraId != null">camera_id,</if> |
| | | <if test="p1 != null">p1,</if> |
| | | <if test="t1 != null">t1,</if> |
| | | <if test="z1 != null">z1,</if> |
| | | <if test="p2 != null">p2,</if> |
| | | <if test="t2 != null">t2,</if> |
| | | <if test="z2 != null">z2,</if> |
| | | <if test="wellId != null">well_id,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="cameraId != null">#{cameraId},</if> |
| | | <if test="p1 != null">#{p1},</if> |
| | | <if test="t1 != null">#{t1},</if> |
| | | <if test="z1 != null">#{z1},</if> |
| | | <if test="p2 != null">#{p2},</if> |
| | | <if test="t2 != null">#{t2},</if> |
| | | <if test="z2 != null">#{z2},</if> |
| | | <if test="wellId != null">#{wellId},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateArdWellGuideCamera" parameterType="ArdWellGuideCamera"> |
| | | update ard_well_guide_camera |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="cameraId != null">camera_id = #{cameraId},</if> |
| | | <if test="p1 != null">p1 = #{p1},</if> |
| | | <if test="t1 != null">t1 = #{t1},</if> |
| | | <if test="z1 != null">z1 = #{z1},</if> |
| | | <if test="p2 != null">p2 = #{p2},</if> |
| | | <if test="t2 != null">t2 = #{t2},</if> |
| | | <if test="z2 != null">z2 = #{z2},</if> |
| | | <if test="wellId != null">well_id = #{wellId},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteArdWellGuideCameraById" parameterType="String"> |
| | | delete from ard_well_guide_camera where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteArdWellGuideCameraByIds" parameterType="String"> |
| | | delete from ard_well_guide_camera where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
| | |
| | | |
| | | set JAVA_OPTS=-Xms256m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m |
| | | |
| | | java -Dloader.path="jarLib/" -jar %JAVA_OPTS% ruoyi-admin.jar |
| | | java -jar %JAVA_OPTS% ruoyi-admin.jar |
| | | |
| | | cd bin |
| | | pause |
| | |
| | | dic.data.cameras.priority.sys.radar.move=sys_radar_move |
| | | dic.data.cameras.priority.sys.radar.fire=sys_radar_fire |
| | | dic.data.cameras.priority.sys.radar.force=sys_radar_force |
| | | dic.data.cameras.priority.sys.manual.inspection=sys_manual_inspection |
| | | dic.data.cameras.priority.sys.auto.inspection=sys_auto_inspection |
| | | dic.data.cameras.priority.sys.patrol.inspection=sys_patrol_inspect |
| | | |
| | | dic.data.inspect.mode.auto=\u81EA\u52A8 |
| | | dic.data.inspect.mode.manual=\u624B\u52A8 |
| | |
| | | dic.data.cameras.priority.sys.radar.move=sys_radar_move |
| | | dic.data.cameras.priority.sys.radar.fire=sys_radar_fire |
| | | dic.data.cameras.priority.sys.radar.force=sys_radar_force |
| | | dic.data.cameras.priority.sys.manual.inspection=sys_manual_inspection |
| | | dic.data.cameras.priority.sys.auto.inspection=sys_auto_inspection |
| | | dic.data.cameras.priority.sys.patrol.inspection=sys_patrol_inspect |
| | | |
| | | dic.data.inspect.mode.auto=auto |
| | | dic.data.inspect.mode.manual=manual |
| | |
| | | dic.data.cameras.priority.sys.radar.move=sys_radar_move |
| | | dic.data.cameras.priority.sys.radar.fire=sys_radar_fire |
| | | dic.data.cameras.priority.sys.radar.force=sys_radar_force |
| | | dic.data.cameras.priority.sys.manual.inspection=sys_manual_inspection |
| | | dic.data.cameras.priority.sys.auto.inspection=sys_auto_inspection |
| | | dic.data.cameras.priority.sys.patrol.inspection=sys_patrol_inspect |
| | | |
| | | dic.data.inspect.mode.auto=\u81EA\u52A8 |
| | | dic.data.inspect.mode.manual=\u624B\u52A8 |
| | |
| | | public static String YYYY_MM_DD = "yyyy-MM-dd"; |
| | | |
| | | public static String YYYYMMDDHHMMSS = "yyyyMMddHHmmss"; |
| | | |
| | | public static String YYYYMMDD = "yyyyMMdd"; |
| | | public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss"; |
| | | public static String YYYY_MM_DD_HH_MM_SS_MS = "yyyy-MM-dd HH:mm:ss.SSS"; |
| | | public static String HH_MM_SS = "HH:mm:ss"; |
| | |
| | | public static final String dateTimeNow() { |
| | | return dateTimeNow(YYYYMMDDHHMMSS); |
| | | } |
| | | |
| | | public static final String getDateYYYYMMDD() { |
| | | return dateTimeNow(YYYYMMDD); |
| | | } |
| | | public static final String dateTimeNowMS() |
| | | { |
| | | return dateTimeNow(YYYY_MM_DD_HH_MM_SS_MS); |