|
|
|
@ -24,8 +24,10 @@ class PlanController extends Controller
|
|
|
|
$first_day = date('Y-m-d', $first_day_timestamp); //当月第一天
|
|
|
|
$first_day = date('Y-m-d', $first_day_timestamp); //当月第一天
|
|
|
|
$last_day_timestamp = strtotime($month . '-01 +1 month -1 day');
|
|
|
|
$last_day_timestamp = strtotime($month . '-01 +1 month -1 day');
|
|
|
|
$last_day = date('Y-m-d', $last_day_timestamp); //当月最后一天
|
|
|
|
$last_day = date('Y-m-d', $last_day_timestamp); //当月最后一天
|
|
|
|
|
|
|
|
$currentDateTime = now();
|
|
|
|
$list=DB::table('plans')
|
|
|
|
$list=DB::table('plans')
|
|
|
|
->whereBetween('date',[$first_day,$last_day])->whereIn('status',[1])
|
|
|
|
->whereBetween('date',[$first_day,$last_day])->whereIn('status',[1])
|
|
|
|
|
|
|
|
->whereRaw('CONCAT(date, " ", time) >?', [$currentDateTime])
|
|
|
|
->whereRaw('JSON_CONTAINS(checkup_type_id, ?, "$")', [$checkup_type_id])
|
|
|
|
->whereRaw('JSON_CONTAINS(checkup_type_id, ?, "$")', [$checkup_type_id])
|
|
|
|
->where(['hospital_id'=>$hospital_id,'type'=>1])
|
|
|
|
->where(['hospital_id'=>$hospital_id,'type'=>1])
|
|
|
|
->whereIn('use_type',[0,$use_type]);
|
|
|
|
->whereIn('use_type',[0,$use_type]);
|
|
|
|
@ -90,10 +92,11 @@ class PlanController extends Controller
|
|
|
|
$checkup_type_id=(string)request('checkup_type_id');//体检类型表对应id
|
|
|
|
$checkup_type_id=(string)request('checkup_type_id');//体检类型表对应id
|
|
|
|
$amount=request('amount');//总金额
|
|
|
|
$amount=request('amount');//总金额
|
|
|
|
if(!isset($checkup_type_id)) return \Yz::echoError1("体检类型不能为空");
|
|
|
|
if(!isset($checkup_type_id)) return \Yz::echoError1("体检类型不能为空");
|
|
|
|
|
|
|
|
$currentDateTime = now();
|
|
|
|
$list=DB::table('plans')
|
|
|
|
$list=DB::table('plans')
|
|
|
|
->where('date',$date)->whereIn('status',[1,2])
|
|
|
|
->where('date',$date)->whereIn('status',[1,2])
|
|
|
|
|
|
|
|
->whereRaw('CONCAT(date, " ", time) >?', [$currentDateTime])
|
|
|
|
->whereRaw('JSON_CONTAINS(checkup_type_id, ?, "$")', [$checkup_type_id])
|
|
|
|
->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])
|
|
|
|
->where(['hospital_id'=>$hospital_id,'type'=>1])
|
|
|
|
->whereIn('use_type',[0,$use_type]);
|
|
|
|
->whereIn('use_type',[0,$use_type]);
|
|
|
|
if ($use_type == 1) {
|
|
|
|
if ($use_type == 1) {
|
|
|
|
@ -121,6 +124,7 @@ class PlanController extends Controller
|
|
|
|
|
|
|
|
|
|
|
|
$weeklist=DB::table('plans')
|
|
|
|
$weeklist=DB::table('plans')
|
|
|
|
->whereBetween('date',[$days7[0],$days7[6]])->whereIn('status',[1])
|
|
|
|
->whereBetween('date',[$days7[0],$days7[6]])->whereIn('status',[1])
|
|
|
|
|
|
|
|
->whereRaw('CONCAT(date, " ", time) >?', [$currentDateTime])
|
|
|
|
->whereRaw('JSON_CONTAINS(checkup_type_id, ?, "$")', [$checkup_type_id])
|
|
|
|
->whereRaw('JSON_CONTAINS(checkup_type_id, ?, "$")', [$checkup_type_id])
|
|
|
|
->where(['hospital_id'=>$hospital_id,'type'=>1])
|
|
|
|
->where(['hospital_id'=>$hospital_id,'type'=>1])
|
|
|
|
->whereIn('use_type',[0,$use_type]);
|
|
|
|
->whereIn('use_type',[0,$use_type]);
|
|
|
|
|