diff --git a/app/Services/DetectionService.php b/app/Services/DetectionService.php index d25fb96..4ca2a58 100644 --- a/app/Services/DetectionService.php +++ b/app/Services/DetectionService.php @@ -563,6 +563,15 @@ class DetectionService extends BaseService return fail(HttpEnumCode::HTTP_ERROR,"订单状态错误"); } + // 检测是否已经创建问诊订单 + if (!empty($order_detection['order_inquiry_id'])){ + $result['status'] = 1; + $result['message'] = "成功"; + $result['data'] = (string)$order_detection['order_inquiry_id']; + + return success($result); + } + Db::beginTransaction(); try { // 检测当前医生是否和患者存在未完成问诊订单 @@ -749,6 +758,10 @@ class DetectionService extends BaseService return fail(HttpEnumCode::HTTP_ERROR, $e->getMessage()); } + $result['status'] = 1; + $result['message'] = "成功"; + $result['data'] = (string)$order_detection['order_inquiry_id']; + return success($result); }