信呼OA版本v2.3.8
This commit is contained in:
48
webmain/model/agent/daibanModel.php
Normal file
48
webmain/model/agent/daibanModel.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
class agent_daibanClassModel extends agentModel
|
||||
{
|
||||
public function initModel()
|
||||
{
|
||||
$this->settable('flow_bill');
|
||||
}
|
||||
|
||||
public function gettotal()
|
||||
{
|
||||
$stotal = $this->getdbtotal($this->adminid);
|
||||
$titles = '';
|
||||
return array('stotal'=>$stotal,'titles'=> $titles);
|
||||
}
|
||||
|
||||
private function getdbtotal($uid)
|
||||
{
|
||||
$stotal = m('flowbill')->daibanshu($uid);
|
||||
return $stotal;
|
||||
}
|
||||
|
||||
protected function agenttotals($uid)
|
||||
{
|
||||
return array(
|
||||
'daiban' => $this->getdbtotal($uid)
|
||||
);
|
||||
}
|
||||
|
||||
protected function agentdata($uid, $lx)
|
||||
{
|
||||
$atype = $this->agentnum.'_'.$lx;
|
||||
$dbss = m('flowbill');
|
||||
$arr = $dbss->getrecord($uid, $atype, $this->page, $this->limit, 0);
|
||||
if($atype=='daiban_daib'){
|
||||
$rows = $arr['rows'];
|
||||
if($rows){
|
||||
$arr['rows'] = $rows;
|
||||
}
|
||||
}
|
||||
$sdar = $this->db->getall('select `modeid` from `[Q]flow_bill` where '.$dbss->nowwhere.' group by `modeid`');
|
||||
$idss = '0';
|
||||
foreach($sdar as $k=>$rs)$idss.=','.$rs['modeid'].'';
|
||||
|
||||
$arr['modearr'] = m('mode')->getmodearr('and `id` in('.$idss.')');
|
||||
|
||||
return $arr;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user