- Refactoring: put all models in subdirectories under model:
* model/db -> entities * model/excel -> excel parsing * model/calulation -> for logistic cost calculation * model/azuremaps -> geocding - added endpoints & service & repo to manage external apps. - added jwt issuer service & oauth/token endpoint for external apps.
This commit is contained in:
parent
23ee5fad79
commit
a76de8e53c
194 changed files with 1182 additions and 725 deletions
22
pom.xml
22
pom.xml
|
|
@ -65,6 +65,10 @@
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-oauth2-client</artifactId>
|
<artifactId>spring-boot-starter-oauth2-client</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-oauth2-resource-server</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-validation</artifactId>
|
<artifactId>spring-boot-starter-validation</artifactId>
|
||||||
|
|
@ -127,6 +131,24 @@
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.jsonwebtoken</groupId>
|
||||||
|
<artifactId>jjwt-api</artifactId>
|
||||||
|
<version>0.12.5</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.jsonwebtoken</groupId>
|
||||||
|
<artifactId>jjwt-impl</artifactId>
|
||||||
|
<version>0.12.5</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.jsonwebtoken</groupId>
|
||||||
|
<artifactId>jjwt-jackson</artifactId>
|
||||||
|
<version>0.12.5</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,6 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
//todo reset the store instead.
|
|
||||||
this.reportSearchStore.reset();
|
this.reportSearchStore.reset();
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
package de.avatic.lcc.calculationmodel;
|
|
||||||
|
|
||||||
import de.avatic.lcc.model.calculations.CalculationJobRouteSection;
|
|
||||||
import de.avatic.lcc.model.premises.route.RouteSection;
|
|
||||||
|
|
||||||
public record SectionInfo(RouteSection section, CalculationJobRouteSection result, ContainerCalculationResult containerResult) {
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package de.avatic.lcc.config;
|
package de.avatic.lcc.config;
|
||||||
|
|
||||||
|
|
||||||
import de.avatic.lcc.model.users.User;
|
import de.avatic.lcc.model.db.users.User;
|
||||||
import de.avatic.lcc.repositories.users.UserRepository;
|
import de.avatic.lcc.repositories.users.UserRepository;
|
||||||
import jakarta.servlet.FilterChain;
|
import jakarta.servlet.FilterChain;
|
||||||
import jakarta.servlet.ServletException;
|
import jakarta.servlet.ServletException;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package de.avatic.lcc.config;
|
package de.avatic.lcc.config;
|
||||||
|
|
||||||
import de.avatic.lcc.model.users.Group;
|
import de.avatic.lcc.model.db.users.Group;
|
||||||
import de.avatic.lcc.model.users.User;
|
import de.avatic.lcc.model.db.users.User;
|
||||||
import org.springframework.security.core.GrantedAuthority;
|
import org.springframework.security.core.GrantedAuthority;
|
||||||
import org.springframework.security.oauth2.core.oidc.OidcIdToken;
|
import org.springframework.security.oauth2.core.oidc.OidcIdToken;
|
||||||
import org.springframework.security.oauth2.core.oidc.OidcUserInfo;
|
import org.springframework.security.oauth2.core.oidc.OidcUserInfo;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
package de.avatic.lcc.config;
|
package de.avatic.lcc.config;
|
||||||
|
|
||||||
import de.avatic.lcc.model.users.User;
|
import de.avatic.lcc.model.db.users.User;
|
||||||
import de.avatic.lcc.repositories.users.GroupRepository;
|
import de.avatic.lcc.repositories.users.GroupRepository;
|
||||||
|
import de.avatic.lcc.repositories.users.JwtTokenService;
|
||||||
import de.avatic.lcc.repositories.users.UserRepository;
|
import de.avatic.lcc.repositories.users.UserRepository;
|
||||||
import jakarta.servlet.FilterChain;
|
import jakarta.servlet.FilterChain;
|
||||||
import jakarta.servlet.ServletException;
|
import jakarta.servlet.ServletException;
|
||||||
|
|
@ -11,20 +12,28 @@ import org.jetbrains.annotations.NotNull;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.Profile;
|
import org.springframework.context.annotation.Profile;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity;
|
import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity;
|
||||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||||
import org.springframework.security.core.GrantedAuthority;
|
import org.springframework.security.core.GrantedAuthority;
|
||||||
import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
||||||
|
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||||
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||||
import org.springframework.security.oauth2.client.oidc.userinfo.OidcUserRequest;
|
import org.springframework.security.oauth2.client.oidc.userinfo.OidcUserRequest;
|
||||||
import org.springframework.security.oauth2.client.oidc.userinfo.OidcUserService;
|
import org.springframework.security.oauth2.client.oidc.userinfo.OidcUserService;
|
||||||
import org.springframework.security.oauth2.client.userinfo.OAuth2UserService;
|
import org.springframework.security.oauth2.client.userinfo.OAuth2UserService;
|
||||||
import org.springframework.security.oauth2.core.oidc.user.OidcUser;
|
import org.springframework.security.oauth2.core.oidc.user.OidcUser;
|
||||||
|
import org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationConverter;
|
||||||
|
import org.springframework.security.oauth2.server.resource.authentication.JwtGrantedAuthoritiesConverter;
|
||||||
|
import org.springframework.security.oauth2.server.resource.web.authentication.BearerTokenAuthenticationFilter;
|
||||||
import org.springframework.security.web.SecurityFilterChain;
|
import org.springframework.security.web.SecurityFilterChain;
|
||||||
|
import org.springframework.security.web.authentication.HttpStatusEntryPoint;
|
||||||
import org.springframework.security.web.authentication.www.BasicAuthenticationFilter;
|
import org.springframework.security.web.authentication.www.BasicAuthenticationFilter;
|
||||||
import org.springframework.security.web.csrf.CookieCsrfTokenRepository;
|
import org.springframework.security.web.csrf.CookieCsrfTokenRepository;
|
||||||
import org.springframework.security.web.csrf.CsrfToken;
|
import org.springframework.security.web.csrf.CsrfToken;
|
||||||
import org.springframework.security.web.csrf.CsrfTokenRequestAttributeHandler;
|
import org.springframework.security.web.csrf.CsrfTokenRequestAttributeHandler;
|
||||||
import org.springframework.security.web.csrf.CsrfTokenRequestHandler;
|
import org.springframework.security.web.csrf.CsrfTokenRequestHandler;
|
||||||
|
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
import org.springframework.web.filter.OncePerRequestFilter;
|
import org.springframework.web.filter.OncePerRequestFilter;
|
||||||
|
|
||||||
|
|
@ -39,10 +48,11 @@ import java.util.function.Supplier;
|
||||||
public class SecurityConfig {
|
public class SecurityConfig {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@Profile("!dev & !test & !dev_id") // Only active when NOT in dev profile
|
@Profile("!dev & !test") // Only active when NOT in dev profile
|
||||||
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
|
public SecurityFilterChain securityFilterChain(HttpSecurity http, JwtTokenService jwtTokenService) throws Exception {
|
||||||
http
|
http
|
||||||
.authorizeHttpRequests(auth -> auth
|
.authorizeHttpRequests(auth -> auth
|
||||||
|
.requestMatchers("/oauth2/token").permitAll()
|
||||||
.requestMatchers("/api/**").authenticated()
|
.requestMatchers("/api/**").authenticated()
|
||||||
.requestMatchers("/api/dev/**").denyAll()
|
.requestMatchers("/api/dev/**").denyAll()
|
||||||
.anyRequest().authenticated()
|
.anyRequest().authenticated()
|
||||||
|
|
@ -51,15 +61,47 @@ public class SecurityConfig {
|
||||||
.defaultSuccessUrl("/", true)
|
.defaultSuccessUrl("/", true)
|
||||||
|
|
||||||
)
|
)
|
||||||
|
.oauth2ResourceServer(oauth2 -> oauth2
|
||||||
|
.jwt(jwt -> jwt
|
||||||
|
.jwtAuthenticationConverter(jwtAuthenticationConverter())
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.exceptionHandling(ex -> ex
|
||||||
|
.defaultAuthenticationEntryPointFor(
|
||||||
|
new HttpStatusEntryPoint(HttpStatus.UNAUTHORIZED),
|
||||||
|
new AntPathRequestMatcher("/api/**")
|
||||||
|
)
|
||||||
|
)
|
||||||
.csrf(csrf -> csrf
|
.csrf(csrf -> csrf
|
||||||
.csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse())
|
.csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse())
|
||||||
.csrfTokenRequestHandler(new LccCsrfTokenRequestHandler())
|
.csrfTokenRequestHandler(new LccCsrfTokenRequestHandler())
|
||||||
)
|
)
|
||||||
.addFilterAfter(new CsrfCookieFilter(), BasicAuthenticationFilter.class);
|
.addFilterAfter(new CsrfCookieFilter(), BasicAuthenticationFilter.class)
|
||||||
|
.addFilterBefore(
|
||||||
|
new SelfIssuedJwtFilter(jwtTokenService),
|
||||||
|
BearerTokenAuthenticationFilter.class
|
||||||
|
);
|
||||||
|
|
||||||
return http.build();
|
return http.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public JwtAuthenticationConverter jwtAuthenticationConverter() {
|
||||||
|
// Für Entra ID Tokens
|
||||||
|
JwtGrantedAuthoritiesConverter converter = new JwtGrantedAuthoritiesConverter();
|
||||||
|
converter.setAuthoritiesClaimName("scp");
|
||||||
|
converter.setAuthorityPrefix("SCOPE_");
|
||||||
|
|
||||||
|
JwtAuthenticationConverter jwtConverter = new JwtAuthenticationConverter();
|
||||||
|
jwtConverter.setJwtGrantedAuthoritiesConverter(converter);
|
||||||
|
return jwtConverter;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public PasswordEncoder passwordEncoder() {
|
||||||
|
return new BCryptPasswordEncoder();
|
||||||
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@Profile("dev | test")
|
@Profile("dev | test")
|
||||||
public SecurityFilterChain devSecurityFilterChain(HttpSecurity http, UserRepository userRepository) throws Exception {
|
public SecurityFilterChain devSecurityFilterChain(HttpSecurity http, UserRepository userRepository) throws Exception {
|
||||||
|
|
|
||||||
83
src/main/java/de/avatic/lcc/config/SelfIssuedJwtFilter.java
Normal file
83
src/main/java/de/avatic/lcc/config/SelfIssuedJwtFilter.java
Normal file
|
|
@ -0,0 +1,83 @@
|
||||||
|
package de.avatic.lcc.config;
|
||||||
|
import de.avatic.lcc.repositories.users.JwtTokenService;
|
||||||
|
import jakarta.servlet.FilterChain;
|
||||||
|
import jakarta.servlet.ServletException;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||||
|
import org.springframework.security.core.GrantedAuthority;
|
||||||
|
import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
||||||
|
import org.springframework.security.core.context.SecurityContextHolder;
|
||||||
|
import org.springframework.web.filter.OncePerRequestFilter;
|
||||||
|
import io.jsonwebtoken.Claims;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class SelfIssuedJwtFilter extends OncePerRequestFilter {
|
||||||
|
|
||||||
|
private final JwtTokenService jwtTokenService;
|
||||||
|
|
||||||
|
public SelfIssuedJwtFilter(JwtTokenService jwtTokenService) {
|
||||||
|
this.jwtTokenService = jwtTokenService;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void doFilterInternal(@NotNull HttpServletRequest request,
|
||||||
|
@NotNull HttpServletResponse response,
|
||||||
|
@NotNull FilterChain filterChain)
|
||||||
|
throws ServletException, IOException {
|
||||||
|
|
||||||
|
String token = extractToken(request);
|
||||||
|
|
||||||
|
if (token != null && isSelfIssuedToken(token)) {
|
||||||
|
try {
|
||||||
|
Claims claims = jwtTokenService.validateToken(token);
|
||||||
|
|
||||||
|
List<GrantedAuthority> authorities = new ArrayList<>();
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
List<String> groups = claims.get("groups", List.class);
|
||||||
|
if (groups != null) {
|
||||||
|
groups.forEach(role ->
|
||||||
|
authorities.add(new SimpleGrantedAuthority("ROLE_" + role))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
UsernamePasswordAuthenticationToken authentication =
|
||||||
|
new UsernamePasswordAuthenticationToken(
|
||||||
|
claims.getSubject(),
|
||||||
|
null,
|
||||||
|
authorities
|
||||||
|
);
|
||||||
|
|
||||||
|
SecurityContextHolder.getContext().setAuthentication(authentication);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.debug("Self-issued token validation failed", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
filterChain.doFilter(request, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
private String extractToken(HttpServletRequest request) {
|
||||||
|
String header = request.getHeader("Authorization");
|
||||||
|
if (header != null && header.startsWith("Bearer ")) {
|
||||||
|
return header.substring(7);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isSelfIssuedToken(String token) {
|
||||||
|
try {
|
||||||
|
Claims claims = jwtTokenService.validateToken(token);
|
||||||
|
String tokenType = claims.get("token_type", String.class);
|
||||||
|
return "ext_app".equals(tokenType);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -17,7 +17,6 @@ import java.util.Optional;
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/api/materials")
|
@RequestMapping("/api/materials")
|
||||||
@Validated
|
@Validated
|
||||||
@PreAuthorize("hasRole('SUPER')")
|
|
||||||
public class MaterialController {
|
public class MaterialController {
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import de.avatic.lcc.dto.configuration.nodes.view.NodeDetailDTO;
|
||||||
import de.avatic.lcc.dto.configuration.nodes.update.NodeUpdateDTO;
|
import de.avatic.lcc.dto.configuration.nodes.update.NodeUpdateDTO;
|
||||||
import de.avatic.lcc.dto.generic.NodeType;
|
import de.avatic.lcc.dto.generic.NodeType;
|
||||||
import de.avatic.lcc.dto.configuration.nodes.userNodes.AddUserNodeDTO;
|
import de.avatic.lcc.dto.configuration.nodes.userNodes.AddUserNodeDTO;
|
||||||
import de.avatic.lcc.model.nodes.Location;
|
|
||||||
import de.avatic.lcc.repositories.pagination.SearchQueryResult;
|
import de.avatic.lcc.repositories.pagination.SearchQueryResult;
|
||||||
import de.avatic.lcc.service.api.GeoApiService;
|
import de.avatic.lcc.service.api.GeoApiService;
|
||||||
import de.avatic.lcc.service.access.NodeService;
|
import de.avatic.lcc.service.access.NodeService;
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,11 @@ package de.avatic.lcc.controller.configuration;
|
||||||
import de.avatic.lcc.dto.generic.PropertyDTO;
|
import de.avatic.lcc.dto.generic.PropertyDTO;
|
||||||
import de.avatic.lcc.dto.generic.ValidityPeriodDTO;
|
import de.avatic.lcc.dto.generic.ValidityPeriodDTO;
|
||||||
import de.avatic.lcc.dto.configuration.properties.SetPropertyDTO;
|
import de.avatic.lcc.dto.configuration.properties.SetPropertyDTO;
|
||||||
import de.avatic.lcc.model.country.IsoCode;
|
import de.avatic.lcc.model.db.country.IsoCode;
|
||||||
import de.avatic.lcc.service.access.CountryService;
|
import de.avatic.lcc.service.access.CountryService;
|
||||||
import de.avatic.lcc.service.access.PropertyService;
|
import de.avatic.lcc.service.access.PropertyService;
|
||||||
import de.avatic.lcc.service.configuration.PropertyApprovalService;
|
import de.avatic.lcc.service.configuration.PropertyApprovalService;
|
||||||
import de.avatic.lcc.util.exception.badrequest.NotFoundException;
|
import de.avatic.lcc.util.exception.badrequest.NotFoundException;
|
||||||
import jakarta.annotation.security.RolesAllowed;
|
|
||||||
import jakarta.validation.constraints.Min;
|
import jakarta.validation.constraints.Min;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
package de.avatic.lcc.controller.token;
|
||||||
|
|
||||||
|
import de.avatic.lcc.dto.users.AppDTO;
|
||||||
|
import de.avatic.lcc.model.db.users.App;
|
||||||
|
import de.avatic.lcc.model.db.users.Group;
|
||||||
|
import de.avatic.lcc.repositories.users.JwtTokenService;
|
||||||
|
import de.avatic.lcc.service.apps.AppsService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/oauth2/token")
|
||||||
|
public class TokenController {
|
||||||
|
|
||||||
|
private final JwtTokenService jwtTokenService;
|
||||||
|
|
||||||
|
private final AppsService appService;
|
||||||
|
|
||||||
|
public TokenController(JwtTokenService jwtTokenService, AppsService appService) {
|
||||||
|
this.jwtTokenService = jwtTokenService;
|
||||||
|
this.appService = appService;
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping({"/", ""})
|
||||||
|
public ResponseEntity<?> issueToken(
|
||||||
|
@RequestParam("grant_type") String grantType,
|
||||||
|
@RequestParam("client_id") String clientId,
|
||||||
|
@RequestParam("client_secret") String clientSecret,
|
||||||
|
@RequestParam(value = "scope", required = false) String scope) {
|
||||||
|
|
||||||
|
if (!"client_credentials".equals(grantType)) {
|
||||||
|
return ResponseEntity.badRequest()
|
||||||
|
.body(Map.of("error", "unsupported_grant_type"));
|
||||||
|
}
|
||||||
|
|
||||||
|
App app = appService.validateApp(clientId, clientSecret);
|
||||||
|
if (app == null) {
|
||||||
|
return ResponseEntity.status(HttpStatus.UNAUTHORIZED)
|
||||||
|
.body(Map.of("error", "invalid_client"));
|
||||||
|
}
|
||||||
|
|
||||||
|
String token = jwtTokenService.createApplicationToken(
|
||||||
|
clientId,
|
||||||
|
app.getGroups().stream().map(Group::getName).toList()
|
||||||
|
);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(Map.of(
|
||||||
|
"access_token", token,
|
||||||
|
"token_type", "Bearer",
|
||||||
|
"expires_in", 3600
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package de.avatic.lcc.dto.calculation;
|
package de.avatic.lcc.dto.calculation;
|
||||||
|
|
||||||
import de.avatic.lcc.model.calculations.CalculationJobState;
|
import de.avatic.lcc.model.db.calculations.CalculationJobState;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ package de.avatic.lcc.dto.calculation;
|
||||||
|
|
||||||
import de.avatic.lcc.dto.generic.MaterialDTO;
|
import de.avatic.lcc.dto.generic.MaterialDTO;
|
||||||
import de.avatic.lcc.dto.generic.NodeDTO;
|
import de.avatic.lcc.dto.generic.NodeDTO;
|
||||||
import de.avatic.lcc.model.users.User;
|
import de.avatic.lcc.model.db.users.User;
|
||||||
|
|
||||||
public class PremiseDTO {
|
public class PremiseDTO {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
package de.avatic.lcc.dto.configuration.apps;
|
||||||
|
|
||||||
|
import de.avatic.lcc.dto.users.AppDTO;
|
||||||
|
import de.avatic.lcc.repositories.users.AppRepository;
|
||||||
|
import de.avatic.lcc.service.apps.AppsService;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/apps")
|
||||||
|
public class AppsController {
|
||||||
|
|
||||||
|
|
||||||
|
private final AppsService appsService;
|
||||||
|
|
||||||
|
public AppsController(AppsService appsService) {
|
||||||
|
|
||||||
|
this.appsService = appsService;
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping({"", "/"})
|
||||||
|
public ResponseEntity<List<AppDTO>> listApps() {
|
||||||
|
return ResponseEntity.ok(appsService.listApps());
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping({"", "/"})
|
||||||
|
public ResponseEntity<AppDTO> updateApp(AppDTO dto) {
|
||||||
|
return ResponseEntity.ok(appsService.updateApp(dto));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
package de.avatic.lcc.dto.generic;
|
package de.avatic.lcc.dto.generic;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import de.avatic.lcc.model.packaging.PackagingType;
|
import de.avatic.lcc.model.db.packaging.PackagingType;
|
||||||
import de.avatic.lcc.model.utils.DimensionUnit;
|
import de.avatic.lcc.model.db.utils.DimensionUnit;
|
||||||
import de.avatic.lcc.model.utils.WeightUnit;
|
import de.avatic.lcc.model.db.utils.WeightUnit;
|
||||||
|
|
||||||
public class DimensionDTO {
|
public class DimensionDTO {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package de.avatic.lcc.dto.generic;
|
package de.avatic.lcc.dto.generic;
|
||||||
|
|
||||||
import de.avatic.lcc.model.packaging.PackagingDimension;
|
import de.avatic.lcc.model.db.packaging.PackagingDimension;
|
||||||
|
|
||||||
public enum PalletType {
|
public enum PalletType {
|
||||||
INDUSTRIAL_PALLET(1200,1000), EURO_PALLET(1200,800);
|
INDUSTRIAL_PALLET(1200,1000), EURO_PALLET(1200,800);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package de.avatic.lcc.dto.generic;
|
package de.avatic.lcc.dto.generic;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import de.avatic.lcc.model.rates.ValidityPeriodState;
|
import de.avatic.lcc.model.db.rates.ValidityPeriodState;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ package de.avatic.lcc.dto.report;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import de.avatic.lcc.dto.generic.ContainerType;
|
import de.avatic.lcc.dto.generic.ContainerType;
|
||||||
import de.avatic.lcc.dto.generic.NodeDTO;
|
import de.avatic.lcc.dto.generic.NodeDTO;
|
||||||
import de.avatic.lcc.model.utils.DimensionUnit;
|
import de.avatic.lcc.model.db.utils.DimensionUnit;
|
||||||
import de.avatic.lcc.model.utils.WeightUnit;
|
import de.avatic.lcc.model.db.utils.WeightUnit;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
|
||||||
64
src/main/java/de/avatic/lcc/dto/users/AppDTO.java
Normal file
64
src/main/java/de/avatic/lcc/dto/users/AppDTO.java
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
package de.avatic.lcc.dto.users;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class AppDTO {
|
||||||
|
|
||||||
|
@JsonProperty("id")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@JsonProperty("name")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@JsonProperty("client_id")
|
||||||
|
private String clientId;
|
||||||
|
|
||||||
|
@JsonProperty("client_secret")
|
||||||
|
private String clientSecret;
|
||||||
|
|
||||||
|
@JsonProperty("groups")
|
||||||
|
private List<String> groups;
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientId() {
|
||||||
|
return clientId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientId(String clientId) {
|
||||||
|
this.clientId = clientId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientSecret() {
|
||||||
|
return clientSecret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientSecret(String clientSecret) {
|
||||||
|
this.clientSecret = clientSecret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getGroups() {
|
||||||
|
return groups;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGroups(List<String> groups) {
|
||||||
|
this.groups = groups;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package de.avatic.lcc.model.azuremaps.geocoding;
|
package de.avatic.lcc.model.azuremaps.geocoding;
|
||||||
|
|
||||||
import de.avatic.lcc.model.nodes.Location;
|
import de.avatic.lcc.model.db.nodes.Location;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.calculationmodel;
|
package de.avatic.lcc.model.calculation;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.calculationmodel;
|
package de.avatic.lcc.model.calculation;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
package de.avatic.lcc.calculationmodel;
|
package de.avatic.lcc.model.calculation;
|
||||||
|
|
||||||
import de.avatic.lcc.dto.generic.ContainerType;
|
import de.avatic.lcc.dto.generic.ContainerType;
|
||||||
import de.avatic.lcc.model.packaging.PackagingDimension;
|
import de.avatic.lcc.model.db.packaging.PackagingDimension;
|
||||||
import de.avatic.lcc.model.utils.DimensionUnit;
|
import de.avatic.lcc.model.db.utils.DimensionUnit;
|
||||||
import de.avatic.lcc.model.utils.WeightUnit;
|
import de.avatic.lcc.model.db.utils.WeightUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the result of a container calculation process, including details
|
* Represents the result of a container calculation process, including details
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.calculationmodel;
|
package de.avatic.lcc.model.calculation;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package de.avatic.lcc.calculationmodel;
|
package de.avatic.lcc.model.calculation;
|
||||||
|
|
||||||
import de.avatic.lcc.model.calculations.CalculationJobDestination;
|
import de.avatic.lcc.model.db.calculations.CalculationJobDestination;
|
||||||
import de.avatic.lcc.model.premises.route.Destination;
|
import de.avatic.lcc.model.db.premises.route.Destination;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package de.avatic.lcc.calculationmodel;
|
package de.avatic.lcc.model.calculation;
|
||||||
|
|
||||||
import de.avatic.lcc.model.packaging.LoadCarrierType;
|
import de.avatic.lcc.model.db.packaging.LoadCarrierType;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.calculationmodel;
|
package de.avatic.lcc.model.calculation;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
package de.avatic.lcc.model.calculation;
|
||||||
|
|
||||||
|
import de.avatic.lcc.model.db.calculations.CalculationJobRouteSection;
|
||||||
|
import de.avatic.lcc.model.db.premises.route.RouteSection;
|
||||||
|
|
||||||
|
public record SectionInfo(RouteSection section, CalculationJobRouteSection result, ContainerCalculationResult containerResult) {
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model;
|
package de.avatic.lcc.model.db;
|
||||||
|
|
||||||
public record ValidityTuple(Integer periodId, Integer propertySetId) {
|
public record ValidityTuple(Integer periodId, Integer propertySetId) {
|
||||||
}
|
}
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
package de.avatic.lcc.model.calculations;
|
package de.avatic.lcc.model.db.calculations;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.OffsetDateTime;
|
|
||||||
|
|
||||||
|
|
||||||
public class CalculationJob {
|
public class CalculationJob {
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.calculations;
|
package de.avatic.lcc.model.db.calculations;
|
||||||
|
|
||||||
import de.avatic.lcc.dto.generic.ContainerType;
|
import de.avatic.lcc.dto.generic.ContainerType;
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.calculations;
|
package de.avatic.lcc.model.db.calculations;
|
||||||
|
|
||||||
import de.avatic.lcc.dto.generic.RateType;
|
import de.avatic.lcc.dto.generic.RateType;
|
||||||
import de.avatic.lcc.dto.generic.TransportType;
|
import de.avatic.lcc.dto.generic.TransportType;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.calculations;
|
package de.avatic.lcc.model.db.calculations;
|
||||||
|
|
||||||
public enum CalculationJobState {
|
public enum CalculationJobState {
|
||||||
CREATED, SCHEDULED, VALID, INVALIDATED, EXCEPTION
|
CREATED, SCHEDULED, VALID, INVALIDATED, EXCEPTION
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.calculations;
|
package de.avatic.lcc.model.db.calculations;
|
||||||
|
|
||||||
public enum CalculationJobTransportationRuleType {
|
public enum CalculationJobTransportationRuleType {
|
||||||
CONTAINER, MATRIX
|
CONTAINER, MATRIX
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.calculations;
|
package de.avatic.lcc.model.db.calculations;
|
||||||
|
|
||||||
public enum CalculationJobTransportationType {
|
public enum CalculationJobTransportationType {
|
||||||
TEU, FEU, HC, TRUCK
|
TEU, FEU, HC, TRUCK
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package de.avatic.lcc.model.calculations;
|
package de.avatic.lcc.model.db.calculations;
|
||||||
|
|
||||||
import de.avatic.lcc.calculationmodel.DestinationInfo;
|
import de.avatic.lcc.model.calculation.DestinationInfo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
package de.avatic.lcc.model.country;
|
package de.avatic.lcc.model.db.country;
|
||||||
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import jakarta.validation.constraints.Size;
|
import jakarta.validation.constraints.Size;
|
||||||
import org.springframework.data.annotation.Id;
|
|
||||||
|
|
||||||
|
|
||||||
public class Country {
|
public class Country {
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.country;
|
package de.avatic.lcc.model.db.country;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.country;
|
package de.avatic.lcc.model.db.country;
|
||||||
/**
|
/**
|
||||||
* Enumeration providing detour indices for different countries.
|
* Enumeration providing detour indices for different countries.
|
||||||
* The detour index represents the ratio between road distance and direct air distance.
|
* The detour index represents the ratio between road distance and direct air distance.
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.country;
|
package de.avatic.lcc.model.db.country;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents ISO 3166-1 Alpha-2 country codes.
|
* Represents ISO 3166-1 Alpha-2 country codes.
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.country;
|
package de.avatic.lcc.model.db.country;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Repräsentiert die geografischen Regionen für Länderklassifizierungen.
|
* Repräsentiert die geografischen Regionen für Länderklassifizierungen.
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.error;
|
package de.avatic.lcc.model.db.error;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.error;
|
package de.avatic.lcc.model.db.error;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a trace item in system error stack trace.
|
* Represents a trace item in system error stack trace.
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.error;
|
package de.avatic.lcc.model.db.error;
|
||||||
|
|
||||||
public enum SysErrorType {
|
public enum SysErrorType {
|
||||||
BACKEND, FRONTEND, BULK, CALCULATION
|
BACKEND, FRONTEND, BULK, CALCULATION
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
package de.avatic.lcc.model.materials;
|
package de.avatic.lcc.model.db.materials;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.materials;
|
package de.avatic.lcc.model.db.materials;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import de.avatic.lcc.dto.generic.DimensionDTO;
|
import de.avatic.lcc.dto.generic.DimensionDTO;
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package de.avatic.lcc.model.materials;
|
package de.avatic.lcc.model.db.materials;
|
||||||
|
|
||||||
import de.avatic.lcc.model.country.CountryListEntry;
|
import de.avatic.lcc.model.db.country.CountryListEntry;
|
||||||
import de.avatic.lcc.dto.generic.NodeType;
|
import de.avatic.lcc.dto.generic.NodeType;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
package de.avatic.lcc.model.nodes;
|
package de.avatic.lcc.model.db.nodes;
|
||||||
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.OffsetDateTime;
|
|
||||||
|
|
||||||
|
|
||||||
public class Distance {
|
public class Distance {
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.nodes;
|
package de.avatic.lcc.model.db.nodes;
|
||||||
|
|
||||||
public enum DistanceMatrixState {
|
public enum DistanceMatrixState {
|
||||||
VALID, STALE
|
VALID, STALE
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.nodes;
|
package de.avatic.lcc.model.db.nodes;
|
||||||
|
|
||||||
public class Location {
|
public class Location {
|
||||||
private Double longitude;
|
private Double longitude;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.nodes;
|
package de.avatic.lcc.model.db.nodes;
|
||||||
|
|
||||||
import org.jetbrains.annotations.Debug.Renderer;
|
import org.jetbrains.annotations.Debug.Renderer;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package de.avatic.lcc.model.nodes;
|
package de.avatic.lcc.model.db.nodes;
|
||||||
|
|
||||||
import de.avatic.lcc.model.country.CountryListEntry;
|
import de.avatic.lcc.model.db.country.CountryListEntry;
|
||||||
|
|
||||||
public class NodeListEntry {
|
public class NodeListEntry {
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package de.avatic.lcc.model.nodes;
|
package de.avatic.lcc.model.db.nodes;
|
||||||
|
|
||||||
import de.avatic.lcc.model.country.Country;
|
import de.avatic.lcc.model.db.country.Country;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import org.springframework.data.annotation.Id;
|
import org.springframework.data.annotation.Id;
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.packaging;
|
package de.avatic.lcc.model.db.packaging;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.packaging;
|
package de.avatic.lcc.model.db.packaging;
|
||||||
|
|
||||||
public class Packaging {
|
public class Packaging {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
package de.avatic.lcc.model.packaging;
|
package de.avatic.lcc.model.db.packaging;
|
||||||
|
|
||||||
import de.avatic.lcc.model.utils.DimensionUnit;
|
import de.avatic.lcc.model.db.utils.DimensionUnit;
|
||||||
import de.avatic.lcc.model.utils.WeightUnit;
|
import de.avatic.lcc.model.db.utils.WeightUnit;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
public class PackagingDimension {
|
public class PackagingDimension {
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.packaging;
|
package de.avatic.lcc.model.db.packaging;
|
||||||
|
|
||||||
|
|
||||||
import de.avatic.lcc.dto.generic.DimensionDTO;
|
import de.avatic.lcc.dto.generic.DimensionDTO;
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
package de.avatic.lcc.model.premises;
|
package de.avatic.lcc.model.db.premises;
|
||||||
|
|
||||||
import de.avatic.lcc.model.nodes.Location;
|
import de.avatic.lcc.model.db.nodes.Location;
|
||||||
import de.avatic.lcc.model.utils.DimensionUnit;
|
import de.avatic.lcc.model.db.utils.DimensionUnit;
|
||||||
import de.avatic.lcc.model.utils.WeightUnit;
|
import de.avatic.lcc.model.db.utils.WeightUnit;
|
||||||
import jakarta.validation.constraints.Digits;
|
import jakarta.validation.constraints.Digits;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import jakarta.validation.constraints.Size;
|
import jakarta.validation.constraints.Size;
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package de.avatic.lcc.model.premises;
|
package de.avatic.lcc.model.db.premises;
|
||||||
|
|
||||||
import de.avatic.lcc.dto.calculation.PremiseState;
|
import de.avatic.lcc.dto.calculation.PremiseState;
|
||||||
import de.avatic.lcc.model.materials.Material;
|
import de.avatic.lcc.model.db.materials.Material;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.premises;
|
package de.avatic.lcc.model.db.premises;
|
||||||
|
|
||||||
|
|
||||||
public enum PremiseState {
|
public enum PremiseState {
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.premises.route;
|
package de.avatic.lcc.model.db.premises.route;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.premises.route;
|
package de.avatic.lcc.model.db.premises.route;
|
||||||
|
|
||||||
public class Route {
|
public class Route {
|
||||||
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package de.avatic.lcc.model.premises.route;
|
package de.avatic.lcc.model.db.premises.route;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class RouteInformation {
|
public class RouteInformation {
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.premises.route;
|
package de.avatic.lcc.model.db.premises.route;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.premises.route;
|
package de.avatic.lcc.model.db.premises.route;
|
||||||
|
|
||||||
import de.avatic.lcc.dto.generic.RateType;
|
import de.avatic.lcc.dto.generic.RateType;
|
||||||
import de.avatic.lcc.dto.generic.TransportType;
|
import de.avatic.lcc.dto.generic.TransportType;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.premises.route;
|
package de.avatic.lcc.model.db.premises.route;
|
||||||
|
|
||||||
public class RouteSectionInformation {
|
public class RouteSectionInformation {
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.premises.route;
|
package de.avatic.lcc.model.db.premises.route;
|
||||||
|
|
||||||
public enum RouteSectionType {
|
public enum RouteSectionType {
|
||||||
RAIL, SEA, POST_RUN, ROAD, MATRIX
|
RAIL, SEA, POST_RUN, ROAD, MATRIX
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.properties;
|
package de.avatic.lcc.model.db.properties;
|
||||||
|
|
||||||
|
|
||||||
public class CountryProperty {
|
public class CountryProperty {
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.properties;
|
package de.avatic.lcc.model.db.properties;
|
||||||
|
|
||||||
public enum CountryPropertyMappingId {
|
public enum CountryPropertyMappingId {
|
||||||
UNION("Customs Union", "NONE"),
|
UNION("Customs Union", "NONE"),
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.properties;
|
package de.avatic.lcc.model.db.properties;
|
||||||
|
|
||||||
public enum CustomUnionType {
|
public enum CustomUnionType {
|
||||||
EU, NONE
|
EU, NONE
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.properties;
|
package de.avatic.lcc.model.db.properties;
|
||||||
|
|
||||||
|
|
||||||
public class PackagingProperty {
|
public class PackagingProperty {
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
package de.avatic.lcc.model.properties;
|
package de.avatic.lcc.model.db.properties;
|
||||||
|
|
||||||
import org.springframework.jmx.export.naming.IdentityNamingStrategy;
|
|
||||||
|
|
||||||
public enum PackagingPropertyMappingId {
|
public enum PackagingPropertyMappingId {
|
||||||
STACKABLE("Stackable", "true"), MIXABLE("Mixable", "true"), RUST_PREVENTION("Needs rust prevention", "false");
|
STACKABLE("Stackable", "true"), MIXABLE("Mixable", "true"), RUST_PREVENTION("Needs rust prevention", "false");
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.properties;
|
package de.avatic.lcc.model.db.properties;
|
||||||
|
|
||||||
|
|
||||||
public enum PropertyDataType {
|
public enum PropertyDataType {
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package de.avatic.lcc.model.properties;
|
package de.avatic.lcc.model.db.properties;
|
||||||
|
|
||||||
import de.avatic.lcc.model.rates.ValidityPeriodState;
|
import de.avatic.lcc.model.db.rates.ValidityPeriodState;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.properties;
|
package de.avatic.lcc.model.db.properties;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import jakarta.validation.constraints.Size;
|
import jakarta.validation.constraints.Size;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.properties;
|
package de.avatic.lcc.model.db.properties;
|
||||||
|
|
||||||
|
|
||||||
public class SystemProperty {
|
public class SystemProperty {
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.properties;
|
package de.avatic.lcc.model.db.properties;
|
||||||
|
|
||||||
public enum SystemPropertyMappingId {
|
public enum SystemPropertyMappingId {
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.rates;
|
package de.avatic.lcc.model.db.rates;
|
||||||
|
|
||||||
import de.avatic.lcc.dto.generic.TransportType;
|
import de.avatic.lcc.dto.generic.TransportType;
|
||||||
import jakarta.validation.constraints.Digits;
|
import jakarta.validation.constraints.Digits;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.rates;
|
package de.avatic.lcc.model.db.rates;
|
||||||
|
|
||||||
import jakarta.validation.constraints.Digits;
|
import jakarta.validation.constraints.Digits;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.rates;
|
package de.avatic.lcc.model.db.rates;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.rates;
|
package de.avatic.lcc.model.db.rates;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the state of a validity period, which indicates the current
|
* Represents the state of a validity period, which indicates the current
|
||||||
53
src/main/java/de/avatic/lcc/model/db/users/App.java
Normal file
53
src/main/java/de/avatic/lcc/model/db/users/App.java
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
package de.avatic.lcc.model.db.users;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class App {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
private String name;
|
||||||
|
private String clientId;
|
||||||
|
private String clientSecret;
|
||||||
|
|
||||||
|
private List<Group> groups;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientId() {
|
||||||
|
return clientId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientId(String clientId) {
|
||||||
|
this.clientId = clientId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientSecret() {
|
||||||
|
return clientSecret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientSecret(String clientSecret) {
|
||||||
|
this.clientSecret = clientSecret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Group> getGroups() {
|
||||||
|
return groups;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGroups(List<Group> groups) {
|
||||||
|
this.groups = groups;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.users;
|
package de.avatic.lcc.model.db.users;
|
||||||
|
|
||||||
public class Group {
|
public class Group {
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.users;
|
package de.avatic.lcc.model.db.users;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.utils;
|
package de.avatic.lcc.model.db.utils;
|
||||||
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package de.avatic.lcc.model.utils;
|
package de.avatic.lcc.model.db.utils;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
@ -1,13 +1,11 @@
|
||||||
package de.avatic.lcc.excelmodel;
|
package de.avatic.lcc.model.excel;
|
||||||
|
|
||||||
import de.avatic.lcc.model.country.IsoCode;
|
import de.avatic.lcc.model.db.country.IsoCode;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
|
|
||||||
public class ExcelNode {
|
public class ExcelNode {
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package de.avatic.lcc.excelmodel;
|
package de.avatic.lcc.model.excel;
|
||||||
|
|
||||||
import de.avatic.lcc.model.utils.DimensionUnit;
|
import de.avatic.lcc.model.db.utils.DimensionUnit;
|
||||||
import de.avatic.lcc.model.utils.WeightUnit;
|
import de.avatic.lcc.model.db.utils.WeightUnit;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
package de.avatic.lcc.model.user;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import jakarta.validation.constraints.Size;
|
|
||||||
import org.springframework.data.annotation.Id;
|
|
||||||
|
|
||||||
//@Deprecated
|
|
||||||
//@Table(name = "sys_group")
|
|
||||||
//public class SysGroup {
|
|
||||||
//
|
|
||||||
// @Id
|
|
||||||
// private Integer id;
|
|
||||||
//
|
|
||||||
// @NotNull
|
|
||||||
// @Size(max = 64)
|
|
||||||
// private String groupName;
|
|
||||||
//
|
|
||||||
// @NotNull
|
|
||||||
// @Size(max = 128)
|
|
||||||
// private String groupDescription;
|
|
||||||
//
|
|
||||||
//}
|
|
||||||
|
|
@ -1,94 +0,0 @@
|
||||||
package de.avatic.lcc.model.user;
|
|
||||||
|
|
||||||
//import jakarta.validation.constraints.NotNull;
|
|
||||||
//import jakarta.validation.constraints.Size;
|
|
||||||
//import org.springframework.data.annotation.Id;
|
|
||||||
//import org.springframework.data.relational.core.mapping.MappedCollection;
|
|
||||||
//import org.springframework.data.relational.core.mapping.Table;
|
|
||||||
|
|
||||||
import java.util.Set;
|
|
||||||
//
|
|
||||||
//@Deprecated
|
|
||||||
//@Table(name = "sys_user")
|
|
||||||
//public class SysUser {
|
|
||||||
//
|
|
||||||
// @Id
|
|
||||||
// private Integer id;
|
|
||||||
//
|
|
||||||
// @NotNull
|
|
||||||
// @Size(max = 32)
|
|
||||||
// private String workdayId;
|
|
||||||
//
|
|
||||||
// @NotNull
|
|
||||||
// @Size(max = 254)
|
|
||||||
// private String email;
|
|
||||||
//
|
|
||||||
// @NotNull
|
|
||||||
// @Size(max = 100)
|
|
||||||
// private String firstname;
|
|
||||||
//
|
|
||||||
// @NotNull
|
|
||||||
// @Size(max = 100)
|
|
||||||
// private String lastname;
|
|
||||||
//
|
|
||||||
// @MappedCollection(idColumn = "user_id")
|
|
||||||
// private Set<SysUserGroupMapping> groups ;
|
|
||||||
//
|
|
||||||
// private Boolean isActive;
|
|
||||||
//
|
|
||||||
// public Integer getId() {
|
|
||||||
// return id;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setId(final Integer id) {
|
|
||||||
// this.id = id;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public String getWorkdayId() {
|
|
||||||
// return workdayId;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setWorkdayId(final String workdayId) {
|
|
||||||
// this.workdayId = workdayId;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public String getEmail() {
|
|
||||||
// return email;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setEmail(final String email) {
|
|
||||||
// this.email = email;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public String getFirstname() {
|
|
||||||
// return firstname;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setFirstname(final String firstname) {
|
|
||||||
// this.firstname = firstname;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public String getLastname() {
|
|
||||||
// return lastname;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setLastname(final String lastname) {
|
|
||||||
// this.lastname = lastname;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public Set<SysUserGroupMapping> getGroups() {
|
|
||||||
// return groups;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setGroups(Set<SysUserGroupMapping> groups) {
|
|
||||||
// this.groups = groups;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public Boolean getActive() {
|
|
||||||
// return isActive;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setActive(Boolean active) {
|
|
||||||
// isActive = active;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
package de.avatic.lcc.model.user;
|
|
||||||
|
|
||||||
//
|
|
||||||
//import jakarta.validation.constraints.NotNull;
|
|
||||||
//import org.springframework.data.annotation.Id;
|
|
||||||
//import org.springframework.data.jdbc.core.mapping.AggregateReference;
|
|
||||||
//import org.springframework.data.relational.core.mapping.Column;
|
|
||||||
//import org.springframework.data.relational.core.mapping.Table;
|
|
||||||
//
|
|
||||||
//@Deprecated
|
|
||||||
//public class SysUserGroupMapping {
|
|
||||||
//
|
|
||||||
// @Id
|
|
||||||
// private Integer id;
|
|
||||||
//
|
|
||||||
// @NotNull
|
|
||||||
// @Column("group_id")
|
|
||||||
// private AggregateReference<SysGroup,Integer> group;
|
|
||||||
//
|
|
||||||
// public Integer getId() {
|
|
||||||
// return id;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setId(Integer id) {
|
|
||||||
// this.id = id;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public AggregateReference<SysGroup, Integer> getGroup() {
|
|
||||||
// return group;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setGroup(AggregateReference<SysGroup, Integer> group) {
|
|
||||||
// this.group = group;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
@ -1,89 +0,0 @@
|
||||||
package de.avatic.lcc.model.user;
|
|
||||||
|
|
||||||
//
|
|
||||||
//import jakarta.validation.constraints.*;
|
|
||||||
//import org.springframework.data.annotation.Id;
|
|
||||||
//import org.springframework.data.jdbc.core.mapping.AggregateReference;
|
|
||||||
//import org.springframework.data.relational.core.mapping.Column;
|
|
||||||
//import org.springframework.data.relational.core.mapping.Table;
|
|
||||||
//
|
|
||||||
//import java.math.BigDecimal;
|
|
||||||
//@Deprecated
|
|
||||||
//@Table(name = "sys_user_node")
|
|
||||||
//public class SysUserNode {
|
|
||||||
//
|
|
||||||
// @Id
|
|
||||||
// private Integer id;
|
|
||||||
//
|
|
||||||
// @NotNull
|
|
||||||
// @Column("user_id")
|
|
||||||
// private AggregateReference<SysUser, Integer> user;
|
|
||||||
//
|
|
||||||
// @NotNull
|
|
||||||
// @Size(max = 254)
|
|
||||||
// private String name;
|
|
||||||
//
|
|
||||||
// @NotNull
|
|
||||||
// @Size(max = 500)
|
|
||||||
// private String address;
|
|
||||||
//
|
|
||||||
// @Digits(integer = 7, fraction = 4)
|
|
||||||
// @DecimalMin("-90.0000")
|
|
||||||
// @DecimalMax("90.0000")
|
|
||||||
// private BigDecimal geoLat;
|
|
||||||
//
|
|
||||||
// @Digits(integer = 7, fraction = 4)
|
|
||||||
// @DecimalMin("-180.0000")
|
|
||||||
// @DecimalMax("180.0000")
|
|
||||||
// private BigDecimal geoLng;
|
|
||||||
//
|
|
||||||
// private Boolean isDeprecated;
|
|
||||||
//
|
|
||||||
// public Integer getId() {
|
|
||||||
// return id;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setId(Integer id) {
|
|
||||||
// this.id = id;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public String getName() {
|
|
||||||
// return name;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setName(String name) {
|
|
||||||
// this.name = name;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public String getAddress() {
|
|
||||||
// return address;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setAddress(String address) {
|
|
||||||
// this.address = address;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public BigDecimal getGeoLat() {
|
|
||||||
// return geoLat;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setGeoLat(BigDecimal geoLat) {
|
|
||||||
// this.geoLat = geoLat;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public BigDecimal getGeoLng() {
|
|
||||||
// return geoLng;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setGeoLng(BigDecimal geoLng) {
|
|
||||||
// this.geoLng = geoLng;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public Boolean getDeprecated() {
|
|
||||||
// return isDeprecated;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setDeprecated(Boolean deprecated) {
|
|
||||||
// isDeprecated = deprecated;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
package de.avatic.lcc.repositories;
|
package de.avatic.lcc.repositories;
|
||||||
|
|
||||||
import de.avatic.lcc.model.nodes.Distance;
|
import de.avatic.lcc.model.db.nodes.Distance;
|
||||||
import de.avatic.lcc.model.nodes.DistanceMatrixState;
|
import de.avatic.lcc.model.db.nodes.DistanceMatrixState;
|
||||||
import de.avatic.lcc.model.nodes.Node;
|
import de.avatic.lcc.model.db.nodes.Node;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,16 @@
|
||||||
package de.avatic.lcc.repositories;
|
package de.avatic.lcc.repositories;
|
||||||
|
|
||||||
import de.avatic.lcc.model.materials.Material;
|
import de.avatic.lcc.model.db.materials.Material;
|
||||||
import de.avatic.lcc.repositories.pagination.SearchQueryPagination;
|
import de.avatic.lcc.repositories.pagination.SearchQueryPagination;
|
||||||
import de.avatic.lcc.repositories.pagination.SearchQueryResult;
|
import de.avatic.lcc.repositories.pagination.SearchQueryResult;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.jdbc.core.RowMapper;
|
import org.springframework.jdbc.core.RowMapper;
|
||||||
import org.springframework.jdbc.support.GeneratedKeyHolder;
|
|
||||||
import org.springframework.jdbc.support.KeyHolder;
|
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.sql.PreparedStatement;
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.sql.Statement;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
package de.avatic.lcc.repositories;
|
package de.avatic.lcc.repositories;
|
||||||
|
|
||||||
import de.avatic.lcc.dto.generic.NodeType;
|
import de.avatic.lcc.dto.generic.NodeType;
|
||||||
import de.avatic.lcc.model.ValidityTuple;
|
import de.avatic.lcc.model.db.ValidityTuple;
|
||||||
import de.avatic.lcc.model.nodes.Node;
|
import de.avatic.lcc.model.db.nodes.Node;
|
||||||
import de.avatic.lcc.repositories.pagination.SearchQueryPagination;
|
import de.avatic.lcc.repositories.pagination.SearchQueryPagination;
|
||||||
import de.avatic.lcc.repositories.pagination.SearchQueryResult;
|
import de.avatic.lcc.repositories.pagination.SearchQueryResult;
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package de.avatic.lcc.repositories.calculation;
|
package de.avatic.lcc.repositories.calculation;
|
||||||
|
|
||||||
import de.avatic.lcc.dto.generic.ContainerType;
|
import de.avatic.lcc.dto.generic.ContainerType;
|
||||||
import de.avatic.lcc.model.calculations.CalculationJobDestination;
|
import de.avatic.lcc.model.db.calculations.CalculationJobDestination;
|
||||||
import de.avatic.lcc.util.exception.internalerror.DatabaseException;
|
import de.avatic.lcc.util.exception.internalerror.DatabaseException;
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.jdbc.core.RowMapper;
|
import org.springframework.jdbc.core.RowMapper;
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
package de.avatic.lcc.repositories.calculation;
|
package de.avatic.lcc.repositories.calculation;
|
||||||
|
|
||||||
import de.avatic.lcc.model.calculations.CalculationJob;
|
import de.avatic.lcc.model.db.calculations.CalculationJob;
|
||||||
import de.avatic.lcc.model.calculations.CalculationJobDestination;
|
import de.avatic.lcc.model.db.calculations.CalculationJobState;
|
||||||
import de.avatic.lcc.model.calculations.CalculationJobState;
|
|
||||||
import de.avatic.lcc.util.exception.internalerror.DatabaseException;
|
import de.avatic.lcc.util.exception.internalerror.DatabaseException;
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.jdbc.core.RowMapper;
|
import org.springframework.jdbc.core.RowMapper;
|
||||||
|
|
@ -10,9 +9,7 @@ import org.springframework.jdbc.support.GeneratedKeyHolder;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.xml.crypto.Data;
|
|
||||||
import java.sql.*;
|
import java.sql.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ package de.avatic.lcc.repositories.calculation;
|
||||||
|
|
||||||
import de.avatic.lcc.dto.generic.RateType;
|
import de.avatic.lcc.dto.generic.RateType;
|
||||||
import de.avatic.lcc.dto.generic.TransportType;
|
import de.avatic.lcc.dto.generic.TransportType;
|
||||||
import de.avatic.lcc.model.calculations.CalculationJobRouteSection;
|
import de.avatic.lcc.model.db.calculations.CalculationJobRouteSection;
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.jdbc.core.RowMapper;
|
import org.springframework.jdbc.core.RowMapper;
|
||||||
import org.springframework.jdbc.support.GeneratedKeyHolder;
|
import org.springframework.jdbc.support.GeneratedKeyHolder;
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
package de.avatic.lcc.repositories.country;
|
package de.avatic.lcc.repositories.country;
|
||||||
|
|
||||||
import de.avatic.lcc.dto.generic.PropertyDTO;
|
import de.avatic.lcc.dto.generic.PropertyDTO;
|
||||||
import de.avatic.lcc.model.properties.CountryPropertyMappingId;
|
import de.avatic.lcc.model.db.properties.CountryPropertyMappingId;
|
||||||
import de.avatic.lcc.model.rates.ValidityPeriodState;
|
import de.avatic.lcc.model.db.rates.ValidityPeriodState;
|
||||||
import de.avatic.lcc.util.exception.internalerror.DatabaseException;
|
import de.avatic.lcc.util.exception.internalerror.DatabaseException;
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.jdbc.core.RowMapper;
|
import org.springframework.jdbc.core.RowMapper;
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
package de.avatic.lcc.repositories.country;
|
package de.avatic.lcc.repositories.country;
|
||||||
|
|
||||||
import de.avatic.lcc.model.country.Country;
|
import de.avatic.lcc.model.db.country.Country;
|
||||||
import de.avatic.lcc.model.country.IsoCode;
|
import de.avatic.lcc.model.db.country.IsoCode;
|
||||||
import de.avatic.lcc.model.country.RegionCode;
|
import de.avatic.lcc.model.db.country.RegionCode;
|
||||||
import de.avatic.lcc.repositories.pagination.SearchQueryPagination;
|
import de.avatic.lcc.repositories.pagination.SearchQueryPagination;
|
||||||
import de.avatic.lcc.repositories.pagination.SearchQueryResult;
|
import de.avatic.lcc.repositories.pagination.SearchQueryResult;
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue