debug: 添加itineraries调试日志
This commit is contained in:
@@ -166,6 +166,17 @@ class BusinessTripService
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 创建审批单
|
// 创建审批单
|
||||||
|
$itinerariesData = $businessTrip->itineraries->map(function ($item) {
|
||||||
|
return [
|
||||||
|
'destination' => $item->destination,
|
||||||
|
'start_date' => $item->start_date,
|
||||||
|
'end_date' => $item->end_date,
|
||||||
|
'estimated_cost' => $item->estimated_cost,
|
||||||
|
];
|
||||||
|
})->toArray();
|
||||||
|
|
||||||
|
error_log("🔍 itineraries 数据: " . json_encode($itinerariesData));
|
||||||
|
|
||||||
$approvalOrder = ApprovalOrder::create([
|
$approvalOrder = ApprovalOrder::create([
|
||||||
'business_type' => 'business_trip',
|
'business_type' => 'business_trip',
|
||||||
'business_id' => $businessTrip->id,
|
'business_id' => $businessTrip->id,
|
||||||
@@ -180,14 +191,7 @@ class BusinessTripService
|
|||||||
'end_date' => $businessTrip->end_date,
|
'end_date' => $businessTrip->end_date,
|
||||||
'destination' => $businessTrip->destination,
|
'destination' => $businessTrip->destination,
|
||||||
'estimated_cost' => $businessTrip->estimated_cost,
|
'estimated_cost' => $businessTrip->estimated_cost,
|
||||||
'itineraries' => $businessTrip->itineraries->map(function ($item) {
|
'itineraries' => $itinerariesData,
|
||||||
return [
|
|
||||||
'destination' => $item->destination,
|
|
||||||
'start_date' => $item->start_date,
|
|
||||||
'end_date' => $item->end_date,
|
|
||||||
'estimated_cost' => $item->estimated_cost,
|
|
||||||
];
|
|
||||||
})->toArray(),
|
|
||||||
'approvers' => $approvers,
|
'approvers' => $approvers,
|
||||||
'cc_users' => $ccUsers,
|
'cc_users' => $ccUsers,
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user