| | |
| | | |
| | | import annotation.Log; |
| | | import com.ycl.platform.domain.entity.TMonitor; |
| | | import com.ycl.platform.domain.vo.TMonitorVO; |
| | | import com.ycl.platform.service.ITMonitorService; |
| | | import com.ycl.system.AjaxResult; |
| | | import com.ycl.system.controller.BaseController; |
| | |
| | | /** |
| | | * 查询设备资产列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:monitor:list')") |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(TMonitor tMonitor) |
| | | public TableDataInfo list(TMonitorVO tMonitor) |
| | | { |
| | | startPage(); |
| | | List<TMonitor> list = tMonitorService.selectTMonitorList(tMonitor); |
| | | List<TMonitorVO> list = tMonitorService.selectTMonitorList(tMonitor); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导出设备资产列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:monitor:export')") |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:export')") |
| | | @Log(title = "设备资产", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, TMonitor tMonitor) |
| | | public void export(HttpServletResponse response, TMonitorVO tMonitor) |
| | | { |
| | | List<TMonitor> list = tMonitorService.selectTMonitorList(tMonitor); |
| | | ExcelUtil<TMonitor> util = new ExcelUtil<TMonitor>(TMonitor.class); |
| | | List<TMonitorVO> list = tMonitorService.selectTMonitorList(tMonitor); |
| | | ExcelUtil<TMonitorVO> util = new ExcelUtil<TMonitorVO>(TMonitorVO.class); |
| | | util.exportExcel(response, list, "设备资产数据"); |
| | | } |
| | | |
| | | /** |
| | | * 获取设备资产详细信息 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:monitor:query')") |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | |
| | | /** |
| | | * 新增设备资产 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:monitor:add')") |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:add')") |
| | | @Log(title = "设备资产", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody TMonitor tMonitor) |
| | |
| | | /** |
| | | * 修改设备资产 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:monitor:edit')") |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:edit')") |
| | | @Log(title = "设备资产", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody TMonitor tMonitor) |
| | |
| | | /** |
| | | * 删除设备资产 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:monitor:remove')") |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:remove')") |
| | | @Log(title = "设备资产", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(tMonitorService.deleteTMonitorByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 获取视频设备统计数 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:list')") |
| | | @GetMapping("/getVideoCount/{cameraFunType}") |
| | | public AjaxResult getVideoCount(@PathVariable String cameraFunType) |
| | | { |
| | | TMonitor tMonitor = new TMonitor(); |
| | | tMonitor.setCameraFunType(cameraFunType); |
| | | return success(tMonitorService.getVideoCount(tMonitor)); |
| | | } |
| | | |
| | | /** |
| | | * 获取异常恢复视频设备统计数 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:monitor:list')") |
| | | @GetMapping("/recoveryException") |
| | | public AjaxResult recoveryException() |
| | | { |
| | | return success(tMonitorService.recoveryException()); |
| | | } |
| | | |
| | | |
| | | } |