|
|
|
|
@ -66,7 +66,18 @@ class AspNetZhuanController extends Controller
|
|
|
|
|
$res= self::Post(self::$BaseUrl . '/zhongzhuan.aspx?str='.$nonce,$data,'获取优惠卷类型');
|
|
|
|
|
return $res['data'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//获取人员档案
|
|
|
|
|
public static function GetPersonInfo($data)
|
|
|
|
|
{
|
|
|
|
|
$res= self::Post(self::$BaseUrl . '/renyuan.aspx',$data,'获取人员档案');
|
|
|
|
|
return $res['data'];
|
|
|
|
|
}
|
|
|
|
|
//获取报告解读日期和状态
|
|
|
|
|
public static function GetReportAnalysis($data)
|
|
|
|
|
{
|
|
|
|
|
$res= self::Post2(self::$BaseUrl . '/baogaojiedu.aspx',$data,'报告解读');
|
|
|
|
|
return $res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static function Get($url,$mark)
|
|
|
|
|
@ -130,6 +141,32 @@ class AspNetZhuanController extends Controller
|
|
|
|
|
throw new HttpResponseException(\Yz::echoError1("调用".$mark."接口失败:" . $status . "body:" . $body));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public static function Post2($url,$data,$mark)
|
|
|
|
|
{
|
|
|
|
|
self::RequestLog($url, $data, $mark, '.Net转发');
|
|
|
|
|
$response = Http::post($url,$data);
|
|
|
|
|
if ($response->successful()) {
|
|
|
|
|
$res = $response->json();
|
|
|
|
|
$res_string=json_encode($res, JSON_UNESCAPED_UNICODE);
|
|
|
|
|
$str_len = mb_strlen($res_string, 'utf-8');
|
|
|
|
|
$str_size = $str_len / 1024;
|
|
|
|
|
$save_res = $res_string;
|
|
|
|
|
if ($str_size > 10) $save_res = '{"data":"Row size too large"}';
|
|
|
|
|
self::$request->response_data = $save_res;
|
|
|
|
|
self::$request->save();
|
|
|
|
|
return $res;
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
$status = $response->status();
|
|
|
|
|
// 获取响应体作为字符串
|
|
|
|
|
$body = $response->body();
|
|
|
|
|
|
|
|
|
|
self::$request->response_data = $body;
|
|
|
|
|
self::$request->save();
|
|
|
|
|
|
|
|
|
|
throw new HttpResponseException(\Yz::echoError1("调用".$mark."接口失败:" . $status . "body:" . $body));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static function RequestLog($url, $post_data, $mark, $code = 0)
|
|
|
|
|
{
|
|
|
|
|
|