|
@@ -88,8 +88,15 @@ class StatisticsService extends Service
|
|
|
}
|
|
|
|
|
|
foreach ($data as $value){
|
|
|
- if($value['fp_top_depart_id'] > 0){
|
|
|
+ if($value['top_depart_id'] == $value['fp_top_depart_id']){
|
|
|
if(isset($return[$value['fp_top_depart_id']])) $return[$value['fp_top_depart_id']]['total'] += 1;
|
|
|
+ }else{
|
|
|
+ if($value['fp_top_depart_id'] > 0){
|
|
|
+ if(isset($return[$value['fp_top_depart_id']])) $return[$value['fp_top_depart_id']]['total'] += 1;
|
|
|
+ }
|
|
|
+ if($value['top_depart_id'] > 0){
|
|
|
+ if(isset($return[$value['top_depart_id']])) $return[$value['top_depart_id']]['total'] += 1;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|