Merge branch 'develop' into feature/SUPPORT-8831_button_visibility
# Conflicts: # frontend/src/ts/ervu/component/grid/InMemoryStaticGrid.ts
This commit is contained in:
commit
0ccdcf2a69
235 changed files with 3575 additions and 4285 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -67,3 +67,4 @@ npm-debug.log
|
|||
*.sublime-workspace
|
||||
sync-backend.ps1
|
||||
sync-frontend.ps1
|
||||
config/kafka_data
|
||||
20
Dockerfile
Normal file
20
Dockerfile
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#Dockerfile for TeamCity build "run in docker"
|
||||
|
||||
FROM repo.asd.center.cg:8082/alt/alt-tomcat:c10f1-9.0.59-20240917
|
||||
|
||||
USER root
|
||||
|
||||
COPY config/tomcat /
|
||||
|
||||
RUN cat /etc/tomcat/webbpm.properties >> /etc/tomcat/catalina.properties \
|
||||
&& chown root:tomcat /var/lib/tomcat/webapps \
|
||||
&& chmod g+rw /var/lib/tomcat/webapps
|
||||
|
||||
COPY frontend/target/frontend*.war /var/lib/tomcat/webapps/ROOT.war
|
||||
COPY backend/target/ul.war /var/lib/tomcat/webapps/ul.war
|
||||
|
||||
USER tomcat
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ru.micord.ervu.lkrp</groupId>
|
||||
<artifactId>ul</artifactId>
|
||||
<version>1.9.4-SNAPSHOT</version>
|
||||
<version>1.10.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<groupId>ru.micord.ervu.lkrp.ul</groupId>
|
||||
<artifactId>backend</artifactId>
|
||||
|
|
@ -89,6 +89,22 @@
|
|||
<groupId>org.springframework.kafka</groupId>
|
||||
<artifactId>spring-kafka</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.kafka</groupId>
|
||||
<artifactId>kafka-clients</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.xerial.snappy</groupId>
|
||||
<artifactId>snappy-java</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.kafka</groupId>
|
||||
<artifactId>kafka-clients</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.xerial.snappy</groupId>
|
||||
<artifactId>snappy-java</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.cg.webbpm.modules</groupId>
|
||||
<artifactId>inject</artifactId>
|
||||
|
|
@ -182,6 +198,10 @@
|
|||
<groupId>com.github.lookfirst</groupId>
|
||||
<artifactId>sardine</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.tika</groupId>
|
||||
<artifactId>tika-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<finalName>${project.parent.artifactId}</finalName>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import javax.servlet.ServletRegistration;
|
|||
*/
|
||||
public class WebAppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(WebAppInitializer.class);
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(WebAppInitializer.class);
|
||||
|
||||
public void onStartup(ServletContext servletContext) throws ServletException {
|
||||
super.onStartup(servletContext);
|
||||
|
|
@ -50,22 +50,22 @@ public class WebAppInitializer extends AbstractAnnotationConfigDispatcherServlet
|
|||
fileSizeThreshold);
|
||||
registration.setMultipartConfig(multipartConfigElement);
|
||||
|
||||
logger.info("Max file upload size is set to: " + multipartConfigElement.getMaxFileSize());
|
||||
logger.info("Max file upload request size is set to: " + multipartConfigElement.getMaxRequestSize());
|
||||
logger.info("File size threshold is set to: " + multipartConfigElement.getFileSizeThreshold());
|
||||
LOGGER.info("Max file upload size is set to: " + multipartConfigElement.getMaxFileSize());
|
||||
LOGGER.info("Max file upload request size is set to: " + multipartConfigElement.getMaxRequestSize());
|
||||
LOGGER.info("File size threshold is set to: " + multipartConfigElement.getFileSizeThreshold());
|
||||
|
||||
}
|
||||
|
||||
private int parseOrDefault(String envVar, int defaultVal) {
|
||||
String envVarValue = System.getenv(envVar);
|
||||
if (envVar == null) {
|
||||
logger.info("Environment variable {} is null, using default value: {}", envVar, defaultVal);
|
||||
LOGGER.info("Environment variable {} is null, using default value: {}", envVar, defaultVal);
|
||||
return defaultVal;
|
||||
}
|
||||
try {
|
||||
return Integer.parseInt(envVarValue);
|
||||
} catch (NumberFormatException e) {
|
||||
logger.info("Environment variable {} is not an integer, using default value: {}", envVar, defaultVal);
|
||||
LOGGER.info("Environment variable {} is not an integer, using default value: {}", envVar, defaultVal);
|
||||
return defaultVal;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package ervu.client.fileupload;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.Authenticator;
|
||||
import java.net.ConnectException;
|
||||
import java.net.PasswordAuthentication;
|
||||
import java.net.URI;
|
||||
import java.net.URLEncoder;
|
||||
|
|
@ -10,14 +11,27 @@ import java.net.http.HttpClient;
|
|||
import java.net.http.HttpRequest;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
import com.github.sardine.DavResource;
|
||||
import com.github.sardine.Sardine;
|
||||
import com.github.sardine.SardineFactory;
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
import com.google.common.cache.CacheLoader;
|
||||
import com.google.common.cache.LoadingCache;
|
||||
import ervu.exception.WebDavException;
|
||||
import ervu.model.webdav.Server;
|
||||
import org.apache.http.client.ClientProtocolException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
|
@ -36,34 +50,113 @@ import org.springframework.web.multipart.MultipartFile;
|
|||
*/
|
||||
@Component
|
||||
public class WebDavClient {
|
||||
private static final Logger logger = LoggerFactory.getLogger(WebDavClient.class);
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(WebDavClient.class);
|
||||
|
||||
@Value("${file.webdav.upload.username}")
|
||||
@Value("${webdav.urls}")
|
||||
private String[] urls;
|
||||
@Value("${webdav.username}")
|
||||
private String username;
|
||||
@Value("${file.webdav.upload.password}")
|
||||
@Value("${webdav.password}")
|
||||
private String password;
|
||||
@Value("${webdav.bad_servers.cache.expire.seconds:120}")
|
||||
private long cacheExpireSec;
|
||||
|
||||
private List<Server> servers;
|
||||
private LoadingCache<String, String> badServersCache;
|
||||
private final AtomicInteger counter = new AtomicInteger(0);
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
CacheLoader<String, String> loader = new CacheLoader<>() {
|
||||
@Override
|
||||
public String load(String key) {
|
||||
return key;
|
||||
}
|
||||
};
|
||||
badServersCache = CacheBuilder.newBuilder()
|
||||
.expireAfterAccess(cacheExpireSec, TimeUnit.SECONDS)
|
||||
.build(loader);
|
||||
LOGGER.info("WebDAV urls: {}", Arrays.asList(urls));
|
||||
servers = Arrays.stream(urls)
|
||||
.map(url -> new Server(url, ZonedDateTime.now().toInstant().toEpochMilli()))
|
||||
.toList();
|
||||
}
|
||||
|
||||
@Retryable(value = {IOException.class}, backoff = @Backoff(delayExpression = "${webdav.retry.delay:500}"))
|
||||
public boolean uploadFile(String url, MultipartFile multipartFile) {
|
||||
public String uploadFile(MultipartFile multipartFile) {
|
||||
String fileName = getNewFilename(multipartFile.getOriginalFilename());
|
||||
Sardine sardine = initClient(username, password);
|
||||
|
||||
try {
|
||||
sardine.put(url, multipartFile.getBytes());
|
||||
return sardine.exists(url);
|
||||
return putAndGetUrl(multipartFile.getBytes(), fileName, sardine);
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new RuntimeException("Failed to put or check file in WebDAV", e);
|
||||
throw new WebDavException("Failed to put file into WebDAV", e);
|
||||
}
|
||||
finally {
|
||||
try {
|
||||
sardine.shutdown();
|
||||
}
|
||||
catch (IOException e) {
|
||||
logger.error("Failed to shutdown WebDAV client", e);
|
||||
LOGGER.error("Failed to shutdown WebDAV client", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String getNewFilename(String filename) {
|
||||
int lastIndexOf = filename.lastIndexOf(".");
|
||||
String fileExtension = lastIndexOf == -1 ? "" : filename.substring(lastIndexOf);
|
||||
return UUID.randomUUID() + fileExtension;
|
||||
}
|
||||
|
||||
public String putAndGetUrl(byte[] fileBytes, String fileName, Sardine client) throws IOException {
|
||||
if (badServersCache.size() == urls.length) {
|
||||
return null;
|
||||
}
|
||||
Server server;
|
||||
|
||||
if (urls.length == 1) {
|
||||
server = servers.get(0);
|
||||
}
|
||||
else {
|
||||
Predicate<Server> isNotBad = s -> badServersCache.getIfPresent(s.getUrl()) == null;
|
||||
server = servers.stream()
|
||||
.filter(isNotBad.and(s -> servers.indexOf(s) == index()))
|
||||
.findFirst()
|
||||
.orElseGet(() -> servers.stream()
|
||||
.filter(isNotBad)
|
||||
.min(Comparator.comparing(Server::getLastCallTime))
|
||||
.orElse(null));
|
||||
}
|
||||
|
||||
if (server == null) {
|
||||
return null;
|
||||
}
|
||||
boolean isBad = false;
|
||||
String serverUrl = server.getUrl();
|
||||
String fileUploadUrl = serverUrl + "/" + fileName;
|
||||
|
||||
try {
|
||||
client.put(fileUploadUrl, fileBytes);
|
||||
server.setLastCallTime(System.currentTimeMillis());
|
||||
}
|
||||
catch (ConnectException | ClientProtocolException ignore) {
|
||||
isBad = true;
|
||||
}
|
||||
|
||||
if (isBad) {
|
||||
badServersCache.getUnchecked(serverUrl);
|
||||
return putAndGetUrl(fileBytes, fileName, client);
|
||||
}
|
||||
|
||||
return fileUploadUrl;
|
||||
}
|
||||
|
||||
private int index() {
|
||||
counter.compareAndSet(Integer.MAX_VALUE, 0);
|
||||
return counter.getAndIncrement() % urls.length;
|
||||
}
|
||||
|
||||
@Retryable(value = {IOException.class, InterruptedException.class},
|
||||
backoff = @Backoff(delayExpression = "${webdav.retry.delay:500}"))
|
||||
public ResponseEntity<Resource> webDavDownloadFile(String url) {
|
||||
|
|
@ -94,12 +187,12 @@ public class WebDavClient {
|
|||
.body(resource);
|
||||
}
|
||||
else {
|
||||
logger.error("Failed to download file: HTTP status code {}", response.statusCode());
|
||||
LOGGER.error("Failed to download file: HTTP status code {}", response.statusCode());
|
||||
return ResponseEntity.status(response.statusCode()).build();
|
||||
}
|
||||
}
|
||||
catch (IOException | InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new WebDavException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -109,8 +202,7 @@ public class WebDavClient {
|
|||
}
|
||||
|
||||
@Retryable(value = {IOException.class}, backoff = @Backoff(delayExpression = "${webdav.retry.delay:500}"))
|
||||
public void deleteFilesOlderThan(long seconds, String url, String username, String password,
|
||||
String... extensions) {
|
||||
public void deleteFilesOlderThan(long seconds, String url, String... extensions) throws IOException {
|
||||
Sardine sardine = initClient(username, password);
|
||||
|
||||
try {
|
||||
|
|
@ -124,20 +216,17 @@ public class WebDavClient {
|
|||
sardine.delete(url + davResource.getPath());
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new RuntimeException("Failed to delete file " + davResource.getName(), e);
|
||||
LOGGER.error("Failed to delete file {}", davResource.getName(), e);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new RuntimeException("Failed to delete old files from WebDAV", e);
|
||||
}
|
||||
finally {
|
||||
try {
|
||||
sardine.shutdown();
|
||||
}
|
||||
catch (IOException e) {
|
||||
logger.error("Failed to shutdown WebDAV client", e);
|
||||
LOGGER.error("Failed to shutdown WebDAV client", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,17 @@
|
|||
package ervu.client.okopf;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.URI;
|
||||
import java.net.http.HttpClient;
|
||||
import java.net.http.HttpRequest;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.zip.ZipInputStream;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.retry.annotation.Backoff;
|
||||
import org.springframework.retry.annotation.Retryable;
|
||||
|
|
@ -19,37 +22,26 @@ import org.springframework.stereotype.Component;
|
|||
*/
|
||||
@Component
|
||||
public class EsnsiOkopfClient {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(EsnsiOkopfClient.class);
|
||||
|
||||
@Value("${esnsi.okopf.url}")
|
||||
private String uri;
|
||||
private String url;
|
||||
|
||||
@Retryable(value = {TimeoutException.class}, backoff =
|
||||
@Backoff(delay = 2000))
|
||||
@Retryable(maxAttemptsExpression = "${esnsi.okopf.retry.max.attempts.load:3}", backoff =
|
||||
@Backoff(delayExpression = "${esnsi.okop.retry.delay.load:1000}"))
|
||||
public String getJsonOkopFormData() {
|
||||
HttpClient client = HttpClient.newHttpClient();
|
||||
HttpRequest request = HttpRequest.newBuilder()
|
||||
.uri(URI.create(uri))
|
||||
.GET()
|
||||
.build();
|
||||
try {
|
||||
HttpResponse<InputStream> response = client.send(request,
|
||||
HttpResponse.BodyHandlers.ofInputStream()
|
||||
);
|
||||
if (response.statusCode() >= 200 && response.statusCode() <= 202) {
|
||||
return unzipFile(new ZipInputStream(response.body()));
|
||||
try (BufferedInputStream in = new BufferedInputStream(new URL(url).openStream());
|
||||
ZipInputStream archiveStream = new ZipInputStream(in);
|
||||
BufferedReader br = new BufferedReader(
|
||||
new InputStreamReader(archiveStream, StandardCharsets.UTF_8))) {
|
||||
if (Objects.nonNull(archiveStream.getNextEntry())) {
|
||||
return br.lines().collect(Collectors.joining(System.lineSeparator()));
|
||||
}
|
||||
throw new RuntimeException("The returned status " + response.statusCode() + " is incorrect. Json file has not be unzip");
|
||||
LOGGER.warn("Esnsi okopf client received an empty archive in response.");
|
||||
}
|
||||
catch (IOException | InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
catch (IOException e) {
|
||||
LOGGER.error("Failed to send HTTP request or process the response for okopf file.", e);
|
||||
}
|
||||
}
|
||||
|
||||
private String unzipFile(ZipInputStream zis) throws IOException {
|
||||
if (zis.getNextEntry() != null) {
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(zis.readAllBytes())));
|
||||
return br.lines().collect(Collectors.joining(System.lineSeparator()));
|
||||
}
|
||||
throw new RuntimeException("ZipInputStream is empty and has not been unzipped");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ package ervu.controller;
|
|||
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.TimeZone;
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import ervu.service.fileupload.EmployeeInfoFileUploadService;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
|
@ -13,6 +11,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import ru.micord.ervu.security.webbpm.jwt.UserIdsPair;
|
||||
import ru.micord.ervu.security.webbpm.jwt.util.SecurityUtil;
|
||||
|
||||
/**
|
||||
* @author Alexandr Shalaginov
|
||||
|
|
@ -26,26 +26,17 @@ public class EmployeeInfoFileUploadController {
|
|||
}
|
||||
|
||||
@RequestMapping(value = "/employee/document", method = RequestMethod.POST)
|
||||
public ResponseEntity<?> saveEmployeeInformationFile(@RequestParam("file") MultipartFile multipartFile,
|
||||
public ResponseEntity<?> saveEmployeeInformationFile(
|
||||
@RequestParam("file") MultipartFile multipartFile,
|
||||
@RequestHeader("X-Employee-Info-File-Form-Type") String formType,
|
||||
@RequestHeader("Client-Time-Zone") String clientTimeZone, HttpServletRequest request) {
|
||||
String accessToken = null;
|
||||
String authToken = null;
|
||||
Cookie[] cookies = request.getCookies();
|
||||
if (cookies != null) {
|
||||
for (Cookie cookie : cookies) {
|
||||
if (cookie.getName().equals("auth_token")) {
|
||||
authToken = cookie.getValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
@RequestHeader("Client-Time-Zone") String clientTimeZone) {
|
||||
UserIdsPair userIdsPair = SecurityUtil.getUserIdsPair();
|
||||
|
||||
if (authToken != null) {
|
||||
if (userIdsPair != null) {
|
||||
String offset = ZonedDateTime.now(TimeZone.getTimeZone(clientTimeZone).toZoneId())
|
||||
.getOffset().getId();
|
||||
|
||||
if (this.fileUploadService.saveEmployeeInformationFile(multipartFile, formType,
|
||||
authToken, offset)) {
|
||||
if (this.fileUploadService.saveEmployeeInformationFile(multipartFile, formType, offset, userIdsPair)) {
|
||||
return ResponseEntity.ok("File successfully uploaded.");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import ervu.model.okopf.OkopfModel;
|
|||
* @author Artyom Hackimullin
|
||||
*/
|
||||
public interface OkopfDao {
|
||||
void save(List<OkopfModel> recordModels);
|
||||
void saveOrUpdate(List<OkopfModel> recordModels);
|
||||
|
||||
String fetchTitleByLeg(String leg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
package ervu.dao.okopf;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import ervu.model.okopf.OkopfModel;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records.OkopfRecordsRecord;
|
||||
import org.jooq.DSLContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
|
@ -20,18 +23,12 @@ public class OkopfDaoImpl implements OkopfDao {
|
|||
private DSLContext dsl;
|
||||
|
||||
@Override
|
||||
public void save(List<OkopfModel> recordModels) {
|
||||
var queries = recordModels.stream().map(record ->
|
||||
dsl.insertInto(OKOPF_RECORDS, OKOPF_RECORDS.OKOPF_RECORDS_ID, OKOPF_RECORDS.NAME, OKOPF_RECORDS.VERSION)
|
||||
.values(record.getCode(), record.getName(), record.getVersion())
|
||||
.onConflict(OKOPF_RECORDS.OKOPF_RECORDS_ID)
|
||||
.doUpdate()
|
||||
.set(OKOPF_RECORDS.NAME, record.getName())
|
||||
.set(OKOPF_RECORDS.VERSION, record.getVersion())
|
||||
.where(OKOPF_RECORDS.OKOPF_RECORDS_ID.eq(record.getCode()))
|
||||
).toList();
|
||||
|
||||
dsl.batch(queries).execute();
|
||||
public void saveOrUpdate(List<OkopfModel> okopfModels) {
|
||||
deleteNotActualOkopfRecords(okopfModels);
|
||||
dsl.batchMerge(okopfModels.stream()
|
||||
.map(this::mapOkopfModelToRecord)
|
||||
.toList())
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -41,4 +38,23 @@ public class OkopfDaoImpl implements OkopfDao {
|
|||
.where(OKOPF_RECORDS.OKOPF_RECORDS_ID.eq(leg))
|
||||
.fetchOne(OKOPF_RECORDS.NAME);
|
||||
}
|
||||
|
||||
private void deleteNotActualOkopfRecords(List<OkopfModel> recordModels) {
|
||||
Set<String> ids = recordModels
|
||||
.stream()
|
||||
.map(OkopfModel::getCode)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
dsl.deleteFrom(OKOPF_RECORDS)
|
||||
.where(OKOPF_RECORDS.OKOPF_RECORDS_ID.notIn(ids))
|
||||
.execute();
|
||||
}
|
||||
|
||||
private OkopfRecordsRecord mapOkopfModelToRecord(OkopfModel model) {
|
||||
OkopfRecordsRecord record = dsl.newRecord(OKOPF_RECORDS);
|
||||
record.setValue(OKOPF_RECORDS.OKOPF_RECORDS_ID, model.getCode());
|
||||
record.setValue(OKOPF_RECORDS.NAME, model.getName());
|
||||
record.setValue(OKOPF_RECORDS.VERSION, model.getVersion());
|
||||
return record;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
19
backend/src/main/java/ervu/exception/WebDavException.java
Normal file
19
backend/src/main/java/ervu/exception/WebDavException.java
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
package ervu.exception;
|
||||
|
||||
/**
|
||||
* @author Adel Kalimullin
|
||||
*/
|
||||
public class WebDavException extends RuntimeException{
|
||||
|
||||
public WebDavException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public WebDavException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public WebDavException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
}
|
||||
27
backend/src/main/java/ervu/model/webdav/Server.java
Normal file
27
backend/src/main/java/ervu/model/webdav/Server.java
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
package ervu.model.webdav;
|
||||
|
||||
/**
|
||||
* @author gulnaz
|
||||
*/
|
||||
public class Server {
|
||||
|
||||
private final String url;
|
||||
private long lastCallTime;
|
||||
|
||||
public Server(String url, long lastCallTime) {
|
||||
this.url = url;
|
||||
this.lastCallTime = lastCallTime;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public long getLastCallTime() {
|
||||
return lastCallTime;
|
||||
}
|
||||
|
||||
public void setLastCallTime(long lastCallTime) {
|
||||
this.lastCallTime = lastCallTime;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +1,12 @@
|
|||
package ervu.service.fileupload;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.sql.Timestamp;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
|
|
@ -16,6 +18,11 @@ import ervu.model.fileupload.EmployeeInfoKafkaMessage;
|
|||
import ervu.model.fileupload.FileInfo;
|
||||
import ervu.model.fileupload.FileStatus;
|
||||
import org.apache.kafka.clients.producer.ProducerRecord;
|
||||
import org.apache.tika.Tika;
|
||||
import org.apache.tika.mime.MediaType;
|
||||
import org.apache.tika.mime.MimeType;
|
||||
import org.apache.tika.mime.MimeTypeException;
|
||||
import org.apache.tika.mime.MimeTypes;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
|
|
@ -24,15 +31,18 @@ import org.springframework.kafka.annotation.KafkaListener;
|
|||
import org.springframework.kafka.core.KafkaTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import ru.micord.ervu.security.esia.token.EsiaTokensStore;
|
||||
import ru.micord.ervu.exception.JsonParsingException;
|
||||
import ru.micord.ervu.security.esia.model.EmployeeModel;
|
||||
import ru.micord.ervu.security.esia.model.PersonModel;
|
||||
import ru.micord.ervu.security.esia.service.UlDataService;
|
||||
import ru.micord.ervu.security.webbpm.jwt.model.Token;
|
||||
import ru.micord.ervu.security.webbpm.jwt.service.JwtTokenService;
|
||||
import ru.micord.ervu.security.esia.token.EsiaTokensStore;
|
||||
import ru.micord.ervu.security.webbpm.jwt.UserIdsPair;
|
||||
import ru.micord.ervu.service.InteractionService;
|
||||
|
||||
import static ervu.enums.FileStatusCode.*;
|
||||
import static ervu.enums.FileStatusCode.FILE_CLEAN;
|
||||
import static ervu.enums.FileStatusCode.FILE_INFECTED;
|
||||
import static ervu.enums.FileStatusCode.FILE_NOT_CHECKED;
|
||||
import static ervu.enums.FileStatusCode.FILE_UPLOADED;
|
||||
import static ru.micord.ervu.util.StringUtils.convertToFio;
|
||||
|
||||
/**
|
||||
|
|
@ -40,7 +50,7 @@ import static ru.micord.ervu.util.StringUtils.convertToFio;
|
|||
*/
|
||||
@Service
|
||||
public class EmployeeInfoFileUploadService {
|
||||
private static final Logger logger = LoggerFactory.getLogger(EmployeeInfoFileUploadService.class);
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(EmployeeInfoFileUploadService.class);
|
||||
private static final String FORMAT = "dd.MM.yyyy HH:mm:ss";
|
||||
|
||||
private final WebDavClient webDavClient;
|
||||
|
|
@ -48,46 +58,50 @@ public class EmployeeInfoFileUploadService {
|
|||
private final KafkaTemplate<String, String> kafkaTemplate;
|
||||
private final InteractionService interactionService;
|
||||
private final UlDataService ulDataService;
|
||||
private final JwtTokenService jwtTokenService;
|
||||
|
||||
@Value("${av.kafka.message.topic.name}")
|
||||
private String kafkaTopicName;
|
||||
@Value("${file.webdav.upload.url:http://localhost:5757}")
|
||||
private String url;
|
||||
|
||||
public EmployeeInfoFileUploadService(
|
||||
WebDavClient webDavClient,
|
||||
EmployeeInfoKafkaMessageService employeeInfoKafkaMessageService,
|
||||
@Qualifier("avTemplate") KafkaTemplate<String, String> kafkaTemplate,
|
||||
InteractionService interactionService,
|
||||
UlDataService ulDataService, JwtTokenService jwtTokenService) {
|
||||
UlDataService ulDataService) {
|
||||
this.webDavClient = webDavClient;
|
||||
this.employeeInfoKafkaMessageService = employeeInfoKafkaMessageService;
|
||||
this.kafkaTemplate = kafkaTemplate;
|
||||
this.interactionService = interactionService;
|
||||
this.ulDataService = ulDataService;
|
||||
this.jwtTokenService = jwtTokenService;
|
||||
}
|
||||
|
||||
public boolean saveEmployeeInformationFile(MultipartFile multipartFile, String formType, String authToken, String offset) {
|
||||
String fileUploadUrl = this.url + "/" + getNewFilename(multipartFile.getOriginalFilename());
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
public boolean saveEmployeeInformationFile(MultipartFile multipartFile, String formType,
|
||||
String offset, UserIdsPair userIdsPair) {
|
||||
|
||||
if (this.webDavClient.uploadFile(fileUploadUrl, multipartFile)) {
|
||||
FileStatus fileStatus = new FileStatus();
|
||||
fileStatus.setStatus("Загрузка");
|
||||
if (!isValid(multipartFile)) {
|
||||
return false;
|
||||
}
|
||||
String fileId = UUID.randomUUID().toString();
|
||||
String fileName = multipartFile.getOriginalFilename();
|
||||
EmployeeInfoFileFormType employeeInfoFileFormType = EmployeeInfoFileFormType.valueOf(formType);
|
||||
String esiaUserId = userIdsPair.getEsiaUserId();
|
||||
String ervuId = userIdsPair.getErvuId();
|
||||
String accessToken = EsiaTokensStore.getAccessToken(esiaUserId);
|
||||
EmployeeModel employeeModel = ulDataService.getEmployeeModel(accessToken);
|
||||
PersonModel personModel = employeeModel.getPerson();
|
||||
|
||||
String fileUploadUrl = this.webDavClient.uploadFile(multipartFile);
|
||||
FileStatus fileStatus = new FileStatus();
|
||||
fileStatus.setStatus(fileUploadUrl == null ? "Невозможно проверить файл ЛК РП" : "Загрузка");
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
interactionService.setStatus(fileId, fileStatus.getStatus(), fileName,
|
||||
employeeInfoFileFormType.getFilePatternCode(), Timestamp.valueOf(now),
|
||||
convertToFio(personModel.getFirstName(), personModel.getMiddleName(), personModel.getLastName()),
|
||||
ervuId);
|
||||
|
||||
if (fileUploadUrl != null) {
|
||||
fileStatus.setCode(FILE_UPLOADED.getCode());
|
||||
fileStatus.setDescription("Файл принят до проверки на вирусы");
|
||||
String fileId = UUID.randomUUID().toString();
|
||||
String fileName = multipartFile.getOriginalFilename();
|
||||
EmployeeInfoFileFormType employeeInfoFileFormType = EmployeeInfoFileFormType.valueOf(formType);
|
||||
Token token = jwtTokenService.getToken(authToken);
|
||||
String[] ids = token.getUserAccountId().split(":");
|
||||
String userId = ids[0];
|
||||
String ervuId = ids[1];
|
||||
String accessToken = EsiaTokensStore.getAccessToken(userId);
|
||||
EmployeeModel employeeModel = ulDataService.getEmployeeModel(accessToken);
|
||||
PersonModel personModel = employeeModel.getPerson();
|
||||
String departureDateTime = now.format(DateTimeFormatter.ofPattern(FORMAT));
|
||||
String jsonMessage = getJsonKafkaMessage(
|
||||
employeeInfoKafkaMessageService.getKafkaMessage(
|
||||
|
|
@ -100,56 +114,74 @@ public class EmployeeInfoFileUploadService {
|
|||
offset,
|
||||
fileStatus,
|
||||
ervuId,
|
||||
userId,
|
||||
esiaUserId,
|
||||
personModel
|
||||
)
|
||||
)
|
||||
);
|
||||
interactionService.setStatus(fileId, fileStatus.getStatus(), fileName,
|
||||
employeeInfoFileFormType.getFilePatternCode(), Timestamp.valueOf(now),
|
||||
convertToFio(personModel.getFirstName(), personModel.getMiddleName(), personModel.getLastName()),
|
||||
ervuId);
|
||||
return sendMessage(jsonMessage);
|
||||
}
|
||||
else {
|
||||
logger.error("Fail upload file: {}", multipartFile.getOriginalFilename());
|
||||
LOGGER.error("Failed to upload file: {}", fileName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isValid(MultipartFile multipartFile) {
|
||||
|
||||
if (multipartFile == null || multipartFile.getOriginalFilename() == null) {
|
||||
return false;
|
||||
}
|
||||
String fileName = multipartFile.getOriginalFilename();
|
||||
try {
|
||||
String contentType = new Tika().detect(multipartFile.getBytes());
|
||||
MimeTypes defaultMimeTypes = MimeTypes.getDefaultMimeTypes();
|
||||
MimeType mimeType = defaultMimeTypes.forName(contentType);
|
||||
boolean isCsv = mimeType.getType().equals(MediaType.TEXT_PLAIN)
|
||||
&& fileName.toLowerCase(Locale.getDefault()).endsWith(".csv");
|
||||
|
||||
if (!isCsv) {
|
||||
LOGGER.info("Trying to upload file={} with wrong mime type={}",
|
||||
fileName, mimeType
|
||||
);
|
||||
}
|
||||
return isCsv;
|
||||
}
|
||||
catch (MimeTypeException e) {
|
||||
LOGGER.error(
|
||||
"Couldn't get mime type from bytes for file=" + fileName, e);
|
||||
return false;
|
||||
}
|
||||
catch (IOException e) {
|
||||
LOGGER.error("Error while checking file type, file=" + fileName,
|
||||
e
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean sendMessage(String message) {
|
||||
ProducerRecord<String, String> record = new ProducerRecord<>(this.kafkaTopicName, message);
|
||||
record.headers().add("messageId", UUID.randomUUID().toString().getBytes(StandardCharsets.UTF_8));
|
||||
record.headers()
|
||||
.add("messageId", UUID.randomUUID().toString().getBytes(StandardCharsets.UTF_8));
|
||||
|
||||
try {
|
||||
this.kafkaTemplate.send(record).get();
|
||||
logger.debug("Success send record: {}", record);
|
||||
LOGGER.debug("Successfully sent record: {}", record);
|
||||
return true;
|
||||
}
|
||||
catch (Exception exception) {
|
||||
logger.error("Fail send message.", exception);
|
||||
LOGGER.error("Failed to send message", exception);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private String getNewFilename(String oldFilename) {
|
||||
return UUID.randomUUID() + getFileExtension(oldFilename);
|
||||
}
|
||||
|
||||
private String getFileExtension(String filename) {
|
||||
int lastIndexOf = filename.lastIndexOf(".");
|
||||
if (lastIndexOf == -1) {
|
||||
return "";
|
||||
}
|
||||
return filename.substring(lastIndexOf);
|
||||
}
|
||||
|
||||
private String getJsonKafkaMessage(EmployeeInfoKafkaMessage employeeInfoKafkaMessage) {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
try {
|
||||
return mapper.writeValueAsString(employeeInfoKafkaMessage);
|
||||
}
|
||||
catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(String.format("Fail get json from: %s", employeeInfoKafkaMessage), e);
|
||||
throw new JsonParsingException(String.format("Fail get json from: %s", employeeInfoKafkaMessage), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -173,7 +205,7 @@ public class EmployeeInfoFileUploadService {
|
|||
}
|
||||
}
|
||||
catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(String.format("Fail get json from: %s", kafkaMessage), e);
|
||||
throw new JsonParsingException(String.format("Fail get json from: %s", kafkaMessage), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,8 +22,10 @@ import org.springframework.context.annotation.DependsOn;
|
|||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import ru.micord.ervu.exception.JsonParsingException;
|
||||
|
||||
import static org.springframework.scheduling.config.ScheduledTaskRegistrar.CRON_DISABLED;
|
||||
import static org.springframework.util.StringUtils.hasText;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -32,7 +34,7 @@ import static org.springframework.scheduling.config.ScheduledTaskRegistrar.CRON_
|
|||
@Service
|
||||
@DependsOn({"liquibase"})
|
||||
public class EsnsiOkopfSchedulerServiceImpl implements EsnsiOkopfSchedulerService {
|
||||
private static final Logger logger = LoggerFactory.getLogger(
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(
|
||||
EsnsiOkopfSchedulerServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
|
|
@ -48,11 +50,11 @@ public class EsnsiOkopfSchedulerServiceImpl implements EsnsiOkopfSchedulerServic
|
|||
@Transactional
|
||||
public void init() {
|
||||
if (!cronLoad.equals(CRON_DISABLED)) {
|
||||
logger.info("Synchronization with OKOPF enabled");
|
||||
LOGGER.info("Synchronization with OKOPF enabled");
|
||||
load();
|
||||
}
|
||||
else {
|
||||
logger.info("Synchronization with OKOPF disabled");
|
||||
LOGGER.info("Synchronization with OKOPF disabled");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -60,16 +62,21 @@ public class EsnsiOkopfSchedulerServiceImpl implements EsnsiOkopfSchedulerServic
|
|||
@SchedulerLock(name = "loadOkopf")
|
||||
@Transactional
|
||||
public void load() {
|
||||
LOGGER.info("Loading okopf file");
|
||||
String data = esnsiOkopfClient.getJsonOkopFormData();
|
||||
try {
|
||||
logger.info("Loading okopf file");
|
||||
String data = esnsiOkopfClient.getJsonOkopFormData();
|
||||
OkopfOrgModel orgModel = mapper.readValue(data, OkopfOrgModel.class);
|
||||
int currentVersion = mapper.readTree(data).findValue("version").asInt();
|
||||
List<OkopfModel> okopfRecords = mapToOkopfRecords(orgModel.getData(), currentVersion);
|
||||
okopfDao.save(okopfRecords);
|
||||
if (hasText(data)) {
|
||||
OkopfOrgModel orgModel = mapper.readValue(data, OkopfOrgModel.class);
|
||||
int currentVersion = mapper.readTree(data).findValue("version").asInt();
|
||||
List<OkopfModel> okopfRecords = mapToOkopfRecords(orgModel.getData(), currentVersion);
|
||||
okopfDao.saveOrUpdate(okopfRecords);
|
||||
}
|
||||
}
|
||||
catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new JsonParsingException(
|
||||
"Failed to process the JSON response from the esnsi okopf client. Invalid or malformed JSON.",
|
||||
e
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,12 @@
|
|||
package ervu.service.scheduler;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
||||
import ervu.client.fileupload.WebDavClient;
|
||||
import net.javacrumbs.shedlock.core.SchedulerLock;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -11,15 +16,11 @@ import org.springframework.stereotype.Service;
|
|||
*/
|
||||
@Service
|
||||
public class WebDavSchedulerService {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(WebDavSchedulerService.class);
|
||||
private final WebDavClient webDavClient;
|
||||
|
||||
@Value("${file.webdav.upload.url}")
|
||||
private String url;
|
||||
@Value("${file.webdav.upload.username}")
|
||||
private String username;
|
||||
@Value("${file.webdav.upload.password}")
|
||||
private String password;
|
||||
@Value("${webdav.urls}")
|
||||
private String[] urls;
|
||||
@Value("${file.webdav.lifetime.seconds:300}")
|
||||
private long fileLifetime;
|
||||
@Value("${file.webdav.extensions:}")
|
||||
|
|
@ -30,8 +31,15 @@ public class WebDavSchedulerService {
|
|||
}
|
||||
|
||||
@Scheduled(cron = "${webdav.cleanup.cron:0 0 0 * * *}")
|
||||
@SchedulerLock
|
||||
@SchedulerLock(name = "webDavOldFilesCleaning")
|
||||
public void deleteOldFiles() {
|
||||
webDavClient.deleteFilesOlderThan(fileLifetime, url, username, password, fileExtensions);
|
||||
Arrays.stream(urls).forEach(url -> {
|
||||
try {
|
||||
webDavClient.deleteFilesOlderThan(fileLifetime, url, fileExtensions);
|
||||
}
|
||||
catch (IOException e) {
|
||||
LOGGER.error("Failed to clean up WebDAV on {}", url, e);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,76 +0,0 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.DefaultCatalog;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.MainProfile;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.ReasonsAppeal;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.ReviewRating;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.TopicAppeal;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.jooq.Catalog;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.impl.SchemaImpl;
|
||||
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class Appeals extends SchemaImpl {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>appeals</code>
|
||||
*/
|
||||
public static final Appeals APPEALS = new Appeals();
|
||||
|
||||
/**
|
||||
* Основной профиль уровень РФ
|
||||
*/
|
||||
public final MainProfile MAIN_PROFILE = MainProfile.MAIN_PROFILE;
|
||||
|
||||
/**
|
||||
* Причины обжалования уровень РФ
|
||||
*/
|
||||
public final ReasonsAppeal REASONS_APPEAL = ReasonsAppeal.REASONS_APPEAL;
|
||||
|
||||
/**
|
||||
* Рейтинг рассмотрения жалоб уровень РФ
|
||||
*/
|
||||
public final ReviewRating REVIEW_RATING = ReviewRating.REVIEW_RATING;
|
||||
|
||||
/**
|
||||
* Тема обжалования уровень РФ
|
||||
*/
|
||||
public final TopicAppeal TOPIC_APPEAL = TopicAppeal.TOPIC_APPEAL;
|
||||
|
||||
/**
|
||||
* No further instances allowed
|
||||
*/
|
||||
private Appeals() {
|
||||
super("appeals", null);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Catalog getCatalog() {
|
||||
return DefaultCatalog.DEFAULT_CATALOG;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final List<Table<?>> getTables() {
|
||||
return Arrays.asList(
|
||||
MainProfile.MAIN_PROFILE,
|
||||
ReasonsAppeal.REASONS_APPEAL,
|
||||
ReviewRating.REVIEW_RATING,
|
||||
TopicAppeal.TOPIC_APPEAL
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.MainProfile;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.ReasonsAppeal;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.ReviewRating;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.TopicAppeal;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.records.MainProfileRecord;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.records.ReasonsAppealRecord;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.records.ReviewRatingRecord;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.records.TopicAppealRecord;
|
||||
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.Internal;
|
||||
|
||||
|
||||
/**
|
||||
* A class modelling foreign key relationships and constraints of tables in
|
||||
* appeals.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class Keys {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// UNIQUE and PRIMARY KEY definitions
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
public static final UniqueKey<MainProfileRecord> PK_MAIN_PROFILE = Internal.createUniqueKey(MainProfile.MAIN_PROFILE, DSL.name("pk_main_profile"), new TableField[] { MainProfile.MAIN_PROFILE.ID_MAIN_PROFILE }, true);
|
||||
public static final UniqueKey<ReasonsAppealRecord> PK_REASONS_APPEAL = Internal.createUniqueKey(ReasonsAppeal.REASONS_APPEAL, DSL.name("pk_reasons_appeal"), new TableField[] { ReasonsAppeal.REASONS_APPEAL.ID_REASONS_APPEAL }, true);
|
||||
public static final UniqueKey<ReviewRatingRecord> PK_REVIEW_RATING = Internal.createUniqueKey(ReviewRating.REVIEW_RATING, DSL.name("pk_review_rating"), new TableField[] { ReviewRating.REVIEW_RATING.ID_REVIEW_RATING }, true);
|
||||
public static final UniqueKey<TopicAppealRecord> PK_TOPIC_APPEAL = Internal.createUniqueKey(TopicAppeal.TOPIC_APPEAL, DSL.name("pk_topic_appeal"), new TableField[] { TopicAppeal.TOPIC_APPEAL.ID_TOPIC_APPEAL }, true);
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.MainProfile;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.ReasonsAppeal;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.ReviewRating;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.TopicAppeal;
|
||||
|
||||
|
||||
/**
|
||||
* Convenience access to all tables in appeals.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class Tables {
|
||||
|
||||
/**
|
||||
* Основной профиль уровень РФ
|
||||
*/
|
||||
public static final MainProfile MAIN_PROFILE = MainProfile.MAIN_PROFILE;
|
||||
|
||||
/**
|
||||
* Причины обжалования уровень РФ
|
||||
*/
|
||||
public static final ReasonsAppeal REASONS_APPEAL = ReasonsAppeal.REASONS_APPEAL;
|
||||
|
||||
/**
|
||||
* Рейтинг рассмотрения жалоб уровень РФ
|
||||
*/
|
||||
public static final ReviewRating REVIEW_RATING = ReviewRating.REVIEW_RATING;
|
||||
|
||||
/**
|
||||
* Тема обжалования уровень РФ
|
||||
*/
|
||||
public static final TopicAppeal TOPIC_APPEAL = TopicAppeal.TOPIC_APPEAL;
|
||||
}
|
||||
|
|
@ -1,261 +0,0 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.Appeals;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.Keys;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.records.MainProfileRecord;
|
||||
|
||||
import java.sql.Date;
|
||||
import java.util.Collection;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.Identity;
|
||||
import org.jooq.Name;
|
||||
import org.jooq.PlainSQL;
|
||||
import org.jooq.QueryPart;
|
||||
import org.jooq.SQL;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.Select;
|
||||
import org.jooq.Stringly;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.TableOptions;
|
||||
import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
|
||||
/**
|
||||
* Основной профиль уровень РФ
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class MainProfile extends TableImpl<MainProfileRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>appeals.main_profile</code>
|
||||
*/
|
||||
public static final MainProfile MAIN_PROFILE = new MainProfile();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<MainProfileRecord> getRecordType() {
|
||||
return MainProfileRecord.class;
|
||||
}
|
||||
|
||||
/**
|
||||
* The column <code>appeals.main_profile.id_main_profile</code>.
|
||||
*/
|
||||
public final TableField<MainProfileRecord, Long> ID_MAIN_PROFILE = createField(DSL.name("id_main_profile"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.main_profile.gender</code>. Пол
|
||||
*/
|
||||
public final TableField<MainProfileRecord, String> GENDER = createField(DSL.name("gender"), SQLDataType.CLOB, this, "Пол");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.main_profile.age</code>. Возраст
|
||||
*/
|
||||
public final TableField<MainProfileRecord, String> AGE = createField(DSL.name("age"), SQLDataType.CLOB, this, "Возраст");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.main_profile.child_min_18</code>. Дети до 18 лет
|
||||
*/
|
||||
public final TableField<MainProfileRecord, String> CHILD_MIN_18 = createField(DSL.name("child_min_18"), SQLDataType.CLOB, this, "Дети до 18 лет");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.main_profile.education</code>. Образование
|
||||
*/
|
||||
public final TableField<MainProfileRecord, String> EDUCATION = createField(DSL.name("education"), SQLDataType.CLOB, this, "Образование");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.main_profile.employment</code>. Занятость
|
||||
*/
|
||||
public final TableField<MainProfileRecord, String> EMPLOYMENT = createField(DSL.name("employment"), SQLDataType.CLOB, this, "Занятость");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.main_profile.recording_date</code>. Дата записи
|
||||
*/
|
||||
public final TableField<MainProfileRecord, Date> RECORDING_DATE = createField(DSL.name("recording_date"), SQLDataType.DATE.defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.DATE)), this, "Дата записи");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.main_profile.recruitment_id</code>.
|
||||
*/
|
||||
public final TableField<MainProfileRecord, UUID> RECRUITMENT_ID = createField(DSL.name("recruitment_id"), SQLDataType.UUID, this, "");
|
||||
|
||||
private MainProfile(Name alias, Table<MainProfileRecord> aliased) {
|
||||
this(alias, aliased, (Field<?>[]) null, null);
|
||||
}
|
||||
|
||||
private MainProfile(Name alias, Table<MainProfileRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||
super(alias, null, aliased, parameters, DSL.comment("Основной профиль уровень РФ"), TableOptions.table(), where);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>appeals.main_profile</code> table reference
|
||||
*/
|
||||
public MainProfile(String alias) {
|
||||
this(DSL.name(alias), MAIN_PROFILE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>appeals.main_profile</code> table reference
|
||||
*/
|
||||
public MainProfile(Name alias) {
|
||||
this(alias, MAIN_PROFILE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a <code>appeals.main_profile</code> table reference
|
||||
*/
|
||||
public MainProfile() {
|
||||
this(DSL.name("main_profile"), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : Appeals.APPEALS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identity<MainProfileRecord, Long> getIdentity() {
|
||||
return (Identity<MainProfileRecord, Long>) super.getIdentity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<MainProfileRecord> getPrimaryKey() {
|
||||
return Keys.PK_MAIN_PROFILE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MainProfile as(String alias) {
|
||||
return new MainProfile(DSL.name(alias), this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MainProfile as(Name alias) {
|
||||
return new MainProfile(alias, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MainProfile as(Table<?> alias) {
|
||||
return new MainProfile(alias.getQualifiedName(), this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public MainProfile rename(String name) {
|
||||
return new MainProfile(DSL.name(name), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public MainProfile rename(Name name) {
|
||||
return new MainProfile(name, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public MainProfile rename(Table<?> name) {
|
||||
return new MainProfile(name.getQualifiedName(), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public MainProfile where(Condition condition) {
|
||||
return new MainProfile(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public MainProfile where(Collection<? extends Condition> conditions) {
|
||||
return where(DSL.and(conditions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public MainProfile where(Condition... conditions) {
|
||||
return where(DSL.and(conditions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public MainProfile where(Field<Boolean> condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public MainProfile where(SQL condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public MainProfile where(@Stringly.SQL String condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public MainProfile where(@Stringly.SQL String condition, Object... binds) {
|
||||
return where(DSL.condition(condition, binds));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public MainProfile where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||
return where(DSL.condition(condition, parts));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public MainProfile whereExists(Select<?> select) {
|
||||
return where(DSL.exists(select));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public MainProfile whereNotExists(Select<?> select) {
|
||||
return where(DSL.notExists(select));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,277 +0,0 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.Appeals;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.Keys;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.records.ReasonsAppealRecord;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Date;
|
||||
import java.util.Collection;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.Identity;
|
||||
import org.jooq.Name;
|
||||
import org.jooq.PlainSQL;
|
||||
import org.jooq.QueryPart;
|
||||
import org.jooq.SQL;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.Select;
|
||||
import org.jooq.Stringly;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.TableOptions;
|
||||
import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
|
||||
/**
|
||||
* Причины обжалования уровень РФ
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class ReasonsAppeal extends TableImpl<ReasonsAppealRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>appeals.reasons_appeal</code>
|
||||
*/
|
||||
public static final ReasonsAppeal REASONS_APPEAL = new ReasonsAppeal();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<ReasonsAppealRecord> getRecordType() {
|
||||
return ReasonsAppealRecord.class;
|
||||
}
|
||||
|
||||
/**
|
||||
* The column <code>appeals.reasons_appeal.id_reasons_appeal</code>.
|
||||
*/
|
||||
public final TableField<ReasonsAppealRecord, Long> ID_REASONS_APPEAL = createField(DSL.name("id_reasons_appeal"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.reasons_appeal.appeal</code>. Обжалования
|
||||
*/
|
||||
public final TableField<ReasonsAppealRecord, BigDecimal> APPEAL = createField(DSL.name("appeal"), SQLDataType.NUMERIC, this, "Обжалования");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.reasons_appeal.incorrect_inf</code>.
|
||||
* Некорректные сведения
|
||||
*/
|
||||
public final TableField<ReasonsAppealRecord, BigDecimal> INCORRECT_INF = createField(DSL.name("incorrect_inf"), SQLDataType.NUMERIC, this, "Некорректные сведения");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.reasons_appeal.no_data</code>. Нет данных
|
||||
*/
|
||||
public final TableField<ReasonsAppealRecord, BigDecimal> NO_DATA = createField(DSL.name("no_data"), SQLDataType.NUMERIC, this, "Нет данных");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.reasons_appeal.other</code>. Прочее
|
||||
*/
|
||||
public final TableField<ReasonsAppealRecord, BigDecimal> OTHER = createField(DSL.name("other"), SQLDataType.NUMERIC, this, "Прочее");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.reasons_appeal.recording_date</code>. Дата
|
||||
* записи
|
||||
*/
|
||||
public final TableField<ReasonsAppealRecord, Date> RECORDING_DATE = createField(DSL.name("recording_date"), SQLDataType.DATE.defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.DATE)), this, "Дата записи");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.reasons_appeal.incorrect_inf_percent</code>.
|
||||
* Некорректные сведения в процентах
|
||||
*/
|
||||
public final TableField<ReasonsAppealRecord, BigDecimal> INCORRECT_INF_PERCENT = createField(DSL.name("incorrect_inf_percent"), SQLDataType.NUMERIC, this, "Некорректные сведения в процентах");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.reasons_appeal.no_data_percent</code>. Нет
|
||||
* данных в процентах
|
||||
*/
|
||||
public final TableField<ReasonsAppealRecord, BigDecimal> NO_DATA_PERCENT = createField(DSL.name("no_data_percent"), SQLDataType.NUMERIC, this, "Нет данных в процентах");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.reasons_appeal.other_percent</code>. Прочее в
|
||||
* процентах
|
||||
*/
|
||||
public final TableField<ReasonsAppealRecord, BigDecimal> OTHER_PERCENT = createField(DSL.name("other_percent"), SQLDataType.NUMERIC, this, "Прочее в процентах");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.reasons_appeal.recruitment_id</code>.
|
||||
*/
|
||||
public final TableField<ReasonsAppealRecord, UUID> RECRUITMENT_ID = createField(DSL.name("recruitment_id"), SQLDataType.UUID, this, "");
|
||||
|
||||
private ReasonsAppeal(Name alias, Table<ReasonsAppealRecord> aliased) {
|
||||
this(alias, aliased, (Field<?>[]) null, null);
|
||||
}
|
||||
|
||||
private ReasonsAppeal(Name alias, Table<ReasonsAppealRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||
super(alias, null, aliased, parameters, DSL.comment("Причины обжалования уровень РФ"), TableOptions.table(), where);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>appeals.reasons_appeal</code> table reference
|
||||
*/
|
||||
public ReasonsAppeal(String alias) {
|
||||
this(DSL.name(alias), REASONS_APPEAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>appeals.reasons_appeal</code> table reference
|
||||
*/
|
||||
public ReasonsAppeal(Name alias) {
|
||||
this(alias, REASONS_APPEAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a <code>appeals.reasons_appeal</code> table reference
|
||||
*/
|
||||
public ReasonsAppeal() {
|
||||
this(DSL.name("reasons_appeal"), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : Appeals.APPEALS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identity<ReasonsAppealRecord, Long> getIdentity() {
|
||||
return (Identity<ReasonsAppealRecord, Long>) super.getIdentity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<ReasonsAppealRecord> getPrimaryKey() {
|
||||
return Keys.PK_REASONS_APPEAL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReasonsAppeal as(String alias) {
|
||||
return new ReasonsAppeal(DSL.name(alias), this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReasonsAppeal as(Name alias) {
|
||||
return new ReasonsAppeal(alias, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReasonsAppeal as(Table<?> alias) {
|
||||
return new ReasonsAppeal(alias.getQualifiedName(), this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public ReasonsAppeal rename(String name) {
|
||||
return new ReasonsAppeal(DSL.name(name), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public ReasonsAppeal rename(Name name) {
|
||||
return new ReasonsAppeal(name, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public ReasonsAppeal rename(Table<?> name) {
|
||||
return new ReasonsAppeal(name.getQualifiedName(), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public ReasonsAppeal where(Condition condition) {
|
||||
return new ReasonsAppeal(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public ReasonsAppeal where(Collection<? extends Condition> conditions) {
|
||||
return where(DSL.and(conditions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public ReasonsAppeal where(Condition... conditions) {
|
||||
return where(DSL.and(conditions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public ReasonsAppeal where(Field<Boolean> condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public ReasonsAppeal where(SQL condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public ReasonsAppeal where(@Stringly.SQL String condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public ReasonsAppeal where(@Stringly.SQL String condition, Object... binds) {
|
||||
return where(DSL.condition(condition, binds));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public ReasonsAppeal where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||
return where(DSL.condition(condition, parts));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public ReasonsAppeal whereExists(Select<?> select) {
|
||||
return where(DSL.exists(select));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public ReasonsAppeal whereNotExists(Select<?> select) {
|
||||
return where(DSL.notExists(select));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,254 +0,0 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.Appeals;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.Keys;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.records.ReviewRatingRecord;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Date;
|
||||
import java.util.Collection;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.Identity;
|
||||
import org.jooq.Name;
|
||||
import org.jooq.PlainSQL;
|
||||
import org.jooq.QueryPart;
|
||||
import org.jooq.SQL;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.Select;
|
||||
import org.jooq.Stringly;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.TableOptions;
|
||||
import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
|
||||
/**
|
||||
* Рейтинг рассмотрения жалоб уровень РФ
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class ReviewRating extends TableImpl<ReviewRatingRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>appeals.review_rating</code>
|
||||
*/
|
||||
public static final ReviewRating REVIEW_RATING = new ReviewRating();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<ReviewRatingRecord> getRecordType() {
|
||||
return ReviewRatingRecord.class;
|
||||
}
|
||||
|
||||
/**
|
||||
* The column <code>appeals.review_rating.id_review_rating</code>.
|
||||
*/
|
||||
public final TableField<ReviewRatingRecord, Long> ID_REVIEW_RATING = createField(DSL.name("id_review_rating"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.review_rating.speed</code>. Скорость
|
||||
* рассмотрения
|
||||
*/
|
||||
public final TableField<ReviewRatingRecord, BigDecimal> SPEED = createField(DSL.name("speed"), SQLDataType.NUMERIC, this, "Скорость рассмотрения");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.review_rating.rating</code>. Оценка
|
||||
* удовлетворенности
|
||||
*/
|
||||
public final TableField<ReviewRatingRecord, BigDecimal> RATING = createField(DSL.name("rating"), SQLDataType.NUMERIC, this, "Оценка удовлетворенности");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.review_rating.recording_date</code>. Дата записи
|
||||
*/
|
||||
public final TableField<ReviewRatingRecord, Date> RECORDING_DATE = createField(DSL.name("recording_date"), SQLDataType.DATE.defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.DATE)), this, "Дата записи");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.review_rating.id_region</code>.
|
||||
*/
|
||||
public final TableField<ReviewRatingRecord, Long> ID_REGION = createField(DSL.name("id_region"), SQLDataType.BIGINT, this, "");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.review_rating.recruitment_id</code>.
|
||||
*/
|
||||
public final TableField<ReviewRatingRecord, UUID> RECRUITMENT_ID = createField(DSL.name("recruitment_id"), SQLDataType.UUID, this, "");
|
||||
|
||||
private ReviewRating(Name alias, Table<ReviewRatingRecord> aliased) {
|
||||
this(alias, aliased, (Field<?>[]) null, null);
|
||||
}
|
||||
|
||||
private ReviewRating(Name alias, Table<ReviewRatingRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||
super(alias, null, aliased, parameters, DSL.comment("Рейтинг рассмотрения жалоб уровень РФ"), TableOptions.table(), where);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>appeals.review_rating</code> table reference
|
||||
*/
|
||||
public ReviewRating(String alias) {
|
||||
this(DSL.name(alias), REVIEW_RATING);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>appeals.review_rating</code> table reference
|
||||
*/
|
||||
public ReviewRating(Name alias) {
|
||||
this(alias, REVIEW_RATING);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a <code>appeals.review_rating</code> table reference
|
||||
*/
|
||||
public ReviewRating() {
|
||||
this(DSL.name("review_rating"), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : Appeals.APPEALS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identity<ReviewRatingRecord, Long> getIdentity() {
|
||||
return (Identity<ReviewRatingRecord, Long>) super.getIdentity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<ReviewRatingRecord> getPrimaryKey() {
|
||||
return Keys.PK_REVIEW_RATING;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReviewRating as(String alias) {
|
||||
return new ReviewRating(DSL.name(alias), this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReviewRating as(Name alias) {
|
||||
return new ReviewRating(alias, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReviewRating as(Table<?> alias) {
|
||||
return new ReviewRating(alias.getQualifiedName(), this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public ReviewRating rename(String name) {
|
||||
return new ReviewRating(DSL.name(name), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public ReviewRating rename(Name name) {
|
||||
return new ReviewRating(name, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public ReviewRating rename(Table<?> name) {
|
||||
return new ReviewRating(name.getQualifiedName(), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public ReviewRating where(Condition condition) {
|
||||
return new ReviewRating(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public ReviewRating where(Collection<? extends Condition> conditions) {
|
||||
return where(DSL.and(conditions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public ReviewRating where(Condition... conditions) {
|
||||
return where(DSL.and(conditions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public ReviewRating where(Field<Boolean> condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public ReviewRating where(SQL condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public ReviewRating where(@Stringly.SQL String condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public ReviewRating where(@Stringly.SQL String condition, Object... binds) {
|
||||
return where(DSL.condition(condition, binds));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public ReviewRating where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||
return where(DSL.condition(condition, parts));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public ReviewRating whereExists(Select<?> select) {
|
||||
return where(DSL.exists(select));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public ReviewRating whereNotExists(Select<?> select) {
|
||||
return where(DSL.notExists(select));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,285 +0,0 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.Appeals;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.Keys;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.records.TopicAppealRecord;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Date;
|
||||
import java.util.Collection;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.Identity;
|
||||
import org.jooq.Name;
|
||||
import org.jooq.PlainSQL;
|
||||
import org.jooq.QueryPart;
|
||||
import org.jooq.SQL;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.Select;
|
||||
import org.jooq.Stringly;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.TableOptions;
|
||||
import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
|
||||
/**
|
||||
* Тема обжалования уровень РФ
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class TopicAppeal extends TableImpl<TopicAppealRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>appeals.topic_appeal</code>
|
||||
*/
|
||||
public static final TopicAppeal TOPIC_APPEAL = new TopicAppeal();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<TopicAppealRecord> getRecordType() {
|
||||
return TopicAppealRecord.class;
|
||||
}
|
||||
|
||||
/**
|
||||
* The column <code>appeals.topic_appeal.id_topic_appeal</code>.
|
||||
*/
|
||||
public final TableField<TopicAppealRecord, Long> ID_TOPIC_APPEAL = createField(DSL.name("id_topic_appeal"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.topic_appeal.registration</code>. Тема
|
||||
* обжалования постановка на учет
|
||||
*/
|
||||
public final TableField<TopicAppealRecord, BigDecimal> REGISTRATION = createField(DSL.name("registration"), SQLDataType.NUMERIC, this, "Тема обжалования постановка на учет");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.topic_appeal.sabpoena</code>. Тема обжалования
|
||||
* повестки
|
||||
*/
|
||||
public final TableField<TopicAppealRecord, BigDecimal> SABPOENA = createField(DSL.name("sabpoena"), SQLDataType.NUMERIC, this, "Тема обжалования повестки");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.topic_appeal.appear</code>. Тема обжалования
|
||||
* явка
|
||||
*/
|
||||
public final TableField<TopicAppealRecord, BigDecimal> APPEAR = createField(DSL.name("appear"), SQLDataType.NUMERIC, this, "Тема обжалования явка");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.topic_appeal.temporary_measures</code>. Тема
|
||||
* обжалования временные меры
|
||||
*/
|
||||
public final TableField<TopicAppealRecord, BigDecimal> TEMPORARY_MEASURES = createField(DSL.name("temporary_measures"), SQLDataType.NUMERIC, this, "Тема обжалования временные меры");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.topic_appeal.recording_date</code>. Дата записи
|
||||
*/
|
||||
public final TableField<TopicAppealRecord, Date> RECORDING_DATE = createField(DSL.name("recording_date"), SQLDataType.DATE.defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.DATE)), this, "Дата записи");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.topic_appeal.registration_percent</code>. Тема
|
||||
* обжалования постановка на учет в процентах
|
||||
*/
|
||||
public final TableField<TopicAppealRecord, BigDecimal> REGISTRATION_PERCENT = createField(DSL.name("registration_percent"), SQLDataType.NUMERIC, this, "Тема обжалования постановка на учет в процентах");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.topic_appeal.sabpoena_percent</code>. Тема
|
||||
* обжалования повестки в процентах
|
||||
*/
|
||||
public final TableField<TopicAppealRecord, BigDecimal> SABPOENA_PERCENT = createField(DSL.name("sabpoena_percent"), SQLDataType.NUMERIC, this, "Тема обжалования повестки в процентах");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.topic_appeal.appear_percent</code>. Тема
|
||||
* обжалования явка в процентах
|
||||
*/
|
||||
public final TableField<TopicAppealRecord, BigDecimal> APPEAR_PERCENT = createField(DSL.name("appear_percent"), SQLDataType.NUMERIC, this, "Тема обжалования явка в процентах");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.topic_appeal.temporary_measures_percent</code>.
|
||||
* Тема обжалования временные меры в процентах
|
||||
*/
|
||||
public final TableField<TopicAppealRecord, BigDecimal> TEMPORARY_MEASURES_PERCENT = createField(DSL.name("temporary_measures_percent"), SQLDataType.NUMERIC, this, "Тема обжалования временные меры в процентах");
|
||||
|
||||
/**
|
||||
* The column <code>appeals.topic_appeal.recruitment_id</code>.
|
||||
*/
|
||||
public final TableField<TopicAppealRecord, UUID> RECRUITMENT_ID = createField(DSL.name("recruitment_id"), SQLDataType.UUID, this, "");
|
||||
|
||||
private TopicAppeal(Name alias, Table<TopicAppealRecord> aliased) {
|
||||
this(alias, aliased, (Field<?>[]) null, null);
|
||||
}
|
||||
|
||||
private TopicAppeal(Name alias, Table<TopicAppealRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||
super(alias, null, aliased, parameters, DSL.comment("Тема обжалования уровень РФ"), TableOptions.table(), where);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>appeals.topic_appeal</code> table reference
|
||||
*/
|
||||
public TopicAppeal(String alias) {
|
||||
this(DSL.name(alias), TOPIC_APPEAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>appeals.topic_appeal</code> table reference
|
||||
*/
|
||||
public TopicAppeal(Name alias) {
|
||||
this(alias, TOPIC_APPEAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a <code>appeals.topic_appeal</code> table reference
|
||||
*/
|
||||
public TopicAppeal() {
|
||||
this(DSL.name("topic_appeal"), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : Appeals.APPEALS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identity<TopicAppealRecord, Long> getIdentity() {
|
||||
return (Identity<TopicAppealRecord, Long>) super.getIdentity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<TopicAppealRecord> getPrimaryKey() {
|
||||
return Keys.PK_TOPIC_APPEAL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TopicAppeal as(String alias) {
|
||||
return new TopicAppeal(DSL.name(alias), this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TopicAppeal as(Name alias) {
|
||||
return new TopicAppeal(alias, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TopicAppeal as(Table<?> alias) {
|
||||
return new TopicAppeal(alias.getQualifiedName(), this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public TopicAppeal rename(String name) {
|
||||
return new TopicAppeal(DSL.name(name), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public TopicAppeal rename(Name name) {
|
||||
return new TopicAppeal(name, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public TopicAppeal rename(Table<?> name) {
|
||||
return new TopicAppeal(name.getQualifiedName(), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public TopicAppeal where(Condition condition) {
|
||||
return new TopicAppeal(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public TopicAppeal where(Collection<? extends Condition> conditions) {
|
||||
return where(DSL.and(conditions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public TopicAppeal where(Condition... conditions) {
|
||||
return where(DSL.and(conditions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public TopicAppeal where(Field<Boolean> condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public TopicAppeal where(SQL condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public TopicAppeal where(@Stringly.SQL String condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public TopicAppeal where(@Stringly.SQL String condition, Object... binds) {
|
||||
return where(DSL.condition(condition, binds));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public TopicAppeal where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||
return where(DSL.condition(condition, parts));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public TopicAppeal whereExists(Select<?> select) {
|
||||
return where(DSL.exists(select));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public TopicAppeal whereNotExists(Select<?> select) {
|
||||
return where(DSL.notExists(select));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,172 +0,0 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.records;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.MainProfile;
|
||||
|
||||
import java.sql.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.jooq.Record1;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
|
||||
|
||||
/**
|
||||
* Основной профиль уровень РФ
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class MainProfileRecord extends UpdatableRecordImpl<MainProfileRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.main_profile.id_main_profile</code>.
|
||||
*/
|
||||
public void setIdMainProfile(Long value) {
|
||||
set(0, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.main_profile.id_main_profile</code>.
|
||||
*/
|
||||
public Long getIdMainProfile() {
|
||||
return (Long) get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.main_profile.gender</code>. Пол
|
||||
*/
|
||||
public void setGender(String value) {
|
||||
set(1, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.main_profile.gender</code>. Пол
|
||||
*/
|
||||
public String getGender() {
|
||||
return (String) get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.main_profile.age</code>. Возраст
|
||||
*/
|
||||
public void setAge(String value) {
|
||||
set(2, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.main_profile.age</code>. Возраст
|
||||
*/
|
||||
public String getAge() {
|
||||
return (String) get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.main_profile.child_min_18</code>. Дети до 18 лет
|
||||
*/
|
||||
public void setChildMin_18(String value) {
|
||||
set(3, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.main_profile.child_min_18</code>. Дети до 18 лет
|
||||
*/
|
||||
public String getChildMin_18() {
|
||||
return (String) get(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.main_profile.education</code>. Образование
|
||||
*/
|
||||
public void setEducation(String value) {
|
||||
set(4, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.main_profile.education</code>. Образование
|
||||
*/
|
||||
public String getEducation() {
|
||||
return (String) get(4);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.main_profile.employment</code>. Занятость
|
||||
*/
|
||||
public void setEmployment(String value) {
|
||||
set(5, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.main_profile.employment</code>. Занятость
|
||||
*/
|
||||
public String getEmployment() {
|
||||
return (String) get(5);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.main_profile.recording_date</code>. Дата записи
|
||||
*/
|
||||
public void setRecordingDate(Date value) {
|
||||
set(6, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.main_profile.recording_date</code>. Дата записи
|
||||
*/
|
||||
public Date getRecordingDate() {
|
||||
return (Date) get(6);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.main_profile.recruitment_id</code>.
|
||||
*/
|
||||
public void setRecruitmentId(UUID value) {
|
||||
set(7, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.main_profile.recruitment_id</code>.
|
||||
*/
|
||||
public UUID getRecruitmentId() {
|
||||
return (UUID) get(7);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Record1<Long> key() {
|
||||
return (Record1) super.key();
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Create a detached MainProfileRecord
|
||||
*/
|
||||
public MainProfileRecord() {
|
||||
super(MainProfile.MAIN_PROFILE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialised MainProfileRecord
|
||||
*/
|
||||
public MainProfileRecord(Long idMainProfile, String gender, String age, String childMin_18, String education, String employment, Date recordingDate, UUID recruitmentId) {
|
||||
super(MainProfile.MAIN_PROFILE);
|
||||
|
||||
setIdMainProfile(idMainProfile);
|
||||
setGender(gender);
|
||||
setAge(age);
|
||||
setChildMin_18(childMin_18);
|
||||
setEducation(education);
|
||||
setEmployment(employment);
|
||||
setRecordingDate(recordingDate);
|
||||
setRecruitmentId(recruitmentId);
|
||||
resetChangedOnNotNull();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,213 +0,0 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.records;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.ReasonsAppeal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.jooq.Record1;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
|
||||
|
||||
/**
|
||||
* Причины обжалования уровень РФ
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class ReasonsAppealRecord extends UpdatableRecordImpl<ReasonsAppealRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.reasons_appeal.id_reasons_appeal</code>.
|
||||
*/
|
||||
public void setIdReasonsAppeal(Long value) {
|
||||
set(0, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.reasons_appeal.id_reasons_appeal</code>.
|
||||
*/
|
||||
public Long getIdReasonsAppeal() {
|
||||
return (Long) get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.reasons_appeal.appeal</code>. Обжалования
|
||||
*/
|
||||
public void setAppeal(BigDecimal value) {
|
||||
set(1, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.reasons_appeal.appeal</code>. Обжалования
|
||||
*/
|
||||
public BigDecimal getAppeal() {
|
||||
return (BigDecimal) get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.reasons_appeal.incorrect_inf</code>.
|
||||
* Некорректные сведения
|
||||
*/
|
||||
public void setIncorrectInf(BigDecimal value) {
|
||||
set(2, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.reasons_appeal.incorrect_inf</code>.
|
||||
* Некорректные сведения
|
||||
*/
|
||||
public BigDecimal getIncorrectInf() {
|
||||
return (BigDecimal) get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.reasons_appeal.no_data</code>. Нет данных
|
||||
*/
|
||||
public void setNoData(BigDecimal value) {
|
||||
set(3, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.reasons_appeal.no_data</code>. Нет данных
|
||||
*/
|
||||
public BigDecimal getNoData() {
|
||||
return (BigDecimal) get(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.reasons_appeal.other</code>. Прочее
|
||||
*/
|
||||
public void setOther(BigDecimal value) {
|
||||
set(4, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.reasons_appeal.other</code>. Прочее
|
||||
*/
|
||||
public BigDecimal getOther() {
|
||||
return (BigDecimal) get(4);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.reasons_appeal.recording_date</code>. Дата
|
||||
* записи
|
||||
*/
|
||||
public void setRecordingDate(Date value) {
|
||||
set(5, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.reasons_appeal.recording_date</code>. Дата
|
||||
* записи
|
||||
*/
|
||||
public Date getRecordingDate() {
|
||||
return (Date) get(5);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.reasons_appeal.incorrect_inf_percent</code>.
|
||||
* Некорректные сведения в процентах
|
||||
*/
|
||||
public void setIncorrectInfPercent(BigDecimal value) {
|
||||
set(6, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.reasons_appeal.incorrect_inf_percent</code>.
|
||||
* Некорректные сведения в процентах
|
||||
*/
|
||||
public BigDecimal getIncorrectInfPercent() {
|
||||
return (BigDecimal) get(6);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.reasons_appeal.no_data_percent</code>. Нет
|
||||
* данных в процентах
|
||||
*/
|
||||
public void setNoDataPercent(BigDecimal value) {
|
||||
set(7, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.reasons_appeal.no_data_percent</code>. Нет
|
||||
* данных в процентах
|
||||
*/
|
||||
public BigDecimal getNoDataPercent() {
|
||||
return (BigDecimal) get(7);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.reasons_appeal.other_percent</code>. Прочее в
|
||||
* процентах
|
||||
*/
|
||||
public void setOtherPercent(BigDecimal value) {
|
||||
set(8, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.reasons_appeal.other_percent</code>. Прочее в
|
||||
* процентах
|
||||
*/
|
||||
public BigDecimal getOtherPercent() {
|
||||
return (BigDecimal) get(8);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.reasons_appeal.recruitment_id</code>.
|
||||
*/
|
||||
public void setRecruitmentId(UUID value) {
|
||||
set(9, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.reasons_appeal.recruitment_id</code>.
|
||||
*/
|
||||
public UUID getRecruitmentId() {
|
||||
return (UUID) get(9);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Record1<Long> key() {
|
||||
return (Record1) super.key();
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Create a detached ReasonsAppealRecord
|
||||
*/
|
||||
public ReasonsAppealRecord() {
|
||||
super(ReasonsAppeal.REASONS_APPEAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialised ReasonsAppealRecord
|
||||
*/
|
||||
public ReasonsAppealRecord(Long idReasonsAppeal, BigDecimal appeal, BigDecimal incorrectInf, BigDecimal noData, BigDecimal other, Date recordingDate, BigDecimal incorrectInfPercent, BigDecimal noDataPercent, BigDecimal otherPercent, UUID recruitmentId) {
|
||||
super(ReasonsAppeal.REASONS_APPEAL);
|
||||
|
||||
setIdReasonsAppeal(idReasonsAppeal);
|
||||
setAppeal(appeal);
|
||||
setIncorrectInf(incorrectInf);
|
||||
setNoData(noData);
|
||||
setOther(other);
|
||||
setRecordingDate(recordingDate);
|
||||
setIncorrectInfPercent(incorrectInfPercent);
|
||||
setNoDataPercent(noDataPercent);
|
||||
setOtherPercent(otherPercent);
|
||||
setRecruitmentId(recruitmentId);
|
||||
resetChangedOnNotNull();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,147 +0,0 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.records;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.ReviewRating;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.jooq.Record1;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
|
||||
|
||||
/**
|
||||
* Рейтинг рассмотрения жалоб уровень РФ
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class ReviewRatingRecord extends UpdatableRecordImpl<ReviewRatingRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.review_rating.id_review_rating</code>.
|
||||
*/
|
||||
public void setIdReviewRating(Long value) {
|
||||
set(0, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.review_rating.id_review_rating</code>.
|
||||
*/
|
||||
public Long getIdReviewRating() {
|
||||
return (Long) get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.review_rating.speed</code>. Скорость
|
||||
* рассмотрения
|
||||
*/
|
||||
public void setSpeed(BigDecimal value) {
|
||||
set(1, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.review_rating.speed</code>. Скорость
|
||||
* рассмотрения
|
||||
*/
|
||||
public BigDecimal getSpeed() {
|
||||
return (BigDecimal) get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.review_rating.rating</code>. Оценка
|
||||
* удовлетворенности
|
||||
*/
|
||||
public void setRating(BigDecimal value) {
|
||||
set(2, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.review_rating.rating</code>. Оценка
|
||||
* удовлетворенности
|
||||
*/
|
||||
public BigDecimal getRating() {
|
||||
return (BigDecimal) get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.review_rating.recording_date</code>. Дата записи
|
||||
*/
|
||||
public void setRecordingDate(Date value) {
|
||||
set(3, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.review_rating.recording_date</code>. Дата записи
|
||||
*/
|
||||
public Date getRecordingDate() {
|
||||
return (Date) get(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.review_rating.id_region</code>.
|
||||
*/
|
||||
public void setIdRegion(Long value) {
|
||||
set(4, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.review_rating.id_region</code>.
|
||||
*/
|
||||
public Long getIdRegion() {
|
||||
return (Long) get(4);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.review_rating.recruitment_id</code>.
|
||||
*/
|
||||
public void setRecruitmentId(UUID value) {
|
||||
set(5, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.review_rating.recruitment_id</code>.
|
||||
*/
|
||||
public UUID getRecruitmentId() {
|
||||
return (UUID) get(5);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Record1<Long> key() {
|
||||
return (Record1) super.key();
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Create a detached ReviewRatingRecord
|
||||
*/
|
||||
public ReviewRatingRecord() {
|
||||
super(ReviewRating.REVIEW_RATING);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialised ReviewRatingRecord
|
||||
*/
|
||||
public ReviewRatingRecord(Long idReviewRating, BigDecimal speed, BigDecimal rating, Date recordingDate, Long idRegion, UUID recruitmentId) {
|
||||
super(ReviewRating.REVIEW_RATING);
|
||||
|
||||
setIdReviewRating(idReviewRating);
|
||||
setSpeed(speed);
|
||||
setRating(rating);
|
||||
setRecordingDate(recordingDate);
|
||||
setIdRegion(idRegion);
|
||||
setRecruitmentId(recruitmentId);
|
||||
resetChangedOnNotNull();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,234 +0,0 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.records;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.appeals.tables.TopicAppeal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.jooq.Record1;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
|
||||
|
||||
/**
|
||||
* Тема обжалования уровень РФ
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class TopicAppealRecord extends UpdatableRecordImpl<TopicAppealRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.topic_appeal.id_topic_appeal</code>.
|
||||
*/
|
||||
public void setIdTopicAppeal(Long value) {
|
||||
set(0, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.topic_appeal.id_topic_appeal</code>.
|
||||
*/
|
||||
public Long getIdTopicAppeal() {
|
||||
return (Long) get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.topic_appeal.registration</code>. Тема
|
||||
* обжалования постановка на учет
|
||||
*/
|
||||
public void setRegistration(BigDecimal value) {
|
||||
set(1, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.topic_appeal.registration</code>. Тема
|
||||
* обжалования постановка на учет
|
||||
*/
|
||||
public BigDecimal getRegistration() {
|
||||
return (BigDecimal) get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.topic_appeal.sabpoena</code>. Тема обжалования
|
||||
* повестки
|
||||
*/
|
||||
public void setSabpoena(BigDecimal value) {
|
||||
set(2, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.topic_appeal.sabpoena</code>. Тема обжалования
|
||||
* повестки
|
||||
*/
|
||||
public BigDecimal getSabpoena() {
|
||||
return (BigDecimal) get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.topic_appeal.appear</code>. Тема обжалования
|
||||
* явка
|
||||
*/
|
||||
public void setAppear(BigDecimal value) {
|
||||
set(3, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.topic_appeal.appear</code>. Тема обжалования
|
||||
* явка
|
||||
*/
|
||||
public BigDecimal getAppear() {
|
||||
return (BigDecimal) get(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.topic_appeal.temporary_measures</code>. Тема
|
||||
* обжалования временные меры
|
||||
*/
|
||||
public void setTemporaryMeasures(BigDecimal value) {
|
||||
set(4, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.topic_appeal.temporary_measures</code>. Тема
|
||||
* обжалования временные меры
|
||||
*/
|
||||
public BigDecimal getTemporaryMeasures() {
|
||||
return (BigDecimal) get(4);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.topic_appeal.recording_date</code>. Дата записи
|
||||
*/
|
||||
public void setRecordingDate(Date value) {
|
||||
set(5, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.topic_appeal.recording_date</code>. Дата записи
|
||||
*/
|
||||
public Date getRecordingDate() {
|
||||
return (Date) get(5);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.topic_appeal.registration_percent</code>. Тема
|
||||
* обжалования постановка на учет в процентах
|
||||
*/
|
||||
public void setRegistrationPercent(BigDecimal value) {
|
||||
set(6, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.topic_appeal.registration_percent</code>. Тема
|
||||
* обжалования постановка на учет в процентах
|
||||
*/
|
||||
public BigDecimal getRegistrationPercent() {
|
||||
return (BigDecimal) get(6);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.topic_appeal.sabpoena_percent</code>. Тема
|
||||
* обжалования повестки в процентах
|
||||
*/
|
||||
public void setSabpoenaPercent(BigDecimal value) {
|
||||
set(7, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.topic_appeal.sabpoena_percent</code>. Тема
|
||||
* обжалования повестки в процентах
|
||||
*/
|
||||
public BigDecimal getSabpoenaPercent() {
|
||||
return (BigDecimal) get(7);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.topic_appeal.appear_percent</code>. Тема
|
||||
* обжалования явка в процентах
|
||||
*/
|
||||
public void setAppearPercent(BigDecimal value) {
|
||||
set(8, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.topic_appeal.appear_percent</code>. Тема
|
||||
* обжалования явка в процентах
|
||||
*/
|
||||
public BigDecimal getAppearPercent() {
|
||||
return (BigDecimal) get(8);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.topic_appeal.temporary_measures_percent</code>.
|
||||
* Тема обжалования временные меры в процентах
|
||||
*/
|
||||
public void setTemporaryMeasuresPercent(BigDecimal value) {
|
||||
set(9, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.topic_appeal.temporary_measures_percent</code>.
|
||||
* Тема обжалования временные меры в процентах
|
||||
*/
|
||||
public BigDecimal getTemporaryMeasuresPercent() {
|
||||
return (BigDecimal) get(9);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>appeals.topic_appeal.recruitment_id</code>.
|
||||
*/
|
||||
public void setRecruitmentId(UUID value) {
|
||||
set(10, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>appeals.topic_appeal.recruitment_id</code>.
|
||||
*/
|
||||
public UUID getRecruitmentId() {
|
||||
return (UUID) get(10);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Record1<Long> key() {
|
||||
return (Record1) super.key();
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Create a detached TopicAppealRecord
|
||||
*/
|
||||
public TopicAppealRecord() {
|
||||
super(TopicAppeal.TOPIC_APPEAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialised TopicAppealRecord
|
||||
*/
|
||||
public TopicAppealRecord(Long idTopicAppeal, BigDecimal registration, BigDecimal sabpoena, BigDecimal appear, BigDecimal temporaryMeasures, Date recordingDate, BigDecimal registrationPercent, BigDecimal sabpoenaPercent, BigDecimal appearPercent, BigDecimal temporaryMeasuresPercent, UUID recruitmentId) {
|
||||
super(TopicAppeal.TOPIC_APPEAL);
|
||||
|
||||
setIdTopicAppeal(idTopicAppeal);
|
||||
setRegistration(registration);
|
||||
setSabpoena(sabpoena);
|
||||
setAppear(appear);
|
||||
setTemporaryMeasures(temporaryMeasures);
|
||||
setRecordingDate(recordingDate);
|
||||
setRegistrationPercent(registrationPercent);
|
||||
setSabpoenaPercent(sabpoenaPercent);
|
||||
setAppearPercent(appearPercent);
|
||||
setTemporaryMeasuresPercent(temporaryMeasuresPercent);
|
||||
setRecruitmentId(recruitmentId);
|
||||
resetChangedOnNotNull();
|
||||
}
|
||||
}
|
||||
|
|
@ -4,14 +4,16 @@
|
|||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Databasechangeloglock;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Files;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.InteractionLog;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.OkopfRecords;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.OrgOkved;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Shedlock;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records.DatabasechangeloglockRecord;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records.FilesRecord;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records.InteractionLogRecord;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records.OkopfRecordsRecord;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records.OrgOkvedRecord;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records.ShedlockRecord;
|
||||
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.UniqueKey;
|
||||
|
|
@ -30,9 +32,10 @@ public class Keys {
|
|||
// UNIQUE and PRIMARY KEY definitions
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
public static final UniqueKey<DatabasechangeloglockRecord> DATABASECHANGELOGLOCK_PKEY = Internal.createUniqueKey(Databasechangeloglock.DATABASECHANGELOGLOCK, DSL.name("databasechangeloglock_pkey"), new TableField[] { Databasechangeloglock.DATABASECHANGELOGLOCK.ID }, true);
|
||||
public static final UniqueKey<FilesRecord> FILES_PKEY = Internal.createUniqueKey(Files.FILES, DSL.name("files_pkey"), new TableField[] { Files.FILES.FILE_ID }, true);
|
||||
public static final UniqueKey<InteractionLogRecord> INTERACTION_LOG_PKEY = Internal.createUniqueKey(InteractionLog.INTERACTION_LOG, DSL.name("interaction_log_pkey"), new TableField[] { InteractionLog.INTERACTION_LOG.ID }, true);
|
||||
public static final UniqueKey<OkopfRecordsRecord> OKOPF_RECORDS_NAME_KEY = Internal.createUniqueKey(OkopfRecords.OKOPF_RECORDS, DSL.name("okopf_records_name_key"), new TableField[] { OkopfRecords.OKOPF_RECORDS.NAME }, true);
|
||||
public static final UniqueKey<OkopfRecordsRecord> OKOPF_RECORDS_PKEY = Internal.createUniqueKey(OkopfRecords.OKOPF_RECORDS, DSL.name("okopf_records_pkey"), new TableField[] { OkopfRecords.OKOPF_RECORDS.OKOPF_RECORDS_ID }, true);
|
||||
public static final UniqueKey<OrgOkvedRecord> ORG_OKVED_PKEY = Internal.createUniqueKey(OrgOkved.ORG_OKVED, DSL.name("org_okved_pkey"), new TableField[] { OrgOkved.ORG_OKVED.ID }, true);
|
||||
public static final UniqueKey<ShedlockRecord> SHEDLOCK_PK = Internal.createUniqueKey(Shedlock.SHEDLOCK, DSL.name("shedlock_pk"), new TableField[] { Shedlock.SHEDLOCK.NAME }, true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,10 +5,13 @@ package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_;
|
|||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.DefaultCatalog;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Databasechangelog;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Databasechangeloglock;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Files;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.InteractionLog;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.OkopfRecords;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.OrgOkved;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Shedlock;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
|
@ -31,6 +34,16 @@ public class Public extends SchemaImpl {
|
|||
*/
|
||||
public static final Public PUBLIC = new Public();
|
||||
|
||||
/**
|
||||
* The table <code>public.databasechangelog</code>.
|
||||
*/
|
||||
public final Databasechangelog DATABASECHANGELOG = Databasechangelog.DATABASECHANGELOG;
|
||||
|
||||
/**
|
||||
* The table <code>public.databasechangeloglock</code>.
|
||||
*/
|
||||
public final Databasechangeloglock DATABASECHANGELOGLOCK = Databasechangeloglock.DATABASECHANGELOGLOCK;
|
||||
|
||||
/**
|
||||
* The table <code>public.files</code>.
|
||||
*/
|
||||
|
|
@ -51,6 +64,11 @@ public class Public extends SchemaImpl {
|
|||
*/
|
||||
public final OrgOkved ORG_OKVED = OrgOkved.ORG_OKVED;
|
||||
|
||||
/**
|
||||
* The table <code>public.shedlock</code>.
|
||||
*/
|
||||
public final Shedlock SHEDLOCK = Shedlock.SHEDLOCK;
|
||||
|
||||
/**
|
||||
* No further instances allowed
|
||||
*/
|
||||
|
|
@ -67,10 +85,13 @@ public class Public extends SchemaImpl {
|
|||
@Override
|
||||
public final List<Table<?>> getTables() {
|
||||
return Arrays.asList(
|
||||
Databasechangelog.DATABASECHANGELOG,
|
||||
Databasechangeloglock.DATABASECHANGELOGLOCK,
|
||||
Files.FILES,
|
||||
InteractionLog.INTERACTION_LOG,
|
||||
OkopfRecords.OKOPF_RECORDS,
|
||||
OrgOkved.ORG_OKVED
|
||||
OrgOkved.ORG_OKVED,
|
||||
Shedlock.SHEDLOCK
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,10 +4,13 @@
|
|||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Databasechangelog;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Databasechangeloglock;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Files;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.InteractionLog;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.OkopfRecords;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.OrgOkved;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Shedlock;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -16,6 +19,16 @@ import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.OrgOkved;
|
|||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class Tables {
|
||||
|
||||
/**
|
||||
* The table <code>public.databasechangelog</code>.
|
||||
*/
|
||||
public static final Databasechangelog DATABASECHANGELOG = Databasechangelog.DATABASECHANGELOG;
|
||||
|
||||
/**
|
||||
* The table <code>public.databasechangeloglock</code>.
|
||||
*/
|
||||
public static final Databasechangeloglock DATABASECHANGELOGLOCK = Databasechangeloglock.DATABASECHANGELOGLOCK;
|
||||
|
||||
/**
|
||||
* The table <code>public.files</code>.
|
||||
*/
|
||||
|
|
@ -35,4 +48,9 @@ public class Tables {
|
|||
* The table <code>public.org_okved</code>.
|
||||
*/
|
||||
public static final OrgOkved ORG_OKVED = OrgOkved.ORG_OKVED;
|
||||
|
||||
/**
|
||||
* The table <code>public.shedlock</code>.
|
||||
*/
|
||||
public static final Shedlock SHEDLOCK = Shedlock.SHEDLOCK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,277 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.Public;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records.DatabasechangelogRecord;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.Name;
|
||||
import org.jooq.PlainSQL;
|
||||
import org.jooq.QueryPart;
|
||||
import org.jooq.SQL;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.Select;
|
||||
import org.jooq.Stringly;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.TableOptions;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class Databasechangelog extends TableImpl<DatabasechangelogRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>public.databasechangelog</code>
|
||||
*/
|
||||
public static final Databasechangelog DATABASECHANGELOG = new Databasechangelog();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<DatabasechangelogRecord> getRecordType() {
|
||||
return DatabasechangelogRecord.class;
|
||||
}
|
||||
|
||||
/**
|
||||
* The column <code>public.databasechangelog.id</code>.
|
||||
*/
|
||||
public final TableField<DatabasechangelogRecord, String> ID = createField(DSL.name("id"), SQLDataType.VARCHAR(255).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>public.databasechangelog.author</code>.
|
||||
*/
|
||||
public final TableField<DatabasechangelogRecord, String> AUTHOR = createField(DSL.name("author"), SQLDataType.VARCHAR(255).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>public.databasechangelog.filename</code>.
|
||||
*/
|
||||
public final TableField<DatabasechangelogRecord, String> FILENAME = createField(DSL.name("filename"), SQLDataType.VARCHAR(255).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>public.databasechangelog.dateexecuted</code>.
|
||||
*/
|
||||
public final TableField<DatabasechangelogRecord, Timestamp> DATEEXECUTED = createField(DSL.name("dateexecuted"), SQLDataType.TIMESTAMP(0).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>public.databasechangelog.orderexecuted</code>.
|
||||
*/
|
||||
public final TableField<DatabasechangelogRecord, Integer> ORDEREXECUTED = createField(DSL.name("orderexecuted"), SQLDataType.INTEGER.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>public.databasechangelog.exectype</code>.
|
||||
*/
|
||||
public final TableField<DatabasechangelogRecord, String> EXECTYPE = createField(DSL.name("exectype"), SQLDataType.VARCHAR(10).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>public.databasechangelog.md5sum</code>.
|
||||
*/
|
||||
public final TableField<DatabasechangelogRecord, String> MD5SUM = createField(DSL.name("md5sum"), SQLDataType.VARCHAR(35), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>public.databasechangelog.description</code>.
|
||||
*/
|
||||
public final TableField<DatabasechangelogRecord, String> DESCRIPTION = createField(DSL.name("description"), SQLDataType.VARCHAR(255), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>public.databasechangelog.comments</code>.
|
||||
*/
|
||||
public final TableField<DatabasechangelogRecord, String> COMMENTS = createField(DSL.name("comments"), SQLDataType.VARCHAR(255), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>public.databasechangelog.tag</code>.
|
||||
*/
|
||||
public final TableField<DatabasechangelogRecord, String> TAG = createField(DSL.name("tag"), SQLDataType.VARCHAR(255), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>public.databasechangelog.liquibase</code>.
|
||||
*/
|
||||
public final TableField<DatabasechangelogRecord, String> LIQUIBASE = createField(DSL.name("liquibase"), SQLDataType.VARCHAR(20), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>public.databasechangelog.contexts</code>.
|
||||
*/
|
||||
public final TableField<DatabasechangelogRecord, String> CONTEXTS = createField(DSL.name("contexts"), SQLDataType.VARCHAR(255), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>public.databasechangelog.labels</code>.
|
||||
*/
|
||||
public final TableField<DatabasechangelogRecord, String> LABELS = createField(DSL.name("labels"), SQLDataType.VARCHAR(255), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>public.databasechangelog.deployment_id</code>.
|
||||
*/
|
||||
public final TableField<DatabasechangelogRecord, String> DEPLOYMENT_ID = createField(DSL.name("deployment_id"), SQLDataType.VARCHAR(10), this, "");
|
||||
|
||||
private Databasechangelog(Name alias, Table<DatabasechangelogRecord> aliased) {
|
||||
this(alias, aliased, (Field<?>[]) null, null);
|
||||
}
|
||||
|
||||
private Databasechangelog(Name alias, Table<DatabasechangelogRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>public.databasechangelog</code> table reference
|
||||
*/
|
||||
public Databasechangelog(String alias) {
|
||||
this(DSL.name(alias), DATABASECHANGELOG);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>public.databasechangelog</code> table reference
|
||||
*/
|
||||
public Databasechangelog(Name alias) {
|
||||
this(alias, DATABASECHANGELOG);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a <code>public.databasechangelog</code> table reference
|
||||
*/
|
||||
public Databasechangelog() {
|
||||
this(DSL.name("databasechangelog"), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : Public.PUBLIC;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Databasechangelog as(String alias) {
|
||||
return new Databasechangelog(DSL.name(alias), this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Databasechangelog as(Name alias) {
|
||||
return new Databasechangelog(alias, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Databasechangelog as(Table<?> alias) {
|
||||
return new Databasechangelog(alias.getQualifiedName(), this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public Databasechangelog rename(String name) {
|
||||
return new Databasechangelog(DSL.name(name), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public Databasechangelog rename(Name name) {
|
||||
return new Databasechangelog(name, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public Databasechangelog rename(Table<?> name) {
|
||||
return new Databasechangelog(name.getQualifiedName(), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public Databasechangelog where(Condition condition) {
|
||||
return new Databasechangelog(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public Databasechangelog where(Collection<? extends Condition> conditions) {
|
||||
return where(DSL.and(conditions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public Databasechangelog where(Condition... conditions) {
|
||||
return where(DSL.and(conditions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public Databasechangelog where(Field<Boolean> condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public Databasechangelog where(SQL condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public Databasechangelog where(@Stringly.SQL String condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public Databasechangelog where(@Stringly.SQL String condition, Object... binds) {
|
||||
return where(DSL.condition(condition, binds));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public Databasechangelog where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||
return where(DSL.condition(condition, parts));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public Databasechangelog whereExists(Select<?> select) {
|
||||
return where(DSL.exists(select));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public Databasechangelog whereNotExists(Select<?> select) {
|
||||
return where(DSL.notExists(select));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,236 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.Keys;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.Public;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records.DatabasechangeloglockRecord;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.Name;
|
||||
import org.jooq.PlainSQL;
|
||||
import org.jooq.QueryPart;
|
||||
import org.jooq.SQL;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.Select;
|
||||
import org.jooq.Stringly;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.TableOptions;
|
||||
import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class Databasechangeloglock extends TableImpl<DatabasechangeloglockRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>public.databasechangeloglock</code>
|
||||
*/
|
||||
public static final Databasechangeloglock DATABASECHANGELOGLOCK = new Databasechangeloglock();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<DatabasechangeloglockRecord> getRecordType() {
|
||||
return DatabasechangeloglockRecord.class;
|
||||
}
|
||||
|
||||
/**
|
||||
* The column <code>public.databasechangeloglock.id</code>.
|
||||
*/
|
||||
public final TableField<DatabasechangeloglockRecord, Integer> ID = createField(DSL.name("id"), SQLDataType.INTEGER.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>public.databasechangeloglock.locked</code>.
|
||||
*/
|
||||
public final TableField<DatabasechangeloglockRecord, Boolean> LOCKED = createField(DSL.name("locked"), SQLDataType.BOOLEAN.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>public.databasechangeloglock.lockgranted</code>.
|
||||
*/
|
||||
public final TableField<DatabasechangeloglockRecord, Timestamp> LOCKGRANTED = createField(DSL.name("lockgranted"), SQLDataType.TIMESTAMP(0), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>public.databasechangeloglock.lockedby</code>.
|
||||
*/
|
||||
public final TableField<DatabasechangeloglockRecord, String> LOCKEDBY = createField(DSL.name("lockedby"), SQLDataType.VARCHAR(255), this, "");
|
||||
|
||||
private Databasechangeloglock(Name alias, Table<DatabasechangeloglockRecord> aliased) {
|
||||
this(alias, aliased, (Field<?>[]) null, null);
|
||||
}
|
||||
|
||||
private Databasechangeloglock(Name alias, Table<DatabasechangeloglockRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>public.databasechangeloglock</code> table
|
||||
* reference
|
||||
*/
|
||||
public Databasechangeloglock(String alias) {
|
||||
this(DSL.name(alias), DATABASECHANGELOGLOCK);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>public.databasechangeloglock</code> table
|
||||
* reference
|
||||
*/
|
||||
public Databasechangeloglock(Name alias) {
|
||||
this(alias, DATABASECHANGELOGLOCK);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a <code>public.databasechangeloglock</code> table reference
|
||||
*/
|
||||
public Databasechangeloglock() {
|
||||
this(DSL.name("databasechangeloglock"), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : Public.PUBLIC;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<DatabasechangeloglockRecord> getPrimaryKey() {
|
||||
return Keys.DATABASECHANGELOGLOCK_PKEY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Databasechangeloglock as(String alias) {
|
||||
return new Databasechangeloglock(DSL.name(alias), this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Databasechangeloglock as(Name alias) {
|
||||
return new Databasechangeloglock(alias, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Databasechangeloglock as(Table<?> alias) {
|
||||
return new Databasechangeloglock(alias.getQualifiedName(), this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public Databasechangeloglock rename(String name) {
|
||||
return new Databasechangeloglock(DSL.name(name), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public Databasechangeloglock rename(Name name) {
|
||||
return new Databasechangeloglock(name, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public Databasechangeloglock rename(Table<?> name) {
|
||||
return new Databasechangeloglock(name.getQualifiedName(), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public Databasechangeloglock where(Condition condition) {
|
||||
return new Databasechangeloglock(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public Databasechangeloglock where(Collection<? extends Condition> conditions) {
|
||||
return where(DSL.and(conditions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public Databasechangeloglock where(Condition... conditions) {
|
||||
return where(DSL.and(conditions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public Databasechangeloglock where(Field<Boolean> condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public Databasechangeloglock where(SQL condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public Databasechangeloglock where(@Stringly.SQL String condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public Databasechangeloglock where(@Stringly.SQL String condition, Object... binds) {
|
||||
return where(DSL.condition(condition, binds));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public Databasechangeloglock where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||
return where(DSL.condition(condition, parts));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public Databasechangeloglock whereExists(Select<?> select) {
|
||||
return where(DSL.exists(select));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public Databasechangeloglock whereNotExists(Select<?> select) {
|
||||
return where(DSL.notExists(select));
|
||||
}
|
||||
}
|
||||
|
|
@ -4,7 +4,6 @@
|
|||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.Keys;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.Public;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records.InteractionLogRecord;
|
||||
|
||||
|
|
@ -24,7 +23,6 @@ import org.jooq.Stringly;
|
|||
import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.TableOptions;
|
||||
import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
|
@ -76,6 +74,11 @@ public class InteractionLog extends TableImpl<InteractionLogRecord> {
|
|||
*/
|
||||
public final TableField<InteractionLogRecord, String> STATUS = createField(DSL.name("status"), SQLDataType.CLOB, this, "");
|
||||
|
||||
/**
|
||||
* The column <code>public.interaction_log.file_name</code>.
|
||||
*/
|
||||
public final TableField<InteractionLogRecord, String> FILE_NAME = createField(DSL.name("file_name"), SQLDataType.CLOB, this, "");
|
||||
|
||||
/**
|
||||
* The column <code>public.interaction_log.records_sent</code>.
|
||||
*/
|
||||
|
|
@ -86,11 +89,6 @@ public class InteractionLog extends TableImpl<InteractionLogRecord> {
|
|||
*/
|
||||
public final TableField<InteractionLogRecord, Integer> RECORDS_ACCEPTED = createField(DSL.name("records_accepted"), SQLDataType.INTEGER, this, "");
|
||||
|
||||
/**
|
||||
* The column <code>public.interaction_log.file_name</code>.
|
||||
*/
|
||||
public final TableField<InteractionLogRecord, String> FILE_NAME = createField(DSL.name("file_name"), SQLDataType.CLOB, this, "");
|
||||
|
||||
/**
|
||||
* The column <code>public.interaction_log.file_id</code>.
|
||||
*/
|
||||
|
|
@ -140,11 +138,6 @@ public class InteractionLog extends TableImpl<InteractionLogRecord> {
|
|||
return (Identity<InteractionLogRecord, Long>) super.getIdentity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<InteractionLogRecord> getPrimaryKey() {
|
||||
return Keys.INTERACTION_LOG_PKEY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InteractionLog as(String alias) {
|
||||
return new InteractionLog(DSL.name(alias), this);
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public class OkopfRecords extends TableImpl<OkopfRecordsRecord> {
|
|||
/**
|
||||
* The column <code>public.okopf_records.name</code>.
|
||||
*/
|
||||
public final TableField<OkopfRecordsRecord, String> NAME = createField(DSL.name("name"), SQLDataType.VARCHAR, this, "");
|
||||
public final TableField<OkopfRecordsRecord, String> NAME = createField(DSL.name("name"), SQLDataType.VARCHAR.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>public.okopf_records.version</code>.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,234 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.Keys;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.Public;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records.ShedlockRecord;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.Name;
|
||||
import org.jooq.PlainSQL;
|
||||
import org.jooq.QueryPart;
|
||||
import org.jooq.SQL;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.Select;
|
||||
import org.jooq.Stringly;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.TableOptions;
|
||||
import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class Shedlock extends TableImpl<ShedlockRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>public.shedlock</code>
|
||||
*/
|
||||
public static final Shedlock SHEDLOCK = new Shedlock();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<ShedlockRecord> getRecordType() {
|
||||
return ShedlockRecord.class;
|
||||
}
|
||||
|
||||
/**
|
||||
* The column <code>public.shedlock.name</code>.
|
||||
*/
|
||||
public final TableField<ShedlockRecord, String> NAME = createField(DSL.name("name"), SQLDataType.VARCHAR(255).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>public.shedlock.lock_until</code>.
|
||||
*/
|
||||
public final TableField<ShedlockRecord, Timestamp> LOCK_UNTIL = createField(DSL.name("lock_until"), SQLDataType.TIMESTAMP(0), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>public.shedlock.locked_at</code>.
|
||||
*/
|
||||
public final TableField<ShedlockRecord, Timestamp> LOCKED_AT = createField(DSL.name("locked_at"), SQLDataType.TIMESTAMP(0), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>public.shedlock.locked_by</code>.
|
||||
*/
|
||||
public final TableField<ShedlockRecord, String> LOCKED_BY = createField(DSL.name("locked_by"), SQLDataType.VARCHAR(255), this, "");
|
||||
|
||||
private Shedlock(Name alias, Table<ShedlockRecord> aliased) {
|
||||
this(alias, aliased, (Field<?>[]) null, null);
|
||||
}
|
||||
|
||||
private Shedlock(Name alias, Table<ShedlockRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>public.shedlock</code> table reference
|
||||
*/
|
||||
public Shedlock(String alias) {
|
||||
this(DSL.name(alias), SHEDLOCK);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>public.shedlock</code> table reference
|
||||
*/
|
||||
public Shedlock(Name alias) {
|
||||
this(alias, SHEDLOCK);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a <code>public.shedlock</code> table reference
|
||||
*/
|
||||
public Shedlock() {
|
||||
this(DSL.name("shedlock"), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : Public.PUBLIC;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<ShedlockRecord> getPrimaryKey() {
|
||||
return Keys.SHEDLOCK_PK;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Shedlock as(String alias) {
|
||||
return new Shedlock(DSL.name(alias), this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Shedlock as(Name alias) {
|
||||
return new Shedlock(alias, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Shedlock as(Table<?> alias) {
|
||||
return new Shedlock(alias.getQualifiedName(), this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public Shedlock rename(String name) {
|
||||
return new Shedlock(DSL.name(name), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public Shedlock rename(Name name) {
|
||||
return new Shedlock(name, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public Shedlock rename(Table<?> name) {
|
||||
return new Shedlock(name.getQualifiedName(), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public Shedlock where(Condition condition) {
|
||||
return new Shedlock(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public Shedlock where(Collection<? extends Condition> conditions) {
|
||||
return where(DSL.and(conditions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public Shedlock where(Condition... conditions) {
|
||||
return where(DSL.and(conditions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public Shedlock where(Field<Boolean> condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public Shedlock where(SQL condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public Shedlock where(@Stringly.SQL String condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public Shedlock where(@Stringly.SQL String condition, Object... binds) {
|
||||
return where(DSL.condition(condition, binds));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public Shedlock where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||
return where(DSL.condition(condition, parts));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public Shedlock whereExists(Select<?> select) {
|
||||
return where(DSL.exists(select));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public Shedlock whereNotExists(Select<?> select) {
|
||||
return where(DSL.notExists(select));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,251 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Databasechangelog;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
|
||||
import org.jooq.impl.TableRecordImpl;
|
||||
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class DatabasechangelogRecord extends TableRecordImpl<DatabasechangelogRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Setter for <code>public.databasechangelog.id</code>.
|
||||
*/
|
||||
public void setId(String value) {
|
||||
set(0, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.databasechangelog.id</code>.
|
||||
*/
|
||||
public String getId() {
|
||||
return (String) get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>public.databasechangelog.author</code>.
|
||||
*/
|
||||
public void setAuthor(String value) {
|
||||
set(1, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.databasechangelog.author</code>.
|
||||
*/
|
||||
public String getAuthor() {
|
||||
return (String) get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>public.databasechangelog.filename</code>.
|
||||
*/
|
||||
public void setFilename(String value) {
|
||||
set(2, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.databasechangelog.filename</code>.
|
||||
*/
|
||||
public String getFilename() {
|
||||
return (String) get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>public.databasechangelog.dateexecuted</code>.
|
||||
*/
|
||||
public void setDateexecuted(Timestamp value) {
|
||||
set(3, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.databasechangelog.dateexecuted</code>.
|
||||
*/
|
||||
public Timestamp getDateexecuted() {
|
||||
return (Timestamp) get(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>public.databasechangelog.orderexecuted</code>.
|
||||
*/
|
||||
public void setOrderexecuted(Integer value) {
|
||||
set(4, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.databasechangelog.orderexecuted</code>.
|
||||
*/
|
||||
public Integer getOrderexecuted() {
|
||||
return (Integer) get(4);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>public.databasechangelog.exectype</code>.
|
||||
*/
|
||||
public void setExectype(String value) {
|
||||
set(5, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.databasechangelog.exectype</code>.
|
||||
*/
|
||||
public String getExectype() {
|
||||
return (String) get(5);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>public.databasechangelog.md5sum</code>.
|
||||
*/
|
||||
public void setMd5sum(String value) {
|
||||
set(6, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.databasechangelog.md5sum</code>.
|
||||
*/
|
||||
public String getMd5sum() {
|
||||
return (String) get(6);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>public.databasechangelog.description</code>.
|
||||
*/
|
||||
public void setDescription(String value) {
|
||||
set(7, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.databasechangelog.description</code>.
|
||||
*/
|
||||
public String getDescription() {
|
||||
return (String) get(7);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>public.databasechangelog.comments</code>.
|
||||
*/
|
||||
public void setComments(String value) {
|
||||
set(8, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.databasechangelog.comments</code>.
|
||||
*/
|
||||
public String getComments() {
|
||||
return (String) get(8);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>public.databasechangelog.tag</code>.
|
||||
*/
|
||||
public void setTag(String value) {
|
||||
set(9, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.databasechangelog.tag</code>.
|
||||
*/
|
||||
public String getTag() {
|
||||
return (String) get(9);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>public.databasechangelog.liquibase</code>.
|
||||
*/
|
||||
public void setLiquibase(String value) {
|
||||
set(10, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.databasechangelog.liquibase</code>.
|
||||
*/
|
||||
public String getLiquibase() {
|
||||
return (String) get(10);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>public.databasechangelog.contexts</code>.
|
||||
*/
|
||||
public void setContexts(String value) {
|
||||
set(11, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.databasechangelog.contexts</code>.
|
||||
*/
|
||||
public String getContexts() {
|
||||
return (String) get(11);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>public.databasechangelog.labels</code>.
|
||||
*/
|
||||
public void setLabels(String value) {
|
||||
set(12, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.databasechangelog.labels</code>.
|
||||
*/
|
||||
public String getLabels() {
|
||||
return (String) get(12);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>public.databasechangelog.deployment_id</code>.
|
||||
*/
|
||||
public void setDeploymentId(String value) {
|
||||
set(13, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.databasechangelog.deployment_id</code>.
|
||||
*/
|
||||
public String getDeploymentId() {
|
||||
return (String) get(13);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Create a detached DatabasechangelogRecord
|
||||
*/
|
||||
public DatabasechangelogRecord() {
|
||||
super(Databasechangelog.DATABASECHANGELOG);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialised DatabasechangelogRecord
|
||||
*/
|
||||
public DatabasechangelogRecord(String id, String author, String filename, Timestamp dateexecuted, Integer orderexecuted, String exectype, String md5sum, String description, String comments, String tag, String liquibase, String contexts, String labels, String deploymentId) {
|
||||
super(Databasechangelog.DATABASECHANGELOG);
|
||||
|
||||
setId(id);
|
||||
setAuthor(author);
|
||||
setFilename(filename);
|
||||
setDateexecuted(dateexecuted);
|
||||
setOrderexecuted(orderexecuted);
|
||||
setExectype(exectype);
|
||||
setMd5sum(md5sum);
|
||||
setDescription(description);
|
||||
setComments(comments);
|
||||
setTag(tag);
|
||||
setLiquibase(liquibase);
|
||||
setContexts(contexts);
|
||||
setLabels(labels);
|
||||
setDeploymentId(deploymentId);
|
||||
resetChangedOnNotNull();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Databasechangeloglock;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
|
||||
import org.jooq.Record1;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class DatabasechangeloglockRecord extends UpdatableRecordImpl<DatabasechangeloglockRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Setter for <code>public.databasechangeloglock.id</code>.
|
||||
*/
|
||||
public void setId(Integer value) {
|
||||
set(0, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.databasechangeloglock.id</code>.
|
||||
*/
|
||||
public Integer getId() {
|
||||
return (Integer) get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>public.databasechangeloglock.locked</code>.
|
||||
*/
|
||||
public void setLocked(Boolean value) {
|
||||
set(1, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.databasechangeloglock.locked</code>.
|
||||
*/
|
||||
public Boolean getLocked() {
|
||||
return (Boolean) get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>public.databasechangeloglock.lockgranted</code>.
|
||||
*/
|
||||
public void setLockgranted(Timestamp value) {
|
||||
set(2, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.databasechangeloglock.lockgranted</code>.
|
||||
*/
|
||||
public Timestamp getLockgranted() {
|
||||
return (Timestamp) get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>public.databasechangeloglock.lockedby</code>.
|
||||
*/
|
||||
public void setLockedby(String value) {
|
||||
set(3, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.databasechangeloglock.lockedby</code>.
|
||||
*/
|
||||
public String getLockedby() {
|
||||
return (String) get(3);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Record1<Integer> key() {
|
||||
return (Record1) super.key();
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Create a detached DatabasechangeloglockRecord
|
||||
*/
|
||||
public DatabasechangeloglockRecord() {
|
||||
super(Databasechangeloglock.DATABASECHANGELOGLOCK);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialised DatabasechangeloglockRecord
|
||||
*/
|
||||
public DatabasechangeloglockRecord(Integer id, Boolean locked, Timestamp lockgranted, String lockedby) {
|
||||
super(Databasechangeloglock.DATABASECHANGELOGLOCK);
|
||||
|
||||
setId(id);
|
||||
setLocked(locked);
|
||||
setLockgranted(lockgranted);
|
||||
setLockedby(lockedby);
|
||||
resetChangedOnNotNull();
|
||||
}
|
||||
}
|
||||
|
|
@ -8,15 +8,14 @@ import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.InteractionLog;
|
|||
|
||||
import java.sql.Timestamp;
|
||||
|
||||
import org.jooq.Record1;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
import org.jooq.impl.TableRecordImpl;
|
||||
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class InteractionLogRecord extends UpdatableRecordImpl<InteractionLogRecord> {
|
||||
public class InteractionLogRecord extends TableRecordImpl<InteractionLogRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
|
@ -90,46 +89,46 @@ public class InteractionLogRecord extends UpdatableRecordImpl<InteractionLogReco
|
|||
return (String) get(4);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>public.interaction_log.records_sent</code>.
|
||||
*/
|
||||
public void setRecordsSent(Integer value) {
|
||||
set(5, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.interaction_log.records_sent</code>.
|
||||
*/
|
||||
public Integer getRecordsSent() {
|
||||
return (Integer) get(5);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>public.interaction_log.records_accepted</code>.
|
||||
*/
|
||||
public void setRecordsAccepted(Integer value) {
|
||||
set(6, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.interaction_log.records_accepted</code>.
|
||||
*/
|
||||
public Integer getRecordsAccepted() {
|
||||
return (Integer) get(6);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>public.interaction_log.file_name</code>.
|
||||
*/
|
||||
public void setFileName(String value) {
|
||||
set(7, value);
|
||||
set(5, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.interaction_log.file_name</code>.
|
||||
*/
|
||||
public String getFileName() {
|
||||
return (String) get(7);
|
||||
return (String) get(5);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>public.interaction_log.records_sent</code>.
|
||||
*/
|
||||
public void setRecordsSent(Integer value) {
|
||||
set(6, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.interaction_log.records_sent</code>.
|
||||
*/
|
||||
public Integer getRecordsSent() {
|
||||
return (Integer) get(6);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>public.interaction_log.records_accepted</code>.
|
||||
*/
|
||||
public void setRecordsAccepted(Integer value) {
|
||||
set(7, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.interaction_log.records_accepted</code>.
|
||||
*/
|
||||
public Integer getRecordsAccepted() {
|
||||
return (Integer) get(7);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -160,15 +159,6 @@ public class InteractionLogRecord extends UpdatableRecordImpl<InteractionLogReco
|
|||
return (String) get(9);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Record1<Long> key() {
|
||||
return (Record1) super.key();
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
|
|
@ -183,7 +173,7 @@ public class InteractionLogRecord extends UpdatableRecordImpl<InteractionLogReco
|
|||
/**
|
||||
* Create a detached, initialised InteractionLogRecord
|
||||
*/
|
||||
public InteractionLogRecord(Long id, Timestamp sentDate, String form, String sender, String status, Integer recordsSent, Integer recordsAccepted, String fileName, String fileId, String ervuId) {
|
||||
public InteractionLogRecord(Long id, Timestamp sentDate, String form, String sender, String status, String fileName, Integer recordsSent, Integer recordsAccepted, String fileId, String ervuId) {
|
||||
super(InteractionLog.INTERACTION_LOG);
|
||||
|
||||
setId(id);
|
||||
|
|
@ -191,9 +181,9 @@ public class InteractionLogRecord extends UpdatableRecordImpl<InteractionLogReco
|
|||
setForm(form);
|
||||
setSender(sender);
|
||||
setStatus(status);
|
||||
setFileName(fileName);
|
||||
setRecordsSent(recordsSent);
|
||||
setRecordsAccepted(recordsAccepted);
|
||||
setFileName(fileName);
|
||||
setFileId(fileId);
|
||||
setErvuId(ervuId);
|
||||
resetChangedOnNotNull();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,111 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Shedlock;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
|
||||
import org.jooq.Record1;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class ShedlockRecord extends UpdatableRecordImpl<ShedlockRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Setter for <code>public.shedlock.name</code>.
|
||||
*/
|
||||
public void setName(String value) {
|
||||
set(0, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.shedlock.name</code>.
|
||||
*/
|
||||
public String getName() {
|
||||
return (String) get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>public.shedlock.lock_until</code>.
|
||||
*/
|
||||
public void setLockUntil(Timestamp value) {
|
||||
set(1, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.shedlock.lock_until</code>.
|
||||
*/
|
||||
public Timestamp getLockUntil() {
|
||||
return (Timestamp) get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>public.shedlock.locked_at</code>.
|
||||
*/
|
||||
public void setLockedAt(Timestamp value) {
|
||||
set(2, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.shedlock.locked_at</code>.
|
||||
*/
|
||||
public Timestamp getLockedAt() {
|
||||
return (Timestamp) get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>public.shedlock.locked_by</code>.
|
||||
*/
|
||||
public void setLockedBy(String value) {
|
||||
set(3, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>public.shedlock.locked_by</code>.
|
||||
*/
|
||||
public String getLockedBy() {
|
||||
return (String) get(3);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Record1<String> key() {
|
||||
return (Record1) super.key();
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Create a detached ShedlockRecord
|
||||
*/
|
||||
public ShedlockRecord() {
|
||||
super(Shedlock.SHEDLOCK);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialised ShedlockRecord
|
||||
*/
|
||||
public ShedlockRecord(String name, Timestamp lockUntil, Timestamp lockedAt, String lockedBy) {
|
||||
super(Shedlock.SHEDLOCK);
|
||||
|
||||
setName(name);
|
||||
setLockUntil(lockUntil);
|
||||
setLockedAt(lockedAt);
|
||||
setLockedBy(lockedBy);
|
||||
resetChangedOnNotNull();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.tables.AppearSubppoena;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.tables.ConsiderationComplaint;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.tables.Recruitment;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.tables.records.AppearSubppoenaRecord;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.tables.records.ConsiderationComplaintRecord;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.tables.records.RecruitmentRecord;
|
||||
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.Internal;
|
||||
|
||||
|
||||
/**
|
||||
* A class modelling foreign key relationships and constraints of tables in
|
||||
* ratings.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class Keys {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// UNIQUE and PRIMARY KEY definitions
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
public static final UniqueKey<AppearSubppoenaRecord> PK_APPEAR_SUBPPOENA = Internal.createUniqueKey(AppearSubppoena.APPEAR_SUBPPOENA, DSL.name("pk_appear_subppoena"), new TableField[] { AppearSubppoena.APPEAR_SUBPPOENA.ID_APPEAR_SUBPPOENA }, true);
|
||||
public static final UniqueKey<ConsiderationComplaintRecord> PK_CONSIDERATION_COMPLAINT = Internal.createUniqueKey(ConsiderationComplaint.CONSIDERATION_COMPLAINT, DSL.name("pk_consideration_complaint"), new TableField[] { ConsiderationComplaint.CONSIDERATION_COMPLAINT.ID_CONSIDERATION_COMPLAINT }, true);
|
||||
public static final UniqueKey<RecruitmentRecord> PK_RECRUITMENT = Internal.createUniqueKey(Recruitment.RECRUITMENT, DSL.name("pk_recruitment"), new TableField[] { Recruitment.RECRUITMENT.ID_RECRUITMENT }, true);
|
||||
}
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.DefaultCatalog;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.tables.AppearSubppoena;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.tables.ConsiderationComplaint;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.tables.Recruitment;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.jooq.Catalog;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.impl.SchemaImpl;
|
||||
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class Ratings extends SchemaImpl {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>ratings</code>
|
||||
*/
|
||||
public static final Ratings RATINGS = new Ratings();
|
||||
|
||||
/**
|
||||
* Явка по повестке уровень РФ
|
||||
*/
|
||||
public final AppearSubppoena APPEAR_SUBPPOENA = AppearSubppoena.APPEAR_SUBPPOENA;
|
||||
|
||||
/**
|
||||
* Рассмотрение жалоб уровень РФ
|
||||
*/
|
||||
public final ConsiderationComplaint CONSIDERATION_COMPLAINT = ConsiderationComplaint.CONSIDERATION_COMPLAINT;
|
||||
|
||||
/**
|
||||
* Призыв уровень РФ
|
||||
*/
|
||||
public final Recruitment RECRUITMENT = Recruitment.RECRUITMENT;
|
||||
|
||||
/**
|
||||
* No further instances allowed
|
||||
*/
|
||||
private Ratings() {
|
||||
super("ratings", null);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Catalog getCatalog() {
|
||||
return DefaultCatalog.DEFAULT_CATALOG;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final List<Table<?>> getTables() {
|
||||
return Arrays.asList(
|
||||
AppearSubppoena.APPEAR_SUBPPOENA,
|
||||
ConsiderationComplaint.CONSIDERATION_COMPLAINT,
|
||||
Recruitment.RECRUITMENT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.tables.AppearSubppoena;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.tables.ConsiderationComplaint;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.tables.Recruitment;
|
||||
|
||||
|
||||
/**
|
||||
* Convenience access to all tables in ratings.
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class Tables {
|
||||
|
||||
/**
|
||||
* Явка по повестке уровень РФ
|
||||
*/
|
||||
public static final AppearSubppoena APPEAR_SUBPPOENA = AppearSubppoena.APPEAR_SUBPPOENA;
|
||||
|
||||
/**
|
||||
* Рассмотрение жалоб уровень РФ
|
||||
*/
|
||||
public static final ConsiderationComplaint CONSIDERATION_COMPLAINT = ConsiderationComplaint.CONSIDERATION_COMPLAINT;
|
||||
|
||||
/**
|
||||
* Призыв уровень РФ
|
||||
*/
|
||||
public static final Recruitment RECRUITMENT = Recruitment.RECRUITMENT;
|
||||
}
|
||||
|
|
@ -1,255 +0,0 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.tables;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.Keys;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.Ratings;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.tables.records.AppearSubppoenaRecord;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Date;
|
||||
import java.util.Collection;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.Identity;
|
||||
import org.jooq.Name;
|
||||
import org.jooq.PlainSQL;
|
||||
import org.jooq.QueryPart;
|
||||
import org.jooq.SQL;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.Select;
|
||||
import org.jooq.Stringly;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.TableOptions;
|
||||
import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
|
||||
/**
|
||||
* Явка по повестке уровень РФ
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class AppearSubppoena extends TableImpl<AppearSubppoenaRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>ratings.appear_subppoena</code>
|
||||
*/
|
||||
public static final AppearSubppoena APPEAR_SUBPPOENA = new AppearSubppoena();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<AppearSubppoenaRecord> getRecordType() {
|
||||
return AppearSubppoenaRecord.class;
|
||||
}
|
||||
|
||||
/**
|
||||
* The column <code>ratings.appear_subppoena.id_appear_subppoena</code>.
|
||||
*/
|
||||
public final TableField<AppearSubppoenaRecord, Long> ID_APPEAR_SUBPPOENA = createField(DSL.name("id_appear_subppoena"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>ratings.appear_subppoena.id_region</code>.
|
||||
*/
|
||||
public final TableField<AppearSubppoenaRecord, Integer> ID_REGION = createField(DSL.name("id_region"), SQLDataType.INTEGER, this, "");
|
||||
|
||||
/**
|
||||
* The column <code>ratings.appear_subppoena.appear_mil_com</code>. Явка в
|
||||
* военкомат
|
||||
*/
|
||||
public final TableField<AppearSubppoenaRecord, BigDecimal> APPEAR_MIL_COM = createField(DSL.name("appear_mil_com"), SQLDataType.NUMERIC, this, "Явка в военкомат");
|
||||
|
||||
/**
|
||||
* The column <code>ratings.appear_subppoena.recording_date</code>. Дата
|
||||
* записи
|
||||
*/
|
||||
public final TableField<AppearSubppoenaRecord, Date> RECORDING_DATE = createField(DSL.name("recording_date"), SQLDataType.DATE, this, "Дата записи");
|
||||
|
||||
/**
|
||||
* The column <code>ratings.appear_subppoena.appear_mil_com_percent</code>.
|
||||
* Явка в военкомат в процентах
|
||||
*/
|
||||
public final TableField<AppearSubppoenaRecord, BigDecimal> APPEAR_MIL_COM_PERCENT = createField(DSL.name("appear_mil_com_percent"), SQLDataType.NUMERIC, this, "Явка в военкомат в процентах");
|
||||
|
||||
/**
|
||||
* The column <code>ratings.appear_subppoena.recruitment_id</code>.
|
||||
*/
|
||||
public final TableField<AppearSubppoenaRecord, UUID> RECRUITMENT_ID = createField(DSL.name("recruitment_id"), SQLDataType.UUID, this, "");
|
||||
|
||||
private AppearSubppoena(Name alias, Table<AppearSubppoenaRecord> aliased) {
|
||||
this(alias, aliased, (Field<?>[]) null, null);
|
||||
}
|
||||
|
||||
private AppearSubppoena(Name alias, Table<AppearSubppoenaRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||
super(alias, null, aliased, parameters, DSL.comment("Явка по повестке уровень РФ"), TableOptions.table(), where);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>ratings.appear_subppoena</code> table reference
|
||||
*/
|
||||
public AppearSubppoena(String alias) {
|
||||
this(DSL.name(alias), APPEAR_SUBPPOENA);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>ratings.appear_subppoena</code> table reference
|
||||
*/
|
||||
public AppearSubppoena(Name alias) {
|
||||
this(alias, APPEAR_SUBPPOENA);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a <code>ratings.appear_subppoena</code> table reference
|
||||
*/
|
||||
public AppearSubppoena() {
|
||||
this(DSL.name("appear_subppoena"), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : Ratings.RATINGS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identity<AppearSubppoenaRecord, Long> getIdentity() {
|
||||
return (Identity<AppearSubppoenaRecord, Long>) super.getIdentity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<AppearSubppoenaRecord> getPrimaryKey() {
|
||||
return Keys.PK_APPEAR_SUBPPOENA;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AppearSubppoena as(String alias) {
|
||||
return new AppearSubppoena(DSL.name(alias), this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AppearSubppoena as(Name alias) {
|
||||
return new AppearSubppoena(alias, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AppearSubppoena as(Table<?> alias) {
|
||||
return new AppearSubppoena(alias.getQualifiedName(), this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public AppearSubppoena rename(String name) {
|
||||
return new AppearSubppoena(DSL.name(name), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public AppearSubppoena rename(Name name) {
|
||||
return new AppearSubppoena(name, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public AppearSubppoena rename(Table<?> name) {
|
||||
return new AppearSubppoena(name.getQualifiedName(), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public AppearSubppoena where(Condition condition) {
|
||||
return new AppearSubppoena(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public AppearSubppoena where(Collection<? extends Condition> conditions) {
|
||||
return where(DSL.and(conditions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public AppearSubppoena where(Condition... conditions) {
|
||||
return where(DSL.and(conditions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public AppearSubppoena where(Field<Boolean> condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public AppearSubppoena where(SQL condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public AppearSubppoena where(@Stringly.SQL String condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public AppearSubppoena where(@Stringly.SQL String condition, Object... binds) {
|
||||
return where(DSL.condition(condition, binds));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public AppearSubppoena where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||
return where(DSL.condition(condition, parts));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public AppearSubppoena whereExists(Select<?> select) {
|
||||
return where(DSL.exists(select));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public AppearSubppoena whereNotExists(Select<?> select) {
|
||||
return where(DSL.notExists(select));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,260 +0,0 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.tables;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.Keys;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.Ratings;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.tables.records.ConsiderationComplaintRecord;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Date;
|
||||
import java.util.Collection;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.Identity;
|
||||
import org.jooq.Name;
|
||||
import org.jooq.PlainSQL;
|
||||
import org.jooq.QueryPart;
|
||||
import org.jooq.SQL;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.Select;
|
||||
import org.jooq.Stringly;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.TableOptions;
|
||||
import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
|
||||
/**
|
||||
* Рассмотрение жалоб уровень РФ
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class ConsiderationComplaint extends TableImpl<ConsiderationComplaintRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>ratings.consideration_complaint</code>
|
||||
*/
|
||||
public static final ConsiderationComplaint CONSIDERATION_COMPLAINT = new ConsiderationComplaint();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<ConsiderationComplaintRecord> getRecordType() {
|
||||
return ConsiderationComplaintRecord.class;
|
||||
}
|
||||
|
||||
/**
|
||||
* The column
|
||||
* <code>ratings.consideration_complaint.id_consideration_complaint</code>.
|
||||
*/
|
||||
public final TableField<ConsiderationComplaintRecord, Long> ID_CONSIDERATION_COMPLAINT = createField(DSL.name("id_consideration_complaint"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>ratings.consideration_complaint.id_region</code>.
|
||||
*/
|
||||
public final TableField<ConsiderationComplaintRecord, Integer> ID_REGION = createField(DSL.name("id_region"), SQLDataType.INTEGER, this, "");
|
||||
|
||||
/**
|
||||
* The column
|
||||
* <code>ratings.consideration_complaint.consideration_complaint</code>.
|
||||
* Рассмотрение жалоб
|
||||
*/
|
||||
public final TableField<ConsiderationComplaintRecord, BigDecimal> CONSIDERATION_COMPLAINT_ = createField(DSL.name("consideration_complaint"), SQLDataType.NUMERIC, this, "Рассмотрение жалоб");
|
||||
|
||||
/**
|
||||
* The column <code>ratings.consideration_complaint.recording_date</code>.
|
||||
* Дата записи
|
||||
*/
|
||||
public final TableField<ConsiderationComplaintRecord, Date> RECORDING_DATE = createField(DSL.name("recording_date"), SQLDataType.DATE, this, "Дата записи");
|
||||
|
||||
/**
|
||||
* The column
|
||||
* <code>ratings.consideration_complaint.consideration_complaint_percent</code>.
|
||||
* Рассмотрение жалоб в процентах
|
||||
*/
|
||||
public final TableField<ConsiderationComplaintRecord, BigDecimal> CONSIDERATION_COMPLAINT_PERCENT = createField(DSL.name("consideration_complaint_percent"), SQLDataType.NUMERIC, this, "Рассмотрение жалоб в процентах");
|
||||
|
||||
/**
|
||||
* The column <code>ratings.consideration_complaint.recruitment_id</code>.
|
||||
*/
|
||||
public final TableField<ConsiderationComplaintRecord, UUID> RECRUITMENT_ID = createField(DSL.name("recruitment_id"), SQLDataType.UUID, this, "");
|
||||
|
||||
private ConsiderationComplaint(Name alias, Table<ConsiderationComplaintRecord> aliased) {
|
||||
this(alias, aliased, (Field<?>[]) null, null);
|
||||
}
|
||||
|
||||
private ConsiderationComplaint(Name alias, Table<ConsiderationComplaintRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||
super(alias, null, aliased, parameters, DSL.comment("Рассмотрение жалоб уровень РФ"), TableOptions.table(), where);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>ratings.consideration_complaint</code> table
|
||||
* reference
|
||||
*/
|
||||
public ConsiderationComplaint(String alias) {
|
||||
this(DSL.name(alias), CONSIDERATION_COMPLAINT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>ratings.consideration_complaint</code> table
|
||||
* reference
|
||||
*/
|
||||
public ConsiderationComplaint(Name alias) {
|
||||
this(alias, CONSIDERATION_COMPLAINT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a <code>ratings.consideration_complaint</code> table reference
|
||||
*/
|
||||
public ConsiderationComplaint() {
|
||||
this(DSL.name("consideration_complaint"), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : Ratings.RATINGS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identity<ConsiderationComplaintRecord, Long> getIdentity() {
|
||||
return (Identity<ConsiderationComplaintRecord, Long>) super.getIdentity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<ConsiderationComplaintRecord> getPrimaryKey() {
|
||||
return Keys.PK_CONSIDERATION_COMPLAINT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConsiderationComplaint as(String alias) {
|
||||
return new ConsiderationComplaint(DSL.name(alias), this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConsiderationComplaint as(Name alias) {
|
||||
return new ConsiderationComplaint(alias, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConsiderationComplaint as(Table<?> alias) {
|
||||
return new ConsiderationComplaint(alias.getQualifiedName(), this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public ConsiderationComplaint rename(String name) {
|
||||
return new ConsiderationComplaint(DSL.name(name), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public ConsiderationComplaint rename(Name name) {
|
||||
return new ConsiderationComplaint(name, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public ConsiderationComplaint rename(Table<?> name) {
|
||||
return new ConsiderationComplaint(name.getQualifiedName(), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public ConsiderationComplaint where(Condition condition) {
|
||||
return new ConsiderationComplaint(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public ConsiderationComplaint where(Collection<? extends Condition> conditions) {
|
||||
return where(DSL.and(conditions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public ConsiderationComplaint where(Condition... conditions) {
|
||||
return where(DSL.and(conditions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public ConsiderationComplaint where(Field<Boolean> condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public ConsiderationComplaint where(SQL condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public ConsiderationComplaint where(@Stringly.SQL String condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public ConsiderationComplaint where(@Stringly.SQL String condition, Object... binds) {
|
||||
return where(DSL.condition(condition, binds));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public ConsiderationComplaint where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||
return where(DSL.condition(condition, parts));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public ConsiderationComplaint whereExists(Select<?> select) {
|
||||
return where(DSL.exists(select));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public ConsiderationComplaint whereNotExists(Select<?> select) {
|
||||
return where(DSL.notExists(select));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,259 +0,0 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.tables;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.Keys;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.Ratings;
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.tables.records.RecruitmentRecord;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Date;
|
||||
import java.util.Collection;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.Identity;
|
||||
import org.jooq.Name;
|
||||
import org.jooq.PlainSQL;
|
||||
import org.jooq.QueryPart;
|
||||
import org.jooq.SQL;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.Select;
|
||||
import org.jooq.Stringly;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.TableOptions;
|
||||
import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
|
||||
/**
|
||||
* Призыв уровень РФ
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class Recruitment extends TableImpl<RecruitmentRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>ratings.recruitment</code>
|
||||
*/
|
||||
public static final Recruitment RECRUITMENT = new Recruitment();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<RecruitmentRecord> getRecordType() {
|
||||
return RecruitmentRecord.class;
|
||||
}
|
||||
|
||||
/**
|
||||
* The column <code>ratings.recruitment.id_recruitment</code>.
|
||||
*/
|
||||
public final TableField<RecruitmentRecord, Long> ID_RECRUITMENT = createField(DSL.name("id_recruitment"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>ratings.recruitment.id_region</code>.
|
||||
*/
|
||||
public final TableField<RecruitmentRecord, Integer> ID_REGION = createField(DSL.name("id_region"), SQLDataType.INTEGER, this, "");
|
||||
|
||||
/**
|
||||
* The column <code>ratings.recruitment.execution</code>. Исполнение плана
|
||||
* призыва
|
||||
*/
|
||||
public final TableField<RecruitmentRecord, BigDecimal> EXECUTION = createField(DSL.name("execution"), SQLDataType.NUMERIC, this, "Исполнение плана призыва");
|
||||
|
||||
/**
|
||||
* The column <code>ratings.recruitment.spring_autumn</code>. Осень/весна
|
||||
*/
|
||||
public final TableField<RecruitmentRecord, String> SPRING_AUTUMN = createField(DSL.name("spring_autumn"), SQLDataType.CLOB, this, "Осень/весна");
|
||||
|
||||
/**
|
||||
* The column <code>ratings.recruitment.recording_date</code>. Дата записи
|
||||
*/
|
||||
public final TableField<RecruitmentRecord, Date> RECORDING_DATE = createField(DSL.name("recording_date"), SQLDataType.DATE, this, "Дата записи");
|
||||
|
||||
/**
|
||||
* The column <code>ratings.recruitment.execution_percent</code>. Исолнение
|
||||
* плана призыва в процентах
|
||||
*/
|
||||
public final TableField<RecruitmentRecord, BigDecimal> EXECUTION_PERCENT = createField(DSL.name("execution_percent"), SQLDataType.NUMERIC, this, "Исолнение плана призыва в процентах");
|
||||
|
||||
/**
|
||||
* The column <code>ratings.recruitment.recruitment_id</code>.
|
||||
*/
|
||||
public final TableField<RecruitmentRecord, UUID> RECRUITMENT_ID = createField(DSL.name("recruitment_id"), SQLDataType.UUID, this, "");
|
||||
|
||||
private Recruitment(Name alias, Table<RecruitmentRecord> aliased) {
|
||||
this(alias, aliased, (Field<?>[]) null, null);
|
||||
}
|
||||
|
||||
private Recruitment(Name alias, Table<RecruitmentRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||
super(alias, null, aliased, parameters, DSL.comment("Призыв уровень РФ"), TableOptions.table(), where);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>ratings.recruitment</code> table reference
|
||||
*/
|
||||
public Recruitment(String alias) {
|
||||
this(DSL.name(alias), RECRUITMENT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>ratings.recruitment</code> table reference
|
||||
*/
|
||||
public Recruitment(Name alias) {
|
||||
this(alias, RECRUITMENT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a <code>ratings.recruitment</code> table reference
|
||||
*/
|
||||
public Recruitment() {
|
||||
this(DSL.name("recruitment"), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema() {
|
||||
return aliased() ? null : Ratings.RATINGS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identity<RecruitmentRecord, Long> getIdentity() {
|
||||
return (Identity<RecruitmentRecord, Long>) super.getIdentity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public UniqueKey<RecruitmentRecord> getPrimaryKey() {
|
||||
return Keys.PK_RECRUITMENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Recruitment as(String alias) {
|
||||
return new Recruitment(DSL.name(alias), this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Recruitment as(Name alias) {
|
||||
return new Recruitment(alias, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Recruitment as(Table<?> alias) {
|
||||
return new Recruitment(alias.getQualifiedName(), this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public Recruitment rename(String name) {
|
||||
return new Recruitment(DSL.name(name), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public Recruitment rename(Name name) {
|
||||
return new Recruitment(name, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public Recruitment rename(Table<?> name) {
|
||||
return new Recruitment(name.getQualifiedName(), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public Recruitment where(Condition condition) {
|
||||
return new Recruitment(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public Recruitment where(Collection<? extends Condition> conditions) {
|
||||
return where(DSL.and(conditions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public Recruitment where(Condition... conditions) {
|
||||
return where(DSL.and(conditions));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public Recruitment where(Field<Boolean> condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public Recruitment where(SQL condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public Recruitment where(@Stringly.SQL String condition) {
|
||||
return where(DSL.condition(condition));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public Recruitment where(@Stringly.SQL String condition, Object... binds) {
|
||||
return where(DSL.condition(condition, binds));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
@PlainSQL
|
||||
public Recruitment where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||
return where(DSL.condition(condition, parts));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public Recruitment whereExists(Select<?> select) {
|
||||
return where(DSL.exists(select));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@Override
|
||||
public Recruitment whereNotExists(Select<?> select) {
|
||||
return where(DSL.notExists(select));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,149 +0,0 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.tables.records;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.tables.AppearSubppoena;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.jooq.Record1;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
|
||||
|
||||
/**
|
||||
* Явка по повестке уровень РФ
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class AppearSubppoenaRecord extends UpdatableRecordImpl<AppearSubppoenaRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Setter for <code>ratings.appear_subppoena.id_appear_subppoena</code>.
|
||||
*/
|
||||
public void setIdAppearSubppoena(Long value) {
|
||||
set(0, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>ratings.appear_subppoena.id_appear_subppoena</code>.
|
||||
*/
|
||||
public Long getIdAppearSubppoena() {
|
||||
return (Long) get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>ratings.appear_subppoena.id_region</code>.
|
||||
*/
|
||||
public void setIdRegion(Integer value) {
|
||||
set(1, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>ratings.appear_subppoena.id_region</code>.
|
||||
*/
|
||||
public Integer getIdRegion() {
|
||||
return (Integer) get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>ratings.appear_subppoena.appear_mil_com</code>. Явка в
|
||||
* военкомат
|
||||
*/
|
||||
public void setAppearMilCom(BigDecimal value) {
|
||||
set(2, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>ratings.appear_subppoena.appear_mil_com</code>. Явка в
|
||||
* военкомат
|
||||
*/
|
||||
public BigDecimal getAppearMilCom() {
|
||||
return (BigDecimal) get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>ratings.appear_subppoena.recording_date</code>. Дата
|
||||
* записи
|
||||
*/
|
||||
public void setRecordingDate(Date value) {
|
||||
set(3, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>ratings.appear_subppoena.recording_date</code>. Дата
|
||||
* записи
|
||||
*/
|
||||
public Date getRecordingDate() {
|
||||
return (Date) get(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>ratings.appear_subppoena.appear_mil_com_percent</code>.
|
||||
* Явка в военкомат в процентах
|
||||
*/
|
||||
public void setAppearMilComPercent(BigDecimal value) {
|
||||
set(4, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>ratings.appear_subppoena.appear_mil_com_percent</code>.
|
||||
* Явка в военкомат в процентах
|
||||
*/
|
||||
public BigDecimal getAppearMilComPercent() {
|
||||
return (BigDecimal) get(4);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>ratings.appear_subppoena.recruitment_id</code>.
|
||||
*/
|
||||
public void setRecruitmentId(UUID value) {
|
||||
set(5, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>ratings.appear_subppoena.recruitment_id</code>.
|
||||
*/
|
||||
public UUID getRecruitmentId() {
|
||||
return (UUID) get(5);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Record1<Long> key() {
|
||||
return (Record1) super.key();
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Create a detached AppearSubppoenaRecord
|
||||
*/
|
||||
public AppearSubppoenaRecord() {
|
||||
super(AppearSubppoena.APPEAR_SUBPPOENA);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialised AppearSubppoenaRecord
|
||||
*/
|
||||
public AppearSubppoenaRecord(Long idAppearSubppoena, Integer idRegion, BigDecimal appearMilCom, Date recordingDate, BigDecimal appearMilComPercent, UUID recruitmentId) {
|
||||
super(AppearSubppoena.APPEAR_SUBPPOENA);
|
||||
|
||||
setIdAppearSubppoena(idAppearSubppoena);
|
||||
setIdRegion(idRegion);
|
||||
setAppearMilCom(appearMilCom);
|
||||
setRecordingDate(recordingDate);
|
||||
setAppearMilComPercent(appearMilComPercent);
|
||||
setRecruitmentId(recruitmentId);
|
||||
resetChangedOnNotNull();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,155 +0,0 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.tables.records;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.tables.ConsiderationComplaint;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.jooq.Record1;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
|
||||
|
||||
/**
|
||||
* Рассмотрение жалоб уровень РФ
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class ConsiderationComplaintRecord extends UpdatableRecordImpl<ConsiderationComplaintRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Setter for
|
||||
* <code>ratings.consideration_complaint.id_consideration_complaint</code>.
|
||||
*/
|
||||
public void setIdConsiderationComplaint(Long value) {
|
||||
set(0, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for
|
||||
* <code>ratings.consideration_complaint.id_consideration_complaint</code>.
|
||||
*/
|
||||
public Long getIdConsiderationComplaint() {
|
||||
return (Long) get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>ratings.consideration_complaint.id_region</code>.
|
||||
*/
|
||||
public void setIdRegion(Integer value) {
|
||||
set(1, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>ratings.consideration_complaint.id_region</code>.
|
||||
*/
|
||||
public Integer getIdRegion() {
|
||||
return (Integer) get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for
|
||||
* <code>ratings.consideration_complaint.consideration_complaint</code>.
|
||||
* Рассмотрение жалоб
|
||||
*/
|
||||
public void setConsiderationComplaint(BigDecimal value) {
|
||||
set(2, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for
|
||||
* <code>ratings.consideration_complaint.consideration_complaint</code>.
|
||||
* Рассмотрение жалоб
|
||||
*/
|
||||
public BigDecimal getConsiderationComplaint() {
|
||||
return (BigDecimal) get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>ratings.consideration_complaint.recording_date</code>.
|
||||
* Дата записи
|
||||
*/
|
||||
public void setRecordingDate(Date value) {
|
||||
set(3, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>ratings.consideration_complaint.recording_date</code>.
|
||||
* Дата записи
|
||||
*/
|
||||
public Date getRecordingDate() {
|
||||
return (Date) get(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for
|
||||
* <code>ratings.consideration_complaint.consideration_complaint_percent</code>.
|
||||
* Рассмотрение жалоб в процентах
|
||||
*/
|
||||
public void setConsiderationComplaintPercent(BigDecimal value) {
|
||||
set(4, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for
|
||||
* <code>ratings.consideration_complaint.consideration_complaint_percent</code>.
|
||||
* Рассмотрение жалоб в процентах
|
||||
*/
|
||||
public BigDecimal getConsiderationComplaintPercent() {
|
||||
return (BigDecimal) get(4);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>ratings.consideration_complaint.recruitment_id</code>.
|
||||
*/
|
||||
public void setRecruitmentId(UUID value) {
|
||||
set(5, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>ratings.consideration_complaint.recruitment_id</code>.
|
||||
*/
|
||||
public UUID getRecruitmentId() {
|
||||
return (UUID) get(5);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Record1<Long> key() {
|
||||
return (Record1) super.key();
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Create a detached ConsiderationComplaintRecord
|
||||
*/
|
||||
public ConsiderationComplaintRecord() {
|
||||
super(ConsiderationComplaint.CONSIDERATION_COMPLAINT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialised ConsiderationComplaintRecord
|
||||
*/
|
||||
public ConsiderationComplaintRecord(Long idConsiderationComplaint, Integer idRegion, BigDecimal considerationComplaint, Date recordingDate, BigDecimal considerationComplaintPercent, UUID recruitmentId) {
|
||||
super(ConsiderationComplaint.CONSIDERATION_COMPLAINT);
|
||||
|
||||
setIdConsiderationComplaint(idConsiderationComplaint);
|
||||
setIdRegion(idRegion);
|
||||
setConsiderationComplaint(considerationComplaint);
|
||||
setRecordingDate(recordingDate);
|
||||
setConsiderationComplaintPercent(considerationComplaintPercent);
|
||||
setRecruitmentId(recruitmentId);
|
||||
resetChangedOnNotNull();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,162 +0,0 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.tables.records;
|
||||
|
||||
|
||||
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.ratings.tables.Recruitment;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.jooq.Record1;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
|
||||
|
||||
/**
|
||||
* Призыв уровень РФ
|
||||
*/
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class RecruitmentRecord extends UpdatableRecordImpl<RecruitmentRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Setter for <code>ratings.recruitment.id_recruitment</code>.
|
||||
*/
|
||||
public void setIdRecruitment(Long value) {
|
||||
set(0, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>ratings.recruitment.id_recruitment</code>.
|
||||
*/
|
||||
public Long getIdRecruitment() {
|
||||
return (Long) get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>ratings.recruitment.id_region</code>.
|
||||
*/
|
||||
public void setIdRegion(Integer value) {
|
||||
set(1, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>ratings.recruitment.id_region</code>.
|
||||
*/
|
||||
public Integer getIdRegion() {
|
||||
return (Integer) get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>ratings.recruitment.execution</code>. Исполнение плана
|
||||
* призыва
|
||||
*/
|
||||
public void setExecution(BigDecimal value) {
|
||||
set(2, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>ratings.recruitment.execution</code>. Исполнение плана
|
||||
* призыва
|
||||
*/
|
||||
public BigDecimal getExecution() {
|
||||
return (BigDecimal) get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>ratings.recruitment.spring_autumn</code>. Осень/весна
|
||||
*/
|
||||
public void setSpringAutumn(String value) {
|
||||
set(3, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>ratings.recruitment.spring_autumn</code>. Осень/весна
|
||||
*/
|
||||
public String getSpringAutumn() {
|
||||
return (String) get(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>ratings.recruitment.recording_date</code>. Дата записи
|
||||
*/
|
||||
public void setRecordingDate(Date value) {
|
||||
set(4, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>ratings.recruitment.recording_date</code>. Дата записи
|
||||
*/
|
||||
public Date getRecordingDate() {
|
||||
return (Date) get(4);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>ratings.recruitment.execution_percent</code>. Исолнение
|
||||
* плана призыва в процентах
|
||||
*/
|
||||
public void setExecutionPercent(BigDecimal value) {
|
||||
set(5, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>ratings.recruitment.execution_percent</code>. Исолнение
|
||||
* плана призыва в процентах
|
||||
*/
|
||||
public BigDecimal getExecutionPercent() {
|
||||
return (BigDecimal) get(5);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>ratings.recruitment.recruitment_id</code>.
|
||||
*/
|
||||
public void setRecruitmentId(UUID value) {
|
||||
set(6, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>ratings.recruitment.recruitment_id</code>.
|
||||
*/
|
||||
public UUID getRecruitmentId() {
|
||||
return (UUID) get(6);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Record1<Long> key() {
|
||||
return (Record1) super.key();
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Create a detached RecruitmentRecord
|
||||
*/
|
||||
public RecruitmentRecord() {
|
||||
super(Recruitment.RECRUITMENT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialised RecruitmentRecord
|
||||
*/
|
||||
public RecruitmentRecord(Long idRecruitment, Integer idRegion, BigDecimal execution, String springAutumn, Date recordingDate, BigDecimal executionPercent, UUID recruitmentId) {
|
||||
super(Recruitment.RECRUITMENT);
|
||||
|
||||
setIdRecruitment(idRecruitment);
|
||||
setIdRegion(idRegion);
|
||||
setExecution(execution);
|
||||
setSpringAutumn(springAutumn);
|
||||
setRecordingDate(recordingDate);
|
||||
setExecutionPercent(executionPercent);
|
||||
setRecruitmentId(recruitmentId);
|
||||
resetChangedOnNotNull();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package ru.micord.ervu.exception;
|
||||
|
||||
/**
|
||||
* @author Adel Kalimullin
|
||||
*/
|
||||
public class JsonParsingException extends RuntimeException {
|
||||
|
||||
public JsonParsingException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public JsonParsingException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public JsonParsingException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
package ru.micord.ervu.kafka.controller;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import ervu.client.fileupload.WebDavClient;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import ru.micord.ervu.exception.JsonParsingException;
|
||||
import ru.micord.ervu.kafka.exception.ExcerptException;
|
||||
import ru.micord.ervu.kafka.model.Data;
|
||||
import ru.micord.ervu.kafka.model.ExcerptResponse;
|
||||
import ru.micord.ervu.kafka.service.ReplyingKafkaService;
|
||||
|
|
@ -25,7 +25,6 @@ import ru.micord.ervu.security.webbpm.jwt.service.JwtTokenService;
|
|||
*/
|
||||
@RestController
|
||||
public class ErvuKafkaController {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||
|
||||
@Autowired
|
||||
private ReplyingKafkaService replyingKafkaService;
|
||||
|
|
@ -54,14 +53,14 @@ public class ErvuKafkaController {
|
|||
String prnOid = split[0];
|
||||
String ervuId = split[1];
|
||||
Data data = new Data();
|
||||
data.setOrgId_ERVU(ervuId);
|
||||
data.setErvuOrgId(ervuId);
|
||||
data.setPrnOid(prnOid);
|
||||
String kafkaResponse = replyingKafkaService.sendMessageAndGetReply(requestTopic, requestReplyTopic,
|
||||
objectMapper.writeValueAsString(data)
|
||||
);
|
||||
ExcerptResponse excerptResponse = objectMapper.readValue(kafkaResponse, ExcerptResponse.class);
|
||||
if (!excerptResponse.getSuccess()) {
|
||||
throw new RuntimeException("Error with getting excerpt url " + excerptResponse.getMessage());
|
||||
throw new ExcerptException("Error with getting excerpt url " + excerptResponse.getMessage());
|
||||
}
|
||||
else if (excerptResponse.getData() == null || excerptResponse.getData().getFileUrl() == null
|
||||
|| excerptResponse.getData().getFileUrl().isEmpty()) {
|
||||
|
|
@ -69,8 +68,8 @@ public class ErvuKafkaController {
|
|||
}
|
||||
return webDavClient.webDavDownloadFile(excerptResponse.getData().getFileUrl());
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
catch (JsonProcessingException e) {
|
||||
throw new JsonParsingException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
package ru.micord.ervu.kafka.exception;
|
||||
|
||||
/**
|
||||
* @author Adel Kalimullin
|
||||
*/
|
||||
public class ExcerptException extends RuntimeException {
|
||||
public ExcerptException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public ExcerptException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public ExcerptException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package ru.micord.ervu.kafka.exception;
|
||||
|
||||
/**
|
||||
* @author Adel Kalimullin
|
||||
*/
|
||||
public class KafkaMessageException extends RuntimeException {
|
||||
|
||||
public KafkaMessageException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public KafkaMessageException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
public KafkaMessageException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@ package ru.micord.ervu.kafka.model;
|
|||
import java.io.Serializable;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* @author Eduard Tihomirov
|
||||
|
|
@ -10,15 +11,16 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class Data implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String orgId_ERVU;
|
||||
@JsonProperty("orgId_ERVU")
|
||||
private String ervuOrgId;
|
||||
private String prnOid;
|
||||
|
||||
public String getOrgId_ERVU() {
|
||||
return orgId_ERVU;
|
||||
public String getErvuOrgId() {
|
||||
return ervuOrgId;
|
||||
}
|
||||
|
||||
public void setOrgId_ERVU(String orgId_ERVU) {
|
||||
this.orgId_ERVU = orgId_ERVU;
|
||||
public void setErvuOrgId(String ervuOrgId) {
|
||||
this.ervuOrgId = ervuOrgId;
|
||||
}
|
||||
|
||||
public String getPrnOid() {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import org.springframework.kafka.requestreply.ReplyingKafkaTemplate;
|
|||
import org.springframework.kafka.requestreply.RequestReplyFuture;
|
||||
import org.springframework.kafka.support.KafkaHeaders;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.micord.ervu.kafka.exception.KafkaMessageException;
|
||||
import ru.micord.ervu.kafka.service.ReplyingKafkaService;
|
||||
|
||||
/**
|
||||
|
|
@ -35,10 +36,10 @@ public class BaseReplyingKafkaServiceImpl implements ReplyingKafkaService {
|
|||
try {
|
||||
return Optional.ofNullable(replyFuture.get())
|
||||
.map(ConsumerRecord::value)
|
||||
.orElseThrow(() -> new RuntimeException("Kafka return result is null."));
|
||||
.orElseThrow(() -> new KafkaMessageException("Kafka return result is null."));
|
||||
}
|
||||
catch (InterruptedException | ExecutionException e) {
|
||||
throw new RuntimeException("Failed to get kafka response.", e);
|
||||
throw new KafkaMessageException( "Failed to get kafka response.", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
package ru.micord.ervu.security;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.springframework.security.web.access.AccessDeniedHandler;
|
||||
|
||||
public class AccessDeniedHandlerImpl implements AccessDeniedHandler {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(
|
||||
MethodHandles.lookup().lookupClass());
|
||||
|
||||
@Override
|
||||
public void handle(HttpServletRequest request, HttpServletResponse response,
|
||||
AccessDeniedException accessDeniedException) throws IOException {
|
||||
|
||||
if (response.isCommitted()) {
|
||||
LOGGER.trace("Did not write to response since already committed");
|
||||
return;
|
||||
}
|
||||
response.setStatus(HttpStatus.FORBIDDEN.value());
|
||||
response.setContentType("application/json;charset=UTF-8");
|
||||
response.getWriter().write("\"" + HttpStatus.FORBIDDEN.getReasonPhrase() + "\"");
|
||||
}
|
||||
}
|
||||
|
|
@ -25,9 +25,7 @@ public class LogoutSuccessHandler
|
|||
public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response,
|
||||
Authentication authentication) throws IOException {
|
||||
String url = esiaAuthService.logout(request, response);
|
||||
response.setStatus(HttpServletResponse.SC_OK);
|
||||
response.getWriter().write(url);
|
||||
response.getWriter().flush();
|
||||
response.sendRedirect(url);
|
||||
CsrfToken csrfToken = this.csrfTokenRepository.generateToken(request);
|
||||
this.csrfTokenRepository.saveToken(csrfToken, request, response);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import org.springframework.security.config.annotation.authentication.configurati
|
|||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||
import org.springframework.security.config.http.SessionCreationPolicy;
|
||||
import org.springframework.security.web.AuthenticationEntryPoint;
|
||||
import org.springframework.security.web.SecurityFilterChain;
|
||||
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
|
||||
import org.springframework.security.web.authentication.logout.LogoutFilter;
|
||||
|
|
@ -25,7 +24,6 @@ import ru.micord.ervu.security.webbpm.jwt.JwtMatcher;
|
|||
import ru.micord.ervu.security.webbpm.jwt.UnauthorizedEntryPoint;
|
||||
import ru.micord.ervu.security.webbpm.jwt.filter.JwtAuthenticationFilter;
|
||||
import ru.micord.ervu.security.webbpm.jwt.helper.SecurityHelper;
|
||||
import ru.micord.ervu.security.webbpm.jwt.service.JwtTokenService;
|
||||
|
||||
import static ru.micord.ervu.security.SecurityConstants.ESIA_LOGOUT;
|
||||
|
||||
|
|
@ -33,7 +31,7 @@ import static ru.micord.ervu.security.SecurityConstants.ESIA_LOGOUT;
|
|||
@EnableWebSecurity
|
||||
public class SecurityConfig {
|
||||
private static final String[] PERMIT_ALL = new String[] {
|
||||
"/version", "/esia/url", "/esia/auth", "esia/refresh"
|
||||
"/version", "/esia/url", "/esia/auth", "esia/refresh", "/esia/logout",
|
||||
};
|
||||
@Autowired
|
||||
private JwtAuthenticationFilter jwtAuthenticationFilter;
|
||||
|
|
@ -51,7 +49,8 @@ public class SecurityConfig {
|
|||
|
||||
@Bean
|
||||
public SecurityFilterChain filterChain(HttpSecurity http,
|
||||
CookieCsrfTokenRepository tokenRepository)
|
||||
CookieCsrfTokenRepository tokenRepository,
|
||||
UnauthorizedEntryPoint entryPoint)
|
||||
throws Exception {
|
||||
XorCsrfTokenRequestAttributeHandler delegate = new XorCsrfTokenRequestAttributeHandler();
|
||||
delegate.setCsrfRequestAttributeName(null);
|
||||
|
|
@ -69,7 +68,8 @@ public class SecurityConfig {
|
|||
.logout((logout) -> logout.logoutUrl(ESIA_LOGOUT)
|
||||
.logoutSuccessHandler(new LogoutSuccessHandler(tokenRepository, esiaAuthService)))
|
||||
.exceptionHandling()
|
||||
.authenticationEntryPoint(entryPoint())
|
||||
.authenticationEntryPoint(entryPoint)
|
||||
.accessDeniedHandler(new AccessDeniedHandlerImpl())
|
||||
.and()
|
||||
.sessionManagement()
|
||||
.sessionCreationPolicy(SessionCreationPolicy.STATELESS);
|
||||
|
|
@ -88,8 +88,9 @@ public class SecurityConfig {
|
|||
return tokenRepository;
|
||||
}
|
||||
|
||||
public AuthenticationEntryPoint entryPoint() {
|
||||
return new UnauthorizedEntryPoint();
|
||||
@Bean
|
||||
public UnauthorizedEntryPoint entryPoint(SecurityHelper securityHelper) {
|
||||
return new UnauthorizedEntryPoint(securityHelper);
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
|
@ -105,9 +106,10 @@ public class SecurityConfig {
|
|||
|
||||
@Bean
|
||||
public JwtAuthenticationFilter jwtAuthenticationFilter(SecurityHelper securityHelper,
|
||||
AuthenticationManager manager) {
|
||||
AuthenticationManager manager,
|
||||
UnauthorizedEntryPoint entryPoint) {
|
||||
JwtAuthenticationFilter jwtAuthenticationFilter = new JwtAuthenticationFilter(
|
||||
new JwtMatcher("/**", PERMIT_ALL), entryPoint(), securityHelper);
|
||||
new JwtMatcher("/**", PERMIT_ALL), entryPoint, securityHelper);
|
||||
jwtAuthenticationFilter.setAuthenticationManager(manager);
|
||||
return jwtAuthenticationFilter;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,9 @@ public class EsiaConfig {
|
|||
@Value("${esia.redirect.url}")
|
||||
private String redirectUrl;
|
||||
|
||||
@Value("${esia.logout.redirect.url}")
|
||||
private String logoutRedirectUrl;
|
||||
|
||||
@Value("${sign.url}")
|
||||
private String signUrl;
|
||||
|
||||
|
|
@ -53,6 +56,12 @@ public class EsiaConfig {
|
|||
@Value("${esia.upload.data.role}")
|
||||
private String esiaUploadDataRole;
|
||||
|
||||
@Value("${sign.verify.url}")
|
||||
private String signVerifyUrl;
|
||||
|
||||
@Value("${esia.issuer.url}")
|
||||
private String esiaIssuerUrl;
|
||||
|
||||
public String getEsiaOrgScopes() {
|
||||
String[] scopeItems = esiaOrgScopes.split(",");
|
||||
return String.join(" ", Arrays.stream(scopeItems).map(item -> orgScopeUrl + item.trim()).toArray(String[]::new));
|
||||
|
|
@ -101,7 +110,19 @@ public class EsiaConfig {
|
|||
return esiaTokenUrl;
|
||||
}
|
||||
|
||||
public String getLogoutRedirectUrl() {
|
||||
return logoutRedirectUrl;
|
||||
}
|
||||
|
||||
public String getSignVerifyUrl() {
|
||||
return signVerifyUrl;
|
||||
}
|
||||
|
||||
public String getEsiaUploadDataRole() {
|
||||
return esiaUploadDataRole;
|
||||
}
|
||||
|
||||
public String getEsiaIssuerUrl() {
|
||||
return esiaIssuerUrl;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,9 +31,11 @@ public class EsiaController {
|
|||
return esiaAuthService.generateAuthCodeUrl();
|
||||
}
|
||||
|
||||
@GetMapping(value = "/esia/auth", params = "code")
|
||||
public ResponseEntity<?> esiaAuth(@RequestParam("code") String code, HttpServletRequest request, HttpServletResponse response) {
|
||||
return esiaAuthService.getEsiaTokensByCode(code, request, response);
|
||||
@GetMapping(value = "/esia/auth")
|
||||
public ResponseEntity<?> esiaAuth(@RequestParam(value = "code", required = false) String code,
|
||||
@RequestParam(value = "error", required = false) String error, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
return esiaAuthService.getEsiaTokensByCode(code, error, request, response);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/esia/refresh")
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
package ru.micord.ervu.security.esia.exception;
|
||||
|
||||
/**
|
||||
* @author Adel Kalimullin
|
||||
*/
|
||||
public class EsiaException extends RuntimeException{
|
||||
|
||||
public EsiaException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public EsiaException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
public EsiaException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
|
|
@ -25,9 +25,9 @@ public class EsiaAccessToken implements Serializable {
|
|||
private String sid;
|
||||
|
||||
@JsonProperty("urn:esia:sbj_id")
|
||||
private String sbj_id;
|
||||
|
||||
private String client_id;
|
||||
private String sbjId;
|
||||
@JsonProperty("client_id")
|
||||
private String clientId;
|
||||
|
||||
private Long iat;
|
||||
|
||||
|
|
@ -71,20 +71,20 @@ public class EsiaAccessToken implements Serializable {
|
|||
this.sid = sid;
|
||||
}
|
||||
|
||||
public String getSbj_id() {
|
||||
return sbj_id;
|
||||
public String getSbjId() {
|
||||
return sbjId;
|
||||
}
|
||||
|
||||
public void setSbj_id(String sbj_id) {
|
||||
this.sbj_id = sbj_id;
|
||||
public void setSbjId(String sbjId) {
|
||||
this.sbjId = sbjId;
|
||||
}
|
||||
|
||||
public String getClient_id() {
|
||||
return client_id;
|
||||
public String getClientId() {
|
||||
return clientId;
|
||||
}
|
||||
|
||||
public void setClient_id(String client_id) {
|
||||
this.client_id = client_id;
|
||||
public void setClientId(String clientId) {
|
||||
this.clientId = clientId;
|
||||
}
|
||||
|
||||
public Long getIat() {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,55 @@
|
|||
package ru.micord.ervu.security.esia.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* @author Eduard Tihomirov
|
||||
*/
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class EsiaHeader implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String alg;
|
||||
|
||||
private String ver;
|
||||
|
||||
private String sbt;
|
||||
|
||||
private String typ;
|
||||
|
||||
public String getAlg() {
|
||||
return alg;
|
||||
}
|
||||
|
||||
public void setAlg(String alg) {
|
||||
this.alg = alg;
|
||||
}
|
||||
|
||||
public String getVer() {
|
||||
return ver;
|
||||
}
|
||||
|
||||
public void setVer(String ver) {
|
||||
this.ver = ver;
|
||||
}
|
||||
|
||||
public String getSbt() {
|
||||
return sbt;
|
||||
}
|
||||
|
||||
public void setSbt(String sbt) {
|
||||
this.sbt = sbt;
|
||||
}
|
||||
|
||||
public String getTyp() {
|
||||
return typ;
|
||||
}
|
||||
|
||||
public void setTyp(String typ) {
|
||||
this.typ = typ;
|
||||
}
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@ package ru.micord.ervu.security.esia.model;
|
|||
import java.io.Serializable;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* @author Eduard Tihomirov
|
||||
|
|
@ -12,44 +13,46 @@ public class EsiaTokenResponse implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 7655328287602576975L;
|
||||
|
||||
private String id_token;
|
||||
|
||||
private String access_token;
|
||||
|
||||
private String refresh_token;
|
||||
@JsonProperty("id_token")
|
||||
private String tokenId;
|
||||
@JsonProperty("access_token")
|
||||
private String accessToken;
|
||||
@JsonProperty("refresh_token")
|
||||
private String refreshToken;
|
||||
|
||||
private String state;
|
||||
|
||||
private String token_type;
|
||||
|
||||
private Long expires_in;
|
||||
@JsonProperty("token_type")
|
||||
private String tokenType;
|
||||
@JsonProperty("expires_in")
|
||||
private Long expiresIn;
|
||||
|
||||
private String error;
|
||||
|
||||
private String error_description;
|
||||
@JsonProperty("error_description")
|
||||
private String errorDescription;
|
||||
|
||||
public String getId_token() {
|
||||
return id_token;
|
||||
public String getTokenId() {
|
||||
return tokenId;
|
||||
}
|
||||
|
||||
public void setId_token(String id_token) {
|
||||
this.id_token = id_token;
|
||||
public void setTokenId(String tokenId) {
|
||||
this.tokenId = tokenId;
|
||||
}
|
||||
|
||||
public String getAccess_token() {
|
||||
return access_token;
|
||||
public String getAccessToken() {
|
||||
return accessToken;
|
||||
}
|
||||
|
||||
public void setAccess_token(String access_token) {
|
||||
this.access_token = access_token;
|
||||
public void setAccessToken(String accessToken) {
|
||||
this.accessToken = accessToken;
|
||||
}
|
||||
|
||||
public String getRefresh_token() {
|
||||
return refresh_token;
|
||||
public String getRefreshToken() {
|
||||
return refreshToken;
|
||||
}
|
||||
|
||||
public void setRefresh_token(String refresh_token) {
|
||||
this.refresh_token = refresh_token;
|
||||
public void setRefreshToken(String refreshToken) {
|
||||
this.refreshToken = refreshToken;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
|
|
@ -60,20 +63,20 @@ public class EsiaTokenResponse implements Serializable {
|
|||
this.state = state;
|
||||
}
|
||||
|
||||
public String getToken_type() {
|
||||
return token_type;
|
||||
public String getTokenType() {
|
||||
return tokenType;
|
||||
}
|
||||
|
||||
public void setToken_type(String token_type) {
|
||||
this.token_type = token_type;
|
||||
public void setTokenType(String tokenType) {
|
||||
this.tokenType = tokenType;
|
||||
}
|
||||
|
||||
public Long getExpires_in() {
|
||||
return expires_in;
|
||||
public Long getExpiresIn() {
|
||||
return expiresIn;
|
||||
}
|
||||
|
||||
public void setExpires_in(Long expires_in) {
|
||||
this.expires_in = expires_in;
|
||||
public void setExpiresIn(Long expiresIn) {
|
||||
this.expiresIn = expiresIn;
|
||||
}
|
||||
|
||||
public String getError() {
|
||||
|
|
@ -84,11 +87,11 @@ public class EsiaTokenResponse implements Serializable {
|
|||
this.error = error;
|
||||
}
|
||||
|
||||
public String getError_description() {
|
||||
return error_description;
|
||||
public String getErrorDescription() {
|
||||
return errorDescription;
|
||||
}
|
||||
|
||||
public void setError_description(String error_description) {
|
||||
this.error_description = error_description;
|
||||
public void setErrorDescription(String errorDescription) {
|
||||
this.errorDescription = errorDescription;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,14 +14,15 @@ import java.time.format.DateTimeFormatter;
|
|||
import java.util.Arrays;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import ervu.service.okopf.OkopfService;
|
||||
import org.springframework.security.authentication.AuthenticationManager;
|
||||
import ru.micord.ervu.security.esia.exception.EsiaException;
|
||||
import ru.micord.ervu.security.esia.model.EsiaHeader;
|
||||
import ru.micord.ervu.security.esia.token.EsiaTokensStore;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
|
@ -51,6 +52,8 @@ import ru.micord.ervu.security.webbpm.jwt.helper.SecurityHelper;
|
|||
import ru.micord.ervu.security.webbpm.jwt.service.JwtTokenService;
|
||||
import ru.micord.ervu.security.webbpm.jwt.model.Token;
|
||||
|
||||
import static ru.micord.ervu.security.webbpm.jwt.util.SecurityUtil.getCurrentUsername;
|
||||
|
||||
/**
|
||||
* @author Eduard Tihomirov
|
||||
*/
|
||||
|
|
@ -71,9 +74,6 @@ public class EsiaAuthService {
|
|||
private OkopfService okopfService;
|
||||
@Autowired
|
||||
private SecurityHelper securityHelper;
|
||||
@Autowired
|
||||
private AuthenticationManager authenticationManager;
|
||||
|
||||
@Value("${ervu.kafka.org.reply.topic}")
|
||||
private String requestReplyTopic;
|
||||
|
||||
|
|
@ -120,10 +120,10 @@ public class EsiaAuthService {
|
|||
"obj_type", "B L F A",
|
||||
"client_certificate_hash", esiaConfig.getClientCertHash());
|
||||
|
||||
return makeRequest(url, params);
|
||||
return buildUrl(url, params);
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new EsiaException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -143,16 +143,28 @@ public class EsiaAuthService {
|
|||
.replace("+", "%20");
|
||||
}
|
||||
|
||||
private static String makeRequest(URL url, Map<String, String> params) {
|
||||
private static String buildUrl(URL url, Map<String, String> params) {
|
||||
StringBuilder uriBuilder = new StringBuilder(url.toString());
|
||||
uriBuilder.append('?');
|
||||
for (Map.Entry<String, String> node : params.entrySet()) {
|
||||
uriBuilder.append(node.getKey()).append('=').append(node.getValue()).append("&");
|
||||
}
|
||||
uriBuilder.deleteCharAt(uriBuilder.length() - 1);
|
||||
return uriBuilder.toString();
|
||||
}
|
||||
|
||||
public ResponseEntity<?> getEsiaTokensByCode(String esiaAuthCode, HttpServletRequest request, HttpServletResponse response) {
|
||||
public ResponseEntity<?> getEsiaTokensByCode(String esiaAuthCode, String error,
|
||||
HttpServletRequest request, HttpServletResponse response) {
|
||||
if (error != null && !error.equals("null")) {
|
||||
return new ResponseEntity<>(
|
||||
"Произошла неизвестная ошибка. Обратитесь к системному администратору",
|
||||
HttpStatus.FORBIDDEN
|
||||
);
|
||||
}
|
||||
String esiaAccessTokenStr = null;
|
||||
String prnOid = null;
|
||||
Long expiresIn = null;
|
||||
boolean hasRole = false;
|
||||
try {
|
||||
String clientId = esiaConfig.getClientId();
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy.MM.dd HH:mm:ss xx");
|
||||
|
|
@ -203,33 +215,28 @@ public class EsiaAuthService {
|
|||
|
||||
if (tokenResponse == null || tokenResponse.getError() != null) {
|
||||
String errMsg =
|
||||
tokenResponse != null ? tokenResponse.getError_description() : "response is empty";
|
||||
tokenResponse != null ? tokenResponse.getErrorDescription() : "response is empty";
|
||||
throw new IllegalStateException("Esia response error. " + errMsg);
|
||||
}
|
||||
String esiaAccessTokenStr = tokenResponse.getAccess_token();
|
||||
String esiaRefreshTokenStr = tokenResponse.getRefresh_token();
|
||||
|
||||
boolean hasRole = ulDataService.checkRole(esiaAccessTokenStr);
|
||||
esiaAccessTokenStr = tokenResponse.getAccessToken();
|
||||
String esiaRefreshTokenStr = tokenResponse.getRefreshToken();
|
||||
String verifyResult = verifyToken(esiaAccessTokenStr);
|
||||
if (verifyResult != null) {
|
||||
throw new EsiaException(verifyResult);
|
||||
}
|
||||
EsiaAccessToken esiaAccessToken = ulDataService.readToken(esiaAccessTokenStr);
|
||||
String prnOid = esiaAccessToken.getSbj_id();
|
||||
String ervuId = getErvuId(esiaAccessTokenStr, prnOid);
|
||||
Long expiresIn = tokenResponse.getExpires_in();
|
||||
prnOid = esiaAccessToken.getSbjId();
|
||||
expiresIn = tokenResponse.getExpiresIn();
|
||||
EsiaTokensStore.addAccessToken(prnOid, esiaAccessTokenStr, expiresIn);
|
||||
EsiaTokensStore.addRefreshToken(prnOid, esiaRefreshTokenStr, expiresIn);
|
||||
Token token = jwtTokenService.createAccessToken(esiaAccessToken.getSbj_id(), expiresIn, ervuId, hasRole);
|
||||
int expiry = tokenResponse.getExpires_in().intValue();
|
||||
Cookie accessCookie = securityHelper.createAccessCookie(token.getValue(), expiry);
|
||||
response.addCookie(accessCookie);
|
||||
UsernamePasswordAuthenticationToken usernamePasswordAuthenticationToken =
|
||||
new UsernamePasswordAuthenticationToken(token.getUserAccountId(), null);
|
||||
SecurityContext context = SecurityContextHolder.createEmptyContext();
|
||||
JwtAuthentication jwtAuthentication = new JwtAuthentication(usernamePasswordAuthenticationToken,
|
||||
esiaAccessToken.getSbj_id(), token.getValue());
|
||||
authenticationManager.authenticate(jwtAuthentication);
|
||||
context.setAuthentication(jwtAuthentication);
|
||||
SecurityContextHolder.setContext(context);
|
||||
Cookie authMarkerCookie = securityHelper.createAuthMarkerCookie("true", expiry);
|
||||
response.addCookie(authMarkerCookie);
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new EsiaException(e);
|
||||
}
|
||||
try {
|
||||
hasRole = ulDataService.checkRole(esiaAccessTokenStr);
|
||||
String ervuId = getErvuId(esiaAccessTokenStr, prnOid);
|
||||
createTokenAndAddCookie(response, prnOid, ervuId, hasRole, expiresIn);
|
||||
if (!hasRole) {
|
||||
LOGGER.error("The user with id = " + prnOid + " does not have the required role");
|
||||
return new ResponseEntity<>(
|
||||
|
|
@ -240,7 +247,14 @@ public class EsiaAuthService {
|
|||
return ResponseEntity.ok("Authentication successful");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
createTokenAndAddCookie(response, prnOid, null, hasRole , expiresIn);
|
||||
String messageId = getMessageId(e);
|
||||
String messageWithId = String.format("[%s] %s", messageId, e.getMessage());
|
||||
LOGGER.error(messageWithId, e);
|
||||
return new ResponseEntity<>(
|
||||
"Произошла ошибка " + messageId + ". Обратитесь к системному администратору",
|
||||
HttpStatus.FORBIDDEN
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -294,34 +308,25 @@ public class EsiaAuthService {
|
|||
|
||||
if (tokenResponse == null || tokenResponse.getError() != null) {
|
||||
String errMsg =
|
||||
tokenResponse != null ? tokenResponse.getError_description() : "response is empty";
|
||||
tokenResponse != null ? tokenResponse.getErrorDescription() : "response is empty";
|
||||
throw new IllegalStateException("Esia response error. " + errMsg);
|
||||
}
|
||||
String esiaAccessTokenStr = tokenResponse.getAccess_token();
|
||||
String esiaNewRefreshToken = tokenResponse.getRefresh_token();
|
||||
String esiaAccessTokenStr = tokenResponse.getAccessToken();
|
||||
String verifyResult = verifyToken(esiaAccessTokenStr);
|
||||
if (verifyResult != null) {
|
||||
throw new EsiaException(verifyResult);
|
||||
}
|
||||
String esiaNewRefreshToken = tokenResponse.getRefreshToken();
|
||||
EsiaAccessToken esiaAccessToken = ulDataService.readToken(esiaAccessTokenStr);
|
||||
String prnOid = esiaAccessToken.getSbj_id();
|
||||
Long expiresIn = tokenResponse.getExpires_in();
|
||||
String prnOid = esiaAccessToken.getSbjId();
|
||||
Long expiresIn = tokenResponse.getExpiresIn();
|
||||
EsiaTokensStore.addAccessToken(prnOid, esiaAccessTokenStr, expiresIn);
|
||||
EsiaTokensStore.addRefreshToken(prnOid, esiaNewRefreshToken, expiresIn);
|
||||
String ervuId = getErvuId(esiaAccessTokenStr, prnOid);
|
||||
Token token = jwtTokenService.createAccessToken(esiaAccessToken.getSbj_id(), expiresIn, ervuId, true);
|
||||
int expiry = tokenResponse.getExpires_in().intValue();
|
||||
Cookie accessCookie = securityHelper.createAccessCookie(token.getValue(), expiry);
|
||||
response.addCookie(accessCookie);
|
||||
UsernamePasswordAuthenticationToken usernamePasswordAuthenticationToken =
|
||||
new UsernamePasswordAuthenticationToken(token.getUserAccountId(), null);
|
||||
SecurityContext context = SecurityContextHolder.createEmptyContext();
|
||||
JwtAuthentication jwtAuthentication = new JwtAuthentication(usernamePasswordAuthenticationToken,
|
||||
esiaAccessToken.getSbj_id(), token.getValue());
|
||||
authenticationManager.authenticate(jwtAuthentication);
|
||||
context.setAuthentication(jwtAuthentication);
|
||||
SecurityContextHolder.setContext(context);
|
||||
Cookie authMarkerCookie = securityHelper.createAuthMarkerCookie("true", expiry);
|
||||
response.addCookie(authMarkerCookie);
|
||||
createTokenAndAddCookie(response, esiaAccessToken.getSbjId(), ervuId, true, expiresIn);
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new EsiaException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -347,13 +352,13 @@ public class EsiaAuthService {
|
|||
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new EsiaException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private void errorHandler(HttpResponse<?> httpResponse) {
|
||||
if (httpResponse.statusCode() != 200) {
|
||||
throw new RuntimeException(httpResponse.statusCode() + " " + httpResponse.body());
|
||||
throw new EsiaException(httpResponse.statusCode() + " " + httpResponse.body());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -364,15 +369,15 @@ public class EsiaAuthService {
|
|||
EsiaTokensStore.removeAccessToken(userId);
|
||||
EsiaTokensStore.removeRefreshToken(userId);
|
||||
String logoutUrl = esiaConfig.getEsiaBaseUri() + esiaConfig.getEsiaLogoutUrl();
|
||||
String redirectUrl = esiaConfig.getRedirectUrl();
|
||||
String redirectUrl = esiaConfig.getLogoutRedirectUrl();
|
||||
URL url = new URL(logoutUrl);
|
||||
Map<String, String> params = mapOf(
|
||||
"client_id", esiaConfig.getClientId(),
|
||||
"redirect_url", redirectUrl);
|
||||
return makeRequest(url, params);
|
||||
return buildUrl(url, params);
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new EsiaException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -387,15 +392,15 @@ public class EsiaAuthService {
|
|||
requestReplyTopic, objectMapper.writeValueAsString(orgInfo)
|
||||
);
|
||||
ErvuOrgResponse ervuOrgResponse = objectMapper.readValue(kafkaResponse, ErvuOrgResponse.class);
|
||||
String ervuId = ervuOrgResponse.getData().getOrgId_ERVU();
|
||||
String ervuId = ervuOrgResponse.getData().getErvuOrgId();
|
||||
|
||||
if (!StringUtils.hasText(ervuId)) {
|
||||
throw new RuntimeException("No ervuId for prnOid = " + prnOid);
|
||||
throw new EsiaException("No ervuId for prnOid = " + prnOid);
|
||||
}
|
||||
return ervuId;
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new EsiaException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -454,4 +459,77 @@ public class EsiaAuthService {
|
|||
employee.setOrgOid(employeeModel.getOrgOid());
|
||||
return employee;
|
||||
}
|
||||
|
||||
private String getMessageId(Exception exception) {
|
||||
return Integer.toUnsignedString(Objects
|
||||
.hashCode(getCurrentUsername()), 36)
|
||||
+ "-"
|
||||
+ Integer.toUnsignedString(exception.hashCode(), 36);
|
||||
}
|
||||
|
||||
private void createTokenAndAddCookie(HttpServletResponse response, String userId, String ervuId,
|
||||
Boolean hasRole, Long expiresIn) {
|
||||
Token token = jwtTokenService.createAccessToken(userId, expiresIn, ervuId, hasRole);
|
||||
securityHelper.addAccessCookies(response, token.getValue(), expiresIn.intValue());
|
||||
UsernamePasswordAuthenticationToken usernamePasswordAuthenticationToken =
|
||||
new UsernamePasswordAuthenticationToken(token.getUserAccountId(), null);
|
||||
SecurityContext context = SecurityContextHolder.createEmptyContext();
|
||||
JwtAuthentication authentication = new JwtAuthentication(usernamePasswordAuthenticationToken,
|
||||
userId, token.getValue());
|
||||
context.setAuthentication(authentication);
|
||||
SecurityContextHolder.setContext(context);
|
||||
}
|
||||
|
||||
private String verifyToken(String accessToken) {
|
||||
EsiaAccessToken esiaAccessToken = ulDataService.readToken(accessToken);
|
||||
EsiaHeader esiaHeader = ulDataService.readHeader(accessToken);
|
||||
if (!esiaHeader.getSbt().equals("access")) {
|
||||
return "Token invalid. Token sbt: " + esiaHeader.getSbt() + " invalid";
|
||||
}
|
||||
if (!esiaHeader.getTyp().equals("JWT")) {
|
||||
return "Token invalid. Token type: " + esiaHeader.getTyp() + " invalid";
|
||||
}
|
||||
if (!esiaAccessToken.getClientId().equals(esiaConfig.getClientId())) {
|
||||
return "Token invalid. Token clientId: " + esiaAccessToken.getClientId() + " invalid";
|
||||
}
|
||||
if (!esiaAccessToken.getIss().equals(esiaConfig.getEsiaIssuerUrl())) {
|
||||
return "Token invalid. Token issuer:" + esiaAccessToken.getIss() + " invalid";
|
||||
}
|
||||
//TODO SUPPORT-8750
|
||||
// LocalDateTime iatTime = LocalDateTime.ofInstant(Instant.ofEpochSecond(esiaAccessToken.getIat()),
|
||||
// ZoneId.systemDefault()
|
||||
// );
|
||||
// LocalDateTime expTime = LocalDateTime.ofInstant(Instant.ofEpochSecond(esiaAccessToken.getExp()),
|
||||
// ZoneId.systemDefault()
|
||||
// );
|
||||
// LocalDateTime currentTime = LocalDateTime.now();
|
||||
// if (!currentTime.isAfter(iatTime) || !expTime.isAfter(iatTime)) {
|
||||
// return "Token invalid. Token expired";
|
||||
// }
|
||||
HttpResponse<String> response = signVerify(accessToken);
|
||||
if (response.statusCode() != 200) {
|
||||
if (response.statusCode() == 401) {
|
||||
return "Token invalid. " + response.body();
|
||||
}
|
||||
return "Error in verify module. Error status " + response.statusCode();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private HttpResponse<String> signVerify(String accessToken) {
|
||||
try {
|
||||
HttpRequest request = HttpRequest.newBuilder()
|
||||
.uri(URI.create(esiaConfig.getSignVerifyUrl()))
|
||||
.header("Content-Type", "text/plain")
|
||||
.POST(HttpRequest.BodyPublishers.ofString(accessToken, StandardCharsets.UTF_8))
|
||||
.build();
|
||||
return HttpClient.newBuilder()
|
||||
.connectTimeout(Duration.ofSeconds(esiaConfig.getConnectionTimeout()))
|
||||
.build()
|
||||
.send(request, HttpResponse.BodyHandlers.ofString());
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new EsiaException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ public class EsiaDataService {
|
|||
return null;
|
||||
}
|
||||
EsiaAccessToken esiaAccessToken = ulDataService.readToken(accessToken);
|
||||
PersonModel personModel = ulDataService.getPersonData(esiaAccessToken.getSbj_id(), accessToken);
|
||||
PersonModel personModel = ulDataService.getPersonData(esiaAccessToken.getSbjId(), accessToken);
|
||||
return personModel.getLastName() + " " + personModel.getFirstName().charAt(0) + ". " + personModel.getMiddleName().charAt(0) + ".";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
package ru.micord.ervu.security.esia.service;
|
||||
|
||||
import ru.micord.ervu.security.esia.model.EmployeeModel;
|
||||
import ru.micord.ervu.security.esia.model.EsiaAccessToken;
|
||||
import ru.micord.ervu.security.esia.model.OrganizationModel;
|
||||
import ru.micord.ervu.security.esia.model.PersonModel;
|
||||
import ru.micord.ervu.security.esia.model.*;
|
||||
|
||||
/**
|
||||
* @author Eduard Tihomirov
|
||||
|
|
@ -23,4 +20,6 @@ public interface UlDataService {
|
|||
EsiaAccessToken readToken(String accessToken);
|
||||
|
||||
String getAllUserRoles(String accessToken);
|
||||
|
||||
EsiaHeader readHeader(String accessToken);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import java.util.Optional;
|
|||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import ru.micord.ervu.security.esia.exception.EsiaException;
|
||||
import ru.micord.ervu.security.esia.config.EsiaConfig;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
|
|
@ -34,7 +35,7 @@ public class UlDataServiceImpl implements UlDataService {
|
|||
EsiaAccessToken esiaAccessToken = readToken(accessToken);
|
||||
String scope = esiaAccessToken.getScope();
|
||||
String orgOid = scope.substring(scope.indexOf('=') + 1, scope.indexOf(' '));
|
||||
String prnsId = esiaAccessToken.getSbj_id();
|
||||
String prnsId = esiaAccessToken.getSbjId();
|
||||
EmployeeModel employeeModel = getEmplData(prnsId, orgOid, accessToken);
|
||||
return employeeModel;
|
||||
}
|
||||
|
|
@ -71,7 +72,7 @@ public class UlDataServiceImpl implements UlDataService {
|
|||
return null;
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new EsiaException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -101,7 +102,7 @@ public class UlDataServiceImpl implements UlDataService {
|
|||
return objectMapper.readValue(getResp.body(), EmployeeModel.class);
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new EsiaException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -123,7 +124,7 @@ public class UlDataServiceImpl implements UlDataService {
|
|||
return objectMapper.readValue(getResp.body(), PersonModel.class);
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new EsiaException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -142,7 +143,26 @@ public class UlDataServiceImpl implements UlDataService {
|
|||
return esiaAccessToken;
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new EsiaException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public EsiaHeader readHeader(String accessToken) {
|
||||
try {
|
||||
byte[] decodedBytes = Base64.getDecoder()
|
||||
.decode(
|
||||
accessToken.substring(0, accessToken.indexOf('.'))
|
||||
.replace('-', '+')
|
||||
.replace('_', '/'));
|
||||
String decodedString = new String(decodedBytes);
|
||||
EsiaHeader esiaHeader = objectMapper.readValue(decodedString,
|
||||
EsiaHeader.class
|
||||
);
|
||||
return esiaHeader;
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new EsiaException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -181,13 +201,13 @@ public class UlDataServiceImpl implements UlDataService {
|
|||
return organizationModel;
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new EsiaException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private void errorHandler(HttpResponse httpResponse) {
|
||||
if (httpResponse.statusCode() != 200) {
|
||||
throw new RuntimeException(httpResponse.statusCode() + " " + httpResponse.body());
|
||||
throw new EsiaException(httpResponse.statusCode() + " " + httpResponse.body());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -197,7 +217,7 @@ public class UlDataServiceImpl implements UlDataService {
|
|||
EsiaAccessToken esiaAccessToken = readToken(accessToken);
|
||||
String scope = esiaAccessToken.getScope();
|
||||
String orgOid = scope.substring(scope.indexOf('=') + 1, scope.indexOf(' '));
|
||||
String prnsId = esiaAccessToken.getSbj_id();
|
||||
String prnsId = esiaAccessToken.getSbjId();
|
||||
String url = esiaConfig.getEsiaBaseUri() + "rs/orgs/" + orgOid + "/emps/" + prnsId + "/grps?embed=(elements)";
|
||||
HttpRequest getReq = HttpRequest.newBuilder(URI.create(url))
|
||||
.header(HttpHeaders.CONTENT_TYPE, "application/x-www-form-urlencoded")
|
||||
|
|
@ -218,7 +238,7 @@ public class UlDataServiceImpl implements UlDataService {
|
|||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new EsiaException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -228,7 +248,7 @@ public class UlDataServiceImpl implements UlDataService {
|
|||
EsiaAccessToken esiaAccessToken = readToken(accessToken);
|
||||
String scope = esiaAccessToken.getScope();
|
||||
String orgOid = scope.substring(scope.indexOf('=') + 1, scope.indexOf(' '));
|
||||
String prnsId = esiaAccessToken.getSbj_id();
|
||||
String prnsId = esiaAccessToken.getSbjId();
|
||||
String url = esiaConfig.getEsiaBaseUri() + "rs/orgs/" + orgOid + "/emps/" + prnsId + "/grps?embed=(elements)";
|
||||
HttpRequest getReq = HttpRequest.newBuilder(URI.create(url))
|
||||
.header(HttpHeaders.CONTENT_TYPE, "application/x-www-form-urlencoded")
|
||||
|
|
@ -253,7 +273,7 @@ public class UlDataServiceImpl implements UlDataService {
|
|||
return names.toString();
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new EsiaException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,22 +13,22 @@ import org.springframework.security.authentication.CredentialsExpiredException;
|
|||
*/
|
||||
public class EsiaTokensStore {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||
private static final Map<String, ExpiringToken> accessTokensMap = new ConcurrentHashMap<>();
|
||||
private static final Map<String, ExpiringToken> refreshTokensMap = new ConcurrentHashMap<>();
|
||||
private static final Map<String, ExpiringToken> ACCESS_TOKENS_MAP = new ConcurrentHashMap<>();
|
||||
private static final Map<String, ExpiringToken> REFRESH_TOKENS_MAP = new ConcurrentHashMap<>();
|
||||
|
||||
public static void addAccessToken(String prnOid, String token, long expiresIn) {
|
||||
if (token != null) {
|
||||
long expiryTime = System.currentTimeMillis() + 1000L * expiresIn;
|
||||
accessTokensMap.put(prnOid, new ExpiringToken(token, expiryTime));
|
||||
ACCESS_TOKENS_MAP.put(prnOid, new ExpiringToken(token, expiryTime));
|
||||
}
|
||||
}
|
||||
|
||||
public static String getAccessToken(String prnOid) {
|
||||
return accessTokensMap.get(prnOid).getAccessToken();
|
||||
return ACCESS_TOKENS_MAP.get(prnOid).getAccessToken();
|
||||
}
|
||||
|
||||
public static boolean validateAccessToken(String prnOid) {
|
||||
ExpiringToken token = accessTokensMap.get(prnOid);
|
||||
ExpiringToken token = ACCESS_TOKENS_MAP.get(prnOid);
|
||||
if (token == null || token.getAccessToken() == null) {
|
||||
LOGGER.error("No ESIA access token for prnOid: " + prnOid);
|
||||
return false;
|
||||
|
|
@ -41,40 +41,40 @@ public class EsiaTokensStore {
|
|||
}
|
||||
|
||||
public static void removeExpiredAccessToken() {
|
||||
for (String key : accessTokensMap.keySet()) {
|
||||
ExpiringToken token = accessTokensMap.get(key);
|
||||
for (String key : ACCESS_TOKENS_MAP.keySet()) {
|
||||
ExpiringToken token = ACCESS_TOKENS_MAP.get(key);
|
||||
if (token != null && token.isExpired()) {
|
||||
accessTokensMap.remove(key);
|
||||
ACCESS_TOKENS_MAP.remove(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void removeExpiredRefreshToken() {
|
||||
for (String key : refreshTokensMap.keySet()) {
|
||||
ExpiringToken token = refreshTokensMap.get(key);
|
||||
for (String key : REFRESH_TOKENS_MAP.keySet()) {
|
||||
ExpiringToken token = REFRESH_TOKENS_MAP.get(key);
|
||||
if (token != null && token.isExpired()) {
|
||||
refreshTokensMap.remove(key);
|
||||
REFRESH_TOKENS_MAP.remove(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void removeAccessToken(String prnOid) {
|
||||
accessTokensMap.remove(prnOid);
|
||||
ACCESS_TOKENS_MAP.remove(prnOid);
|
||||
}
|
||||
|
||||
public static void addRefreshToken(String prnOid, String token, long expiresIn) {
|
||||
if (token != null) {
|
||||
long expiryTime = System.currentTimeMillis() + 1000L * expiresIn;
|
||||
refreshTokensMap.put(prnOid, new ExpiringToken(token, expiryTime));
|
||||
REFRESH_TOKENS_MAP.put(prnOid, new ExpiringToken(token, expiryTime));
|
||||
}
|
||||
}
|
||||
|
||||
public static String getRefreshToken(String prnOid) {
|
||||
return refreshTokensMap.get(prnOid).getAccessToken();
|
||||
return REFRESH_TOKENS_MAP.get(prnOid).getAccessToken();
|
||||
}
|
||||
|
||||
public static void removeRefreshToken(String prnOid) {
|
||||
refreshTokensMap.remove(prnOid);
|
||||
REFRESH_TOKENS_MAP.remove(prnOid);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
package ru.micord.ervu.security.exception;
|
||||
|
||||
/**
|
||||
* @author Adel Kalimullin
|
||||
*/
|
||||
public class UnauthorizedException extends RuntimeException {
|
||||
|
||||
public UnauthorizedException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public UnauthorizedException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
public UnauthorizedException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
|
|
@ -17,8 +17,11 @@ public class JwtAuthentication implements Authentication {
|
|||
private final Authentication authentication;
|
||||
private final String token;
|
||||
|
||||
private final UserIdsPair userIdsPair;
|
||||
|
||||
public JwtAuthentication(Authentication authentication, String userAccountId, String token) {
|
||||
this.userAccountId = userAccountId;
|
||||
this.userIdsPair = new UserIdsPair(userAccountId);
|
||||
this.authentication = authentication;
|
||||
this.token = token;
|
||||
}
|
||||
|
|
@ -31,6 +34,10 @@ public class JwtAuthentication implements Authentication {
|
|||
return userAccountId;
|
||||
}
|
||||
|
||||
public UserIdsPair getUserIdsPair() {
|
||||
return userIdsPair;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<? extends GrantedAuthority> getAuthorities() {
|
||||
return authentication.getAuthorities();
|
||||
|
|
|
|||
|
|
@ -48,22 +48,20 @@ public class JwtAuthenticationProvider implements AuthenticationProvider {
|
|||
throw new BadCredentialsException("Authentication Failed.", e);
|
||||
}
|
||||
|
||||
if (jwtTokenService.isValid(token)) {
|
||||
RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
|
||||
HttpServletRequest request = (HttpServletRequest) requestAttributes.resolveReference(
|
||||
REFERENCE_REQUEST);
|
||||
if (request == null) {
|
||||
throw new IllegalStateException("No request found in request attributes");
|
||||
}
|
||||
RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
|
||||
HttpServletRequest request = (HttpServletRequest) requestAttributes.resolveReference(
|
||||
REFERENCE_REQUEST);
|
||||
if (request == null) {
|
||||
throw new IllegalStateException("No request found in request attributes");
|
||||
}
|
||||
|
||||
if (request.getRequestURI().endsWith("esia/logout") || token.getHasRole()) {
|
||||
UsernamePasswordAuthenticationToken pwdToken =
|
||||
UsernamePasswordAuthenticationToken.authenticated(token.getUserAccountId(), null,
|
||||
Collections.emptyList()
|
||||
);
|
||||
if (jwtTokenService.isValid(token) && token.getHasRole()) {
|
||||
UsernamePasswordAuthenticationToken pwdToken =
|
||||
UsernamePasswordAuthenticationToken.authenticated(token.getUserAccountId(), null,
|
||||
Collections.emptyList()
|
||||
);
|
||||
|
||||
return new JwtAuthentication(pwdToken, token.getUserAccountId(), token.getValue());
|
||||
}
|
||||
return new JwtAuthentication(pwdToken, token.getUserAccountId(), token.getValue());
|
||||
}
|
||||
|
||||
throw new BadCredentialsException(
|
||||
|
|
|
|||
|
|
@ -6,12 +6,19 @@ import javax.servlet.http.HttpServletResponse;
|
|||
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.web.AuthenticationEntryPoint;
|
||||
import ru.micord.ervu.security.webbpm.jwt.helper.SecurityHelper;
|
||||
|
||||
/**
|
||||
* {@link AuthenticationEntryPoint} that rejects all requests with an unauthorized error message.
|
||||
*/
|
||||
public class UnauthorizedEntryPoint implements AuthenticationEntryPoint {
|
||||
|
||||
private final SecurityHelper securityHelper;
|
||||
|
||||
public UnauthorizedEntryPoint(SecurityHelper securityHelper) {
|
||||
this.securityHelper = securityHelper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void commence(HttpServletRequest request, HttpServletResponse response,
|
||||
AuthenticationException exception) throws IOException {
|
||||
|
|
@ -21,9 +28,11 @@ public class UnauthorizedEntryPoint implements AuthenticationEntryPoint {
|
|||
response.setStatus(HttpServletResponse.SC_OK);
|
||||
}
|
||||
else {
|
||||
response.sendError(HttpServletResponse.SC_UNAUTHORIZED,
|
||||
"Unauthorized: Authentication token was either missing or invalid."
|
||||
);
|
||||
securityHelper.clearAccessCookies(response);
|
||||
response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
|
||||
response.setContentType("application/json;charset=UTF-8");
|
||||
response.getWriter()
|
||||
.write("\"Unauthorized: Authentication token was either missing or invalid.\"");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
package ru.micord.ervu.security.webbpm.jwt;
|
||||
|
||||
public class UserIdsPair {
|
||||
private final String esiaUserId;
|
||||
private final String ervuId;
|
||||
|
||||
public UserIdsPair(String idsConcatenated) {
|
||||
|
||||
if (idsConcatenated == null) {
|
||||
this.esiaUserId = null;
|
||||
this.ervuId = null;
|
||||
}
|
||||
else {
|
||||
String[] ids = idsConcatenated.split(":");
|
||||
this.esiaUserId = ids[0];
|
||||
this.ervuId = ids.length == 2 ? ids[1] : null;
|
||||
}
|
||||
}
|
||||
|
||||
public String getEsiaUserId() {
|
||||
return esiaUserId;
|
||||
}
|
||||
|
||||
public String getErvuId() {
|
||||
return ervuId;
|
||||
}
|
||||
}
|
||||
|
|
@ -17,7 +17,6 @@ import org.springframework.security.web.authentication.AbstractAuthenticationPro
|
|||
import org.springframework.security.web.util.matcher.RequestMatcher;
|
||||
import ru.micord.ervu.security.webbpm.jwt.JwtAuthentication;
|
||||
import ru.micord.ervu.security.webbpm.jwt.helper.SecurityHelper;
|
||||
import ru.micord.ervu.security.webbpm.jwt.service.JwtTokenService;
|
||||
|
||||
import static ru.micord.ervu.security.webbpm.jwt.util.SecurityUtil.extractAuthToken;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,43 +1,89 @@
|
|||
package ru.micord.ervu.security.webbpm.jwt.helper;
|
||||
|
||||
import javax.servlet.http.Cookie;
|
||||
import java.net.IDN;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import ru.micord.ervu.security.webbpm.jwt.util.SecurityUtil;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.ResponseCookie;
|
||||
import org.springframework.web.context.request.RequestAttributes;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
|
||||
import static org.springframework.web.context.request.RequestAttributes.REFERENCE_REQUEST;
|
||||
import static ru.micord.ervu.security.webbpm.jwt.util.SecurityUtil.AUTH_MARKER;
|
||||
import static ru.micord.ervu.security.webbpm.jwt.util.SecurityUtil.AUTH_TOKEN;
|
||||
import static ru.micord.ervu.security.webbpm.jwt.util.SecurityUtil.createCookie;
|
||||
|
||||
public final class SecurityHelper {
|
||||
@Value("${cookie.path:#{null}}")
|
||||
private String accessCookiePath;
|
||||
@Value("${cookie.domain:#{null}}")
|
||||
private String accessCookieDomain;
|
||||
@Value("${cookie.secure:false}")
|
||||
private boolean accessCookieSecure;
|
||||
@Value("${cookie.same.site:Lax}")
|
||||
private String accessCookieSameSite;
|
||||
|
||||
@PostConstruct
|
||||
private void init() {
|
||||
|
||||
if (accessCookieDomain != null) {
|
||||
accessCookieDomain = IDN.toASCII(accessCookieDomain);
|
||||
}
|
||||
}
|
||||
|
||||
public void clearAccessCookies(HttpServletResponse response) {
|
||||
Cookie tokenCookie = createCookie(AUTH_TOKEN, null, null);
|
||||
tokenCookie.setMaxAge(0);
|
||||
tokenCookie.setPath(accessCookiePath);
|
||||
tokenCookie.setHttpOnly(true);
|
||||
response.addCookie(tokenCookie);
|
||||
ResponseCookie emptyAuthToken = createCookie(AUTH_TOKEN, null, accessCookiePath)
|
||||
.maxAge(0).build();
|
||||
addResponseCookie(response, emptyAuthToken);
|
||||
|
||||
Cookie markerCookie = createCookie(AUTH_MARKER, null, null);
|
||||
markerCookie.setMaxAge(0);
|
||||
markerCookie.setPath("/");
|
||||
response.addCookie(markerCookie);
|
||||
ResponseCookie emptyAuthMarker = createCookie(AUTH_MARKER, null, "/")
|
||||
.maxAge(0)
|
||||
.secure(false)
|
||||
.httpOnly(false)
|
||||
.build();
|
||||
addResponseCookie(response, emptyAuthMarker);
|
||||
}
|
||||
|
||||
public Cookie createAccessCookie(String cookieValue, int expiry) {
|
||||
Cookie authToken = createCookie(SecurityUtil.AUTH_TOKEN, cookieValue, accessCookiePath);
|
||||
authToken.setPath(accessCookiePath);
|
||||
authToken.setMaxAge(expiry);
|
||||
return authToken;
|
||||
private void addResponseCookie(HttpServletResponse response, ResponseCookie cookie) {
|
||||
response.addHeader(HttpHeaders.SET_COOKIE, cookie.toString());
|
||||
}
|
||||
|
||||
public Cookie createAuthMarkerCookie(String cookieValue, int expiry) {
|
||||
Cookie marker = createCookie(AUTH_MARKER, cookieValue, "/");
|
||||
marker.setMaxAge(expiry);
|
||||
marker.setHttpOnly(false);
|
||||
return marker;
|
||||
public void addAccessCookies(HttpServletResponse response, String cookieValue, int expiry) {
|
||||
ResponseCookie authTokenCookie = createCookie(AUTH_TOKEN, cookieValue, accessCookiePath)
|
||||
.maxAge(expiry)
|
||||
.build();
|
||||
addResponseCookie(response, authTokenCookie);
|
||||
|
||||
ResponseCookie authMarker = createCookie(AUTH_MARKER, "true", "/")
|
||||
.maxAge(expiry)
|
||||
.secure(false)
|
||||
.httpOnly(false)
|
||||
.build();
|
||||
addResponseCookie(response, authMarker);
|
||||
}
|
||||
|
||||
public ResponseCookie.ResponseCookieBuilder createCookie(String name, String value, String path) {
|
||||
RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
|
||||
|
||||
if (requestAttributes == null) {
|
||||
throw new IllegalStateException("Must be called only in request context");
|
||||
}
|
||||
HttpServletRequest request = (HttpServletRequest) requestAttributes.resolveReference(
|
||||
REFERENCE_REQUEST);
|
||||
|
||||
if (request == null) {
|
||||
throw new IllegalStateException("Must be called only in request context");
|
||||
}
|
||||
String cookieValue = value != null ? URLEncoder.encode(value, StandardCharsets.UTF_8) : "";
|
||||
return ResponseCookie.from(name, cookieValue)
|
||||
.path(path != null ? path : request.getContextPath())
|
||||
.httpOnly(true)
|
||||
.domain(accessCookieDomain)
|
||||
.secure(accessCookieSecure)
|
||||
.sameSite(accessCookieSameSite);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.micord.ervu.security.esia.token.EsiaTokensStore;
|
||||
import ru.micord.ervu.security.exception.UnauthorizedException;
|
||||
import ru.micord.ervu.security.webbpm.jwt.model.Token;
|
||||
|
||||
import ru.cg.webbpm.modules.resources.api.ResourceMetadataUtils;
|
||||
|
|
@ -32,14 +33,14 @@ public class JwtTokenService {
|
|||
@Value("${webbpm.security.token.issuer:#{null}}")
|
||||
private final String tokenIssuerName =
|
||||
ResourceMetadataUtils.PROJECT_GROUP_ID + "." + ResourceMetadataUtils.PROJECT_ARTIFACT_ID;
|
||||
private final SecretKey SIGNING_KEY;
|
||||
private final SecretKey signingKey;
|
||||
|
||||
|
||||
@Autowired
|
||||
public JwtTokenService(@Value("${webbpm.security.token.secret.key:ZjE5ZjMxNmYtODViZC00ZTQ5LWIxZmYtOGEzYzE3Yjc1MDVk}")
|
||||
String secretKey) {
|
||||
byte[] encodedKey = Base64.getDecoder().decode(secretKey);
|
||||
this.SIGNING_KEY = Keys.hmacShaKeyFor(encodedKey);
|
||||
this.signingKey = Keys.hmacShaKeyFor(encodedKey);
|
||||
}
|
||||
|
||||
public Token createAccessToken(String userAccountId, Long expiresIn, String ervuId, Boolean hasRole) {
|
||||
|
|
@ -51,7 +52,7 @@ public class JwtTokenService {
|
|||
.setIssuedAt(new Date(System.currentTimeMillis()))
|
||||
.setExpiration(expirationDate)
|
||||
.claim("hasRole", hasRole)
|
||||
.signWith(SIGNING_KEY)
|
||||
.signWith(signingKey)
|
||||
.compact();
|
||||
return new Token(userAccountId + ":" + ervuId, tokenIssuerName, expirationDate, value, hasRole);
|
||||
}
|
||||
|
|
@ -72,7 +73,7 @@ public class JwtTokenService {
|
|||
|
||||
public Token getToken(String token) {
|
||||
Claims claims = Jwts.parser()
|
||||
.setSigningKey(SIGNING_KEY)
|
||||
.setSigningKey(signingKey)
|
||||
.parseClaimsJws(token)
|
||||
.getBody();
|
||||
|
||||
|
|
@ -95,7 +96,7 @@ public class JwtTokenService {
|
|||
return ids[0];
|
||||
}
|
||||
else {
|
||||
throw new RuntimeException("Failed to get auth data. User unauthorized.");
|
||||
throw new UnauthorizedException("Failed to get auth data. User unauthorized.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
package ru.micord.ervu.security.webbpm.jwt.util;
|
||||
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Optional;
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.web.context.request.RequestAttributes;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.web.util.WebUtils;
|
||||
import ru.micord.ervu.security.webbpm.jwt.JwtAuthentication;
|
||||
import ru.micord.ervu.security.webbpm.jwt.UserIdsPair;
|
||||
|
||||
import static org.springframework.web.context.request.RequestAttributes.REFERENCE_REQUEST;
|
||||
|
||||
public final class SecurityUtil {
|
||||
public static final String AUTH_TOKEN = "auth_token";
|
||||
|
|
@ -20,26 +20,28 @@ public final class SecurityUtil {
|
|||
//empty
|
||||
}
|
||||
|
||||
public static Cookie createCookie(String name, String value, String path) {
|
||||
String cookieValue = value != null ? URLEncoder.encode(value, StandardCharsets.UTF_8) : null;
|
||||
Cookie cookie = new Cookie(name, cookieValue);
|
||||
RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
|
||||
HttpServletRequest request = (HttpServletRequest) requestAttributes.resolveReference(
|
||||
REFERENCE_REQUEST);
|
||||
|
||||
if (path != null) {
|
||||
cookie.setPath(path);
|
||||
}
|
||||
else {
|
||||
cookie.setPath(request.getContextPath());
|
||||
}
|
||||
cookie.setHttpOnly(true);
|
||||
|
||||
return cookie;
|
||||
}
|
||||
|
||||
public static String extractAuthToken(HttpServletRequest httpRequest) {
|
||||
Cookie cookie = WebUtils.getCookie(httpRequest, AUTH_TOKEN);
|
||||
return cookie != null ? cookie.getValue() : null;
|
||||
}
|
||||
|
||||
public static String getCurrentUsername() {
|
||||
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
|
||||
if (auth != null && auth.isAuthenticated()) {
|
||||
return auth.getName();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getUserAccountId() {
|
||||
return Optional.ofNullable(SecurityContextHolder.getContext().getAuthentication())
|
||||
.map(a -> ((JwtAuthentication) a).getUserAccountId())
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
public static UserIdsPair getUserIdsPair() {
|
||||
return Optional.ofNullable(SecurityContextHolder.getContext().getAuthentication())
|
||||
.map(a -> ((JwtAuthentication) a).getUserIdsPair())
|
||||
.orElse(null);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,10 +11,12 @@ import javax.servlet.http.HttpServletRequest;
|
|||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import ru.micord.ervu.exception.JsonParsingException;
|
||||
import ru.micord.ervu.journal.JournalDto;
|
||||
import ru.micord.ervu.journal.JournalFileDataRequest;
|
||||
import ru.micord.ervu.journal.JournalFileDataResponse;
|
||||
import ru.micord.ervu.journal.mapper.JournalDtoMapper;
|
||||
import ru.micord.ervu.security.exception.UnauthorizedException;
|
||||
import ru.micord.ervu.service.InteractionService;
|
||||
import ru.micord.ervu.service.grid.InMemoryStaticGridLoadService;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
|
@ -69,7 +71,7 @@ public class JournalInMemoryStaticGridLoadService implements
|
|||
.toList();
|
||||
}
|
||||
catch (JsonProcessingException e) {
|
||||
throw new RuntimeException("Failed to parse JournalFileDataResponse.", e);
|
||||
throw new JsonParsingException("Failed to parse JournalFileDataResponse.", e);
|
||||
}
|
||||
|
||||
return Stream.concat(dbJournalList.stream(), ervuJournalList.stream())
|
||||
|
|
@ -83,8 +85,8 @@ public class JournalInMemoryStaticGridLoadService implements
|
|||
.filter(cookie -> cookie.getName().equals("auth_token"))
|
||||
.findFirst()
|
||||
.map(Cookie::getValue)
|
||||
.orElseThrow(() -> new RuntimeException("Failed to get auth data. User unauthorized.")))
|
||||
.orElseThrow(() -> new RuntimeException("Failed to get auth data. User unauthorized."));
|
||||
.orElseThrow(() -> new UnauthorizedException("Failed to get auth data. User unauthorized.")))
|
||||
.orElseThrow(() -> new UnauthorizedException("Failed to get auth data. User unauthorized."));
|
||||
String[] ids = jwtTokenService.getToken(authToken).getUserAccountId().split(":");
|
||||
String userId = ids[0];
|
||||
String ervuId = ids[1];
|
||||
|
|
|
|||
26
config.md
26
config.md
|
|
@ -768,9 +768,13 @@ JBPM использует 3 корневых категории логирова
|
|||
- `ESIA_CLIENT_ID` - – идентификатор системы-клиента (мнемоника системы в ЕСИА указанная прописными буквами)
|
||||
- `ESIA_REDIRECT_URL` - ссылка, по которой должен быть направлен пользователь
|
||||
после того, как ЕСИА даст разрешение на доступ к ресурсу.
|
||||
Важно: ESIA_REDIRECT_URL должна содержать полный адрес вплоть до последнего слэша
|
||||
Важно: `ESIA_REDIRECT_URL` должна содержать полный адрес вплоть до последнего слэша
|
||||
- https://lkul.ervu.loc/ - правильное значение параметра
|
||||
- https://lkul.ervu.loc - неправильное значение параметра
|
||||
- `ESIA_LOGOUT_REDIRECT_URL` - ссылка, по которой должен быть направлен пользователь после logout-a
|
||||
Важно: `ESIA_LOGOUT_REDIRECT_URL` должна содержать полный адрес вплоть до последнего слэша:
|
||||
> - https://lkul.ervu.loc/home.html - правильное значение параметра
|
||||
> - https://lkul.ervu.loc - неправильное значение параметра
|
||||
|
||||
- `ESIA_UPLOAD_DATA_ROLE` - мнемоника группы, для роли "Сотрудник, ответственный за военно-учетную работу".
|
||||
- `SIGN_URL` - url для подписания с помощью КриптоПро секрета клиента, необходимого для аутентификации через ЕСИА.
|
||||
|
|
@ -779,16 +783,26 @@ JBPM использует 3 корневых категории логирова
|
|||
#### Взаимодействие с ЕСНСИ в части получения справочника ОКОПФ
|
||||
|
||||
- `ESNSI_OKOPF_URL` - url который обращается к еснси для получения справочника и скачивает данные спровочников организации в виде заархивированного json файла.
|
||||
- `ESNSI_OKOPF_CRON_LOAD` - настройка, которая указывет расписание для загрузки справочника окопф и сохранение данных по справкам в БД
|
||||
- `ESNSI_OKOPF_CRON_LOAD` - настройка, которая указывет расписание для загрузки справочника окопф и
|
||||
сохранение данных по справкам в БД
|
||||
- `ESNSI_OKOPF_RETRY_DELAY_LOAD` - настройка, которая указывет на повторную попытку загрузить
|
||||
справочник окопф с задержкой. По умолчанию задержка по времени 1000 ms
|
||||
- `ESNSI_OKOPF_RETRY_MAX_ATTEMPTS_LOAD` - настройка, которая указывет на максимальное кол-во попыток
|
||||
повторно загрузить справочник окопф. По умолчанию 3 попытки
|
||||
|
||||
#### Взаимодействие с WebDav
|
||||
|
||||
- `ERVU_FILE_UPLOAD_MAX_FILE_SIZE` - определяет максимальный размер загружаемого файла в байтах. Указывает предел размера для каждого индивидуального файла, который может быть загружен. Если файл превышает этот размер, загрузка будет прервана, и может быть вызвано исключение.
|
||||
- `ERVU_FILE_UPLOAD_MAX_REQUEST_SIZE` - устанавливает максимальный общий размер всех файлов в одном многозадачном запросе в байтах. Это ограничение на весь запрос, включающий данные и файлы. Если общий размер запроса превышает этот параметр, загрузка файлов будет остановлена.
|
||||
- `ERVU_FILE_UPLOAD_FILE_SIZE_THRESHOLD` - указывает размер (в байтах), при достижении которого файл будет записан во временное хранилище на диск. Это позволяет улучшить производительность, исключая непосредственную запись мелких файлов на диск, если они не превышают указанного порога. Файлы, меньшие этого значения, могут быть сохранены в памяти.
|
||||
- `FILE_WEBDAV_UPLOAD_URL` - url для подключения к WebDav
|
||||
- `FILE_WEBDAV_UPLOAD_USERNAME` - логин пользователя для подключения к WebDav
|
||||
- `FILE_WEBDAV_UPLOAD_PASSWORD` - пароль пользователя для подключения к WebDav
|
||||
- `WEBDAV_URLS` - список url для подключения к WebDav
|
||||
- `WEBDAV_USERNAME` - логин пользователя для подключения к WebDav
|
||||
- `WEBDAV_PASSWORD` - пароль пользователя для подключения к WebDav
|
||||
- `WEBDAV_BAD_SERVERS_CACHE_EXPIRE_SECONDS` - время жизни кэша адресов недоступных серверов WebDav (секунды)
|
||||
- `WEBDAV_CLEANUP_CRON` - крон по очистке WebDav
|
||||
- `WEBDAV_RETRY_DELAY` - количество попыток по операциям с файлами WebDav
|
||||
- `FILE_WEBDAV_LIFETIME_SECONDS` - время жизни файла в WebDav (секунды)
|
||||
- `FILE_WEBDAV_EXTENSIONS` - список расширений файлов, удаляемых с WebDav
|
||||
- `AV_KAFKA_BOOTSTRAP_SERVERS` - список пар хост:порт, использующихся для установки первоначального соединения с кластером Kafka
|
||||
- `AV_KAFKA_SECURITY_PROTOCOL` - протокол, используемый для взаимодействия с брокерами
|
||||
- `AV_KAFKA_SASL_MECHANISM` - механизм SASL, используемый для клиентских подключений
|
||||
|
|
@ -813,4 +827,4 @@ JBPM использует 3 корневых категории логирова
|
|||
- `ERVU_KAFKA_JOURNAL_REPLY_TOPIC` - топик для чтения данных по журналу взаимодействия
|
||||
- `ERVU_KAFKA_EXCERPT_REQUEST_TOPIC` - топик для записи запроса для получения выписки по журналу взаимодействия
|
||||
- `ERVU_KAFKA_EXCERPT_REPLY_TOPIC` - топик для чтения выписки по журналу взаимодействия. Содержит ссылку на S3 с файлом выписки
|
||||
- `DB.JOURNAL.EXCLUDED.STATUSES` - статусы файла, которые необходимо исключить при получении данных по журналу взаимодействия из базы данных приложения
|
||||
- `DB.JOURNAL.EXCLUDED.STATUSES` - статусы файла, которые необходимо исключить при получении данных по журналу взаимодействия из базы данных приложения
|
||||
|
|
|
|||
43
config/ervu-lkrp-av.env
Normal file
43
config/ervu-lkrp-av.env
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
AV_KAFKA_BOOTSTRAP_SERVERS=local-kafka:9094
|
||||
#AV_KAFKA_SECURITY_PROTOCOL=SASL_PLAINTEXT
|
||||
AV_KAFKA_SECURITY_PROTOCOL=PLAINTEXT
|
||||
#AV_KAFKA_SASL_MECHANISM=SCRAM-SHA-256
|
||||
AV_KAFKA_SASL_MECHANISM=PLAIN
|
||||
AV_KAFKA_USERNAME=user2
|
||||
AV_KAFKA_PASSWORD=Blfi9d2OFG
|
||||
AV_KAFKA_GROUP_ID=local-ervu-lkrp-av1
|
||||
AV_KAFKA_TOPIC_NAME=file-to-upload
|
||||
AV_KAFKA_STATUS_TOPIC_NAME=ervu.lkrp.av-fileupload-status
|
||||
AV_KAFKA_LOGIN_MODULE=org.apache.kafka.common.security.plain.PlainLoginModule
|
||||
|
||||
ERVU_KAFKA_BOOTSTRAP_SERVERS=local-kafka:9094
|
||||
#ERVU_KAFKA_SECURITY_PROTOCOL=SASL_PLAINTEXT
|
||||
ERVU_KAFKA_SECURITY_PROTOCOL=PLAINTEXT
|
||||
#ERVU_KAFKA_SASL_MECHANISM=SCRAM-SHA-256
|
||||
ERVU_KAFKA_SASL_MECHANISM=PLAIN
|
||||
ERVU_KAFKA_USERNAME=user2
|
||||
ERVU_KAFKA_PASSWORD=Blfi9d2OFG
|
||||
ERVU_KAFKA_GROUP_ID=local-ervu-lkrp-av2
|
||||
ERVU_KAFKA_ERROR_TOPIC_NAME=ervu.lkrp.download.request
|
||||
ERVU_KAFKA_SUCCESS_TOPIC_NAME=ervu.lkrp.download.request
|
||||
ERVU_KAFKA_RESPONSE_TOPIC_NAME=ervu.lkrp.download.response
|
||||
ERVU_KAFKA_LOGIN_MODULE=org.apache.kafka.common.security.plain.PlainLoginModule
|
||||
|
||||
AV_CHECK_ENABLED=true
|
||||
AV_REST_ADDRESS=http://10.10.30.120:8085/scans
|
||||
AV_FIRST_TIMEOUT_MILLISECONDS=1000
|
||||
AV_RETRY_MAX_ATTEMPTS_COUNT=10
|
||||
AV_RETRY_DELAY_MILLISECONDS=1000
|
||||
|
||||
FILE_SAVING_PATH=/transfer/
|
||||
|
||||
S3_ENDPOINT=http://ervu-minio.k8s.micord.ru:31900
|
||||
S3_ACCESS_KEY=rlTdTvkmSXu9FsLhfecw
|
||||
S3_SECRET_KEY=NUmY0wwRIEyAd98GCKd1cOgJWvLQYAcMMul5Ulu0
|
||||
S3_BUCKET_NAME=default-out-bucket
|
||||
S3_PATH_STYLE_ACCESS_ENABLED=true
|
||||
|
||||
FILE_WEBDAV_UPLOAD_USERNAME=test
|
||||
FILE_WEBDAV_UPLOAD_PASSWORD=test
|
||||
WEBDAV_USERNAME=test
|
||||
WEBDAV_PASSWORD=test
|
||||
35
config/ervu-organization-registry.env
Normal file
35
config/ervu-organization-registry.env
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
PG_HOST=10.10.31.119
|
||||
PG_PORT=5432
|
||||
PG_DATABASE=ervu_organization_registry
|
||||
PG_USER=ervu_organization_registry
|
||||
PG_PASSWORD=ervu_organization_registry
|
||||
|
||||
KAFKA_HOSTS=local-kafka:9094
|
||||
#KAFKA_AUTH_SASL_MODULE=org.apache.kafka.common.security.scram.ScramLoginModule
|
||||
KAFKA_AUTH_SASL_MODULE=org.apache.kafka.common.security.plain.PlainLoginModule
|
||||
#KAFKA_AUTH_SEC_PROTO=SASL_PLAINTEXT
|
||||
KAFKA_AUTH_SEC_PROTO=PLAINTEXT
|
||||
#KAFKA_AUTH_SASL_MECH=SCRAM-SHA-256
|
||||
KAFKA_AUTH_SASL_MECH=PLAIN
|
||||
KAFKA_USER=user2
|
||||
KAFKA_PASS=Blfi9d2OFG
|
||||
KAFKA_CONSUMER_GROUP_ID=ervu-organization-registry
|
||||
|
||||
EXTERNAL_KAFKA_HOSTS=local-kafka:9094
|
||||
#EXTERNAL_KAFKA_AUTH_SASL_MODULE=org.apache.kafka.common.security.scram.ScramLoginModule
|
||||
EXTERNAL_KAFKA_AUTH_SASL_MODULE=org.apache.kafka.common.security.plain.PlainLoginModule
|
||||
#EXTERNAL_KAFKA_AUTH_SEC_PROTO=SASL_PLAINTEXT
|
||||
EXTERNAL_KAFKA_AUTH_SEC_PROTO=PLAINTEXT
|
||||
#EXTERNAL_KAFKA_AUTH_SASL_MECH=SCRAM-SHA-256
|
||||
EXTERNAL_KAFKA_AUTH_SASL_MECH=PLAIN
|
||||
EXTERNAL_KAFKA_USER=user2
|
||||
EXTERNAL_KAFKA_PASS=Blfi9d2OFG
|
||||
EXTERNAL_KAFKA_CONSUMER_GROUP_ID=ervu-organization-registry
|
||||
|
||||
WEBDAV_UPLOAD_URL=https://ervu-webdav.k8s.micord.ru/excerpt/
|
||||
WEBDAV_UPLOAD_USERNAME=test
|
||||
WEBDAV_UPLOAD_PASSWORD=test
|
||||
|
||||
AWS_ENDPOINT=http://ervu-minio.k8s.micord.ru:31900
|
||||
AWS_ACCESS_KEY_ID=rlTdTvkmSXu9FsLhfecw
|
||||
AWS_SECRET_ACCESS_KEY=NUmY0wwRIEyAd98GCKd1cOgJWvLQYAcMMul5Ulu0
|
||||
25
config/ervu-validate-recruits.env
Normal file
25
config/ervu-validate-recruits.env
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
KAFKA_HOSTS=local-kafka:9094
|
||||
#KAFKA_AUTH_SASL_MODULE=org.apache.kafka.common.security.scram.ScramLoginModule
|
||||
KAFKA_AUTH_SASL_MODULE=org.apache.kafka.common.security.plain.PlainLoginModule
|
||||
#KAFKA_AUTH_SEC_PROTO=SASL_PLAINTEXT
|
||||
KAFKA_AUTH_SEC_PROTO=PLAINTEXT
|
||||
#KAFKA_AUTH_SASL_MECH=SCRAM-SHA-256
|
||||
KAFKA_AUTH_SASL_MECH=PLAIN
|
||||
KAFKA_USER=user2
|
||||
KAFKA_PASS=Blfi9d2OFG
|
||||
KAFKA_CONSUMER_GROUP_ID=ervu-validate-recruits
|
||||
|
||||
EXTERNAL_KAFKA_HOSTS=local-kafka:9094
|
||||
#EXTERNAL_KAFKA_AUTH_SASL_MODULE=org.apache.kafka.common.security.scram.ScramLoginModule
|
||||
EXTERNAL_KAFKA_AUTH_SASL_MODULE=org.apache.kafka.common.security.plain.PlainLoginModule
|
||||
#EXTERNAL_KAFKA_AUTH_SEC_PROTO=SASL_PLAINTEXT
|
||||
EXTERNAL_KAFKA_AUTH_SEC_PROTO=PLAINTEXT
|
||||
#EXTERNAL_KAFKA_AUTH_SASL_MECH=SCRAM-SHA-256
|
||||
EXTERNAL_KAFKA_AUTH_SASL_MECH=PLAIN
|
||||
EXTERNAL_KAFKA_USER=user2
|
||||
EXTERNAL_KAFKA_PASS=Blfi9d2OFG
|
||||
EXTERNAL_KAFKA_CONSUMER_GROUP_ID=ervu-validate-recruits
|
||||
|
||||
AWS_ENDPOINT=http://ervu-minio.k8s.micord.ru:31900
|
||||
AWS_ACCESS_KEY_ID=rlTdTvkmSXu9FsLhfecw
|
||||
AWS_SECRET_ACCESS_KEY=NUmY0wwRIEyAd98GCKd1cOgJWvLQYAcMMul5Ulu0
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
docker-compose -p %image_tag% build --build-arg env="%reverse.dep.*.build_mode%"
|
||||
docker-compose -p %image_tag% up -d
|
||||
container_id=$(docker-compose -p %image_tag% ps -q webbpm-app)
|
||||
addr=%teamcity.agent.hostname%
|
||||
port_web=$(docker-compose -p %image_tag% port webbpm-app 8080 | cut -d: -f2)
|
||||
port_mgmt=$(docker-compose -p %image_tag% port webbpm-app 9990| cut -d: -f2)
|
||||
port_debug=$(docker-compose -p %image_tag% port webbpm-app 8787| cut -d: -f2)
|
||||
|
||||
|
||||
echo "Started container $container_id"
|
||||
|
||||
echo "Management URL: http://$addr:$port_mgmt/"
|
||||
echo "Webapp URL: http://$addr:$port_web/%APP_PATH%"
|
||||
echo "Debug URL: $addr:$port_debug"
|
||||
|
||||
echo "##teamcity[setParameter name='container_id' value='$container_id']"
|
||||
echo "##teamcity[setParameter name='webapp_url' value='http://$addr:$port_web/%APP_PATH%']"
|
||||
|
||||
echo "Waiting until the app is deployed..."
|
||||
# Wait until the app is deployed
|
||||
timeout 600 bash -c "until curl -s -o /dev/null --fail http://${addr}:${port_web}/%APP_PATH%/ ; do sleep 1; done"
|
||||
2
config/kafdrop.env
Normal file
2
config/kafdrop.env
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
KAFKA_BROKERCONNECT=local-kafka:9094
|
||||
KAFKA_PROPERTIES=c2VjdXJpdHkucHJvdG9jb2w9UExBSU5URVhUDQpzYXNsLm1lY2hhbmlzbT1QTEFJTg0Kc2FzbC5qYWFzLmNvbmZpZz1vcmcuYXBhY2hlLmthZmthLmNvbW1vbi5zZWN1cml0eS5wbGFpbi5QbGFpbkxvZ2luTW9kdWxlIHJlcXVpcmVkIHVzZXJuYW1lPSd1c2VyMicgcGFzc3dvcmQ9J0JsZmk5ZDJPRkcnOw==
|
||||
23
config/kafka.env
Normal file
23
config/kafka.env
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
KAFKA_CFG_NODE_ID=0
|
||||
KAFKA_CFG_PROCESS_ROLES=controller,broker
|
||||
KAFKA_CFG_LISTENERS=CLIENT://:9092,INTERNAL://:9094,CONTROLLER://:9093
|
||||
KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://local-kafka:9092,INTERNAL://local-kafka:9094,CONTROLLER://localhost:9093
|
||||
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:SASL_PLAINTEXT,INTERNAL:PLAINTEXT,CONTROLLER:SASL_PLAINTEXT,
|
||||
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=0@local-kafka:9093
|
||||
KAFKA_KRAFT_BOOTSTRAP_SCRAM_USERS=true
|
||||
|
||||
# Controller
|
||||
KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
|
||||
#KAFKA_CONTROLLER_USER=controller_user
|
||||
#KAFKA_CONTROLLER_PASSWORD=Blfi9d2OFG
|
||||
KAFKA_CFG_SASL_MECHANISM_CONTROLLER_PROTOCOL=PLAIN
|
||||
|
||||
# Client CLIENT
|
||||
KAFKA_CLIENT_USERS=user2
|
||||
KAFKA_CLIENT_PASSWORDS=Blfi9d2OFG
|
||||
KAFKA_CLIENT_LISTENER_NAME=CLIENT
|
||||
KAFKA_CFG_SASL_JAAS_CONFIG=org.apache.kafka.common.security.scram.ScramLoginModule required username="user2" password="Blfi9d2OFG";
|
||||
|
||||
# Client internal
|
||||
KAFKA_INTER_BROKER_LISTENER_NAME=INTERNAL
|
||||
KAFKA_CFG_SASL_MECHANISM_INTER_BROKER_PROTOCOL=PLAIN
|
||||
3
config/kafka.properties
Normal file
3
config/kafka.properties
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
security.protocol=PLAINTEXT
|
||||
sasl.mechanism=PLAIN
|
||||
sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username='user2' password='Blfi9d2OFG';
|
||||
70
config/local.env
Normal file
70
config/local.env
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
TZ=Europe/Moscow
|
||||
# App datasource
|
||||
DB_APP_USERNAME=ervu_lkrp_ul
|
||||
DB_APP_PASSWORD=ervu_lkrp_ul
|
||||
DB_APP_HOST=10.10.31.119
|
||||
DB_APP_PORT=5432
|
||||
DB_APP_NAME=ervu_lkrp_ul
|
||||
|
||||
AV_KAFKA_MESSAGE_TOPIC_NAME=file-to-upload
|
||||
AV_KAFKA_BOOTSTRAP_SERVERS=http://local-kafka:9094
|
||||
#AV_KAFKA_SECURITY_PROTOCOL=SASL_PLAINTEXT
|
||||
AV_KAFKA_SECURITY_PROTOCOL=PLAINTEXT
|
||||
#AV_KAFKA_SASL_MECHANISM=SCRAM-SHA-256
|
||||
AV_KAFKA_SASL_MECHANISM=PLAIN
|
||||
AV_KAFKA_USERNAME=user2
|
||||
AV_KAFKA_PASSWORD=Blfi9d2OFG
|
||||
AV_KAFKA_GROUP_ID=local-ervu-lkrp-ul-backend
|
||||
AV_KAFKA_DOWNLOAD_RESPONSE=ervu.lkrp.av-fileupload-status
|
||||
|
||||
ESIA_SCOPES=fullname, snils, id_doc, birthdate, usr_org, openid
|
||||
ESIA_ORG_SCOPES=org_fullname, org_shortname, org_brhs, org_brhs_ctts, org_brhs_addrs, org_type, org_ogrn, org_inn, org_leg, org_kpp, org_ctts, org_addrs, org_grps, org_emps
|
||||
ESIA_ORG_SCOPE_URL=http://esia.gosuslugi.ru/
|
||||
ESIA_BASE_URI=https://esia-portal1.test.gosuslugi.ru/
|
||||
ESIA_ISSUER_URL=http://esia-portal1.test.gosuslugi.ru/
|
||||
#ESIA_CLIENT_ID=MNSV89
|
||||
ESIA_CLIENT_ID=MNSV93
|
||||
ESIA_REDIRECT_URL=http://localhost:8080/
|
||||
ESIA_UPLOAD_DATA_ROLE=MNSV89_UPLOAD_DATA
|
||||
#ESIA_CLIENT_CERT_HASH=04508B4B0B58776A954A0E15F574B4E58799D74C61EE020B3330716C203E3BDD
|
||||
ESIA_CLIENT_CERT_HASH=CF35A98C48E48665EA73530537BAFBB51F911C434ADC89215C2F86DCD04E28C5
|
||||
ESIA_TOKEN_CLEAR_CRON=0 0 */1 * * *
|
||||
|
||||
SIGN_URL=https://ervu-sign-dev.k8s.micord.ru/sign
|
||||
SIGN_VERIFY_URL=https://ervu-sign-dev.k8s.micord.ru/verify
|
||||
|
||||
ERVU_KAFKA_BOOTSTRAP_SERVERS=local-kafka:9094
|
||||
ERVU_KAFKA_ORG_REPLY_TOPIC=ervu.organization.response
|
||||
ERVU_KAFKA_GROUP_ID=local-ervu-lkrp-ul-backend
|
||||
ERVU_KAFKA_ORG_REQUEST_TOPIC=ervu.organization.request
|
||||
ERVU_KAFKA_REPLY_TIMEOUT=5
|
||||
ERVU_KAFKA_JOURNAL_REQUEST_TOPIC=ervu.organization.journal.request
|
||||
ERVU_KAFKA_JOURNAL_REPLY_TOPIC=ervu.organization.journal.response
|
||||
#ERVU_KAFKA_SECURITY_PROTOCOL=SASL_PLAINTEXT
|
||||
ERVU_KAFKA_SECURITY_PROTOCOL=PLAINTEXT
|
||||
#ERVU_KAFKA_SASL_MECHANISM=SCRAM-SHA-256
|
||||
ERVU_KAFKA_SASL_MECHANISM=PLAIN
|
||||
ERVU_KAFKA_USERNAME=user2
|
||||
ERVU_KAFKA_PASSWORD=Blfi9d2OFG
|
||||
ERVU_KAFKA_EXCERPT_REPLY_TOPIC=ervu.lkrp.excerpt.response
|
||||
ERVU_KAFKA_EXCERPT_REQUEST_TOPIC=ervu.lkrp.excerpt.request
|
||||
|
||||
ESNSI_OKOPF_URL=https://esnsi.gosuslugi.ru/rest/ext/v1/classifiers/16271/file?extension=JSON&encoding=UTF_8
|
||||
ESNSI_OKOPF_CRON_LOAD=0 0 */1 * * *
|
||||
ESNSI_OKOPF_RETRY_MAX_ATTEMPTS_LOAD=3
|
||||
ESNSI_OKOPF_RETRY_DELAY_LOAD=1000
|
||||
|
||||
ERVU_FILE_UPLOAD_MAX_FILE_SIZE=5242880
|
||||
ERVU_FILE_UPLOAD_MAX_REQUEST_SIZE=6291456
|
||||
ERVU_FILE_UPLOAD_FILE_SIZE_THRESHOLD=0
|
||||
|
||||
COOKIE_PATH=/ul
|
||||
|
||||
WEBDAV_URLS=https://ervu-webdav.k8s.micord.ru,https://ervu-webdav1.k8s.micord.ru
|
||||
WEBDAV_USERNAME=test
|
||||
WEBDAV_PASSWORD=test
|
||||
WEBDAV_BAD_SERVERS_CACHE_EXPIRE_SECONDS=120
|
||||
WEBDAV_CLEANUP_CRON=0 0 0 * * *
|
||||
WEBDAV_RETRY_DELAY=500
|
||||
FILE_WEBDAV_LIFETIME_SECONDS=300
|
||||
FILE_WEBDAV_EXTENSIONS=csv,xlsx
|
||||
|
|
@ -6,9 +6,6 @@ DB_APP_HOST=10.10.31.119
|
|||
DB_APP_PORT=5432
|
||||
DB_APP_NAME=ervu_lkrp_ul
|
||||
|
||||
FILE_WEBDAV_UPLOAD_URL=https://ervu-webdav.k8s.micord.ru
|
||||
FILE_WEBDAV_UPLOAD_USERNAME=test
|
||||
FILE_WEBDAV_UPLOAD_PASSWORD=test
|
||||
AV_KAFKA_MESSAGE_TOPIC_NAME=file-to-upload
|
||||
AV_KAFKA_BOOTSTRAP_SERVERS=http://10.10.31.11:32609
|
||||
AV_KAFKA_SECURITY_PROTOCOL=SASL_PLAINTEXT
|
||||
|
|
@ -22,11 +19,19 @@ ESIA_SCOPES=fullname, snils, id_doc, birthdate, usr_org, openid
|
|||
ESIA_ORG_SCOPES=org_fullname, org_shortname, org_brhs, org_brhs_ctts, org_brhs_addrs, org_type, org_ogrn, org_inn, org_leg, org_kpp, org_ctts, org_addrs, org_grps, org_emps
|
||||
ESIA_ORG_SCOPE_URL=http://esia.gosuslugi.ru/
|
||||
ESIA_BASE_URI=https://esia-portal1.test.gosuslugi.ru/
|
||||
ESIA_ISSUER_URL=http://esia-portal1.test.gosuslugi.ru/
|
||||
ESIA_CLIENT_ID=MNSV89
|
||||
ESIA_REDIRECT_URL=https://lkrp-dev.micord.ru/ul/
|
||||
ESIA_LOGOUT_REDIRECT_URL=https://lkrp-dev.micord.ru/ul/home.html
|
||||
ESIA_UPLOAD_DATA_ROLE=MNSV89_UPLOAD_DATA
|
||||
SIGN_URL=https://ervu-sign-dev.k8s.micord.ru/sign
|
||||
ESIA_CLIENT_CERT_HASH=04508B4B0B58776A954A0E15F574B4E58799D74C61EE020B3330716C203E3BDD
|
||||
ESIA_TOKEN_CLEAR_CRON=0 0 */1 * * *
|
||||
|
||||
|
||||
SIGN_URL=https://ervu-sign-dev.k8s.micord.ru/sign
|
||||
SIGN_VERIFY_URL=https://ervu-sign-dev.k8s.micord.ru/verify
|
||||
|
||||
|
||||
ERVU_KAFKA_BOOTSTRAP_SERVERS=10.10.31.11:32609
|
||||
ERVU_KAFKA_ORG_REPLY_TOPIC=ervu.organization.response
|
||||
ERVU_KAFKA_GROUP_ID=1
|
||||
|
|
@ -34,23 +39,27 @@ ERVU_KAFKA_ORG_REQUEST_TOPIC=ervu.organization.request
|
|||
ERVU_KAFKA_REPLY_TIMEOUT=30
|
||||
ERVU_KAFKA_JOURNAL_REQUEST_TOPIC=ervu.organization.journal.request
|
||||
ERVU_KAFKA_JOURNAL_REPLY_TOPIC=ervu.organization.journal.response
|
||||
DB.JOURNAL.EXCLUDED.STATUSES=Направлено в ЕРВУ,Получен ЕРВУ
|
||||
ESNSI_OKOPF_URL=https://esnsi.gosuslugi.ru/rest/ext/v1/classifiers/11465/file?extension=JSON&encoding=UTF_8
|
||||
ESNSI_OKOPF_CRON_LOAD=0 0 */1 * * *
|
||||
ERVU_KAFKA_SECURITY_PROTOCOL=SASL_PLAINTEXT
|
||||
ERVU_KAFKA_SASL_MECHANISM=SCRAM-SHA-256
|
||||
ERVU_KAFKA_USERNAME=user1
|
||||
ERVU_KAFKA_PASSWORD=Blfi9d2OFG
|
||||
ERVU_KAFKA_EXCERPT_REPLY_TOPIC=ervu.lkrp.excerpt.response
|
||||
ERVU_KAFKA_EXCERPT_REQUEST_TOPIC=ervu.lkrp.excerpt.request
|
||||
ESNSI_OKOPF_URL=https://esnsi.gosuslugi.ru/rest/ext/v1/classifiers/16271/file?extension=JSON&encoding=UTF_8
|
||||
ESNSI_OKOPF_CRON_LOAD=0 0 */1 * * *
|
||||
ESNSI_OKOPF_RETRY_MAX_ATTEMPTS_LOAD=3
|
||||
ESNSI_OKOPF_RETRY_DELAY_LOAD=1000
|
||||
|
||||
ERVU_FILE_UPLOAD_MAX_FILE_SIZE=5242880
|
||||
ERVU_FILE_UPLOAD_MAX_REQUEST_SIZE=6291456
|
||||
ERVU_FILE_UPLOAD_FILE_SIZE_THRESHOLD=0
|
||||
|
||||
ESIA_TOKEN_CLEAR_CRON=0 0 */1 * * *
|
||||
COOKIE_PATH=/ul
|
||||
|
||||
WEBDAV_URLS=https://ervu-webdav.k8s.micord.ru,https://ervu-webdav1.k8s.micord.ru
|
||||
WEBDAV_USERNAME=test
|
||||
WEBDAV_PASSWORD=test
|
||||
WEBDAV_BAD_SERVERS_CACHE_EXPIRE_SECONDS=120
|
||||
WEBDAV_CLEANUP_CRON=0 0 0 * * *
|
||||
WEBDAV_RETRY_DELAY=500
|
||||
FILE_WEBDAV_LIFETIME_SECONDS=300
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ http {
|
|||
|
||||
sendfile on;
|
||||
|
||||
server_tokens off;
|
||||
gzip on;
|
||||
|
||||
# text/html doesn't need to be defined there, it's compressed always
|
||||
|
|
@ -33,7 +34,7 @@ http {
|
|||
server {
|
||||
listen 80 default;
|
||||
|
||||
access_log /var/log/nginx/access.log nginx_main;
|
||||
access_log /var/log/nginx/access.log nginx_main;
|
||||
error_log /var/log/nginx/error.log error;
|
||||
|
||||
charset utf-8;
|
||||
|
|
@ -55,8 +56,8 @@ http {
|
|||
gzip_min_length 256;
|
||||
gzip_types
|
||||
application/atom+xml
|
||||
application/geo+json
|
||||
application/javascript
|
||||
application/geo+json
|
||||
application/javascript
|
||||
application/x-javascript
|
||||
application/json
|
||||
application/ld+json
|
||||
|
|
@ -75,36 +76,43 @@ http {
|
|||
text/xml;
|
||||
|
||||
location / {
|
||||
root /frontend;
|
||||
index index.html;
|
||||
try_files $uri @index;
|
||||
root /frontend;
|
||||
index index.html;
|
||||
try_files $uri @index;
|
||||
|
||||
# Media: images, icons, video, audio, HTC
|
||||
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|mp3|ogg|ogv|webm|htc|woff2|woff|ttf)$ {
|
||||
expires 1M;
|
||||
access_log off;
|
||||
# max-age must be in seconds
|
||||
add_header Cache-Control "max-age=2629746, public";
|
||||
}
|
||||
# CSS and Javascript
|
||||
location ~* \.(?:css|js)$ {
|
||||
expires 1y;
|
||||
access_log off;
|
||||
add_header Cache-Control "max-age=31556952, public";
|
||||
}
|
||||
}
|
||||
add_header Content-Security-Policy "frame-ancestors 'none'; default-src 'self'; script-src 'self'; style-src 'unsafe-inline' 'self' data:; font-src 'self' data:; img-src 'self' data:;";
|
||||
|
||||
location @index {
|
||||
root /frontend;
|
||||
add_header Cache-Control no-cache;
|
||||
expires 0;
|
||||
try_files /index.html =404;
|
||||
}
|
||||
#Application config
|
||||
location = /src/resources/app-config.json {
|
||||
add_header Cache-Control "no-cache";
|
||||
expires 0;
|
||||
}
|
||||
# Media: images, icons, video, audio, HTC
|
||||
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|mp3|ogg|ogv|webm|htc|woff2|woff|ttf)$ {
|
||||
expires 1M;
|
||||
access_log off;
|
||||
# max-age must be in seconds
|
||||
add_header Cache-Control "max-age=2629746, public";
|
||||
}
|
||||
# CSS and Javascript
|
||||
location ~* \.(?:css|js)$ {
|
||||
expires 1y;
|
||||
access_log off;
|
||||
add_header Cache-Control "max-age=31556952, public";
|
||||
}
|
||||
}
|
||||
|
||||
location = /health {
|
||||
access_log off;
|
||||
add_header 'Content-Type' 'application/json';
|
||||
return 200 '{"status":"UP"}';
|
||||
}
|
||||
location @index {
|
||||
root /frontend;
|
||||
add_header Cache-Control "no-cache";
|
||||
expires 0;
|
||||
try_files /index.html =404;
|
||||
}
|
||||
|
||||
location = /health {
|
||||
access_log off;
|
||||
add_header 'Content-Type' 'application/json';
|
||||
return 200 '{"status":"UP"}';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,9 +54,9 @@
|
|||
<property name="security.password.regex" value="^((?=(.*\d){1,})(?=.*[a-zа-яё])(?=.*[A-ZА-ЯЁ]).{8,})$"/>
|
||||
<property name="fias.enable" value="false"/>
|
||||
<property name="com.arjuna.ats.arjuna.allowMultipleLastResources" value="true"/>
|
||||
<property name="file.webdav.upload.url" value="https://ervu-webdav.k8s.micord.ru"/>
|
||||
<property name="file.webdav.upload.username" value="test"/>
|
||||
<property name="file.webdav.upload.password" value="test"/>
|
||||
<property name="webdav.urls" value="https://ervu-webdav.k8s.micord.ru"/>
|
||||
<property name="webdav.username" value="test"/>
|
||||
<property name="webdav.password" value="test"/>
|
||||
<property name="av.kafka.download-request-topic" value="ervu.lkrp.download.request"/>
|
||||
<property name="av.kafka.bootstrap.servers" value="localhost:9092"/>
|
||||
<property name="av.kafka.security.protocol" value="SASL_PLAINTEXT"/>
|
||||
|
|
@ -68,6 +68,7 @@
|
|||
<property name="esia.org.scopes" value="org_fullname, org_shortname, org_brhs, org_brhs_ctts, org_brhs_addrs, org_type, org_ogrn, org_inn, org_leg, org_kpp, org_ctts, org_addrs, org_grps, org_emps"/>
|
||||
<property name="esia.org.scope.url" value="http://esia.gosuslugi.ru/"/>
|
||||
<property name="esia.base.uri" value="https://esia-portal1.test.gosuslugi.ru/"/>
|
||||
<property name="esia.issuer.url" value="http://esia-portal1.test.gosuslugi.ru/"/>
|
||||
<property name="esia.client.id" value="MNSV89"/>
|
||||
<property name="esia.redirect.url" value="https://lkrp.micord.ru"/>
|
||||
<property name="sign.url" value="https://ervu-sign-dev.k8s.micord.ru/sign"/>
|
||||
|
|
@ -83,7 +84,9 @@
|
|||
<property name="ervu.kafka.username" value="user1"/>
|
||||
<property name="ervu.kafka.password" value="Blfi9d2OFG"/>
|
||||
<property name="esnsi.okopf.cron.load" value="0 0 */1 * * *"/>
|
||||
<property name="esnsi.okopf.url" value="https://esnsi.gosuslugi.ru/rest/ext/v1/classifiers/11465/file?extension=JSON&encoding=UTF_8"/>
|
||||
<property name="esnsi.okopf.url" value="https://esnsi.gosuslugi.ru/rest/ext/v1/classifiers/16271/file?extension=JSON&encoding=UTF_8"/>
|
||||
<property name="esnsi.okop.retry.delay.load" value="1000"/>
|
||||
<property name="esnsi.okopf.retry.max.attempts.load" value="3"/>
|
||||
<property name="ervu.kafka.journal.request.topic" value="ervu.organization.journal.request"/>
|
||||
<property name="ervu.kafka.journal.reply.topic" value="ervu.organization.journal.response"/>
|
||||
<property name="db.journal.excluded.statuses" value="Направлено в ЕРВУ,Получен ЕРВУ"/>
|
||||
|
|
@ -91,12 +94,14 @@
|
|||
<property name="ervu.kafka.excerpt.request.topic" value="ervu.lkrp.excerpt.request"/>
|
||||
<property name="av.kafka.group.id" value="1"/>
|
||||
<property name="av.kafka.download.response" value="ervu.lkrp.av-fileupload-status"/>
|
||||
<property name="sign.verify.url" value="https://ervu-sign-dev.k8s.micord.ru/verify"/>
|
||||
<property name="esia.token.clear.cron" value="0 0 */1 * * *"/>
|
||||
<property name="esia.upload.data.role" value="MNSV89_UPLOAD_DATA"/>
|
||||
<property name="webdav.cleanup.cron" value="0 0 0 * * *"/>
|
||||
<property name="webdav.retry.delay" value="500"/>
|
||||
<property name="file.webdav.lifetime.seconds" value="300"/>
|
||||
<property name="file.webdav.extensions" value="csv,xlsx"/>
|
||||
<property name="webdav.bad_servers.cache.expire.seconds" value="120"/>
|
||||
</system-properties>
|
||||
<management>
|
||||
<audit-log>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS \
|
||||
-Ddb.app.host=${DB_APP_HOST:-db} \
|
||||
-Ddb.app.port=${DB_APP_PORT:-5432} \
|
||||
-Ddb.app.name=${DB_APP_NAME:-app} \
|
||||
-Ddb.app.username=${DB_APP_USERNAME:-app_user} \
|
||||
-Ddb.app.password=${DB_APP_PASSWORD:-apppassword} \
|
||||
-Ddb.host=${DB_APP_HOST:-db} \
|
||||
-Ddb.port=${DB_APP_PORT:-5432} \
|
||||
-Ddb.name=${DB_APP_NAME:-app} \
|
||||
-Ddb.username=${DB_APP_USERNAME:-app_user} \
|
||||
-Ddb.password=${DB_APP_PASSWORD:-apppassword} \
|
||||
"
|
||||
export JDK_JAVA_OPTIONS
|
||||
|
|
@ -31,6 +31,6 @@
|
|||
|
||||
<Resource name="webbpm/AppDS" auth="Container"
|
||||
type="javax.sql.DataSource" driverClassName="org.postgresql.Driver"
|
||||
url="jdbc:postgresql://${db.app.host}:${db.app.port}/${db.app.name}"
|
||||
username="${db.app.username}" password="${db.app.password}" maxTotal="20" maxIdle="10" maxWaitMillis="-1"/>
|
||||
url="jdbc:postgresql://${db.host}:${db.port}/${db.name}"
|
||||
username="${db.username}" password="${db.password}" maxTotal="20" maxIdle="10" maxWaitMillis="-1"/>
|
||||
</Context>
|
||||
|
|
|
|||
171
config/tomcat/etc/tomcat/server.xml
Normal file
171
config/tomcat/etc/tomcat/server.xml
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<!-- Note: A "Server" is not itself a "Container", so you may not
|
||||
define subcomponents such as "Valves" at this level.
|
||||
Documentation at /docs/config/server.html
|
||||
-->
|
||||
<Server port="8005" shutdown="SHUTDOWN">
|
||||
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
|
||||
<!-- Security listener. Documentation at /docs/config/listeners.html
|
||||
<Listener className="org.apache.catalina.security.SecurityListener" />
|
||||
-->
|
||||
<!-- APR library loader. Documentation at /docs/apr.html -->
|
||||
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
|
||||
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
|
||||
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
|
||||
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
|
||||
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
|
||||
|
||||
<!-- Global JNDI resources
|
||||
Documentation at /docs/jndi-resources-howto.html
|
||||
-->
|
||||
<GlobalNamingResources>
|
||||
<!-- Editable user database that can also be used by
|
||||
UserDatabaseRealm to authenticate users
|
||||
-->
|
||||
<Resource name="UserDatabase" auth="Container"
|
||||
type="org.apache.catalina.UserDatabase"
|
||||
description="User database that can be updated and saved"
|
||||
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
|
||||
pathname="conf/tomcat-users.xml" />
|
||||
</GlobalNamingResources>
|
||||
|
||||
<!-- A "Service" is a collection of one or more "Connectors" that share
|
||||
a single "Container" Note: A "Service" is not itself a "Container",
|
||||
so you may not define subcomponents such as "Valves" at this level.
|
||||
Documentation at /docs/config/service.html
|
||||
-->
|
||||
<Service name="Catalina">
|
||||
|
||||
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
|
||||
<!--
|
||||
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
|
||||
maxThreads="150" minSpareThreads="4"/>
|
||||
-->
|
||||
|
||||
|
||||
<!-- A "Connector" represents an endpoint by which requests are received
|
||||
and responses are returned. Documentation at :
|
||||
Java HTTP Connector: /docs/config/http.html
|
||||
Java AJP Connector: /docs/config/ajp.html
|
||||
APR (HTTP/AJP) Connector: /docs/apr.html
|
||||
Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
|
||||
-->
|
||||
<Connector port="8080" protocol="HTTP/1.1"
|
||||
connectionTimeout="20000"
|
||||
redirectPort="8443" />
|
||||
<!-- A "Connector" using the shared thread pool-->
|
||||
<!--
|
||||
<Connector executor="tomcatThreadPool"
|
||||
port="8080" protocol="HTTP/1.1"
|
||||
connectionTimeout="20000"
|
||||
redirectPort="8443" />
|
||||
-->
|
||||
<!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443
|
||||
This connector uses the NIO implementation. The default
|
||||
SSLImplementation will depend on the presence of the APR/native
|
||||
library and the useOpenSSL attribute of the AprLifecycleListener.
|
||||
Either JSSE or OpenSSL style configuration may be used regardless of
|
||||
the SSLImplementation selected. JSSE style configuration is used below.
|
||||
-->
|
||||
<!--
|
||||
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
|
||||
maxThreads="150" SSLEnabled="true">
|
||||
<SSLHostConfig>
|
||||
<Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
|
||||
type="RSA" />
|
||||
</SSLHostConfig>
|
||||
</Connector>
|
||||
-->
|
||||
<!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
|
||||
This connector uses the APR/native implementation which always uses
|
||||
OpenSSL for TLS.
|
||||
Either JSSE or OpenSSL style configuration may be used. OpenSSL style
|
||||
configuration is used below.
|
||||
-->
|
||||
<!--
|
||||
<Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
|
||||
maxThreads="150" SSLEnabled="true" >
|
||||
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
|
||||
<SSLHostConfig>
|
||||
<Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
|
||||
certificateFile="conf/localhost-rsa-cert.pem"
|
||||
certificateChainFile="conf/localhost-rsa-chain.pem"
|
||||
type="RSA" />
|
||||
</SSLHostConfig>
|
||||
</Connector>
|
||||
-->
|
||||
|
||||
<!-- Define an AJP 1.3 Connector on port 8009 -->
|
||||
<!--
|
||||
<Connector protocol="AJP/1.3"
|
||||
address="::1"
|
||||
port="8009"
|
||||
redirectPort="8443" />
|
||||
-->
|
||||
|
||||
<!-- An Engine represents the entry point (within Catalina) that processes
|
||||
every request. The Engine implementation for Tomcat stand alone
|
||||
analyzes the HTTP headers included with the request, and passes them
|
||||
on to the appropriate Host (virtual host).
|
||||
Documentation at /docs/config/engine.html -->
|
||||
|
||||
<!-- You should set jvmRoute to support load-balancing via AJP ie :
|
||||
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
|
||||
-->
|
||||
<Engine name="Catalina" defaultHost="localhost">
|
||||
|
||||
<!--For clustering, please take a look at documentation at:
|
||||
/docs/cluster-howto.html (simple how to)
|
||||
/docs/config/cluster.html (reference documentation) -->
|
||||
<!--
|
||||
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
|
||||
-->
|
||||
|
||||
<!-- Use the LockOutRealm to prevent attempts to guess user passwords
|
||||
via a brute-force attack -->
|
||||
<Realm className="org.apache.catalina.realm.LockOutRealm">
|
||||
<!-- This Realm uses the UserDatabase configured in the global JNDI
|
||||
resources under the key "UserDatabase". Any edits
|
||||
that are performed against this UserDatabase are immediately
|
||||
available for use by the Realm. -->
|
||||
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
|
||||
resourceName="UserDatabase"/>
|
||||
</Realm>
|
||||
|
||||
<Host name="localhost" appBase="webapps"
|
||||
errorReportValveClass="org.apache.catalina.valves.JsonErrorReportValve"
|
||||
unpackWARs="true" autoDeploy="true">
|
||||
|
||||
<!-- SingleSignOn valve, share authentication between web applications
|
||||
Documentation at: /docs/config/valve.html -->
|
||||
<!--
|
||||
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
|
||||
-->
|
||||
|
||||
<!-- Access log processes all example.
|
||||
Documentation at: /docs/config/valve.html
|
||||
Note: The pattern used is equivalent to using pattern="common" -->
|
||||
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
|
||||
prefix="localhost_access_log" suffix=".txt"
|
||||
pattern="%h %l %u %t "%r" %s %b" />
|
||||
|
||||
</Host>
|
||||
</Engine>
|
||||
</Service>
|
||||
</Server>
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<tomcat-users xmlns="http://tomcat.apache.org/xml"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
|
||||
version="1.0">
|
||||
<!--
|
||||
By default, no user is included in the "manager-gui" role required
|
||||
to operate the "/manager/html" web application. If you wish to use this app,
|
||||
you must define such a user - the username and password are arbitrary.
|
||||
|
||||
Built-in Tomcat manager roles:
|
||||
- manager-gui - allows access to the HTML GUI and the status pages
|
||||
- manager-script - allows access to the HTTP API and the status pages
|
||||
- manager-jmx - allows access to the JMX proxy and the status pages
|
||||
- manager-status - allows access to the status pages only
|
||||
|
||||
The users below are wrapped in a comment and are therefore ignored. If you
|
||||
wish to configure one or more of these users for use with the manager web
|
||||
application, do not forget to remove the <!.. ..> that surrounds them. You
|
||||
will also need to set the passwords to something appropriate.
|
||||
-->
|
||||
<user username="admin" password="<must-be-changed>" roles="manager-gui"/>
|
||||
</tomcat-users>
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<Context antiResourceLocking="false" privileged="true" >
|
||||
<CookieProcessor className="org.apache.tomcat.util.http.Rfc6265CookieProcessor"
|
||||
sameSiteCookies="strict" />
|
||||
<!--
|
||||
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
|
||||
allow="d+\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
|
||||
-->
|
||||
<Manager sessionAttributeValueClassNameFilter="java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFilter\$LruCache(?:\$1)?|java\.util\.(?:Linked)?HashMap"/>
|
||||
</Context>
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ru.micord.ervu.lkrp</groupId>
|
||||
<artifactId>ul</artifactId>
|
||||
<version>1.9.4-SNAPSHOT</version>
|
||||
<version>1.10.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>ru.micord.ervu.lkrp.ul</groupId>
|
||||
|
|
|
|||
74
docker-compose.yaml
Normal file
74
docker-compose.yaml
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
services:
|
||||
local-kafka:
|
||||
image: docker.io/bitnami/kafka:3.9.0
|
||||
container_name: kafka
|
||||
ports:
|
||||
- 9092:9092
|
||||
- 9094:9094
|
||||
volumes:
|
||||
- ./config/kafka_data:/bitnami/kafka
|
||||
env_file:
|
||||
- config/kafka.env
|
||||
healthcheck:
|
||||
test: ["CMD", "kafka-topics.sh", "--list", "--bootstrap-server", "localhost:9094"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 4
|
||||
|
||||
kafdrop:
|
||||
container_name: kafdrop
|
||||
image: obsidiandynamics/kafdrop
|
||||
restart: "no"
|
||||
ports:
|
||||
- 9000:9000
|
||||
env_file:
|
||||
config/kafdrop.env
|
||||
depends_on:
|
||||
local-kafka:
|
||||
condition: service_healthy
|
||||
|
||||
ervu-validate-recruits:
|
||||
image: registry-dev.pgs.rtlabs.ru/ervu/ervu-validate-recruits:0.0.1-sha51becef5
|
||||
container_name: validate-recruits
|
||||
depends_on:
|
||||
local-kafka:
|
||||
condition: service_healthy
|
||||
env_file:
|
||||
- config/ervu-validate-recruits.env
|
||||
|
||||
ervu-organization-registry:
|
||||
image: registry-dev.pgs.rtlabs.ru/ervu/ervu-organization-registry:0.0.1-sha487d2691
|
||||
container_name: organization-registry
|
||||
depends_on:
|
||||
local-kafka:
|
||||
condition: service_healthy
|
||||
env_file:
|
||||
- config/ervu-organization-registry.env
|
||||
|
||||
lkrp-av:
|
||||
image: registry-dev.pgs.rtlabs.ru/ervu/ervu-lkrp-av:0.0.1-sha071cf588
|
||||
container_name: lkrp-av
|
||||
depends_on:
|
||||
local-kafka:
|
||||
condition: service_healthy
|
||||
env_file:
|
||||
- config/ervu-lkrp-av.env
|
||||
|
||||
lkrp-ul:
|
||||
container_name: lkrp-ul
|
||||
depends_on:
|
||||
local-kafka:
|
||||
condition: service_healthy
|
||||
ervu-validate-recruits:
|
||||
condition: service_started
|
||||
ervu-organization-registry:
|
||||
condition: service_started
|
||||
lkrp-av:
|
||||
condition: service_started
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- 8080:8080
|
||||
env_file:
|
||||
- config/local.env
|
||||
141
ervu_lkrp_ul-openapi.yaml
Normal file
141
ervu_lkrp_ul-openapi.yaml
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
openapi: 3.0.3
|
||||
info:
|
||||
title: ervu-lkrp-ul API
|
||||
description: API сервиса ervu-lkrp-ul
|
||||
version: 1.9.1
|
||||
servers:
|
||||
- url: https://ul-lkrp-ervu-test.pgs.rtlabs.ru
|
||||
paths:
|
||||
/employee/document:
|
||||
post:
|
||||
summary: Загрузка файла
|
||||
operationId: saveEmployeeInformationFile
|
||||
description: Загрузка файла в ЕРВУ
|
||||
parameters:
|
||||
- name: file
|
||||
in: query
|
||||
required: true
|
||||
description: Файл
|
||||
schema:
|
||||
type: object
|
||||
- name: X-Employee-Info-File-Form-Type
|
||||
in: header
|
||||
required: true
|
||||
description: Тип формы
|
||||
schema:
|
||||
type: string
|
||||
- name: Client-Time-Zone
|
||||
in: header
|
||||
required: true
|
||||
description: Таймзона клиента
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
/esia/auth:
|
||||
get:
|
||||
summary: Получение маркера доступа
|
||||
operationId: esiaAuth
|
||||
description: Получение маркера доступа в обмен на код от ЕСИА и создание внутреннего токена
|
||||
parameters:
|
||||
- name: code
|
||||
in: query
|
||||
required: true
|
||||
description: Код, присланный ЕСИА после успешной авторизации
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: Authentication successful
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
/esia/org:
|
||||
get:
|
||||
summary: Получение информации об организации
|
||||
operationId: getOrgInfo
|
||||
description: Получение информации об организации ЕСИА
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
/esia/orgunitname:
|
||||
get:
|
||||
summary: Получение наименования организации
|
||||
operationId: getOrgUnitName
|
||||
description: Получение наименования организации ЕСИА
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: string
|
||||
/esia/refresh:
|
||||
post:
|
||||
summary: Обновление токена
|
||||
operationId: refreshToken
|
||||
description: Обновление токена
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
/esia/url:
|
||||
get:
|
||||
summary: Получение URL ЕСИА
|
||||
operationId: getEsiaUrl
|
||||
description: Получение URL ЕСИА
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: string
|
||||
/esia/userfullname:
|
||||
get:
|
||||
summary: Получение полного имени пользователя
|
||||
operationId: getUserFullname
|
||||
description: Получение полного имени пользователя ЕСИА
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: string
|
||||
/kafka/excerpt:
|
||||
get:
|
||||
summary: Получение выписки
|
||||
operationId: getExcerptFile
|
||||
description: Получение выписки по журналу взаимодействий с ЕРВУ
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
headers:
|
||||
Content-Disposition:
|
||||
schema:
|
||||
type: string
|
||||
example: attachment; filename*=UTF-8''encodedfilename.xlsx
|
||||
content:
|
||||
application/octet-stream:
|
||||
schema:
|
||||
type: object
|
||||
"204":
|
||||
description: No Content
|
||||
/rpc/filesentlog/bbaf33d7-0679-440b-a394-cb805ce80300/ru.micord.ervu.service.rpc.InMemoryStaticGridRpcService/loadData:
|
||||
post:
|
||||
summary: Получение данных по журналу взаимодействий
|
||||
operationId: call
|
||||
description: Получение данных по журналу взаимодействий с ЕРВУ
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
3
frontend/browser_check.js
Normal file
3
frontend/browser_check.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
document.addEventListener("DOMContentLoaded", function(event) {
|
||||
document.getElementById("browser-check-info").hidden = navigator.userAgent.indexOf("Chromium GOST") > -1 || navigator.userAgent.indexOf("YaBrowser") > -1;
|
||||
});
|
||||
|
|
@ -4,6 +4,10 @@
|
|||
<link rel="stylesheet" type="text/css" href="src/resources/landing/home.css">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="Content-Security-Policy"
|
||||
content="default-src 'self'; script-src 'self'; style-src 'unsafe-inline' 'self' data:; font-src 'self' data:; img-src 'self' data:"/>
|
||||
<meta name="referrer" content="strict-origin-when-cross-origin"/>
|
||||
<script src="browser_check.js"></script>
|
||||
</head>
|
||||
<body class="ul">
|
||||
|
||||
|
|
@ -25,9 +29,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById("browser-check-info").hidden = navigator.userAgent.indexOf("Chromium GOST") > -1 || navigator.userAgent.indexOf("YaBrowser") > -1;
|
||||
</script>
|
||||
<div class="container-inside">
|
||||
<div class="list-group lk-what">
|
||||
<div>
|
||||
|
|
@ -84,7 +85,7 @@
|
|||
<div class="section-group">
|
||||
<div class="icon-pers">
|
||||
Ежегодное предоставление списка граждан мужского пола, подлежащих первоначальной постановке на воинский учет в год достижения ими возраста 17 лет
|
||||
<div class="muted">Срок передачи сведений: <span class="detailed">ежегодно, в срок до 1 ноября</span></div>
|
||||
<div class="muted">Срок передачи сведений: <span class="detailed">ежегодно, в срок до 1 ноября</span></div>
|
||||
</div>
|
||||
<div class="icon-building">
|
||||
Ежегодное предоставление списка сотрудников/обучающихся в организации, подлежащих воинскому учету
|
||||
|
|
@ -109,10 +110,10 @@
|
|||
<span class="info"></span>Если в файле будут ошибĸи, данные не будут приняты Реестром и выгрузĸу сведений придется повторить
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-group lk-docs">
|
||||
<div class="list-group lk-docs">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@
|
|||
<title>Личный кабинет юр.лица</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="Content-Security-Policy"
|
||||
content="default-src 'self'; script-src 'self'; style-src 'unsafe-inline' 'self' data:; font-src 'self' data:; img-src 'self' data:"/>
|
||||
<meta name="referrer" content="strict-origin-when-cross-origin"/>
|
||||
<link rel="icon" type="image/png" href="src/resources/img/logo.png"/>
|
||||
</head>
|
||||
<body webbpm class="webbpm ervu_lkrp_ul">
|
||||
|
|
|
|||
6
frontend/package-lock.json
generated
6
frontend/package-lock.json
generated
|
|
@ -1748,9 +1748,9 @@
|
|||
}
|
||||
},
|
||||
"@webbpm/base-package": {
|
||||
"version": "3.185.0",
|
||||
"resolved": "https://repo.micord.ru/repository/npm-all/@webbpm/base-package/-/base-package-3.185.0.tgz",
|
||||
"integrity": "sha512-m6qlhhYIjx6tNUJl5MNsUflAFjLt2tLurxf706iwI6IM8ZZGeTjF6j1dCeEUZnOc6hntdRigcUpOsSGa97QMog==",
|
||||
"version": "3.187.1",
|
||||
"resolved": "https://repo.micord.ru/repository/npm-all/@webbpm/base-package/-/base-package-3.187.1.tgz",
|
||||
"integrity": "sha512-YWoxjDkesg90FzT1WfNSaNQMZounBn+TgDXLUSsfjEJjvfBp9nRTk228oEK3nP4SWxmqwZFZO8M6X509SiUEcw==",
|
||||
"requires": {
|
||||
"tslib": "^1.9.0"
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue