From f02bb1af53f82e2f9addb0eaab0032bd71246b14 Mon Sep 17 00:00:00 2001 From: yanzai Date: Fri, 11 Oct 2024 23:12:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=87=E6=9C=9F=E5=8F=B7=E6=BA=90=E4=B8=8D?= =?UTF-8?q?=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Laravel/app/Http/Controllers/API/H5/PlanController.php | 6 +++++- h5/pages/main/index/index.vue | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Laravel/app/Http/Controllers/API/H5/PlanController.php b/Laravel/app/Http/Controllers/API/H5/PlanController.php index f591da7..873400d 100644 --- a/Laravel/app/Http/Controllers/API/H5/PlanController.php +++ b/Laravel/app/Http/Controllers/API/H5/PlanController.php @@ -24,8 +24,10 @@ class PlanController extends Controller $first_day = date('Y-m-d', $first_day_timestamp); //当月第一天 $last_day_timestamp = strtotime($month . '-01 +1 month -1 day'); $last_day = date('Y-m-d', $last_day_timestamp); //当月最后一天 + $currentDateTime = now(); $list=DB::table('plans') ->whereBetween('date',[$first_day,$last_day])->whereIn('status',[1]) + ->whereRaw('CONCAT(date, " ", time) >?', [$currentDateTime]) ->whereRaw('JSON_CONTAINS(checkup_type_id, ?, "$")', [$checkup_type_id]) ->where(['hospital_id'=>$hospital_id,'type'=>1]) ->whereIn('use_type',[0,$use_type]); @@ -90,10 +92,11 @@ class PlanController extends Controller $checkup_type_id=(string)request('checkup_type_id');//体检类型表对应id $amount=request('amount');//总金额 if(!isset($checkup_type_id)) return \Yz::echoError1("体检类型不能为空"); + $currentDateTime = now(); $list=DB::table('plans') ->where('date',$date)->whereIn('status',[1,2]) + ->whereRaw('CONCAT(date, " ", time) >?', [$currentDateTime]) ->whereRaw('JSON_CONTAINS(checkup_type_id, ?, "$")', [$checkup_type_id]) - //->whereRaw('JSON_CONTAINS(CAST(checkup_type_id AS JSON), ?, "$")', ['"'.$checkup_type_id.'"']) ->where(['hospital_id'=>$hospital_id,'type'=>1]) ->whereIn('use_type',[0,$use_type]); if ($use_type == 1) { @@ -121,6 +124,7 @@ class PlanController extends Controller $weeklist=DB::table('plans') ->whereBetween('date',[$days7[0],$days7[6]])->whereIn('status',[1]) + ->whereRaw('CONCAT(date, " ", time) >?', [$currentDateTime]) ->whereRaw('JSON_CONTAINS(checkup_type_id, ?, "$")', [$checkup_type_id]) ->where(['hospital_id'=>$hospital_id,'type'=>1]) ->whereIn('use_type',[0,$use_type]); diff --git a/h5/pages/main/index/index.vue b/h5/pages/main/index/index.vue index 0ea1d4d..f23e395 100644 --- a/h5/pages/main/index/index.vue +++ b/h5/pages/main/index/index.vue @@ -261,7 +261,7 @@ - 10111151 + 10112145