考号分配完成
This commit is contained in:
1 parent
2812af8a53
commit
97b3247998
12 files changed
+32
-21
No files matched your search
@@ -8,7 +8,6 @@ use think\exception\ValidateException;
|
||||
use think\Validate;
|
||||
use app\middleware\UserLogin;
|
||||
use app\middleware\Auth;
|
||||
use think\View;
|
||||
|
||||
|
||||
/**
|
||||
@@ -55,6 +54,7 @@ abstract class BaseController
|
||||
$this->app = $app;
|
||||
$this->request = $this->app->request;
|
||||
$this->view = $this->app->view;
|
||||
// $this->error = $this->app->Jump;
|
||||
|
||||
// 控制器初始化
|
||||
$this->initialize();
|
||||
@@ -103,6 +103,6 @@ abstract class BaseController
|
||||
return $v->failException(true)->check($data);
|
||||
}
|
||||
|
||||
|
||||
use \liliuwei\think\Jump;
|
||||
|
||||
}
|
||||
+3
-4
@@ -305,12 +305,13 @@ function array_cover( $cover = array(), $covered = array() )
|
||||
/**
|
||||
* 根据考试ID值,判断考试是否已经结束
|
||||
* $kaoshiid 考试ID
|
||||
* $str 统计项目
|
||||
* 返回 $data
|
||||
* */
|
||||
function enddate($kaoshiid)
|
||||
function kaoshiDate($kaoshiid,$str)
|
||||
{
|
||||
$ks = new app\kaoshi\model\Kaoshi;
|
||||
$enddate = $ks->where('id',$kaoshiid)->value('enddate');
|
||||
$enddate = $ks->where('id',$kaoshiid)->value($str);
|
||||
|
||||
$thistime = time();
|
||||
if($enddate<time())
|
||||
@@ -319,9 +320,7 @@ function enddate($kaoshiid)
|
||||
}else{
|
||||
$data = false;
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ use think\Validate;
|
||||
class Kaohao extends BaseController
|
||||
{
|
||||
// 生成考号
|
||||
public function index($kaoshi)
|
||||
public function create($kaoshi)
|
||||
{
|
||||
|
||||
// 获取参考年级
|
||||
@@ -48,7 +48,7 @@ class Kaohao extends BaseController
|
||||
'webtitle'=>'生成考号',
|
||||
'butname'=>'生成',
|
||||
'formpost'=>'POST',
|
||||
'url'=>'/kaoshi/kaohao',
|
||||
'url'=>'/kaoshi/kaohao/save',
|
||||
'kaoshi'=>$kaoshi
|
||||
);
|
||||
|
||||
@@ -79,7 +79,7 @@ class Kaohao extends BaseController
|
||||
return ['msg'=>$msg,'val'=>0];
|
||||
}
|
||||
|
||||
if(enddate($list['kaoshi']))
|
||||
if(kaoshiDate($list['kaoshi'],'bfdate'))
|
||||
{
|
||||
return ['msg'=>'考试已经结束,不能分配考号','val'=>0];
|
||||
}
|
||||
|
||||
Loaded 3 of 12 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user