diff --git a/include/class/table_theme.class.php b/include/class/table_theme.class.php index ae57448..f5a5a93 100644 --- a/include/class/table_theme.class.php +++ b/include/class/table_theme.class.php @@ -732,7 +732,7 @@ class table_theme { //位置 //位置 $this->select2 = [ - '_fiend' => ['veaps','位置'], + '_fiend' => ['e_aps','位置'], 'placeholder' => '可选择多个位置', 'fiend' => 'p_value', 'tname' => 'para', @@ -741,8 +741,6 @@ class table_theme { 'condition' => 'p_type|||0' ]; $this->search['left'][] = self::input_select_search_multiple(); -// $para = $tsql->table('para')->where(['p_type' => 0])->all(); -// $this->search['left'][] = self::para_select($para,['e_aps','位置']); $this->search['left'][] = self::input_search('e_number','输入广告位编号'); //状态 // $this->search[] = self::para_select([['禁用',0],['启用',1]],['e_enable','状态'],true); diff --git a/include/traits/tdata.class.php b/include/traits/tdata.class.php index 2f76be2..c700164 100644 --- a/include/traits/tdata.class.php +++ b/include/traits/tdata.class.php @@ -32,13 +32,7 @@ trait tdata { case 'applan': //判断是否可选的依据 if(!empty($this->form['slid'])) $where = " AND nla.id != '{$this->form['slid']}' "; - - // 不考虑导出的情况 - if(is_array($this->form['veaps'])){ - $veaps = parent::strchange(array_filter($this->form['veaps'])); - $this->villages_where = " e_aps IN($veaps) "; - } - + //表 $sqlk = " {$_YW['k']['elevator']} AS el " . "LEFT JOIN (SELECT * FROM( SELECT DISTINCT( nel.e_number ) AS nowe_number,ANY_VALUE( nla.id ) AS nowid,ANY_VALUE( nla.l_title ) AS nowtitle,ANY_VALUE( nla.l_starttime ) AS nowstime,ANY_VALUE( nla.l_endtime ) AS nowetime,if(NOT ( nla.l_endtime < '{$curdate}' OR nla.l_starttime > '{$curdate}' ) OR nla.l_starttime > '{$curdate}',1,0) AS estate FROM {$_YW['k']['elevator']} AS nel LEFT JOIN {$_YW['k']['launch']} AS nla ON find_in_set( nel.e_number, nla.l_enumber ) WHERE NOT ( nla.l_endtime < '{$curdate}' OR nla.l_starttime > '{$curdate}' ) AND nla.id IS NOT NULL ORDER BY nowstime ASC ) eala GROUP BY nowe_number ) ala ON ala.nowe_number = el.e_number " @@ -300,7 +294,11 @@ trait tdata { $this->search_input = ['e_number']; $this->search_other = ['e_bno','e_vid','e_enable']; $where .= self::td_search(); - if(is_array($this->form['veaps'])) $where .= " AND {$this->villages_where} "; + if(is_array($this->form['e_aps'])) { + // 不考虑导出的情况 + $veaps = parent::strchange(array_filter($this->form['e_aps'])); + $where .= " AND e_aps IN($veaps) "; + } break; case 'elevators': $this->search_input = ['e_number'];