diff --git a/node-server/views/wahlkreise-single.jade b/node-server/views/wahlkreise-single.jade index 61cdb16..f0910a6 100755 --- a/node-server/views/wahlkreise-single.jade +++ b/node-server/views/wahlkreise-single.jade @@ -15,13 +15,13 @@ block content dl.general-info div dt Stimmberechtigt - dd= data.meta[0].elective + dd= data.meta[0].electorate div dt Stimmen abgegeben dd= data.meta[0].voted div dt Wahlbeteiligung - dd= 100 * Math.round(data.meta[0].participationrate / 100) + ' %' + dd= Math.round(data.meta[0].participationrate * 100) / 100 + ' %' .first h3 Sieger nach Erstimmen if data.first.length < 1 diff --git a/u04/generator/src/main/scala/generator.scala b/u04/generator/src/main/scala/generator.scala index 9b1ad44..c2882a4 100644 --- a/u04/generator/src/main/scala/generator.scala +++ b/u04/generator/src/main/scala/generator.scala @@ -225,7 +225,7 @@ object Generator { } else { val (firstname, lastname) = Names.getName(sz.gender) val (dobDay, dobMonth) = randomDayOfBirth - p.println(f"INSERT INTO Citizen (idno, firstname, lastname, dateofbirth, gender, authtoken) VALUES ('${sz.toString}', '${firstname}', '${lastname}', '${2009 - sz.age}.${dobMonth}.${dobDay}', '${sz.gender}', '');") + p.println(f"INSERT INTO Citizen (idno, firstname, lastname, dateofbirth, gender, authtoken) SELECT '${sz.toString}', '${firstname}', '${lastname}', '${2009 - sz.age}.${dobMonth}.${dobDay}', '${sz.gender}', random_pin(4));") sz.toString } p.println(f"INSERT INTO CitizenRegistration (idno, dwbid) VALUES ('${idno}', ${dwbid});")