|
@@ -227,6 +227,25 @@ class ThirdOrderLogic extends BaseLogic
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ if(!empty($orderData['work_id']) and !$product->isEmpty() and !empty($product['goods_id'])) {
|
|
|
|
|
+ //更改预约时间
|
|
|
|
|
+ $serviceWorkInfo = ServiceWork::find($orderData['work_id']);
|
|
|
|
|
+ if(!empty($serviceWorkInfo)){
|
|
|
|
|
+ $appointment_time = $message['begintime'];
|
|
|
|
|
+ ServiceWorkAppointmentLog::create([
|
|
|
|
|
+ 'work_id'=>$serviceWorkInfo->id,
|
|
|
|
|
+ 'last_appointment_time'=>strtotime($serviceWorkInfo->appointment_time),
|
|
|
|
|
+ 'this_appointment_time'=>strtotime($appointment_time),
|
|
|
|
|
+ ]);
|
|
|
|
|
+ //修改预计完成时间
|
|
|
|
|
+ if ($serviceWorkInfo->estimated_finish_time) {
|
|
|
|
|
+ $serviceWorkInfo->estimated_finish_time = strtotime($appointment_time) + (strtotime($serviceWorkInfo->estimated_finish_time) - strtotime($serviceWorkInfo->appointment_time));
|
|
|
|
|
+ }
|
|
|
|
|
+ $serviceWorkInfo->appointment_time = strtotime($appointment_time);
|
|
|
|
|
+ $serviceWorkInfo->save();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|