Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 893f07e3

Přidáno uživatelem Dominik Poch před téměř 6 roky(ů)

Re #7551 Typing errors in init script

Zobrazit rozdíly:

server/init.sql
55 55
  CONSTRAINT fk_end_user_approval_status FOREIGN KEY (status_id)
56 56
    REFERENCES approval_status (id)
57 57
    ON DELETE NO ACTION ON UPDATE CASCADE,
58
  CONSTRAINT check_taken_vacation CHECK (taken_vacations >= 0),
59 58
  CONSTRAINT check_taken_sick_days CHECK (taken_sick_days >= 0)
60 59
);
61 60

  
......
122 121
  DECLARE notification DATETIME;
123 122

  
124 123
  SELECT no_sick_days, alert INTO sickDaysCount, notification FROM default_settings ORDER BY id DESC LIMIT 1;
125
  SELECT EU.id, EU.first_name, EU.last_name, EU.no_vacation, IFNULL(EU.no_sick_days, sickDaysCount), EU.taken_sick_days, IFNULL(EU.alert, notification), EU.email, EU.photo, EU.creation_date, R.name, APS.name
124
  SELECT EU.id, EU.first_name, EU.last_name, EU.no_vacations, IFNULL(EU.no_sick_days, sickDaysCount), EU.taken_sick_days, IFNULL(EU.alert, notification), EU.email, EU.photo, EU.creation_date, R.name, APS.name
126 125
     INTO out_id, out_first_name, out_last_name, out_no_vacations, out_no_sick_days, out_taken_sick_days, out_alert, out_email, out_photo, out_creation_date, out_role, out_status
127 126
     FROM end_user EU
128 127
     INNER JOIN role R ON EU.role_id=R.id
......
150 149
  DECLARE notification DATETIME;
151 150

  
152 151
  SELECT no_sick_days, alert INTO sickDaysCount, notification FROM default_settings ORDER BY id DESC LIMIT 1;
153
  SELECT EU.id, EU.first_name, EU.last_name, EU.no_vacation, IFNULL(EU.no_sick_days, sickDaysCount), EU.taken_sick_days, IFNULL(EU.alert, notification), EU.email, EU.photo, EU.creation_date, R.name, APS.name
152
  SELECT EU.id, EU.first_name, EU.last_name, EU.no_vacations, IFNULL(EU.no_sick_days, sickDaysCount), EU.taken_sick_days, IFNULL(EU.alert, notification), EU.email, EU.photo, EU.creation_date, R.name, APS.name
154 153
     INTO out_id, out_first_name, out_last_name, out_no_vacations, out_no_sick_days, out_taken_sick_days, out_alert, out_email, out_photo, out_creation_date, out_role, out_status
155 154
     FROM end_user EU
156 155
     INNER JOIN role R ON EU.role_id=R.id
......
187 186
-- -----------------------------------------------------
188 187
-- Insert table vacation_day
189 188
-- -----------------------------------------------------
190
--INSERT INTO vacation_day (vacation_date, time_from, time_to, user_id, status_id, type_id) VALUES ();
189
-- INSERT INTO vacation_day (vacation_date, time_from, time_to, user_id, status_id, type_id) VALUES ();
191 190

  
192 191
-- -----------------------------------------------------
193 192
-- Insert table default_settings
server/src/main/java/cz/zcu/yamanager/repository/UserRepository.java
54 54

  
55 55
    public FullUserProfile getFullUser(long id) {
56 56
        List<SqlParameter> paramList = new ArrayList<>();
57
        paramList.add(new SqlParameter(Types.BIGINT));
57
        paramList.add(new SqlParameter("in_id", Types.BIGINT));
58 58
        paramList.add(new SqlOutParameter("out_id", Types.BIGINT));
59 59
        paramList.add(new SqlOutParameter("out_first_name", Types.VARCHAR));
60 60
        paramList.add(new SqlOutParameter("out_last_name", Types.VARCHAR));

Také k dispozici: Unified diff