| | |
| | | private ConfigInfo configInfo; |
| | | GeometryFactory geometryFactory; |
| | | WKTReader reader; |
| | | |
| | | |
| | | public DetectController() { |
| | | this.geometryFactory = new GeometryFactory(); |
| | | this.reader = new WKTReader(this.geometryFactory); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/getAlarmInfo" }, method = { RequestMethod.POST }) |
| | | @ApiOperation("实时判断电子围栏和人员定位的位置关系并存储预警信息") |
| | | public void getAlarmInfo() { |
| | | this.schedulerTask.getInfo(); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/saveFixedFence" }, method = { RequestMethod.POST }) |
| | | @ApiOperation("保存固定电子围栏信息以及返回围栏重叠信息") |
| | | @ResponseBody |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/saveTempFence" }, method = { RequestMethod.POST }) |
| | | @ApiOperation("保存临时电子围栏信息以及返回围栏重叠信息") |
| | | @ResponseBody |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/getRoute" }, method = { RequestMethod.POST }) |
| | | @ApiImplicitParam(paramType = "query", name = "username", value = "人员姓名", required = true, dataType = "String") |
| | | @ApiOperation("获取人员活动轨迹") |
| | |
| | | final List<String> route = (List<String>)this.detectService.getRoute(username); |
| | | return route.toString(); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/getWifiInfo" }, method = { RequestMethod.POST }) |
| | | @ApiOperation("获取Wifi设备坐标") |
| | | @ResponseBody |
| | |
| | | map.put("data", dtoList); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/getMonitorInfo" }, method = { RequestMethod.POST }) |
| | | @ApiOperation("获取摄像头设备坐标") |
| | | @ResponseBody |
| | |
| | | map.put("data", dtoList); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/getMonitorDeviceInfo" }, method = { RequestMethod.POST }) |
| | | @ApiOperation("获取摄像头设备信息") |
| | | @ResponseBody |
| | |
| | | map.put("data", list); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/getMonitorDeviceInfoById" }, method = { RequestMethod.POST }) |
| | | @ApiOperation("通过ID获取摄像头设备信息") |
| | | @ResponseBody |
| | |
| | | map.put("data", list); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/getDoorAccessInfo" }, method = { RequestMethod.POST }) |
| | | @ApiOperation("获取门禁设备坐标") |
| | | @ResponseBody |
| | |
| | | map.put("data", list); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/getEnabledFenceInfo" }, method = { RequestMethod.POST }) |
| | | @ApiOperation("获取有效的电子围栏信息") |
| | | @ResponseBody |
| | |
| | | map.put("data", list); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/getFixedFenceInfo" }, method = { RequestMethod.POST }) |
| | | @ApiOperation("获取固定的电子围栏信息") |
| | | @ResponseBody |
| | |
| | | map.put("data", list); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/getFenceInfoById" }, method = { RequestMethod.POST }) |
| | | @ApiImplicitParam(paramType = "query", name = "workId", value = "工作票ID", required = true, dataType = "String") |
| | | @ApiOperation("根据工作票ID获取电子围栏信息") |
| | |
| | | map.put("data", list); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/updateFenceInfo" }, method = { RequestMethod.POST }) |
| | | @ApiImplicitParams({ @ApiImplicitParam(paramType = "query", name = "fname", value = "电子围栏名称", required = false, dataType = "String"), @ApiImplicitParam(paramType = "query", name = "workId", value = "工作票ID", required = true, dataType = "String"), @ApiImplicitParam(paramType = "query", name = "workLeader", value = "工作票负责人", required = false, dataType = "String"), @ApiImplicitParam(paramType = "query", name = "starttime", value = "电子围栏生效时间", required = false, dataType = "String"), @ApiImplicitParam(paramType = "query", name = "disabledtime", value = "电子围栏失效时间", required = false, dataType = "String") }) |
| | | @ApiOperation("更新电子围栏信息") |
| | |
| | | result.setMessage("输入的围栏相关信息有误 更新失败"); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/deleteFenceById" }, method = { RequestMethod.POST }) |
| | | @ApiImplicitParam(paramType = "query", name = "workId", value = "工作票ID", required = true, dataType = "String") |
| | | @ApiOperation("根据工作票ID删除电子围栏信息") |
| | |
| | | result.setMessage("删除失败"); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/deleteFence" }, method = { RequestMethod.POST }) |
| | | @ApiOperation("删除所有电子围栏信息") |
| | | @ResponseBody |
| | |
| | | result.setMessage("删除失败"); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/getDeviceInfo" }, method = { RequestMethod.POST }) |
| | | @ApiOperation("获取设备的相关信息") |
| | | @ResponseBody |
| | |
| | | map.put("list", list); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/getDeviceInfoById" }, method = { RequestMethod.GET }) |
| | | @ApiOperation("根据KKS编码获取设备的相关信息") |
| | | @ResponseBody |
| | |
| | | result.setMessage("输入的设备ID不存在 无法查询相应的数据"); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/selectFencePersonRelByworkid" }, method = { RequestMethod.GET }) |
| | | @ApiOperation("根据workid获取围栏内的人员信息") |
| | | @ResponseBody |
| | |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/selectFenceAndfixedArea" }, method = { RequestMethod.GET }) |
| | | @ApiOperation("获取围栏和固定区域列表") |
| | | @ResponseBody |
| | |
| | | } |
| | | return fencePositionList; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/saveFence_yq" }, method = { RequestMethod.POST }) |
| | | @ApiOperation("保存区域信息") |
| | | @ResponseBody |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/saveFix" }, method = { RequestMethod.POST }) |
| | | @ApiOperation("保存区域信息") |
| | | @ResponseBody |
| | |
| | | catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | System.out.println(polygon.toString()); |
| | | //System.out.println(polygon.toString()); |
| | | final FencePosition fencePosition = new FencePosition(); |
| | | fencePosition.setFenceposition(polygon.toString()); |
| | | fencePosition.setCreatetime(new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date())); |
| | |
| | | this.detectService.insertPolygon(fencePosition); |
| | | return "ok"; |
| | | } |
| | | |
| | | |
| | | static { |
| | | DetectController.log = LoggerFactory.getLogger((Class)DetectController.class); |
| | | } |