Xu·LinPeng 12 годин тому
батько
коміт
98a18b9b4c
2 змінених файлів з 36 додано та 21 видалено
  1. 16 0
      .idea/php.xml
  2. 20 21
      Modules/Camera/Http/Controllers/Api/CameraApiController.php

+ 16 - 0
.idea/php.xml

@@ -1,5 +1,15 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
+  <component name="MessDetectorOptionsConfiguration">
+    <option name="transferred" value="true" />
+  </component>
+  <component name="PHPCSFixerOptionsConfiguration">
+    <option name="transferred" value="true" />
+  </component>
+  <component name="PHPCodeSnifferOptionsConfiguration">
+    <option name="highlightLevel" value="WARNING" />
+    <option name="transferred" value="true" />
+  </component>
   <component name="PhpIncludePathManager">
     <include_path>
       <path value="$PROJECT_DIR$/vendor/erusev/parsedown" />
@@ -124,9 +134,15 @@
     </include_path>
   </component>
   <component name="PhpProjectSharedConfiguration" php_language_level="7.1" />
+  <component name="PhpStanOptionsConfiguration">
+    <option name="transferred" value="true" />
+  </component>
   <component name="PhpUnit">
     <phpunit_settings>
       <PhpUnitSettings configuration_file_path="$PROJECT_DIR$/phpunit.xml" custom_loader_path="$PROJECT_DIR$/vendor/autoload.php" use_configuration_file="true" />
     </phpunit_settings>
   </component>
+  <component name="PsalmOptionsConfiguration">
+    <option name="transferred" value="true" />
+  </component>
 </project>

+ 20 - 21
Modules/Camera/Http/Controllers/Api/CameraApiController.php

@@ -4496,28 +4496,11 @@ class CameraApiController extends BaseController
                         $sgdd[] = $temp;
                     }
 
-
-                    $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 .= '  '.$index_1.'.'.$value->title.'引进委外单位'.$wwdw_num.'个('.$var1.'),'.',作业厂点'.$sgdd_num.'个('.$var2.');\n';
-                    }
-
-
-
-
                     $risk_index = 0;
-                    $line['index'] = $index_1;
-                    $line['coal_washery'] = $v->title;
+                    $line['coal_washery'] = $value->title;
                     $line['work_place_num'] = $v->sgdsl;
                     $line['wwdw'] = $v->wwdw;
-                    $line['wwdw_num'] = $wwdw_num;
-                    $line['place'] = $coal_washery_dict[$v->sgdd]->title;
+                    $line['place'] = $temp;
 
 
 
@@ -4540,7 +4523,7 @@ class CameraApiController extends BaseController
                         $line['di'] = 1;
                     }
 
-                    $line['content'] .= ++$risk_index.".".$v->risk_name.$risk_info."盯控人:".$v->work_people;
+                    $line['content'] = ++$risk_index.".".$v->risk_name.$risk_info."盯控人:".$v->work_people;
 
                     $level_total = '';
                     if ($line['gao']   > 0) $level_total .= '高风险'.$line['gao']."项\n";
@@ -4548,10 +4531,26 @@ class CameraApiController extends BaseController
                     if ($line['di']    > 0) $level_total .= '低风险'.$line['di'].'项';
                     $line['level'] = $level_total;
 
-                    $res['risk_list'][] = $line;
 
+
+                }
+
+
+                $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 .= '  '.$index_1.'.'.$value->title.'引进委外单位'.$wwdw_num.'个('.$var1.'),'.',作业厂点'.$sgdd_num.'个('.$var2.');\n';
                 }
 
+                $line['index'] = $index_1;
+                $line['wwdw_num'] = $wwdw_num;
+                $res['risk_list'][] = $line;
+
             }
         }