From 136f6aa8b7ddd53ae850480a271ca1eaf32f4ecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=BA=E5=93=A5?= Date: Thu, 25 Nov 2021 06:32:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=8F=AD=E7=BA=A7=E6=88=90?= =?UTF-8?q?=E7=BB=A9=E4=B8=8B=E8=BD=BD=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chengji/model/TongjiBj.php | 8 -------- app/teach/model/Banji.php | 6 ++++++ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/app/chengji/model/TongjiBj.php b/app/chengji/model/TongjiBj.php index 3aa0af07..2dff14bf 100755 --- a/app/chengji/model/TongjiBj.php +++ b/app/chengji/model/TongjiBj.php @@ -289,10 +289,6 @@ class TongjiBj extends BaseModel $src = array( 'kaoshi_id' => '' ,'banji_id' => array() - ,'auth' => [ - 'check' => true - ,'banji_id' => array() - ] ); $src = array_cover($srcfrom, $src); $src['banji_id'] = strToarray($src['banji_id']); @@ -305,10 +301,6 @@ class TongjiBj extends BaseModel $tongjiJg = $this ->where('kaoshi_id', $src['kaoshi_id']) ->where('banji_id', 'in', $src['banji_id']) - ->when($src['auth']['check'] == true, function ($query) use($src) { - $query->where('banji_id', 'in', $src['auth']['banji_id']) - ->whereOr('teacher_id', session('user_id')); - }) ->field('banji_id, kaoshi_id') ->with([ 'bjBanji '=> function ($query) { diff --git a/app/teach/model/Banji.php b/app/teach/model/Banji.php index b489875b..809fec83 100755 --- a/app/teach/model/Banji.php +++ b/app/teach/model/Banji.php @@ -340,6 +340,12 @@ class Banji extends BaseModel // 生成年级名 public function gradeName($riqi, $category = 'str') { + // 转换日期格式 + if(!is_numeric($riqi)) + { + $riqi = strtotime($riqi); + } + // 定义学年时间节点日期为每年的8月1日 // $yd = '8-1'; $sysClass = \app\facade\System::sysClass();