@@ -321,6 +321,10 @@ public class ChargeServiceImpl implements ChargeService {
}
if (isBooking) {
+ // 设备状态必须为插枪才可以预约
+ if (KymCache.INSTANCE.getConnectorStatus(connectorId) != EquipmentInfo.SERVICE_STATUS_已连接) {
+ throw new BusinessException("设备状态异常");
+ }
// 预约时间不能超过未来24H
if (TimeUnit.SECONDS.convert(Duration.between(LocalDateTime.now(), startTime)) > 3600 * 24) {
throw new BusinessException("预约充电启动时间不能超过未来24小时");