rimo-import: setting "unscheduled" if grossPlanning and Not2Connect
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
namespace ADBRimoImport;
|
||||
|
||||
use ADBRimoImport\ADBAddressHelper;
|
||||
//use ADBRimoImport\importer\CitycomImporter;
|
||||
|
||||
//require 'vendor/autoload.php';
|
||||
require("../../config/config.php");
|
||||
@@ -44,6 +45,7 @@ if ($argc > 1) {
|
||||
}
|
||||
}
|
||||
|
||||
$valid_adb_sources = ["rimo-rest-api", "citycom-oan-api"];
|
||||
//$netowners = ["estmk", "rml"];
|
||||
$netowners = ["estmk", "rml", "sbidi"];
|
||||
//$netowners = ["sbidi"];
|
||||
@@ -112,7 +114,19 @@ foreach ($netowners as $apiOwner) {
|
||||
|
||||
foreach ($clustersResponse->item as $cluster) {
|
||||
$cluster_data = ["apiOwner" => $apiOwner, "apiKey" => $apiToken, "apiUrl" => $apiUrl, "cluster" => $cluster];
|
||||
$clusters[] = $cluster_data;
|
||||
$clusters[$cluster->id] = $cluster_data;
|
||||
}
|
||||
}
|
||||
|
||||
// add Netzgebiete not from rimo
|
||||
foreach(\ADBNetzgebietModel::getAll() as $adb_cluster) {
|
||||
if(!in_array($adb_cluster->source, $valid_adb_sources)) {
|
||||
echo "Cluster ".$adb_cluster->name." not found in rimo\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!array_key_exists($adb_cluster->source_id, $clusters)) {
|
||||
//$clusters[$adb_cluster->source_id] = ["apiOwner" => "", "apiKey" => "", "apiUrl" => "", "cluster" => $adb_cluster];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,6 +151,18 @@ foreach ($clusters as $cluster_data) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* import non-rimo clusters
|
||||
*/
|
||||
if($adb_netzgebiet->source == "citycom-oan-api" ) {
|
||||
// load and run citycom importer
|
||||
/*
|
||||
$citycom_importer = new CitycomImporter(["db" => $adb, "log" => $log, "netzgebiet" => $adb_netzgebiet]);
|
||||
$citycom_importer->runImport();
|
||||
*/
|
||||
continue;
|
||||
}
|
||||
|
||||
$addressErrors = [];
|
||||
|
||||
if ($command == "cluster_only" && $request_cluster) {
|
||||
@@ -280,6 +306,14 @@ foreach ($clusters as $cluster_data) {
|
||||
$hausnummer = new \ADBHausnummer($hausnummer_id);
|
||||
}
|
||||
|
||||
if($b_operationalstate_id == "99" && $b_executionstate_id == "1") {
|
||||
if($hausnummer->rollout_info != "unscheduled" || $hausnummer->rollout !== null) {
|
||||
$hausnummer->rollout = null;
|
||||
$hausnummer->rollout_info = "unscheduled";
|
||||
$hausnummer->save();
|
||||
}
|
||||
}
|
||||
|
||||
\mfValuecache::singleton()->set("adbhausnummer-save-nesting-level-".$hausnummer->id, 0);
|
||||
|
||||
// update Preorders
|
||||
|
||||
Reference in New Issue
Block a user