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