diff --git a/app/Services/DetectionService.php b/app/Services/DetectionService.php index 810949f..6f78ae5 100644 --- a/app/Services/DetectionService.php +++ b/app/Services/DetectionService.php @@ -15,7 +15,6 @@ use App\Model\OrderDetection; use App\Model\OrderDetectionCase; use App\Model\OrderDetectionRefund; use App\Model\PatientFamily; -use App\Model\ReportDetection; use App\Model\UserDoctor; use App\Model\UserLocation; use App\Utils\Log; @@ -546,10 +545,13 @@ class DetectionService extends BaseService return fail(HttpEnumCode::HTTP_ERROR,"检测管已被使用"); } + // 计算检测机构 + $detection_organ_id = 1; + Db::beginTransaction(); try { // 上报数据 - $wy = new Wy($order_detection['detection_organ_id']); + $wy = new Wy($detection_organ_id); $wy->report($order_detection); // 修改检测订单 @@ -557,7 +559,7 @@ class DetectionService extends BaseService $data['detection_pic'] = $detection_pic ?? ""; $data['detection_bar_code'] = $request_params['detection_bar_code']; $data['detection_status'] = 3; - $data['detection_organ_id'] = 1;// 检测机构id + $data['detection_organ_id'] = $detection_organ_id;// 检测机构id $data['detection_time'] = date('Y-m-d H:i:s', time());// 上传检测时间 $params = array();