Subversion Repositories Sigmater

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6 Andrea 1
create or replace procedure CREA_UTENTE_PROVINCIALE(user_name varchar2,nome varchar2,cognome varchar2,email varchar2,sigla_provincia varchar2) is
2
 
3
 
4
id_ente                 NUMBER;
5
 
6
begin
7
     -- inserimento utente
8
     insert into ws_utenti (USERNAME,PASSWORD,
9
                            COGNOME,NOME,
10
                            EMAIL,LOGIN,
11
                            USR_CREATE_DATE,USR_EXPIRATION_DATE)
12
                 values    (user_name,'7c222fb2927d828af22f592134e8932480637c0d', 
13
                            cognome,nome,
14
                            email,upper(user_name),
15
                            sysdate,sysdate); 
16
     -- creazione del profilo 
17
     CREA_RUOLO_PROFILO('COMUNALE',1039,user_name,416);
18
	   CREA_RUOLO_PROFILO('COMUNALE',1038,user_name,415);
19
	   CREA_RUOLO_PROFILO('COMUNALE',1037,user_name,414);
20
	   CREA_RUOLO_PROFILO('COMUNALE',1035,user_name,413);
21
	   CREA_RUOLO_PROFILO('COMUNALE',1033,user_name,412);
22
	   CREA_RUOLO_PROFILO('COMUNALE',1030,user_name,411);
23
	   CREA_RUOLO_PROFILO('COMUNALE',1028,user_name,410);
24
	   CREA_RUOLO_PROFILO('COMUNALE',1026,user_name,409);
25
	   CREA_RUOLO_PROFILO('COMUNALE',1023,user_name,408);
26
	   CREA_RUOLO_PROFILO('COMUNALE',1020,user_name,407);
27
	   CREA_RUOLO_PROFILO('COMUNALE',1017,user_name,406);
28
	   CREA_RUOLO_PROFILO('COMUNALE',1014,user_name,405);
29
	   CREA_RUOLO_PROFILO('COMUNALE',1011,user_name,404);
30
     CREA_RUOLO_PROFILO('COMUNALE',1008,user_name,403);
31
	   CREA_RUOLO_PROFILO('COMUNALE',1006,user_name,402);
32
	   CREA_RUOLO_PROFILO('COMUNALE',1005,user_name,401);
33
	   CREA_RUOLO_PROFILO('COMUNALE',1000,user_name,400);  
34
    -- inserisco l'abilitazione  
35
    if sigla_provincia = 'GE' then
36
      insert into ws_cross_enti_utenti values(user_name,1704);
37
      insert into ws_cross_enti_utenti values(user_name,1705);
38
      insert into ws_cross_enti_utenti values(user_name,1706);
39
      insert into ws_cross_enti_utenti values(user_name,1707);
40
      insert into ws_cross_enti_utenti values(user_name,1708);
41
      insert into ws_cross_enti_utenti values(user_name,1709);
42
      insert into ws_cross_enti_utenti values(user_name,1710);
43
      insert into ws_cross_enti_utenti values(user_name,1711);
44
      insert into ws_cross_enti_utenti values(user_name,1712);
45
      insert into ws_cross_enti_utenti values(user_name,1713);
46
      insert into ws_cross_enti_utenti values(user_name,1714);
47
      insert into ws_cross_enti_utenti values(user_name,1715);
48
      insert into ws_cross_enti_utenti values(user_name,1716);
49
      insert into ws_cross_enti_utenti values(user_name,1717);
50
      insert into ws_cross_enti_utenti values(user_name,1718);
51
      insert into ws_cross_enti_utenti values(user_name,1719);
52
      insert into ws_cross_enti_utenti values(user_name,1720);
53
      insert into ws_cross_enti_utenti values(user_name,1721);
54
      insert into ws_cross_enti_utenti values(user_name,1722);
55
      insert into ws_cross_enti_utenti values(user_name,1723);
56
      insert into ws_cross_enti_utenti values(user_name,1724);
57
      insert into ws_cross_enti_utenti values(user_name,1725);
58
      insert into ws_cross_enti_utenti values(user_name,1726);
59
      insert into ws_cross_enti_utenti values(user_name,1727);
60
      insert into ws_cross_enti_utenti values(user_name,1728);
61
      insert into ws_cross_enti_utenti values(user_name,1729);
62
      insert into ws_cross_enti_utenti values(user_name,1730);
63
      insert into ws_cross_enti_utenti values(user_name,1731);
64
      insert into ws_cross_enti_utenti values(user_name,1732);
65
      insert into ws_cross_enti_utenti values(user_name,1733);
66
      insert into ws_cross_enti_utenti values(user_name,1734);
67
      insert into ws_cross_enti_utenti values(user_name,1735);
68
      insert into ws_cross_enti_utenti values(user_name,1736);
69
      insert into ws_cross_enti_utenti values(user_name,1737);
70
      insert into ws_cross_enti_utenti values(user_name,1738);
71
      insert into ws_cross_enti_utenti values(user_name,1739);
72
      insert into ws_cross_enti_utenti values(user_name,1740);
73
      insert into ws_cross_enti_utenti values(user_name,1741);
74
      insert into ws_cross_enti_utenti values(user_name,1742);
75
      insert into ws_cross_enti_utenti values(user_name,1743);
76
      insert into ws_cross_enti_utenti values(user_name,1744);
77
      insert into ws_cross_enti_utenti values(user_name,1745);
78
      insert into ws_cross_enti_utenti values(user_name,1746);
79
      insert into ws_cross_enti_utenti values(user_name,1747);
80
      insert into ws_cross_enti_utenti values(user_name,1748);
81
      insert into ws_cross_enti_utenti values(user_name,1749);
82
      insert into ws_cross_enti_utenti values(user_name,1750);
83
      insert into ws_cross_enti_utenti values(user_name,1751);
84
      insert into ws_cross_enti_utenti values(user_name,1752);
85
      insert into ws_cross_enti_utenti values(user_name,1753);
86
      insert into ws_cross_enti_utenti values(user_name,1754);
87
      insert into ws_cross_enti_utenti values(user_name,1755);
88
      insert into ws_cross_enti_utenti values(user_name,1756);
89
      insert into ws_cross_enti_utenti values(user_name,1757);
90
      insert into ws_cross_enti_utenti values(user_name,1758);
91
      insert into ws_cross_enti_utenti values(user_name,1759);
92
      insert into ws_cross_enti_utenti values(user_name,1760);
93
      insert into ws_cross_enti_utenti values(user_name,1761);
94
      insert into ws_cross_enti_utenti values(user_name,1762);
95
      insert into ws_cross_enti_utenti values(user_name,1763);
96
      insert into ws_cross_enti_utenti values(user_name,1764);
97
      insert into ws_cross_enti_utenti values(user_name,1765);
98
      insert into ws_cross_enti_utenti values(user_name,1766);
99
      insert into ws_cross_enti_utenti values(user_name,1767);
100
      insert into ws_cross_enti_utenti values(user_name,1768);
101
      insert into ws_cross_enti_utenti values(user_name,1769);
102
      insert into ws_cross_enti_utenti values(user_name,1770);
103
     -- insert into ws_cross_enti_utenti values(user_name,1771);
104
      insert into ws_cross_enti_utenti values(user_name,1772);
105
     elsif sigla_provincia = 'SV' then 
106
      insert into ws_cross_enti_utenti values(user_name,1871);
107
      insert into ws_cross_enti_utenti values(user_name,1872);
108
      insert into ws_cross_enti_utenti values(user_name,1873);
109
      insert into ws_cross_enti_utenti values(user_name,1874);
110
      insert into ws_cross_enti_utenti values(user_name,1875);
111
      insert into ws_cross_enti_utenti values(user_name,1876);
112
      insert into ws_cross_enti_utenti values(user_name,1877);
113
      insert into ws_cross_enti_utenti values(user_name,1878);
114
      insert into ws_cross_enti_utenti values(user_name,1879);
115
      insert into ws_cross_enti_utenti values(user_name,1880);
116
      insert into ws_cross_enti_utenti values(user_name,1881);
117
      insert into ws_cross_enti_utenti values(user_name,1882);
118
      insert into ws_cross_enti_utenti values(user_name,1883);
119
      insert into ws_cross_enti_utenti values(user_name,1884);
120
      insert into ws_cross_enti_utenti values(user_name,1885);
121
      insert into ws_cross_enti_utenti values(user_name,1886);
122
      insert into ws_cross_enti_utenti values(user_name,1887);
123
      insert into ws_cross_enti_utenti values(user_name,1888);
124
      insert into ws_cross_enti_utenti values(user_name,1889);
125
      insert into ws_cross_enti_utenti values(user_name,1890);
126
      insert into ws_cross_enti_utenti values(user_name,1891);
127
      insert into ws_cross_enti_utenti values(user_name,1892);
128
      insert into ws_cross_enti_utenti values(user_name,1893);
129
      insert into ws_cross_enti_utenti values(user_name,1894);
130
      insert into ws_cross_enti_utenti values(user_name,1895);
131
      insert into ws_cross_enti_utenti values(user_name,1896);
132
      insert into ws_cross_enti_utenti values(user_name,1897);
133
      insert into ws_cross_enti_utenti values(user_name,1898);
134
      insert into ws_cross_enti_utenti values(user_name,1899);
135
      insert into ws_cross_enti_utenti values(user_name,1900);
136
      insert into ws_cross_enti_utenti values(user_name,1901);
137
      insert into ws_cross_enti_utenti values(user_name,1902);
138
      insert into ws_cross_enti_utenti values(user_name,1903);
139
      insert into ws_cross_enti_utenti values(user_name,1904);
140
      insert into ws_cross_enti_utenti values(user_name,1905);
141
      insert into ws_cross_enti_utenti values(user_name,1906);
142
      insert into ws_cross_enti_utenti values(user_name,1907);
143
      insert into ws_cross_enti_utenti values(user_name,1908);
144
      insert into ws_cross_enti_utenti values(user_name,1909);
145
      insert into ws_cross_enti_utenti values(user_name,1910);
146
      insert into ws_cross_enti_utenti values(user_name,1911);
147
      insert into ws_cross_enti_utenti values(user_name,1912);
148
      insert into ws_cross_enti_utenti values(user_name,1913);
149
      insert into ws_cross_enti_utenti values(user_name,1914);
150
      insert into ws_cross_enti_utenti values(user_name,1915);
151
      insert into ws_cross_enti_utenti values(user_name,1916);
152
      insert into ws_cross_enti_utenti values(user_name,1917);
153
      insert into ws_cross_enti_utenti values(user_name,1918);
154
      insert into ws_cross_enti_utenti values(user_name,1919);
155
      insert into ws_cross_enti_utenti values(user_name,1920);
156
      insert into ws_cross_enti_utenti values(user_name,1921);
157
      insert into ws_cross_enti_utenti values(user_name,1922);
158
      insert into ws_cross_enti_utenti values(user_name,1923);
159
      insert into ws_cross_enti_utenti values(user_name,1924);
160
      insert into ws_cross_enti_utenti values(user_name,1925);
161
      insert into ws_cross_enti_utenti values(user_name,1926);
162
      insert into ws_cross_enti_utenti values(user_name,1927);
163
      insert into ws_cross_enti_utenti values(user_name,1928);
164
      insert into ws_cross_enti_utenti values(user_name,1929);
165
      insert into ws_cross_enti_utenti values(user_name,1930);
166
      insert into ws_cross_enti_utenti values(user_name,1931);
167
      insert into ws_cross_enti_utenti values(user_name,1932);
168
      insert into ws_cross_enti_utenti values(user_name,1933);
169
      insert into ws_cross_enti_utenti values(user_name,1934);
170
      insert into ws_cross_enti_utenti values(user_name,1935);
171
      insert into ws_cross_enti_utenti values(user_name,1936);
172
      insert into ws_cross_enti_utenti values(user_name,1937);
173
      insert into ws_cross_enti_utenti values(user_name,1938);
174
      insert into ws_cross_enti_utenti values(user_name,1939);
175
     elsif sigla_provincia = 'SP' then
176
      insert into ws_cross_enti_utenti values(user_name,1839);
177
      insert into ws_cross_enti_utenti values(user_name,1840);
178
      insert into ws_cross_enti_utenti values(user_name,1841);
179
      insert into ws_cross_enti_utenti values(user_name,1842);
180
      insert into ws_cross_enti_utenti values(user_name,1843);
181
      insert into ws_cross_enti_utenti values(user_name,1844);
182
      insert into ws_cross_enti_utenti values(user_name,1845);
183
      insert into ws_cross_enti_utenti values(user_name,1846);
184
      insert into ws_cross_enti_utenti values(user_name,1847);
185
      insert into ws_cross_enti_utenti values(user_name,1848);
186
      insert into ws_cross_enti_utenti values(user_name,1849);
187
      insert into ws_cross_enti_utenti values(user_name,1850);
188
      insert into ws_cross_enti_utenti values(user_name,1851);
189
      insert into ws_cross_enti_utenti values(user_name,1852);
190
      insert into ws_cross_enti_utenti values(user_name,1853);
191
      insert into ws_cross_enti_utenti values(user_name,1854);
192
      insert into ws_cross_enti_utenti values(user_name,1855);
193
      insert into ws_cross_enti_utenti values(user_name,1856);
194
      insert into ws_cross_enti_utenti values(user_name,1857);
195
      insert into ws_cross_enti_utenti values(user_name,1858);
196
      insert into ws_cross_enti_utenti values(user_name,1859);
197
      insert into ws_cross_enti_utenti values(user_name,1860);
198
      insert into ws_cross_enti_utenti values(user_name,1861);
199
      insert into ws_cross_enti_utenti values(user_name,1862);
200
      insert into ws_cross_enti_utenti values(user_name,1863);
201
      insert into ws_cross_enti_utenti values(user_name,1864);
202
      insert into ws_cross_enti_utenti values(user_name,1865);
203
      insert into ws_cross_enti_utenti values(user_name,1866);
204
      insert into ws_cross_enti_utenti values(user_name,1867);
205
      insert into ws_cross_enti_utenti values(user_name,1868);
206
      insert into ws_cross_enti_utenti values(user_name,1869);
207
      insert into ws_cross_enti_utenti values(user_name,1870);
208
     elsif sigla_provincia = 'IM' then
209
      insert into ws_cross_enti_utenti values(user_name,1772);
210
      insert into ws_cross_enti_utenti values(user_name,1773);
211
      insert into ws_cross_enti_utenti values(user_name,1774);
212
      insert into ws_cross_enti_utenti values(user_name,1775);
213
      insert into ws_cross_enti_utenti values(user_name,1776);
214
      insert into ws_cross_enti_utenti values(user_name,1777);
215
      insert into ws_cross_enti_utenti values(user_name,1778);
216
      insert into ws_cross_enti_utenti values(user_name,1779);
217
      insert into ws_cross_enti_utenti values(user_name,1780);
218
      insert into ws_cross_enti_utenti values(user_name,1781);
219
      insert into ws_cross_enti_utenti values(user_name,1782);
220
      insert into ws_cross_enti_utenti values(user_name,1783);
221
      insert into ws_cross_enti_utenti values(user_name,1784);
222
      insert into ws_cross_enti_utenti values(user_name,1785);
223
      insert into ws_cross_enti_utenti values(user_name,1786);
224
      insert into ws_cross_enti_utenti values(user_name,1787);
225
      insert into ws_cross_enti_utenti values(user_name,1788);
226
      insert into ws_cross_enti_utenti values(user_name,1789);
227
      insert into ws_cross_enti_utenti values(user_name,1790);
228
      insert into ws_cross_enti_utenti values(user_name,1791);
229
      insert into ws_cross_enti_utenti values(user_name,1792);
230
      insert into ws_cross_enti_utenti values(user_name,1793);
231
      insert into ws_cross_enti_utenti values(user_name,1794);
232
      insert into ws_cross_enti_utenti values(user_name,1795);
233
      insert into ws_cross_enti_utenti values(user_name,1796);
234
      insert into ws_cross_enti_utenti values(user_name,1797);
235
      insert into ws_cross_enti_utenti values(user_name,1798);
236
      insert into ws_cross_enti_utenti values(user_name,1799);
237
      insert into ws_cross_enti_utenti values(user_name,1800);
238
      insert into ws_cross_enti_utenti values(user_name,1801);
239
      insert into ws_cross_enti_utenti values(user_name,1802);
240
      insert into ws_cross_enti_utenti values(user_name,1803);
241
      insert into ws_cross_enti_utenti values(user_name,1804);
242
      insert into ws_cross_enti_utenti values(user_name,1805);
243
      insert into ws_cross_enti_utenti values(user_name,1806);
244
      insert into ws_cross_enti_utenti values(user_name,1807);
245
      insert into ws_cross_enti_utenti values(user_name,1808);
246
      insert into ws_cross_enti_utenti values(user_name,1809);
247
      insert into ws_cross_enti_utenti values(user_name,1810);
248
      insert into ws_cross_enti_utenti values(user_name,1811);
249
      insert into ws_cross_enti_utenti values(user_name,1812);
250
      insert into ws_cross_enti_utenti values(user_name,1813);
251
      insert into ws_cross_enti_utenti values(user_name,1814);
252
      insert into ws_cross_enti_utenti values(user_name,1815);
253
      insert into ws_cross_enti_utenti values(user_name,1816);
254
      insert into ws_cross_enti_utenti values(user_name,1817);
255
      insert into ws_cross_enti_utenti values(user_name,1818);
256
      insert into ws_cross_enti_utenti values(user_name,1819);
257
      insert into ws_cross_enti_utenti values(user_name,1820);
258
      insert into ws_cross_enti_utenti values(user_name,1821);
259
      insert into ws_cross_enti_utenti values(user_name,1822);
260
      insert into ws_cross_enti_utenti values(user_name,1823);
261
      insert into ws_cross_enti_utenti values(user_name,1824);
262
      insert into ws_cross_enti_utenti values(user_name,1825);
263
      insert into ws_cross_enti_utenti values(user_name,1826);
264
      insert into ws_cross_enti_utenti values(user_name,1827);
265
      insert into ws_cross_enti_utenti values(user_name,1828);
266
      insert into ws_cross_enti_utenti values(user_name,1829);
267
      insert into ws_cross_enti_utenti values(user_name,1830);
268
      insert into ws_cross_enti_utenti values(user_name,1831);
269
      insert into ws_cross_enti_utenti values(user_name,1832);
270
      insert into ws_cross_enti_utenti values(user_name,1833);
271
      insert into ws_cross_enti_utenti values(user_name,1834);
272
      insert into ws_cross_enti_utenti values(user_name,1835);
273
      insert into ws_cross_enti_utenti values(user_name,1836);
274
      insert into ws_cross_enti_utenti values(user_name,1837);
275
      insert into ws_cross_enti_utenti values(user_name,1838);
276
     end if;
277
 
278
     commit;
279
exception 
280
          when others then
281
               dbms_output.put_line('ERR INS utente '|| sqlcode ||' '||sqlerrm);
282
               rollback;
283
 
284
end CREA_UTENTE_PROVINCIALE;
285
/
286