update 启动预约订单

This commit is contained in:
2023-03-25 11:10:15 +08:00
parent a624d492ea
commit e5eafef8db
7 changed files with 74 additions and 10 deletions

View File

@@ -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());
}
/**