mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update 华为Service
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import java.util.List;
|
||||
*/
|
||||
@Data
|
||||
public class ThirdPartyCommonStartChargeDTO {
|
||||
private String orderCode;
|
||||
/**
|
||||
* 第三方平台类型
|
||||
*/
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user