|
|
|
|
@ -88,13 +88,17 @@ class FenzhenController extends Controller
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// -1 报告未出 不能预约 报告解读 不显示
|
|
|
|
|
// 0 时间未到 不能预约 报告解读 不显示
|
|
|
|
|
// 1 时间已到 可以预约 报告解读
|
|
|
|
|
// 2 已经预约 报告解读
|
|
|
|
|
$check_report_status = -1;
|
|
|
|
|
if (!!$res['data']['report']) {
|
|
|
|
|
$report_time = strtotime($res['data']['report'] . ' 00:00:00') + (60 * 60 * 24 * $report_day);
|
|
|
|
|
$report_time_show = date('m月d日', $report_time);
|
|
|
|
|
$report_status = false;
|
|
|
|
|
// 这里补充 获取 出具报告 时间的逻辑
|
|
|
|
|
if (strtotime($report_time) < time()) {
|
|
|
|
|
if ($report_time < time()) {
|
|
|
|
|
$report_status = true;
|
|
|
|
|
}
|
|
|
|
|
if (!$report_status) {
|
|
|
|
|
@ -120,29 +124,38 @@ class FenzhenController extends Controller
|
|
|
|
|
$check_report_status = 0;
|
|
|
|
|
// $check_report_status = '2024年10月11日';
|
|
|
|
|
// 这里补充 获取 报告解读 时间的逻辑
|
|
|
|
|
if ($check_report_time < time()) {
|
|
|
|
|
if (!!$info->person_id) {
|
|
|
|
|
$user_info = DB::table('web_user_person')->where(['id' => $info->person_id])->first();
|
|
|
|
|
if (!!$user_info) {
|
|
|
|
|
$hospital_map = [
|
|
|
|
|
'h1' => '6',
|
|
|
|
|
'h4' => '2'
|
|
|
|
|
];
|
|
|
|
|
$dnet = new AspNetZhuanController();
|
|
|
|
|
$hid = $info->hospital_id;
|
|
|
|
|
$res = $dnet->GetReportAnalysis([
|
|
|
|
|
"yyrq" => "2024-10-29",
|
|
|
|
|
"ghzid" => "b656355aee12452693f53bb8ff916fa3",
|
|
|
|
|
"yyid" => "6",
|
|
|
|
|
"yyrq" => date('Y-m-d', $check_report_time),
|
|
|
|
|
"ghzid" => $user_info->ghzid,
|
|
|
|
|
"yyid" => $hospital_map["h$hid"],
|
|
|
|
|
"action" => "1"
|
|
|
|
|
]);
|
|
|
|
|
switch ($res['code']) {
|
|
|
|
|
case '200':
|
|
|
|
|
$check_report_status = $res['data']['yyrq'];
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
$check_report_status = false;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
$check_report_status = false;
|
|
|
|
|
$check_report_status = 2;
|
|
|
|
|
$show_date = date('m-d', strtotime($res['yyrq']));
|
|
|
|
|
$time_line[] = [
|
|
|
|
|
'time' => '',
|
|
|
|
|
'name' => '报告解读',
|
|
|
|
|
'status' => -1,
|
|
|
|
|
'desc' => "已预约 $show_date 报告解读",
|
|
|
|
|
'tip' => '',
|
|
|
|
|
'more' => 0
|
|
|
|
|
];
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
\Yz::debug(['a' => $res]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!$check_report_status) {
|
|
|
|
|
if ($check_report_time < time()) {
|
|
|
|
|
case '199':
|
|
|
|
|
case '201':
|
|
|
|
|
$check_report_status = 1;
|
|
|
|
|
$time_line[] = [
|
|
|
|
|
'time' => '',
|
|
|
|
|
'name' => '报告解读',
|
|
|
|
|
@ -151,24 +164,28 @@ class FenzhenController extends Controller
|
|
|
|
|
'tip' => '',
|
|
|
|
|
'more' => 0
|
|
|
|
|
];
|
|
|
|
|
} else {
|
|
|
|
|
$check_report_time_show = date('m月d日', $check_report_time);
|
|
|
|
|
break;
|
|
|
|
|
case '202':
|
|
|
|
|
$check_report_status = 0;
|
|
|
|
|
$time_line[] = [
|
|
|
|
|
'time' => '',
|
|
|
|
|
'name' => '报告解读',
|
|
|
|
|
'status' => -1,
|
|
|
|
|
'desc' => "预计 $check_report_time_show 可以预约报告解读",
|
|
|
|
|
'status' => 1,
|
|
|
|
|
'desc' => "已完成报告解读",
|
|
|
|
|
'tip' => '',
|
|
|
|
|
'more' => 0
|
|
|
|
|
];
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
$show_date = explode('年', $check_report_status)[1];
|
|
|
|
|
$check_report_time_show = date('m月d日', $check_report_time);
|
|
|
|
|
$time_line[] = [
|
|
|
|
|
'time' => '',
|
|
|
|
|
'name' => '报告解读',
|
|
|
|
|
'status' => -1,
|
|
|
|
|
'desc' => "已预约 $show_date 报告解读",
|
|
|
|
|
'desc' => "预计 $check_report_time_show 可以预约报告解读",
|
|
|
|
|
'tip' => '',
|
|
|
|
|
'more' => 0
|
|
|
|
|
];
|
|
|
|
|
|