also respecting day slots
This commit is contained in:
@ -7,7 +7,7 @@ import java.util.List;
|
||||
|
||||
import org.jooq.DSLContext;
|
||||
import org.jooq.DeleteConditionStep;
|
||||
import org.jooq.InsertValuesStep12;
|
||||
import org.jooq.InsertValuesStep17;
|
||||
import org.jooq.SelectConditionStep;
|
||||
import org.jooq.SelectSeekStep1;
|
||||
import org.jooq.UpdateConditionStep;
|
||||
@ -42,7 +42,7 @@ public class RegistrationRepository {
|
||||
public void save(@Valid RegistrationBean bean, String registrator) {
|
||||
jooq.transaction(t -> {
|
||||
if (bean.getPkRegistration() == null) {
|
||||
InsertValuesStep12<TRegistrationRecord, EnumCamp, String, String, String, EnumSex, Boolean, String, Integer, Boolean, String, Boolean, Integer> sql = DSL.using(t)
|
||||
InsertValuesStep17<TRegistrationRecord, EnumCamp, String, String, String, EnumSex, Boolean, String, Integer, Boolean, String, Boolean, Integer, Boolean, Boolean, Boolean, Boolean, Boolean> sql = DSL.using(t)
|
||||
// @formatter:off
|
||||
.insertInto(T_REGISTRATION,
|
||||
T_REGISTRATION.CAMP,
|
||||
@ -56,10 +56,15 @@ public class RegistrationRepository {
|
||||
T_REGISTRATION.WANT_PLACE_IN_CAR,
|
||||
T_REGISTRATION.DISEASES,
|
||||
T_REGISTRATION.REQUIRE_PAYMENT,
|
||||
T_REGISTRATION.FK_AGE)
|
||||
T_REGISTRATION.FK_AGE,
|
||||
T_REGISTRATION.DAY0,
|
||||
T_REGISTRATION.DAY1,
|
||||
T_REGISTRATION.DAY2,
|
||||
T_REGISTRATION.DAY3,
|
||||
T_REGISTRATION.DAY4)
|
||||
.values(EnumCamp.Gemeindefreizeit_2025, registrator, bean.getForename(), bean.getSurname(), EnumSex.lookupLiteral(bean.getSex()),
|
||||
bean.getBarrierFree(), bean.getNutrition(), bean.getDriverProvidePlaces(), bean.getWantPlaceInCar(), bean.getDiseases(), bean.getRequirePayment(),
|
||||
bean.getFkAge());
|
||||
bean.getFkAge(), bean.getDay0(), bean.getDay1(), bean.getDay2(), bean.getDay3(), bean.getDay4());
|
||||
// @formatter:on
|
||||
Main.LOGGER.trace(sql);
|
||||
sql.execute();
|
||||
@ -78,6 +83,11 @@ public class RegistrationRepository {
|
||||
.set(T_REGISTRATION.DISEASES, bean.getDiseases())
|
||||
.set(T_REGISTRATION.REQUIRE_PAYMENT, bean.getRequirePayment())
|
||||
.set(T_REGISTRATION.FK_AGE, bean.getFkAge())
|
||||
.set(T_REGISTRATION.DAY0, bean.getDay0())
|
||||
.set(T_REGISTRATION.DAY1, bean.getDay1())
|
||||
.set(T_REGISTRATION.DAY2, bean.getDay2())
|
||||
.set(T_REGISTRATION.DAY3, bean.getDay3())
|
||||
.set(T_REGISTRATION.DAY4, bean.getDay4())
|
||||
.where(T_REGISTRATION.PK_REGISTRATION.eq(bean.getPkRegistration()));
|
||||
// @formatter:on
|
||||
Main.LOGGER.trace(sql);
|
||||
|
@ -28,7 +28,6 @@ public class RegistrationBean implements Serializable {
|
||||
private Boolean day2;
|
||||
private Boolean day3;
|
||||
private Boolean day4;
|
||||
private Boolean day5;
|
||||
|
||||
private String nutrition;
|
||||
private Integer driverProvidePlaces;
|
||||
@ -46,7 +45,6 @@ public class RegistrationBean implements Serializable {
|
||||
bean.setDay2(true);
|
||||
bean.setDay3(true);
|
||||
bean.setDay4(true);
|
||||
bean.setDay5(true);
|
||||
return bean;
|
||||
}
|
||||
|
||||
@ -273,18 +271,4 @@ public class RegistrationBean implements Serializable {
|
||||
public void setDay4(Boolean day4) {
|
||||
this.day4 = day4;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the day5
|
||||
*/
|
||||
public Boolean getDay5() {
|
||||
return day5;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param day5 the day5 to set
|
||||
*/
|
||||
public void setDay5(Boolean day5) {
|
||||
this.day5 = day5;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user