getMessage()); self::setError($e->getMessage()); return false; } } /** * 工单统一处理 * @param $send_code * @param $params * @return bool * @author liugc <466014217@qq.com> * @date 2025/4/17 14:12 */ private static function generalServiceWork($send_code,$params) { try { $work = ServiceWork::where(['id'=>$params['work_id']])->findOrEmpty(); if($work->isEmpty()){ throw new \Exception('工单不存在'); } if($work->external_platform_id > 0){ $send_url = env('internal_api.api_url_host').'platf/performanceNotice'; $data = [ 'external_platform_id'=> $work->external_platform_id, 'send_code'=> $send_code, 'work_sn'=> $work->work_sn ]; // 通过内部SDK服务 对外通知 $res = http_request($send_url,http_build_query($data)); Log::info('generalServiceWork:' .'url:'.$send_url .'|data:'.json_encode($data,JSON_UNESCAPED_UNICODE) .'|res:'.json_encode([$res],JSON_UNESCAPED_UNICODE) ); } return true; } catch (\Exception $e) { Log::info('generalServiceWork-error:'.$e->getMessage()); return false; } } }