| | |
| | | StationsStatusReq stationsStatusReq = new StationsStatusReq(); |
| | | stationsStatusReq.setOperatorId("91510903906171535D"); |
| | | stationsStatusReq.setSerAreaCode(site.getSerAreaCode()); |
| | | stationsStatusReq.setStationId(site.getId().toString()); |
| | | stationsStatusReq.setStationId(site.getCode()); |
| | | List<StationStatusInfo> stationStausInfos = new ArrayList<>(); |
| | | stationStausInfos.add(buildStationStaus(site)); |
| | | stationsStatusReq.setItemSize(stationStausInfos.size()); |
| | |
| | | |
| | | private StationStatusInfo buildStationStaus(Site site){ |
| | | StationStatusInfo stationStausInfo = new StationStatusInfo(); |
| | | stationStausInfo.setStationId(site.getId().toString()); |
| | | stationStausInfo.setStationId(site.getCode()); |
| | | stationStausInfo.setConnectorStatusInfos(buildConnectorStatus(site)); |
| | | return stationStausInfo; |
| | | } |
| | |
| | | return new ArrayList<ConnectorStatusInfo>(){{ |
| | | for (TChargingGun chargingGun : list) { |
| | | ConnectorStatusInfo connectorStatusInfo = new ConnectorStatusInfo(); |
| | | connectorStatusInfo.setConnectorId(chargingGun.getId().toString()); |
| | | connectorStatusInfo.setConnectorId(chargingGun.getCode()); |
| | | switch (chargingGun.getStatus()){ |
| | | case 1: |
| | | connectorStatusInfo.setStatus(0); |