作者 王智

baoxiu22

@@ -84,8 +84,6 @@ class Dashboard extends Backend @@ -84,8 +84,6 @@ class Dashboard extends Backend
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(); 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(); 86 $BaoxiuWeiWancheng = Db::name('baoxiudan')->where('zhandian_id', $v['id'])->where($map)->where('type', 1)->select();
87 - $Round = round(count($BaoxiuWancheng) / count($BaoXiuZhandian) * 100, 2);  
88 - $WRound = round(count($BaoxiuWeiWancheng) / count($BaoXiuZhandian) * 100, 2);  
89 if (empty($BaoXiuZhandian)) { 87 if (empty($BaoXiuZhandian)) {
90 $data[$k]['baoxiu_num'] = 0; 88 $data[$k]['baoxiu_num'] = 0;
91 $data[$k]['BaoXiuStr'] = ''; 89 $data[$k]['BaoXiuStr'] = '';
@@ -97,6 +95,8 @@ class Dashboard extends Backend @@ -97,6 +95,8 @@ class Dashboard extends Backend
97 foreach ($BaoXiuZhandian as $k1 => $v1) { 95 foreach ($BaoXiuZhandian as $k1 => $v1) {
98 $StrArr[$k1] = $v1['colum']; 96 $StrArr[$k1] = $v1['colum'];
99 } 97 }
  98 + $Round = round(count($BaoxiuWancheng) / count($BaoXiuZhandian) * 100, 2);
  99 + $WRound = round(count($BaoxiuWeiWancheng) / count($BaoXiuZhandian) * 100, 2);
100 $data[$k]['BaoXiuStr'] = implode($StrArr, ','); 100 $data[$k]['BaoXiuStr'] = implode($StrArr, ',');
101 $data[$k]['Round'] = $Round . '%'; 101 $data[$k]['Round'] = $Round . '%';
102 $data[$k]['WRound'] = $WRound . '%'; 102 $data[$k]['WRound'] = $WRound . '%';