mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-26 22:15:06 +08:00
新增 南瑞相关接口
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
package com.jsowell.thirdparty.nanrui.service;
|
||||
|
||||
import com.jsowell.common.core.domain.ykc.RealTimeMonitorData;
|
||||
import com.jsowell.pile.domain.nanrui.NROrderInfo;
|
||||
import com.jsowell.pile.dto.QueryOrderDTO;
|
||||
import com.jsowell.pile.dto.QueryStationInfoDTO;
|
||||
import com.jsowell.pile.dto.nanrui.NRQueryOrderDTO;
|
||||
import com.jsowell.thirdparty.nanrui.domain.NRStationStatusInfo;
|
||||
|
||||
import java.text.ParseException;
|
||||
@@ -52,8 +55,26 @@ public interface NRService {
|
||||
|
||||
/**
|
||||
* 查询设备接口状态
|
||||
* 此接口用于批量查询设备实时状态
|
||||
* 由充电运营商方实现此接口,省、市两级监管平台调用。
|
||||
* @param stationIds
|
||||
* @return
|
||||
*/
|
||||
String query_station_status(List<String> stationIds);
|
||||
Map<String, Object> query_station_status(List<String> stationIds);
|
||||
|
||||
|
||||
/**
|
||||
* 充电电量信息推送
|
||||
* 当运营商平台完成一次充电时,将充电电量信息推送至省、市两级监管平台
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
String notification_orderInfo(String orderCode);
|
||||
|
||||
/**
|
||||
* 此接口用于批量查询时间区段内交易记录
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<NROrderInfo> query_order_info(NRQueryOrderDTO dto);
|
||||
}
|
||||
@@ -11,16 +11,15 @@ import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.common.util.PageUtils;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.*;
|
||||
import com.jsowell.pile.domain.nanrui.NROrderInfo;
|
||||
import com.jsowell.pile.dto.QueryConnectorListDTO;
|
||||
import com.jsowell.pile.dto.QueryStationInfoDTO;
|
||||
import com.jsowell.pile.dto.nanrui.NRQueryOrderDTO;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.vo.base.ConnectorInfoVO;
|
||||
import com.jsowell.pile.vo.uniapp.CurrentTimePriceDetails;
|
||||
import com.jsowell.pile.vo.web.PileConnectorInfoVO;
|
||||
import com.jsowell.pile.vo.web.PileModelInfoVO;
|
||||
import com.jsowell.pile.vo.web.PileStationVO;
|
||||
import com.jsowell.thirdparty.lianlian.domain.ConnectorInfo;
|
||||
import com.jsowell.thirdparty.lianlian.domain.StationInfo;
|
||||
import com.jsowell.thirdparty.nanrui.domain.*;
|
||||
import com.jsowell.thirdparty.nanrui.service.NRService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
@@ -266,7 +265,7 @@ public class NRServiceImpl implements NRService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String query_station_status(List<String> stationIds) {
|
||||
public Map<String, Object> query_station_status(List<String> stationIds) {
|
||||
List<NRStationStatusInfo> resultList = new ArrayList<>();
|
||||
|
||||
// 将 stationIdList 转换成 List<Long>
|
||||
@@ -279,7 +278,7 @@ public class NRServiceImpl implements NRService {
|
||||
.build();
|
||||
List<PileConnectorInfoVO> connectorInfoVOS = pileConnectorInfoService.getConnectorInfoListByParams(dto);
|
||||
if (CollectionUtils.isEmpty(connectorInfoVOS)) {
|
||||
return null;
|
||||
return new LinkedHashMap<>();
|
||||
}
|
||||
// 根据stationId分组
|
||||
Map<String, List<PileConnectorInfoVO>> collect = connectorInfoVOS.stream()
|
||||
@@ -327,11 +326,29 @@ public class NRServiceImpl implements NRService {
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("StationStatusInfos", resultList);
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String notification_orderInfo(String orderCode) {
|
||||
// 根据订单号查询订单信息
|
||||
NROrderInfo nrOrderInfo = orderBasicInfoService.getNROrderInfoByOrderCode(orderCode);
|
||||
// TODO 发送请求
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("OrderInfo", nrOrderInfo);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<NROrderInfo> query_order_info(NRQueryOrderDTO dto) {
|
||||
List<NROrderInfo> nrOrderInfos = orderBasicInfoService.getNROrderInfos(dto);
|
||||
if (CollectionUtils.isEmpty(nrOrderInfos)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return nrOrderInfos;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String chargingTime = "30";
|
||||
Date beginTime = DateUtils.addMinute(new Date(), -Integer.parseInt(chargingTime));
|
||||
|
||||
Reference in New Issue
Block a user