Merge branch 'fronkdev' into 'master'
Added Lieboch to rimo api import See merge request fronk/thetool!272
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace ADBRimoImport\ADBAddressHelper\Network;
|
||||
|
||||
/*
|
||||
* Netzgebiet
|
||||
* Premstätten Süd
|
||||
*/
|
||||
class Network_C06110 {
|
||||
|
||||
public function checkAddress($data) {
|
||||
/*
|
||||
* array keys are a reference their original variables and must be manipulated directly
|
||||
*/
|
||||
|
||||
// dererence input array keys into copies
|
||||
foreach(["name", "strasse_name", "hausnummer_name", "addresszusatz", "gem_kz", "gem_name", "ort_name", "plz_name"] as $var) {
|
||||
$$var = $data[$var];
|
||||
}
|
||||
|
||||
if($strasse_name == "Hans-Thalhammer-Straße") $strasse_name = "H. Thalhammer-Straße";
|
||||
if($strasse_name == "Packerstraße") $strasse_name = "Packer Straße";
|
||||
|
||||
// put new values back into original pointer
|
||||
foreach(["name", "strasse_name", "hausnummer_name", "addresszusatz", "gem_kz", "gem_name", "ort_name", "plz_name"] as $var) {
|
||||
$data[$var] = $$var;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -272,8 +272,11 @@ class AddressHelper {
|
||||
|
||||
// update hausnummer
|
||||
if($hausnummer->netzgebiet_id != $this->netzgebiet->id) {
|
||||
$hausnummer->netzgebiet_id = $this->netzgebiet->id;
|
||||
$hausnummer->save();
|
||||
$dont_overwrite_netzgbiet = $hausnummer->netzgebiet->getOption("hausnummer_dont_overwrite_netzgebiet");
|
||||
if(!$dont_overwrite_netzgbiet) {
|
||||
$hausnummer->netzgebiet_id = $this->netzgebiet->id;
|
||||
$hausnummer->save();
|
||||
}
|
||||
}
|
||||
if($hausnummer->extref != $name) {
|
||||
$hausnummer->extref = $name;
|
||||
|
||||
@@ -117,10 +117,10 @@ foreach($netowners as $apiOwner) {
|
||||
}
|
||||
|
||||
|
||||
/*if($cluster_rimo_id != "SDISalesCluster_85942336257_1707118316") {
|
||||
// wettmannstaettten
|
||||
if($cluster_rimo_id != "SDISalesCluster_29189625089_1679036889") {
|
||||
// lieboch
|
||||
continue;
|
||||
}*/
|
||||
}
|
||||
|
||||
/*
|
||||
* get Cluster Outline Coords
|
||||
|
||||
@@ -25,6 +25,9 @@ $campaign_ids["kalwang"] = 41;
|
||||
$campaign_ids["st_stefan_stainz"] = 36;
|
||||
$campaign_ids["wettmannst"] = 37;
|
||||
$campaign_ids["mureck"] = 42;
|
||||
$campaign_ids["lieboch"] = 35;
|
||||
$campaign_ids["lieboch_vorab"] = 49;
|
||||
$campaign_ids["lieboch_smart"] = 39;
|
||||
|
||||
if(!array_key_exists(1,$argv)) {
|
||||
|
||||
@@ -65,14 +68,12 @@ foreach(PreorderModel::searchActive(["preordercampaign_id" => $selected_campaign
|
||||
//echo "Nicht genug Wohneinheiten - Preorder id ".$preorder->id.": ".count($wohneinheiten)." - need ".$preorder->connection_count."\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
//if($preorder->id == 920) {var_dump($wohneinheiten);exit;}
|
||||
|
||||
|
||||
$available_units = [];
|
||||
$additional_units = []; // to sort non-specific units last
|
||||
foreach($wohneinheiten as $unit) {
|
||||
if($preorder->adb_wohneinheit_id == $unit->id || !PreorderModel::getFirst(["adb_wohneinheit_id" => $unit->id, "deleted" => 0])) {
|
||||
if($unit->tuer || preg_match('/^Top\s+\d+$/', $unit->zusatz)) {
|
||||
if($preorder->adb_wohneinheit_id == $unit->id || !PreorderModel::getFirstActive(["adb_wohneinheit_id" => $unit->id])) {
|
||||
if($unit->tuer || preg_match('/^(Top|Tuer|Tür)\s+\d+$/i', $unit->zusatz)) {
|
||||
$available_units[] = $unit;
|
||||
} else {
|
||||
$additional_units[] = $unit;
|
||||
|
||||
@@ -25,6 +25,9 @@ $campaign_ids["kalwang"] = 41;
|
||||
$campaign_ids["st_stefan_stainz"] = 36;
|
||||
$campaign_ids["wettmannst"] = 37;
|
||||
$campaign_ids["mureck"] = 42;
|
||||
$campaign_ids["lieboch"] = 35;
|
||||
$campaign_ids["lieboch_vorab"] = 49;
|
||||
$campaign_ids["lieboch_smart"] = 39;
|
||||
|
||||
if(!array_key_exists(1,$argv)) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user