add validation
This commit is contained in:
@@ -24,7 +24,7 @@ class ReportMachineService
|
||||
FROM missions m
|
||||
JOIN cmms_machines cm ON cm.id = m.machine_id
|
||||
WHERE m.state_id = 4 AND m.start_time >= :from AND m.finish_time <= :to
|
||||
GROUP BY machine_id;";
|
||||
GROUP BY machine_id ORDER BY missions DESC;";
|
||||
|
||||
return DB::select($sql, [
|
||||
'from' => $from,
|
||||
@@ -42,7 +42,7 @@ class ReportMachineService
|
||||
FROM missions m
|
||||
JOIN cmms_machines cm ON cm.id = m.machine_id
|
||||
WHERE m.state_id = 4 AND start_time >= :from AND finish_time <= :to AND m.province_id = :province_id
|
||||
GROUP BY machine_id;";
|
||||
GROUP BY machine_id ORDER BY missions DESC;";
|
||||
|
||||
return DB::select($sql, [
|
||||
'from' => $from,
|
||||
@@ -63,7 +63,7 @@ class ReportMachineService
|
||||
FROM missions m
|
||||
JOIN cmms_machines cm ON cm.id = m.machine_id
|
||||
WHERE m.state_id = 4 AND m.start_time >= :from AND m.finish_time <= :to
|
||||
GROUP BY cm.car_type;";
|
||||
GROUP BY cm.car_type ORDER BY missions DESC;";
|
||||
|
||||
return DB::select($sql, [
|
||||
'from' => $from,
|
||||
@@ -84,7 +84,7 @@ class ReportMachineService
|
||||
FROM missions m
|
||||
JOIN cmms_machines cm ON cm.id = m.machine_id
|
||||
WHERE m.state_id = 4 AND m.start_time >= :from AND m.finish_time <= :to AND m.province_id = :province_id
|
||||
GROUP BY cm.car_type;";
|
||||
GROUP BY cm.car_type ORDER BY missions DESC;";
|
||||
|
||||
return DB::select($sql, [
|
||||
'from' => $from,
|
||||
@@ -105,7 +105,7 @@ class ReportMachineService
|
||||
SUM(m.end_km - m.km) AS func
|
||||
FROM missions m
|
||||
WHERE m.state_id = 4 AND m.start_time >= :from AND m.finish_time <= :to
|
||||
GROUP BY m.driver_id;";
|
||||
GROUP BY m.driver_id ORDER BY missions DESC;";
|
||||
|
||||
return DB::select($sql, [
|
||||
'from' => $from,
|
||||
@@ -126,7 +126,7 @@ class ReportMachineService
|
||||
SUM(m.end_km - m.km) AS func
|
||||
FROM missions m
|
||||
WHERE m.state_id = 4 AND m.start_time >= :from AND m.finish_time <= :to AND province_id = :province_id
|
||||
GROUP BY m.driver_id;";
|
||||
GROUP BY m.driver_id ORDER BY missions DESC;";
|
||||
|
||||
return DB::select($sql, [
|
||||
'from' => $from,
|
||||
|
||||
@@ -34,7 +34,7 @@ class RequestPortalService
|
||||
'description', 'requested_machines', 'type', 'type_fa', 'start_date', 'state_id',
|
||||
'end_date', 'request_date', 'end_point', 'encoded_route', 'zone', 'zone_fa', 'start_time', 'finish_time',
|
||||
'code', 'category_id', 'category_name', 'explanation', 'city_id', 'city_name', 'province_id', 'station_name',
|
||||
'driver_id', 'driver_name'
|
||||
'driver_id', 'driver_name', 'machine_id', 'item_id', 'sub_item_id'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user