yanzai 1 year ago
parent 2824b6b711
commit a043cef78c

@ -22,7 +22,7 @@ class PlanController extends Controller
->where('date',$date)->whereIn('status',[1]) ->where('date',$date)->whereIn('status',[1])
->whereRaw('CONCAT(date, " ", time) >?', [$currentDateTime]) ->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,'is_del'=>0])
->where('is_vip','=',$is_vip); ->where('is_vip','=',$is_vip);
@ -37,7 +37,7 @@ class PlanController extends Controller
if(!$plan) return \Yz::echoError1("该号源不存在"); if(!$plan) return \Yz::echoError1("该号源不存在");
if($plan->status<>1) return \Yz::echoError1("该号源已被占用,请重新选择"); if($plan->status<>1) return \Yz::echoError1("该号源已被占用,请重新选择");
$u=DB::table('plans')->where(['id'=>$id,'status'=>1])->update(['status'=>2]); $u=DB::table('plans')->where(['id'=>$id,'status'=>1,'is_del'=>0])->update(['status'=>2]);
if($u){ if($u){
return \Yz::Return(true,'占用成功',['id'=>$id]); return \Yz::Return(true,'占用成功',['id'=>$id]);
}else{ }else{

Loading…
Cancel
Save