| | |
| | | /** |
| | | * 电子围栏详情 |
| | | */ |
| | | @GetMapping("/queryById") |
| | | @PostMapping("/queryById") |
| | | @ApiOperation(value = "电子围栏详情") |
| | | public R<ElectronicFenceDetailVo> queryById(Long id) { |
| | | public R<ElectronicFenceDetailVo> queryById(@RequestParam("id")Long id) { |
| | | ElectronicFenceDetailVo res = new ElectronicFenceDetailVo(); |
| | | XpElectronicFence electronicFence = xpElectronicFenceService.getById(id); |
| | | if (electronicFence == null) { |
| | |
| | | /** |
| | | * 复制电子围栏 |
| | | */ |
| | | @GetMapping("/copy") |
| | | @PostMapping("/copy") |
| | | @ApiOperation(value = "复制电子围栏") |
| | | @Transactional |
| | | public R copy(Integer id) { |
| | | public R<Long> copy(@RequestParam("id") Integer id) { |
| | | XpElectronicFence electronicFence = xpElectronicFenceService.getById(id); |
| | | if (electronicFence.getStatus()==2){ |
| | | throw new ServiceException( |
| | |
| | | area.setAreaName("副本_"+area.getAreaName()); |
| | | } |
| | | xpElectronicFenceAreaService.saveBatch(electronicFenceAreaList); |
| | | return R.ok(); |
| | | return R.ok(electronicFence.getId()); |
| | | } |
| | | |
| | | /** |