mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-14 23:08:35 +08:00
update
This commit is contained in:
@@ -248,8 +248,8 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
String dataSecretIv = thirdPartySecretInfoVO.getTheirDataSecretIv();
|
String dataSecretIv = thirdPartySecretInfoVO.getTheirDataSecretIv();
|
||||||
String urlAddress = thirdPartySecretInfoVO.getTheirUrlPrefix();
|
String urlAddress = thirdPartySecretInfoVO.getTheirUrlPrefix();
|
||||||
|
|
||||||
if (status.equals("0")){
|
if(Objects.equals(status , PileConnectorDataBaseStatusEnum.OFF_NETWORK.getValue())){
|
||||||
status ="5"; //离网改成255故障
|
status =PileConnectorDataBaseStatusEnum.FAULT.getValue() ; // 离网改成255故障
|
||||||
}
|
}
|
||||||
|
|
||||||
String url = urlAddress + BusinessInformationExchangeEnum.NOTIFICATION_STATION_STATUS.getValue();
|
String url = urlAddress + BusinessInformationExchangeEnum.NOTIFICATION_STATION_STATUS.getValue();
|
||||||
@@ -292,10 +292,11 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
// 其他
|
// 其他
|
||||||
ConnectorStatusInfo connectorStatusInfo = new ConnectorStatusInfo();
|
ConnectorStatusInfo connectorStatusInfo = new ConnectorStatusInfo();
|
||||||
connectorStatusInfo.setConnectorID(connectorInfoVO.getPileConnectorCode());
|
connectorStatusInfo.setConnectorID(connectorInfoVO.getPileConnectorCode());
|
||||||
if (connectorInfoVO.getConnectorStatus().equals("0")){
|
String connectorStatus = connectorInfoVO.getConnectorStatus();
|
||||||
connectorStatusInfo.setStatus(255); //离网改成255故障
|
if (connectorStatus.equals(PileConnectorDataBaseStatusEnum.OFF_NETWORK.getValue())){
|
||||||
|
connectorStatus = PileConnectorDataBaseStatusEnum.FAULT.getValue(); //离网改成255故障
|
||||||
}
|
}
|
||||||
connectorStatusInfo.setStatus(Integer.parseInt(connectorInfoVO.getConnectorStatus()));
|
connectorStatusInfo.setStatus(Integer.parseInt(connectorStatus));
|
||||||
connectorStatusInfos.add(connectorStatusInfo);
|
connectorStatusInfos.add(connectorStatusInfo);
|
||||||
}
|
}
|
||||||
stationStatusInfo.setConnectorStatusInfos(connectorStatusInfos);
|
stationStatusInfo.setConnectorStatusInfos(connectorStatusInfos);
|
||||||
@@ -542,6 +543,10 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
}else {
|
}else {
|
||||||
connectorStatus = Integer.parseInt(status);
|
connectorStatus = Integer.parseInt(status);
|
||||||
}
|
}
|
||||||
|
if(connectorStatus == Integer.parseInt(PileConnectorDataBaseStatusEnum.OFF_NETWORK.getValue())){
|
||||||
|
connectorStatus = Integer.parseInt(PileConnectorDataBaseStatusEnum.FAULT.getValue());
|
||||||
|
}
|
||||||
|
String soc = data.getSOC() == null ? Constants.ZERO : data.getSOC();
|
||||||
BigDecimal totalElectricityAmount = orderDetail.getTotalElectricityAmount() == null ? BigDecimal.ZERO : orderDetail.getTotalElectricityAmount();
|
BigDecimal totalElectricityAmount = orderDetail.getTotalElectricityAmount() == null ? BigDecimal.ZERO : orderDetail.getTotalElectricityAmount();
|
||||||
BigDecimal totalServiceAmount = orderDetail.getTotalServiceAmount() == null ? BigDecimal.ZERO : orderDetail.getTotalServiceAmount();
|
BigDecimal totalServiceAmount = orderDetail.getTotalServiceAmount() == null ? BigDecimal.ZERO : orderDetail.getTotalServiceAmount();
|
||||||
// 拼装联联平台数据
|
// 拼装联联平台数据
|
||||||
@@ -552,7 +557,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
.connectorStatus(connectorStatus) // 枪口状态
|
.connectorStatus(connectorStatus) // 枪口状态
|
||||||
.currentA(new BigDecimal(data.getOutputCurrent())) // 电流
|
.currentA(new BigDecimal(data.getOutputCurrent())) // 电流
|
||||||
.voltageA(new BigDecimal(data.getOutputVoltage())) // 电压
|
.voltageA(new BigDecimal(data.getOutputVoltage())) // 电压
|
||||||
.soc(new BigDecimal(data.getSOC()))
|
.soc(new BigDecimal(soc))
|
||||||
.startTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, orderInfo.getChargeStartTime())) // 开始时间
|
.startTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, orderInfo.getChargeStartTime())) // 开始时间
|
||||||
.endTime(DateUtils.getDateTime()) // 本次采样时间
|
.endTime(DateUtils.getDateTime()) // 本次采样时间
|
||||||
.totalPower(new BigDecimal(data.getChargingDegree()).setScale(2, BigDecimal.ROUND_HALF_UP)) // 累计充电量
|
.totalPower(new BigDecimal(data.getChargingDegree()).setScale(2, BigDecimal.ROUND_HALF_UP)) // 累计充电量
|
||||||
@@ -599,8 +604,8 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
|
|
||||||
Integer orderStatus = OrderStatusEnum.convertToNewStatus(orderInfo.getOrderStatus());
|
Integer orderStatus = OrderStatusEnum.convertToNewStatus(orderInfo.getOrderStatus());
|
||||||
Integer connectorStatus = info.getStatus();
|
Integer connectorStatus = info.getStatus();
|
||||||
if (connectorStatus ==0) {
|
if(connectorStatus == Integer.parseInt(PileConnectorDataBaseStatusEnum.OFF_NETWORK.getValue())){
|
||||||
connectorStatus = 5;
|
connectorStatus = Integer.parseInt(PileConnectorDataBaseStatusEnum.FAULT.getValue());
|
||||||
}
|
}
|
||||||
QueryChargingStatusVO vo = QueryChargingStatusVO.builder()
|
QueryChargingStatusVO vo = QueryChargingStatusVO.builder()
|
||||||
.startChargeSeq(orderInfo.getOrderCode()) // 订单号
|
.startChargeSeq(orderInfo.getOrderCode()) // 订单号
|
||||||
@@ -640,7 +645,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
QueryStopChargeVO vo = new QueryStopChargeVO();
|
QueryStopChargeVO vo = new QueryStopChargeVO();
|
||||||
String orderCode = dto.getStartChargeSeq();
|
String orderCode = dto.getStartChargeSeq();
|
||||||
|
|
||||||
ThirdPartySecretInfoVO wangKuaiDianPlatformSecretInfo = getChangZhouSecretInfo();
|
ThirdPartySecretInfoVO thirdPartySecretInfoVO = getChangZhouSecretInfo();
|
||||||
// 根据订单号查询订单信息
|
// 根据订单号查询订单信息
|
||||||
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
||||||
if (orderInfo == null) {
|
if (orderInfo == null) {
|
||||||
@@ -657,7 +662,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
vo.setFailReason(0);
|
vo.setFailReason(0);
|
||||||
vo.setStartChargeSeq(orderCode);
|
vo.setStartChargeSeq(orderCode);
|
||||||
log.info("返回参数:{}", JSON.toJSONString(vo));
|
log.info("返回参数:{}", JSON.toJSONString(vo));
|
||||||
return ThirdPartyPlatformUtils.generateResultMap(vo, wangKuaiDianPlatformSecretInfo);
|
return ThirdPartyPlatformUtils.generateResultMap(vo, thirdPartySecretInfoVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user