|
|
@@ -233,8 +233,10 @@ public class OrderInitManager extends AbstractOrderManager<OrderInitRequest> { |
|
|
|
if (product == null || promotion == null) { |
|
|
|
throw newBusinessException("当前选择的产品不存在"); |
|
|
|
} |
|
|
|
String vehicleRegion = request.getVehiclePlate().substring(0, 1); |
|
|
|
throwBisExceptionOn(hasText(product.getVehiclePalce()) && !product.getVehiclePalce().contains(vehicleRegion), "超出当前产品的车籍范围"); |
|
|
|
if (hasText(product.getVehiclePalce())) { |
|
|
|
String vehicleRegion = request.getVehiclePlate().substring(0, 1); |
|
|
|
throwBisExceptionOn(hasText(product.getVehiclePalce()) && !product.getVehiclePalce().contains(vehicleRegion), "超出当前产品的车籍范围"); |
|
|
|
} |
|
|
|
throwBisExceptionOn(!EnableStatus.ENABLE.equals(product.getStatus()) || !EnableStatus.ENABLE.equals(promotion.getStatus()), "当前选择的产品未上架"); |
|
|
|
throwBisExceptionOn(!product.getVanType().contains(request.getVanType().toString()), "当前选择的产品与车辆类型不符"); |
|
|
|
throwBisExceptionOn(!request.getOrgCode().equals(MyFinals.QTZL_AGENCY_ID) && (!request.getAgentId().equals(request.getOrgCode()) |