|
@@ -21,6 +21,7 @@ use App\Service\OaService;
|
|
|
use App\Service\OperationLogService;
|
|
|
use App\Service\OrderNoService;
|
|
|
use App\Service\SalesOrderService;
|
|
|
+use App\Service\U8ServerService;
|
|
|
use Illuminate\Http\Request;
|
|
|
use Illuminate\Support\Facades\Hash;
|
|
|
|
|
@@ -37,7 +38,11 @@ class TestController extends BaseController
|
|
|
|
|
|
}
|
|
|
|
|
|
- public function aa(){$this->test1();
|
|
|
+ public function aa(){dd(222);
|
|
|
+ $service = new U8ServerService(true);
|
|
|
+ if(! empty($service->error)) return [false, $service->error];
|
|
|
+ dd(11111);
|
|
|
+ $this->test1();
|
|
|
// $array = (new SalesOrderService())->salesOrderPdf(['id' => 26604],['id'=>1,'head'=>['id' =>2]]);
|
|
|
// return view('pdf.salesOrder',['order' => $array]);
|
|
|
$send_data[] = [
|
|
@@ -118,9 +123,6 @@ die;
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
public function test1(){dd(222);
|
|
|
$service = new CheckService();
|
|
|
$service->recordReturnExchangeOrder([],ReturnExchangeOrder::where('order_number',"TH202503071106328078")->first()->toArray());
|
|
@@ -235,4 +237,17 @@ dd($error);
|
|
|
InOutRecord::insert($error);
|
|
|
dd(count($error),$error);
|
|
|
}
|
|
|
+ public function test2(){
|
|
|
+ $server = "8u80504l59.vicp.fun,57323"; // 如 localhost, IP 或域名
|
|
|
+ $database = "UFDATA_101_2023";
|
|
|
+ $username = "sa";
|
|
|
+ $password = "Aa1";
|
|
|
+
|
|
|
+ try {
|
|
|
+ $conn = new \PDO("sqlsrv:Server=$server;Database=$database;Driver={ODBC Driver 17 for SQL Server}", $username, $password);
|
|
|
+ echo "Connected successfully\n";
|
|
|
+ } catch (\PDOException $e) {
|
|
|
+ echo "Connection failed: " . $e->getMessage() . "\n";
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|