ADB: Added stiege as part of Hausnummer
This commit is contained in:
@@ -144,7 +144,18 @@
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-lg-2 col-form-label" for="hausnummer">Stiege</label>
|
||||||
|
<div class="col-lg-10">
|
||||||
|
<?php if(is_array($save_data) && array_key_exists("stiege", $save_data)): ?>
|
||||||
|
<input type="text" class="form-control" name="stiege" id="stiege" value="<?=$save_data['stiege']?>">
|
||||||
|
<?php else: ?>
|
||||||
|
<input type="text" class="form-control" name="stiege" id="stiege" value="<?=$address->stiege?>">
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-lg-2 col-form-label" for="plz">PLZ *</label>
|
<label class="col-lg-2 col-form-label" for="plz">PLZ *</label>
|
||||||
<div class="col-lg-10">
|
<div class="col-lg-10">
|
||||||
|
|||||||
@@ -167,6 +167,7 @@
|
|||||||
<th>Ortschaft</th>
|
<th>Ortschaft</th>
|
||||||
<th>Straße</th>
|
<th>Straße</th>
|
||||||
<th>Hausnummer</th>
|
<th>Hausnummer</th>
|
||||||
|
<th>Stiege</th>
|
||||||
<th>Wohneinheiten</th>
|
<th>Wohneinheiten</th>
|
||||||
<th>GDA-Eigenschaft</th>
|
<th>GDA-Eigenschaft</th>
|
||||||
<th>Rollout Jahr</th>
|
<th>Rollout Jahr</th>
|
||||||
@@ -184,6 +185,7 @@
|
|||||||
<td><?=$address->ortschaft->name?></td>
|
<td><?=$address->ortschaft->name?></td>
|
||||||
<td><?=$address->strasse->name?></td>
|
<td><?=$address->strasse->name?></td>
|
||||||
<td><?=$address->hausnummer?></td>
|
<td><?=$address->hausnummer?></td>
|
||||||
|
<td><?=$address->stiege?></td>
|
||||||
<td><?=count($address->wohneinheiten)?></td>
|
<td><?=count($address->wohneinheiten)?></td>
|
||||||
<td><?=$address->gdaeigenschaft?></td>
|
<td><?=$address->gdaeigenschaft?></td>
|
||||||
<td><?=$address->rollout?></td>
|
<td><?=$address->rollout?></td>
|
||||||
|
|||||||
@@ -277,7 +277,7 @@
|
|||||||
<?php elseif($preorder->adb_hausnummer_id): ?>
|
<?php elseif($preorder->adb_hausnummer_id): ?>
|
||||||
<td <?=($preorder->address_created) ? "class='alert-warning' title='Adresse manuell angelegt'" : ""?>">
|
<td <?=($preorder->address_created) ? "class='alert-warning' title='Adresse manuell angelegt'" : ""?>">
|
||||||
<?=$preorder->adb_hausnummer->strasse->name?>
|
<?=$preorder->adb_hausnummer->strasse->name?>
|
||||||
<?=$preorder->adb_hausnummer->hausnummer?><br />
|
<?=$preorder->adb_hausnummer->hausnummer?><?=($preorder->adb_hausnummer->stiege) ? "/".$preorder->adb_hausnummer->stiege : ""?><br />
|
||||||
<?=($preorder->adb_wohneinheit_id) ? ((string)$preorder->adb_wohneinheit ? $preorder->adb_wohneinheit."<br />" : "") : "<i class='text-pink'><keine Wohneinheit></i><br />"?>
|
<?=($preorder->adb_wohneinheit_id) ? ((string)$preorder->adb_wohneinheit ? $preorder->adb_wohneinheit."<br />" : "") : "<i class='text-pink'><keine Wohneinheit></i><br />"?>
|
||||||
<?=$preorder->adb_hausnummer->plz->plz?>
|
<?=$preorder->adb_hausnummer->plz->plz?>
|
||||||
<?=$preorder->adb_hausnummer->ortschaft->name?><br />
|
<?=$preorder->adb_hausnummer->ortschaft->name?><br />
|
||||||
|
|||||||
@@ -49,6 +49,9 @@ class ADBHausnummer extends mfBaseModel {
|
|||||||
$address .= " ".$this->getProperty("ortschaft")->name.",";
|
$address .= " ".$this->getProperty("ortschaft")->name.",";
|
||||||
$address .= " ".$this->getProperty("strasse")->name;
|
$address .= " ".$this->getProperty("strasse")->name;
|
||||||
$address .= " ".$this->hausnummer;
|
$address .= " ".$this->hausnummer;
|
||||||
|
if($this->stiege) {
|
||||||
|
$address .= "/".$this->stiege;
|
||||||
|
}
|
||||||
return $address;
|
return $address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ class ADBHausnummerModel {
|
|||||||
public $plz_id;
|
public $plz_id;
|
||||||
public $strasse_id;
|
public $strasse_id;
|
||||||
public $hausnummer;
|
public $hausnummer;
|
||||||
|
public $stiege;
|
||||||
public $zusatz;
|
public $zusatz;
|
||||||
public $grund_nr;
|
public $grund_nr;
|
||||||
public $gdaeigenschaft;
|
public $gdaeigenschaft;
|
||||||
@@ -338,6 +339,13 @@ class ADBHausnummerModel {
|
|||||||
$where .= " AND Hausnummer.`hausnummer` like '$hausnummer%'";
|
$where .= " AND Hausnummer.`hausnummer` like '$hausnummer%'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(array_key_exists("stiege", $filter)) {
|
||||||
|
$stiege = FronkDB::singleton()->escape($filter['stiege']);
|
||||||
|
if($stiege) {
|
||||||
|
$where .= " AND stiege.name = '$stiege'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(array_key_exists("strasse", $filter)) {
|
if(array_key_exists("strasse", $filter)) {
|
||||||
$strasse = FronkDB::singleton()->escape($filter['strasse']);
|
$strasse = FronkDB::singleton()->escape($filter['strasse']);
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ class AddressDB {
|
|||||||
`Hausnummer`.`subcd` AS `subcd`,
|
`Hausnummer`.`subcd` AS `subcd`,
|
||||||
`Hausnummer`.`oaid` AS `hausnummer_oaid`,
|
`Hausnummer`.`oaid` AS `hausnummer_oaid`,
|
||||||
`Hausnummer`.`hausnummer` AS `hausnummer`,
|
`Hausnummer`.`hausnummer` AS `hausnummer`,
|
||||||
|
`Hausnummer`.`stiege` AS `hausnummer_stiege`,
|
||||||
`Hausnummer`.`extref` AS `hausnummer_extref`,
|
`Hausnummer`.`extref` AS `hausnummer_extref`,
|
||||||
`Hausnummer`.`unit_count` AS `unit_count`,
|
`Hausnummer`.`unit_count` AS `unit_count`,
|
||||||
`Hausnummer`.`meridian` AS `meridian`,
|
`Hausnummer`.`meridian` AS `meridian`,
|
||||||
@@ -95,7 +96,7 @@ class AddressDB {
|
|||||||
if($netzgebiet_id) {
|
if($netzgebiet_id) {
|
||||||
$res = $this->db->query("SELECT rimo_fcp_name FROM `Hausnummer` WHERE netzgebiet_id=$netzgebiet_id GROUP BY rimo_fcp_name ORDER BY LENGTH(rimo_fcp_name), rimo_fcp_name");
|
$res = $this->db->query("SELECT rimo_fcp_name FROM `Hausnummer` WHERE netzgebiet_id=$netzgebiet_id GROUP BY rimo_fcp_name ORDER BY LENGTH(rimo_fcp_name), rimo_fcp_name");
|
||||||
} else {
|
} else {
|
||||||
$res = $this->db->query("SELECT rimo_fcp_name FROM `Hausnummer` WHERE GROUP BY rimo_fcp_name ORDER BY rimo_fcp_name");
|
$res = $this->db->query("SELECT rimo_fcp_name FROM `Hausnummer` GROUP BY rimo_fcp_name ORDER BY LENGTH(rimo_fcp_name), rimo_fcp_name");
|
||||||
}
|
}
|
||||||
if($this->db->num_rows($res)) {
|
if($this->db->num_rows($res)) {
|
||||||
while($data = $this->db->fetch_object($res)) {
|
while($data = $this->db->fetch_object($res)) {
|
||||||
@@ -257,6 +258,7 @@ class AddressDB {
|
|||||||
$hausnummer_data['plz_id'] = $plz->id;
|
$hausnummer_data['plz_id'] = $plz->id;
|
||||||
$hausnummer_data['strasse_id'] = $strasse->id;
|
$hausnummer_data['strasse_id'] = $strasse->id;
|
||||||
$hausnummer_data['hausnummer'] = $data['hausnummer'];
|
$hausnummer_data['hausnummer'] = $data['hausnummer'];
|
||||||
|
$hausnummer_data['stiege'] = $data['stiege'];
|
||||||
$hausnummer_data['grund_nr'] = $data['grund_nr'];
|
$hausnummer_data['grund_nr'] = $data['grund_nr'];
|
||||||
$hausnummer_data['gdaeigenschaft'] = $data['gdaeigenschaft'];
|
$hausnummer_data['gdaeigenschaft'] = $data['gdaeigenschaft'];
|
||||||
$hausnummer_data['meridian'] = $data['meridian'];
|
$hausnummer_data['meridian'] = $data['meridian'];
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ class AddressDBController extends mfBaseController {
|
|||||||
if(!$this->me->is("Admin")) {
|
if(!$this->me->is("Admin")) {
|
||||||
$required[] = "netzgebiet_id";
|
$required[] = "netzgebiet_id";
|
||||||
}
|
}
|
||||||
foreach(['adrcd','extref','rimo_id','netzgebiet_id','strasse','hausnummer','plz','ortschaft','gemeinde','grund_nr','gdaeigenschaft','meridian','rw','hw','gps_lat','gps_long','unit_count','visibility'] as $field) {
|
foreach(['adrcd','extref','rimo_id','netzgebiet_id','strasse','hausnummer','stiege','plz','ortschaft','gemeinde','grund_nr','gdaeigenschaft','meridian','rw','hw','gps_lat','gps_long','unit_count','visibility'] as $field) {
|
||||||
if(in_array($field, $required)) {
|
if(in_array($field, $required)) {
|
||||||
if(!trim($r->$field)) {
|
if(!trim($r->$field)) {
|
||||||
$this->layout()->setFlash("'".ucfirst($field)."' darf nicht leer sein!", "error");
|
$this->layout()->setFlash("'".ucfirst($field)."' darf nicht leer sein!", "error");
|
||||||
|
|||||||
@@ -451,6 +451,7 @@ class AddressdbApicontroller extends mfBaseApicontroller {
|
|||||||
'district' => $data->ortschaft,
|
'district' => $data->ortschaft,
|
||||||
'street' => $data->strasse,
|
'street' => $data->strasse,
|
||||||
'housenumber' => $housenumber,
|
'housenumber' => $housenumber,
|
||||||
|
'stiege' => $data->hausnummer_stiege,
|
||||||
'lot_number' => $data->grund_nr,
|
'lot_number' => $data->grund_nr,
|
||||||
'meridian' => $data->meridian,
|
'meridian' => $data->meridian,
|
||||||
'rw' => $data->rw,
|
'rw' => $data->rw,
|
||||||
@@ -475,7 +476,6 @@ class AddressdbApicontroller extends mfBaseApicontroller {
|
|||||||
'oaid' => $data->wohneinheit_oaid,
|
'oaid' => $data->wohneinheit_oaid,
|
||||||
'num' => (int)$data->num,
|
'num' => (int)$data->num,
|
||||||
'block' => $data->block,
|
'block' => $data->block,
|
||||||
'stiege' => $data->stiege,
|
|
||||||
'stock' => $data->stock,
|
'stock' => $data->stock,
|
||||||
'tuer' => $data->tuer,
|
'tuer' => $data->tuer,
|
||||||
'zusatz' => $data->zusatz,
|
'zusatz' => $data->zusatz,
|
||||||
@@ -593,6 +593,7 @@ class AddressdbApicontroller extends mfBaseApicontroller {
|
|||||||
$new_address['cluster_id'] = $ta['cluster_id'];
|
$new_address['cluster_id'] = $ta['cluster_id'];
|
||||||
$new_address['street'] = $ta['street'];
|
$new_address['street'] = $ta['street'];
|
||||||
$new_address['housenumber'] = $ta['housenumber'];
|
$new_address['housenumber'] = $ta['housenumber'];
|
||||||
|
$new_address['stiege'] = $ta['stiege'];
|
||||||
$new_address['zip'] = $ta['zip'];
|
$new_address['zip'] = $ta['zip'];
|
||||||
$new_address['city'] = $ta['city'];
|
$new_address['city'] = $ta['city'];
|
||||||
if(array_key_exists("municipality", $ta)) {
|
if(array_key_exists("municipality", $ta)) {
|
||||||
@@ -606,7 +607,6 @@ class AddressdbApicontroller extends mfBaseApicontroller {
|
|||||||
$new_address['building_unit_count'] = $ta['building_unit_count'];
|
$new_address['building_unit_count'] = $ta['building_unit_count'];
|
||||||
$new_address['num'] = $u['num'];
|
$new_address['num'] = $u['num'];
|
||||||
$new_address['block'] = $u['block'];
|
$new_address['block'] = $u['block'];
|
||||||
$new_address['stiege'] = $u['stiege'];
|
|
||||||
$new_address['stock'] = $u['stock'];
|
$new_address['stock'] = $u['stock'];
|
||||||
$new_address['tuer'] = $u['tuer'];
|
$new_address['tuer'] = $u['tuer'];
|
||||||
$new_address['zusatz'] = $u['zusatz'];
|
$new_address['zusatz'] = $u['zusatz'];
|
||||||
@@ -637,6 +637,7 @@ class AddressdbApicontroller extends mfBaseApicontroller {
|
|||||||
$search_district = $this->db()->escape(trim($get['district']));
|
$search_district = $this->db()->escape(trim($get['district']));
|
||||||
$search_city = $this->db()->escape(trim($get['city']));
|
$search_city = $this->db()->escape(trim($get['city']));
|
||||||
$search_housenumber = $this->db()->escape(trim($get['housenumber']));
|
$search_housenumber = $this->db()->escape(trim($get['housenumber']));
|
||||||
|
$search_stiege = $this->db()->escape(trim($get['stiege']));
|
||||||
|
|
||||||
$format = "flat";
|
$format = "flat";
|
||||||
if($get['format'] == "tree") {
|
if($get['format'] == "tree") {
|
||||||
@@ -670,7 +671,10 @@ class AddressdbApicontroller extends mfBaseApicontroller {
|
|||||||
if($search_housenumber && $search_housenumber != "%") {
|
if($search_housenumber && $search_housenumber != "%") {
|
||||||
$where .= " AND Hausnummer.hausnummer like '$search_housenumber%'";
|
$where .= " AND Hausnummer.hausnummer like '$search_housenumber%'";
|
||||||
}
|
}
|
||||||
|
if($search_stiege && $search_stiege != "%") {
|
||||||
|
$where .= " AND Hausnummer.stiege like '$search_stiege%'";
|
||||||
|
}
|
||||||
|
|
||||||
if(count($this->filter_salescluster_ids)) {
|
if(count($this->filter_salescluster_ids)) {
|
||||||
$where .= " AND Hausnummer.netzgebiet_id IN (".implode(",", $this->filter_salescluster_ids).")";
|
$where .= " AND Hausnummer.netzgebiet_id IN (".implode(",", $this->filter_salescluster_ids).")";
|
||||||
}
|
}
|
||||||
@@ -682,7 +686,7 @@ class AddressdbApicontroller extends mfBaseApicontroller {
|
|||||||
//var_dump($this->filter_salescluster_ids);exit;
|
//var_dump($this->filter_salescluster_ids);exit;
|
||||||
|
|
||||||
$sql = AddressDB::$wohneinheit_query;
|
$sql = AddressDB::$wohneinheit_query;
|
||||||
$sql .= "\n WHERE $where ORDER BY plz, gemeinde, ortschaft, strasse, LENGTH(hausnummer), hausnummer, `Wohneinheit`.block, `Wohneinheit`.stiege, `Wohneinheit`.stock, LENGTH(num), num, LENGTH(`Wohneinheit`.tuer), `Wohneinheit`.tuer";
|
$sql .= "\n WHERE $where ORDER BY plz, gemeinde, ortschaft, strasse, LENGTH(hausnummer), hausnummer, LENGTH(hausnummer_stiege), hausnummer_stiege, `Wohneinheit`.block, `Wohneinheit`.stock, LENGTH(num), num, LENGTH(`Wohneinheit`.tuer), `Wohneinheit`.tuer";
|
||||||
|
|
||||||
//$sql = "SELECT * FROM view_wohneinheit WHERE $where ORDER BY plz, gemeinde, ortschaft, strasse, LENGTH(hausnummer), hausnummer, block, stiege, stock, LENGTH(num), num, LENGTH(tuer), tuer";
|
//$sql = "SELECT * FROM view_wohneinheit WHERE $where ORDER BY plz, gemeinde, ortschaft, strasse, LENGTH(hausnummer), hausnummer, block, stiege, stock, LENGTH(num), num, LENGTH(tuer), tuer";
|
||||||
$this->log->debug($sql);
|
$this->log->debug($sql);
|
||||||
@@ -736,6 +740,7 @@ class AddressdbApicontroller extends mfBaseApicontroller {
|
|||||||
'district' => $data->ortschaft,
|
'district' => $data->ortschaft,
|
||||||
'street' => $data->strasse,
|
'street' => $data->strasse,
|
||||||
'housenumber' => $housenumber,
|
'housenumber' => $housenumber,
|
||||||
|
'stiege' => $data->hausnummer_stiege,
|
||||||
'lot_number' => $data->grund_nr,
|
'lot_number' => $data->grund_nr,
|
||||||
'meridian' => $data->meridian,
|
'meridian' => $data->meridian,
|
||||||
'rw' => $data->rw,
|
'rw' => $data->rw,
|
||||||
@@ -761,7 +766,6 @@ class AddressdbApicontroller extends mfBaseApicontroller {
|
|||||||
'oaid' => $data->wohneinheit_oaid,
|
'oaid' => $data->wohneinheit_oaid,
|
||||||
'num' => (int)$data->num,
|
'num' => (int)$data->num,
|
||||||
'block' => $data->block,
|
'block' => $data->block,
|
||||||
'stiege' => $data->stiege,
|
|
||||||
'stock' => $data->stock,
|
'stock' => $data->stock,
|
||||||
'tuer' => $data->tuer,
|
'tuer' => $data->tuer,
|
||||||
'zusatz' => $data->zusatz,
|
'zusatz' => $data->zusatz,
|
||||||
@@ -801,6 +805,7 @@ class AddressdbApicontroller extends mfBaseApicontroller {
|
|||||||
$new_address['cluster_id'] = $ta['cluster_id'];
|
$new_address['cluster_id'] = $ta['cluster_id'];
|
||||||
$new_address['street'] = $ta['street'];
|
$new_address['street'] = $ta['street'];
|
||||||
$new_address['housenumber'] = $ta['housenumber'];
|
$new_address['housenumber'] = $ta['housenumber'];
|
||||||
|
$new_address['stiege'] = $ta['stiege'];
|
||||||
$new_address['zip'] = $ta['zip'];
|
$new_address['zip'] = $ta['zip'];
|
||||||
$new_address['city'] = $ta['city'];
|
$new_address['city'] = $ta['city'];
|
||||||
if(array_key_exists("municipality", $ta)) {
|
if(array_key_exists("municipality", $ta)) {
|
||||||
@@ -814,7 +819,6 @@ class AddressdbApicontroller extends mfBaseApicontroller {
|
|||||||
$new_address['building_unit_count'] = $ta['building_unit_count'];
|
$new_address['building_unit_count'] = $ta['building_unit_count'];
|
||||||
$new_address['num'] = $u['num'];
|
$new_address['num'] = $u['num'];
|
||||||
$new_address['block'] = $u['block'];
|
$new_address['block'] = $u['block'];
|
||||||
$new_address['stiege'] = $u['stiege'];
|
|
||||||
$new_address['stock'] = $u['stock'];
|
$new_address['stock'] = $u['stock'];
|
||||||
$new_address['tuer'] = $u['tuer'];
|
$new_address['tuer'] = $u['tuer'];
|
||||||
$new_address['zusatz'] = $u['zusatz'];
|
$new_address['zusatz'] = $u['zusatz'];
|
||||||
|
|||||||
@@ -374,6 +374,7 @@ class PreorderApicontroller extends mfBaseApicontroller {
|
|||||||
$address_search_fields = [
|
$address_search_fields = [
|
||||||
'street' => 'strasse',
|
'street' => 'strasse',
|
||||||
'housenumber' => "hausnummer",
|
'housenumber' => "hausnummer",
|
||||||
|
'stiege' => "hausnummer_stiege",
|
||||||
'zip' => "plz"
|
'zip' => "plz"
|
||||||
];
|
];
|
||||||
if($this->district_is_city) {
|
if($this->district_is_city) {
|
||||||
@@ -398,7 +399,7 @@ class PreorderApicontroller extends mfBaseApicontroller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$unit_search = [];
|
$unit_search = [];
|
||||||
foreach(['block','stiege','stock','tuer','unit_string'] as $key) {
|
foreach(['block','stock','tuer','unit_string'] as $key) {
|
||||||
if(property_exists($this->post['address'], $key) && trim($this->post['address']->$key)) {
|
if(property_exists($this->post['address'], $key) && trim($this->post['address']->$key)) {
|
||||||
$unit_search[$key] = trim($this->post['address']->$key);
|
$unit_search[$key] = trim($this->post['address']->$key);
|
||||||
}
|
}
|
||||||
@@ -406,7 +407,7 @@ class PreorderApicontroller extends mfBaseApicontroller {
|
|||||||
|
|
||||||
|
|
||||||
// ignore unit_string if the specific fields were provided
|
// ignore unit_string if the specific fields were provided
|
||||||
if($unit_search['block'] || $unit_search['stiege'] || $unit_search['stock'] || $unit_search['tuer']) {
|
if($unit_search['block'] || $unit_search['stock'] || $unit_search['tuer']) {
|
||||||
unset($unit_search['unit_string']);
|
unset($unit_search['unit_string']);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -569,7 +570,7 @@ class PreorderApicontroller extends mfBaseApicontroller {
|
|||||||
|
|
||||||
// if all unit values are empty try to find the unit with all empty values
|
// if all unit values are empty try to find the unit with all empty values
|
||||||
// failure is not an error, but must be checked by a human at some point
|
// failure is not an error, but must be checked by a human at some point
|
||||||
$where = "hausnummer_id=".$address->hausnummer_id." AND (block = '' OR block IS NULL) AND (stiege = '' OR stiege IS NULL) AND (stock = '' OR stock IS NULL) AND (tuer = '' OR tuer IS NULL) AND (bezeichner = '' OR bezeichner IS NULL)";
|
$where = "hausnummer_id=".$address->hausnummer_id." AND (block = '' OR block IS NULL) AND (stock = '' OR stock IS NULL) AND (tuer = '' OR tuer IS NULL) AND (bezeichner = '' OR bezeichner IS NULL)";
|
||||||
if($zusatz) {
|
if($zusatz) {
|
||||||
$where .= " AND zusatz='$zusatz'";
|
$where .= " AND zusatz='$zusatz'";
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -530,13 +530,14 @@ class Preorder extends mfBaseModel {
|
|||||||
$address['cluster_id'] = $hausnummer->netzgebiet->extref;
|
$address['cluster_id'] = $hausnummer->netzgebiet->extref;
|
||||||
$address['street'] = $hausnummer->strasse->name;
|
$address['street'] = $hausnummer->strasse->name;
|
||||||
$address['housenumber'] = $hausnummer->hausnummer;
|
$address['housenumber'] = $hausnummer->hausnummer;
|
||||||
|
$address['stiege'] = $hausnummer->stiege;
|
||||||
$address['zip'] = $hausnummer->plz->plz;
|
$address['zip'] = $hausnummer->plz->plz;
|
||||||
$address['city'] = $hausnummer->strasse->gemeinde->name;
|
$address['city'] = $hausnummer->strasse->gemeinde->name;
|
||||||
$address['municipality'] = "";
|
$address['municipality'] = "";
|
||||||
$address['district'] = $hausnummer->ortschaft->name;
|
$address['district'] = $hausnummer->ortschaft->name;
|
||||||
$address['block'] = ($wohneinheit->block) ? $wohneinheit->block : null;
|
$address['block'] = ($wohneinheit->block) ? $wohneinheit->block : null;
|
||||||
$address['stock'] = ($wohneinheit->stock) ? $wohneinheit->stock : null;
|
$address['stock'] = ($wohneinheit->stock) ? $wohneinheit->stock : null;
|
||||||
$address['stiege'] = ($wohneinheit->stiege) ? $wohneinheit->stiege : null;
|
//$address['stiege'] = ($wohneinheit->stiege) ? $wohneinheit->stiege : null;
|
||||||
$address['tuer'] = ($wohneinheit->tuer) ? $wohneinheit->tuer : null;
|
$address['tuer'] = ($wohneinheit->tuer) ? $wohneinheit->tuer : null;
|
||||||
$address['unit_string'] = ($wohneinheit->bezeichner) ? $wohneinheit->bezeichner : null;
|
$address['unit_string'] = ($wohneinheit->bezeichner) ? $wohneinheit->bezeichner : null;
|
||||||
$address['is_shipping'] = ($this->shipping_address == "address") ? true : false;
|
$address['is_shipping'] = ($this->shipping_address == "address") ? true : false;
|
||||||
@@ -554,12 +555,12 @@ class Preorder extends mfBaseModel {
|
|||||||
$customer['firstnam'] = ($this->firstname) ? $this->firstname : null;
|
$customer['firstnam'] = ($this->firstname) ? $this->firstname : null;
|
||||||
$customer['lastname'] = ($this->lastname) ? $this->lastname : null;
|
$customer['lastname'] = ($this->lastname) ? $this->lastname : null;
|
||||||
$customer['street'] = ($this->street) ? $this->street : null;
|
$customer['street'] = ($this->street) ? $this->street : null;
|
||||||
|
$customer['stiege'] = ($this->stiege) ? $this->stiege : null;
|
||||||
$customer['housenumber'] = ($this->housenumber) ? $this->housenumber : null;
|
$customer['housenumber'] = ($this->housenumber) ? $this->housenumber : null;
|
||||||
$customer['zip'] = ($this->zip) ? $this->zip : null;
|
$customer['zip'] = ($this->zip) ? $this->zip : null;
|
||||||
$customer['city'] = ($this->city) ? $this->city : null;
|
$customer['city'] = ($this->city) ? $this->city : null;
|
||||||
$customer['block'] = ($this->block) ? $this->block : null;
|
$customer['block'] = ($this->block) ? $this->block : null;
|
||||||
$customer['stock'] = ($this->stock) ? $this->stock : null;
|
$customer['stock'] = ($this->stock) ? $this->stock : null;
|
||||||
$customer['stiege'] = ($this->stiege) ? $this->stiege : null;
|
|
||||||
$customer['tuer'] = ($this->tuer) ? $this->tuer : null;
|
$customer['tuer'] = ($this->tuer) ? $this->tuer : null;
|
||||||
$customer['unit_string'] = ($this->unit_string) ? $this->unit_string : null;
|
$customer['unit_string'] = ($this->unit_string) ? $this->unit_string : null;
|
||||||
$customer['phone'] = ($this->phone) ? $this->phone : null;
|
$customer['phone'] = ($this->phone) ? $this->phone : null;
|
||||||
|
|||||||
@@ -730,6 +730,13 @@ class PreorderModel {
|
|||||||
$where .= " AND adb_hausnummer.hausnummer like '%$hausnummer%'";
|
$where .= " AND adb_hausnummer.hausnummer like '%$hausnummer%'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(array_key_exists("stiege", $filter)) {
|
||||||
|
$stiege = FronkDB::singleton()->escape($filter['stiege']);
|
||||||
|
if($stiege) {
|
||||||
|
$where .= " AND adb_hausnummer.stiege like '%$stiege%'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(array_key_exists("unit_count", $filter)) {
|
if(array_key_exists("unit_count", $filter)) {
|
||||||
$unit_count = $filter['unit_count'];
|
$unit_count = $filter['unit_count'];
|
||||||
|
|||||||
31
db/migrations/20240516114029_adb_hausnummer_add_stiege.php
Normal file
31
db/migrations/20240516114029_adb_hausnummer_add_stiege.php
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Phinx\Migration\AbstractMigration;
|
||||||
|
|
||||||
|
final class AdbHausnummerAddStiege extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
if($this->getEnvironment() == "thetool") {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->getEnvironment() == "addressdb") {
|
||||||
|
$table = $this->table("Hausnummer");
|
||||||
|
$table->addColumn("stiege", "string", ["null" => true, "default" => null, "after" => "hausnummer"]);
|
||||||
|
$table->update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
if($this->getEnvironment() == "thetool") {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->getEnvironment() == "addressdb") {
|
||||||
|
$this->table("Hausnummer")->removeColumn("stiege")->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@ info:
|
|||||||
license:
|
license:
|
||||||
name: Apache 2.0 License
|
name: Apache 2.0 License
|
||||||
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
version: 1.0.0
|
version: 1.2.0
|
||||||
servers:
|
servers:
|
||||||
- url: https://thetool-test.xinon.at/api/v1
|
- url: https://thetool-test.xinon.at/api/v1
|
||||||
- url: https://thetool.xinon.at/api/v1
|
- url: https://thetool.xinon.at/api/v1
|
||||||
@@ -176,6 +176,11 @@ paths:
|
|||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
- name: stiege
|
||||||
|
description: Stiege Suchbegriff
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: |
|
description: |
|
||||||
@@ -435,7 +440,7 @@ paths:
|
|||||||
|
|
||||||
Soll Starterkit an Anschlussadresse gesendet werden, muss `address.is_shipping` auf true gestellt werden, bei false wird das Starterkit an Vertragsinhaber (`customer`) gesendet.
|
Soll Starterkit an Anschlussadresse gesendet werden, muss `address.is_shipping` auf true gestellt werden, bei false wird das Starterkit an Vertragsinhaber (`customer`) gesendet.
|
||||||
|
|
||||||
Wohneinheitsidentifikation (Block, Stiege, Stock, Tür) kann strukturiert mit jeweils einem eigenen Feld übergeben werden oder alle Wohneinheitsdaten in einem einzigen String (`unit_string`).
|
Wohneinheitsidentifikation (Block, Stock, Tür) kann strukturiert mit jeweils einem eigenen Feld übergeben werden oder alle Wohneinheitsdaten in einem einzigen String (`unit_string`).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -920,6 +925,10 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
description: Hausnummer
|
description: Hausnummer
|
||||||
example: 13
|
example: 13
|
||||||
|
stiege:
|
||||||
|
type: string
|
||||||
|
description: Stiege
|
||||||
|
example: 2
|
||||||
zip:
|
zip:
|
||||||
type: string
|
type: string
|
||||||
description: PLZ
|
description: PLZ
|
||||||
@@ -1007,10 +1016,6 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
description: Stock
|
description: Stock
|
||||||
example: 42
|
example: 42
|
||||||
stiege:
|
|
||||||
type: string
|
|
||||||
description: Stiege
|
|
||||||
example: ""
|
|
||||||
tuer:
|
tuer:
|
||||||
type: string
|
type: string
|
||||||
description: Tür
|
description: Tür
|
||||||
@@ -1040,6 +1045,10 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
description: Hausnummer
|
description: Hausnummer
|
||||||
example: 13
|
example: 13
|
||||||
|
stiege:
|
||||||
|
type: string
|
||||||
|
description: Stiege
|
||||||
|
example: 2
|
||||||
zip:
|
zip:
|
||||||
type: string
|
type: string
|
||||||
description: PLZ
|
description: PLZ
|
||||||
@@ -1088,10 +1097,6 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
description: Stock
|
description: Stock
|
||||||
example: 42
|
example: 42
|
||||||
stiege:
|
|
||||||
type: string
|
|
||||||
description: Stiege
|
|
||||||
example: ""
|
|
||||||
tuer:
|
tuer:
|
||||||
type: string
|
type: string
|
||||||
description: Tür
|
description: Tür
|
||||||
@@ -1144,6 +1149,9 @@ components:
|
|||||||
housenumber:
|
housenumber:
|
||||||
type: string
|
type: string
|
||||||
description: Hausnummer der Anschlussadresse
|
description: Hausnummer der Anschlussadresse
|
||||||
|
stiege:
|
||||||
|
type: string
|
||||||
|
description: Stiege der Anschlussadresse
|
||||||
zip:
|
zip:
|
||||||
type: string
|
type: string
|
||||||
description: PLZ der Anschlussadresse
|
description: PLZ der Anschlussadresse
|
||||||
@@ -1159,9 +1167,6 @@ components:
|
|||||||
stock:
|
stock:
|
||||||
type: string
|
type: string
|
||||||
description: Stock der Anschlussadresse
|
description: Stock der Anschlussadresse
|
||||||
stiege:
|
|
||||||
type: string
|
|
||||||
description: Stiege der Anschlussadresse
|
|
||||||
tuer:
|
tuer:
|
||||||
type: string
|
type: string
|
||||||
description: Tür der Anschlussadresse
|
description: Tür der Anschlussadresse
|
||||||
@@ -1307,6 +1312,10 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
description: Hausnummer der Anschlussadresse
|
description: Hausnummer der Anschlussadresse
|
||||||
example: 13
|
example: 13
|
||||||
|
stiege:
|
||||||
|
type: string
|
||||||
|
description: Stiege der Anschlussadresse
|
||||||
|
example: "2"
|
||||||
zip:
|
zip:
|
||||||
type: string
|
type: string
|
||||||
description: PLZ der Anschlussadresse
|
description: PLZ der Anschlussadresse
|
||||||
@@ -1323,10 +1332,6 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
description: Stock der Anschlussadresse
|
description: Stock der Anschlussadresse
|
||||||
example: 42
|
example: 42
|
||||||
stiege:
|
|
||||||
type: string
|
|
||||||
description: Stiege der Anschlussadresse
|
|
||||||
example: ""
|
|
||||||
tuer:
|
tuer:
|
||||||
type: string
|
type: string
|
||||||
description: Tür der Anschlussadresse
|
description: Tür der Anschlussadresse
|
||||||
@@ -1689,6 +1694,10 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
description: Hausnummer Kunde
|
description: Hausnummer Kunde
|
||||||
example: 42
|
example: 42
|
||||||
|
stiege:
|
||||||
|
type: string
|
||||||
|
description: Stiege
|
||||||
|
example: 2
|
||||||
zip:
|
zip:
|
||||||
type: string
|
type: string
|
||||||
description: PLZ Kunde
|
description: PLZ Kunde
|
||||||
@@ -1709,10 +1718,6 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
description: Adresszusatz
|
description: Adresszusatz
|
||||||
example: null
|
example: null
|
||||||
stiege:
|
|
||||||
type: string
|
|
||||||
description: Adresszusatz
|
|
||||||
example: null
|
|
||||||
stock:
|
stock:
|
||||||
type: string
|
type: string
|
||||||
description: Adresszusatz
|
description: Adresszusatz
|
||||||
|
|||||||
Reference in New Issue
Block a user