Добрый день. При заполнении кадастрового номера участка и дальнейшем автоматическом формировании адреса не формируется адрес ОТГ. Также не формируется адрес населенного пункта, если у него код КОАТУУ совпадает с кодом громады. На примере 2324555100: Создаю внутри ОТГ населенный пункт. Код 55100. При формировании адреса все заканчивается на "Запорізька область, Приазовський район". То же самое, если населенный пункт не выбирать, а просто вручную вписать в поле кадастрового номера участка "2324555100:" и далее по порядку зону и квартал. В чем может быть проблема? Старый сельсовет удален, в списке есть только громада.
Аналогичная проблема, если заполнять адрес собственника участка. При выборе населенного пункта внутри громады с таким же кодом, как у громады, дальше названия района адрес не формируется. Раньше при одинаковых кодах сельсовета и населенного пункта таких проблем не было
Не формується адреса громади
-
- Повідомлень: 19
- З нами з: 10 січня 2018, 23:24
Re: Не формируется адрес громады
все, отбой, разобрался. В карточке громады нужно было удалить принадлежность к общине. А в карточке населенного пункта наоборот-добавить общину.
Re: Не формируется адрес громады
"Розівську ОТГ" мы добавим в следующей версии. Если знаете как выполнять запросы, то её создать и присвоить ей можно запросами:
Код: Виділити все
-- Створення нової громади
IF NOT EXISTS(SELECT "ID_Code" FROM "Advice" WHERE ("ID_Area" = 23) and ("ID_Region" = 249) and ("ID_Advice" = 55100) and ("ID_TypePlace" = 'г'))
BEGIN
DECLARE @NumbA Int
SET @NumbA = (SELECT MAX("ID_Code")+1 FROM "Advice");
INSERT INTO "Advice" ("ID_Code", "ID_Area", "ID_Region", "ID_Advice", "Name", "ID_TypePlace") VALUES (@NumbA, 23, 249, 55100, 'Розівська ОТГ', 'г');
END
GO
-- Присвоєння громади сільрадам і населеним пунктам
IF EXISTS(SELECT "ID_Code" FROM "Advice" WHERE ("ID_Area" = 23) and ("ID_Region" = 249) and ("ID_Advice" = 55100) and ("ID_TypePlace" = 'г'))
BEGIN
DECLARE @NumbG Int, @NumbA Int;
SET @NumbG = (SELECT MIN("ID_Code") "ID_Code" FROM "Advice" WHERE ("ID_Area" = 23) and ("ID_Region" = 249) and ("ID_Advice" = 55100) and ("ID_TypePlace" = 'г'));
SET @NumbA = (SELECT MIN("ID_Code") "ID_Code" FROM "Advice" WHERE ("ID_Area" = 23) and ("ID_Region" = 249) and ("ID_Advice" = 55100) and ("ID_TypePlace" = 'т'));
UPDATE "Advice" SET "ID_SubAdvice" = @NumbG WHERE ("ID_Area"=23) and ("ID_Region"=249) and ("ID_Code"=@NumbA);
UPDATE "Place" SET "ID_SubAdvice" = @NumbG WHERE ("ID_Area"=23) and ("ID_Region"=249) and ("ID_Advice"=@NumbA) and (("State" = 0) or ("State" is Null));
SET @NumbA = (SELECT MIN("ID_Code") "ID_Code" FROM "Advice" WHERE ("ID_Area" = 23) and ("ID_Region" = 249) and ("ID_Advice" = 80200) and ("ID_TypePlace" = 'д'));
UPDATE "Advice" SET "ID_SubAdvice" = @NumbG, "State" = 1 WHERE ("ID_Area"=23) and ("ID_Region"=249) and ("ID_Code"=@NumbA);
UPDATE "Place" SET "ID_SubAdvice" = @NumbG WHERE ("ID_Area"=23) and ("ID_Region"=249) and ("ID_Advice"=@NumbA) and (("State" = 0) or ("State" is Null));
SET @NumbA = (SELECT MIN("ID_Code") "ID_Code" FROM "Advice" WHERE ("ID_Area" = 23) and ("ID_Region" = 249) and ("ID_Advice" = 81800) and ("ID_TypePlace" = 'д'));
UPDATE "Advice" SET "ID_SubAdvice" = @NumbG, "State" = 1 WHERE ("ID_Area"=23) and ("ID_Region"=249) and ("ID_Code"=@NumbA);
UPDATE "Place" SET "ID_SubAdvice" = @NumbG WHERE ("ID_Area"=23) and ("ID_Region"=249) and ("ID_Advice"=@NumbA) and (("State" = 0) or ("State" is Null));
SET @NumbA = (SELECT MIN("ID_Code") "ID_Code" FROM "Advice" WHERE ("ID_Area" = 23) and ("ID_Region" = 249) and ("ID_Advice" = 82000) and ("ID_TypePlace" = 'д'));
UPDATE "Advice" SET "ID_SubAdvice" = @NumbG, "State" = 1 WHERE ("ID_Area"=23) and ("ID_Region"=249) and ("ID_Code"=@NumbA);
UPDATE "Place" SET "ID_SubAdvice" = @NumbG WHERE ("ID_Area"=23) and ("ID_Region"=249) and ("ID_Advice"=@NumbA) and (("State" = 0) or ("State" is Null));
SET @NumbA = (SELECT MIN("ID_Code") "ID_Code" FROM "Advice" WHERE ("ID_Area" = 23) and ("ID_Region" = 249) and ("ID_Advice" = 83000) and ("ID_TypePlace" = 'д'));
UPDATE "Advice" SET "ID_SubAdvice" = @NumbG, "State" = 1 WHERE ("ID_Area"=23) and ("ID_Region"=249) and ("ID_Code"=@NumbA);
UPDATE "Place" SET "ID_SubAdvice" = @NumbG WHERE ("ID_Area"=23) and ("ID_Region"=249) and ("ID_Advice"=@NumbA) and (("State" = 0) or ("State" is Null));
SET @NumbA = (SELECT MIN("ID_Code") "ID_Code" FROM "Advice" WHERE ("ID_Area" = 23) and ("ID_Region" = 249) and ("ID_Advice" = 84000) and ("ID_TypePlace" = 'д'));
UPDATE "Advice" SET "ID_SubAdvice" = @NumbG, "State" = 1 WHERE ("ID_Area"=23) and ("ID_Region"=249) and ("ID_Code"=@NumbA);
UPDATE "Place" SET "ID_SubAdvice" = @NumbG WHERE ("ID_Area"=23) and ("ID_Region"=249) and ("ID_Advice"=@NumbA) and (("State" = 0) or ("State" is Null));
SET @NumbA = (SELECT MIN("ID_Code") "ID_Code" FROM "Advice" WHERE ("ID_Area" = 23) and ("ID_Region" = 249) and ("ID_Advice" = 84800) and ("ID_TypePlace" = 'д'));
UPDATE "Advice" SET "ID_SubAdvice" = @NumbG, "State" = 1 WHERE ("ID_Area"=23) and ("ID_Region"=249) and ("ID_Code"=@NumbA);
UPDATE "Place" SET "ID_SubAdvice" = @NumbG WHERE ("ID_Area"=23) and ("ID_Region"=249) and ("ID_Advice"=@NumbA) and (("State" = 0) or ("State" is Null));
END
GO