Add placeholder debug logs #800
This commit is contained in:
parent
404401d854
commit
2ebb6e040a
3 changed files with 15 additions and 9 deletions
|
|
@ -724,6 +724,8 @@ class JobOrderController extends ApiController
|
||||||
// assign hub and rider
|
// assign hub and rider
|
||||||
// check if hub is null
|
// check if hub is null
|
||||||
if ($hub == null) {
|
if ($hub == null) {
|
||||||
|
//error_log("NO HUB");
|
||||||
|
|
||||||
// TODO: need to factor out the setting of HubCriteria fields
|
// TODO: need to factor out the setting of HubCriteria fields
|
||||||
$hub_criteria = new HubCriteria();
|
$hub_criteria = new HubCriteria();
|
||||||
$hub_criteria->setPoint($jo->getCoordinates());
|
$hub_criteria->setPoint($jo->getCoordinates());
|
||||||
|
|
@ -854,6 +856,8 @@ class JobOrderController extends ApiController
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
//error_log("HAS HUB: " . $hub->getID());
|
||||||
|
|
||||||
$jo->setHub($hub);
|
$jo->setHub($hub);
|
||||||
$jo->setStatus(JOStatus::RIDER_ASSIGN);
|
$jo->setStatus(JOStatus::RIDER_ASSIGN);
|
||||||
$jo->setStatusAutoAssign(AutoAssignStatus::HUB_ASSIGNED);
|
$jo->setStatusAutoAssign(AutoAssignStatus::HUB_ASSIGNED);
|
||||||
|
|
|
||||||
|
|
@ -91,17 +91,13 @@ class HubSelector
|
||||||
$hubs_jo_type = $this->filterHubsByJoType($filtered_hubs, $jo_type, $jo_id, $customer_id);
|
$hubs_jo_type = $this->filterHubsByJoType($filtered_hubs, $jo_type, $jo_id, $customer_id);
|
||||||
$filtered_hubs = $hubs_jo_type;
|
$filtered_hubs = $hubs_jo_type;
|
||||||
|
|
||||||
//error_log('jo_type hubs ' . json_encode($filtered_hubs));
|
// error_log('jo_type hubs ' . json_encode($filtered_hubs));
|
||||||
|
|
||||||
// filter hubs by payment methods
|
// filter hubs by payment methods
|
||||||
$hubs_payment_method = $this->filterHubsByPaymentMethod($filtered_hubs, $payment_method, $jo_id, $customer_id);
|
$hubs_payment_method = $this->filterHubsByPaymentMethod($filtered_hubs, $payment_method, $jo_id, $customer_id);
|
||||||
$filtered_hubs = $hubs_payment_method;
|
$filtered_hubs = $hubs_payment_method;
|
||||||
|
|
||||||
//error_log('payment hubs ' . json_encode($filtered_hubs));
|
// error_log('payment hubs ' . json_encode($filtered_hubs));
|
||||||
|
|
||||||
//error_log('inventory hubs ' . json_encode($filtered_hubs));
|
|
||||||
|
|
||||||
// error_log('round robin hubs ' . json_encode($filtered_hubs));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// only enable rider and inventory checks if not VIP
|
// only enable rider and inventory checks if not VIP
|
||||||
|
|
@ -110,9 +106,13 @@ class HubSelector
|
||||||
$hubs_riders = $this->filterHubsByRiderAvailability($filtered_hubs, $flag_riders_check, $jo_id, $customer_id, $order_date, $service_type);
|
$hubs_riders = $this->filterHubsByRiderAvailability($filtered_hubs, $flag_riders_check, $jo_id, $customer_id, $order_date, $service_type);
|
||||||
$filtered_hubs = $hubs_riders;
|
$filtered_hubs = $hubs_riders;
|
||||||
|
|
||||||
|
// error_log('available riders hubs ' . json_encode($filtered_hubs));
|
||||||
|
|
||||||
// inventory filter
|
// inventory filter
|
||||||
$hubs_inventory = $this->filterHubsByInventory($filtered_hubs, $flag_inventory_check, $jo_type, $items, $jo_id, $customer_id, $order_date, $service_type);
|
$hubs_inventory = $this->filterHubsByInventory($filtered_hubs, $flag_inventory_check, $jo_type, $items, $jo_id, $customer_id, $order_date, $service_type);
|
||||||
$filtered_hubs = $hubs_inventory;
|
$filtered_hubs = $hubs_inventory;
|
||||||
|
|
||||||
|
// error_log('inventory hubs ' . json_encode($filtered_hubs));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$flag_emergency) {
|
if (!$flag_emergency) {
|
||||||
|
|
@ -120,6 +120,8 @@ class HubSelector
|
||||||
$hubs_round_robin = $this->filterHubsByRoundRobin($filtered_hubs, $flag_round_robin);
|
$hubs_round_robin = $this->filterHubsByRoundRobin($filtered_hubs, $flag_round_robin);
|
||||||
$filtered_hubs = $hubs_round_robin;
|
$filtered_hubs = $hubs_round_robin;
|
||||||
|
|
||||||
|
// error_log('round robin hubs ' . json_encode($filtered_hubs));
|
||||||
|
|
||||||
// max results filter
|
// max results filter
|
||||||
$hubs_max_result = $this->filterHubsByMaxResults($filtered_hubs, $limit_results, $jo_id, $customer_id);
|
$hubs_max_result = $this->filterHubsByMaxResults($filtered_hubs, $limit_results, $jo_id, $customer_id);
|
||||||
$filtered_hubs = $hubs_max_result;
|
$filtered_hubs = $hubs_max_result;
|
||||||
|
|
@ -127,7 +129,7 @@ class HubSelector
|
||||||
|
|
||||||
$results = $filtered_hubs;
|
$results = $filtered_hubs;
|
||||||
|
|
||||||
// error_log(json_encode($results));
|
// error_log('final hub list ' . json_encode($filtered_hubs));
|
||||||
|
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2558,7 +2558,7 @@ class ResqJobOrderHandler implements JobOrderHandlerInterface
|
||||||
|
|
||||||
// set customer class
|
// set customer class
|
||||||
$cust = $obj->getCustomer();
|
$cust = $obj->getCustomer();
|
||||||
$hub_criteria->setCustomerClass($cust->getCustomerClass());
|
$hub_criteria->setCustomerClass($cust->getCustomerClassification());
|
||||||
|
|
||||||
// check if hub filter is enabled. If not, use default values
|
// check if hub filter is enabled. If not, use default values
|
||||||
// for the rest of the HubCriteria fields
|
// for the rest of the HubCriteria fields
|
||||||
|
|
@ -2912,7 +2912,7 @@ class ResqJobOrderHandler implements JobOrderHandlerInterface
|
||||||
|
|
||||||
// set customer class
|
// set customer class
|
||||||
$cust = $obj->getCustomer();
|
$cust = $obj->getCustomer();
|
||||||
$hub_criteria->setCustomerClass($cust->getCustomerClass());
|
$hub_criteria->setCustomerClass($cust->getCustomerClassification());
|
||||||
|
|
||||||
if ($this->hub_geofence->isCovered($long, $lat))
|
if ($this->hub_geofence->isCovered($long, $lat))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue