1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- namespace catchAdmin\device\model;
- use \think\Model as Model;
- use catchAdmin\permissions\model\DataRangScopeTrait;
- use catchAdmin\device\model\get\StationGet;
- use think\facade\Db;
- class Station extends Model
- {
- use DataRangScopeTrait;
- use StationGet;
- protected $connection = 'oracle';
- // 表名
- public $name = 'dssc2.adm_dev';
- // 数据库字段映射
- public $field = array(
-
- );
- /**
- * 获取基站列表
- */
- public function getStationList($field, $order,$where=[])
- {
- $res = $this
- // ->dataRange()
- // ->catchSearch()
- ->where($where)
- ->alias('a')
- ->join('dssc2.adm_dev_rfid_chn n','a.DEVICE_CODE=n.DEVICE_CODE')
- ->field('a.ID,a.IS_ONLINE,a.LOGIN_NAME,a.DEVICE_CODE,a.DEVICE_NAME,a.OWNER_CODE,a.DEVICE_IP,a.DEVICE_PORT,to_char(a.UPDATE_DATE,\'yyyy-mm-dd hh24:mi:ss\') UPDATE_DATE,n.GPS_X as longitude,n.GPS_Y as latitude')
- // ->append(['depart_name', 'net_state', 'open_user_name', 'creator_name', 'model_text'])
- // ->order($this->aliasField($field), $order)
- ->paginate();
- // var_dump($this->getLastSql());
- return $res;
- }
-
-
- }
|