|
@@ -3822,11 +3822,25 @@ class CameraApiController extends BaseController
|
|
->orderBy('t1.sort')
|
|
->orderBy('t1.sort')
|
|
->get();
|
|
->get();
|
|
|
|
|
|
|
|
+ $people_data = DB::connection('mysql_fwe10')->table('uf_xx_dkry as t')
|
|
|
|
+ ->select('t.xm','t.sort')
|
|
|
|
+ ->where('t.is_delete',0)
|
|
|
|
+ ->where('t.delete_type',0)
|
|
|
|
+ ->orderBy('t.sort')
|
|
|
|
+ ->get();
|
|
|
|
+
|
|
|
|
+ $people_map = [];
|
|
|
|
+ foreach ($people_data as $key => $value){
|
|
|
|
+ // dd($value);
|
|
|
|
+ $people_map[$value->xm] = 1;
|
|
|
|
+ }
|
|
|
|
+ // dd($people_map);
|
|
if(count($risk_data) > 0){
|
|
if(count($risk_data) > 0){
|
|
for($i=0;$i<count($risk_data);$i++){
|
|
for($i=0;$i<count($risk_data);$i++){
|
|
$people = explode('、',$risk_data[$i]->work_people);
|
|
$people = explode('、',$risk_data[$i]->work_people);
|
|
if(count($people) > 1){//多人
|
|
if(count($people) > 1){//多人
|
|
for($j=0;$j<count($people);$j++){
|
|
for($j=0;$j<count($people);$j++){
|
|
|
|
+ if (!isset($people_map[$people[$j]])) continue;
|
|
$result[$index]['area'] = $risk_data[$i]->area;
|
|
$result[$index]['area'] = $risk_data[$i]->area;
|
|
$result[$index]['unit'] = $risk_data[$i]->title;
|
|
$result[$index]['unit'] = $risk_data[$i]->title;
|
|
$work_num = DB::connection('mysql_fwe10')->table('uf_xx_risk_assignment')->whereBetween('create_time', [$start_time, $end_time])->where('is_delete',0)->where('delete_type',0)->whereNotNull('flow_id')->where('coal_washery_id',$risk_data[$i]->coal_washery_id)->count();
|
|
$work_num = DB::connection('mysql_fwe10')->table('uf_xx_risk_assignment')->whereBetween('create_time', [$start_time, $end_time])->where('is_delete',0)->where('delete_type',0)->whereNotNull('flow_id')->where('coal_washery_id',$risk_data[$i]->coal_washery_id)->count();
|
|
@@ -3838,6 +3852,7 @@ class CameraApiController extends BaseController
|
|
$index++;
|
|
$index++;
|
|
}
|
|
}
|
|
}else{//单人
|
|
}else{//单人
|
|
|
|
+ if (!isset($people_map[$risk_data[$i]->work_people])) continue;
|
|
$result[$index]['area'] = $risk_data[$i]->area;
|
|
$result[$index]['area'] = $risk_data[$i]->area;
|
|
$result[$index]['unit'] = $risk_data[$i]->title;
|
|
$result[$index]['unit'] = $risk_data[$i]->title;
|
|
|
|
|