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:
@@ -19,6 +19,7 @@ import com.jsowell.common.enums.ykc.PayModeEnum;
|
||||
import com.jsowell.common.enums.ykc.PileConnectorDataBaseStatusEnum;
|
||||
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
||||
import com.jsowell.common.enums.ykc.ScenarioEnum;
|
||||
import com.jsowell.common.enums.ykc.StartTypeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.common.util.SecurityUtils;
|
||||
@@ -287,8 +288,18 @@ public class OrderService {
|
||||
orderInfo.setPayTime(new Date());
|
||||
orderBasicInfoService.updateOrderBasicInfo(orderInfo);
|
||||
|
||||
String pileSn = orderInfo.getPileSn();
|
||||
if (StringUtils.equals(orderInfo.getStartType(), StartTypeEnum.NOW.getValue())) {
|
||||
startCharging(orderInfo);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动充电
|
||||
* @param orderInfo
|
||||
*/
|
||||
public void startCharging(OrderBasicInfo orderInfo) {
|
||||
String pileSn = orderInfo.getPileSn();
|
||||
// 发送启动充电指令前,再次下发计费模板
|
||||
BillingTemplateVO billingTemplateVO = pileBillingTemplateService.selectBillingTemplateDetailByPileSn(pileSn);
|
||||
if (billingTemplateVO != null) {
|
||||
@@ -296,7 +307,7 @@ public class OrderService {
|
||||
}
|
||||
|
||||
// 发送启动指令
|
||||
pileRemoteService.remoteStartCharging(pileSn, orderInfo.getConnectorCode(), orderInfo.getTransactionCode(), payAmount);
|
||||
pileRemoteService.remoteStartCharging(pileSn, orderInfo.getConnectorCode(), orderInfo.getTransactionCode(), orderInfo.getPayAmount());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user