helper function added
This commit is contained in:
@@ -95,6 +95,8 @@ class ProcessStructureJob implements ShouldQueue
|
|||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
|
$sHelper = new StructureHelper;
|
||||||
|
|
||||||
//Get the page of structures
|
//Get the page of structures
|
||||||
$structures = $this->GetListOfStructures();
|
$structures = $this->GetListOfStructures();
|
||||||
|
|
||||||
@@ -113,9 +115,9 @@ class ProcessStructureJob implements ShouldQueue
|
|||||||
//Find if the structure exists
|
//Find if the structure exists
|
||||||
$found = Structure::where(['structure_id' => $structure->structure_id])->get();
|
$found = Structure::where(['structure_id' => $structure->structure_id])->get();
|
||||||
if(!$found) {
|
if(!$found) {
|
||||||
$this->StoreNewStructure($structure, $info, $solarName);
|
$sHelper->StoreNewStructure($structure, $info, $solarName);
|
||||||
} else {
|
} else {
|
||||||
$this->UpdateExistingStructure($structure, $info, $solarName);
|
$sHelper->UpdateExistingStructure($structure, $info, $solarName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
* GNU Public License
|
* GNU Public License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace App\Library\Structures\Helper;
|
namespace App\Library\Structures;
|
||||||
|
|
||||||
//Internal Library
|
//Internal Library
|
||||||
use Log;
|
use Log;
|
||||||
@@ -17,7 +17,6 @@ use App\Models\Structure\Structure;
|
|||||||
use App\Models\Structure\Service;
|
use App\Models\Structure\Service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class StructureStockHelper {
|
class StructureStockHelper {
|
||||||
|
|
||||||
public function StoreNewStructure($structure, $info, $solarName) {
|
public function StoreNewStructure($structure, $info, $solarName) {
|
||||||
|
|||||||
Reference in New Issue
Block a user