|
@@ -3058,30 +3058,40 @@ class CameraApiController extends BaseController
|
|
|
$risk_type_dict[$risk_type_key] = $risk_type_name;
|
|
|
}
|
|
|
|
|
|
- if(!empty($area_id)){
|
|
|
- // 风险数据 is_delete = 0 and delete_type = 0 and flow_id is not null
|
|
|
- $risk_list = DB::connection('mysql_fwe10')
|
|
|
- ->table('uf_xx_risk_assignment as t')
|
|
|
- ->select('t.*','t1.shr as coal_shr')
|
|
|
- ->whereDate('t.create_time', $date)
|
|
|
- ->where('t.is_delete',0)
|
|
|
- ->where('t.delete_type',0)
|
|
|
- ->where('t.wwdw',null)
|
|
|
- ->where('t.sgdd',null)
|
|
|
- ->where('t.current_step','结束节点')
|
|
|
- ->whereNotNull('t.flow_id');
|
|
|
- }else{
|
|
|
- // 风险数据 is_delete = 0 and delete_type = 0 and flow_id is not null
|
|
|
- $risk_list = DB::connection('mysql_fwe10')
|
|
|
- ->table('uf_xx_risk_assignment as t')
|
|
|
- ->whereDate('t.create_time', $date)
|
|
|
- ->where('t.is_delete',0)
|
|
|
- ->where('t.delete_type',0)
|
|
|
- ->where('t.wwdw',null)
|
|
|
- ->where('t.sgdd',null)
|
|
|
- ->where('t.current_step','结束节点')
|
|
|
- ->whereNotNull('t.flow_id');
|
|
|
- }
|
|
|
+// if(!empty($area_id)){
|
|
|
+// // 风险数据 is_delete = 0 and delete_type = 0 and flow_id is not null
|
|
|
+// $risk_list = DB::connection('mysql_fwe10')
|
|
|
+// ->table('uf_xx_risk_assignment as t')
|
|
|
+// ->select('t.*','t1.shr as coal_shr')
|
|
|
+// ->whereDate('t.create_time', $date)
|
|
|
+// ->where('t.is_delete',0)
|
|
|
+// ->where('t.delete_type',0)
|
|
|
+// ->where('t.wwdw',null)
|
|
|
+// ->where('t.sgdd',null)
|
|
|
+// ->where('t.current_step','结束节点')
|
|
|
+// ->whereNotNull('t.flow_id');
|
|
|
+// }else{
|
|
|
+// // 风险数据 is_delete = 0 and delete_type = 0 and flow_id is not null
|
|
|
+// $risk_list = DB::connection('mysql_fwe10')
|
|
|
+// ->table('uf_xx_risk_assignment as t')
|
|
|
+// ->whereDate('t.create_time', $date)
|
|
|
+// ->where('t.is_delete',0)
|
|
|
+// ->where('t.delete_type',0)
|
|
|
+// ->where('t.wwdw',null)
|
|
|
+// ->where('t.sgdd',null)
|
|
|
+// ->where('t.current_step','结束节点')
|
|
|
+// ->whereNotNull('t.flow_id');
|
|
|
+// }
|
|
|
+
|
|
|
+ $risk_list = DB::connection('mysql_fwe10')
|
|
|
+ ->table('uf_xx_risk_assignment as t')
|
|
|
+ ->whereDate('t.create_time', $date)
|
|
|
+ ->where('t.is_delete',0)
|
|
|
+ ->where('t.delete_type',0)
|
|
|
+ ->where('t.wwdw',null)
|
|
|
+ ->where('t.sgdd',null)
|
|
|
+ ->where('t.current_step','结束节点')
|
|
|
+ ->whereNotNull('t.flow_id');
|
|
|
|
|
|
if (!empty($coal_washery_id)) $risk_list->where('t.coal_washery_id', $coal_washery_id); // 筛选洗煤厂
|
|
|
if (!empty($area_id)) {
|