| | |
| | | return R.ok(basMapService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @GetMapping("/basMap/payload/{id}/auth") |
| | | @ManagerAuth |
| | | public R getPayload(@PathVariable("id") Integer id) { |
| | | BasMap basMap = basMapService.selectPayloadById(id); |
| | | if (basMap == null) { |
| | | return R.error("地图不存在"); |
| | | } |
| | | return R.ok(basMap); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basMap/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | |
| | | allLike(BasMap.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(true, "asc".equals(orderByType), humpToLine(orderByField));} |
| | | wrapper.orderBy(true, true, "lev"); |
| | | return R.ok(basMapService.page(new Page<>(curr, limit), wrapper)); |
| | | return R.ok(basMapService.pageLight(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){ |
| | |
| | | return R.ok().add(levList); |
| | | } |
| | | |
| | | @PostMapping("/basMap/syncLocMast/auth") |
| | | @ManagerAuth(memo = "同步库位号和实际坐标") |
| | | public R syncLocMast(@RequestParam Integer lev) { |
| | | int updatedCount = basMapService.syncLocMastByMap(lev); |
| | | return R.ok("第" + lev + "层locType同步完成,更新" + updatedCount + "条库位数据"); |
| | | } |
| | | |
| | | @PostMapping("/basMap/crn/upload") |
| | | public R uploadExcel(@RequestParam("file") MultipartFile file) { |
| | | File tempFile = null; |