Liezen Bulk Update done
This commit is contained in:
@@ -71,25 +71,6 @@ while($csv = fgetcsv($input, 0, ",")) {
|
||||
$rw = trim($csv[25]);
|
||||
$hw = trim($csv[26]);
|
||||
|
||||
/*
|
||||
$adrcd = trim($csv[0]);
|
||||
$gem_kz = trim($csv[2]);
|
||||
$gem_name = trim($csv[3]);
|
||||
$ort_kz = trim($csv[5]);
|
||||
$plz_string = trim($csv[4]);
|
||||
$ort_name = trim($csv[6]);
|
||||
$skz = trim($csv[7]);
|
||||
$strasse_name = trim($csv[8]);
|
||||
$hausnummer_string = trim($csv[9]);
|
||||
$hausnummer_extref = trim($csv[0]);
|
||||
if(in_array($hausnummer_extref, $h_extrefs)) {
|
||||
die("Hausnummer extref doppelt! $hausnummer_extref\n");
|
||||
}
|
||||
$h_extrefs[] = $hausnummer_extref;
|
||||
*/
|
||||
//$lat = str_replace(",",".",trim($csv[7]));
|
||||
//$long = str_replace(",",".",trim($csv[8]));
|
||||
|
||||
|
||||
if(!is_numeric($hausnummer_id)) {
|
||||
die("Invalid hausnummer_id '$hausnummer_id'\n");
|
||||
@@ -187,7 +168,7 @@ while($csv = fgetcsv($input, 0, ",")) {
|
||||
$updates[] = "hw";
|
||||
}
|
||||
|
||||
continue;
|
||||
//continue;
|
||||
|
||||
if(!count($updates)) {
|
||||
continue;
|
||||
@@ -203,6 +184,14 @@ while($csv = fgetcsv($input, 0, ",")) {
|
||||
//$existing_hausnummer->save();
|
||||
}
|
||||
|
||||
|
||||
if(in_array("strasse", $updates)) {
|
||||
$strasse = ADBStrasseModel::getFirst(["gemeinde_id" => $existing_hausnummer->strasse->gemeinde_id, "name" => $strasse_name]);
|
||||
if(!$strasse) {
|
||||
die("Strasse $skz $strasse_name not found!\n");
|
||||
}
|
||||
}
|
||||
|
||||
if(in_array("gdaeigenschaft", $updates)) {
|
||||
$existing_hausnummer->gdaeigenschaft = $gdaeigenschaft;
|
||||
}
|
||||
@@ -264,6 +253,7 @@ while($csv = fgetcsv($input, 0, ",")) {
|
||||
//$existing_hausnummer->save();
|
||||
}
|
||||
|
||||
|
||||
$preorder = PreorderModel::getFirst(["adb_hausnummer_id" => $existing_hausnummer->id]);
|
||||
if($preorder) {
|
||||
echo "========================================================================\n";
|
||||
|
Can't render this file because it is too large.
|
|
Can't render this file because it is too large.
|
|
Can't render this file because it is too large.
|
|
Can't render this file because it is too large.
|
|
Can't render this file because it is too large.
|
|
Can't render this file because it is too large.
|
Reference in New Issue
Block a user