checkparam(__FUNCTION__, $arr); if (1 != $result['status']) { return $result; } $m_p = new partymodel(); //总数 $count = $m_p->getList([], 'count'); //当前活动 $time = date('Y-m-d H:i:s'); $where = [ ['isactive', '=', 1], ['start_time', '<=', $time], ['end_time', '>=', $time], ]; $info = $m_p->getInfo($where, ['name', 'id']); //报名企业数量 $wherePr = [ 'party_id' => $info['id'], ]; $m_p = new partyrecordmodel(); $prcount = $m_p->getListjoincompany($wherePr, 'count'); $data = [ 'count' => $count, 'info' => $info, 'prcount' => $prcount, ]; return backarr(1, '查询成功', $data); } /** * 获取公司信息 * 20220211 * wj */ public function getcompanyinfo($arr) { $result = $this->checkparam(__FUNCTION__, $arr); if (1 != $result['status']) { return $result; } $m_c = new companymodel(); //总数 $count = $m_c->getList([], 'count'); //获取分组 $where0 = ['ispass' => 0]; $where1 = ['ispass' => 1]; $where2 = ['ispass' => 2]; $count0 = $m_c->getList($where0, 'count'); $count1 = $m_c->getList($where1, 'count'); $count2 = $m_c->getList($where2, 'count'); $data = [ 'count' => empty($count) ? 0 : $count, 'count0' => empty($count0) ? 0 : $count0, 'count1' => empty($count1) ? 0 : $count1, 'count2' => empty($count2) ? 0 : $count2, ]; return backarr(1, '查询成功', $data); } /** * 获取用户信息 * 20220211 * wj */ public function getuserinfo($arr) { $result = $this->checkparam(__FUNCTION__, $arr); if (1 != $result['status']) { return $result; } $m_u = new usermodel(); //总数 $count = $m_u->getList([], 'count'); //获取分组 $where1 = ['is_active' => 1]; $where2 = ['company_id' => 1]; $count1 = $m_u->getList($where1, 'count'); $count2 = $m_u->getList($where2, 'count'); $count1 = empty($count1) ? 0 : $count1; $count2 = empty($count2) ? 0 : $count2; $data = [ 'count' => empty($count) ? 0 : $count, 'count_isactive_0' => $count - $count1, 'count_isactive_1' => $count1, /*'couunt_iscompany_0' => $count - $count2, 'couunt_iscompany_1' => $count2,*/ ]; return backarr(1, '查询成功', $data); } }