| | |
| | | } |
| | | station.setAreaIds(longArray); |
| | | } |
| | | if (!Cools.isEmpty(station.getContainerType())) { |
| | | String content = station.getContainerType().substring(1, station.getContainerType().length() - 1); |
| | | String[] parts = content.split(","); |
| | | Long[] longArray = new Long[parts.length]; |
| | | for (int i = 0; i < parts.length; i++) { |
| | | longArray[i] = Long.parseLong(parts[i].trim()); |
| | | } |
| | | station.setContainerTypes(longArray); |
| | | } |
| | | |
| | | } |
| | | return R.ok().add(page); |
| | |
| | | @PreAuthorize("hasAuthority('manager:basStation:list')") |
| | | @GetMapping("/basStation/{id}") |
| | | public R get(@PathVariable("id") Long id) { |
| | | BasStation basStation = basStationService.getById(id); |
| | | BasStation station = basStationService.getById(id); |
| | | |
| | | |
| | | String content = basStation.getCrossZoneArea().substring(1, basStation.getCrossZoneArea().length() - 1); |
| | | if (!Cools.isEmpty(station.getCrossZoneArea())) { |
| | | String content = station.getCrossZoneArea().substring(1, station.getCrossZoneArea().length() - 1); |
| | | String[] parts = content.split(","); |
| | | Long[] longArray = new Long[parts.length]; |
| | | for (int i = 0; i < parts.length; i++) { |
| | | longArray[i] = Long.parseLong(parts[i].trim()); |
| | | } |
| | | basStation.setAreaIds(longArray); |
| | | station.setAreaIds(longArray); |
| | | } |
| | | if (!Cools.isEmpty(station.getContainerType())) { |
| | | String content = station.getContainerType().substring(1, station.getContainerType().length() - 1); |
| | | String[] parts = content.split(","); |
| | | Long[] longArray = new Long[parts.length]; |
| | | for (int i = 0; i < parts.length; i++) { |
| | | longArray[i] = Long.parseLong(parts[i].trim()); |
| | | } |
| | | station.setContainerTypes(longArray); |
| | | } |
| | | |
| | | return R.ok().add(basStation); |
| | | return R.ok().add(station); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:basStation:save')") |
| | |
| | | if (null !=basStation.getAreaIds()){ |
| | | basStation.setCrossZoneArea(Arrays.toString(basStation.getAreaIds())); |
| | | } |
| | | if (null !=basStation.getContainerTypes()){ |
| | | basStation.setContainerType(Arrays.toString(basStation.getContainerTypes())); |
| | | } |
| | | if (!basStationService.save(basStation)) { |
| | | return R.error("保存失败"); |
| | | } |
| | |
| | | if (null !=basStation.getAreaIds()){ |
| | | basStation.setCrossZoneArea(Arrays.toString(basStation.getAreaIds())); |
| | | } |
| | | if (null !=basStation.getContainerTypes()){ |
| | | basStation.setContainerType(Arrays.toString(basStation.getContainerTypes())); |
| | | } |
| | | if (null !=basStation.getUseStatus() && basStation.getUseStatus().equals(StaUseStatusType.TYPE_O.type)){ |
| | | basStation.setBarcode(null); |
| | | } |