update 华为Service

This commit is contained in:
Lemon
2024-04-03 10:56:06 +08:00
parent e00fedd5dd
commit 2b62f01a38
3 changed files with 9 additions and 7 deletions

View File

@@ -1350,7 +1350,7 @@ public class OrderService {
dto.setStationIds(Lists.newArrayList(stationId));
dto.setPileConnectorCode(orderInfo.getPileConnectorCode());
dto.setThirdPartyType(thirdPartyType);
dto.setOrderCode(orderCode);
String result = commonService.commonQueryStartCharge(dto);
log.info("异步判断是否对接第三方平台 stationId:{}, thirdPartyType:{}, result:{}", stationId, thirdPartyType, result);
}

View File

@@ -13,6 +13,7 @@ import java.util.List;
*/
@Data
public class ThirdPartyCommonStartChargeDTO {
private String orderCode;
/**
* 第三方平台类型
*/

View File

@@ -520,11 +520,11 @@ public class HuaweiServiceV2 {
String requestName = "query_start_charge";
// 生成订单
String orderCode = IdUtils.getOrderCode();
String startChargeSeq = Constants.OPERATORID_JIANG_SU + "_C" + orderCode;
String orderCode = dto.getStartChargeSeq();
// String startChargeSeq = orderCode;
QueryStartChargeDTO startChargeDTO = new QueryStartChargeDTO();
startChargeDTO.setOperatorId(ThirdPartyOperatorIdEnum.HUA_WEI.getOperatorId());
startChargeDTO.setStartChargeSeq(startChargeSeq);
startChargeDTO.setStartChargeSeq(orderCode);
startChargeDTO.setConnectorID(pileConnectorCode);
startChargeDTO.setAccountBalance(chargeAmount);
startChargeDTO.setPayMode(dto.getPayMode());
@@ -536,7 +536,7 @@ public class HuaweiServiceV2 {
}
// 拼装参数
JSONObject jsonObject = new JSONObject();
jsonObject.put("StartChargeSeq", startChargeSeq);
jsonObject.put("StartChargeSeq", orderCode);
jsonObject.put("ConnectorID", pileConnectorCode);
jsonObject.put("MoneyLimit", chargeAmount);
@@ -968,6 +968,7 @@ public class HuaweiServiceV2 {
chargeDTO.setConnectorID(pileConnectorCode);
chargeDTO.setMoneyLimit(chargeAmount);
chargeDTO.setPayMode(payMode);
chargeDTO.setStartChargeSeq(dto.getOrderCode());
QueryStartChargeVO startChargeVO = queryStartCharge(chargeDTO);
if (startChargeVO.getSuccStat() != Constants.zero) {
log.error(label + "请求启动充电 error, {}", startChargeVO.getFailReason());
@@ -977,8 +978,8 @@ public class HuaweiServiceV2 {
// Threads.sleep(5000);
// query_equip_charge_status 查询设备充电状态
QueryChargeStatusVO chargeStatusVO = new QueryChargeStatusVO();
for (int i = 1; i <= 3; i ++) {
// 循环 3每次延时5s查询充电状态
for (int i = 1; i <= 10; i ++) {
// 循环 10每次延时5s查询充电状态
Threads.sleep(5000);
chargeStatusVO = queryChargeStatus(startChargeSeq);
if (chargeStatusVO != null) {