|
@@ -82,15 +82,24 @@ class Dashboard extends Backend |
|
@@ -82,15 +82,24 @@ class Dashboard extends Backend |
82
|
$data[$k]['id'] = $v['id'];
|
82
|
$data[$k]['id'] = $v['id'];
|
83
|
$data[$k]['zhandian_name'] = $v['zhandian'];
|
83
|
$data[$k]['zhandian_name'] = $v['zhandian'];
|
84
|
$BaoXiuZhandian = Db::name('baoxiudan')->where('zhandian_id', $v['id'])->where($map)->select();
|
84
|
$BaoXiuZhandian = Db::name('baoxiudan')->where('zhandian_id', $v['id'])->where($map)->select();
|
|
|
85
|
+ $BaoxiuWancheng = Db::name('baoxiudan')->where('zhandian_id', $v['id'])->where($map)->where('type', 2)->select();
|
|
|
86
|
+ $BaoxiuWeiWancheng = Db::name('baoxiudan')->where('zhandian_id', $v['id'])->where($map)->where('type', 1)->select();
|
|
|
87
|
+ $Round = round(count($BaoxiuWancheng) / count($BaoxiuArr) * 100, 2);
|
|
|
88
|
+ $WRound = round(count($BaoxiuWeiWancheng) / count($BaoxiuArr) * 100, 2);
|
85
|
if (empty($BaoXiuZhandian)) {
|
89
|
if (empty($BaoXiuZhandian)) {
|
86
|
$data[$k]['baoxiu_num'] = 0;
|
90
|
$data[$k]['baoxiu_num'] = 0;
|
87
|
$data[$k]['BaoXiuStr'] = '';
|
91
|
$data[$k]['BaoXiuStr'] = '';
|
|
|
92
|
+ $data[$k]['Round'] = '无记录';
|
|
|
93
|
+ $data[$k]['WRound'] = '无记录';
|
|
|
94
|
+
|
88
|
} else {
|
95
|
} else {
|
89
|
$data[$k]['baoxiu_num'] = count($BaoXiuZhandian);
|
96
|
$data[$k]['baoxiu_num'] = count($BaoXiuZhandian);
|
90
|
foreach ($BaoXiuZhandian as $k1 => $v1) {
|
97
|
foreach ($BaoXiuZhandian as $k1 => $v1) {
|
91
|
$StrArr[$k1] = $v1['colum'];
|
98
|
$StrArr[$k1] = $v1['colum'];
|
92
|
}
|
99
|
}
|
93
|
$data[$k]['BaoXiuStr'] = implode($StrArr, ',');
|
100
|
$data[$k]['BaoXiuStr'] = implode($StrArr, ',');
|
|
|
101
|
+ $data[$k]['Round'] = $Round;
|
|
|
102
|
+ $data[$k]['WRound'] = $WRound;
|
94
|
}
|
103
|
}
|
95
|
}
|
104
|
}
|
96
|
$this->view->assign("row", $data);
|
105
|
$this->view->assign("row", $data);
|