|
|
|
|
@ -73,6 +73,7 @@ class FenzhenController extends Controller
|
|
|
|
|
"more" => 0,
|
|
|
|
|
"name" => $item['name'],
|
|
|
|
|
"status" => 1,
|
|
|
|
|
'count' => -1,
|
|
|
|
|
"time" => "$in_time",
|
|
|
|
|
"tip" => "剩余{$item_count}项正在排队中,"
|
|
|
|
|
]
|
|
|
|
|
@ -88,6 +89,7 @@ class FenzhenController extends Controller
|
|
|
|
|
"more" => 0,
|
|
|
|
|
"name" => "体检结束",
|
|
|
|
|
"status" => -1,
|
|
|
|
|
'count' => -1,
|
|
|
|
|
"time" => "$in_time",
|
|
|
|
|
"tip" => ""
|
|
|
|
|
]
|
|
|
|
|
@ -111,101 +113,109 @@ class FenzhenController extends Controller
|
|
|
|
|
$now_time = time();
|
|
|
|
|
// $now_time = strtotime('2024-11-07 00:00:00');
|
|
|
|
|
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 ($report_time < $now_time) {
|
|
|
|
|
$report_status = true;
|
|
|
|
|
}
|
|
|
|
|
if (!$report_status) {
|
|
|
|
|
$time_line[] = [
|
|
|
|
|
'time' => '',
|
|
|
|
|
'name' => '出具报告',
|
|
|
|
|
'status' => -1,
|
|
|
|
|
'desc' => "预计 $report_time_show 出具体检报告",
|
|
|
|
|
'tip' => '',
|
|
|
|
|
'more' => 0
|
|
|
|
|
];
|
|
|
|
|
} else {
|
|
|
|
|
$time_line[] = [
|
|
|
|
|
'time' => '',
|
|
|
|
|
'name' => '出具报告',
|
|
|
|
|
'status' => -1,
|
|
|
|
|
'desc' => "已出具体检报告 $report_time_show",
|
|
|
|
|
'tip' => '',
|
|
|
|
|
'more' => 0
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
$check_report_time = $report_time + (60 * 60 * 24);
|
|
|
|
|
$check_report_status = 0;
|
|
|
|
|
// $check_report_status = '2024年10月11日';
|
|
|
|
|
// 这里补充 获取 报告解读 时间的逻辑
|
|
|
|
|
if ($check_report_time < $now_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;
|
|
|
|
|
$report_res = $dnet->GetReportAnalysis([
|
|
|
|
|
"yyrq" => date('Y-m-d', $check_report_time),
|
|
|
|
|
"ghzid" => $user_info->ghzid,
|
|
|
|
|
"yyid" => $hospital_map["h$hid"],
|
|
|
|
|
"action" => "1"
|
|
|
|
|
]);
|
|
|
|
|
switch ($report_res['code']) {
|
|
|
|
|
case '200':
|
|
|
|
|
$check_report_status = 2;
|
|
|
|
|
$show_date = date('m-d', strtotime($report_res['yyrq']));
|
|
|
|
|
$time_line[] = [
|
|
|
|
|
'time' => '',
|
|
|
|
|
'name' => '报告解读',
|
|
|
|
|
'status' => -1,
|
|
|
|
|
'desc' => "已预约 $show_date 报告解读",
|
|
|
|
|
'tip' => '',
|
|
|
|
|
'more' => 0
|
|
|
|
|
];
|
|
|
|
|
break;
|
|
|
|
|
case '199':
|
|
|
|
|
case '201':
|
|
|
|
|
$check_report_status = 1;
|
|
|
|
|
$time_line[] = [
|
|
|
|
|
'time' => '',
|
|
|
|
|
'name' => '报告解读',
|
|
|
|
|
'status' => -1,
|
|
|
|
|
'desc' => "可以预约报告解读",
|
|
|
|
|
'tip' => '',
|
|
|
|
|
'more' => 0
|
|
|
|
|
];
|
|
|
|
|
break;
|
|
|
|
|
case '202':
|
|
|
|
|
$check_report_status = 0;
|
|
|
|
|
$time_line[] = [
|
|
|
|
|
'time' => '',
|
|
|
|
|
'name' => '报告解读',
|
|
|
|
|
'status' => 1,
|
|
|
|
|
'desc' => "已完成报告解读",
|
|
|
|
|
'tip' => '',
|
|
|
|
|
'more' => 0
|
|
|
|
|
];
|
|
|
|
|
break;
|
|
|
|
|
if ($report_day !== false) {
|
|
|
|
|
$report_status = false;
|
|
|
|
|
$report_time = strtotime($res['data']['report'] . ' 00:00:00') + (60 * 60 * 24 * $report_day);
|
|
|
|
|
$report_time_show = date('m月d日', $report_time);
|
|
|
|
|
// 这里补充 获取 出具报告 时间的逻辑
|
|
|
|
|
if ($report_time < $now_time) {
|
|
|
|
|
$report_status = true;
|
|
|
|
|
}
|
|
|
|
|
if (!$report_status) {
|
|
|
|
|
$time_line[] = [
|
|
|
|
|
'time' => '',
|
|
|
|
|
'name' => '出具报告',
|
|
|
|
|
'status' => -1,
|
|
|
|
|
'count' => -1,
|
|
|
|
|
'desc' => "预计 $report_time_show 出具体检报告",
|
|
|
|
|
'tip' => '',
|
|
|
|
|
'more' => 0
|
|
|
|
|
];
|
|
|
|
|
} else {
|
|
|
|
|
$time_line[] = [
|
|
|
|
|
'time' => '',
|
|
|
|
|
'name' => '出具报告',
|
|
|
|
|
'status' => -1,
|
|
|
|
|
'count' => -1,
|
|
|
|
|
'desc' => "已出具体检报告 $report_time_show",
|
|
|
|
|
'tip' => '',
|
|
|
|
|
'more' => 0
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
$check_report_time = $report_time + (60 * 60 * 24);
|
|
|
|
|
$check_report_status = 0;
|
|
|
|
|
// $check_report_status = '2024年10月11日';
|
|
|
|
|
// 这里补充 获取 报告解读 时间的逻辑
|
|
|
|
|
if ($check_report_time < $now_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;
|
|
|
|
|
$report_res = $dnet->GetReportAnalysis([
|
|
|
|
|
"yyrq" => date('Y-m-d', $check_report_time),
|
|
|
|
|
"ghzid" => $user_info->ghzid,
|
|
|
|
|
"yyid" => $hospital_map["h$hid"],
|
|
|
|
|
"action" => "1"
|
|
|
|
|
]);
|
|
|
|
|
switch ($report_res['code']) {
|
|
|
|
|
case '200':
|
|
|
|
|
$check_report_status = 2;
|
|
|
|
|
$show_date = date('m-d', strtotime($report_res['yyrq']));
|
|
|
|
|
$time_line[] = [
|
|
|
|
|
'time' => '',
|
|
|
|
|
'name' => '报告解读',
|
|
|
|
|
'status' => -1,
|
|
|
|
|
'count' => -1,
|
|
|
|
|
'desc' => "已预约 $show_date 报告解读",
|
|
|
|
|
'tip' => '',
|
|
|
|
|
'more' => 0
|
|
|
|
|
];
|
|
|
|
|
break;
|
|
|
|
|
case '199':
|
|
|
|
|
case '201':
|
|
|
|
|
$check_report_status = 1;
|
|
|
|
|
$time_line[] = [
|
|
|
|
|
'time' => '',
|
|
|
|
|
'name' => '报告解读',
|
|
|
|
|
'status' => -1,
|
|
|
|
|
'count' => -1,
|
|
|
|
|
'desc' => "可以预约报告解读",
|
|
|
|
|
'tip' => '',
|
|
|
|
|
'more' => 0
|
|
|
|
|
];
|
|
|
|
|
break;
|
|
|
|
|
case '202':
|
|
|
|
|
$check_report_status = 0;
|
|
|
|
|
$time_line[] = [
|
|
|
|
|
'time' => '',
|
|
|
|
|
'name' => '报告解读',
|
|
|
|
|
'status' => 1,
|
|
|
|
|
'count' => -1,
|
|
|
|
|
'desc' => "已完成报告解读",
|
|
|
|
|
'tip' => '',
|
|
|
|
|
'more' => 0
|
|
|
|
|
];
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
$check_report_time_show = date('m月d日', $check_report_time);
|
|
|
|
|
$time_line[] = [
|
|
|
|
|
'time' => '',
|
|
|
|
|
'name' => '报告解读',
|
|
|
|
|
'status' => -1,
|
|
|
|
|
'count' => -1,
|
|
|
|
|
'desc' => "预计 $check_report_time_show 可以预约报告解读",
|
|
|
|
|
'tip' => '',
|
|
|
|
|
'more' => 0
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
$check_report_time_show = date('m月d日', $check_report_time);
|
|
|
|
|
$time_line[] = [
|
|
|
|
|
'time' => '',
|
|
|
|
|
'name' => '报告解读',
|
|
|
|
|
'status' => -1,
|
|
|
|
|
'desc' => "预计 $check_report_time_show 可以预约报告解读",
|
|
|
|
|
'tip' => '',
|
|
|
|
|
'more' => 0
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$res['data']['end_time'] = date('H:i', $last_time);
|
|
|
|
|
|