| | |
| | | } |
| | | |
| | | @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 |
| | |
| | | } |
| | | |
| | | @PostMapping("/shelf/group") |
| | | public R shelfGroup(@RequestParam(required = false) Integer row, @RequestParam(required = false) Integer bay) { |
| | | if (null == row || null == bay) { |
| | | public R shelfGroup(@RequestParam(required = false) Integer rowNo, |
| | | @RequestParam(required = false) Integer bayNo) { |
| | | if (null == rowNo || null == bayNo) { |
| | | return R.error(); |
| | | } |
| | | List<Loc> locList = locService.list(new LambdaQueryWrapper<Loc>().eq(Loc::getRow, row).eq(Loc::getBay, bay).orderByAsc(Loc::getLev)); |
| | | List<Loc> locList = locService.list(new LambdaQueryWrapper<Loc>() |
| | | .eq(Loc::getRowNo, rowNo) |
| | | .eq(Loc::getBayNo, bayNo) |
| | | .orderByAsc(Loc::getLevNo)); |
| | | return R.ok().add(locList); |
| | | } |
| | | |
| | |
| | | @GetMapping("/area/get") |
| | | public R areaGet(@RequestParam Long areaId) { |
| | | Area area = areaService.getById(areaId); |
| | | return R.ok().add(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(); |
| | | } |
| | | |
| | | } |