alsmanager_lib 1.0.27 → 1.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/modules.js +1125 -196
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -15,6 +15,21 @@ function getConnectorsByIdDeviceMySQL(id_device) {
|
|
|
15
15
|
return query;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
function getConnectorsByIdDevice(db_used, id_device) {
|
|
19
|
+
var query = "";
|
|
20
|
+
if (db_used) {
|
|
21
|
+
switch (db_used) {
|
|
22
|
+
case 'SQLITE':
|
|
23
|
+
query = getConnectorsByIdDeviceSQLite(id_device);
|
|
24
|
+
break;
|
|
25
|
+
case 'MYSQL':
|
|
26
|
+
query = getConnectorsByIdDeviceMySQL(id_device);
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return query;
|
|
31
|
+
}
|
|
32
|
+
|
|
18
33
|
function getConnectorByIdSQLite(id_conn) {
|
|
19
34
|
var query = "select dc.id, dc.conn_type, dc.conn_protocol, dc.conn_number, dc.conn_verse from device_connectors dc ";
|
|
20
35
|
query += "where dc.id = " + id_conn;
|
|
@@ -26,6 +41,20 @@ function getConnectorByIdMySQL() {
|
|
|
26
41
|
query += "where dc.id = :id_conn";
|
|
27
42
|
return query;
|
|
28
43
|
}
|
|
44
|
+
function getConnectorById(db_used, id_conn) {
|
|
45
|
+
var query = "";
|
|
46
|
+
if (db_used) {
|
|
47
|
+
switch (db_used) {
|
|
48
|
+
case 'SQLITE':
|
|
49
|
+
query = getConnectorByIdSQLite(id_conn);
|
|
50
|
+
break;
|
|
51
|
+
case 'MYSQL':
|
|
52
|
+
query = getConnectorByIdMySQL();
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return query;
|
|
57
|
+
}
|
|
29
58
|
|
|
30
59
|
|
|
31
60
|
function insertConnectorSQLite(id_device, conn_obj) {
|
|
@@ -40,7 +69,20 @@ function insertConnectorMySQL(id_device, conn_obj) {
|
|
|
40
69
|
query += "(:id_device, :tipo, :protocollo, :numero, :verso)";
|
|
41
70
|
return query;
|
|
42
71
|
}
|
|
43
|
-
|
|
72
|
+
function insertConnector(db_used, id_device, conn_obj) {
|
|
73
|
+
var query = "";
|
|
74
|
+
if (db_used) {
|
|
75
|
+
switch (db_used) {
|
|
76
|
+
case 'SQLITE':
|
|
77
|
+
query = insertConnectorSQLite(id_device, conn_obj);
|
|
78
|
+
break;
|
|
79
|
+
case 'MYSQL':
|
|
80
|
+
query = insertConnectorMySQL(id_device, conn_obj);
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return query;
|
|
85
|
+
}
|
|
44
86
|
function updateConnectorSQLite(id_device, conn_obj) {
|
|
45
87
|
var query = "update device_connectors "
|
|
46
88
|
query += "set id_device = " + id_device + ", ";
|
|
@@ -61,7 +103,20 @@ function updateConnectorMySQL(id_device, conn_obj) {
|
|
|
61
103
|
query += "conn_verse = :verso ";
|
|
62
104
|
query += "where id = :id_conn";
|
|
63
105
|
}
|
|
64
|
-
|
|
106
|
+
function updateConnector(db_used, id_device, conn_obj) {
|
|
107
|
+
var query = "";
|
|
108
|
+
if (db_used) {
|
|
109
|
+
switch (db_used) {
|
|
110
|
+
case 'SQLITE':
|
|
111
|
+
query = updateConnectorSQLite(id_device, conn_obj);
|
|
112
|
+
break;
|
|
113
|
+
case 'MYSQL':
|
|
114
|
+
query = updateConnectorMySQL(id_device, conn_obj);
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return query;
|
|
119
|
+
}
|
|
65
120
|
|
|
66
121
|
function removeConnectorSQLite(id_device, conn_obj) {
|
|
67
122
|
var query = "delete from device_connectors ";
|
|
@@ -74,7 +129,20 @@ function removeConnectorMySQL() {
|
|
|
74
129
|
query += "where id = :id_conn";
|
|
75
130
|
return query;
|
|
76
131
|
}
|
|
77
|
-
|
|
132
|
+
function removeConnector(db_used, id_device, conn_obj) {
|
|
133
|
+
var query = "";
|
|
134
|
+
if (db_used) {
|
|
135
|
+
switch (db_used) {
|
|
136
|
+
case 'SQLITE':
|
|
137
|
+
query = removeConnectorSQLite(id_device, conn_obj);
|
|
138
|
+
break;
|
|
139
|
+
case 'MYSQL':
|
|
140
|
+
query = removeConnectorMySQL();
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return query;
|
|
145
|
+
}
|
|
78
146
|
//End Manage connectors
|
|
79
147
|
// Manage Storage
|
|
80
148
|
function getStorageByIdDeviceSQLite(id_device) {
|
|
@@ -90,6 +158,20 @@ function getStorageByIdDeviceMySQL(id_device) {
|
|
|
90
158
|
query += "where id_device = :id_device";
|
|
91
159
|
return query;
|
|
92
160
|
}
|
|
161
|
+
function getStorageByIdDevice(db_used, id_device) {
|
|
162
|
+
var query = "";
|
|
163
|
+
if (db_used) {
|
|
164
|
+
switch (db_used) {
|
|
165
|
+
case 'SQLITE':
|
|
166
|
+
query = getStorageByIdDeviceSQLite(id_device);
|
|
167
|
+
break;
|
|
168
|
+
case 'MYSQL':
|
|
169
|
+
query = getStorageByIdDeviceMySQL(id_device);
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return query;
|
|
174
|
+
}
|
|
93
175
|
|
|
94
176
|
function getStorageByIdSQLite(id_storage) {
|
|
95
177
|
var query = "select id, id_device, storage_type, storage_size_unit, storage_totsize, storage_available from device_storages ";
|
|
@@ -103,6 +185,21 @@ function getStorageByIdMySQL() {
|
|
|
103
185
|
return query;
|
|
104
186
|
}
|
|
105
187
|
|
|
188
|
+
function getStorageById(db_user, id_storage) {
|
|
189
|
+
var query = "";
|
|
190
|
+
if (db_used) {
|
|
191
|
+
switch (db_used) {
|
|
192
|
+
case 'SQLITE':
|
|
193
|
+
query = getStorageByIdSQLite(id_storage);
|
|
194
|
+
break;
|
|
195
|
+
case 'MYSQL':
|
|
196
|
+
query = getStorageByIdMySQL();
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
return query;
|
|
201
|
+
}
|
|
202
|
+
|
|
106
203
|
function insertStorageSQLite(id_device, storage_obj) {
|
|
107
204
|
var query = "insert into device_storages (id_device, storage_type, storage_size_unit, storage_totsize, storage_available) values ";
|
|
108
205
|
query += "(" + id_device + ", " + storage_obj.tipo + ", '" + storage_obj.unita + "'," + storage_obj.dimensione + ", " + storage_obj.dim_disponibile + ")";
|
|
@@ -115,6 +212,21 @@ function insertStorageMySQL(id_device, storage_obj) {
|
|
|
115
212
|
return query;
|
|
116
213
|
}
|
|
117
214
|
|
|
215
|
+
function insertStorage(db_used, id_device, storage_obj) {
|
|
216
|
+
var query = "";
|
|
217
|
+
if (db_used) {
|
|
218
|
+
switch (db_used) {
|
|
219
|
+
case 'SQLITE':
|
|
220
|
+
query = insertStorageSQLite(id_device, storage_obj);
|
|
221
|
+
break;
|
|
222
|
+
case 'MYSQL':
|
|
223
|
+
query = insertStorageMySQL(id_device, storage_obj);
|
|
224
|
+
break;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return query;
|
|
228
|
+
}
|
|
229
|
+
|
|
118
230
|
function updateStorageSQLite(id_device, storage_obj) {
|
|
119
231
|
var query = "update device_storages "
|
|
120
232
|
query += "set id_device = " + id_device + ", ";
|
|
@@ -137,6 +249,20 @@ function updateStorageMySQL(id_device, storage_obj) {
|
|
|
137
249
|
return query;
|
|
138
250
|
}
|
|
139
251
|
|
|
252
|
+
function updateStorage(db_used, id_device, storage_obj) {
|
|
253
|
+
var query = "";
|
|
254
|
+
if (db_used) {
|
|
255
|
+
switch (db_used) {
|
|
256
|
+
case 'SQLITE':
|
|
257
|
+
query = updateStorageSQLite(id_device, storage_obj);
|
|
258
|
+
break;
|
|
259
|
+
case 'MYSQL':
|
|
260
|
+
query = updateStorageMySQL(id_device, storage_obj);
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
return query;
|
|
265
|
+
}
|
|
140
266
|
function removeStorageSQLite(id_device, storage_obj) {
|
|
141
267
|
var query = "delete from device_storages ";
|
|
142
268
|
query += "where id = " + storage_obj.id;
|
|
@@ -148,6 +274,21 @@ function removeStorageMySQL(id_device, storage_obj) {
|
|
|
148
274
|
query += "where id = id_storage";
|
|
149
275
|
return query;
|
|
150
276
|
}
|
|
277
|
+
function removeStorage(db_used, id_device, storage_obj) {
|
|
278
|
+
var query = "";
|
|
279
|
+
var db_used = global.get("db_used");
|
|
280
|
+
if (db_used) {
|
|
281
|
+
switch (db_used) {
|
|
282
|
+
case 'SQLITE':
|
|
283
|
+
query = removeStorageSQLite(id_device, storage_obj);
|
|
284
|
+
break;
|
|
285
|
+
case 'MYSQL':
|
|
286
|
+
query = removeStorageMySQL(id_device, storage_obj);
|
|
287
|
+
break;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
return query;
|
|
291
|
+
}
|
|
151
292
|
|
|
152
293
|
//End Manage Storage
|
|
153
294
|
// Manage Network
|
|
@@ -161,6 +302,21 @@ function getNetworkByIdDeviceMySQL(id_device) {
|
|
|
161
302
|
query += "where dn.id_device = :id_device";
|
|
162
303
|
return query;
|
|
163
304
|
}
|
|
305
|
+
function getNetworkByIdDevice(db_used, id_device) {
|
|
306
|
+
var query = "";
|
|
307
|
+
if (db_used) {
|
|
308
|
+
switch (db_used) {
|
|
309
|
+
case 'SQLITE':
|
|
310
|
+
query = getNetworkByIdDeviceSQLite(id_device);
|
|
311
|
+
break;
|
|
312
|
+
case 'MYSQL':
|
|
313
|
+
query = getNetworkByIdDeviceMySQL(id_device);
|
|
314
|
+
break;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
return query;
|
|
318
|
+
}
|
|
319
|
+
|
|
164
320
|
function getNetworkByIdSQLite(id_network) {
|
|
165
321
|
var query = "select id, id_device, net_type, mac_address, ipv4_static, ipv6_static from device_networks ";
|
|
166
322
|
query += "where id = " + id_network;
|
|
@@ -171,7 +327,20 @@ function getNetworkByIdMySQL() {
|
|
|
171
327
|
query += "where id = :id_network";
|
|
172
328
|
return query;
|
|
173
329
|
}
|
|
174
|
-
|
|
330
|
+
function getNetworkById(db_used, id_network) {
|
|
331
|
+
var query = "";
|
|
332
|
+
if (db_used) {
|
|
333
|
+
switch (db_used) {
|
|
334
|
+
case 'SQLITE':
|
|
335
|
+
query = getNetworkByIdSQLite(id_network);
|
|
336
|
+
break;
|
|
337
|
+
case 'MYSQL':
|
|
338
|
+
query = getNetworkByIdMySQL();
|
|
339
|
+
break;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
return query;
|
|
343
|
+
}
|
|
175
344
|
function insertNetworkSQLite(id_device, network_obj) {
|
|
176
345
|
var query = "insert into device_networks (id_device, net_type, mac_address, ipv4_static, ipv6_static) values ";
|
|
177
346
|
query += "(" + id_device + ", '" + network_obj.tipo + "', '" + network_obj.mac_address + "', '" + network_obj.ipv4_static + "', '" + network_obj.ipv6_static + "')";
|
|
@@ -182,6 +351,20 @@ function insertNetworkMySQL(id_device, network_obj) {
|
|
|
182
351
|
query += "(:id_device, :tipo, :mac_address, :ipv4_static, :ipv6_static)";
|
|
183
352
|
return query;
|
|
184
353
|
}
|
|
354
|
+
function insertNetwork(db_used, id_device, network_obj) {
|
|
355
|
+
var query = "";
|
|
356
|
+
if (db_used) {
|
|
357
|
+
switch (db_used) {
|
|
358
|
+
case 'SQLITE':
|
|
359
|
+
query = insertNetworkSQLite(id_device, network_obj);
|
|
360
|
+
break;
|
|
361
|
+
case 'MYSQL':
|
|
362
|
+
query = insertNetworkMySQL(id_device, network_obj);
|
|
363
|
+
break;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
return query;
|
|
367
|
+
}
|
|
185
368
|
function updateNetworkSQLite(id_device, network_obj) {
|
|
186
369
|
var query = "update device_networks "
|
|
187
370
|
query += "set id_device = " + id_device + ", ";
|
|
@@ -202,6 +385,20 @@ function updateNetworkMySQL(id_device, network_obj) {
|
|
|
202
385
|
query += "where id = :id_network";
|
|
203
386
|
return query;
|
|
204
387
|
}
|
|
388
|
+
function updateNetwork(db_used, d_device, network_obj) {
|
|
389
|
+
var query = "";
|
|
390
|
+
if (db_used) {
|
|
391
|
+
switch (db_used) {
|
|
392
|
+
case 'SQLITE':
|
|
393
|
+
query = updateNetworkSQLite(id_device, network_obj);
|
|
394
|
+
break;
|
|
395
|
+
case 'MYSQL':
|
|
396
|
+
query = updateNetworkMySQL(id_device, network_obj);
|
|
397
|
+
break;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
return query;
|
|
401
|
+
}
|
|
205
402
|
function removeNetworkSQLite(id_device, network_obj) {
|
|
206
403
|
var query = "delete from device_networks ";
|
|
207
404
|
query += "where id = " + network_obj.id;
|
|
@@ -212,6 +409,20 @@ function removeNetworkMySQL(id_device, network_obj) {
|
|
|
212
409
|
query += "where id = :id_network";
|
|
213
410
|
return query;
|
|
214
411
|
}
|
|
412
|
+
function removeNetwork(db_used, id_device, network_obj) {
|
|
413
|
+
var query = "";
|
|
414
|
+
if (db_used) {
|
|
415
|
+
switch (db_used) {
|
|
416
|
+
case 'SQLITE':
|
|
417
|
+
query = removeNetworkSQLite(id_device, network_obj);
|
|
418
|
+
break;
|
|
419
|
+
case 'MYSQL':
|
|
420
|
+
query = removeNetworkMySQL(id_device, network_obj);
|
|
421
|
+
break;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
return query;
|
|
425
|
+
}
|
|
215
426
|
//End Manage Network
|
|
216
427
|
// Manage AddOns
|
|
217
428
|
function getAddOnByIdDeviceSQLite(id_device) {
|
|
@@ -226,6 +437,20 @@ function getAddOnByIdDeviceMySQL(id_device) {
|
|
|
226
437
|
query += "where da.id_device = :id_device";
|
|
227
438
|
return query;
|
|
228
439
|
}
|
|
440
|
+
function getAddOnByIdDevice(db_used, id_device) {
|
|
441
|
+
var query = "";
|
|
442
|
+
if (db_used) {
|
|
443
|
+
switch (db_used) {
|
|
444
|
+
case 'SQLITE':
|
|
445
|
+
query = getAddOnByIdDeviceSQLite(id_device);
|
|
446
|
+
break;
|
|
447
|
+
case 'MYSQL':
|
|
448
|
+
query = getAddOnByIdDeviceMySQL(id_device);
|
|
449
|
+
break;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
return query;
|
|
453
|
+
}
|
|
229
454
|
function getAddOnByIdSQLite(id_addon) {
|
|
230
455
|
var query = "select id, id_device, addon_type, maker, model, description from device_addons ";
|
|
231
456
|
query += "where id = " + id_addon;
|
|
@@ -236,6 +461,20 @@ function getAddOnByIdMySQL() {
|
|
|
236
461
|
query += "where id = :id_addon";
|
|
237
462
|
return query;
|
|
238
463
|
}
|
|
464
|
+
function getAddOnById(id_addon) {
|
|
465
|
+
var query = "";
|
|
466
|
+
if (db_used) {
|
|
467
|
+
switch (db_used) {
|
|
468
|
+
case 'SQLITE':
|
|
469
|
+
query = getAddOnByIdSQLite(id_addon);
|
|
470
|
+
break;
|
|
471
|
+
case 'MYSQL':
|
|
472
|
+
query = getAddOnByIdMySQL();
|
|
473
|
+
break;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
return query;
|
|
477
|
+
}
|
|
239
478
|
function insertAddOnSQLite(id_device, addon_obj) {
|
|
240
479
|
var query = "insert into device_addons (id_device, addon_type, maker, model, description) values ";
|
|
241
480
|
query += "(" + id_device + ", " + addon_obj.addon_type + ", '" + addon_obj.maker + "', '" + addon_obj.model + "', '" + addon_obj.description + "')";
|
|
@@ -246,7 +485,20 @@ function insertAddOnMySQL(id_device, addon_obj) {
|
|
|
246
485
|
query += "(:id_device, :addon_type, :maker, :model, :description) ";
|
|
247
486
|
return query;
|
|
248
487
|
}
|
|
249
|
-
|
|
488
|
+
function insertAddOn(db_used, id_device, addon_obj) {
|
|
489
|
+
var query = "";
|
|
490
|
+
if (db_used) {
|
|
491
|
+
switch (db_used) {
|
|
492
|
+
case 'SQLITE':
|
|
493
|
+
query = insertAddOnSQLite(id_device, addon_obj);
|
|
494
|
+
break;
|
|
495
|
+
case 'MYSQL':
|
|
496
|
+
query = insertAddOnMySQL(id_device, addon_obj);
|
|
497
|
+
break;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
return query;
|
|
501
|
+
}
|
|
250
502
|
function updateAddOnSQLite(id_device, addon_obj) {
|
|
251
503
|
var query = "update device_addons "
|
|
252
504
|
query += "set id_device = " + id_device + ", ";
|
|
@@ -267,7 +519,20 @@ function updateAddOnMySQL(id_device, addon_obj) {
|
|
|
267
519
|
query += "where id = :id_addon";
|
|
268
520
|
return query;
|
|
269
521
|
}
|
|
270
|
-
|
|
522
|
+
function updateAddOn(db_used, id_device, addon_obj) {
|
|
523
|
+
var query = "";
|
|
524
|
+
if (db_used) {
|
|
525
|
+
switch (db_used) {
|
|
526
|
+
case 'SQLITE':
|
|
527
|
+
query = updateAddOnSQLite(id_device, addon_obj);
|
|
528
|
+
break;
|
|
529
|
+
case 'MYSQL':
|
|
530
|
+
query = updateAddOnMySQL(id_device, addon_obj);
|
|
531
|
+
break;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
return query;
|
|
535
|
+
}
|
|
271
536
|
function removeAddOnSQLite(id_device, addon_obj) {
|
|
272
537
|
var query = "delete from device_addons ";
|
|
273
538
|
query += "where id = " + addon_obj.id;
|
|
@@ -276,6 +541,21 @@ function removeAddOnMySQL(id_device, addon_obj) {
|
|
|
276
541
|
var query = "delete from device_addons ";
|
|
277
542
|
query += "where id = id_addon";
|
|
278
543
|
}
|
|
544
|
+
|
|
545
|
+
function removeAddOn(db_used, id_device, addon_obj) {
|
|
546
|
+
var query = "";
|
|
547
|
+
if (db_used) {
|
|
548
|
+
switch (db_used) {
|
|
549
|
+
case 'SQLITE':
|
|
550
|
+
query = removeAddOnSQLite(id_device, addon_obj);
|
|
551
|
+
break;
|
|
552
|
+
case 'MYSQL':
|
|
553
|
+
query = removeAddOnMySQL(id_device, addon_obj);
|
|
554
|
+
break;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
return query;
|
|
558
|
+
}
|
|
279
559
|
//End Manage AddOns
|
|
280
560
|
//Manage PC Properties
|
|
281
561
|
function existsPCPropertiesSQLite(id_device) {
|
|
@@ -289,7 +569,20 @@ function existsPCPropertiesMySQL(id_device) {
|
|
|
289
569
|
query += "where id_device = :id_device";
|
|
290
570
|
return query;
|
|
291
571
|
}
|
|
292
|
-
|
|
572
|
+
function existsPCProperties(db_used, id_device) {
|
|
573
|
+
var query = "";
|
|
574
|
+
if (db_used) {
|
|
575
|
+
switch (db_used) {
|
|
576
|
+
case 'SQLITE':
|
|
577
|
+
query = existsPCPropertiesSQLite(id_device);
|
|
578
|
+
break;
|
|
579
|
+
case 'MYSQL':
|
|
580
|
+
query = existsPCPropertiesMySQL(id_device);
|
|
581
|
+
break;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
return query;
|
|
585
|
+
}
|
|
293
586
|
function getPCPropertiesSQLite(id_device) {
|
|
294
587
|
var query = "select d.id as Id, d.type as Tipo, d.manifacturer as Marca, d.model as Modello,";
|
|
295
588
|
query += "dp.pc_name as Name, dp.CPU as CPU, dp.CPU_arch as CPUArch, dp.OS_arch as OSArch, dp.OS as OS, dp.OS_version as OSVersion, ";
|
|
@@ -309,7 +602,22 @@ function getPCPropertiesMySQL(id_device) {
|
|
|
309
602
|
query += "from devices d ";
|
|
310
603
|
query += "left join device_pc dp on d.id = dp.id_device ";
|
|
311
604
|
query += "where d.id = :id_device";
|
|
605
|
+
return query;
|
|
606
|
+
}
|
|
312
607
|
|
|
608
|
+
function getPCProperties(db_used, id_device) {
|
|
609
|
+
var query = "";
|
|
610
|
+
if (db_used) {
|
|
611
|
+
switch (db_used) {
|
|
612
|
+
case 'SQLITE':
|
|
613
|
+
query = getPCPropertiesSQLite(id_device);
|
|
614
|
+
break;
|
|
615
|
+
case 'MYSQL':
|
|
616
|
+
query = getPCPropertiesSQLite(id_device);
|
|
617
|
+
break;
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
return query;
|
|
313
621
|
}
|
|
314
622
|
function createPCPropertiesMySQLObj(id_device, dev_prop) {
|
|
315
623
|
var obj = {};
|
|
@@ -338,6 +646,21 @@ function insertPCPropertiesMySQL() {
|
|
|
338
646
|
var query = "insert into device_pc (id_device, pc_name, OS, OS_version, OS_arch, CPU, CPU_arch, RAM_GB, video_card, smartboard_ready, note, da_properties) values ";
|
|
339
647
|
query += "(:id_device, :pc_name, :os, :os_version, :os_arch, :cpu, :cpu_arch, :ram_size, :video_card, :smartboard_ready, :note, :da_properties)";
|
|
340
648
|
}
|
|
649
|
+
function insertPCProperties(db_used, id_device, dev_prop) {
|
|
650
|
+
var query = "";
|
|
651
|
+
if (db_used) {
|
|
652
|
+
switch (db_used) {
|
|
653
|
+
case 'SQLITE':
|
|
654
|
+
query = insertPCPropertiesSQLite(id_device, dev_prop);
|
|
655
|
+
break;
|
|
656
|
+
case 'MYSQL':
|
|
657
|
+
query = insertPCPropertiesMySQL();
|
|
658
|
+
break;
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
return query;
|
|
662
|
+
}
|
|
663
|
+
|
|
341
664
|
function updatePCPropertiesSQLite(id_device, dev_prop) {
|
|
342
665
|
var query = "update device_pc set ";
|
|
343
666
|
query += "id_device = " + id_device + ", ";
|
|
@@ -359,7 +682,20 @@ function updatePCPropertiesSQLite(id_device, dev_prop) {
|
|
|
359
682
|
function updatePCPropertiesMySQL() {
|
|
360
683
|
|
|
361
684
|
}
|
|
362
|
-
|
|
685
|
+
function updatePCProperties(db_used, id_device, dev_prop) {
|
|
686
|
+
var query = "";
|
|
687
|
+
if (db_used) {
|
|
688
|
+
switch (db_used) {
|
|
689
|
+
case 'SQLITE':
|
|
690
|
+
query = updatePCPropertiesSQLite(id_device, dev_prop);
|
|
691
|
+
break;
|
|
692
|
+
case 'MYSQL':
|
|
693
|
+
query = updatePCPropertiesMySQL();
|
|
694
|
+
break;
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
return query;
|
|
698
|
+
}
|
|
363
699
|
//End Manage PC Properties
|
|
364
700
|
// Manage Display Part Properties
|
|
365
701
|
function getDisplayPartPropertiesSQLite(id_device) {
|
|
@@ -379,6 +715,21 @@ function getDisplayPartPropertiesMySQL(id_device) {
|
|
|
379
715
|
return query;
|
|
380
716
|
}
|
|
381
717
|
|
|
718
|
+
function getDisplayPartProperties(db_used, id_device) {
|
|
719
|
+
var query = "";
|
|
720
|
+
if (db_used) {
|
|
721
|
+
switch (db_used) {
|
|
722
|
+
case 'SQLITE':
|
|
723
|
+
query = getDisplayPartPropertiesSQLite(id_device);
|
|
724
|
+
break;
|
|
725
|
+
case 'MYSQL':
|
|
726
|
+
query = getDisplayPartPropertiesMySQL(id_device);
|
|
727
|
+
break;
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
return query;
|
|
731
|
+
}
|
|
732
|
+
|
|
382
733
|
function existsDisplayPartPropertiesSQLite(id_device) {
|
|
383
734
|
var query = "select count(*) from display_part ";
|
|
384
735
|
query += "where id_device = " + id_device;
|
|
@@ -387,6 +738,21 @@ function existsDisplayPartPropertiesMySQL(id_device) {
|
|
|
387
738
|
var query = "select count(*) from display_part ";
|
|
388
739
|
query += "where id_device = :id_device";
|
|
389
740
|
}
|
|
741
|
+
function existsDisplayPartProperties(db_used, id_device) {
|
|
742
|
+
var query = "";
|
|
743
|
+
if (db_used) {
|
|
744
|
+
switch (db_used) {
|
|
745
|
+
case 'SQLITE':
|
|
746
|
+
query = existsDisplayPartPropertiesSQLite(id_device);
|
|
747
|
+
break;
|
|
748
|
+
case 'MYSQL':
|
|
749
|
+
query = existsDisplayPartPropertiesMySQL(id_device);
|
|
750
|
+
break;
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
return query;
|
|
754
|
+
}
|
|
755
|
+
|
|
390
756
|
function insertDisplayPartPropertiesSQLite(id_device, dev_prop) {
|
|
391
757
|
var query = "insert into display_part (id_device, touch, size_inch, format, tecnology, is_removable) values ";
|
|
392
758
|
query += "(" + id_device + ", " + dev_prop.touch + ", " + dev_prop.size + ", '" + dev_prop.format + "', '" + dev_prop.technology + "', " + dev_prop.is_removable + ")";
|
|
@@ -396,6 +762,21 @@ function insertDisplayPartPropertiesMySQL() {
|
|
|
396
762
|
var query = "insert into display_part (id_device, touch, size_inch, format, tecnology, is_removable) values ";
|
|
397
763
|
query += "(:id_device, :touch, :size, :format, :technology, :is_removable)";
|
|
398
764
|
}
|
|
765
|
+
function insertDisplayPartProperties(db_used, id_device, dev_prop) {
|
|
766
|
+
var query = "";
|
|
767
|
+
if (db_used) {
|
|
768
|
+
switch (db_used) {
|
|
769
|
+
case 'SQLITE':
|
|
770
|
+
query = insertDisplayPartPropertiesSQLite(id_device, dev_prop);
|
|
771
|
+
break;
|
|
772
|
+
case 'MYSQL':
|
|
773
|
+
query = insertDisplayPartPropertiesMySQL();
|
|
774
|
+
break;
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
return query;
|
|
778
|
+
}
|
|
779
|
+
|
|
399
780
|
function updateDisplayPartPropertiesSQLite(id_device, dev_prop) {
|
|
400
781
|
var query = "update display_part set ";
|
|
401
782
|
query += "id_device = " + id_device + ", ";
|
|
@@ -415,6 +796,22 @@ function updateDisplayPartPropertiesMySQL() {
|
|
|
415
796
|
query += "format = :format, ";
|
|
416
797
|
query += "technology = :tecnology ";
|
|
417
798
|
query += "where id_device = :id_device";
|
|
799
|
+
return query;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
function updateDisplayPartProperties(db_used, id_device, dev_prop) {
|
|
803
|
+
var query = "";
|
|
804
|
+
if (db_used) {
|
|
805
|
+
switch (db_used) {
|
|
806
|
+
case 'SQLITE':
|
|
807
|
+
query = updateDisplayPartPropertiesSQLite(id_device, dev_prop);
|
|
808
|
+
break;
|
|
809
|
+
case 'MYSQL':
|
|
810
|
+
query = updateDisplayPartPropertiesMySQL();
|
|
811
|
+
break;
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
return query;
|
|
418
815
|
}
|
|
419
816
|
// End Manage Display Part Properties
|
|
420
817
|
// Manage Display Properties
|
|
@@ -429,6 +826,21 @@ function existsDisplayPropertiesMySQL(id_device) {
|
|
|
429
826
|
query += "where id_device = :id_device";
|
|
430
827
|
return query;
|
|
431
828
|
}
|
|
829
|
+
function existsDisplayProperties(db_used, id_device) {
|
|
830
|
+
var query = "";
|
|
831
|
+
if (db_used) {
|
|
832
|
+
switch (db_used) {
|
|
833
|
+
case 'SQLITE':
|
|
834
|
+
query = existsDisplayPropertiesSQLite(id_device);
|
|
835
|
+
break;
|
|
836
|
+
case 'MYSQL':
|
|
837
|
+
query = existsDisplayPropertiesMySQL(id_device);
|
|
838
|
+
break;
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
return query;
|
|
842
|
+
}
|
|
843
|
+
|
|
432
844
|
function getDisplayPropertiesSQLite(id_device) {
|
|
433
845
|
var query = "select d.id as Id, d.type as Tipo, d.manifacturer as Marca, d.model as Modello,";
|
|
434
846
|
query += "dm.size_inch as Dimensione, dm.format as Formato, dm.technology as Tecnologia, dm.touch as Touch ";
|
|
@@ -445,7 +857,20 @@ function getDisplayPropertiesMySQL(id_device) {
|
|
|
445
857
|
query += "where d.id = :id_device";
|
|
446
858
|
return query;
|
|
447
859
|
}
|
|
448
|
-
|
|
860
|
+
function getDisplayProperties(db_used, id_device) {
|
|
861
|
+
var query = "";
|
|
862
|
+
if (db_used) {
|
|
863
|
+
switch (db_used) {
|
|
864
|
+
case 'SQLITE':
|
|
865
|
+
query = getDisplayPropertiesSQLite(id_device);
|
|
866
|
+
break;
|
|
867
|
+
case 'MYSQL':
|
|
868
|
+
query = getDisplayPropertiesMySQL(id_device);
|
|
869
|
+
break;
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
return query;
|
|
873
|
+
}
|
|
449
874
|
function createDisplayPropertiesMySQLObj(id_device, dev_prop) {
|
|
450
875
|
var obj = {};
|
|
451
876
|
obj.id_device = id_device;
|
|
@@ -467,6 +892,21 @@ function insertDisplayPropertiesMySQL() {
|
|
|
467
892
|
query += "(:id_device, :touch, :size, :format, :technology)";
|
|
468
893
|
return query;
|
|
469
894
|
}
|
|
895
|
+
function insertDisplayProperties(db_used, id_device, dev_prop) {
|
|
896
|
+
var query = "";
|
|
897
|
+
if (db_used) {
|
|
898
|
+
switch (db_used) {
|
|
899
|
+
case 'SQLITE':
|
|
900
|
+
query = insertDisplayPropertiesSQLite(id_device, dev_prop);
|
|
901
|
+
break;
|
|
902
|
+
case 'MYSQL':
|
|
903
|
+
query = insertDisplayPropertiesMySQL();
|
|
904
|
+
break;
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
return query;
|
|
908
|
+
}
|
|
909
|
+
|
|
470
910
|
function updateDisplayPropertiesSQLite(id_device, dev_prop) {
|
|
471
911
|
var query = "update device_monitor set ";
|
|
472
912
|
query += "id_device = " + id_device + ", ";
|
|
@@ -487,6 +927,21 @@ function updateDisplayPropertiesMySQL() {
|
|
|
487
927
|
query += "technology = :tecnology ";
|
|
488
928
|
query += "where id_device = :id_device";
|
|
489
929
|
}
|
|
930
|
+
|
|
931
|
+
function updateDisplayProperties(db_used, id_device, dev_prop) {
|
|
932
|
+
var query = "";
|
|
933
|
+
if (db_used) {
|
|
934
|
+
switch (db_used) {
|
|
935
|
+
case 'SQLITE':
|
|
936
|
+
query = updateDisplayPropertiesSQLite(id_device, dev_prop);
|
|
937
|
+
break;
|
|
938
|
+
case 'MYSQL':
|
|
939
|
+
query = updateDisplayPropertiesMySQL();
|
|
940
|
+
break;
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
return query;
|
|
944
|
+
}
|
|
490
945
|
// End Manage Display Properties
|
|
491
946
|
|
|
492
947
|
|
|
@@ -624,7 +1079,20 @@ function getDevicesSelectMySQL(search_type, inv_code, dev_type, marca, is_PNRR,
|
|
|
624
1079
|
query += " order by id";
|
|
625
1080
|
return query;
|
|
626
1081
|
}
|
|
627
|
-
|
|
1082
|
+
function getDevicesSelect(db_used, search_type, inv_code, dev_type, marca, is_PNRR, dev_status, id_dev_exclude) {
|
|
1083
|
+
var query = "";
|
|
1084
|
+
if (db_used) {
|
|
1085
|
+
switch (db_used) {
|
|
1086
|
+
case 'SQLITE':
|
|
1087
|
+
query = getDevicesSelectSQLite(search_type, inv_code, dev_type, marca, is_PNRR, dev_status, id_dev_exclude);
|
|
1088
|
+
break;
|
|
1089
|
+
case 'MYSQL':
|
|
1090
|
+
query = getDevicesSelectMySQL(search_type, inv_code, dev_type, marca, is_PNRR, dev_status, id_dev_exclude);
|
|
1091
|
+
break;
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
return query;
|
|
1095
|
+
}
|
|
628
1096
|
// End Device select
|
|
629
1097
|
// Device Select by site
|
|
630
1098
|
function getDevicesSelectBySiteSQLite(id_site) {
|
|
@@ -672,7 +1140,20 @@ function getDevicesSelectBySiteMySQL(id_site) {
|
|
|
672
1140
|
query += "and sites.id = :id_site";
|
|
673
1141
|
return query;
|
|
674
1142
|
}
|
|
675
|
-
|
|
1143
|
+
function getDevicesSelectBySite(db_used, id_site) {
|
|
1144
|
+
var query = "";
|
|
1145
|
+
if (db_used) {
|
|
1146
|
+
switch (db_used) {
|
|
1147
|
+
case 'SQLITE':
|
|
1148
|
+
query = getDevicesSelectBySiteSQLite(id_site);
|
|
1149
|
+
break;
|
|
1150
|
+
case 'MYSQL':
|
|
1151
|
+
query = getDevicesSelectBySiteMySQL(id_site);
|
|
1152
|
+
break;
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
return query;
|
|
1156
|
+
}
|
|
676
1157
|
//End Device Select by site
|
|
677
1158
|
// Device per plesso
|
|
678
1159
|
function getDevicesSelectByPlaceSQLite(id_place) {
|
|
@@ -720,6 +1201,20 @@ function getDevicesSelectByPlaceMySQL(id_place) {
|
|
|
720
1201
|
query += "and sites.id_place = :id_place";
|
|
721
1202
|
return query;
|
|
722
1203
|
}
|
|
1204
|
+
function getDevicesSelectByPlace(db_used, id_place) {
|
|
1205
|
+
var query = "";
|
|
1206
|
+
if (db_used) {
|
|
1207
|
+
switch (db_used) {
|
|
1208
|
+
case 'SQLITE':
|
|
1209
|
+
query = getDevicesSelectByPlaceSQLite(id_place);
|
|
1210
|
+
break;
|
|
1211
|
+
case 'MYSQL':
|
|
1212
|
+
query = getDevicesSelectByPlaceMySQL(id_place);
|
|
1213
|
+
break;
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
return query;
|
|
1217
|
+
}
|
|
723
1218
|
|
|
724
1219
|
|
|
725
1220
|
// End device per plesso
|
|
@@ -744,6 +1239,21 @@ function getDevicesCounterBySiteMySQL(id_site) {
|
|
|
744
1239
|
return query;
|
|
745
1240
|
}
|
|
746
1241
|
|
|
1242
|
+
function getDevicesCounterBySite(db_used, id_site) {
|
|
1243
|
+
var query = "";
|
|
1244
|
+
if (db_used) {
|
|
1245
|
+
switch (db_used) {
|
|
1246
|
+
case 'SQLITE':
|
|
1247
|
+
query = getDevicesCounterBySiteSQLite(id_site);
|
|
1248
|
+
break;
|
|
1249
|
+
case 'MYSQL':
|
|
1250
|
+
query = getDevicesCounterBySiteMySQL(id_site);
|
|
1251
|
+
break;
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
return query;
|
|
1255
|
+
}
|
|
1256
|
+
|
|
747
1257
|
//End Count Devices by Site
|
|
748
1258
|
// Count Devices by Place
|
|
749
1259
|
function getDevicesCounterByPlaceSQLite(id_place) {
|
|
@@ -766,6 +1276,20 @@ function getDevicesCounterByPlaceMySQL(id_place) {
|
|
|
766
1276
|
return query;
|
|
767
1277
|
}
|
|
768
1278
|
|
|
1279
|
+
function getDevicesCounterByPlace(db_used, id_place) {
|
|
1280
|
+
var query = "";
|
|
1281
|
+
if (db_used) {
|
|
1282
|
+
switch (db_used) {
|
|
1283
|
+
case 'SQLITE':
|
|
1284
|
+
query = alsmgr.getDevicesCounterByPlaceSQLite(id_place);
|
|
1285
|
+
break;
|
|
1286
|
+
case 'MYSQL':
|
|
1287
|
+
query = alsmgr.getDevicesCounterByPlaceMySQL(id_place);
|
|
1288
|
+
break;
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
return query;
|
|
1292
|
+
}
|
|
769
1293
|
//End Count Devices by Place
|
|
770
1294
|
//Get Related Devices
|
|
771
1295
|
function getDevicesSelectByRelatedSQLite(id_device) {
|
|
@@ -807,7 +1331,20 @@ function getDevicesSelectByRelatedMySQL(id_device) {
|
|
|
807
1331
|
query += "where ds.id_maindevice = :id_device";
|
|
808
1332
|
return query;
|
|
809
1333
|
}
|
|
810
|
-
|
|
1334
|
+
function getDevicesSelectByRelated(db_used, id_device) {
|
|
1335
|
+
var query = "";
|
|
1336
|
+
if (db_used) {
|
|
1337
|
+
switch (db_used) {
|
|
1338
|
+
case 'SQLITE':
|
|
1339
|
+
query = getDevicesSelectByRelatedSQLite(id_device);
|
|
1340
|
+
break;
|
|
1341
|
+
case 'MYSQL':
|
|
1342
|
+
query = getDevicesSelectByRelatedMySQL(id_device);
|
|
1343
|
+
break;
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
return query;
|
|
1347
|
+
}
|
|
811
1348
|
//End Get Related Devices
|
|
812
1349
|
//Get Device by Id
|
|
813
1350
|
function queryDeviceByIdSQLite(id_device) {
|
|
@@ -828,6 +1365,21 @@ function queryDeviceByIdMySQL(id_device) {
|
|
|
828
1365
|
query += "where d.id = :id_device";
|
|
829
1366
|
return query;
|
|
830
1367
|
}
|
|
1368
|
+
function queryDeviceById(db_used, id_device) {
|
|
1369
|
+
var query = "";
|
|
1370
|
+
var db_used = global.get("db_used");
|
|
1371
|
+
if (db_used) {
|
|
1372
|
+
switch (db_used) {
|
|
1373
|
+
case 'SQLITE':
|
|
1374
|
+
query = queryDeviceByIdSQLite(id_device);
|
|
1375
|
+
break;
|
|
1376
|
+
case 'MYSQL':
|
|
1377
|
+
query = queryDeviceByIdMySQL(id_device);
|
|
1378
|
+
break;
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
return query;
|
|
1382
|
+
}
|
|
831
1383
|
//End Get Device by Id
|
|
832
1384
|
//Get Device by Identificativo
|
|
833
1385
|
function queryDeviceByIdentificativoSQLite(identificativo) {
|
|
@@ -855,6 +1407,20 @@ function queryDeviceByIdentificativoMySQL(identificativo) {
|
|
|
855
1407
|
query += "d.inv_tn_number = :identificativo)";
|
|
856
1408
|
return query;
|
|
857
1409
|
}
|
|
1410
|
+
function queryDeviceByIdentificativo(db_used, identificativo) {
|
|
1411
|
+
var query = "";
|
|
1412
|
+
if (db_used) {
|
|
1413
|
+
switch (db_used) {
|
|
1414
|
+
case 'SQLITE':
|
|
1415
|
+
query = queryDeviceByIdentificativoSQLite(identificativo);
|
|
1416
|
+
break;
|
|
1417
|
+
case 'MYSQL':
|
|
1418
|
+
query = queryDeviceByIdentificativoMySQL(identificativo);
|
|
1419
|
+
break;
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
return query;
|
|
1423
|
+
}
|
|
858
1424
|
//End Get Device by Identificativo
|
|
859
1425
|
|
|
860
1426
|
|
|
@@ -896,6 +1462,20 @@ function queryDeviceStatusMySQL(id_device, date_ref) {
|
|
|
896
1462
|
}
|
|
897
1463
|
return query;
|
|
898
1464
|
}
|
|
1465
|
+
function queryDeviceStatus(db_used, id_device, date_ref) {
|
|
1466
|
+
var query = "";
|
|
1467
|
+
if (db_used) {
|
|
1468
|
+
switch (db_used) {
|
|
1469
|
+
case 'SQLITE':
|
|
1470
|
+
query = queryDeviceStatusSQLite(id_device, date_ref);
|
|
1471
|
+
break;
|
|
1472
|
+
case 'MYSQL':
|
|
1473
|
+
query = queryDeviceStatusMySQL(id_device, date_ref);
|
|
1474
|
+
break;
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
return query;
|
|
1478
|
+
}
|
|
899
1479
|
//End Get Device Status
|
|
900
1480
|
// Insert device status
|
|
901
1481
|
function updateDeviceStatusSQLite(id_device) {
|
|
@@ -908,6 +1488,21 @@ function updateDeviceStatusMySQL(id_device) {
|
|
|
908
1488
|
query += "where id_device = :id_device and date_status = (select max(date_status) from device_usage where id_device = :id_device)";
|
|
909
1489
|
return query;
|
|
910
1490
|
}
|
|
1491
|
+
function updateDeviceStatus(db_used, id_device) {
|
|
1492
|
+
var query = "";
|
|
1493
|
+
if (db_used) {
|
|
1494
|
+
switch (db_used) {
|
|
1495
|
+
case 'SQLITE':
|
|
1496
|
+
query = updateDeviceStatusSQLite(id_device);
|
|
1497
|
+
break;
|
|
1498
|
+
case 'MYSQL':
|
|
1499
|
+
query = updateDeviceStatusMySQL(id_device);
|
|
1500
|
+
break;
|
|
1501
|
+
}
|
|
1502
|
+
}
|
|
1503
|
+
return query;
|
|
1504
|
+
}
|
|
1505
|
+
|
|
911
1506
|
// end manage updateDevicesStatus
|
|
912
1507
|
// Manage insertDeviceStatus
|
|
913
1508
|
function insertDeviceStatusSQLite(id_device, dev_status, start_date) {
|
|
@@ -940,7 +1535,20 @@ function insertDeviceStatusMySQL(id_device, dev_status, start_date) {
|
|
|
940
1535
|
query += ")";
|
|
941
1536
|
return query;
|
|
942
1537
|
}
|
|
943
|
-
|
|
1538
|
+
function insertDeviceStatus(db_used, id_device, dev_status, start_date) {
|
|
1539
|
+
var query = "";
|
|
1540
|
+
if (db_used) {
|
|
1541
|
+
switch (db_used) {
|
|
1542
|
+
case 'SQLITE':
|
|
1543
|
+
query = insertDeviceStatusSQLite(id_device, dev_status, start_date);
|
|
1544
|
+
break;
|
|
1545
|
+
case 'MYSQL':
|
|
1546
|
+
query = insertDeviceStatusMySQL(id_device, dev_status, start_date);
|
|
1547
|
+
break;
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
return query;
|
|
1551
|
+
}
|
|
944
1552
|
//end insert device status
|
|
945
1553
|
|
|
946
1554
|
|
|
@@ -1007,6 +1615,21 @@ function insertDeviceMySQL() {
|
|
|
1007
1615
|
query += ")";
|
|
1008
1616
|
return query;
|
|
1009
1617
|
}
|
|
1618
|
+
function insertDevice(db_used, deviceObj) {
|
|
1619
|
+
var query = "";
|
|
1620
|
+
if (db_used) {
|
|
1621
|
+
switch (db_used) {
|
|
1622
|
+
case 'SQLITE':
|
|
1623
|
+
query = insertDeviceSQLite(deviceObj);
|
|
1624
|
+
break;
|
|
1625
|
+
case 'MYSQL':
|
|
1626
|
+
query = insertDeviceMySQL();
|
|
1627
|
+
break;
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
return query;
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1010
1633
|
//End Insert Device
|
|
1011
1634
|
//Update Device
|
|
1012
1635
|
function updateDeviceSQLite(deviceObj) {
|
|
@@ -1072,6 +1695,23 @@ function updateDeviceMySQL() {
|
|
|
1072
1695
|
return query;
|
|
1073
1696
|
}
|
|
1074
1697
|
|
|
1698
|
+
function updateDevice(db_used, deviceObj) {
|
|
1699
|
+
var query = "";
|
|
1700
|
+
if (db_used) {
|
|
1701
|
+
switch (db_used) {
|
|
1702
|
+
case 'SQLITE':
|
|
1703
|
+
query = updateDeviceSQLite(deviceObj);
|
|
1704
|
+
break;
|
|
1705
|
+
case 'MYSQL':
|
|
1706
|
+
query = updateDeviceMySQL();
|
|
1707
|
+
break;
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
return query;
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1713
|
+
|
|
1714
|
+
|
|
1075
1715
|
function getDeviceMySQLPayload(dev) {
|
|
1076
1716
|
var payloadObj = {};
|
|
1077
1717
|
if (dev) {
|
|
@@ -1105,20 +1745,6 @@ function getDeviceMySQLPayload(dev) {
|
|
|
1105
1745
|
if (dev.note) {
|
|
1106
1746
|
retValue.note = dev.note;
|
|
1107
1747
|
}
|
|
1108
|
-
/*
|
|
1109
|
-
payloadObj = {
|
|
1110
|
-
"inv_ict3_number": String(retValue.inventario).trim(),
|
|
1111
|
-
"inv_tn_number": String(retValue.inv_comune).trim(),
|
|
1112
|
-
"inv_pnrr_number": String(retValue.PNRR).trim(),
|
|
1113
|
-
"inv_tndigit_number": String(retValue).inv_tndigit.trim(),
|
|
1114
|
-
"type": String(retValue.type).trim(),
|
|
1115
|
-
"manifacturer": String(retValue.marca).trim(),
|
|
1116
|
-
"model": String(retValue.modello).trim(),
|
|
1117
|
-
"serial_no": String(retValue.serial_no).trim(),
|
|
1118
|
-
"note": String(retValue.note).trim(),
|
|
1119
|
-
"id_device": dev.id
|
|
1120
|
-
};
|
|
1121
|
-
*/
|
|
1122
1748
|
payloadObj = {
|
|
1123
1749
|
"inventario": retValue.inventario.trim(),
|
|
1124
1750
|
"inv_comune": retValue.inv_comune.trim(),
|
|
@@ -1148,6 +1774,20 @@ function removeDeviceMySQL() {
|
|
|
1148
1774
|
query += "where id = :id_device";
|
|
1149
1775
|
return query;
|
|
1150
1776
|
}
|
|
1777
|
+
function removeDevice(db_used, id_device) {
|
|
1778
|
+
var query = "";
|
|
1779
|
+
if (db_used) {
|
|
1780
|
+
switch (db_used) {
|
|
1781
|
+
case 'SQLITE':
|
|
1782
|
+
query = removeDeviceSQLite(id_device);
|
|
1783
|
+
break;
|
|
1784
|
+
case 'MYSQL':
|
|
1785
|
+
query = removeDeviceMySQL();
|
|
1786
|
+
break;
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
return query;
|
|
1790
|
+
}
|
|
1151
1791
|
|
|
1152
1792
|
//End remove device
|
|
1153
1793
|
//Get Last Id
|
|
@@ -1158,7 +1798,20 @@ function queryLastDeviceIdSQLite() {
|
|
|
1158
1798
|
function queryLastDeviceIdMySQL() {
|
|
1159
1799
|
return "SELECT AUTO_INCREMENT - 1 as CurrentId FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'ALS' AND TABLE_NAME = 'devices'";
|
|
1160
1800
|
}
|
|
1161
|
-
|
|
1801
|
+
function queryLastDeviceId(db_used) {
|
|
1802
|
+
var query = "";
|
|
1803
|
+
if (db_used) {
|
|
1804
|
+
switch (db_used) {
|
|
1805
|
+
case 'SQLITE':
|
|
1806
|
+
query = queryLastDeviceIdSQLite();
|
|
1807
|
+
break;
|
|
1808
|
+
case 'MYSQL':
|
|
1809
|
+
query = queryLastDeviceIdMySQL();
|
|
1810
|
+
break;
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
return query;
|
|
1814
|
+
}
|
|
1162
1815
|
//End Get Last Id
|
|
1163
1816
|
//Get Devices for Combo
|
|
1164
1817
|
function getDevicesSelectComboSQLite(categoria, id_dev_exclude, with_properties) {
|
|
@@ -1222,7 +1875,20 @@ function getDevicesSelectComboMySQL(categoria, id_dev_exclude, with_properties)
|
|
|
1222
1875
|
query += "order by d.inv_ict3_number";
|
|
1223
1876
|
return query;
|
|
1224
1877
|
}
|
|
1225
|
-
|
|
1878
|
+
function getDevicesSelectCombo(db_used, categoria, id_dev_exclude, with_properties) {
|
|
1879
|
+
var query = "";
|
|
1880
|
+
if (db_used) {
|
|
1881
|
+
switch (db_used) {
|
|
1882
|
+
case 'SQLITE':
|
|
1883
|
+
query = getDevicesSelectComboSQLite(categoria, id_dev_exclude, with_properties);
|
|
1884
|
+
break;
|
|
1885
|
+
case 'MYSQL':
|
|
1886
|
+
query = getDevicesSelectComboMySQL(categoria, id_dev_exclude, with_properties);
|
|
1887
|
+
break;
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
return query;
|
|
1891
|
+
}
|
|
1226
1892
|
//End get devices for combo
|
|
1227
1893
|
// Get device by site combo
|
|
1228
1894
|
function getDevicesSelectBySiteComboSQLite(id_site) {
|
|
@@ -1259,6 +1925,21 @@ function getDevicesSelectBySiteComboMySQL(id_site) {
|
|
|
1259
1925
|
query += "order by d.inv_ict3_number";
|
|
1260
1926
|
return query;
|
|
1261
1927
|
}
|
|
1928
|
+
|
|
1929
|
+
function getDevicesSelectBySiteCombo(db_used, id_site) {
|
|
1930
|
+
var query = "";
|
|
1931
|
+
if (db_used) {
|
|
1932
|
+
switch (db_used) {
|
|
1933
|
+
case 'SQLITE':
|
|
1934
|
+
query = getDevicesSelectBySiteComboSQLite(id_site);
|
|
1935
|
+
break;
|
|
1936
|
+
case 'MYSQL':
|
|
1937
|
+
query = getDevicesSelectBySiteComboMySQL(id_site);
|
|
1938
|
+
break;
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1941
|
+
return query;
|
|
1942
|
+
}
|
|
1262
1943
|
//end Get device by site Combo
|
|
1263
1944
|
|
|
1264
1945
|
//Write Device properties
|
|
@@ -1273,7 +1954,20 @@ function writeDevicePropertiesMySQL() {
|
|
|
1273
1954
|
query += ":id_device, :raw_data)";
|
|
1274
1955
|
return query;
|
|
1275
1956
|
}
|
|
1276
|
-
|
|
1957
|
+
function writeDeviceProperties(db_used, id_device, raw_data) {
|
|
1958
|
+
var query = "";
|
|
1959
|
+
if (db_used) {
|
|
1960
|
+
switch (db_used) {
|
|
1961
|
+
case 'SQLITE':
|
|
1962
|
+
query = writeDevicePropertiesSQLite(id_device, raw_data);
|
|
1963
|
+
break;
|
|
1964
|
+
case 'MYSQL':
|
|
1965
|
+
query = writeDevicePropertiesMySQL();
|
|
1966
|
+
break;
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
return query;
|
|
1970
|
+
}
|
|
1277
1971
|
//End Write Device properties
|
|
1278
1972
|
//Read Device properties
|
|
1279
1973
|
function readDevicePropertiesSQLite(id_device) {
|
|
@@ -1281,11 +1975,26 @@ function readDevicePropertiesSQLite(id_device) {
|
|
|
1281
1975
|
query += "where id_device = " + id_device;
|
|
1282
1976
|
return query;
|
|
1283
1977
|
}
|
|
1284
|
-
|
|
1285
|
-
function readDevicePropertiesMySQL() {
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1978
|
+
|
|
1979
|
+
function readDevicePropertiesMySQL() {
|
|
1980
|
+
var query = "select raw_properties from device_properties ";
|
|
1981
|
+
query += "where id_device = :id_device";
|
|
1982
|
+
return query;
|
|
1983
|
+
}
|
|
1984
|
+
function readDeviceProperties(db_used, id_device) {
|
|
1985
|
+
var query = "";
|
|
1986
|
+
if (db_used) {
|
|
1987
|
+
switch (db_used) {
|
|
1988
|
+
case 'SQLITE':
|
|
1989
|
+
query = readDevicePropertiesSQLite(id_device);
|
|
1990
|
+
break;
|
|
1991
|
+
case 'MYSQL':
|
|
1992
|
+
query = readDevicePropertiesMySQL();
|
|
1993
|
+
break;
|
|
1994
|
+
}
|
|
1995
|
+
}
|
|
1996
|
+
return query;
|
|
1997
|
+
}
|
|
1289
1998
|
//End Read Device properties
|
|
1290
1999
|
|
|
1291
2000
|
// Get Devices with properties
|
|
@@ -1310,6 +2019,21 @@ function getDevicesWithPropertiesSQLite(id_device) {
|
|
|
1310
2019
|
function getDevicesWithPropertiesMySQL(id_device) {
|
|
1311
2020
|
|
|
1312
2021
|
}
|
|
2022
|
+
function getDevicesWithProperties(db_used, id_device) {
|
|
2023
|
+
var query = "";
|
|
2024
|
+
if (db_used) {
|
|
2025
|
+
switch (db_used) {
|
|
2026
|
+
case 'SQLITE':
|
|
2027
|
+
query = getDevicesWithPropertiesSQLite(id_device);
|
|
2028
|
+
break;
|
|
2029
|
+
case 'MYSQL':
|
|
2030
|
+
query = getDevicesWithPropertiesMySQL(id_device);
|
|
2031
|
+
break;
|
|
2032
|
+
}
|
|
2033
|
+
}
|
|
2034
|
+
return query;
|
|
2035
|
+
}
|
|
2036
|
+
|
|
1313
2037
|
// End get devices with properties
|
|
1314
2038
|
// Get Beni Acquisiti...
|
|
1315
2039
|
function getBeniAcquisitiSQLite(table_name, is_pnrr, is_dismissione) {
|
|
@@ -1435,7 +2159,20 @@ function getBeniAcquisitiMySQL(table_name, is_pnrr, is_dismissione) {
|
|
|
1435
2159
|
let result = query.replace("TAB_NAME", table_name);
|
|
1436
2160
|
return result;
|
|
1437
2161
|
}
|
|
1438
|
-
|
|
2162
|
+
function getBeniAcquisiti(db_used, tab_name, is_pnrr, is_dismissione) {
|
|
2163
|
+
var query = "";
|
|
2164
|
+
if (db_used) {
|
|
2165
|
+
switch (db_used) {
|
|
2166
|
+
case 'SQLITE':
|
|
2167
|
+
query = getBeniAcquisitiSQLite(tab_name, is_pnrr, is_dismissione);
|
|
2168
|
+
break;
|
|
2169
|
+
case 'MYSQL':
|
|
2170
|
+
query = getBeniAcquisitiMySQL(tab_name, is_pnrr, is_dismissione);
|
|
2171
|
+
break;
|
|
2172
|
+
}
|
|
2173
|
+
}
|
|
2174
|
+
return query;
|
|
2175
|
+
}
|
|
1439
2176
|
//End get beni acquisiti
|
|
1440
2177
|
//Manage sets
|
|
1441
2178
|
function getSetInfoByIdSetSQLite(id_Set) {
|
|
@@ -1450,7 +2187,20 @@ function getSetInfoByIdSetMySQL(id_set) {
|
|
|
1450
2187
|
query += "where idset = :id_set";
|
|
1451
2188
|
return query;
|
|
1452
2189
|
}
|
|
1453
|
-
|
|
2190
|
+
function getSetInfoByIdSet(db_used, id_set) {
|
|
2191
|
+
var query = "";
|
|
2192
|
+
if (db_used) {
|
|
2193
|
+
switch (db_used) {
|
|
2194
|
+
case 'SQLITE':
|
|
2195
|
+
query = getSetInfoByIdSetSQLite(id_set);
|
|
2196
|
+
break;
|
|
2197
|
+
case 'MYSQL':
|
|
2198
|
+
query = getSetInfoByIdSetMySQL(id_set);
|
|
2199
|
+
break;
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2202
|
+
return query;
|
|
2203
|
+
}
|
|
1454
2204
|
function getSetInfoByIdDeviceSQLite(id_device) {
|
|
1455
2205
|
var query = "select idset, id_maindevice, id_relateddevice, id_conn_out, id_conn_in, id_adapter from device_set ";
|
|
1456
2206
|
query += "where id_maindevice = " + id_device;
|
|
@@ -1462,7 +2212,20 @@ function getSetInfoByIdDeviceMySQL(id_device) {
|
|
|
1462
2212
|
query += "where id_maindevice = :id_device";
|
|
1463
2213
|
return query;
|
|
1464
2214
|
}
|
|
1465
|
-
|
|
2215
|
+
function getSetInfoByIdDevice(db_used, id_device) {
|
|
2216
|
+
var query = "";
|
|
2217
|
+
if (db_used) {
|
|
2218
|
+
switch (db_used) {
|
|
2219
|
+
case 'SQLITE':
|
|
2220
|
+
query = getSetInfoByIdDeviceSQLite(id_device);
|
|
2221
|
+
break;
|
|
2222
|
+
case 'MYSQL':
|
|
2223
|
+
query = getSetInfoByIdDeviceMySQL(id_device);
|
|
2224
|
+
break;
|
|
2225
|
+
}
|
|
2226
|
+
}
|
|
2227
|
+
return query;
|
|
2228
|
+
}
|
|
1466
2229
|
function insertSetInfoSQLite(id_device, id_device_col) {
|
|
1467
2230
|
var query = "";
|
|
1468
2231
|
if (id_device > 0 && id_device_col > 0) {
|
|
@@ -1489,7 +2252,35 @@ function insertSetInfoInverseSQLite(id_device, id_device_col) {
|
|
|
1489
2252
|
function insertSetInfoInverseMySQL(id_device, id_device_col) {
|
|
1490
2253
|
return insertSetInfoMySQL(id_device_col, id_device);
|
|
1491
2254
|
}
|
|
2255
|
+
function insertSetInfo(db_used, id_device, id_device_col) {
|
|
2256
|
+
var query = "";
|
|
2257
|
+
if (db_used) {
|
|
2258
|
+
switch (db_used) {
|
|
2259
|
+
case 'SQLITE':
|
|
2260
|
+
query = insertSetInfoSQLite(id_device, id_device_col);
|
|
2261
|
+
break;
|
|
2262
|
+
case 'MYSQL':
|
|
2263
|
+
query = insertSetInfoMySQL(id_device, id_device_col);
|
|
2264
|
+
break;
|
|
2265
|
+
}
|
|
2266
|
+
}
|
|
2267
|
+
return query;
|
|
2268
|
+
}
|
|
1492
2269
|
|
|
2270
|
+
function insertSetInfoInverse(db_used, id_device, id_device_col) {
|
|
2271
|
+
var query = "";
|
|
2272
|
+
if (db_used) {
|
|
2273
|
+
switch (db_used) {
|
|
2274
|
+
case 'SQLITE':
|
|
2275
|
+
query = insertSetInfoSQLite(id_device_col, id_device);
|
|
2276
|
+
break;
|
|
2277
|
+
case 'MYSQL':
|
|
2278
|
+
query = insertSetInfoMySQL(id_device_col, id_device);
|
|
2279
|
+
break;
|
|
2280
|
+
}
|
|
2281
|
+
}
|
|
2282
|
+
return query;
|
|
2283
|
+
}
|
|
1493
2284
|
|
|
1494
2285
|
function removeSetInfoSQLite(id_device, id_device_col) {
|
|
1495
2286
|
var query = "";
|
|
@@ -1509,6 +2300,20 @@ function removeSetInfoMySQL(id_device, id_device_col) {
|
|
|
1509
2300
|
return query;
|
|
1510
2301
|
}
|
|
1511
2302
|
|
|
2303
|
+
function removeSetInfo(db_used, id_device, id_device_col) {
|
|
2304
|
+
var query = "";
|
|
2305
|
+
if (db_used) {
|
|
2306
|
+
switch (db_used) {
|
|
2307
|
+
case 'SQLITE':
|
|
2308
|
+
query = removeSetInfoSQLite(id_device, id_device_col);
|
|
2309
|
+
break;
|
|
2310
|
+
case 'MYSQL':
|
|
2311
|
+
query = removeSetInfoMySQL(id_device, id_device_col);
|
|
2312
|
+
break;
|
|
2313
|
+
}
|
|
2314
|
+
}
|
|
2315
|
+
return query;
|
|
2316
|
+
}
|
|
1512
2317
|
|
|
1513
2318
|
function setInfoObj(set_info) {
|
|
1514
2319
|
var obj = {};
|
|
@@ -1541,6 +2346,20 @@ function updateSetInfoMySQL() {
|
|
|
1541
2346
|
return query;
|
|
1542
2347
|
}
|
|
1543
2348
|
|
|
2349
|
+
function updateSetInfo(db_used, set_info) {
|
|
2350
|
+
var query = "";
|
|
2351
|
+
if (db_used) {
|
|
2352
|
+
switch (db_used) {
|
|
2353
|
+
case 'SQLITE':
|
|
2354
|
+
query = updateSetInfoSQLite(set_info);
|
|
2355
|
+
break;
|
|
2356
|
+
case 'MYSQL':
|
|
2357
|
+
query = updateSetInfoMySQL();
|
|
2358
|
+
break;
|
|
2359
|
+
}
|
|
2360
|
+
}
|
|
2361
|
+
return query;
|
|
2362
|
+
}
|
|
1544
2363
|
|
|
1545
2364
|
//
|
|
1546
2365
|
function selectSetsByIdDeviceSQLite(id_device) {
|
|
@@ -1555,7 +2374,20 @@ function selectSetsByIdDeviceMySQL(id_device) {
|
|
|
1555
2374
|
query += "where ds.id_maindevice = :id_device";
|
|
1556
2375
|
return query;
|
|
1557
2376
|
}
|
|
1558
|
-
|
|
2377
|
+
function selectSetsByIdDevice(db_used, id_device) {
|
|
2378
|
+
var query = "";
|
|
2379
|
+
if (db_used) {
|
|
2380
|
+
switch (db_used) {
|
|
2381
|
+
case 'SQLITE':
|
|
2382
|
+
query = selectSetsByIdDeviceSQLite(id_device);
|
|
2383
|
+
break;
|
|
2384
|
+
case 'MYSQL':
|
|
2385
|
+
query = selectSetsByIdDeviceMySQL(id_device);
|
|
2386
|
+
break;
|
|
2387
|
+
}
|
|
2388
|
+
}
|
|
2389
|
+
return query;
|
|
2390
|
+
}
|
|
1559
2391
|
//End manage sets
|
|
1560
2392
|
|
|
1561
2393
|
|
|
@@ -1583,6 +2415,20 @@ function getNetworksOnDeviceMySQL(id_device) {
|
|
|
1583
2415
|
query += "where dn.id_device = :id_device";
|
|
1584
2416
|
return query;
|
|
1585
2417
|
}
|
|
2418
|
+
function getNetworksOnDevice(db_used, id_device) {
|
|
2419
|
+
var query = "";
|
|
2420
|
+
if (db_used) {
|
|
2421
|
+
switch (db_used) {
|
|
2422
|
+
case 'SQLITE':
|
|
2423
|
+
query = getNetworksOnDeviceSQLite(id_device);
|
|
2424
|
+
break;
|
|
2425
|
+
case 'MYSQL':
|
|
2426
|
+
query = getNetworksOnDeviceMySQL(id_device);
|
|
2427
|
+
break;
|
|
2428
|
+
}
|
|
2429
|
+
}
|
|
2430
|
+
return query;
|
|
2431
|
+
}
|
|
1586
2432
|
//end Get Network on device
|
|
1587
2433
|
//
|
|
1588
2434
|
function getImportedPropertiesByIdDeviceSQLite(id_device) {
|
|
@@ -1595,6 +2441,20 @@ function getImportedPropertiesByIdDeviceMySQL(id_device) {
|
|
|
1595
2441
|
query += "where dp.id_device = :id_device";
|
|
1596
2442
|
return query;
|
|
1597
2443
|
}
|
|
2444
|
+
function getImportedPropertiesByIdDevice(db_used, id_device) {
|
|
2445
|
+
var query = "";
|
|
2446
|
+
if (db_used) {
|
|
2447
|
+
switch (db_used) {
|
|
2448
|
+
case 'SQLITE':
|
|
2449
|
+
query = getImportedPropertiesByIdDeviceSQLite(id_device);
|
|
2450
|
+
break;
|
|
2451
|
+
case 'MYSQL':
|
|
2452
|
+
query = getImportedPropertiesByIdDeviceMySQL(id_device);
|
|
2453
|
+
break;
|
|
2454
|
+
}
|
|
2455
|
+
}
|
|
2456
|
+
return query;
|
|
2457
|
+
}
|
|
1598
2458
|
//
|
|
1599
2459
|
|
|
1600
2460
|
function queryDeviceTypes() {
|
|
@@ -1641,6 +2501,20 @@ function getDevicesNotAllocatedComboMySQL() {
|
|
|
1641
2501
|
query += "order by d.inv_ict3_number";
|
|
1642
2502
|
return query;
|
|
1643
2503
|
}
|
|
2504
|
+
function getDevicesNotAllocatedCombo(db_used) {
|
|
2505
|
+
var query = "";
|
|
2506
|
+
if (db_used) {
|
|
2507
|
+
switch (db_used) {
|
|
2508
|
+
case 'SQLITE':
|
|
2509
|
+
query = getDevicesNotAllocatedComboSQLite();
|
|
2510
|
+
break;
|
|
2511
|
+
case 'MYSQL':
|
|
2512
|
+
query = getDevicesNotAllocatedComboMySQL();
|
|
2513
|
+
break;
|
|
2514
|
+
}
|
|
2515
|
+
}
|
|
2516
|
+
return query;
|
|
2517
|
+
}
|
|
1644
2518
|
// End getDevicesNotAllocatedCombo
|
|
1645
2519
|
// Define getDevicesAllocatedCombo
|
|
1646
2520
|
function getDevicesAllocatedComboSQLite(id_site, id_place) {
|
|
@@ -1679,7 +2553,20 @@ function getDevicesAllocatedComboMySQL(id_site, id_place) {
|
|
|
1679
2553
|
query += "order by d.inv_ict3_number";
|
|
1680
2554
|
return query;
|
|
1681
2555
|
}
|
|
1682
|
-
|
|
2556
|
+
function getDevicesAllocatedCombo(db_used, id_site, id_place) {
|
|
2557
|
+
var query = "";
|
|
2558
|
+
if (db_used) {
|
|
2559
|
+
switch (db_used) {
|
|
2560
|
+
case 'SQLITE':
|
|
2561
|
+
query = getDevicesAllocatedComboSQLite(id_site, id_place);
|
|
2562
|
+
break;
|
|
2563
|
+
case 'MYSQL':
|
|
2564
|
+
query = getDevicesAllocatedComboMySQL(id_site, id_place);
|
|
2565
|
+
break;
|
|
2566
|
+
}
|
|
2567
|
+
}
|
|
2568
|
+
return query;
|
|
2569
|
+
}
|
|
1683
2570
|
// End getDevicesAllocatedCombo
|
|
1684
2571
|
|
|
1685
2572
|
//end of source
|
|
@@ -1720,6 +2607,21 @@ function getDevicesSelectForInventarioRawMySQL(inv_code) {
|
|
|
1720
2607
|
return query;
|
|
1721
2608
|
}
|
|
1722
2609
|
|
|
2610
|
+
function getDevicesSelectForInventarioRaw(db_used, inv_code) {
|
|
2611
|
+
var query = "";
|
|
2612
|
+
if (db_used) {
|
|
2613
|
+
switch (db_used) {
|
|
2614
|
+
case 'SQLITE':
|
|
2615
|
+
query = getDevicesSelectForInventarioRawSQLite(inv_code);
|
|
2616
|
+
break;
|
|
2617
|
+
case 'MYSQL':
|
|
2618
|
+
query = getDevicesSelectForInventarioRawMySQL(inv_code);
|
|
2619
|
+
break;
|
|
2620
|
+
}
|
|
2621
|
+
}
|
|
2622
|
+
return query;
|
|
2623
|
+
}
|
|
2624
|
+
|
|
1723
2625
|
function getDevicesSelectForInventarioRawByIdSQLite(id_device) {
|
|
1724
2626
|
var query = "SELECT id, type as Tipo, manifacturer as Marca, model as Modello, ";
|
|
1725
2627
|
query += "type as Tipo, ";
|
|
@@ -1750,6 +2652,21 @@ function getDevicesSelectForInventarioRawByIdMySQL(id_device) {
|
|
|
1750
2652
|
return query;
|
|
1751
2653
|
}
|
|
1752
2654
|
|
|
2655
|
+
function getDevicesSelectForInventarioRawById(db_used, id_device) {
|
|
2656
|
+
var query = "";
|
|
2657
|
+
if (db_used) {
|
|
2658
|
+
switch (db_used) {
|
|
2659
|
+
case 'SQLITE':
|
|
2660
|
+
query = getDevicesSelectForInventarioRawByIdSQLite(id_device);
|
|
2661
|
+
break;
|
|
2662
|
+
case 'MYSQL':
|
|
2663
|
+
query = getDevicesSelectForInventarioRawByIdMySQL(id_device);
|
|
2664
|
+
break;
|
|
2665
|
+
}
|
|
2666
|
+
}
|
|
2667
|
+
return query;
|
|
2668
|
+
}
|
|
2669
|
+
|
|
1753
2670
|
|
|
1754
2671
|
function selectBeneDaInventarioSQLite(table_name, inv_code, is_pnrr, is_dismissione) {
|
|
1755
2672
|
var query = "";
|
|
@@ -1773,9 +2690,6 @@ function selectBeneDaInventarioSQLite(table_name, inv_code, is_pnrr, is_dismissi
|
|
|
1773
2690
|
query += " group by Inventario";
|
|
1774
2691
|
}
|
|
1775
2692
|
else if (table_name == "devices") {
|
|
1776
|
-
// Get the global function
|
|
1777
|
-
var getDevicesSelectForInventarioRaw = global.get("getDevicesSelectForInventarioRaw");
|
|
1778
|
-
|
|
1779
2693
|
// Use the function
|
|
1780
2694
|
query = getDevicesSelectForInventarioRaw(inv_code);
|
|
1781
2695
|
}
|
|
@@ -1844,9 +2758,6 @@ function selectBeneDaInventarioMySQL(table_name, inv_code, is_pnrr, is_dismissio
|
|
|
1844
2758
|
query += " group by Inventario";
|
|
1845
2759
|
}
|
|
1846
2760
|
else if (table_name == "devices") {
|
|
1847
|
-
// Get the global function
|
|
1848
|
-
var getDevicesSelectForInventarioRaw = global.get("getDevicesSelectForInventarioRaw");
|
|
1849
|
-
|
|
1850
2761
|
// Use the function
|
|
1851
2762
|
query = getDevicesSelectForInventarioRaw(inv_code);
|
|
1852
2763
|
}
|
|
@@ -1894,6 +2805,21 @@ function selectBeneDaInventarioMySQL(table_name, inv_code, is_pnrr, is_dismissio
|
|
|
1894
2805
|
return result;
|
|
1895
2806
|
}
|
|
1896
2807
|
|
|
2808
|
+
function selectBeneDaInventario(db_used, table_name, inv_code, is_pnrr, is_dismissione) {
|
|
2809
|
+
var query = "";
|
|
2810
|
+
if (db_used) {
|
|
2811
|
+
switch (db_used) {
|
|
2812
|
+
case 'SQLITE':
|
|
2813
|
+
query = selectBeneDaInventarioSQLite(table_name, inv_code, is_pnrr, is_dismissione);
|
|
2814
|
+
break;
|
|
2815
|
+
case 'MYSQL':
|
|
2816
|
+
query = selectBeneDaInventarioMySQL(table_name, inv_code, is_pnrr, is_dismissione);
|
|
2817
|
+
break;
|
|
2818
|
+
}
|
|
2819
|
+
}
|
|
2820
|
+
return query;
|
|
2821
|
+
}
|
|
2822
|
+
|
|
1897
2823
|
|
|
1898
2824
|
function queryCloseGestioneDeviceSQLite(id_gestione) {
|
|
1899
2825
|
var query = "update device_gestioni ";
|
|
@@ -3054,7 +3980,7 @@ function queryDocumentsIdDeviceMySQL(id_device) {
|
|
|
3054
3980
|
return query;
|
|
3055
3981
|
}
|
|
3056
3982
|
|
|
3057
|
-
function queryDocumentsIdDevice(id_device) {
|
|
3983
|
+
function queryDocumentsIdDevice(db_used, id_device) {
|
|
3058
3984
|
var query = "";
|
|
3059
3985
|
if (db_used) {
|
|
3060
3986
|
switch (db_used) {
|
|
@@ -3079,7 +4005,7 @@ function getDocumentByIdDocMySQL(id_doc) {
|
|
|
3079
4005
|
query += "where c.id = :id_doc";
|
|
3080
4006
|
return query;
|
|
3081
4007
|
}
|
|
3082
|
-
function getDocumentByIdDoc(id_doc) {
|
|
4008
|
+
function getDocumentByIdDoc(db_used, id_doc) {
|
|
3083
4009
|
var query = "";
|
|
3084
4010
|
if (db_used) {
|
|
3085
4011
|
switch (db_used) {
|
|
@@ -3105,7 +4031,7 @@ function selectDocumentoByIdMySQL(id_doc) {
|
|
|
3105
4031
|
query += "where id = :id_doc";
|
|
3106
4032
|
return query;
|
|
3107
4033
|
}
|
|
3108
|
-
function selectDocumentoById(id_doc) {
|
|
4034
|
+
function selectDocumentoById(db_used, id_doc) {
|
|
3109
4035
|
var query = "";
|
|
3110
4036
|
if (db_used) {
|
|
3111
4037
|
switch (db_used) {
|
|
@@ -3162,7 +4088,7 @@ function selectDocumentiComboMySQL(tipo, anno_emissione) {
|
|
|
3162
4088
|
return query;
|
|
3163
4089
|
}
|
|
3164
4090
|
|
|
3165
|
-
function selectDocumentiCombo(tipo, anno_emissione) {
|
|
4091
|
+
function selectDocumentiCombo(db_used, tipo, anno_emissione) {
|
|
3166
4092
|
var query = "";
|
|
3167
4093
|
if (db_used) {
|
|
3168
4094
|
switch (db_used) {
|
|
@@ -3189,7 +4115,7 @@ function insertDocumentoMySQL(descrizione, tipo, data_emissione, riferimento, fi
|
|
|
3189
4115
|
query += "(:descrizione, :tipo, :data_emissione, :riferimento, :file_name)";
|
|
3190
4116
|
return query;
|
|
3191
4117
|
}
|
|
3192
|
-
function insertDocumento(descrizione, tipo, data_emissione, riferimento, file_name) {
|
|
4118
|
+
function insertDocumento(db_used, descrizione, tipo, data_emissione, riferimento, file_name) {
|
|
3193
4119
|
var query = "";
|
|
3194
4120
|
if (db_used) {
|
|
3195
4121
|
switch (db_used) {
|
|
@@ -3226,7 +4152,7 @@ function updateDocumentoMySQL(id_doc, descrizione, tipo, data_emissione, riferim
|
|
|
3226
4152
|
return query;
|
|
3227
4153
|
}
|
|
3228
4154
|
|
|
3229
|
-
function updateDocumento(id_doc, descrizione, tipo, data_emissione, riferimento, file_name) {
|
|
4155
|
+
function updateDocumento(db_used, id_doc, descrizione, tipo, data_emissione, riferimento, file_name) {
|
|
3230
4156
|
var query = "";
|
|
3231
4157
|
if (db_used) {
|
|
3232
4158
|
switch (db_used) {
|
|
@@ -3254,7 +4180,7 @@ function removeDocumentoMySQL(id_doc) {
|
|
|
3254
4180
|
return query;
|
|
3255
4181
|
}
|
|
3256
4182
|
|
|
3257
|
-
function removeDocumento(id_doc) {
|
|
4183
|
+
function removeDocumento(db_used, id_doc) {
|
|
3258
4184
|
var query = "";
|
|
3259
4185
|
if (db_used) {
|
|
3260
4186
|
switch (db_used) {
|
|
@@ -3592,16 +4518,13 @@ function querySites(db_used, place, piano, funzione) {
|
|
|
3592
4518
|
if (db_used) {
|
|
3593
4519
|
switch (db_used) {
|
|
3594
4520
|
case 'SQLITE':
|
|
3595
|
-
query =
|
|
4521
|
+
query = querySitesSQLite(place, piano, funzione);
|
|
3596
4522
|
break;
|
|
3597
4523
|
case 'MYSQL':
|
|
3598
|
-
query =
|
|
4524
|
+
query = querySitesMySQL(place, piano, funzione);
|
|
3599
4525
|
break;
|
|
3600
4526
|
}
|
|
3601
4527
|
}
|
|
3602
|
-
else {
|
|
3603
|
-
query = alsmgr.querySitesSQLite(place, piano, funzione);
|
|
3604
|
-
}
|
|
3605
4528
|
return query;
|
|
3606
4529
|
|
|
3607
4530
|
}
|
|
@@ -3637,6 +4560,20 @@ function getSitesFromDeviceMySQL(id_device, prec_pos) {
|
|
|
3637
4560
|
query += " order by site_destinations.name, sites.floor";
|
|
3638
4561
|
return query;
|
|
3639
4562
|
}
|
|
4563
|
+
function getSitesFromDevice(db_used, id_device, prec_pos) {
|
|
4564
|
+
var query = "";
|
|
4565
|
+
if (db_used) {
|
|
4566
|
+
switch (db_used) {
|
|
4567
|
+
case 'SQLITE':
|
|
4568
|
+
query = getSitesFromDeviceSQLite(id_device, prec_pos);
|
|
4569
|
+
break;
|
|
4570
|
+
case 'MYSQL':
|
|
4571
|
+
query = getSitesFromDeviceMySQL(id_device, prec_pos);
|
|
4572
|
+
break;
|
|
4573
|
+
}
|
|
4574
|
+
}
|
|
4575
|
+
return query;
|
|
4576
|
+
}
|
|
3640
4577
|
//End Sites by devices
|
|
3641
4578
|
//Sites from device with date
|
|
3642
4579
|
function getSitesWithDatesFromDeviceSQLite(id_device) {
|
|
@@ -3657,6 +4594,20 @@ function getSitesWithDatesFromDeviceMySQL(id_device) {
|
|
|
3657
4594
|
return query;
|
|
3658
4595
|
}
|
|
3659
4596
|
|
|
4597
|
+
function getSitesWithDatesFromDevice(db_used, id_device) {
|
|
4598
|
+
var query = "";
|
|
4599
|
+
if (db_used) {
|
|
4600
|
+
switch (db_used) {
|
|
4601
|
+
case 'SQLITE':
|
|
4602
|
+
query = getSitesWithDatesFromDeviceSQLite(id_device);
|
|
4603
|
+
break;
|
|
4604
|
+
case 'MYSQL':
|
|
4605
|
+
query = getSitesWithDatesFromDeviceMySQL(id_device);
|
|
4606
|
+
break;
|
|
4607
|
+
}
|
|
4608
|
+
}
|
|
4609
|
+
return query;
|
|
4610
|
+
}
|
|
3660
4611
|
// Query Sites with Default
|
|
3661
4612
|
|
|
3662
4613
|
function querySitesWithDefaultsSQLite(def_values) {
|
|
@@ -3719,6 +4670,21 @@ function querySitesWithDefaultsMySQL(def_values) {
|
|
|
3719
4670
|
return query;
|
|
3720
4671
|
}
|
|
3721
4672
|
|
|
4673
|
+
function querySitesWithDefaults(db_used, def_values) {
|
|
4674
|
+
var query = "";
|
|
4675
|
+
if (db_used) {
|
|
4676
|
+
switch (db_used) {
|
|
4677
|
+
case 'SQLITE':
|
|
4678
|
+
query = querySitesWithDefaultsSQLite(def_values);
|
|
4679
|
+
break;
|
|
4680
|
+
case 'MYSQL':
|
|
4681
|
+
query = querySitesWithDefaultsMySQL(def_values);
|
|
4682
|
+
break;
|
|
4683
|
+
}
|
|
4684
|
+
}
|
|
4685
|
+
return query;
|
|
4686
|
+
}
|
|
4687
|
+
|
|
3722
4688
|
function getPorteByIdSiteSQLite(id_site) {
|
|
3723
4689
|
var query = "select port_type as Tipo, port_sign as Porta, note as Note from site_ports sp ";
|
|
3724
4690
|
query += "where sp.id_site = " + id_site;
|
|
@@ -3730,6 +4696,22 @@ function getPorteByIdSiteMySQL(id_site) {
|
|
|
3730
4696
|
query += "where sp.id_site = :id_site";
|
|
3731
4697
|
return query;
|
|
3732
4698
|
}
|
|
4699
|
+
|
|
4700
|
+
function getPorteByIdSite(db_used, id_site) {
|
|
4701
|
+
var query = "";
|
|
4702
|
+
if (db_used) {
|
|
4703
|
+
switch (db_used) {
|
|
4704
|
+
case 'SQLITE':
|
|
4705
|
+
query = getPorteByIdSiteSQLite(id_site);
|
|
4706
|
+
break;
|
|
4707
|
+
case 'MYSQL':
|
|
4708
|
+
query = getPorteByIdSiteMySQL(id_site);
|
|
4709
|
+
break;
|
|
4710
|
+
}
|
|
4711
|
+
}
|
|
4712
|
+
return query;
|
|
4713
|
+
}
|
|
4714
|
+
|
|
3733
4715
|
// Manage updateDevicesSite
|
|
3734
4716
|
function verifyPrevDeviceSiteSQLite(id_device) {
|
|
3735
4717
|
var query = "select count(id_site) as numero from device_site ";
|
|
@@ -3742,6 +4724,21 @@ function verifyPrevDeviceSiteMySQL(id_device) {
|
|
|
3742
4724
|
return query;
|
|
3743
4725
|
}
|
|
3744
4726
|
|
|
4727
|
+
function verifyPrevDeviceSite(db_used, id_device) {
|
|
4728
|
+
var query = "";
|
|
4729
|
+
if (db_used) {
|
|
4730
|
+
switch (db_used) {
|
|
4731
|
+
case 'SQLITE':
|
|
4732
|
+
query = verifyPrevDeviceSiteSQLite(id_device);
|
|
4733
|
+
break;
|
|
4734
|
+
case 'MYSQL':
|
|
4735
|
+
query = verifyPrevDeviceSiteMySQL(id_device);
|
|
4736
|
+
break;
|
|
4737
|
+
}
|
|
4738
|
+
}
|
|
4739
|
+
return query;
|
|
4740
|
+
}
|
|
4741
|
+
|
|
3745
4742
|
function removeDeviceSiteSQLite(id_site, id_place, id_device) {
|
|
3746
4743
|
|
|
3747
4744
|
}
|
|
@@ -4298,141 +5295,77 @@ function getPackageJsVersion() {
|
|
|
4298
5295
|
module.exports = {
|
|
4299
5296
|
getDevicesInUse,
|
|
4300
5297
|
getDevicesInUseByPlaces,
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
getDevicesNotAllocatedComboSQLite,
|
|
4304
|
-
getDevicesNotAllocatedComboMySQL,
|
|
5298
|
+
getDevicesAllocatedCombo,
|
|
5299
|
+
getDevicesNotAllocatedCombo,
|
|
4305
5300
|
queryDeviceTypes,
|
|
4306
5301
|
queryDeviceManifactures,
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
getDevicesCounterByPlaceSQLite,
|
|
4320
|
-
getDevicesCounterByPlaceMySQL,
|
|
4321
|
-
queryDeviceStatusSQLite,
|
|
4322
|
-
queryDeviceStatusMySQL,
|
|
4323
|
-
updateDeviceStatusSQLite,
|
|
4324
|
-
updateDeviceStatusMySQL,
|
|
4325
|
-
insertDeviceStatusSQLite,
|
|
4326
|
-
insertDeviceStatusMySQL,
|
|
4327
|
-
getDevicesSelectByPlaceSQLite,
|
|
4328
|
-
getDevicesSelectByPlaceMySQL,
|
|
4329
|
-
queryLastDeviceIdSQLite,
|
|
4330
|
-
queryLastDeviceIdMySQL,
|
|
5302
|
+
getDevicesSelectByRelated,
|
|
5303
|
+
getDevicesSelect,
|
|
5304
|
+
getDevicesSelectBySite,
|
|
5305
|
+
queryDeviceById,
|
|
5306
|
+
queryDeviceByIdentificativo,
|
|
5307
|
+
getDevicesCounterBySite,
|
|
5308
|
+
getDevicesCounterByPlace,
|
|
5309
|
+
queryDeviceStatus,
|
|
5310
|
+
updateDeviceStatus,
|
|
5311
|
+
insertDeviceStatus,
|
|
5312
|
+
getDevicesSelectByPlace,
|
|
5313
|
+
queryLastDeviceId,
|
|
4331
5314
|
queryOSList,
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
getSetInfoByIdSetSQLite,
|
|
4345
|
-
getSetInfoByIdSetMySQL,
|
|
4346
|
-
getSetInfoByIdDeviceSQLite,
|
|
4347
|
-
getSetInfoByIdDeviceMySQL,
|
|
4348
|
-
insertSetInfoSQLite,
|
|
4349
|
-
insertSetInfoMySQL,
|
|
4350
|
-
insertSetInfoInverseSQLite,
|
|
4351
|
-
insertSetInfoInverseMySQL,
|
|
4352
|
-
removeSetInfoSQLite,
|
|
4353
|
-
removeSetInfoMySQL,
|
|
4354
|
-
updateSetInfoSQLite,
|
|
4355
|
-
updateSetInfoMySQL,
|
|
5315
|
+
getDevicesSelectCombo,
|
|
5316
|
+
getDevicesSelectBySiteCombo,
|
|
5317
|
+
getDevicesWithProperties,
|
|
5318
|
+
getBeniAcquisiti,
|
|
5319
|
+
getNetworksOnDevice,
|
|
5320
|
+
getImportedPropertiesByIdDevice,
|
|
5321
|
+
getSetInfoByIdSet,
|
|
5322
|
+
getSetInfoByIdDevice,
|
|
5323
|
+
insertSetInfo,
|
|
5324
|
+
insertSetInfoInverse,
|
|
5325
|
+
removeSetInfo,
|
|
5326
|
+
updateSetInfo,
|
|
4356
5327
|
setInfoObj,
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
updateDeviceSQLite,
|
|
4362
|
-
updateDeviceMySQL,
|
|
4363
|
-
removeDeviceSQLite,
|
|
4364
|
-
removeDeviceMySQL,
|
|
5328
|
+
selectSetsByIdDevice,
|
|
5329
|
+
insertDevice,
|
|
5330
|
+
updateDevice,
|
|
5331
|
+
removeDevice,
|
|
4365
5332
|
getDeviceMySQLPayload,
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
existsPCPropertiesSQLite,
|
|
4371
|
-
existsPCPropertiesMySQL,
|
|
4372
|
-
getPCPropertiesSQLite,
|
|
4373
|
-
getPCPropertiesMySQL,
|
|
5333
|
+
writeDeviceProperties,
|
|
5334
|
+
readDeviceProperties,
|
|
5335
|
+
existsPCProperties,
|
|
5336
|
+
getPCProperties,
|
|
4374
5337
|
createPCPropertiesMySQLObj,
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
existsDisplayPropertiesSQLite,
|
|
4380
|
-
existsDisplayPropertiesMySQL,
|
|
4381
|
-
getDisplayPropertiesSQLite,
|
|
4382
|
-
getDisplayPropertiesMySQL,
|
|
5338
|
+
insertPCProperties,
|
|
5339
|
+
updatePCProperties,
|
|
5340
|
+
existsDisplayProperties,
|
|
5341
|
+
getDisplayProperties,
|
|
4383
5342
|
createDisplayPropertiesMySQLObj,
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
getNetworkByIdDeviceSQLite,
|
|
4411
|
-
getNetworkByIdDeviceMySQL,
|
|
4412
|
-
getNetworkByIdSQLite,
|
|
4413
|
-
getNetworkByIdMySQL,
|
|
4414
|
-
insertNetworkSQLite,
|
|
4415
|
-
insertNetworkMySQL,
|
|
4416
|
-
updateNetworkSQLite,
|
|
4417
|
-
updateNetworkMySQL,
|
|
4418
|
-
removeNetworkSQLite,
|
|
4419
|
-
removeNetworkMySQL,
|
|
4420
|
-
getAddOnByIdDeviceSQLite,
|
|
4421
|
-
getAddOnByIdDeviceMySQL,
|
|
4422
|
-
getAddOnByIdSQLite,
|
|
4423
|
-
getAddOnByIdMySQL,
|
|
4424
|
-
insertAddOnSQLite,
|
|
4425
|
-
insertAddOnMySQL,
|
|
4426
|
-
updateAddOnSQLite,
|
|
4427
|
-
updateAddOnMySQL,
|
|
4428
|
-
removeAddOnSQLite,
|
|
4429
|
-
removeAddOnMySQL,
|
|
4430
|
-
selectBeneDaInventarioSQLite,
|
|
4431
|
-
selectBeneDaInventarioMySQL,
|
|
4432
|
-
getDevicesSelectForInventarioRawSQLite,
|
|
4433
|
-
getDevicesSelectForInventarioRawMySQL,
|
|
4434
|
-
getDevicesSelectForInventarioRawByIdSQLite,
|
|
4435
|
-
getDevicesSelectForInventarioRawByIdMySQL,
|
|
5343
|
+
insertDisplayProperties,
|
|
5344
|
+
updateDisplayProperties,
|
|
5345
|
+
getDisplayPartProperties,
|
|
5346
|
+
getConnectorsByIdDevice,
|
|
5347
|
+
getConnectorById,
|
|
5348
|
+
insertConnector,
|
|
5349
|
+
updateConnector,
|
|
5350
|
+
removeConnector,
|
|
5351
|
+
getStorageByIdDevice,
|
|
5352
|
+
getStorageById,
|
|
5353
|
+
insertStorage,
|
|
5354
|
+
updateStorage,
|
|
5355
|
+
removeStorage,
|
|
5356
|
+
getNetworkByIdDevice,
|
|
5357
|
+
getNetworkById,
|
|
5358
|
+
insertNetwork,
|
|
5359
|
+
updateNetwork,
|
|
5360
|
+
removeNetwork,
|
|
5361
|
+
getAddOnByIdDevice,
|
|
5362
|
+
getAddOnById,
|
|
5363
|
+
insertAddOn,
|
|
5364
|
+
updateAddOn,
|
|
5365
|
+
removeAddOn,
|
|
5366
|
+
selectBeneDaInventario,
|
|
5367
|
+
getDevicesSelectForInventarioRaw,
|
|
5368
|
+
getDevicesSelectForInventarioRawById,
|
|
4436
5369
|
getBeniConsumo,
|
|
4437
5370
|
getBeniConsumoNotNull,
|
|
4438
5371
|
getBeneConsumoUsatoSQLite,
|
|
@@ -4516,6 +5449,7 @@ module.exports = {
|
|
|
4516
5449
|
updateDeviceInterventoMySQL,
|
|
4517
5450
|
removeDeviceInterventoSQLite,
|
|
4518
5451
|
removeDeviceInterventoMySQL,
|
|
5452
|
+
//
|
|
4519
5453
|
getConnectionTypesSQLite,
|
|
4520
5454
|
getConnectionTypesMySQL,
|
|
4521
5455
|
getConnectionProtocolsSQLite,
|
|
@@ -4557,8 +5491,7 @@ module.exports = {
|
|
|
4557
5491
|
getSiteByIdMySQL,
|
|
4558
5492
|
getSitesSelectComboSQLite,
|
|
4559
5493
|
getSitesSelectComboMySQL,
|
|
4560
|
-
|
|
4561
|
-
verifyPrevDeviceSiteMySQL,
|
|
5494
|
+
verifyPrevDeviceSite,
|
|
4562
5495
|
insertDeviceSiteSQLite,
|
|
4563
5496
|
insertDeviceSiteMySQL,
|
|
4564
5497
|
updateDeviceSiteSQLite,
|
|
@@ -4569,14 +5502,10 @@ module.exports = {
|
|
|
4569
5502
|
queryFloorsByPlace,
|
|
4570
5503
|
queryFunzioneByPlaceAndFloor,
|
|
4571
5504
|
querySites,
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
querySitesWithDefaultsSQLite,
|
|
4577
|
-
querySitesWithDefaultsMySQL,
|
|
4578
|
-
getPorteByIdSiteSQLite,
|
|
4579
|
-
getPorteByIdSiteMySQL,
|
|
5505
|
+
getSitesFromDevice,
|
|
5506
|
+
getSitesWithDatesFromDevice,
|
|
5507
|
+
querySitesWithDefaults,
|
|
5508
|
+
getPorteByIdSite,
|
|
4580
5509
|
//
|
|
4581
5510
|
queryStatisticSQLite,
|
|
4582
5511
|
queryStatisticMySQL,
|