|
@@ -3021,6 +3021,124 @@ class CameraApiController extends BaseController
|
|
|
//导出完成情况表统计
|
|
|
public function export3Total(Request $request){
|
|
|
$params = $request->all();
|
|
|
+ $result = '';
|
|
|
+
|
|
|
+ if(isset($params['date'])){
|
|
|
+ $date = $params['date'];
|
|
|
+ }else{
|
|
|
+ $date = date('Y-m-d');
|
|
|
+ }
|
|
|
+
|
|
|
+ $gao = DB::connection('mysql_fwe10')->table('uf_xx_risk_assignment')
|
|
|
+ ->select('uf_xx_risk_assignment.*','uf_xx_area.title')
|
|
|
+ ->leftJoin('uf_xx_coal_washery', 'uf_xx_risk_assignment.coal_washery_id', '=', 'uf_xx_coal_washery.id')
|
|
|
+ ->leftJoin('uf_xx_area', 'uf_xx_coal_washery.area_id', '=', 'uf_xx_area.id')
|
|
|
+ ->whereDate('uf_xx_risk_assignment.create_time', $date)
|
|
|
+ ->where('uf_xx_risk_assignment.is_delete',0)
|
|
|
+ ->where('uf_xx_risk_assignment.wcqk',1)
|
|
|
+ ->where('uf_xx_risk_assignment.risk_level',0)
|
|
|
+ ->get();
|
|
|
+
|
|
|
+ if(count($gao) > 0){
|
|
|
+ $result = $result . '高风险' . count($gao) . '项';
|
|
|
+ $ningdong = 0;
|
|
|
+ $taixi = 0;
|
|
|
+ $str = '';
|
|
|
+ for($i=0;$i<count($gao);$i++){
|
|
|
+ if($gao[$i]->title == '宁东片区'){
|
|
|
+ $ningdong++;
|
|
|
+ }
|
|
|
+ if($gao[$i]->title == '太西片区'){
|
|
|
+ $taixi++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if($ningdong > 0){
|
|
|
+ $str = $str.'宁东'.$ningdong.'项,';
|
|
|
+ }
|
|
|
+ if($taixi > 0){
|
|
|
+ $str = $str.'太西'.$taixi.'项,';
|
|
|
+ }
|
|
|
+ $str = rtrim($str, ",");
|
|
|
+
|
|
|
+ $result = $result . '('.$str.')、';
|
|
|
+ }
|
|
|
+
|
|
|
+ $zhong = DB::connection('mysql_fwe10')->table('uf_xx_risk_assignment')
|
|
|
+ ->select('uf_xx_risk_assignment.*','uf_xx_area.title')
|
|
|
+ ->leftJoin('uf_xx_coal_washery', 'uf_xx_risk_assignment.coal_washery_id', '=', 'uf_xx_coal_washery.id')
|
|
|
+ ->leftJoin('uf_xx_area', 'uf_xx_coal_washery.area_id', '=', 'uf_xx_area.id')
|
|
|
+ ->whereDate('uf_xx_risk_assignment.create_time', $date)
|
|
|
+ ->where('uf_xx_risk_assignment.is_delete',0)
|
|
|
+ ->where('uf_xx_risk_assignment.wcqk',0)
|
|
|
+ ->where('uf_xx_risk_assignment.risk_level',1)
|
|
|
+ ->get();
|
|
|
+
|
|
|
+ if(count($zhong) > 0){
|
|
|
+ $result = $result . '中风险' . count($zhong) . '项';
|
|
|
+ $ningdong = 0;
|
|
|
+ $taixi = 0;
|
|
|
+ $str = '';
|
|
|
+ for($i=0;$i<count($zhong);$i++){
|
|
|
+ if($zhong[$i]->title == '宁东片区'){
|
|
|
+ $ningdong++;
|
|
|
+ }
|
|
|
+ if($zhong[$i]->title == '太西片区'){
|
|
|
+ $taixi++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if($ningdong > 0){
|
|
|
+ $str = $str.'宁东'.$ningdong.'项,';
|
|
|
+ }
|
|
|
+ if($taixi > 0){
|
|
|
+ $str = $str.'太西'.$taixi.'项,';
|
|
|
+ }
|
|
|
+ $str = rtrim($str, ",");
|
|
|
+
|
|
|
+ $result = $result . '('.$str.')、';
|
|
|
+ }
|
|
|
+
|
|
|
+ $di = DB::connection('mysql_fwe10')->table('uf_xx_risk_assignment')
|
|
|
+ ->select('uf_xx_risk_assignment.*','uf_xx_area.title')
|
|
|
+ ->leftJoin('uf_xx_coal_washery', 'uf_xx_risk_assignment.coal_washery_id', '=', 'uf_xx_coal_washery.id')
|
|
|
+ ->leftJoin('uf_xx_area', 'uf_xx_coal_washery.area_id', '=', 'uf_xx_area.id')
|
|
|
+ ->whereDate('uf_xx_risk_assignment.create_time', $date)
|
|
|
+ ->where('uf_xx_risk_assignment.is_delete',0)
|
|
|
+ ->where('uf_xx_risk_assignment.wcqk',0)
|
|
|
+ ->where('uf_xx_risk_assignment.risk_level',2)
|
|
|
+ ->get();
|
|
|
+
|
|
|
+ if(count($di) > 0){
|
|
|
+ $result = $result . '低风险' . count($di) . '项';
|
|
|
+ $ningdong = 0;
|
|
|
+ $taixi = 0;
|
|
|
+ $str = '';
|
|
|
+ for($i=0;$i<count($di);$i++){
|
|
|
+ if($di[$i]->title == '宁东片区'){
|
|
|
+ $ningdong++;
|
|
|
+ }
|
|
|
+ if($di[$i]->title == '太西片区'){
|
|
|
+ $taixi++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if($ningdong > 0){
|
|
|
+ $str = $str.'宁东'.$ningdong.'项,';
|
|
|
+ }
|
|
|
+ if($taixi > 0){
|
|
|
+ $str = $str.'太西'.$taixi.'项,';
|
|
|
+ }
|
|
|
+ $str = rtrim($str, ",");
|
|
|
+
|
|
|
+ $result = $result . '('.$str.')、';
|
|
|
+ }
|
|
|
+
|
|
|
+ $result = rtrim($result, "、");
|
|
|
+
|
|
|
+ return $result;
|
|
|
+ }
|
|
|
+
|
|
|
+ //导出完成情况表自营列表
|
|
|
+ public function export3ListZiying(Request $request){
|
|
|
+ $params = $request->all();
|
|
|
$result = [];
|
|
|
|
|
|
if(isset($params['date'])){
|
|
@@ -3032,8 +3150,8 @@ class CameraApiController extends BaseController
|
|
|
return $result;
|
|
|
}
|
|
|
|
|
|
- //导出完成情况表列表
|
|
|
- public function export3List(Request $request){
|
|
|
+ //导出完成情况表委外列表
|
|
|
+ public function export3ListWeiwai(Request $request){
|
|
|
$params = $request->all();
|
|
|
$result = [];
|
|
|
|