|
@@ -41,10 +41,11 @@ class CameraListExcels implements ShouldQueue
|
|
|
|
|
|
protected function fieldsMap($rows)
|
|
|
{
|
|
|
+
|
|
|
//矿区信息
|
|
|
$mine_name = trim($rows[0][0]);
|
|
|
$area_name = isset($rows[0][1]) ? trim($rows[0][1]) : '';
|
|
|
-
|
|
|
+ Log::info($area_name);
|
|
|
$mine_parent_id = MineList::where('title', $mine_name)->value('id');
|
|
|
if (!$mine_parent_id) {
|
|
|
return false;
|
|
@@ -53,7 +54,8 @@ class CameraListExcels implements ShouldQueue
|
|
|
if (!$area_name) {
|
|
|
$mine_id = $mine_parent_id;
|
|
|
} else {
|
|
|
- $mine_list = MineList::where(
|
|
|
+
|
|
|
+ $mine_list_all = MineList::where(
|
|
|
[
|
|
|
'title' => $area_name,
|
|
|
]
|
|
@@ -62,7 +64,13 @@ class CameraListExcels implements ShouldQueue
|
|
|
'id',
|
|
|
'degree'
|
|
|
]
|
|
|
- )->first();
|
|
|
+ )->get();
|
|
|
+
|
|
|
+ foreach($mine_list_all as $k=>$v){
|
|
|
+ if(explode('|', $v->degree)[0] == $mine_parent_id){
|
|
|
+ $mine_list = $v;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
if (!$mine_list) {
|
|
|
return false;
|
|
@@ -80,6 +88,9 @@ class CameraListExcels implements ShouldQueue
|
|
|
}
|
|
|
|
|
|
$data = [];
|
|
|
+ Log::info('****************************************');
|
|
|
+ Log::info($rows);
|
|
|
+ Log::info('****************************************');
|
|
|
foreach ($rows as $index => $item) {
|
|
|
if ($index == 0 || $index == 1) {
|
|
|
continue;
|