|
@@ -4385,6 +4385,8 @@ class CameraApiController extends BaseController
|
|
|
|
|
|
// 统计委外单位的数量
|
|
|
$outsourcedUnit_total = [];
|
|
|
+ // 统计作业总人数
|
|
|
+ $people_total = 0;
|
|
|
|
|
|
// 组织字典
|
|
|
foreach ($risk_list as $key=>$value) {
|
|
@@ -4395,6 +4397,8 @@ class CameraApiController extends BaseController
|
|
|
$outsourcedUnit_total[] = $value->wwdw;
|
|
|
}
|
|
|
|
|
|
+ $people_total += $value->work_num;
|
|
|
+
|
|
|
// 风险数量统计
|
|
|
$risk_level = $value->risk_level; // 风险类型
|
|
|
// 当 $risk_type_dict[$value->risk_type] 存在时取对应的值,不存在时取值 未知风险
|
|
@@ -4447,7 +4451,7 @@ class CameraApiController extends BaseController
|
|
|
$risk_zhong_info = ";";
|
|
|
}
|
|
|
|
|
|
- $res['risk_info'] = "1.委外施工单位共".count($outsourcedUnit_total)."个,总作业项:".$res['num']."项;高风险:".$res['gao']."项".$risk_gao_info."中风险:".$res['zhong']."项".$risk_zhong_info."低风险:".$res['di']."项。\n";
|
|
|
+ $res['risk_info'] = "1.委外施工单位共".count($outsourcedUnit_total)."个,总作业项:".$res['num']."项;高风险:".$res['gao']."项".$risk_gao_info."中风险:".$res['zhong']."项".$risk_zhong_info."低风险:".$res['di']."项;总作业人数:".$people_total."人。";
|
|
|
|
|
|
|
|
|
|
|
@@ -4463,6 +4467,7 @@ class CameraApiController extends BaseController
|
|
|
$coal_washery_risk_info_arr = $coal_washery_risk_list[$id];
|
|
|
$wwdw = [];
|
|
|
$sgdd = [];
|
|
|
+ $zyrs = 0;
|
|
|
|
|
|
$gao = 0;
|
|
|
$zhong = 0;
|
|
@@ -4476,6 +4481,7 @@ class CameraApiController extends BaseController
|
|
|
if (!in_array($temp,$sgdd)){
|
|
|
$sgdd[] = $temp;
|
|
|
}
|
|
|
+ $zyrs += $v->work_num;
|
|
|
if ($v->risk_level == 0){
|
|
|
$gao++;
|
|
|
} else if ($v->risk_level == 1){
|
|
@@ -4488,25 +4494,22 @@ class CameraApiController extends BaseController
|
|
|
$level_total = '';
|
|
|
if ($gao > 0) $level_total .= '高风险'.$gao."项\n";
|
|
|
if ($zhong > 0) $level_total .= '中风险'.$zhong."项\n";
|
|
|
- if ($di > 0) $level_total .= '低风险'.$di.'项';
|
|
|
+ if ($di > 0) $level_total .= '低风险'.$di."项\n";
|
|
|
+ $level_total = mb_substr($level_total, 0, mb_strlen($level_total) - 1);
|
|
|
|
|
|
$wwdw_num = count($wwdw);
|
|
|
$sgdd_num = count($sgdd);
|
|
|
$var1 = implode('、',$wwdw);
|
|
|
$var2 = implode('、',$sgdd);
|
|
|
|
|
|
- if (++$index_1==1){
|
|
|
- $total2 .= '2.'.$index_1.'.'.$value->title.'引进委外单位'.$wwdw_num.'个('.$var1.'),'.'作业厂点'.$sgdd_num.'个('.$var2.");\n";
|
|
|
- } else{
|
|
|
- $total2 .= "\t\t\t".$index_1.'.'.$value->title.'引进委外单位'.$wwdw_num.'个('.$var1.'),'.'作业厂点'.$sgdd_num.'个('.$var2.");\n";
|
|
|
- }
|
|
|
+// $total2 .= ++$index_1.'.'.$value->title.'引进委外单位'.$wwdw_num.'个('.$var1.'),'.'作业单位'.$sgdd_num.'个('.$var2."),作业人数:".$zyrs."人。\n";
|
|
|
+ $total2 .= ++$index_1.'.'.$value->title.'引进委外单位'.$wwdw_num.'个,作业单位'.$sgdd_num.'个,作业人数:'.$zyrs."人。\n";
|
|
|
|
|
|
|
|
|
$line = [
|
|
|
'index' => '',
|
|
|
- 'gao' => '',
|
|
|
- 'zhong' => '',
|
|
|
- 'di' => '',
|
|
|
+ 'fxdj' => '',
|
|
|
+ 'fxlx' => '',
|
|
|
'coal_washery' => '',
|
|
|
'wwdw'=>'',
|
|
|
'wwdw_num'=>'',
|
|
@@ -4514,46 +4517,65 @@ class CameraApiController extends BaseController
|
|
|
'level' => "",
|
|
|
'content' => '',
|
|
|
'place' => '',
|
|
|
+ 'dkr' => '',
|
|
|
+ 'zrs' => $zyrs,
|
|
|
+ 'rs' => 0,
|
|
|
];
|
|
|
|
|
|
$risk_index = 0;
|
|
|
foreach ($coal_washery_risk_info_arr as $k => $v) {
|
|
|
|
|
|
|
|
|
- $line['index'] = $index_1;
|
|
|
+ $line['index'] = ++$risk_index;
|
|
|
$line['wwdw_num'] = $wwdw_num;
|
|
|
$line['coal_washery'] = $value->title;
|
|
|
$line['work_place_num'] = $v->sgdsl;
|
|
|
$line['wwdw'] = $v->wwdw;
|
|
|
- $line['place'] = $temp;
|
|
|
+ $line['place'] = $coal_washery_dict[$v->sgdd]->title;
|
|
|
$line['level'] = $level_total;
|
|
|
+ $line['content'] = $v->risk_name;
|
|
|
+ $line['dkr'] = $v->work_people;
|
|
|
+ $line['rs'] = $v->work_num;
|
|
|
|
|
|
- $risk_info = '';
|
|
|
if ($v->risk_level == 0) {
|
|
|
- $line['gao'] = 1;
|
|
|
- $line['zhong'] = '';
|
|
|
- $line['di'] = '';
|
|
|
- if($v->risk_type != null) {
|
|
|
- $risk_info = '(' . $risk_desc[$v->risk_level] . ',' . $risk_type_dict[$v->risk_type] . ')';
|
|
|
- }else{
|
|
|
- $risk_info = '('.$risk_desc[$v->risk_level].')';
|
|
|
- }
|
|
|
- } else if ($v->risk_level == 1) {
|
|
|
- $line['gao'] = '';
|
|
|
- $line['zhong'] = 1;
|
|
|
- $line['di'] = '';
|
|
|
- if($v->risk_type != null){
|
|
|
- $risk_info = '('.$risk_desc[$v->risk_level].','.$risk_type_dict[$v->risk_type].')';
|
|
|
- }else{
|
|
|
- $risk_info = '('.$risk_desc[$v->risk_level].')';
|
|
|
- }
|
|
|
+ $line['fxdj'] = '高风险';
|
|
|
+ } elseif ($v->risk_level == 1) {
|
|
|
+ $line['fxdj'] = '中风险';
|
|
|
} else {
|
|
|
- $line['gao'] = '';
|
|
|
- $line['zhong'] = '';
|
|
|
- $line['di'] = 1;
|
|
|
+ $line['fxdj'] = '低风险';
|
|
|
+ }
|
|
|
+ if($v->risk_type != null) {
|
|
|
+ $line['fxlx'] = $risk_type_dict[$v->risk_type];
|
|
|
+ }else{
|
|
|
+ $line['fxlx'] = '未知';
|
|
|
}
|
|
|
|
|
|
- $line['content'] = ++$risk_index.".".$v->risk_name.$risk_info."盯控人:".$v->work_people;
|
|
|
+// $risk_info = '';
|
|
|
+// if ($v->risk_level == 0) {
|
|
|
+// $line['gao'] = 1;
|
|
|
+// $line['zhong'] = '';
|
|
|
+// $line['di'] = '';
|
|
|
+// if($v->risk_type != null) {
|
|
|
+// $risk_info = '(' . $risk_desc[$v->risk_level] . ',' . $risk_type_dict[$v->risk_type] . ')';
|
|
|
+// }else{
|
|
|
+// $risk_info = '('.$risk_desc[$v->risk_level].')';
|
|
|
+// }
|
|
|
+// } else if ($v->risk_level == 1) {
|
|
|
+// $line['gao'] = '';
|
|
|
+// $line['zhong'] = 1;
|
|
|
+// $line['di'] = '';
|
|
|
+// if($v->risk_type != null){
|
|
|
+// $risk_info = '('.$risk_desc[$v->risk_level].','.$risk_type_dict[$v->risk_type].')';
|
|
|
+// }else{
|
|
|
+// $risk_info = '('.$risk_desc[$v->risk_level].')';
|
|
|
+// }
|
|
|
+// } else {
|
|
|
+// $line['gao'] = '';
|
|
|
+// $line['zhong'] = '';
|
|
|
+// $line['di'] = 1;
|
|
|
+// }
|
|
|
+
|
|
|
+// $line['content'] = $v->risk_name.$risk_info."盯控人:".$v->work_people;
|
|
|
|
|
|
$res['risk_list'][] = $line;
|
|
|
|
|
@@ -4564,7 +4586,7 @@ class CameraApiController extends BaseController
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- $res['risk_info'] .= $total2;
|
|
|
+ $res['risk_info2'] = $total2;
|
|
|
|
|
|
/**
|
|
|
*
|
|
@@ -4579,12 +4601,18 @@ class CameraApiController extends BaseController
|
|
|
|
|
|
}
|
|
|
|
|
|
+ $uniqueKeys = array_keys($work_place_list);
|
|
|
+ $count1 = count($uniqueKeys);
|
|
|
+ $var3 = (int) ($count1 / 2);
|
|
|
+
|
|
|
|
|
|
$total3 = '';
|
|
|
+ $total4 = '';
|
|
|
$index_2 = 0;
|
|
|
foreach ($coal_washery_dict as $key=>$value) {
|
|
|
$dd_wwdw = [];
|
|
|
$dd_sgdsl = 0;
|
|
|
+ $workNumber = 0;
|
|
|
$id = $value->ID;
|
|
|
|
|
|
if (isset($work_place_list[$id])) {
|
|
@@ -4596,19 +4624,25 @@ class CameraApiController extends BaseController
|
|
|
$dd_wwdw[] = $v->wwdw;
|
|
|
}
|
|
|
$dd_sgdsl += $v->sgdsl;
|
|
|
+ $workNumber += $v->work_num;
|
|
|
}
|
|
|
|
|
|
- if (++$index_2 == 1) {
|
|
|
- $total3 .= '3.'.$index_2.'.'.$value->title.'委外作业'.count($work_place_list_arr).'项,委外施工单位'.count($dd_wwdw).'个,施工点'.$dd_sgdsl."个;\n";
|
|
|
- }else{
|
|
|
- $total3 .= "\t\t\t".$index_2.'.'.$value->title.'委外作业'.count($work_place_list_arr).'项,委外施工单位'.count($dd_wwdw).'个,施工点'.$dd_sgdsl."个;\n";
|
|
|
+// $total3 .= ++$index_2.'.'.$value->title.'委外作业'.count($work_place_list_arr).'项,委外施工单位'.count($dd_wwdw).'个,施工点'.$dd_sgdsl."个;\n";
|
|
|
+ if (++$index_2<=$var3){
|
|
|
+ $total3 .= $index_2.'.'.$value->title.'委外作业'.count($work_place_list_arr).'项,作业人数:'.$workNumber."人;\n";
|
|
|
+ } else{
|
|
|
+ $total4 .= $index_2.'.'.$value->title.'委外作业'.count($work_place_list_arr).'项,作业人数:'.$workNumber."人;\n";
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- $res['risk_info'] .= $total3;
|
|
|
+
|
|
|
+
|
|
|
+ $res['risk_info3'] = $total3;
|
|
|
+ $res['risk_info4'] = $total4;
|
|
|
|
|
|
|
|
|
|