|
|
|
@@ -51,6 +51,10 @@ class CheckDataFormatController extends WebController |
|
|
|
->first(); |
|
|
|
|
|
|
|
if ($relation === null) { |
|
|
|
logger([ |
|
|
|
"shop_id" => $this->sessionUser->shopId(), |
|
|
|
"駐車場管理コード" => $data->駐車場管理コード |
|
|
|
]); |
|
|
|
throw new GeneralErrorMessageException("認証できない駐車場"); |
|
|
|
} |
|
|
|
|
|
|
|
@@ -62,6 +66,10 @@ class CheckDataFormatController extends WebController |
|
|
|
|
|
|
|
|
|
|
|
if ($setting->isEmpty()) { |
|
|
|
logger([ |
|
|
|
"shop_id" => $this->sessionUser->shopId(), |
|
|
|
"駐車場管理コード" => $data->駐車場管理コード |
|
|
|
]); |
|
|
|
throw new GeneralErrorMessageException("認証できるサービス券なし"); |
|
|
|
} |
|
|
|
|
|
|
|
@@ -70,6 +78,10 @@ class CheckDataFormatController extends WebController |
|
|
|
->first(); |
|
|
|
|
|
|
|
if ($parking instanceof Parking === false) { |
|
|
|
logger([ |
|
|
|
"shop_id" => $this->sessionUser->shopId(), |
|
|
|
"駐車場管理コード" => $data->駐車場管理コード |
|
|
|
]); |
|
|
|
throw new GeneralErrorMessageException("存在しない駐車場"); |
|
|
|
} |
|
|
|
|
|
|
|
@@ -86,7 +98,8 @@ class CheckDataFormatController extends WebController |
|
|
|
|
|
|
|
// サービス券一覧の取得 |
|
|
|
$discountTicketCodes = $setting->pluck(CertificationAvailableSetting::COL_NAME_DISCOUNT_TICKET_CODE)->toArray(); |
|
|
|
$discountTickets = DiscountTicket::whereParkId($parking->id) |
|
|
|
$discountTickets = DiscountTicket::getBuilder() |
|
|
|
->where(DiscountTicket::COL_NAME_PARK_ID, $parking->id) |
|
|
|
->whereIn(DiscountTicket::COL_NAME_DISCOUNT_TICKET_CODE, $discountTicketCodes) |
|
|
|
->select([ |
|
|
|
sprintf("%s as %s", DiscountTicket::COL_NAME_DISCOUNT_TICKET_CODE, ColumnName::DISCOUNT_TICKET_CODE), |
|
|
|
|