added home trench to Borderpoint image in ConstructionConsent
This commit is contained in:
@@ -411,8 +411,8 @@ class ConstructionConsent extends mfBaseModel {
|
||||
END AS status_light
|
||||
FROM ConstructionConsent
|
||||
LEFT JOIN ConstructionConsentOwner cwo ON ConstructionConsent.id = cwo.constructionconsent_id
|
||||
LEFT JOIN addressdb.view_hausnummer vh ON ConstructionConsent.adb_hausnummer_id = vh.hausnummer_id
|
||||
LEFT JOIN addressdb.Strasse vs ON ConstructionConsent.adb_strasse_id = vs.id
|
||||
LEFT JOIN `".ADDRESSDB_DBNAME."`.view_hausnummer vh ON ConstructionConsent.adb_hausnummer_id = vh.hausnummer_id
|
||||
LEFT JOIN `".ADDRESSDB_DBNAME."`.Strasse vs ON ConstructionConsent.adb_strasse_id = vs.id
|
||||
WHERE $where
|
||||
GROUP BY ConstructionConsent.id
|
||||
$having
|
||||
|
||||
@@ -766,6 +766,7 @@ class ConstructionConsentController extends mfBaseController {
|
||||
|
||||
private function getRimoPlanPreviewApi() {
|
||||
$adb_hausnummer_id = $this->request->building_id;
|
||||
$include_home_trench = $this->request->include_home_trench ? true : false;
|
||||
|
||||
$hausnummer = new ADBHausnummer($adb_hausnummer_id);
|
||||
if(!$hausnummer->id) {
|
||||
@@ -849,7 +850,18 @@ class ConstructionConsentController extends mfBaseController {
|
||||
];
|
||||
|
||||
if($hausnummer->trenches) {
|
||||
$trenches = json_decode($hausnummer->trenches);
|
||||
$trenches = [];
|
||||
if($include_home_trench && $hausnummer->home_trench) {
|
||||
$trenches = [json_decode($hausnummer->home_trench)];
|
||||
}
|
||||
|
||||
$street_trenches = json_decode($hausnummer->trenches);
|
||||
foreach($street_trenches as $t) {
|
||||
if(is_array($t) && count($t)) {
|
||||
$trenches[] = $t;
|
||||
}
|
||||
}
|
||||
$this->log->debug(print_r($trenches, true));
|
||||
|
||||
$params["paths"] = [
|
||||
"line_width" => 5,
|
||||
|
||||
Reference in New Issue
Block a user