|
@@ -22,17 +22,18 @@ class CheckU8
|
|
|
$zt = $request->header('Zt');
|
|
$zt = $request->header('Zt');
|
|
|
if(empty($zt)) return response()->json(['code'=>201,'msg'=>'缺少账套信息','data'=>null]);
|
|
if(empty($zt)) return response()->json(['code'=>201,'msg'=>'缺少账套信息','data'=>null]);
|
|
|
|
|
|
|
|
- if($zt == "1"){
|
|
|
|
|
- $database = "UFDATA_001_2025";
|
|
|
|
|
- }elseif($zt == "2"){
|
|
|
|
|
- $database = "UFDATA_999_2025";
|
|
|
|
|
|
|
+ $config = config("u");
|
|
|
|
|
+ if(! isset($config[$site])) return response()->json(['code'=>201,'msg'=>'站点:' . $site . '暂未配置,请联系管理员','data'=>null]);
|
|
|
|
|
+ $site_array = $config[$site];
|
|
|
|
|
+
|
|
|
|
|
+ if($zt == "1" || $zt == "2"){
|
|
|
|
|
+ $database = $site_array[$zt];
|
|
|
}else{
|
|
}else{
|
|
|
return response()->json(['code'=>201,'msg'=>'账套信息错误','data'=>null]);
|
|
return response()->json(['code'=>201,'msg'=>'账套信息错误','data'=>null]);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
$title = $site . "(" . $database . ")";
|
|
$title = $site . "(" . $database . ")";
|
|
|
- $config = config("u");
|
|
|
|
|
- if(! isset($config[$site])) return response()->json(['code'=>201,'msg'=>'站点:' . $site . '暂未配置,请联系管理员','data'=>null]);
|
|
|
|
|
- $site_array = $config[$site];
|
|
|
|
|
|
|
+
|
|
|
if(empty($site_array['api_host'])) return response()->json(['code'=>201,'msg'=>'站点:' . $site . '下用友对外域名暂未配置,请联系管理员','data'=>null]);
|
|
if(empty($site_array['api_host'])) return response()->json(['code'=>201,'msg'=>'站点:' . $site . '下用友对外域名暂未配置,请联系管理员','data'=>null]);
|
|
|
if(empty($site_array['api_port'])) return response()->json(['code'=>201,'msg'=>'站点:' . $site . '下用友对外域名端口暂未配置,请联系管理员','data'=>null]);
|
|
if(empty($site_array['api_port'])) return response()->json(['code'=>201,'msg'=>'站点:' . $site . '下用友对外域名端口暂未配置,请联系管理员','data'=>null]);
|
|
|
|
|
|