diff --git a/Laravel/app/Http/Controllers/API/Admin/YeWu/SignInController.php b/Laravel/app/Http/Controllers/API/Admin/YeWu/SignInController.php
index c4fc3ae..698e6b0 100644
--- a/Laravel/app/Http/Controllers/API/Admin/YeWu/SignInController.php
+++ b/Laravel/app/Http/Controllers/API/Admin/YeWu/SignInController.php
@@ -129,10 +129,7 @@ class SignInController extends Controller
if (!json_decode($r, true)) {
return ['status'=>false,'msg'=>"解析'删除签到接口'数据出错:".$r];
}
- $r = $r['SendResult'];
$res = json_decode($r, true);
-
-
if($res['isSuccess']==true){
return ['status'=>true,'msg'=>$res['resultMsg'],'data'=>$res['resultDatas']];
}else{
@@ -204,7 +201,6 @@ class SignInController extends Controller
if (!json_decode($r, true)) {
return ['status'=>false,'msg'=>"解析'删除签到接口'数据出错:".$r];
}
- $r = $r['SendResult'];
$res = json_decode($r, true);
if($res['isSuccess']==true){
return ['status'=>true,''];
diff --git a/Laravel/app/Lib/Tools.php b/Laravel/app/Lib/Tools.php
index e6268c4..0bb2002 100644
--- a/Laravel/app/Lib/Tools.php
+++ b/Laravel/app/Lib/Tools.php
@@ -137,23 +137,38 @@ class Tools
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml_data);
$r = curl_exec($ch);
+ \Illuminate\Support\Facades\Log::info($r);
+ $r = '
+
+
+';
try {
- $res = explode('', $r)[1];
- $res = explode('', $res)[0];
- $xmlData = simplexml_load_string($res);
- $jsonData = json_encode($xmlData, JSON_UNESCAPED_UNICODE);
+ $xml = simplexml_load_string($r, 'SimpleXMLElement', LIBXML_NOCDATA);
+ $namespaces = $xml->getNamespaces(true);
+ $xml->registerXPathNamespace('soapenv', $namespaces['SOAP-ENV']);
+ $xml->registerXPathNamespace('ns', 'http://bjgoodwillcis.com');
+
+// 提取 CDATA 内容
+ $sendResult = $xml->xpath('//ns:SendResult')[0];
+ $jsonData = (string)$sendResult;
+
+
+ // $res = explode('', $r)[1];
+ // $res = explode('', $res)[0];
+ // $xmlData = simplexml_load_string($res);
+ // $jsonData = json_encode($xmlData, JSON_UNESCAPED_UNICODE);
}catch (Exception $e) {
$jsonData = $e->getMessage();
}
+ // dd($res);
+ // $result = json_decode($jsonData, true);
- $result = json_decode($jsonData, true);
- // dd($result);
curl_close($ch);
$data=[
'response_data'=>$r
];
self::RequestLog($data,$log_id);
- return $result;
+ return $jsonData;
}
public static function RequestLog($arr,$id,$mark='')
{ //记录请求日志
diff --git a/Laravel/app/Services/Admin/YeWu/PlanListService.php b/Laravel/app/Services/Admin/YeWu/PlanListService.php
index 9c63c5c..2747162 100644
--- a/Laravel/app/Services/Admin/YeWu/PlanListService.php
+++ b/Laravel/app/Services/Admin/YeWu/PlanListService.php
@@ -209,7 +209,7 @@ WHERE
$date = new DateTime($entrust_time);
$date->modify("+" . $item->check_begin_time . " minutes");
$enableCheckTime = $date;//到此时间后可进行预约
- $plan_dateTime = $planInfo->date . ' ' . $planInfo->begin_time;
+ $plan_dateTime = $planInfo->date . ' ' . $planInfo->end_time;
$plan_dateTime = new DateTime($plan_dateTime);
if ($plan_dateTime < $enableCheckTime) return \Yz::echoError1($item->item_name . " 已设置只能预约医嘱开具后" . $item->check_begin_time . "分钟后的时间,请预约" . $enableCheckTime->format("Y-m-d H:i:s") . "之后的时间");