mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update 联联平台查询站点状态接口
This commit is contained in:
@@ -28,16 +28,16 @@ public interface LianLianService {
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> query_stations_info(String operatorId, QueryStationInfoDTO dto);
|
||||
Map<String, String> query_stations_info(QueryStationInfoDTO dto);
|
||||
|
||||
/**
|
||||
* 设备接口状态查询
|
||||
* 此接口用于批量查询设备实时状态
|
||||
*
|
||||
* @param StationIDs
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
LianLianPageResponse query_station_status(List<String> StationIDs);
|
||||
Map<String, String> query_station_status(QueryStationInfoDTO dto);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -211,7 +211,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> query_stations_info(String operatorId, QueryStationInfoDTO dto) {
|
||||
public Map<String, String> query_stations_info(QueryStationInfoDTO dto) {
|
||||
List<StationInfo> resultList = new ArrayList<>();
|
||||
int pageNo = dto.getPageNo() == null ? 1 : dto.getPageNo();
|
||||
int pageSize = dto.getPageSize() == null ? 10 : dto.getPageSize();
|
||||
@@ -222,7 +222,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
// 未查到数据
|
||||
return null;
|
||||
}
|
||||
DockingPlatformConfig configInfo = dockingPlatformConfigService.getInfoByOperatorId(operatorId);
|
||||
DockingPlatformConfig configInfo = dockingPlatformConfigService.getInfoByOperatorId(dto.getOperatorId());
|
||||
if (configInfo == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -295,15 +295,19 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
* 设备接口状态查询
|
||||
* 此接口用于批量查询设备实时状态
|
||||
*
|
||||
* @param StationIDs
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public LianLianPageResponse query_station_status(List<String> StationIDs) {
|
||||
public Map<String, String> query_station_status(QueryStationInfoDTO dto) {
|
||||
List<String> stationIds = dto.getStationIds();
|
||||
List<StationStatusInfo> StationStatusInfos = new ArrayList<>();
|
||||
List<Object> ConnectorStatusInfos = new ArrayList<>();
|
||||
|
||||
for (String stationId : StationIDs) {
|
||||
DockingPlatformConfig configInfo = dockingPlatformConfigService.getInfoByOperatorId(dto.getOperatorId());
|
||||
if (configInfo == null) {
|
||||
return null;
|
||||
}
|
||||
for (String stationId : stationIds) {
|
||||
// 根据站点id查询
|
||||
List<ConnectorInfoVO> list = pileConnectorInfoService.getConnectorListForLianLian(Long.parseLong(stationId));
|
||||
for (ConnectorInfoVO connectorInfoVO : list) {
|
||||
@@ -363,7 +367,19 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
.list(collect)
|
||||
.ItemSize(total)
|
||||
.build();
|
||||
return response;
|
||||
// 加密
|
||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
byte[] encryptText = Cryptos.aesEncrypt(JSONObject.toJSONString(response).getBytes(),
|
||||
configInfo.getOperatorSecret().getBytes(), configInfo.getDataSecretIv().getBytes());
|
||||
String encryptData = Encodes.encodeBase64(encryptText);
|
||||
|
||||
resultMap.put("Data", encryptData);
|
||||
// 生成sig
|
||||
String resultSign = GBSignUtils.sign(resultMap, configInfo.getOperatorSecret());
|
||||
resultMap.put("Sig", resultSign);
|
||||
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user