aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorM.Gergo2021-06-11 03:35:05 +0200
committerM.Gergo2021-06-11 03:35:05 +0200
commit1467d3ca575dabdbc7e0255a671457d0467f422d (patch)
treeda231b68bcc8b2117aa09ff20094da2c579d4c60
parentfd57851114a515c1a35c29e733181afb7a4ee6ca (diff)
downloadmayor-rev4790.tar.gz
mayor-rev4790.zip
Rev: 4790rev4790
-rw-r--r--mayor-orig/mayor-base/log/mayor-base.rev2
-rw-r--r--mayor-orig/mayor-felveteli/log/mayor-felveteli.rev2
-rw-r--r--mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev2
-rw-r--r--mayor-orig/mayor-installer-orig/log/mayor-installer.rev2
-rw-r--r--mayor-orig/mayor-installer-sulix/log/mayor-installer-sulix.rev2
-rw-r--r--mayor-orig/mayor-jatek/log/mayor-jatek.rev2
-rw-r--r--mayor-orig/mayor-locales-de_DE/log/mayor-locales-de_DE.rev2
-rw-r--r--mayor-orig/mayor-locales-en_US/log/mayor-locales-en_US.rev2
-rw-r--r--mayor-orig/mayor-locales-jp_JP/log/mayor-locales-jp_JP.rev2
-rw-r--r--mayor-orig/mayor-naplo/install/module-naplo/mysql/intezmeny.sql6
-rw-r--r--mayor-orig/mayor-naplo/log/mayor-naplo.rev2
-rw-r--r--mayor-orig/mayor-naplo/update/pre004789-1-intezmeny.sql15
-rw-r--r--mayor-orig/mayor-naplo/update/pre004789-2-intezmeny.sql44
-rw-r--r--mayor-orig/mayor-portal/log/mayor-portal.rev2
-rw-r--r--mayor-orig/mayor-wiki/log/mayor-wiki.rev2
-rw-r--r--mayor-orig/md5sum26
-rw-r--r--mayor-orig/rev.txt2
-rw-r--r--rev.txt2
18 files changed, 89 insertions, 30 deletions
diff --git a/mayor-orig/mayor-base/log/mayor-base.rev b/mayor-orig/mayor-base/log/mayor-base.rev
index cc7b31a6..32c9f82a 100644
--- a/mayor-orig/mayor-base/log/mayor-base.rev
+++ b/mayor-orig/mayor-base/log/mayor-base.rev
@@ -1 +1 @@
-4789
+4790
diff --git a/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev b/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev
index cc7b31a6..32c9f82a 100644
--- a/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev
+++ b/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev
@@ -1 +1 @@
-4789
+4790
diff --git a/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev b/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev
index cc7b31a6..32c9f82a 100644
--- a/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev
+++ b/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev
@@ -1 +1 @@
-4789
+4790
diff --git a/mayor-orig/mayor-installer-orig/log/mayor-installer.rev b/mayor-orig/mayor-installer-orig/log/mayor-installer.rev
index cc7b31a6..32c9f82a 100644
--- a/mayor-orig/mayor-installer-orig/log/mayor-installer.rev
+++ b/mayor-orig/mayor-installer-orig/log/mayor-installer.rev
@@ -1 +1 @@
-4789
+4790
diff --git a/mayor-orig/mayor-installer-sulix/log/mayor-installer-sulix.rev b/mayor-orig/mayor-installer-sulix/log/mayor-installer-sulix.rev
index cc7b31a6..32c9f82a 100644
--- a/mayor-orig/mayor-installer-sulix/log/mayor-installer-sulix.rev
+++ b/mayor-orig/mayor-installer-sulix/log/mayor-installer-sulix.rev
@@ -1 +1 @@
-4789
+4790
diff --git a/mayor-orig/mayor-jatek/log/mayor-jatek.rev b/mayor-orig/mayor-jatek/log/mayor-jatek.rev
index cc7b31a6..32c9f82a 100644
--- a/mayor-orig/mayor-jatek/log/mayor-jatek.rev
+++ b/mayor-orig/mayor-jatek/log/mayor-jatek.rev
@@ -1 +1 @@
-4789
+4790
diff --git a/mayor-orig/mayor-locales-de_DE/log/mayor-locales-de_DE.rev b/mayor-orig/mayor-locales-de_DE/log/mayor-locales-de_DE.rev
index cc7b31a6..32c9f82a 100644
--- a/mayor-orig/mayor-locales-de_DE/log/mayor-locales-de_DE.rev
+++ b/mayor-orig/mayor-locales-de_DE/log/mayor-locales-de_DE.rev
@@ -1 +1 @@
-4789
+4790
diff --git a/mayor-orig/mayor-locales-en_US/log/mayor-locales-en_US.rev b/mayor-orig/mayor-locales-en_US/log/mayor-locales-en_US.rev
index cc7b31a6..32c9f82a 100644
--- a/mayor-orig/mayor-locales-en_US/log/mayor-locales-en_US.rev
+++ b/mayor-orig/mayor-locales-en_US/log/mayor-locales-en_US.rev
@@ -1 +1 @@
-4789
+4790
diff --git a/mayor-orig/mayor-locales-jp_JP/log/mayor-locales-jp_JP.rev b/mayor-orig/mayor-locales-jp_JP/log/mayor-locales-jp_JP.rev
index cc7b31a6..32c9f82a 100644
--- a/mayor-orig/mayor-locales-jp_JP/log/mayor-locales-jp_JP.rev
+++ b/mayor-orig/mayor-locales-jp_JP/log/mayor-locales-jp_JP.rev
@@ -1 +1 @@
-4789
+4790
diff --git a/mayor-orig/mayor-naplo/install/module-naplo/mysql/intezmeny.sql b/mayor-orig/mayor-naplo/install/module-naplo/mysql/intezmeny.sql
index 2ae43535..327cf561 100644
--- a/mayor-orig/mayor-naplo/install/module-naplo/mysql/intezmeny.sql
+++ b/mayor-orig/mayor-naplo/install/module-naplo/mysql/intezmeny.sql
@@ -140,7 +140,7 @@ CREATE TABLE `diak` (
`telefon` varchar(64) COLLATE utf8_hungarian_ci DEFAULT NULL,
`mobil` varchar(64) COLLATE utf8_hungarian_ci DEFAULT NULL,
`email` varchar(96) COLLATE utf8_hungarian_ci DEFAULT NULL,
- `statusz` enum('felvételt nyert','jogviszonyban van','magántanuló','vendégtanuló','jogviszonya felfüggesztve','jogviszonya lezárva') COLLATE utf8_hungarian_ci NOT NULL,
+ `statusz` enum('felvételt nyert','jogviszonyban van','magántanuló','egyéni munkarend','vendégtanuló','jogviszonya felfüggesztve','jogviszonya lezárva') COLLATE utf8_hungarian_ci NOT NULL,
`penzugyiStatusz` enum('állami finanszírozás','térítési díj','tandíj') COLLATE utf8_hungarian_ci DEFAULT 'állami finanszírozás',
`szocialisHelyzet` set('szülei elváltak','három vagy több gyerekes család','rendszeres gyermekvédelmi támogatást kap','állami gondozott','veszélyeztetett','hátrányos helyzetű','halmozottan hátrányos helyzetű','sajátos nevelési igényű') COLLATE utf8_hungarian_ci DEFAULT NULL,
`fogyatekossag` set('tartósan beteg',
@@ -1012,14 +1012,14 @@ CREATE TABLE `dokumentum` (
-- ------------------
SELECT diakId,IF(beDt<inKezdesDt,inKezdesDt,beDt) AS tolDt,IF(ifnull(kiDt,inZarasDt)<inZarasDt,kiDt,inZarasDt) AS igDt,
(SELECT COUNT(*) FROM diakJogviszony AS ds
- WHERE ds.diakId=diak.diakId AND tolDt<dt AND dt<=igDt AND ds.statusz IN ('jogviszonyban van','magántanuló')
+ WHERE ds.diakId=diak.diakId AND tolDt<dt AND dt<=igDt AND ds.statusz IN ('jogviszonyban van','magántanuló','egyéni munkarend')
) AS aktJogviszonyDb,
(SELECT statusz FROM diakJogviszony AS ds
WHERE ds.diakId=diak.diakId AND dt<=tolDt ORDER BY dt DESC LIMIT 1
) AS elozoStatusz
FROM osztalyDiak LEFT JOIN diak USING (diakId)
WHERE osztalyId=thisOsztalyId AND beDt<=inZarasDt AND (kiDt IS NULL OR kiDt>=inKezdesDt)
- HAVING (aktJogviszonyDb>0 or elozoStatusz in ('magántanuló','jogviszonyban van'))
+ HAVING (aktJogviszonyDb>0 or elozoStatusz in ('magántanuló','jogviszonyban van','egyéni munkarend'))
ORDER BY tolDt, CONCAT_WS(' ',viseltCsaladinev,viseltUtonev) COLLATE utf8_hungarian_ci;
-- Ha RETURN, akkor az EXIT HANDLER úgy is, nem?
diff --git a/mayor-orig/mayor-naplo/log/mayor-naplo.rev b/mayor-orig/mayor-naplo/log/mayor-naplo.rev
index cc7b31a6..32c9f82a 100644
--- a/mayor-orig/mayor-naplo/log/mayor-naplo.rev
+++ b/mayor-orig/mayor-naplo/log/mayor-naplo.rev
@@ -1 +1 @@
-4789
+4790
diff --git a/mayor-orig/mayor-naplo/update/pre004789-1-intezmeny.sql b/mayor-orig/mayor-naplo/update/pre004789-1-intezmeny.sql
new file mode 100644
index 00000000..cfb21fda
--- /dev/null
+++ b/mayor-orig/mayor-naplo/update/pre004789-1-intezmeny.sql
@@ -0,0 +1,15 @@
+DELIMITER $$
+DROP PROCEDURE IF EXISTS upgrade_database_4789 $$
+
+CREATE PROCEDURE upgrade_database_4789()
+BEGIN
+SET NAMES utf8 COLLATE utf8_hungarian_ci;
+
+-- https://tasz.hu/cikkek/igy-vedd-meg-a-gyermeked-az-allamositastol
+
+ALTER TABLE `diakJogviszony` MODIFY `statusz` enum('felvételt nyert','jogviszonyban van','magántanuló','egyéni munkarend','vendégtanuló','jogviszonya felfüggesztve','jogviszonya lezárva') COLLATE utf8_hungarian_ci NOT NULL;
+ALTER TABLE `diak` MODIFY `statusz` enum('felvételt nyert','jogviszonyban van','magántanuló','egyéni munkarend','vendégtanuló','jogviszonya felfüggesztve','jogviszonya lezárva') COLLATE utf8_hungarian_ci NOT NULL;
+
+END $$
+DELIMITER ;
+CALL upgrade_database_4789();
diff --git a/mayor-orig/mayor-naplo/update/pre004789-2-intezmeny.sql b/mayor-orig/mayor-naplo/update/pre004789-2-intezmeny.sql
new file mode 100644
index 00000000..4dd6c244
--- /dev/null
+++ b/mayor-orig/mayor-naplo/update/pre004789-2-intezmeny.sql
@@ -0,0 +1,44 @@
+DELIMITER //
+ DROP FUNCTION IF EXISTS diakNaploSorszam //
+ CREATE function diakNaploSorszam ( thisDiakId INT, thisTanev INT, thisOsztalyId INT ) returns INT
+ READS SQL DATA
+ BEGIN
+ DECLARE inKezdesDt,inZarasDt DATE;
+ DECLARE a,i INT; -- for loop
+ DECLARE b DATE; -- for loop
+ DECLARE c DATE;
+ DECLARE d INT;
+ DECLARE e VARCHAR(255);
+
+ DECLARE cur1
+ CURSOR FOR
+ SELECT diakId,IF(beDt<inKezdesDt,inKezdesDt,beDt) AS tolDt,IF(ifnull(kiDt,inZarasDt)<inZarasDt,kiDt,inZarasDt) AS igDt,
+ (SELECT COUNT(*) FROM diakJogviszony AS ds
+ WHERE ds.diakId=diak.diakId AND tolDt<dt AND dt<=igDt AND ds.statusz IN ('jogviszonyban van','magántanuló','egyéni munkarend')
+ ) AS aktJogviszonyDb,
+ (SELECT statusz FROM diakJogviszony AS ds
+ WHERE ds.diakId=diak.diakId AND dt<=tolDt ORDER BY dt DESC LIMIT 1
+ ) AS elozoStatusz
+ FROM osztalyDiak LEFT JOIN diak USING (diakId)
+ WHERE osztalyId=thisOsztalyId AND beDt<=inZarasDt AND (kiDt IS NULL OR kiDt>=inKezdesDt)
+ HAVING (aktJogviszonyDb>0 or elozoStatusz in ('magántanuló','jogviszonyban van','egyéni munkarend'))
+ ORDER BY tolDt, CONCAT_WS(' ',viseltCsaladinev,viseltUtonev) COLLATE utf8_hungarian_ci;
+
+ DECLARE EXIT HANDLER FOR NOT FOUND RETURN NULL;
+ SELECT kezdesDt FROM szemeszter WHERE tanev=thisTanev AND szemeszter=1 INTO inKezdesDt;
+ SELECT MAX(zarasDt) FROM szemeszter WHERE tanev=thisTanev INTO inZarasDt;
+
+ SET i := 1;
+ OPEN cur1;
+ lo: LOOP
+-- FETCH cur1 INTO a,b;
+ FETCH cur1 INTO a,b,c,d,e;
+ IF a = thisDiakId THEN
+ LEAVE lo;
+ END IF;
+ SET i := i+1;
+ END LOOP;
+ CLOSE cur1;
+ return i;
+ END; //
+ DELIMITER ; //
diff --git a/mayor-orig/mayor-portal/log/mayor-portal.rev b/mayor-orig/mayor-portal/log/mayor-portal.rev
index cc7b31a6..32c9f82a 100644
--- a/mayor-orig/mayor-portal/log/mayor-portal.rev
+++ b/mayor-orig/mayor-portal/log/mayor-portal.rev
@@ -1 +1 @@
-4789
+4790
diff --git a/mayor-orig/mayor-wiki/log/mayor-wiki.rev b/mayor-orig/mayor-wiki/log/mayor-wiki.rev
index cc7b31a6..32c9f82a 100644
--- a/mayor-orig/mayor-wiki/log/mayor-wiki.rev
+++ b/mayor-orig/mayor-wiki/log/mayor-wiki.rev
@@ -1 +1 @@
-4789
+4790
diff --git a/mayor-orig/md5sum b/mayor-orig/md5sum
index 78b537f9..2137aee7 100644
--- a/mayor-orig/md5sum
+++ b/mayor-orig/md5sum
@@ -1,13 +1,13 @@
-Revision 4789
-69bba34dfe8f3ce412f129725c37b0b7 mayor-fenntarto-rev4789.tgz
-7cab48a143e798b5c1bfa2c4e5e75fb5 mayor-installer-sulix-rev4789.tgz
-6b93aa48eb9e4cdc4842efeff6bea46e mayor-wiki-rev4789.tgz
-3af0d027b778f81701afcda04edc3934 mayor-installer-rev4789.tgz
-6e16fb9b58ae8794e1921c2d61c8ee30 mayor-portal-rev4789.tgz
-f8581c7790a978aaf3702062709c7f9c mayor-felveteli-rev4789.tgz
-83ee3fa164ef3b1fd3448f224d5556ff mayor-jatek-rev4789.tgz
-2d3613a9251066916905eb5e31ffe2ce mayor-locales-jp_JP-rev4789.tgz
-48053d73a11274d3b44d79bcf5621440 mayor-locales-de_DE-rev4789.tgz
-d06b2adf845ab9e54ab6b1685e87afa4 mayor-locales-en_US-rev4789.tgz
-1ba23ffa9cf9ccc1bdb3c9572a651373 mayor-naplo-rev4789.tgz
-e7d6e5dbae5ab281de91b7dde5b4d250 mayor-base-rev4789.tgz
+Revision 4790
+6d9d92ecb9cb7e28a9a6d734fc7048af mayor-fenntarto-rev4790.tgz
+ef105430527181cf9419ec93f93f58ca mayor-installer-sulix-rev4790.tgz
+9d9edebd951b6f5a85f3114457d7c52d mayor-wiki-rev4790.tgz
+ebb762006019c1f6481261f7285a8ba0 mayor-installer-rev4790.tgz
+e61c1aea1de71fab7c336961b1a1bba0 mayor-portal-rev4790.tgz
+6fdc079882e1bae22a32a76ccf7ba8d1 mayor-felveteli-rev4790.tgz
+18b0c6236780cba134f3bb1d6c08975b mayor-jatek-rev4790.tgz
+2ca2f8804151f99004344ba2e48a430e mayor-locales-jp_JP-rev4790.tgz
+ea5566c5d0e8b1583f0f94e4488cdb60 mayor-locales-de_DE-rev4790.tgz
+17333ad76adfccd294c1ba1730a134bd mayor-locales-en_US-rev4790.tgz
+de3a76f73d5bbc93c703f4b628efeca6 mayor-naplo-rev4790.tgz
+19634ef39b14443cc27f635b7773bdf0 mayor-base-rev4790.tgz
diff --git a/mayor-orig/rev.txt b/mayor-orig/rev.txt
index cc7b31a6..32c9f82a 100644
--- a/mayor-orig/rev.txt
+++ b/mayor-orig/rev.txt
@@ -1 +1 @@
-4789
+4790
diff --git a/rev.txt b/rev.txt
index cc7b31a6..32c9f82a 100644
--- a/rev.txt
+++ b/rev.txt
@@ -1 +1 @@
-4789
+4790