超时取消bug

main
yanzai 5 months ago
parent be63ae2ab2
commit 9982845a11

@ -311,11 +311,19 @@ class WorkMainController extends Controller
$config=DB::table('configs')->where(['label'=>'门诊缴费超时时间'])->first();
if($config->value>0){
$currentDateTime = Carbon::now()->subHours($config->value);
$list=DB::table('s_list')->where(['list_status'=>1,'patient_type'=>1,'is_pay'=>0,'is_del'=>0,'is_nullify'=>0])
->where('entrust_date', '<', $currentDateTime->toDateString())
->orWhere(function($query) use ($currentDateTime) {
$query->whereDate('entrust_date', $currentDateTime->toDateString())
->whereTime('entrust_time', '<', $currentDateTime->toTimeString());
$list=DB::table('s_list')->where([
'list_status' => 1,
'patient_type' => 1,
'is_pay' => 0,
'is_del' => 0,
'is_nullify' => 0,
])
->where(function ($query) use ($currentDateTime) {
$query->whereDate('entrust_date', '<', $currentDateTime->toDateString())
->orWhere(function ($q) use ($currentDateTime) {
$q->whereDate('entrust_date', $currentDateTime->toDateString())
->whereTime('entrust_time', '<', $currentDateTime->toTimeString());
});
})->get();

Loading…
Cancel
Save