|
@@ -3994,20 +3994,22 @@ class WholeController extends Curd
|
|
|
|
|
|
Db::commit();
|
|
|
|
|
|
-
|
|
|
+ _syslog("订单", "核销成功");
|
|
|
+ return json_success('核销成功');
|
|
|
} catch (\Exception $e) {
|
|
|
+ unset($appointmentIds);
|
|
|
dump($e->getMessage() . $e->getLine());
|
|
|
Db::rollBack();
|
|
|
_syslog("订单", "核销失败");
|
|
|
return json_fail('核销失败');
|
|
|
} finally {
|
|
|
- // 打印核销小票
|
|
|
- foreach ($appointmentIds as $id) {
|
|
|
- $this->doPrinterWriterOff($id);
|
|
|
+ if (!empty($appointmentIds)){
|
|
|
+ // 打印核销小票
|
|
|
+ foreach ($appointmentIds as $id) {
|
|
|
+ $this->doPrinterWriterOff($id);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- _syslog("订单", "核销成功");
|
|
|
- return json_success('核销成功');
|
|
|
}
|
|
|
|
|
|
public function myOrder(Request $request)
|