From 6cc0b93c67c2277a8d7e2554fe3a2cbab65fcf12 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 11 Jan 2024 10:59:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/project/controller/Project.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/application/project/controller/Project.php b/application/project/controller/Project.php index fff98cd..24a05e6 100755 --- a/application/project/controller/Project.php +++ b/application/project/controller/Project.php @@ -571,6 +571,25 @@ class Project extends BasicApi Db::name('positioning')->insert(['member_code'=>$member_code,'positioning'=>$positioning,'date'=>date('Y-m-d H:i:s')]); } $this->success(''); + } + + public function positioning_list($department_code=''){ + if($department_code){ + $select= MemberAccount::where('department_code',$department_code)->where('status',1)->field('name,avatar,member_code')->select(); + }else{ + $select=Member::where('status',1)->field('name,avatar,member_code')->select(); + } + $data=[]; + foreach($select as $k=>$v){ + $data[]=[ + 'name'=>$v['name'], + 'avatar'=>$v['avatar'], + 'member_code'=>$v['member_code'], + 'positioning'=>Db::name('positioning')->where(['member_code'=>$v['member_code']])->order('date desc')->value('positioning'), + ]; + } + $this->success('',$data); } + }