更新 体检引导

main
鹿和sa0ChunLuyu 1 year ago
parent a242cda965
commit 15f899eadc

@ -51,38 +51,40 @@ class FenzhenController extends Controller
$clinic_map[] = $item['name']; $clinic_map[] = $item['name'];
} }
$last_time = strtotime('2024-10-10 ' . $time_line[count($time_line) - 1]['time'] . ':00'); $last_time = strtotime('2024-10-10 ' . $time_line[count($time_line) - 1]['time'] . ':00');
$push_end = false; if (!$res['data']['queue']) {
foreach ($clinics as $key => $item) { $push_end = false;
if (!in_array($item['name'], $clinic_map)) { foreach ($clinics as $item) {
$push_end = true; if (!in_array($item['name'], $clinic_map)) {
$item_count = $item['count']; $push_end = true;
$item_count = $item['count'];
$in_time = date('H:i', $last_time);
$time_line = array_merge(array_splice($time_line, 0, count($time_line) - 1), [
[
"desc" => "预计 $in_time 进入队列",
"more" => 0,
"name" => $item['name'],
"status" => 1,
"time" => "$in_time",
"tip" => "剩余{$item_count}项正在排队中,"
]
], [$time_line[count($time_line) - 1]]);
$last_time = $last_time + (60 * 5);
}
}
if ($push_end) {
$in_time = date('H:i', $last_time); $in_time = date('H:i', $last_time);
$time_line = array_merge(array_splice($time_line, 0, count($time_line) - 1), [ $time_line = array_merge(array_splice($time_line, 0, count($time_line) - 1), [
[ [
"desc" => "预计 $in_time 进入队列", "desc" => "结束时间 $in_time",
"more" => 0, "more" => 0,
"name" => $item['name'], "name" => "体检结束",
"status" => 1, "status" => -1,
"time" => "$in_time", "time" => "$in_time",
"tip" => "剩余{$item_count}项正在排队中," "tip" => ""
] ]
], [$time_line[count($time_line) - 1]]); ]);
$last_time = $last_time + (60 * 5);
} }
} }
if ($push_end) {
$in_time = date('H:i', $last_time);
$time_line = array_merge(array_splice($time_line, 0, count($time_line) - 1), [
[
"desc" => "结束时间 $in_time",
"more" => 0,
"name" => "体检结束",
"status" => -1,
"time" => "$in_time",
"tip" => ""
]
]);
}
$check_report_status = -1; $check_report_status = -1;
if (!!$res['data']['report']) { if (!!$res['data']['report']) {
$report_time = strtotime($res['data']['report'] . ' 00:00:00') + (60 * 60 * 24 * $report_day); $report_time = strtotime($res['data']['report'] . ' 00:00:00') + (60 * 60 * 24 * $report_day);

Loading…
Cancel
Save