-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor Steuerinformationen für Optionsmenü #190
base: sprint
Are you sure you want to change the base?
Changes from 44 commits
0ebd30d
c00c0d7
f8efe6d
192369f
c55eb6e
721f96d
c6cf841
6a39ff5
9267175
5188c2a
6d3f495
71ac115
d4b9fb7
d8e7572
dbd8e45
d0674ff
1cd4c93
712d5c8
47e0aa4
8bc3380
e262195
e77e4b5
d5a1497
1a9f149
cc09b40
c229488
ae4c0cf
4a579d5
64618ec
f88e168
22525cd
e68e549
4ff113a
5dde7e6
cd63f58
9d662b7
2ed1c12
2f14cfd
933e00f
4bd1862
4363135
e29d3bd
644dd22
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package de.muenchen.dave.controller; | ||
|
||
import de.muenchen.dave.domain.dtos.OptionsmenueSettingsDTO; | ||
import de.muenchen.dave.services.OptionsmenueSettingsService; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.http.MediaType; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import java.util.List; | ||
|
||
@RestController | ||
@RequestMapping("/settings-optionsmenue") | ||
@RequiredArgsConstructor | ||
public class OptionsmenueSettingsController { | ||
|
||
private final OptionsmenueSettingsService optionsmenueSettingsService; | ||
|
||
@GetMapping(value = "/all", produces = MediaType.APPLICATION_JSON_VALUE) | ||
public ResponseEntity<List<OptionsmenueSettingsDTO>> getAllOptionsmenueSettings() { | ||
final var settings = optionsmenueSettingsService.getAllOptionsmenueSettings(); | ||
return ResponseEntity.ok(settings); | ||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
package de.muenchen.dave.domain; | ||
|
||
import de.muenchen.dave.domain.enums.Fahrzeugklasse; | ||
import de.muenchen.dave.domain.enums.ZaehldatenIntervall; | ||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.EnumType; | ||
import jakarta.persistence.Enumerated; | ||
import jakarta.persistence.Table; | ||
import jakarta.persistence.UniqueConstraint; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.ToString; | ||
import org.hibernate.annotations.JdbcTypeCode; | ||
import org.hibernate.type.SqlTypes; | ||
|
||
import java.util.List; | ||
|
||
@Entity | ||
@Table( | ||
uniqueConstraints = { | ||
@UniqueConstraint( | ||
name = "unique_optionsmenuesettings_fahrzeugklasse_intervall", | ||
columnNames = { "fahrzeugklasse", "intervall" } | ||
) | ||
} | ||
) | ||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
@ToString(callSuper = true) | ||
public class OptionsmenueSettings extends BaseEntity { | ||
|
||
@Column | ||
@Enumerated(EnumType.STRING) | ||
private Fahrzeugklasse fahrzeugklasse; | ||
|
||
@Column | ||
@Enumerated(EnumType.STRING) | ||
private ZaehldatenIntervall intervall; | ||
|
||
@Column | ||
@JdbcTypeCode(SqlTypes.JSON) | ||
@Enumerated(EnumType.STRING) | ||
private List<ZaehldatenIntervall> kraftfahrzeugverkehrChoosableIntervals; | ||
|
||
@Column | ||
@JdbcTypeCode(SqlTypes.JSON) | ||
@Enumerated(EnumType.STRING) | ||
private List<ZaehldatenIntervall> schwerverkehrChoosableIntervals; | ||
|
||
@Column | ||
@JdbcTypeCode(SqlTypes.JSON) | ||
@Enumerated(EnumType.STRING) | ||
private List<ZaehldatenIntervall> gueterverkehrChoosableIntervals; | ||
|
||
@Column | ||
@JdbcTypeCode(SqlTypes.JSON) | ||
@Enumerated(EnumType.STRING) | ||
private List<ZaehldatenIntervall> schwerverkehrsanteilProzentChoosableIntervals; | ||
|
||
@Column | ||
@JdbcTypeCode(SqlTypes.JSON) | ||
@Enumerated(EnumType.STRING) | ||
private List<ZaehldatenIntervall> gueterverkehrsanteilProzentChoosableIntervals; | ||
|
||
@Column | ||
@JdbcTypeCode(SqlTypes.JSON) | ||
@Enumerated(EnumType.STRING) | ||
private List<ZaehldatenIntervall> radverkehrChoosableIntervals; | ||
|
||
@Column | ||
@JdbcTypeCode(SqlTypes.JSON) | ||
@Enumerated(EnumType.STRING) | ||
private List<ZaehldatenIntervall> fussverkehrChoosableIntervals; | ||
|
||
@Column | ||
@JdbcTypeCode(SqlTypes.JSON) | ||
@Enumerated(EnumType.STRING) | ||
private List<ZaehldatenIntervall> lastkraftwagenChoosableIntervals; | ||
|
||
@Column | ||
@JdbcTypeCode(SqlTypes.JSON) | ||
@Enumerated(EnumType.STRING) | ||
private List<ZaehldatenIntervall> lastzuegeChoosableIntervals; | ||
|
||
@Column | ||
@JdbcTypeCode(SqlTypes.JSON) | ||
@Enumerated(EnumType.STRING) | ||
private List<ZaehldatenIntervall> busseChoosableIntervals; | ||
|
||
@Column | ||
@JdbcTypeCode(SqlTypes.JSON) | ||
@Enumerated(EnumType.STRING) | ||
private List<ZaehldatenIntervall> kraftraederChoosableIntervals; | ||
|
||
@Column | ||
@JdbcTypeCode(SqlTypes.JSON) | ||
@Enumerated(EnumType.STRING) | ||
private List<ZaehldatenIntervall> personenkraftwagenChoosableIntervals; | ||
|
||
@Column | ||
@JdbcTypeCode(SqlTypes.JSON) | ||
@Enumerated(EnumType.STRING) | ||
private List<ZaehldatenIntervall> lieferwagenChoosableIntervals; | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package de.muenchen.dave.domain.dtos; | ||
|
||
import de.muenchen.dave.domain.enums.Fahrzeugklasse; | ||
import de.muenchen.dave.domain.enums.ZaehldatenIntervall; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
public class OptionsmenueSettingsDTO { | ||
|
||
private Fahrzeugklasse fahrzeugklasse; | ||
|
||
private ZaehldatenIntervall intervall; | ||
|
||
private List<ZaehldatenIntervall> kraftfahrzeugverkehrChoosableIntervals; | ||
|
||
private List<ZaehldatenIntervall> schwerverkehrChoosableIntervals; | ||
|
||
private List<ZaehldatenIntervall> gueterverkehrChoosableIntervals; | ||
|
||
private List<ZaehldatenIntervall> schwerverkehrsanteilProzentChoosableIntervals; | ||
|
||
private List<ZaehldatenIntervall> gueterverkehrsanteilProzentChoosableIntervals; | ||
|
||
private List<ZaehldatenIntervall> radverkehrChoosableIntervals; | ||
|
||
private List<ZaehldatenIntervall> fussverkehrChoosableIntervals; | ||
|
||
private List<ZaehldatenIntervall> lastkraftwagenChoosableIntervals; | ||
|
||
private List<ZaehldatenIntervall> lastzuegeChoosableIntervals; | ||
|
||
private List<ZaehldatenIntervall> busseChoosableIntervals; | ||
|
||
private List<ZaehldatenIntervall> kraftraederChoosableIntervals; | ||
|
||
private List<ZaehldatenIntervall> personenkraftwagenChoosableIntervals; | ||
|
||
private List<ZaehldatenIntervall> lieferwagenChoosableIntervals; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
package de.muenchen.dave.domain.dtos.messstelle; | ||
|
||
import de.muenchen.dave.domain.enums.Fahrzeugklasse; | ||
import lombok.Data; | ||
|
||
import java.io.Serializable; | ||
|
@@ -21,7 +22,7 @@ public class EditMessstelleDTO implements Serializable { | |
private String abbaudatum; | ||
private String datumLetztePlausibleMessung; | ||
|
||
private String fahrzeugKlassen; | ||
private Fahrzeugklasse fahrzeugKlassen; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Im Singular benennen |
||
private String detektierteVerkehrsarten; | ||
private String hersteller; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
package de.muenchen.dave.domain.dtos.messstelle; | ||
|
||
import de.muenchen.dave.domain.enums.Fahrzeugklasse; | ||
import de.muenchen.dave.domain.enums.ZaehldatenIntervall; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
@@ -12,6 +13,6 @@ public class ReadMessfaehigkeitDTO implements Serializable { | |
|
||
private String gueltigBis; | ||
private String gueltigAb; | ||
private String fahrzeugklassen; | ||
private Fahrzeugklasse fahrzeugklassen; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Im Singular benennen There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
private ZaehldatenIntervall intervall; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Könnten wir hier gleich noch in der URL einfließen lassen, dass es sich nur um die Messstellen handelt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Angepasst nach
/messstelle/all