统计bug修正

master
zhengyongxing 5 years ago
parent b7fdcf38f6
commit 4f27c2fb29

@ -1668,8 +1668,8 @@ class StatController extends ThinkController
if ($start != $end) {
$table['sum']['active'] = $this->getActiveDeviceNum(['time'=>array('between',[$starttime,$endtime])]);
$table['average']['active'] = number_format($table['sum']['active']/(((($endtime+1)-$starttime)/86400)),2,'.','');
$table['duplicate']['active'] = $this->getActiveDeviceNum(['time'=>array('between',[$starttime,$endtime])]);
$table['average']['active'] = number_format($table['duplicate']['active']/(((($endtime+1)-$starttime)/86400)),2,'.','');
// var_dump($endtime-$starttime);die();
}

@ -277,7 +277,7 @@
</div>
</div>
<div class="htchart_area_tab <eq name='Think.get.tb' value='1'>show</eq>">
<div class="highchart_area_notice"><span>合计(去重) {$table.sum.active|default=0}</span><span>日均 {$table.average.active|default=0}</span></div>
<div class="highchart_area_notice"><span>合计(去重) {$table.duplicate.active|default=0}</span><span>日均 {$table.average.active|default=0}</span></div>
<div class="highchart_area">
<div class="highchart_area_tab" id="container2" style="width:100%;height:220px;"></div>
</div>

Loading…
Cancel
Save