importing and displaying Rimo Building userLabel
This commit is contained in:
@@ -75,6 +75,9 @@
|
|||||||
</tr><tr>
|
</tr><tr>
|
||||||
<th>Rimo Operational State</th>
|
<th>Rimo Operational State</th>
|
||||||
<td><?=$address->rimo_op_state?></td>
|
<td><?=$address->rimo_op_state?></td>
|
||||||
|
</tr><tr>
|
||||||
|
<th>Rimo User Label</th>
|
||||||
|
<td><?=$address->rimo_user_label?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php if($address->vlan_stag): ?>
|
<?php if($address->vlan_stag): ?>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -506,6 +506,9 @@
|
|||||||
</tr><tr>
|
</tr><tr>
|
||||||
<th>Building External ID:</th>
|
<th>Building External ID:</th>
|
||||||
<td class="text-monospace"><?=$preorder->adb_hausnummer->rimo_id?>
|
<td class="text-monospace"><?=$preorder->adb_hausnummer->rimo_id?>
|
||||||
|
</tr><tr>
|
||||||
|
<th>User Label:</th>
|
||||||
|
<td class="text-monospace"><?=$preorder->adb_hausnummer->rimo_user_label?>
|
||||||
</tr><tr>
|
</tr><tr>
|
||||||
<th>Building Execution State:</th>
|
<th>Building Execution State:</th>
|
||||||
<td class="text-monospace"><?=$preorder->adb_hausnummer->rimo_ex_state?>
|
<td class="text-monospace"><?=$preorder->adb_hausnummer->rimo_ex_state?>
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Phinx\Migration\AbstractMigration;
|
||||||
|
|
||||||
|
final class AdbHausnummerAddRimoUserLabel extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
if($this->getEnvironment() == "thetool") {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->getEnvironment() == "addressdb") {
|
||||||
|
$table = $this->table("Hausnummer");
|
||||||
|
$table->addColumn("rimo_user_label", "string", ["null" => true, "default" => null, "after" => "rimo_op_state", "limit" => 255]);
|
||||||
|
$table->update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
if($this->getEnvironment() == "thetool") {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->getEnvironment() == "addressdb") {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -354,6 +354,14 @@ foreach ($clusters as $cluster_data) {
|
|||||||
$hausnummer_changed = true;
|
$hausnummer_changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!$building->userLabel && $hausnummer->rimo_user_label) {
|
||||||
|
$hausnummer->rimo_user_label = null;
|
||||||
|
$hausnummer_changed = true;
|
||||||
|
} elseif($building->userLabel != $hausnummer->rimo_user_label) {
|
||||||
|
$hausnummer->rimo_user_label = $building->userLabel;
|
||||||
|
$hausnummer_changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
if($hausnummer_changed) {
|
if($hausnummer_changed) {
|
||||||
$hausnummer->save();
|
$hausnummer->save();
|
||||||
$hausnummer->resetSaveNesting();
|
$hausnummer->resetSaveNesting();
|
||||||
|
|||||||
Reference in New Issue
Block a user