1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- namespace app\api\business;
- use app\api\model\Jcdw;
- use app\common\lib\Arr;
- use app\common\lib\auth\JwtAuth;
- class TestUnitBus
- {
- private $rymc;
- public function __construct()
- {
- $jwtAuth=JwtAuth::getInstance();
- $this->rymc = $jwtAuth->getRymc();
- }
- public function selectTestUnit($data,$group_type,$pageNum=1,$pageSize=10)
- {
-
-
- $where=[
- ['groupname','=', $group_type,]
- ];
- if ($data['name'] != '' ) array_push($where, ['name', 'LIKE', '%'.$data['name'].'%']);
-
- $result = (new Jcdw())->getInfoList($where,$pageNum, $pageSize)->toArray();
-
- $data=(new Arr())->Arr_columns($result, 'id,name,groupname,ssqy');
-
- $count=(new Jcdw())->getInfoListCount($where);
- return ['rows'=>$data, 'total'=>$count,];
- }
- }
|