更新 体检引导 逻辑优化

main
鹿和sa0ChunLuyu 1 year ago
parent e3bcf3a7a0
commit 04b012354c

@ -36,11 +36,24 @@ class FenzhenController extends Controller
{
// 这里放 检查是否有 体检引导的数据
$id_number = request('id_number');
$list = DB::table('orders')->where(['id_number' => $id_number])->whereIn('status', [2, 4])->where('tj_number', '!=', null)->get();
$type = 1;
$list = DB::table('orders')->where(['id_number' => $id_number])->where('appointment_date', '>=', date('Y-m-d'))
->whereIn('status', [2, 4])->orderBy('id', 'desc')->get();
if (count($list) == 0) {
$list = DB::table('orders')->where(['id_number' => $id_number])->whereIn('status', [2, 4])->orderBy('id', 'desc')->get();
$type = 2;
$list = DB::table('orders')->where(['id_number' => $id_number])->whereIn('status', [2, 4])->where('tj_number', '!=', null)->get();
if (count($list) == 0) {
$type = 3;
$list = DB::table('orders')->where(['id_number' => $id_number])->whereIn('status', [2, 4])->orderBy('id', 'desc')->get();
}
} else {
$l = [$list[0]];
$list = $l;
}
return \Yz::Return(true, "弃检成功", ['list' => $list]);
return \Yz::Return(true, "弃检成功", [
'list' => $list,
'type' => $type
]);
}
public function list()

@ -125,7 +125,7 @@
window.$box.alert(`未查询到排队信息`, '提示', {
confirmButtonText: '确定',
callback: () => {
},
})
}

Loading…
Cancel
Save