1234567891011121314151617181920212223242526272829303132 |
- <?php
- namespace Home\Controller;
- use Think\Controller;
- include '../Common/function.php';
- class BuildingManagementController extends ComController {
- public function index(){
- $data =I();
- $company_code=$data['companyid'];
- $company_data=M()->query("select owner_name,owner_address,building_id,xmlx from sp_owner_company where owner_id='".$company_code."'");
- $res=M()->query("select build_name,address from sp_building where id='".$company_data[0]['building_id']."'");
- $hj_device_data=M()->query("select count(*) as sl from sp_owner where company='".$company_code."' and dwtype=1");
- $sj_device_data=M()->query("select count(*) as sl from sp_owner where company='".$company_code."' and dwtype=2");
- $yg_device_data=M()->query("select count(*) as sl from sp_owner where company='".$company_code."' and dwtype=3");
- $yw_device_data=M()->query("select count(*) as sl from sp_owner where company='".$company_code."' and dwtype=5");
- $rtu_device_data=M()->query("select count(*) as sl from sp_owner where company='".$company_code."' and dwtype=6");
- $dq_device_data=M()->query("select count(*) as sl from sp_owner where company='".$company_code."' and dwtype=7");
- $sp_device_data=M()->query("select count(*) as sl from sp_owner where company='".$company_code."' and dwtype=16");
- $this->assign('hj_device_data',$hj_device_data[0]['sl']);
- $this->assign('sj_device_data',$sj_device_data[0]['sl']);
- $this->assign('yg_device_data',$yg_device_data[0]['sl']);
- $this->assign('yw_device_data',$yw_device_data[0]['sl']);
- $this->assign('rtu_device_data',$rtu_device_data[0]['sl']);
- $this->assign('dq_device_data',$dq_device_data[0]['sl']);
- $this->assign('sp_device_data',$sp_device_data[0]['sl']);
- $this->assign('company_code',$company_code);
- $this->assign('res',$res[0]);
- $this->assign('company_data',$company_data[0]);
- $this->display('Index/building_management');
- }
- }
|