...
|
...
|
@@ -82,15 +82,24 @@ class Dashboard extends Backend |
|
|
$data[$k]['id'] = $v['id'];
|
|
|
$data[$k]['zhandian_name'] = $v['zhandian'];
|
|
|
$BaoXiuZhandian = Db::name('baoxiudan')->where('zhandian_id', $v['id'])->where($map)->select();
|
|
|
$BaoxiuWancheng = Db::name('baoxiudan')->where('zhandian_id', $v['id'])->where($map)->where('type', 2)->select();
|
|
|
$BaoxiuWeiWancheng = Db::name('baoxiudan')->where('zhandian_id', $v['id'])->where($map)->where('type', 1)->select();
|
|
|
$Round = round(count($BaoxiuWancheng) / count($BaoxiuArr) * 100, 2);
|
|
|
$WRound = round(count($BaoxiuWeiWancheng) / count($BaoxiuArr) * 100, 2);
|
|
|
if (empty($BaoXiuZhandian)) {
|
|
|
$data[$k]['baoxiu_num'] = 0;
|
|
|
$data[$k]['BaoXiuStr'] = '';
|
|
|
$data[$k]['Round'] = '无记录';
|
|
|
$data[$k]['WRound'] = '无记录';
|
|
|
|
|
|
} else {
|
|
|
$data[$k]['baoxiu_num'] = count($BaoXiuZhandian);
|
|
|
foreach ($BaoXiuZhandian as $k1 => $v1) {
|
|
|
$StrArr[$k1] = $v1['colum'];
|
|
|
}
|
|
|
$data[$k]['BaoXiuStr'] = implode($StrArr, ',');
|
|
|
$data[$k]['Round'] = $Round;
|
|
|
$data[$k]['WRound'] = $WRound;
|
|
|
}
|
|
|
}
|
|
|
$this->view->assign("row", $data);
|
...
|
...
|
|