You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sql/functions.sql
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -322,6 +322,7 @@ CREATE OR REPLACE FUNCTION railway_train_protection_rank(
322
322
asfa TEXT,
323
323
ptc TEXT,
324
324
zsi127 TEXT,
325
+
ctcs TEXT,
325
326
etcs TEXT,
326
327
construction_etcs TEXT) RETURNS INTEGERAS $$
327
328
BEGIN
@@ -330,6 +331,9 @@ BEGIN
330
331
END IF;
331
332
IF ptc <>'no' THEN
332
333
RETURN 10;
334
+
END IF;
335
+
IF ctcs <>'no' THEN
336
+
RETURN 10;
333
337
END IF;
334
338
IF construction_etcs <>'no' THEN
335
339
RETURN 9;
@@ -361,7 +365,7 @@ BEGIN
361
365
IF pzb ='yes' THEN
362
366
RETURN 2;
363
367
END IF;
364
-
IF (pzb ='no'AND lzb ='no'AND etcs ='no') OR (atb ='no'AND etcs ='no') OR (atc ='no'AND etcs ='no') OR (scmt ='no'AND etcs ='no') OR (asfa ='no'AND etcs ='no') OR (kvb ='no'AND tvm ='no'AND etcs ='no') OR (zsi127 ='no') THEN
368
+
IF (pzb ='no'AND lzb ='no'AND etcs ='no') OR (atb ='no'AND etcs ='no') OR (atc ='no'AND etcs ='no') OR (scmt ='no'AND etcs ='no') OR (asfa ='no'AND etcs ='no') OR (kvb ='no'AND tvm ='no'AND etcs ='no') OR (zsi127 ='no') OR (ctcs ='no') THEN
0 commit comments