| | |
| | | return R.ok().add(page); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:warehouseAreas:list')") |
| | | @PostMapping("/basStation/page/v1") |
| | | public R pagev22(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<BasStation, BaseParam> pageParam = new PageParam<>(baseParam, BasStation.class); |
| | | return R.ok().add(basStationService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:basStation:list')") |
| | | @PostMapping("/basStation/list") |
| | | public R list(@RequestBody Map<String, Object> map) { |
| | |
| | | if (null !=basStation.getContainerTypes()){ |
| | | basStation.setContainerType(basStation.getContainerTypes().toString()); |
| | | } |
| | | if (Cools.isEmpty(basStation.getStationAlias())){ |
| | | basStation.setStationAlias(new ArrayList<>()); |
| | | basStation.getStationAlias().add(basStation.getStationName()); |
| | | } else if (!basStation.getStationAlias().contains(basStation.getStationName())){ |
| | | basStation.getStationAlias().add(basStation.getStationName()); |
| | | } |
| | | if (!basStationService.save(basStation)) { |
| | | return R.error("保存失败"); |
| | | } |
| | |
| | | if (null !=basStation.getUseStatus() && basStation.getUseStatus().equals(LocStsType.LOC_STS_TYPE_O.type)){ |
| | | basStation.setBarcode(null); |
| | | } |
| | | if (Cools.isEmpty(basStation.getStationAlias())){ |
| | | basStation.setStationAlias(new ArrayList<>()); |
| | | basStation.getStationAlias().add(basStation.getStationName()); |
| | | } else if (!basStation.getStationAlias().contains(basStation.getStationName())){ |
| | | basStation.getStationAlias().add(basStation.getStationName()); |
| | | } |
| | | if (!basStationService.updateById(basStation)) { |
| | | return R.error("更新失败"); |
| | | } |