|
@@ -826,7 +826,7 @@ class CameraApiController extends BaseController
|
|
|
//海康切片逻辑
|
|
//海康切片逻辑
|
|
|
else{
|
|
else{
|
|
|
//暂时关了ffmpeg
|
|
//暂时关了ffmpeg
|
|
|
-// $result = CameraServices::downloadCameraFiles($parent_id, $camera_id);
|
|
|
|
|
|
|
+ $result = CameraServices::downloadCameraFiles($parent_id, $camera_id);
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
//判断硬盘录像机的有没有封面图,有的走easydrawin,没有的走ffmpeg
|
|
//判断硬盘录像机的有没有封面图,有的走easydrawin,没有的走ffmpeg
|
|
@@ -3378,7 +3378,7 @@ class CameraApiController extends BaseController
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
if ($area_id == 1055262899082551297){
|
|
if ($area_id == 1055262899082551297){
|
|
|
- $res['people_info'] = "太西片区作业人数:" . ($ziying_people + $waiwei_people) ."人;其中:内部:".$ziying_people."人,外委施工:".$waiwei_people."人";
|
|
|
|
|
|
|
+ $res['people_info'] = "作业人数:" . ($ziying_people + $waiwei_people) ."人;其中:内部:".$ziying_people."人,外委施工:".$waiwei_people."人";
|
|
|
} else{
|
|
} else{
|
|
|
$res['people_info'] = "作业人数:" . ($ziying_people + $waiwei_people) ."人;其中:内部:".$ziying_people."人,外委施工:".$waiwei_people."人";
|
|
$res['people_info'] = "作业人数:" . ($ziying_people + $waiwei_people) ."人;其中:内部:".$ziying_people."人,外委施工:".$waiwei_people."人";
|
|
|
}
|
|
}
|
|
@@ -3580,7 +3580,7 @@ class CameraApiController extends BaseController
|
|
|
$mark = $params['mark'];
|
|
$mark = $params['mark'];
|
|
|
if ($mark == 0){
|
|
if ($mark == 0){
|
|
|
foreach ($type_list as $item) {
|
|
foreach ($type_list as $item) {
|
|
|
- if ($item["area"] == "宁东片区") {
|
|
|
|
|
|
|
+ if ($item["area"] == "洗选中心") {
|
|
|
$result_list[] = $item;
|
|
$result_list[] = $item;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -3637,7 +3637,18 @@ class CameraApiController extends BaseController
|
|
|
$tx_di = '无低风险作业;';
|
|
$tx_di = '无低风险作业;';
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $result['remark'] = '备注:宁东片区'.$nd_gao.$nd_zhong.$nd_di.'太西片区'.$tx_gao.$tx_zhong.$tx_di;
|
|
|
|
|
|
|
+ // $result['remark'] = '备注:宁东片区'.$nd_gao.$nd_zhong.$nd_di.'太西片区'.$tx_gao.$tx_zhong.$tx_di;
|
|
|
|
|
+
|
|
|
|
|
+ if(isset($params['mark'])){
|
|
|
|
|
+ $mark = $params['mark'];
|
|
|
|
|
+ if ($mark == 0){
|
|
|
|
|
+ $result['remark'] = '备注:洗选中心'.$nd_gao.$nd_zhong.$nd_di;
|
|
|
|
|
+ }elseif ($mark == 1){
|
|
|
|
|
+ $result['remark'] = '备注:太西片区'.$tx_gao.$tx_zhong.$tx_di;
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $result['remark'] = '备注:宁东片区'.$nd_gao.$nd_zhong.$nd_di.'太西片区'.$tx_gao.$tx_zhong.$tx_di;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
return $result;
|
|
return $result;
|
|
|
}
|
|
}
|
|
@@ -3738,7 +3749,7 @@ class CameraApiController extends BaseController
|
|
|
$mark = $params['mark'];
|
|
$mark = $params['mark'];
|
|
|
if ($mark == 0){
|
|
if ($mark == 0){
|
|
|
foreach ($camera_list as $item) {
|
|
foreach ($camera_list as $item) {
|
|
|
- if ($item["area"] == "宁东片区") {
|
|
|
|
|
|
|
+ if ($item["area"] == "洗选中心") {
|
|
|
$result_list[] = $item;
|
|
$result_list[] = $item;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -3808,21 +3819,21 @@ class CameraApiController extends BaseController
|
|
|
$risk_level = $value->risk_level;
|
|
$risk_level = $value->risk_level;
|
|
|
if ($risk_level == 0) {
|
|
if ($risk_level == 0) {
|
|
|
++$level_arr['gao']['con'];
|
|
++$level_arr['gao']['con'];
|
|
|
- if ($value->title == '宁东片区') {
|
|
|
|
|
|
|
+ if ($value->title == '洗选中心') {
|
|
|
++$level_arr['gao']['nd'];
|
|
++$level_arr['gao']['nd'];
|
|
|
} else if ($value->title == '太西片区') {
|
|
} else if ($value->title == '太西片区') {
|
|
|
++$level_arr['gao']['tx'];
|
|
++$level_arr['gao']['tx'];
|
|
|
}
|
|
}
|
|
|
} else if ($risk_level == 1) {
|
|
} else if ($risk_level == 1) {
|
|
|
++$level_arr['zhong']['con'];
|
|
++$level_arr['zhong']['con'];
|
|
|
- if ($value->title == '宁东片区') {
|
|
|
|
|
|
|
+ if ($value->title == '洗选中心') {
|
|
|
++$level_arr['zhong']['nd'];
|
|
++$level_arr['zhong']['nd'];
|
|
|
} else if ($value->title == '太西片区') {
|
|
} else if ($value->title == '太西片区') {
|
|
|
++$level_arr['zhong']['tx'];
|
|
++$level_arr['zhong']['tx'];
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
++$level_arr['di']['con'];
|
|
++$level_arr['di']['con'];
|
|
|
- if ($value->title == '宁东片区') {
|
|
|
|
|
|
|
+ if ($value->title == '洗选中心') {
|
|
|
++$level_arr['di']['nd'];
|
|
++$level_arr['di']['nd'];
|
|
|
} else if ($value->title == '太西片区') {
|
|
} else if ($value->title == '太西片区') {
|
|
|
++$level_arr['di']['tx'];
|
|
++$level_arr['di']['tx'];
|
|
@@ -3857,6 +3868,135 @@ class CameraApiController extends BaseController
|
|
|
|
|
|
|
|
return $data;
|
|
return $data;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 导出完成情况统计2.0
|
|
|
|
|
+ public function export3TotalV20(Request $request){
|
|
|
|
|
+ $params = $request->all();
|
|
|
|
|
+ $result = '';
|
|
|
|
|
+
|
|
|
|
|
+ if(isset($params['date'])){
|
|
|
|
|
+ $date = $params['date'];
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $date = date('Y-m-d');
|
|
|
|
|
+ }
|
|
|
|
|
+ $area = "";
|
|
|
|
|
+ if(isset($params['mark'])){
|
|
|
|
|
+ $mark = $params['mark'];
|
|
|
|
|
+ if ($mark == 0) {
|
|
|
|
|
+ $area = "洗选中心";
|
|
|
|
|
+ }elseif ($mark == 1) {
|
|
|
|
|
+ $area = "太西片区";
|
|
|
|
|
+ }else {
|
|
|
|
|
+ $area = "";
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $date = date('Y-m-d');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ $risk_data = DB::connection('mysql_fwe10')->table('uf_xx_risk_assignment as t')
|
|
|
|
|
+ ->select('t.*','t1.obj_type','t2.title')
|
|
|
|
|
+ ->leftJoin('uf_xx_coal_washery as t1', 't.coal_washery_id', '=', 't1.id')
|
|
|
|
|
+ ->leftJoin('uf_xx_area as t2', 't1.area_id', '=', 't2.id')
|
|
|
|
|
+ ->whereDate('t.create_time', $date)
|
|
|
|
|
+ ->where('t.is_delete',0)
|
|
|
|
|
+ ->where('t2.title',$area)
|
|
|
|
|
+ ->where('t.risk_level','<>', 2)
|
|
|
|
|
+ ->where('t.is_delete',0)
|
|
|
|
|
+ ->where('t.delete_type',0)
|
|
|
|
|
+ ->where('t.current_step','结束节点')
|
|
|
|
|
+ ->whereNotNull('t.flow_id')
|
|
|
|
|
+ ->get();
|
|
|
|
|
+
|
|
|
|
|
+ $level_arr = [
|
|
|
|
|
+ 'gao'=>[
|
|
|
|
|
+ 'title'=>'高',
|
|
|
|
|
+ 'con'=>0,
|
|
|
|
|
+ 'ywc'=>0,
|
|
|
|
|
+ 'wwc'=>0
|
|
|
|
|
+ ],
|
|
|
|
|
+ 'zhong'=>[
|
|
|
|
|
+ 'title'=>'中',
|
|
|
|
|
+ 'con'=>0,
|
|
|
|
|
+ 'ywc'=>0,
|
|
|
|
|
+ 'wwc'=>0
|
|
|
|
|
+ ]
|
|
|
|
|
+ ];
|
|
|
|
|
+ $type_arr = [
|
|
|
|
|
+ 'zy'=>[
|
|
|
|
|
+ 'con'=>0,
|
|
|
|
|
+ 'ywc'=>0,
|
|
|
|
|
+ 'wwc'=>0
|
|
|
|
|
+ ],
|
|
|
|
|
+ 'ww'=>[
|
|
|
|
|
+ 'con'=>0,
|
|
|
|
|
+ 'ywc'=>0,
|
|
|
|
|
+ 'wwc'=>0
|
|
|
|
|
+ ]
|
|
|
|
|
+ ];
|
|
|
|
|
+ foreach ($risk_data as $key => $value) {
|
|
|
|
|
+ $risk_level = $value->risk_level;
|
|
|
|
|
+ $wcqk = $value->wcqk;
|
|
|
|
|
+ if ($risk_level == 0) {
|
|
|
|
|
+ ++$level_arr['gao']['con'];
|
|
|
|
|
+ if ($wcqk == 0) {
|
|
|
|
|
+ ++$level_arr['gao']['wwc'];
|
|
|
|
|
+ } else if ($wcqk == 1) {
|
|
|
|
|
+ ++$level_arr['gao']['ywc'];
|
|
|
|
|
+ }
|
|
|
|
|
+ } else if ($risk_level == 1) {
|
|
|
|
|
+ ++$level_arr['zhong']['con'];
|
|
|
|
|
+ if ($wcqk == 0) {
|
|
|
|
|
+ ++$level_arr['zhong']['wwc'];
|
|
|
|
|
+ } else if ($wcqk == 1) {
|
|
|
|
|
+ ++$level_arr['zhong']['ywc'];
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ // 0是自营,1是委外
|
|
|
|
|
+ $obj_type = $value->obj_type;
|
|
|
|
|
+ if ($obj_type == 0) {
|
|
|
|
|
+ ++$type_arr['zy']['con'];
|
|
|
|
|
+ if ($wcqk == 0) {
|
|
|
|
|
+ ++$type_arr['zy']['wwc'];
|
|
|
|
|
+ } else if ($wcqk == 1) {
|
|
|
|
|
+ ++$type_arr['zy']['ywc'];
|
|
|
|
|
+ }
|
|
|
|
|
+ } else if ($obj_type == 1) {
|
|
|
|
|
+ ++$type_arr['ww']['con'];
|
|
|
|
|
+ if ($wcqk == 0) {
|
|
|
|
|
+ ++$type_arr['ww']['wwc'];
|
|
|
|
|
+ } else if ($wcqk == 1) {
|
|
|
|
|
+ ++$type_arr['ww']['ywc'];
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ foreach ($level_arr as $key => $value) {
|
|
|
|
|
+ $con_wwc = $value['wwc'];
|
|
|
|
|
+ $title = $value['title'];
|
|
|
|
|
+ if ($con_wwc > 0) {
|
|
|
|
|
+ $result .= $title.'风险' . $con_wwc . '项、';
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ $result = rtrim($result, "、");
|
|
|
|
|
+
|
|
|
|
|
+ $data['describe'] = $result;
|
|
|
|
|
+ $data['gcon'] = $level_arr['gao']['con'];
|
|
|
|
|
+ $data['gywc'] = $level_arr['gao']['ywc'];
|
|
|
|
|
+ $data['gwwc'] = $level_arr['gao']['wwc'];
|
|
|
|
|
+ $data['zcon'] = $level_arr['zhong']['con'];
|
|
|
|
|
+ $data['zywc'] = $level_arr['zhong']['ywc'];
|
|
|
|
|
+ $data['zwwc'] = $level_arr['zhong']['wwc'];
|
|
|
|
|
+ $data['zycon'] = $type_arr['zy']['con'];
|
|
|
|
|
+ $data['zyywc'] = $type_arr['zy']['ywc'];
|
|
|
|
|
+ $data['zywwc'] = $type_arr['zy']['wwc'];
|
|
|
|
|
+ $data['wwcon'] = $type_arr['ww']['con'];
|
|
|
|
|
+ $data['wwywc'] = $type_arr['ww']['ywc'];
|
|
|
|
|
+ $data['wwwwc'] = $type_arr['ww']['wwc'];
|
|
|
|
|
+
|
|
|
|
|
+ return $data;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
//导出完成情况表自营列表
|
|
//导出完成情况表自营列表
|
|
|
public function export3ListZiying(Request $request){
|
|
public function export3ListZiying(Request $request){
|
|
@@ -3869,12 +4009,46 @@ class CameraApiController extends BaseController
|
|
|
$date = date('Y-m-d');
|
|
$date = date('Y-m-d');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $coal_list = DB::connection('mysql_fwe10')
|
|
|
|
|
- ->table('uf_xx_coal_washery as t')
|
|
|
|
|
- ->where('obj_type',0)
|
|
|
|
|
- ->where('t.is_delete',0)
|
|
|
|
|
- ->where('t.delete_type',0)
|
|
|
|
|
- ->orderBy('sort')->get();
|
|
|
|
|
|
|
+ if(isset($params['mark'])){
|
|
|
|
|
+ $mark = $params['mark'];
|
|
|
|
|
+ if ($mark == 0){
|
|
|
|
|
+ $coal_list = DB::connection('mysql_fwe10')
|
|
|
|
|
+ ->table('uf_xx_coal_washery as t')
|
|
|
|
|
+ ->select('t.*')
|
|
|
|
|
+ ->leftJoin('uf_xx_area as t1', 't.area_id', '=', 't1.id')
|
|
|
|
|
+ ->where('obj_type',0)
|
|
|
|
|
+ ->where('t1.title','洗选中心')
|
|
|
|
|
+ ->where('t.is_delete',0)
|
|
|
|
|
+ ->where('t.delete_type',0)
|
|
|
|
|
+ ->orderBy('sort')->get();
|
|
|
|
|
+ }elseif ($mark == 1){
|
|
|
|
|
+ $coal_list = DB::connection('mysql_fwe10')
|
|
|
|
|
+ ->table('uf_xx_coal_washery as t')
|
|
|
|
|
+ ->select('t.*')
|
|
|
|
|
+ ->leftJoin('uf_xx_area as t1', 't.area_id', '=', 't1.id')
|
|
|
|
|
+ ->where('obj_type',0)
|
|
|
|
|
+ ->where('t1.title','太西片区')
|
|
|
|
|
+ ->where('t.is_delete',0)
|
|
|
|
|
+ ->where('t.delete_type',0)
|
|
|
|
|
+ ->orderBy('sort')->get();
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $coal_list = DB::connection('mysql_fwe10')
|
|
|
|
|
+ ->table('uf_xx_coal_washery as t')
|
|
|
|
|
+ ->where('obj_type',0)
|
|
|
|
|
+ ->where('t.is_delete',0)
|
|
|
|
|
+ ->where('t.delete_type',0)
|
|
|
|
|
+ ->orderBy('sort')->get();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $coal_list = DB::connection('mysql_fwe10')
|
|
|
|
|
+ ->table('uf_xx_coal_washery as t')
|
|
|
|
|
+ ->where('obj_type',0)
|
|
|
|
|
+ ->where('t.is_delete',0)
|
|
|
|
|
+ ->where('t.delete_type',0)
|
|
|
|
|
+ ->orderBy('sort')->get();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
// 以下的优化方式有问题,接口报错
|
|
// 以下的优化方式有问题,接口报错
|
|
@@ -3984,13 +4158,45 @@ class CameraApiController extends BaseController
|
|
|
$date = date('Y-m-d');
|
|
$date = date('Y-m-d');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $coal_list = DB::connection('mysql_fwe10')
|
|
|
|
|
- ->table('uf_xx_coal_washery as t')
|
|
|
|
|
- ->where('is_delete',0)
|
|
|
|
|
- ->where('obj_type',1)
|
|
|
|
|
- ->where('t.is_delete',0)
|
|
|
|
|
- ->where('t.delete_type',0)
|
|
|
|
|
- ->orderBy('sort')->get();
|
|
|
|
|
|
|
+ if(isset($params['mark'])){
|
|
|
|
|
+ $mark = $params['mark'];
|
|
|
|
|
+ if ($mark == 0){
|
|
|
|
|
+ $coal_list = DB::connection('mysql_fwe10')
|
|
|
|
|
+ ->table('uf_xx_coal_washery as t')
|
|
|
|
|
+ ->select('t.*')
|
|
|
|
|
+ ->leftJoin('uf_xx_area as t1', 't.area_id', '=', 't1.id')
|
|
|
|
|
+ ->where('obj_type',1)
|
|
|
|
|
+ ->where('t1.title','洗选中心')
|
|
|
|
|
+ ->where('t.is_delete',0)
|
|
|
|
|
+ ->where('t.delete_type',0)
|
|
|
|
|
+ ->orderBy('sort')->get();
|
|
|
|
|
+ }elseif ($mark == 1){
|
|
|
|
|
+ $coal_list = DB::connection('mysql_fwe10')
|
|
|
|
|
+ ->table('uf_xx_coal_washery as t')
|
|
|
|
|
+ ->select('t.*')
|
|
|
|
|
+ ->leftJoin('uf_xx_area as t1', 't.area_id', '=', 't1.id')
|
|
|
|
|
+ ->where('obj_type',1)
|
|
|
|
|
+ ->where('t1.title','太西片区')
|
|
|
|
|
+ ->where('t.is_delete',0)
|
|
|
|
|
+ ->where('t.delete_type',0)
|
|
|
|
|
+ ->orderBy('sort')->get();
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $coal_list = DB::connection('mysql_fwe10')
|
|
|
|
|
+ ->table('uf_xx_coal_washery as t')
|
|
|
|
|
+ ->where('obj_type',1)
|
|
|
|
|
+ ->where('t.is_delete',0)
|
|
|
|
|
+ ->where('t.delete_type',0)
|
|
|
|
|
+ ->orderBy('sort')->get();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $coal_list = DB::connection('mysql_fwe10')
|
|
|
|
|
+ ->table('uf_xx_coal_washery as t')
|
|
|
|
|
+ ->where('obj_type',1)
|
|
|
|
|
+ ->where('t.is_delete',0)
|
|
|
|
|
+ ->where('t.delete_type',0)
|
|
|
|
|
+ ->orderBy('sort')->get();
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
if(count($coal_list) > 0){
|
|
if(count($coal_list) > 0){
|
|
|
for($i=0;$i<count($coal_list);$i++){
|
|
for($i=0;$i<count($coal_list);$i++){
|
|
@@ -5560,7 +5766,7 @@ class CameraApiController extends BaseController
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
if ($area_id == 1055262899082551297){
|
|
if ($area_id == 1055262899082551297){
|
|
|
- $res['people_info'] = "太西片区作业人数:" . ($ziying_people + $waiwei_people) ."人;其中:内部:".$ziying_people."人,外委施工:".$waiwei_people."人";
|
|
|
|
|
|
|
+ $res['people_info'] = "作业人数:" . ($ziying_people + $waiwei_people) ."人;其中:内部:".$ziying_people."人,外委施工:".$waiwei_people."人";
|
|
|
} else{
|
|
} else{
|
|
|
$res['people_info'] = "作业人数:" . ($ziying_people + $waiwei_people) ."人;其中:内部:".$ziying_people."人,外委施工:".$waiwei_people."人";
|
|
$res['people_info'] = "作业人数:" . ($ziying_people + $waiwei_people) ."人;其中:内部:".$ziying_people."人,外委施工:".$waiwei_people."人";
|
|
|
}
|
|
}
|