| | |
| | | vo.setAgvNo(agv.getUuid()); |
| | | vo.setCode(code.getData()); |
| | | vo.setDirection(agvDetail.getAgvAngle()); |
| | | vo.setBackpack(GsonUtils.fromJson(agvDetail.getBackpack(), List.class)); |
| | | vo.setBackpack(GsonUtils.fromJsonToList(agvDetail.getBackpack(), BackpackDto.class)); |
| | | vo.setBattery(agvDetail.getSoc()); |
| | | agvVos.add(vo); |
| | | } |
| | | |
| | | return agvVos; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | List<BackpackDto> backpackDtoList = new ArrayList<>(); |
| | | backpackDtoList.add(new BackpackDto(1, true)); |
| | | backpackDtoList.add(new BackpackDto(2, true)); |
| | | backpackDtoList.add(new BackpackDto(3, false)); |
| | | backpackDtoList.add(new BackpackDto(4, false)); |
| | | backpackDtoList.add(new BackpackDto(5, false)); |
| | | backpackDtoList.add(new BackpackDto(6, false)); |
| | | backpackDtoList.add(new BackpackDto(7, false)); |
| | | System.out.println(GsonUtils.toJson(backpackDtoList)); |
| | | } |
| | | |
| | | } |