|
|
|
|
@ -36,7 +36,7 @@ class PlanController extends Controller
|
|
|
|
|
// $planType = DB::table('plan_type as a')->where(['a.id' => $model->plan_type, 'a.is_del' => 0, 'a.status' => 1])->first();
|
|
|
|
|
// if (!$planType) return \Yz::echoError1('号源类型不可用');
|
|
|
|
|
//查询此时间段内是否有已经生成的号源
|
|
|
|
|
$cha = DB::table('plans')->whereBetween('date', $Info['dateRange'])->get();
|
|
|
|
|
$cha = DB::table('plans')->whereBetween('date', $Info['dateRange'])->where(['is_del'=>0])->get();
|
|
|
|
|
if (count($cha) > 0) {
|
|
|
|
|
return \Yz::return(false, '号源重复', ['list' => $cha]);
|
|
|
|
|
}
|
|
|
|
|
@ -133,7 +133,7 @@ class PlanController extends Controller
|
|
|
|
|
public function GetDetail()
|
|
|
|
|
{
|
|
|
|
|
$id = request('id');
|
|
|
|
|
$info = DB::table('plans')->where(['id' => $id])->first();
|
|
|
|
|
$info = DB::table('plans')->where(['id' => $id,'is_del'=>0])->first();
|
|
|
|
|
if (!!$info) {
|
|
|
|
|
if(empty($info->checkup_type_id)){
|
|
|
|
|
$info->checkup_type_id='[]';
|
|
|
|
|
@ -209,4 +209,15 @@ class PlanController extends Controller
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
public function Del()
|
|
|
|
|
{
|
|
|
|
|
$ids = request('ids');
|
|
|
|
|
$del=DB::table('plans')->whereIn('id', $ids)->where(['status'=>1])->update(['is_del'=>1]);
|
|
|
|
|
if($del){
|
|
|
|
|
return \Yz::Return(true, '操作成功', []);
|
|
|
|
|
}else{
|
|
|
|
|
return \Yz::echoError1('操作失败');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|