| | |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:loc:list')") |
| | | @PostMapping("/config/preferences") |
| | | public R configPreferences(@RequestParam(required = false) Long zoneId, @RequestParam(required = false) Integer floor) { |
| | | Integer dashboardAgvAngleOffsetVal = configService.getVal("dashboardAgvAngleOffsetVal", Integer.class); |
| | | Boolean dashMapMirror = configService.getVal("dashMapMirror", Boolean.class); |
| | | return R.ok().add(Cools |
| | | .add("agvAngleOffsetVal", Optional.ofNullable(dashboardAgvAngleOffsetVal).orElse(0)) |
| | | .add("mapMirror", Optional.ofNullable(dashMapMirror).orElse(Boolean.FALSE)) |
| | | ); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:loc:list')") |
| | | @PostMapping("/data/fetch") |
| | | public R fetch(@RequestParam(required = false) Long zoneId, @RequestParam(required = false) Integer floor) { |
| | | // code |
| | |
| | | @GetMapping("/area/get") |
| | | public R areaGet(@RequestParam Long areaId) { |
| | | Area area = areaService.getById(areaId); |
| | | MapAreaResult areaResult = new MapAreaResult(); |
| | | return R.ok().add(areaResult.sync(area)); |
| | | return R.ok().add(new MapAreaResult().sync(area)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:loc:update')") |
| | | @PostMapping("/area/save") |
| | | @Transactional |
| | | public R save(@RequestBody MapAreaParam param) { |
| | | public R areaSave(@RequestBody MapAreaParam param) { |
| | | return R.ok().add(areaService.saveMapArea(param, getLoginUserId())); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:loc:update')") |
| | | @PostMapping("/area/update") |
| | | public R areaUpdate(@RequestBody MapAreaParam param) { |
| | | return R.ok().add(areaService.modifyMapArea(param, getLoginUserId())); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:loc:remove')") |
| | | @PostMapping("/area/remove") |
| | | public R areaRemove(@RequestBody MapAreaParam param) { |
| | | areaService.removeMapArea(param.getId(), getLoginUserId()); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |