1. Import

This commit is contained in:
2026-03-29 10:34:57 +02:00
parent b0e00c1259
commit a1129565af
4899 changed files with 3007593 additions and 0 deletions

70
services/pom.xml Normal file
View File

@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.5</version>
<relativePath/>
</parent>
<groupId>de.votian</groupId>
<artifactId>votian-services</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>Votian REST Services</name>
<description>REST Service Layer for Votian Logistics (Stadtbote GmbH)</description>
<properties>
<java.version>21</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<dependency>
<groupId>com.github.librepdf</groupId>
<artifactId>openpdf</artifactId>
<version>1.3.39</version>
</dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,12 @@
package de.votian.services;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class VotianServicesApplication {
public static void main(String[] args) {
SpringApplication.run(VotianServicesApplication.class, args);
}
}

View File

@@ -0,0 +1,926 @@
package de.votian.services.config;
/**
* All known parameter keys used in the votian application.
* These keys are stored in the "parameter" database table and accessed via ParameterService.
* <p>
* Equivalent to the PHP constants loaded via defineGlobalParameters() and
* accessed via getParameterValue().
* <p>
* Keys ending with underscore are dynamic keys where an object ID (e.g., customer ID)
* gets appended at runtime. Use them with ParameterService.getObjectBasedParameterValue().
*/
public final class ParameterKeys {
private ParameterKeys() {}
// ======== API (19) ========
public static final String ORDER_REQUEST_AUTORESPONSE_ENABLED_CS = "ORDER_REQUEST_AUTORESPONSE_ENABLED_CS_";
public static final String ORDER_REQUEST_CHECK_EXISTENCE_COMMISSION_NO = "ORDER_REQUEST_CHECK_EXISTENCE_COMMISSION_NO";
public static final String ORDER_REQUEST_CHECK_OPERATION_EXISTENCE_COMMISSION_NO = "ORDER_REQUEST_CHECK_OPERATION_EXISTENCE_COMMISSION_NO";
public static final String ORDER_REQUEST_CHECK_OPERATION_JOB_STATUS_DISABLED = "ORDER_REQUEST_CHECK_OPERATION_JOB_STATUS_DISABLED";
public static final String ORDER_REQUEST_CUSTOMIZED_EVENT_MAPPING_ACTIVATED = "ORDER_REQUEST_CUSTOMIZED_EVENT_MAPPING_ACTIVATED_";
public static final String ORDER_REQUEST_ERROR_HANDLER_DISABLED = "ORDER_REQUEST_ERROR_HANDLER_DISABLED";
public static final String ORDER_REQUEST_ERROR_HANDLER_DISABLED_PREFIX = "ORDER_REQUEST_ERROR_HANDLER_DISABLED_";
public static final String ORDER_REQUEST_ERR_115_DISABLED = "ORDER_REQUEST_ERR_115_DISABLED";
public static final String ORDER_REQUEST_EVENTS_PREVENT_CANCELLATION = "ORDER_REQUEST_EVENTS_PREVENT_CANCELLATION_";
public static final String ORDER_REQUEST_EVENT_STORAGE_MODE_CS = "ORDER_REQUEST_EVENT_STORAGE_MODE_CS_";
public static final String ORDER_REQUEST_INVTEXT_DAYTIME_DISABLED = "ORDER_REQUEST_INVTEXT_DAYTIME_DISABLED";
public static final String ORDER_REQUEST_NO_PRICE_CS = "ORDER_REQUEST_NO_PRICE_CS_";
public static final String ORDER_REQUEST_VHT_ID_DEFAULT = "ORDER_REQUEST_VHT_ID_DEFAULT_";
public static final String STATION_REQUEST_CHECK_EXISTENCE_COMMISSION_NO = "STATION_REQUEST_CHECK_EXISTENCE_COMMISSION_NO";
public static final String STATION_REQUEST_CHECK_OPERATION_EXISTENCE_COMMISSION_NO = "STATION_REQUEST_CHECK_OPERATION_EXISTENCE_COMMISSION_NO";
public static final String STATION_REQUEST_CHECK_OPERATION_JOB_STATUS_DISABLED = "STATION_REQUEST_CHECK_OPERATION_JOB_STATUS_DISABLED";
public static final String STATION_REQUEST_ERROR_HANDLER_DISABLED = "STATION_REQUEST_ERROR_HANDLER_DISABLED";
public static final String STATION_REQUEST_ERROR_HANDLER_DISABLED_PREFIX = "STATION_REQUEST_ERROR_HANDLER_DISABLED_";
public static final String STATION_REQUEST_NO_PRICE_CS = "STATION_REQUEST_NO_PRICE_CS_";
// ======== AUTH (5) ========
public static final String LOGIN_CHECK_DEVICE = "LOGIN_CHECK_DEVICE";
public static final String LOGIN_FORGOT_PASSWORD_ENABLED = "LOGIN_FORGOT_PASSWORD_ENABLED";
public static final String MAXIMUM_LOGIN_TRIALS = "MAXIMUM_LOGIN_TRIALS";
public static final String USERTYPE_2FA_ENABLED = "USERTYPE_2FA_ENABLED";
public static final String USER_2FA_NO_DEACTIVATION = "USER_2FA_NO_DEACTIVATION";
// ======== AUTOMAILER (19) ========
public static final String AUTOMAILER_2_TRACKING_ENABLED = "AUTOMAILER_2_TRACKING_ENABLED";
public static final String AUTOMAILER_ACCEPTANCE_PROTOCOL_LOGFILE = "AUTOMAILER_ACCEPTANCE_PROTOCOL_LOGFILE";
public static final String AUTOMAILER_ACCEPTANCE_PROTOCOL_MAIL_BCC = "AUTOMAILER_ACCEPTANCE_PROTOCOL_MAIL_BCC";
public static final String AUTOMAILER_ACCEPTANCE_PROTOCOL_MAIL_CC = "AUTOMAILER_ACCEPTANCE_PROTOCOL_MAIL_CC";
public static final String AUTOMAILER_ACCEPTANCE_PROTOCOL_MAIL_TO = "AUTOMAILER_ACCEPTANCE_PROTOCOL_MAIL_TO";
public static final String AUTOMAILER_CARTAGE_NOTE_LOGFILE = "AUTOMAILER_CARTAGE_NOTE_LOGFILE";
public static final String AUTOMAILER_CRON_LOGFILE = "AUTOMAILER_CRON_LOGFILE";
public static final String AUTOMAILER_ENABLED = "AUTOMAILER_ENABLED";
public static final String AUTOMAILER_LOGFILE = "AUTOMAILER_LOGFILE";
public static final String AUTOMAILER_LOGFILE_2 = "AUTOMAILER_LOGFILE_2";
public static final String AUTOMAILER_LOGFILE_3 = "AUTOMAILER_LOGFILE_3";
public static final String AUTOMAILER_LOGFILE_5 = "AUTOMAILER_LOGFILE_5";
public static final String AUTOMAILER_LOGFILE_6 = "AUTOMAILER_LOGFILE_6";
public static final String AUTOMAILER_LOGFILE_7 = "AUTOMAILER_LOGFILE_7";
public static final String AUTOMAILER_LOGFILE_8 = "AUTOMAILER_LOGFILE_8";
public static final String AUTOMAILER_LOGFILE_RELATED = "AUTOMAILER_LOGFILE_RELATED";
public static final String AUTOMAILER_SLEEP_TIME = "AUTOMAILER_SLEEP_TIME";
public static final String AUTOMAILER_STARTTIME_IN_DAYS = "AUTOMAILER_STARTTIME_IN_DAYS";
public static final String AUTOMAILER_STARTTIME_PICKUP_IN_DAYS = "AUTOMAILER_STARTTIME_PICKUP_IN_DAYS";
// ======== AUTO_PROCESS (17) ========
public static final String AUTO_EXPORT_ENABLED = "AUTO_EXPORT_ENABLED";
public static final String AUTO_EXPORT_ENABLED_LYRECO = "AUTO_EXPORT_ENABLED_LYRECO";
public static final String AUTO_EXPORT_ENABLED_PDF = "AUTO_EXPORT_ENABLED_PDF";
public static final String AUTO_EXPORT_ENABLED_PDF_PREFIX = "AUTO_EXPORT_ENABLED_PDF_";
public static final String AUTO_EXPORT_INCLUDE_FILENAME_SUFFIX_CS = "AUTO_EXPORT_INCLUDE_FILENAME_SUFFIX_CS_";
public static final String AUTO_EXPORT_LOGFILE = "AUTO_EXPORT_LOGFILE";
public static final String AUTO_EXPORT_LOGFILE_LYRECO = "AUTO_EXPORT_LOGFILE_LYRECO";
public static final String AUTO_EXPORT_LOGFILE_LYRECO_NAP = "AUTO_EXPORT_LOGFILE_LYRECO_NAP";
public static final String AUTO_EXPORT_LOGFILE_NAP = "AUTO_EXPORT_LOGFILE_NAP";
public static final String AUTO_EXPORT_LOGFILE_PDF = "AUTO_EXPORT_LOGFILE_PDF";
public static final String AUTO_EXPORT_STARTTIME_IN_DAYS = "AUTO_EXPORT_STARTTIME_IN_DAYS";
public static final String AUTO_RESPONSE_ENABLED = "AUTO_RESPONSE_ENABLED";
public static final String AUTO_RESPONSE_INCLUDE_FILENAME_SUFFIX_CS = "AUTO_RESPONSE_INCLUDE_FILENAME_SUFFIX_CS_";
public static final String AUTO_RESPONSE_JOB_NEW_LOGFILE = "AUTO_RESPONSE_JOB_NEW_LOGFILE";
public static final String AUTO_RESPONSE_LOGFILE = "AUTO_RESPONSE_LOGFILE";
public static final String AUTO_RESPONSE_PARAMETERS_CS = "AUTO_RESPONSE_PARAMETERS_CS_";
public static final String AUTO_RESPONSE_STARTTIME_IN_DAYS = "AUTO_RESPONSE_STARTTIME_IN_DAYS";
// ======== BWV (2) ========
public static final String BWV_CR_PRICE_RETOUR = "BWV_CR_PRICE_RETOUR";
public static final String BWV_PHONE_NO = "BWV_PHONE_NO";
// ======== COURIER (25) ========
public static final String CR_ADD_TO_ASSET_ENABLED = "CR_ADD_TO_ASSET_ENABLED";
public static final String CR_EID_PREFIX = "CR_EID_PREFIX";
public static final String CR_PROV = "CR_PROV_";
public static final String CR_QUARANTINE = "CR_QUARANTINE";
public static final String CR_SID_PREFIX = "CR_SID_PREFIX";
public static final String CR_SID_STATUS = "CR_SID_STATUS";
public static final String MASK_COURIER_EID_LENGTH = "MASK_COURIER_EID_LENGTH";
public static final String MASK_COURIER_EID_MAX_LENGTH = "MASK_COURIER_EID_MAX_LENGTH";
public static final String MASK_COURIER_IMMEDIATE = "MASK_COURIER_IMMEDIATE";
public static final String MASK_COURIER_SORT_BY_OCCUPIED = "MASK_COURIER_SORT_BY_OCCUPIED";
public static final String MASK_CRVH_PARTNER_PROV_RANGE_LOWER = "MASK_CRVH_PARTNER_PROV_RANGE_LOWER";
public static final String MASK_CRVH_PARTNER_PROV_RANGE_UPPER = "MASK_CRVH_PARTNER_PROV_RANGE_UPPER";
public static final String MASK_CRVH_TOTALWEIGHT_MANDATORY = "MASK_CRVH_TOTALWEIGHT_MANDATORY";
public static final String MASK_CR_CARTAGE_LINKS_DISABLED = "MASK_CR_CARTAGE_LINKS_DISABLED";
public static final String MASK_CR_CHK_CMP_EXIST_DISABLED = "MASK_CR_CHK_CMP_EXIST_DISABLED";
public static final String MASK_CR_LIST_COLS = "MASK_CR_LIST_COLS";
public static final String MASK_CR_LIST_LEN_COLS = "MASK_CR_LIST_LEN_COLS";
public static final String MASK_CR_MOBILE_PDA_EDIT = "MASK_CR_MOBILE_PDA_EDIT";
public static final String MASK_CR_PRICE_MODE = "MASK_CR_PRICE_MODE";
public static final String MASK_CR_PRICE_MODE_CHECK_CHARS = "MASK_CR_PRICE_MODE_CHECK_CHARS";
public static final String MASK_CR_PRICE_MODE_DATE = "MASK_CR_PRICE_MODE_DATE";
public static final String MASK_CR_REPORT_DRIVER_HIDE = "MASK_CR_REPORT_DRIVER_HIDE";
public static final String MASK_CR_REPORT_FORMS_ENABLED = "MASK_CR_REPORT_FORMS_ENABLED";
public static final String MASK_CR_REPORT_FORMS_MAPPING = "MASK_CR_REPORT_FORMS_MAPPING";
public static final String MASK_CR_REPORT_ROWS_DISPLAYED = "MASK_CR_REPORT_ROWS_DISPLAYED";
// ======== CRON (4) ========
public static final String CRON_CARTAGE_NOTE_ENABLED = "CRON_CARTAGE_NOTE_ENABLED";
public static final String CRON_JOB_MAX_PRICE = "CRON_JOB_MAX_PRICE";
public static final String CRON_SERVICE_ACCEPTANCE_PROTOCOL_ENABLED = "CRON_SERVICE_ACCEPTANCE_PROTOCOL_ENABLED";
public static final String CRON_SMS_ENABLED = "CRON_SMS_ENABLED";
// ======== CUSTOMER (72) ========
public static final String CSC_ID_PAYER_CALCULATOR = "CSC_ID_PAYER_CALCULATOR";
public static final String CSC_ID_PAYER_CASH = "CSC_ID_PAYER_CASH";
public static final String CSC_ID_PAYER_DEFAULT = "CSC_ID_PAYER_DEFAULT";
public static final String CSC_ID_PAYER_EXTERN = "CSC_ID_PAYER_EXTERN";
public static final String CSC_INTERNAL_MATCH_CODE = "CSC_INTERNAL_MATCH_CODE";
public static final String CS_CMPTYPE2RPTYPE_MODIFY = "CS_CMPTYPE2RPTYPE_MODIFY";
public static final String CS_CMPTYPE2RPTYPE_MODIFY_2 = "CS_CMPTYPE2RPTYPE_MODIFY_2";
public static final String CS_CMPTYPE2RPTYPE_NEW = "CS_CMPTYPE2RPTYPE_NEW";
public static final String CS_COPY_NO_THIRD_PARTY = "CS_COPY_NO_THIRD_PARTY";
public static final String CS_EID_GENERATION = "CS_EID_GENERATION";
public static final String CS_EID_PREFIX = "CS_EID_PREFIX";
public static final String CS_JBSTATUSMAIL_FIELD3_DEFAULT = "CS_JBSTATUSMAIL_FIELD3_DEFAULT";
public static final String CS_JBSTATUSMAIL_FIELD9_DEFAULT = "CS_JBSTATUSMAIL_FIELD9_DEFAULT";
public static final String CS_JBSTATUSMAIL_FIELDA_DEFAULT = "CS_JBSTATUSMAIL_FIELDA_DEFAULT";
public static final String CS_JBSTATUSMAIL_FIELDS_ENABLED = "CS_JBSTATUSMAIL_FIELDS_ENABLED";
public static final String CS_JB_JAM_WAITTIME_AD_HOC_DEFAULT = "CS_JB_JAM_WAITTIME_AD_HOC_DEFAULT";
public static final String CS_JB_JAM_WAITTIME_CTRL = "CS_JB_JAM_WAITTIME_CTRL";
public static final String CS_JB_JAM_WAITTIME_RESERVATION_DEFAULT = "CS_JB_JAM_WAITTIME_RESERVATION_DEFAULT";
public static final String CS_PHONE_MINIMUM_LENGTH = "CS_PHONE_MINIMUM_LENGTH";
public static final String CS_TRACKING_ENABLED = "CS_TRACKING_ENABLED";
public static final String CUSTOMER_MANUAL_DISPO = "CUSTOMER_MANUAL_DISPO_";
public static final String CUSTOMER_MASK_CALCULATOR_USAGE_ONLY = "CUSTOMER_MASK_CALCULATOR_USAGE_ONLY_";
public static final String CUSTOMER_MASK_JB_CREATOR_DISCOUNT = "CUSTOMER_MASK_JB_CREATOR_DISCOUNT_";
public static final String CUSTOMER_MASK_JB_INCOMPLETE = "CUSTOMER_MASK_JB_INCOMPLETE_";
public static final String CUSTOMER_MASK_JOBLIST_ADD_ON_ALIGNS = "CUSTOMER_MASK_JOBLIST_ADD_ON_ALIGNS";
public static final String CUSTOMER_MASK_JOBLIST_ADD_ON_FIELDS = "CUSTOMER_MASK_JOBLIST_ADD_ON_FIELDS";
public static final String CUSTOMER_MASK_JOBLIST_ADD_ON_TITLES = "CUSTOMER_MASK_JOBLIST_ADD_ON_TITLES";
public static final String CUSTOMER_MASK_JOBLIST_ALIGNS = "CUSTOMER_MASK_JOBLIST_ALIGNS";
public static final String CUSTOMER_MASK_JOBLIST_ALIGNS_PREFIX = "CUSTOMER_MASK_JOBLIST_ALIGNS_";
public static final String CUSTOMER_MASK_JOBLIST_CANCELLATION_ENABLED = "CUSTOMER_MASK_JOBLIST_CANCELLATION_ENABLED_";
public static final String CUSTOMER_MASK_JOBLIST_CSC_DEFAULT = "CUSTOMER_MASK_JOBLIST_CSC_DEFAULT";
public static final String CUSTOMER_MASK_JOBLIST_DISPLAY_CANCELLED_JOBS = "CUSTOMER_MASK_JOBLIST_DISPLAY_CANCELLED_JOBS";
public static final String CUSTOMER_MASK_JOBLIST_DISPLAY_TOUR_REMARK_ENABLED = "CUSTOMER_MASK_JOBLIST_DISPLAY_TOUR_REMARK_ENABLED_";
public static final String CUSTOMER_MASK_JOBLIST_DISPO_FAV_ENABLED = "CUSTOMER_MASK_JOBLIST_DISPO_FAV_ENABLED_";
public static final String CUSTOMER_MASK_JOBLIST_FIELDCLAUSE = "CUSTOMER_MASK_JOBLIST_FIELDCLAUSE";
public static final String CUSTOMER_MASK_JOBLIST_FIELDS = "CUSTOMER_MASK_JOBLIST_FIELDS";
public static final String CUSTOMER_MASK_JOBLIST_FIELDS_PREFIX = "CUSTOMER_MASK_JOBLIST_FIELDS_";
public static final String CUSTOMER_MASK_JOBLIST_JBSTATUS_DEFAULT = "CUSTOMER_MASK_JOBLIST_JBSTATUS_DEFAULT";
public static final String CUSTOMER_MASK_JOBLIST_SEARCH_BY_ADDRESS_ENABLED = "CUSTOMER_MASK_JOBLIST_SEARCH_BY_ADDRESS_ENABLED_";
public static final String CUSTOMER_MASK_JOBLIST_SEARCH_BY_REMARK_ENABLED = "CUSTOMER_MASK_JOBLIST_SEARCH_BY_REMARK_ENABLED_";
public static final String CUSTOMER_MASK_JOBLIST_TITLES = "CUSTOMER_MASK_JOBLIST_TITLES";
public static final String CUSTOMER_MASK_JOBLIST_TITLES_PREFIX = "CUSTOMER_MASK_JOBLIST_TITLES_";
public static final String CUSTOMER_MASK_JOBLIST_XXXXXXXXXX = "CUSTOMER_MASK_JOBLIST_XXXXXXXXXX_";
public static final String CUSTOMER_MASK_SHOW_USER_DATA = "CUSTOMER_MASK_SHOW_USER_DATA";
public static final String CUSTOMER_SERVICE_DELIVERY_REASONS = "CUSTOMER_SERVICE_DELIVERY_REASONS";
public static final String CUSTOMER_SERVICE_RADIUS_INTERVALS = "CUSTOMER_SERVICE_RADIUS_INTERVALS_";
public static final String MASK_CSCSC_LIST_ACTIVATE_PROSPECT_LINKS_FOR_JOBS = "MASK_CSCSC_LIST_ACTIVATE_PROSPECT_LINKS_FOR_JOBS";
public static final String MASK_CSCSC_LIST_COLS = "MASK_CSCSC_LIST_COLS";
public static final String MASK_CSCSC_LIST_LEN_COLS = "MASK_CSCSC_LIST_LEN_COLS";
public static final String MASK_CSCSC_LIST_ORDER_BY = "MASK_CSCSC_LIST_ORDER_BY";
public static final String MASK_CSCSC_LIST_SHOW_PROSPECTS_PERMANENTLY = "MASK_CSCSC_LIST_SHOW_PROSPECTS_PERMANENTLY";
public static final String MASK_CSC_CMP_FIELDS_EDIT_DISABLED = "MASK_CSC_CMP_FIELDS_EDIT_DISABLED";
public static final String MASK_CSC_LIST_HQ_SELECTION_DISABLED = "MASK_CSC_LIST_HQ_SELECTION_DISABLED";
public static final String MASK_CS_CHECK_INTERNAL_BOOKING_ACCOUNT = "MASK_CS_CHECK_INTERNAL_BOOKING_ACCOUNT";
public static final String MASK_CS_DONT_MAKE_STANDARD_PRICE = "MASK_CS_DONT_MAKE_STANDARD_PRICE_";
public static final String MASK_CS_LIST_COLS = "MASK_CS_LIST_COLS";
public static final String MASK_CS_LIST_LEN_COLS = "MASK_CS_LIST_LEN_COLS";
public static final String MASK_CS_LIST_META_CS_MARKER = "MASK_CS_LIST_META_CS_MARKER";
public static final String MASK_CS_NEW_CLOSE_WINDOW = "MASK_CS_NEW_CLOSE_WINDOW";
public static final String MASK_CS_NEW_SIMILARITY_SEARCH = "MASK_CS_NEW_SIMILARITY_SEARCH";
public static final String MASK_CS_PROV_DEFAULT = "MASK_CS_PROV_DEFAULT";
public static final String MASK_CS_PROV_RANGE_LOWER = "MASK_CS_PROV_RANGE_LOWER";
public static final String MASK_CS_PROV_RANGE_UPPER = "MASK_CS_PROV_RANGE_UPPER";
public static final String MASK_CS_REPORTTYPE_MISC_ITEM = "MASK_CS_REPORTTYPE_MISC_ITEM";
public static final String MASK_CS_REPORT_FORMS_ENABLED = "MASK_CS_REPORT_FORMS_ENABLED";
public static final String MASK_CS_REPORT_FORMS_MAPPING = "MASK_CS_REPORT_FORMS_MAPPING";
public static final String MASK_CS_REPORT_ROWS_DISPLAYED = "MASK_CS_REPORT_ROWS_DISPLAYED";
public static final String MASK_CS_SELF_SERVICE_DISCOUNT = "MASK_CS_SELF_SERVICE_DISCOUNT";
public static final String MASK_CS_SHOW_LAST_JOB = "MASK_CS_SHOW_LAST_JOB";
public static final String MASK_CS_SPECIAL_TAX_IDS_CHANGE_MSG = "MASK_CS_SPECIAL_TAX_IDS_CHANGE_MSG";
public static final String MASK_CUSTOMER_INCOMPLETE = "MASK_CUSTOMER_INCOMPLETE_";
public static final String MASK_CUST_ALL_ADDR_ENABLED = "MASK_CUST_ALL_ADDR_ENABLED_";
// ======== DATATRANSFER (11) ========
public static final String DATATRANSFER_DIRECTORY = "DATATRANSFER_DIRECTORY_";
public static final String DATATRANSFER_DIRECTORY_CR = "DATATRANSFER_DIRECTORY_CR";
public static final String DATATRANSFER_DIRECTORY_CRVH = "DATATRANSFER_DIRECTORY_CRVH";
public static final String DATATRANSFER_DIRECTORY_CS = "DATATRANSFER_DIRECTORY_CS";
public static final String DATATRANSFER_DIRECTORY_EMP = "DATATRANSFER_DIRECTORY_EMP";
public static final String DATATRANSFER_DIRECTORY_JB = "DATATRANSFER_DIRECTORY_JB";
public static final String DATATRANSFER_HQ_PATH = "DATATRANSFER_HQ_PATH_";
public static final String DATATRANSFER_MAX_ALL_FILES_DIRECTORY = "DATATRANSFER_MAX_ALL_FILES_DIRECTORY_";
public static final String DATATRANSFER_MAX_FILES_SPECIAL = "DATATRANSFER_MAX_FILES_SPECIAL_";
public static final String DATATRANSFER_UPLOAD_PREFIX_RENAME = "DATATRANSFER_UPLOAD_PREFIX_RENAME";
public static final String DATATRANSFER_USERTYPE_SPECIAL = "DATATRANSFER_USERTYPE_SPECIAL";
// ======== DISPOSITION (46) ========
public static final String DISPOSITION_ALLOCATION_MODE = "DISPOSITION_ALLOCATION_MODE";
public static final String DISPOSITION_ASSOC_ZONE_ZIPCODE_NOT_DISJUNCT = "DISPOSITION_ASSOC_ZONE_ZIPCODE_NOT_DISJUNCT";
public static final String DISPOSITION_CHECK_TOTALWEIGHT_ENABLED = "DISPOSITION_CHECK_TOTALWEIGHT_ENABLED";
public static final String DISPOSITION_ECO_CONTAINER_ALL_CS_RELATED = "DISPOSITION_ECO_CONTAINER_ALL_CS_RELATED";
public static final String DISPOSITION_ECO_CONTAINER_DISPLAY_ALL_JOBS_PERMANENTLY = "DISPOSITION_ECO_CONTAINER_DISPLAY_ALL_JOBS_PERMANENTLY";
public static final String DISPOSITION_ECO_CONTAINER_OFFERS = "DISPOSITION_ECO_CONTAINER_OFFERS";
public static final String DISPOSITION_END_HOUR_OFFSET = "DISPOSITION_END_HOUR_OFFSET";
public static final String DISPOSITION_HOURS = "DISPOSITION_HOURS";
public static final String DISPOSITION_HOUR_TIME_UNITS = "DISPOSITION_HOUR_TIME_UNITS";
public static final String DISPOSITION_JB_STATUS_MODE = "DISPOSITION_JB_STATUS_MODE";
public static final String DISPOSITION_LOG_PAGE_CALL_ENABLED = "DISPOSITION_LOG_PAGE_CALL_ENABLED";
public static final String DISPOSITION_RESTRICTED_ACCESS_CLAUSE_JOB = "DISPOSITION_RESTRICTED_ACCESS_CLAUSE_JOB";
public static final String DISPOSITION_RESTRICTED_ACCESS_CLAUSE_VEHICLE = "DISPOSITION_RESTRICTED_ACCESS_CLAUSE_VEHICLE";
public static final String DISPOSITION_SERVICES_FOR_SORTING = "DISPOSITION_SERVICES_FOR_SORTING";
public static final String DISPOSITION_SHOW_EXCLUDED_VEHICLES = "DISPOSITION_SHOW_EXCLUDED_VEHICLES";
public static final String DISPOSITION_SORTING_SEQUENCE = "DISPOSITION_SORTING_SEQUENCE";
public static final String DISPOSITION_START_HOUR_OFFSET = "DISPOSITION_START_HOUR_OFFSET";
public static final String DISPOSITION_UNIQUE_DISPLAY = "DISPOSITION_UNIQUE_DISPLAY";
public static final String DISPOSITION_WHOLE_DAY_SORTING_SEQUENCE = "DISPOSITION_WHOLE_DAY_SORTING_SEQUENCE";
public static final String DISPOSITION_WHOLE_DAY_UNIQUE_DISPLAY = "DISPOSITION_WHOLE_DAY_UNIQUE_DISPLAY";
public static final String MASK_DISPOSITION_APPOINTMENTS_ENABLED = "MASK_DISPOSITION_APPOINTMENTS_ENABLED";
public static final String MASK_DISPOSITION_CALENDER_SUBMIT_DISABLED = "MASK_DISPOSITION_CALENDER_SUBMIT_DISABLED";
public static final String MASK_DISPOSITION_CHECK_DELIVERY_BEFORE_SERVICE_DISABLED = "MASK_DISPOSITION_CHECK_DELIVERY_BEFORE_SERVICE_DISABLED";
public static final String MASK_DISPOSITION_CMP_FIELD_DISPLAYED = "MASK_DISPOSITION_CMP_FIELD_DISPLAYED";
public static final String MASK_DISPOSITION_DAYTIMES_COMPUTATION_MODE = "MASK_DISPOSITION_DAYTIMES_COMPUTATION_MODE";
public static final String MASK_DISPOSITION_DAYTIMES_FOR_INSTALLATIONS_DISABLED = "MASK_DISPOSITION_DAYTIMES_FOR_INSTALLATIONS_DISABLED";
public static final String MASK_DISPOSITION_DISPLAY_WHOLE_DAY_WITH_SINGLE_DAYTIMES = "MASK_DISPOSITION_DISPLAY_WHOLE_DAY_WITH_SINGLE_DAYTIMES";
public static final String MASK_DISPOSITION_FIRST_ZONE_SELECTED = "MASK_DISPOSITION_FIRST_ZONE_SELECTED";
public static final String MASK_DISPOSITION_FUNCTIONNAME_CARTAGE_NOTE = "MASK_DISPOSITION_FUNCTIONNAME_CARTAGE_NOTE";
public static final String MASK_DISPOSITION_INIT_CS = "MASK_DISPOSITION_INIT_CS";
public static final String MASK_DISPOSITION_INIT_GROUP = "MASK_DISPOSITION_INIT_GROUP";
public static final String MASK_DISPOSITION_ITEM_DISPLAY_MODE = "MASK_DISPOSITION_ITEM_DISPLAY_MODE";
public static final String MASK_DISPOSITION_ITEM_DRAGBAR_SHOW_JB_ID = "MASK_DISPOSITION_ITEM_DRAGBAR_SHOW_JB_ID";
public static final String MASK_DISPOSITION_ITEM_SHOW_ZIPCODE = "MASK_DISPOSITION_ITEM_SHOW_ZIPCODE";
public static final String MASK_DISPOSITION_MULTIPLE_ROWS_DISABLED = "MASK_DISPOSITION_MULTIPLE_ROWS_DISABLED";
public static final String MASK_DISPOSITION_SCALING_FACTOR_DEFAULT = "MASK_DISPOSITION_SCALING_FACTOR_DEFAULT";
public static final String MASK_DISPOSITION_SERVICEZONE_CAPACITY_ENABLED = "MASK_DISPOSITION_SERVICEZONE_CAPACITY_ENABLED";
public static final String MASK_DISPOSITION_TIMELINE_ENABLE_DROPPING_ON_PAST_TIMESLOTS = "MASK_DISPOSITION_TIMELINE_ENABLE_DROPPING_ON_PAST_TIMESLOTS";
public static final String MASK_DISPOSITION_TIMELINE_HOURS_HIDE = "MASK_DISPOSITION_TIMELINE_HOURS_HIDE";
public static final String MASK_DISPOSITION_WHOLE_DAY_APPOINTMENTS_ENABLED = "MASK_DISPOSITION_WHOLE_DAY_APPOINTMENTS_ENABLED";
public static final String MASK_DISPOSITION_WHOLE_DAY_COLSPAN_VALUES = "MASK_DISPOSITION_WHOLE_DAY_COLSPAN_VALUES";
public static final String MASK_DISPOSITION_WHOLE_DAY_JOB_DISPLAY_MODE = "MASK_DISPOSITION_WHOLE_DAY_JOB_DISPLAY_MODE";
public static final String MASK_DISPOSITION_WHOLE_DAY_JOB_SET_IN_FDS = "MASK_DISPOSITION_WHOLE_DAY_JOB_SET_IN_FDS";
public static final String MASK_DISPOSITION_WHOLE_DAY_JS_RESERVE_PAR = "MASK_DISPOSITION_WHOLE_DAY_JS_RESERVE_PAR";
public static final String MASK_DISPOSITION_WHOLE_DAY_ONLY_IF_DELV_IN_SPECIAL_ZONES_CS = "MASK_DISPOSITION_WHOLE_DAY_ONLY_IF_DELV_IN_SPECIAL_ZONES_CS_";
public static final String MASK_DISPOSITION_WHOLE_DAY_ONLY_IF_INST_IN_SPECIAL_ZONES_CS = "MASK_DISPOSITION_WHOLE_DAY_ONLY_IF_INST_IN_SPECIAL_ZONES_CS_";
// ======== DPF (11) ========
public static final String DPF_CHECKTIME_ENABLED = "DPF_CHECKTIME_ENABLED";
public static final String DPF_CHECKTIME_IN_DAYS = "DPF_CHECKTIME_IN_DAYS";
public static final String DPF_CHECKTYPE = "DPF_CHECKTYPE";
public static final String DPF_CR_ENABLED = "DPF_CR_ENABLED";
public static final String DPF_CS_ENABLED = "DPF_CS_ENABLED";
public static final String DPF_LOGFILE = "DPF_LOGFILE";
public static final String DPF_MATCHTYPE = "DPF_MATCHTYPE";
public static final String DPF_PORT = "DPF_PORT";
public static final String DPF_SERVER = "DPF_SERVER";
public static final String DPF_USER_ID = "DPF_USER_ID";
public static final String DPF_USER_PASSWD = "DPF_USER_PASSWD";
// ======== EXPORT (41) ========
public static final String EXPORT_ADD_CS_MASTER_DATA = "EXPORT_ADD_CS_MASTER_DATA";
public static final String EXPORT_ADD_PAYING_CSCAD_DATA_ADT_1 = "EXPORT_ADD_PAYING_CSCAD_DATA_ADT_1";
public static final String EXPORT_ADD_PAYING_CSCAD_DATA_ADT_2 = "EXPORT_ADD_PAYING_CSCAD_DATA_ADT_2";
public static final String EXPORT_ADD_PAYING_CSCAD_DATA_ADT_3 = "EXPORT_ADD_PAYING_CSCAD_DATA_ADT_3";
public static final String EXPORT_CAT_08_CONST_CONTACT_PERSON = "EXPORT_CAT_08_CONST_CONTACT_PERSON";
public static final String EXPORT_CAT_08_CONST_INV2HQ = "EXPORT_CAT_08_CONST_INV2HQ";
public static final String EXPORT_CAT_08_CONST_PRICE_SPECIAL = "EXPORT_CAT_08_CONST_PRICE_SPECIAL";
public static final String EXPORT_CAT_08_CONST_PRODUCT = "EXPORT_CAT_08_CONST_PRODUCT";
public static final String EXPORT_CAT_08_CONST_SINGLE_INV = "EXPORT_CAT_08_CONST_SINGLE_INV";
public static final String EXPORT_CAT_08_CONST_STAFFER = "EXPORT_CAT_08_CONST_STAFFER";
public static final String EXPORT_CAT_09_FILE_EXTENSION = "EXPORT_CAT_09_FILE_EXTENSION";
public static final String EXPORT_CONST_01 = "EXPORT_CONST_01";
public static final String EXPORT_CONST_CONTACT_PERSON = "EXPORT_CONST_CONTACT_PERSON";
public static final String EXPORT_CONST_PRICE_SPECIAL = "EXPORT_CONST_PRICE_SPECIAL";
public static final String EXPORT_CONST_PRODUCT = "EXPORT_CONST_PRODUCT";
public static final String EXPORT_CONST_STAFFER = "EXPORT_CONST_STAFFER";
public static final String EXPORT_CSEID_MAPPING = "EXPORT_CSEID_MAPPING_";
public static final String EXPORT_CSV_HEADLINE_CS = "EXPORT_CSV_HEADLINE_CS_";
public static final String EXPORT_FILES_ON_SERVER_CUSTOMER = "EXPORT_FILES_ON_SERVER_CUSTOMER";
public static final String EXPORT_FILTER_CALCULATOR_NO_BOOKINGNOTES = "EXPORT_FILTER_CALCULATOR_NO_BOOKINGNOTES";
public static final String EXPORT_FTP_FILE_EXTENSIONS_ENABLED = "EXPORT_FTP_FILE_EXTENSIONS_ENABLED";
public static final String EXPORT_HQ_KEY = "EXPORT_HQ_KEY";
public static final String EXPORT_MAIL_SUBJECT_CS = "EXPORT_MAIL_SUBJECT_CS_";
public static final String EXPORT_MASK_CARRIER_DISABLED = "EXPORT_MASK_CARRIER_DISABLED";
public static final String EXPORT_MASK_COLLECTED_VOLUME_DISABLED = "EXPORT_MASK_COLLECTED_VOLUME_DISABLED";
public static final String EXPORT_MASK_CREDITNOTE_DISABLED = "EXPORT_MASK_CREDITNOTE_DISABLED";
public static final String EXPORT_MASK_CREDITOR_DISABLED = "EXPORT_MASK_CREDITOR_DISABLED";
public static final String EXPORT_MASK_DEBITNOTE_DISABLED = "EXPORT_MASK_DEBITNOTE_DISABLED";
public static final String EXPORT_MASK_DEBITOR_DISABLED = "EXPORT_MASK_DEBITOR_DISABLED";
public static final String EXPORT_MASK_DEBITOR_SALES_DISABLED = "EXPORT_MASK_DEBITOR_SALES_DISABLED";
public static final String EXPORT_MASK_FTP_SERVER_FILES_DISABLED = "EXPORT_MASK_FTP_SERVER_FILES_DISABLED";
public static final String EXPORT_MASK_FTP_UPLOAD_DISABLED = "EXPORT_MASK_FTP_UPLOAD_DISABLED";
public static final String EXPORT_MASK_SPECIAL_DISABLED = "EXPORT_MASK_SPECIAL_DISABLED";
public static final String EXPORT_MASK_VEHICLE_DISABLED = "EXPORT_MASK_VEHICLE_DISABLED";
public static final String EXPORT_PAR_NAME = "EXPORT_PAR_NAME_";
public static final String EXPORT_PATH = "EXPORT_PATH";
public static final String EXPORT_SEMAPHORE_LIVE_TIME = "EXPORT_SEMAPHORE_LIVE_TIME";
public static final String EXPORT_SEMAPHORE_USAGE_DISABLED = "EXPORT_SEMAPHORE_USAGE_DISABLED";
public static final String EXPORT_SPECIAL_FUNCTIONNAME_SUFFICES_CS = "EXPORT_SPECIAL_FUNCTIONNAME_SUFFICES_CS_";
public static final String EXPORT_SPECIAL_FUNCTION_MAX_NUM_OF_STATIONS = "EXPORT_SPECIAL_FUNCTION_MAX_NUM_OF_STATIONS_";
public static final String EXPORT_SPECIAL_FUNCTION_ZIPCODE_MAPPING = "EXPORT_SPECIAL_FUNCTION_ZIPCODE_MAPPING";
// ======== FTP (42) ========
public static final String FTP_ACCESS_ADMIN_ONLY = "FTP_ACCESS_ADMIN_ONLY_";
public static final String FTP_DISPLAY_ADMIN_ONLY = "FTP_DISPLAY_ADMIN_ONLY_";
public static final String FTP_DOWNLOADPATH = "FTP_DOWNLOADPATH_";
public static final String FTP_IMPORT_SERVERLIST = "FTP_IMPORT_SERVERLIST";
public static final String FTP_LOCALPATH = "FTP_LOCALPATH";
public static final String FTP_LOCALPATH_PREFIX = "FTP_LOCALPATH_";
public static final String FTP_LOCALPATH_CS = "FTP_LOCALPATH_CS_";
public static final String FTP_LOCALPATH_HHA = "FTP_LOCALPATH_HHA";
public static final String FTP_LOCALPATH_LYRECO = "FTP_LOCALPATH_LYRECO";
public static final String FTP_LOCALPATH_MPS1 = "FTP_LOCALPATH_MPS1";
public static final String FTP_LOCALPATH_PDF = "FTP_LOCALPATH_PDF";
public static final String FTP_PASSWORD = "FTP_PASSWORD";
public static final String FTP_PASSWORD_PREFIX = "FTP_PASSWORD_";
public static final String FTP_PASSWORD_CS = "FTP_PASSWORD_CS_";
public static final String FTP_PASSWORD_HHA = "FTP_PASSWORD_HHA";
public static final String FTP_PASSWORD_LYRECO = "FTP_PASSWORD_LYRECO";
public static final String FTP_PASSWORD_MPS1 = "FTP_PASSWORD_MPS1";
public static final String FTP_PASSWORD_PDF = "FTP_PASSWORD_PDF";
public static final String FTP_REMOTEPATH = "FTP_REMOTEPATH_";
public static final String FTP_REMOTEPATH_CS = "FTP_REMOTEPATH_CS_";
public static final String FTP_REMOTEPATH_HHA = "FTP_REMOTEPATH_HHA";
public static final String FTP_REMOTEPATH_LYRECO = "FTP_REMOTEPATH_LYRECO";
public static final String FTP_REMOTEPATH_LYRECO_CS = "FTP_REMOTEPATH_LYRECO_CS_";
public static final String FTP_REMOTEPATH_MPS1 = "FTP_REMOTEPATH_MPS1";
public static final String FTP_REMOTEPATH_PDF = "FTP_REMOTEPATH_PDF";
public static final String FTP_REMOTESUBPATH_PDF_CS = "FTP_REMOTESUBPATH_PDF_CS_";
public static final String FTP_SERVER = "FTP_SERVER";
public static final String FTP_SERVER_PREFIX = "FTP_SERVER_";
public static final String FTP_SERVER_CS = "FTP_SERVER_CS_";
public static final String FTP_SERVER_HHA = "FTP_SERVER_HHA";
public static final String FTP_SERVER_LYRECO = "FTP_SERVER_LYRECO";
public static final String FTP_SERVER_MPS1 = "FTP_SERVER_MPS1";
public static final String FTP_SERVER_PDF = "FTP_SERVER_PDF";
public static final String FTP_SSL = "FTP_SSL_";
public static final String FTP_UPLOADPATH = "FTP_UPLOADPATH";
public static final String FTP_USER = "FTP_USER";
public static final String FTP_USER_PREFIX = "FTP_USER_";
public static final String FTP_USER_CS = "FTP_USER_CS_";
public static final String FTP_USER_HHA = "FTP_USER_HHA";
public static final String FTP_USER_LYRECO = "FTP_USER_LYRECO";
public static final String FTP_USER_MPS1 = "FTP_USER_MPS1";
public static final String FTP_USER_PDF = "FTP_USER_PDF";
// ======== GEO (7) ========
public static final String GEOCACHE_LIFETIME = "GEOCACHE_LIFETIME";
public static final String GEO_EARTH_RADIUS = "GEO_EARTH_RADIUS";
public static final String OPTIMIZATION_COORDINATES_END = "OPTIMIZATION_COORDINATES_END";
public static final String OPTIMIZATION_COORDINATES_START = "OPTIMIZATION_COORDINATES_START";
public static final String OPTIMIZATION_DISABLED = "OPTIMIZATION_DISABLED";
public static final String PZM_ROUNDTRIPKM = "PZM_ROUNDTRIPKM";
public static final String PZM_SHORTEST = "PZM_SHORTEST";
// ======== GLOBAL (21) ========
public static final String GLOBAL_CRON_ENABLED = "GLOBAL_CRON_ENABLED";
public static final String GLOBAL_CUSTOMER_READONLY_DISABLED = "GLOBAL_CUSTOMER_READONLY_DISABLED";
public static final String GLOBAL_NATIONALITY_DEFAULT = "GLOBAL_NATIONALITY_DEFAULT";
public static final String GLOBAL_NATIONALITY_WHITELIST = "GLOBAL_NATIONALITY_WHITELIST";
public static final String GLOBAL_PRODUCTION_STATE = "GLOBAL_PRODUCTION_STATE";
public static final String GLOBAL_SALES_TAX = "GLOBAL_SALES_TAX";
public static final String GLOBAL_SESSION_SALT = "GLOBAL_SESSION_SALT";
public static final String GLOBAL_SESSION_SYSTEM_ID = "GLOBAL_SESSION_SYSTEM_ID";
public static final String GLOBAL_UNIQUE_DB_INSTANCE_NO = "GLOBAL_UNIQUE_DB_INSTANCE_NO";
public static final String GLOBAL_URL = "GLOBAL_URL";
public static final String GLOBAL_USER_ACCOUNT_EQUALS_EMAIL_DISABLED = "GLOBAL_USER_ACCOUNT_EQUALS_EMAIL_DISABLED";
public static final String GLOBAL_USER_REGISTRATION_ENABLED = "GLOBAL_USER_REGISTRATION_ENABLED";
public static final String GLOBAL_USE_JB_PARENT_ID_FOR_INVOICE_NO = "GLOBAL_USE_JB_PARENT_ID_FOR_INVOICE_NO";
public static final String GLOBAL_USE_RELATED_CUSTOMER = "GLOBAL_USE_RELATED_CUSTOMER";
public static final String GLOBAL_VEHICLE_COURIER_RELATION = "GLOBAL_VEHICLE_COURIER_RELATION";
public static final String GLOBAL_VEHICLE_STOCK_RELATION = "GLOBAL_VEHICLE_STOCK_RELATION";
public static final String GLOBAL_WEB_REGISTRATION_ENABLED = "GLOBAL_WEB_REGISTRATION_ENABLED";
public static final String SYSTEM_FORM_SINGLE_HQ = "SYSTEM_FORM_SINGLE_HQ";
public static final String SYSTEM_FORM_SINGLE_HQ_PREFIX = "SYSTEM_FORM_SINGLE_HQ_";
public static final String SYSTEM_LANGUAGE_AUTO_INSERT = "SYSTEM_LANGUAGE_AUTO_INSERT";
public static final String SYSTEM_LANGUAGE_DEFAULT = "SYSTEM_LANGUAGE_DEFAULT";
// ======== GROUPWARE (17) ========
public static final String MASK_AP_BTN_CS_MOTIVATION_COUNTER = "MASK_AP_BTN_CS_MOTIVATION_COUNTER";
public static final String MASK_AP_BTN_CS_NEW = "MASK_AP_BTN_CS_NEW";
public static final String MASK_AP_BTN_CS_REPORT = "MASK_AP_BTN_CS_REPORT";
public static final String MASK_AP_BTN_CS_STATE_CHANGE = "MASK_AP_BTN_CS_STATE_CHANGE";
public static final String MASK_AP_CATEGORY_3_MISC_ITEM = "MASK_AP_CATEGORY_3_MISC_ITEM";
public static final String MASK_AP_CATEGORY_4_PRESET = "MASK_AP_CATEGORY_4_PRESET";
public static final String MASK_AP_CAT = "MASK_AP_CAT_";
public static final String MASK_AP_CAT_4_9 = "MASK_AP_CAT_4_9";
public static final String MASK_AP_WARNING_DISABLE_QUESTION_NO_REPORT_OF_SAME_DAY = "MASK_AP_WARNING_DISABLE_QUESTION_NO_REPORT_OF_SAME_DAY";
public static final String MASK_ATIH_CRIT_MSG_IMPL_CRIT_MASTER_STATE = "MASK_ATIH_CRIT_MSG_IMPL_CRIT_MASTER_STATE";
public static final String MASK_ATIH_CRIT_MSG_OUTPUT = "MASK_ATIH_CRIT_MSG_OUTPUT";
public static final String MASK_ATIH_LIST_COLS_FIELDTYPES = "MASK_ATIH_LIST_COLS_FIELDTYPES";
public static final String MASK_ATIH_PROBABILITY_VALUE_RED = "MASK_ATIH_PROBABILITY_VALUE_RED";
public static final String MASK_ATIH_PROBABILITY_VALUE_YELLOW = "MASK_ATIH_PROBABILITY_VALUE_YELLOW";
public static final String MASK_ATI_LIST_COLS_FIELDTYPES = "MASK_ATI_LIST_COLS_FIELDTYPES";
public static final String MASK_ATM_LIST_COLS_FIELDTYPES = "MASK_ATM_LIST_COLS_FIELDTYPES";
public static final String MASK_AT_LIST_COLS = "MASK_AT_LIST_COLS";
// ======== HEADQUARTERS (2) ========
public static final String HQ_ID_DEFAULT = "HQ_ID_DEFAULT";
public static final String HQ_INSTANCE = "HQ_INSTANCE";
// ======== HISTORY (8) ========
public static final String HISTORY_CRVH_STATUS_MODIFIED_KEYACTIVE = "HISTORY_CRVH_STATUS_MODIFIED_KEYACTIVE";
public static final String HISTORY_CRVH_STATUS_MODIFIED_KEYTEXT = "HISTORY_CRVH_STATUS_MODIFIED_KEYTEXT";
public static final String HISTORY_CR_STATUS_MODIFIED_KEYACTIVE = "HISTORY_CR_STATUS_MODIFIED_KEYACTIVE";
public static final String HISTORY_CR_STATUS_MODIFIED_KEYTEXT = "HISTORY_CR_STATUS_MODIFIED_KEYTEXT";
public static final String HISTORY_CSC_ADDRESS_MODIFIED_KEYACTIVE = "HISTORY_CSC_ADDRESS_MODIFIED_KEYACTIVE";
public static final String HISTORY_CSC_ADDRESS_MODIFIED_KEYTEXT = "HISTORY_CSC_ADDRESS_MODIFIED_KEYTEXT";
public static final String HISTORY_CS_STATUS_MODIFIED_KEYACTIVE = "HISTORY_CS_STATUS_MODIFIED_KEYACTIVE";
public static final String HISTORY_CS_STATUS_MODIFIED_KEYTEXT = "HISTORY_CS_STATUS_MODIFIED_KEYTEXT";
// ======== IMAGES (6) ========
public static final String IMG_LOGO_BGCOL_EMAIL = "IMG_LOGO_BGCOL_EMAIL";
public static final String IMG_LOGO_HEIGHT = "IMG_LOGO_HEIGHT";
public static final String IMG_LOGO_NAME = "IMG_LOGO_NAME";
public static final String IMG_LOGO_NAME_EMAIL = "IMG_LOGO_NAME_EMAIL";
public static final String IMG_LOGO_WIDTH = "IMG_LOGO_WIDTH";
public static final String SIGNS_PATH = "SIGNS_PATH";
// ======== IMPORT (26) ========
public static final String IMPORT_ALLERGO_JOB_FIELDS = "IMPORT_ALLERGO_JOB_FIELDS";
public static final String IMPORT_ARTICLEGROUP_FIELDS_GROUP = "IMPORT_ARTICLEGROUP_FIELDS_GROUP_";
public static final String IMPORT_ARTICLE_FIELDS_GROUP = "IMPORT_ARTICLE_FIELDS_GROUP_";
public static final String IMPORT_BAUHAUS_JOB_FIELDS = "IMPORT_BAUHAUS_JOB_FIELDS";
public static final String IMPORT_BMW_JOB_FIELDS = "IMPORT_BMW_JOB_FIELDS";
public static final String IMPORT_DHL_JOB_FIELDS = "IMPORT_DHL_JOB_FIELDS";
public static final String IMPORT_FAMO_JOB_FIELDS = "IMPORT_FAMO_JOB_FIELDS";
public static final String IMPORT_GLOBUS_JOB_FIELDS = "IMPORT_GLOBUS_JOB_FIELDS";
public static final String IMPORT_HAGEBAU_JOB_FIELDS = "IMPORT_HAGEBAU_JOB_FIELDS";
public static final String IMPORT_HORNBACH_JOB_FIELDS = "IMPORT_HORNBACH_JOB_FIELDS";
public static final String IMPORT_JOBARTICLE_FIELDS = "IMPORT_JOBARTICLE_FIELDS";
public static final String IMPORT_JOBSERVICE_FIELDS = "IMPORT_JOBSERVICE_FIELDS";
public static final String IMPORT_JOBS_BY_PRICEMATRIX_JOB_FIELDS = "IMPORT_JOBS_BY_PRICEMATRIX_JOB_FIELDS";
public static final String IMPORT_JOB_FIELDS = "IMPORT_JOB_FIELDS";
public static final String IMPORT_KABUCO_JOB_FIELDS = "IMPORT_KABUCO_JOB_FIELDS";
public static final String IMPORT_LYRECO_JOB_FIELDS = "IMPORT_LYRECO_JOB_FIELDS";
public static final String IMPORT_OBI_JOB_FIELDS = "IMPORT_OBI_JOB_FIELDS";
public static final String IMPORT_SCHWEMANN_JOB_FIELDS = "IMPORT_SCHWEMANN_JOB_FIELDS";
public static final String IMPORT_SERVONA_JOB_FIELDS = "IMPORT_SERVONA_JOB_FIELDS";
public static final String IMPORT_STANDARD_01_JOB_FIELDS = "IMPORT_STANDARD_01_JOB_FIELDS";
public static final String IMPORT_STANDARD_02_JOB_FIELDS = "IMPORT_STANDARD_02_JOB_FIELDS";
public static final String IMPORT_TOOM_JOB_FIELDS = "IMPORT_TOOM_JOB_FIELDS";
public static final String IMPORT_TOURS_FIELD_TR_COMP = "IMPORT_TOURS_FIELD_TR_COMP";
public static final String IMPORT_TOURS_JOB_FIELDS = "IMPORT_TOURS_JOB_FIELDS";
public static final String IMPORT_UNIMET_JOB_FIELDS = "IMPORT_UNIMET_JOB_FIELDS";
public static final String IMPORT_ZONE_JOBS_JOB_FIELDS = "IMPORT_ZONE_JOBS_JOB_FIELDS";
// ======== INVOICE (23) ========
public static final String COSTCENTER_INV_MODE = "COSTCENTER_INV_MODE_";
public static final String INV_CHILDREN_DISCOUNT = "INV_CHILDREN_DISCOUNT";
public static final String INV_CHILD_NOFREETEXT = "INV_CHILD_NOFREETEXT";
public static final String INV_CSC_ID_NOAUTO = "INV_CSC_ID_NOAUTO";
public static final String INV_JB_INVOICE_CR = "INV_JB_INVOICE_CR";
public static final String INV_MAXCOLS = "INV_MAXCOLS";
public static final String INV_MAXCOLS_EXPORT = "INV_MAXCOLS_EXPORT";
public static final String INV_MAXLINES = "INV_MAXLINES";
public static final String INV_PRINT_DISCOUNT = "INV_PRINT_DISCOUNT";
public static final String INV_PRINT_METATYPE_SERVICE = "INV_PRINT_METATYPE_SERVICE";
public static final String INV_PRINT_REMARK = "INV_PRINT_REMARK";
public static final String INV_PRINT_SRVPRICE = "INV_PRINT_SRVPRICE";
public static final String INV_PRINT_SRVPRICE_PREFIX = "INV_PRINT_SRVPRICE_";
public static final String INV_SERVICEPRICE_DISCOUNT = "INV_SERVICEPRICE_DISCOUNT";
public static final String INV_SHOW_MARKUP_BATCH = "INV_SHOW_MARKUP_BATCH";
public static final String INV_USE_EURO_SIGN = "INV_USE_EURO_SIGN";
public static final String MASK_INVMODE_FALLBACK = "MASK_INVMODE_FALLBACK";
public static final String MASK_INVOICE_SHOW_SERVICES = "MASK_INVOICE_SHOW_SERVICES_";
public static final String MASK_INVOICE_SHOW_SIDS = "MASK_INVOICE_SHOW_SIDS";
public static final String MASK_INVOICE_SIDS_SID0 = "MASK_INVOICE_SIDS_SID0";
public static final String MASK_INVOICE_SIDS_SID1 = "MASK_INVOICE_SIDS_SID1";
public static final String MASK_INV_EMAIL_SINGLE_ONLY = "MASK_INV_EMAIL_SINGLE_ONLY";
public static final String MASK_MARKUP_MODE = "MASK_MARKUP_MODE";
// ======== JOB (12) ========
public static final String JB_CR_PRICE_BLOCK = "JB_CR_PRICE_BLOCK";
public static final String JB_CR_PRICE_MINIMUM = "JB_CR_PRICE_MINIMUM";
public static final String JB_CR_PRICE_THRESHOLD = "JB_CR_PRICE_THRESHOLD";
public static final String JB_CR_PRICE_THRESHOLD_MARGIN = "JB_CR_PRICE_THRESHOLD_MARGIN";
public static final String JB_EDITBATCH_CS_PROV_ENABLED = "JB_EDITBATCH_CS_PROV_ENABLED";
public static final String JB_EDITBATCH_DISCOUNT_DISABLED = "JB_EDITBATCH_DISCOUNT_DISABLED";
public static final String JB_EDITBATCH_JBTYPE = "JB_EDITBATCH_JBTYPE";
public static final String JB_EDITBATCH_MAIL_JOBDATE = "JB_EDITBATCH_MAIL_JOBDATE";
public static final String JOB_DETAILS_PATH_POD_PHOTO = "JOB_DETAILS_PATH_POD_PHOTO";
public static final String JOB_GO_AUTORANKING_NOT_REMOVAL_COURIER = "JOB_GO_AUTORANKING_NOT_REMOVAL_COURIER";
public static final String JOB_MAIL_STATION_ARRIVAL_TIME = "JOB_MAIL_STATION_ARRIVAL_TIME_";
public static final String JOB_SURVEY_TRIGGER_ENABLED = "JOB_SURVEY_TRIGGER_ENABLED";
// ======== JOBDETAILS (18) ========
public static final String JOBDETAILS_EMAIL_LANGUAGE = "JOBDETAILS_EMAIL_LANGUAGE_";
public static final String JOBDETAILS_EMAIL_NO_FOOTER = "JOBDETAILS_EMAIL_NO_FOOTER_";
public static final String JOBDETAILS_STATIONS_STATION_NUMBER = "JOBDETAILS_STATIONS_STATION_NUMBER_";
public static final String MASK_JOBDETAILS_ARTICLES = "MASK_JOBDETAILS_ARTICLES";
public static final String MASK_JOBDETAILS_ARTICLE_HEADLINE = "MASK_JOBDETAILS_ARTICLE_HEADLINE";
public static final String MASK_JOBDETAILS_ARTICLE_SCAN_EVENTS = "MASK_JOBDETAILS_ARTICLE_SCAN_EVENTS";
public static final String MASK_JOBDETAILS_BOOKJOB_COMMNO = "MASK_JOBDETAILS_BOOKJOB_COMMNO";
public static final String MASK_JOBDETAILS_BOOKJOB_DATE = "MASK_JOBDETAILS_BOOKJOB_DATE";
public static final String MASK_JOBDETAILS_BUTTON_ACCEPTANCE_PROTOCOL = "MASK_JOBDETAILS_BUTTON_ACCEPTANCE_PROTOCOL";
public static final String MASK_JOBDETAILS_FAVOURED_COURIER_SHOW_MODE = "MASK_JOBDETAILS_FAVOURED_COURIER_SHOW_MODE";
public static final String MASK_JOBDETAILS_INTERNAL_REMARK_ITEMS = "MASK_JOBDETAILS_INTERNAL_REMARK_ITEMS";
public static final String MASK_JOBDETAILS_JBP_BOOKING_ENABLED = "MASK_JOBDETAILS_JBP_BOOKING_ENABLED";
public static final String MASK_JOBDETAILS_JBP_PAYMENTMODE_SINGLE_BOOKING_ENABLED = "MASK_JOBDETAILS_JBP_PAYMENTMODE_SINGLE_BOOKING_ENABLED";
public static final String MASK_JOBDETAILS_KM_CO2 = "MASK_JOBDETAILS_KM_CO2";
public static final String MASK_JOBDETAILS_STATIONS_POD_PHOTOS = "MASK_JOBDETAILS_STATIONS_POD_PHOTOS";
public static final String MASK_JOBDETAILS_STATIONS_POD_SCAN_EVENTS = "MASK_JOBDETAILS_STATIONS_POD_SCAN_EVENTS";
public static final String MASK_JOBDETAILS_STATIONS_PRINT_REMARK_ENABLED = "MASK_JOBDETAILS_STATIONS_PRINT_REMARK_ENABLED";
public static final String MASK_JOBDETAILS_STATIONS_SURVEY = "MASK_JOBDETAILS_STATIONS_SURVEY";
// ======== JOBLIST (20) ========
public static final String JOBLIST_CS_JB_COLOR = "JOBLIST_CS_JB_COLOR_";
public static final String JOBLIST_NUM_OF_HOPS = "JOBLIST_NUM_OF_HOPS";
public static final String MASK_JOBLIST_BROWSE_MAX = "MASK_JOBLIST_BROWSE_MAX";
public static final String MASK_JOBLIST_CHECK_NUM_OF_CS_DOCS = "MASK_JOBLIST_CHECK_NUM_OF_CS_DOCS";
public static final String MASK_JOBLIST_CHECK_NUM_OF_CS_REPORTS = "MASK_JOBLIST_CHECK_NUM_OF_CS_REPORTS";
public static final String MASK_JOBLIST_CONTEXTMENU_ALL_CASES_ENABLED = "MASK_JOBLIST_CONTEXTMENU_ALL_CASES_ENABLED";
public static final String MASK_JOBLIST_CONTEXTMENU_ENABLED = "MASK_JOBLIST_CONTEXTMENU_ENABLED";
public static final String MASK_JOBLIST_DEFAULTLIST = "MASK_JOBLIST_DEFAULTLIST";
public static final String MASK_JOBLIST_DISPLAY_COL_CANCELLATION = "MASK_JOBLIST_DISPLAY_COL_CANCELLATION";
public static final String MASK_JOBLIST_DISPLAY_OFFERS_ONLY = "MASK_JOBLIST_DISPLAY_OFFERS_ONLY";
public static final String MASK_JOBLIST_GET_COURIER_DATA = "MASK_JOBLIST_GET_COURIER_DATA";
public static final String MASK_JOBLIST_HEADERFIELD_BGCOL_DISPOINFO = "MASK_JOBLIST_HEADERFIELD_BGCOL_DISPOINFO";
public static final String MASK_JOBLIST_HEADERFIELD_BGCOL_ORDERTIME = "MASK_JOBLIST_HEADERFIELD_BGCOL_ORDERTIME";
public static final String MASK_JOBLIST_MODE_JOB_NUM = "MASK_JOBLIST_MODE_JOB_NUM";
public static final String MASK_JOBLIST_MODE_REFRESH = "MASK_JOBLIST_MODE_REFRESH";
public static final String MASK_JOBLIST_SHOW_UPTO_VHT = "MASK_JOBLIST_SHOW_UPTO_VHT";
public static final String MASK_JOBLIST_STARTDATE_YESTERDAY = "MASK_JOBLIST_STARTDATE_YESTERDAY";
public static final String MASK_JOBLIST_STORNO_CHECK_PAYMENT = "MASK_JOBLIST_STORNO_CHECK_PAYMENT";
public static final String MASK_JOBLIST_TAKENJOB_ORDERBY = "MASK_JOBLIST_TAKENJOB_ORDERBY";
public static final String MASK_JOBLIST_TOTALPRICE = "MASK_JOBLIST_TOTALPRICE";
// ======== LOCATING (11) ========
public static final String LOCATING_LBS_PASSWORD = "LOCATING_LBS_PASSWORD";
public static final String LOCATING_LBS_PORT = "LOCATING_LBS_PORT";
public static final String LOCATING_LBS_SERVER = "LOCATING_LBS_SERVER";
public static final String LOCATING_LBS_SERVICE_ID = "LOCATING_LBS_SERVICE_ID";
public static final String LOCATING_LBS_VASP_ID = "LOCATING_LBS_VASP_ID";
public static final String LOCATING_MODE = "LOCATING_MODE";
public static final String LOCATING_PDA_ENABLED = "LOCATING_PDA_ENABLED";
public static final String LOCATING_PDA_INTERVAL = "LOCATING_PDA_INTERVAL";
public static final String LOCATING_PLAUSIBLE_VELOCITY = "LOCATING_PLAUSIBLE_VELOCITY";
public static final String LOCATING_SECONDS_NEEDED_FOR_LBS_LOCATING = "LOCATING_SECONDS_NEEDED_FOR_LBS_LOCATING";
public static final String LOCATING_ZIPCODE_COMPARISON_MODE = "LOCATING_ZIPCODE_COMPARISON_MODE";
// ======== LONGHAUL (5) ========
public static final String LONGHAUL_ACTIVE = "LONGHAUL_ACTIVE";
public static final String LONGHAUL_ACTIVE_REMOTE_DB = "LONGHAUL_ACTIVE_REMOTE_DB";
public static final String LONGHAUL_KM = "LONGHAUL_KM";
public static final String LONGHAUL_REMOTE_DB_ACCESSDATA = "LONGHAUL_REMOTE_DB_ACCESSDATA";
public static final String LONGHAUL_REMOTE_DB_EMPLOYEE_IDS = "LONGHAUL_REMOTE_DB_EMPLOYEE_IDS";
// ======== MAIL (66) ========
public static final String MAIL_ADDRESS_CHUNKSIZE = "MAIL_ADDRESS_CHUNKSIZE";
public static final String MAIL_BCC_ADDRESS = "MAIL_BCC_ADDRESS";
public static final String MAIL_BCC_STATION_ADDRESS = "MAIL_BCC_STATION_ADDRESS";
public static final String MAIL_CC_ADDRESS = "MAIL_CC_ADDRESS";
public static final String MAIL_CHARSET = "MAIL_CHARSET";
public static final String MAIL_CONDITION_TEXT_OFFER = "MAIL_CONDITION_TEXT_OFFER";
public static final String MAIL_CONDITION_TEXT_OFFER_CHANGE = "MAIL_CONDITION_TEXT_OFFER_CHANGE";
public static final String MAIL_CRON_100_TO_ADDRESS = "MAIL_CRON_100_TO_ADDRESS";
public static final String MAIL_CRON_102_TO_ADDRESS = "MAIL_CRON_102_TO_ADDRESS";
public static final String MAIL_CRON_103_TO_ADDRESS = "MAIL_CRON_103_TO_ADDRESS";
public static final String MAIL_CRON_105_TO_ADDRESS = "MAIL_CRON_105_TO_ADDRESS";
public static final String MAIL_CRON_108_TO_ADDRESS = "MAIL_CRON_108_TO_ADDRESS";
public static final String MAIL_CRON_201_A_TO_ADDRESS = "MAIL_CRON_201_A_TO_ADDRESS";
public static final String MAIL_CRON_201_B_TO_ADDRESS = "MAIL_CRON_201_B_TO_ADDRESS";
public static final String MAIL_CRON_201_TO_ADDRESS = "MAIL_CRON_201_TO_ADDRESS";
public static final String MAIL_CRON_202_A_TO_ADDRESS = "MAIL_CRON_202_A_TO_ADDRESS";
public static final String MAIL_CRON_202_B_TO_ADDRESS = "MAIL_CRON_202_B_TO_ADDRESS";
public static final String MAIL_CRON_202_TO_ADDRESS = "MAIL_CRON_202_TO_ADDRESS";
public static final String MAIL_CRON_203_TO_ADDRESS = "MAIL_CRON_203_TO_ADDRESS";
public static final String MAIL_CSS_FONT_CLASS = "MAIL_CSS_FONT_CLASS";
public static final String MAIL_CSS_FONT_TYPE = "MAIL_CSS_FONT_TYPE";
public static final String MAIL_DISPLAY_MODE_EMPLOYEE_DATA = "MAIL_DISPLAY_MODE_EMPLOYEE_DATA";
public static final String MAIL_FOOTER_ADDRESS = "MAIL_FOOTER_ADDRESS";
public static final String MAIL_FOOTER_CONTACT = "MAIL_FOOTER_CONTACT";
public static final String MAIL_FOOTER_ENABLED = "MAIL_FOOTER_ENABLED";
public static final String MAIL_FOOTER_IMPRESSUM = "MAIL_FOOTER_IMPRESSUM";
public static final String MAIL_FOOTER_MANDATORY = "MAIL_FOOTER_MANDATORY";
public static final String MAIL_FOOTER_RESPONSIBILITY = "MAIL_FOOTER_RESPONSIBILITY";
public static final String MAIL_FOOTER_RESPONSIBILITY_2 = "MAIL_FOOTER_RESPONSIBILITY_2";
public static final String MAIL_FOOTER_RESPONSIBILITY_3 = "MAIL_FOOTER_RESPONSIBILITY_3";
public static final String MAIL_FOOTER_RESPONSIBILITY_4 = "MAIL_FOOTER_RESPONSIBILITY_4";
public static final String MAIL_FOOTER_RESPONSIBILITY_5 = "MAIL_FOOTER_RESPONSIBILITY_5";
public static final String MAIL_FOOTER_THINK_GREEN = "MAIL_FOOTER_THINK_GREEN";
public static final String MAIL_FOOTER_WEB_PAGE = "MAIL_FOOTER_WEB_PAGE";
public static final String MAIL_JOBDATA = "MAIL_JOBDATA";
public static final String MAIL_JOBDATE = "MAIL_JOBDATE";
public static final String MAIL_LINK_SURVEY = "MAIL_LINK_SURVEY";
public static final String MAIL_NEWSLETTER_DSGVO_DISABLED = "MAIL_NEWSLETTER_DSGVO_DISABLED";
public static final String MAIL_NEWSLETTER_SENDER_ADDRESS = "MAIL_NEWSLETTER_SENDER_ADDRESS";
public static final String MAIL_PRE_SALUTATION_TEXT = "MAIL_PRE_SALUTATION_TEXT";
public static final String MAIL_PRE_SALUTATION_TEXT_OFFER = "MAIL_PRE_SALUTATION_TEXT_OFFER";
public static final String MAIL_PRE_SALUTATION_TEXT_OFFER_CHANGE = "MAIL_PRE_SALUTATION_TEXT_OFFER_CHANGE";
public static final String MAIL_SALUTATION_TEXT = "MAIL_SALUTATION_TEXT";
public static final String MAIL_SENDER_ADDRESS = "MAIL_SENDER_ADDRESS";
public static final String MAIL_SUBJECT_PREFIX = "MAIL_SUBJECT_PREFIX";
public static final String MAIL_SUCCESS_REQUEST = "MAIL_SUCCESS_REQUEST";
public static final String MAIL_SURVEY = "MAIL_SURVEY";
public static final String MAIL_SURVEY_ADDRESS_TO = "MAIL_SURVEY_ADDRESS_TO";
public static final String MAIL_TEXT_ALL_STATIONS = "MAIL_TEXT_ALL_STATIONS";
public static final String MAIL_TEXT_CHANGE = "MAIL_TEXT_CHANGE";
public static final String MAIL_TEXT_COMPLETION = "MAIL_TEXT_COMPLETION";
public static final String MAIL_TEXT_COMPLETION_2 = "MAIL_TEXT_COMPLETION_2";
public static final String MAIL_TEXT_COMPLETION_3 = "MAIL_TEXT_COMPLETION_3";
public static final String MAIL_TEXT_COMPLETION_4 = "MAIL_TEXT_COMPLETION_4";
public static final String MAIL_TEXT_COMPLETION_5 = "MAIL_TEXT_COMPLETION_5";
public static final String MAIL_TEXT_DISPOSITION = "MAIL_TEXT_DISPOSITION";
public static final String MAIL_TEXT_JOBDATA = "MAIL_TEXT_JOBDATA";
public static final String MAIL_TEXT_OFFER = "MAIL_TEXT_OFFER";
public static final String MAIL_TEXT_OFFER_CHANGE = "MAIL_TEXT_OFFER_CHANGE";
public static final String MAIL_TEXT_PICKUP = "MAIL_TEXT_PICKUP";
public static final String MAIL_TEXT_RECENSION = "MAIL_TEXT_RECENSION";
public static final String MAIL_TEXT_REGARDS = "MAIL_TEXT_REGARDS";
public static final String MAIL_TEXT_SURVEY = "MAIL_TEXT_SURVEY";
public static final String MAIL_TEXT_SURVEY2 = "MAIL_TEXT_SURVEY2";
public static final String MAIL_TEXT_SURVEY3 = "MAIL_TEXT_SURVEY3";
public static final String MAIL_TRACKING_SENDER_ADDRESS = "MAIL_TRACKING_SENDER_ADDRESS";
// ======== MASK (72) ========
public static final String MASK_ADD_TO_REMARK = "MASK_ADD_TO_REMARK";
public static final String MASK_AREA_ID_FROM_ADDRESS = "MASK_AREA_ID_FROM_ADDRESS_";
public static final String MASK_ASK_PERMANENT = "MASK_ASK_PERMANENT";
public static final String MASK_CALCULATOR_SRV_SRC = "MASK_CALCULATOR_SRV_SRC";
public static final String MASK_CASH_PAYER_SELECT = "MASK_CASH_PAYER_SELECT";
public static final String MASK_CHECK_MARKUP_PERMANENT = "MASK_CHECK_MARKUP_PERMANENT";
public static final String MASK_CHILDREN_TAX_HARDCODED = "MASK_CHILDREN_TAX_HARDCODED";
public static final String MASK_CONTACT_ADDRESS_FIELDS_DISPLAYED = "MASK_CONTACT_ADDRESS_FIELDS_DISPLAYED";
public static final String MASK_CONTACT_BODY_FIELDS_DISPLAYED = "MASK_CONTACT_BODY_FIELDS_DISPLAYED";
public static final String MASK_CONTACT_HEADER_FIELDS_DISPLAYED = "MASK_CONTACT_HEADER_FIELDS_DISPLAYED";
public static final String MASK_CONTACT_SORT_FIELDS = "MASK_CONTACT_SORT_FIELDS";
public static final String MASK_CONTENT_BGCOL = "MASK_CONTENT_BGCOL";
public static final String MASK_COUNTRY_DEFAULT = "MASK_COUNTRY_DEFAULT";
public static final String MASK_COUNTRY_GROUP = "MASK_COUNTRY_GROUP";
public static final String MASK_CS2CO_PRESET = "MASK_CS2CO_PRESET";
public static final String MASK_DATATRANSFER_NAV2ROOTDIR_ENABLED = "MASK_DATATRANSFER_NAV2ROOTDIR_ENABLED";
public static final String MASK_DONT_CHANGE_PAYER = "MASK_DONT_CHANGE_PAYER_";
public static final String MASK_EMPLOYEE_CMP_FIELD_DISPLAYED = "MASK_EMPLOYEE_CMP_FIELD_DISPLAYED";
public static final String MASK_EMP_CSC_MATRIX_ENABLED = "MASK_EMP_CSC_MATRIX_ENABLED";
public static final String MASK_EXCLUDE_VHT_IDS = "MASK_EXCLUDE_VHT_IDS";
public static final String MASK_EXCLUDE_VHT_IDS_CS = "MASK_EXCLUDE_VHT_IDS_CS";
public static final String MASK_FAVOURED_COURIER_MANUAL = "MASK_FAVOURED_COURIER_MANUAL";
public static final String MASK_FILTER_AL_DATE = "MASK_FILTER_AL_DATE";
public static final String MASK_FORMS_CR = "MASK_FORMS_CR";
public static final String MASK_HIDDEN_FREETEXT = "MASK_HIDDEN_FREETEXT";
public static final String MASK_HIDE_CR_DISPOSITION = "MASK_HIDE_CR_DISPOSITION";
public static final String MASK_HIDE_CR_OUTLAY = "MASK_HIDE_CR_OUTLAY";
public static final String MASK_HIDE_CR_VHT_INV = "MASK_HIDE_CR_VHT_INV";
public static final String MASK_HIDE_STANDARD_PRICE_IF_KM_PRICE = "MASK_HIDE_STANDARD_PRICE_IF_KM_PRICE";
public static final String MASK_HQ_ID_EXEC_PRICE_RATE = "MASK_HQ_ID_EXEC_PRICE_RATE";
public static final String MASK_IGNORE_JBSTATUSMAIL2CSC = "MASK_IGNORE_JBSTATUSMAIL2CSC";
public static final String MASK_INSERTADDRESS_DISTRICT = "MASK_INSERTADDRESS_DISTRICT_";
public static final String MASK_INSURANCE_DEBITOR = "MASK_INSURANCE_DEBITOR";
public static final String MASK_JB_DATETIME_TODAY_FORMAT = "MASK_JB_DATETIME_TODAY_FORMAT";
public static final String MASK_JB_LABEL_SIZE = "MASK_JB_LABEL_SIZE";
public static final String MASK_JB_LIST_COLS = "MASK_JB_LIST_COLS";
public static final String MASK_JB_LIST_LEN_COLS = "MASK_JB_LIST_LEN_COLS";
public static final String MASK_JB_LIST_LONGHAUL_COLS = "MASK_JB_LIST_LONGHAUL_COLS";
public static final String MASK_JB_MAP_VIEW_COURIERS = "MASK_JB_MAP_VIEW_COURIERS_";
public static final String MASK_JB_MAP_VIEW_ENABLED = "MASK_JB_MAP_VIEW_ENABLED_";
public static final String MASK_JB_REPORT_BUTTON_ENABLED_PERMANENT = "MASK_JB_REPORT_BUTTON_ENABLED_PERMANENT";
public static final String MASK_JB_STATIONS_PRINT_FORMAT = "MASK_JB_STATIONS_PRINT_FORMAT";
public static final String MASK_LINK_DISPOSITION_STKTO_EQ_STKFROM = "MASK_LINK_DISPOSITION_STKTO_EQ_STKFROM_";
public static final String MASK_LONGHAUL_WINDOW_SCALE = "MASK_LONGHAUL_WINDOW_SCALE";
public static final String MASK_MAIL_JOB_STATE_DISPOSITION = "MASK_MAIL_JOB_STATE_DISPOSITION";
public static final String MASK_MAIL_JOB_STATE_PICKUP = "MASK_MAIL_JOB_STATE_PICKUP";
public static final String MASK_MANDATORY_FILTERS = "MASK_MANDATORY_FILTERS";
public static final String MASK_MANUAL_DISPOSITION = "MASK_MANUAL_DISPOSITION";
public static final String MASK_MANUAL_DISPOSITION_CUSTOMER_MANDATORY = "MASK_MANUAL_DISPOSITION_CUSTOMER_MANDATORY";
public static final String MASK_MANUAL_DISPO_MANDATORY = "MASK_MANUAL_DISPO_MANDATORY_";
public static final String MASK_MIN_MAX_TR_PHOTO_FORCE = "MASK_MIN_MAX_TR_PHOTO_FORCE";
public static final String MASK_MULTI_JOBLIST = "MASK_MULTI_JOBLIST";
public static final String MASK_MULTI_JOBLIST_MAX = "MASK_MULTI_JOBLIST_MAX";
public static final String MASK_NO_BASIC_PRICE_FOR_KM_PRICE = "MASK_NO_BASIC_PRICE_FOR_KM_PRICE";
public static final String MASK_NO_MARKUP_ON_VEHICLE_PRICE = "MASK_NO_MARKUP_ON_VEHICLE_PRICE";
public static final String MASK_PT_REPORT_FORMS_ENABLED = "MASK_PT_REPORT_FORMS_ENABLED";
public static final String MASK_PT_REPORT_FORMS_MAPPING = "MASK_PT_REPORT_FORMS_MAPPING";
public static final String MASK_PT_REPORT_ROWS_DISPLAYED = "MASK_PT_REPORT_ROWS_DISPLAYED";
public static final String MASK_REMINDER_EMAIL_SINGLE_ONLY = "MASK_REMINDER_EMAIL_SINGLE_ONLY";
public static final String MASK_RP_ENABLE_DEACTIVATION_APPOINTMENT_WARNING_OF_SAME_DAY = "MASK_RP_ENABLE_DEACTIVATION_APPOINTMENT_WARNING_OF_SAME_DAY";
public static final String MASK_SCAN_TRACKING_NO_PREFIX = "MASK_SCAN_TRACKING_NO_PREFIX";
public static final String MASK_SERVICE_PRICE_STREET = "MASK_SERVICE_PRICE_STREET";
public static final String MASK_SHOW_STANDARD_PRICE_FOR_TRUCKS = "MASK_SHOW_STANDARD_PRICE_FOR_TRUCKS";
public static final String MASK_SINGLE_JOBEDIT = "MASK_SINGLE_JOBEDIT";
public static final String MASK_STANDING_KEEP_COMMISSION = "MASK_STANDING_KEEP_COMMISSION";
public static final String MASK_SU_IMPORT_ACTIVATED = "MASK_SU_IMPORT_ACTIVATED";
public static final String MASK_SU_LIST_COLS_ORDER_BY = "MASK_SU_LIST_COLS_ORDER_BY";
public static final String MASK_TAKEN_JOB_ORDERTIME_PLUSOFFSETMINUTES = "MASK_TAKEN_JOB_ORDERTIME_PLUSOFFSETMINUTES";
public static final String MASK_TAKEN_JOB_ORDERTIME_RESERVATION_PLUSOFFSETMINUTES = "MASK_TAKEN_JOB_ORDERTIME_RESERVATION_PLUSOFFSETMINUTES";
public static final String MASK_TR_PHOTO_FORCE = "MASK_TR_PHOTO_FORCE";
public static final String MASK_VEHICLE_TYPE_MAPPING = "MASK_VEHICLE_TYPE_MAPPING";
public static final String MASK_ZIP_CHK_SYNTAX_DISABLED = "MASK_ZIP_CHK_SYNTAX_DISABLED";
// ======== METAFIELD (6) ========
public static final String MTFC_TPL_MODE = "MTFC_TPL_MODE";
public static final String MTF_FUNC = "MTF_FUNC_";
public static final String MTF_FUNC_IDENT = "MTF_FUNC_IDENT";
public static final String MTF_LINK_STATIC = "MTF_LINK_STATIC_";
public static final String MTF_SERVICE_ACCEPTANCE_PROTOCOL_RULE = "MTF_SERVICE_ACCEPTANCE_PROTOCOL_RULE_";
public static final String MTF_SQL_JOIN = "MTF_SQL_JOIN_";
// ======== MISC (61) ========
public static final String ASSET_MANAGEMENT_ENABLED = "ASSET_MANAGEMENT_ENABLED";
public static final String ATIH_DAILY_BOOKING_PERMANENTLY_ENABLED = "ATIH_DAILY_BOOKING_PERMANENTLY_ENABLED";
public static final String AT_EID_GENERATION = "AT_EID_GENERATION";
public static final String AT_EID_PREFIX = "AT_EID_PREFIX";
public static final String B2B_MODE_CHOICE_AND_RADIO = "B2B_MODE_CHOICE_AND_RADIO";
public static final String CASHBOX_STOCK_PARENT_ID = "CASHBOX_STOCK_PARENT_ID";
public static final String CLEANUP_TABLE_COURIER = "CLEANUP_TABLE_COURIER";
public static final String CO2_FORMULAR_L = "CO2_FORMULAR_L";
public static final String CO2_FORMULAR_TF = "CO2_FORMULAR_TF";
public static final String CO2_FORMULAR_U = "CO2_FORMULAR_U";
public static final String COUNTRY_FON_PREFIX = "COUNTRY_FON_PREFIX";
public static final String CSV_REQUEST_LOGLEVEL_MAX = "CSV_REQUEST_LOGLEVEL_MAX";
public static final String DB_FIELDTYPE_WRAPPER_1 = "DB_FIELDTYPE_WRAPPER_1";
public static final String DB_HISTORY_DATE = "DB_HISTORY_DATE";
public static final String DUNS_HQ_ALL = "DUNS_HQ_ALL";
public static final String EMAIL_CRVHSID_NO_MAIL = "EMAIL_CRVHSID_NO_MAIL";
public static final String EMP_BITSTR_MAXLEN = "EMP_BITSTR_MAXLEN";
public static final String EU_COUNTRYCODES = "EU_COUNTRYCODES";
public static final String EXTERNAL_DB_METAOBJECT = "EXTERNAL_DB_METAOBJECT";
public static final String FAST_DISPOSITION_STRUCTURE_ENABLED = "FAST_DISPOSITION_STRUCTURE_ENABLED";
public static final String FDS_ADDRESS_DEFAULT = "FDS_ADDRESS_DEFAULT";
public static final String FDS_CS_CRVH_RELATION_DEFAULT_CUSTOMER = "FDS_CS_CRVH_RELATION_DEFAULT_CUSTOMER";
public static final String FDS_CUSTOMER_DEFAULT = "FDS_CUSTOMER_DEFAULT";
public static final String FDS_CUSTOMER_ENABLED_CS = "FDS_CUSTOMER_ENABLED_CS_";
public static final String FILTER_TO_BE_DELETED = "FILTER_TO_BE_DELETED";
public static final String FRAMEWORK_USED = "FRAMEWORK_USED";
public static final String GLN_HQ_ALL = "GLN_HQ_ALL";
public static final String HEADQUARTERS_MULTIPLE_ACCESS_EMPLOYEES = "HEADQUARTERS_MULTIPLE_ACCESS_EMPLOYEES";
public static final String HEADQUARTERS_MULTIPLE_ACCESS_EMPLOYEES_GLOBALJOBS = "HEADQUARTERS_MULTIPLE_ACCESS_EMPLOYEES_GLOBALJOBS";
public static final String HTTP_VARS_SEC_SEQ = "HTTP_VARS_SEC_SEQ";
public static final String HTTP_VARS_SEC_STATE = "HTTP_VARS_SEC_STATE";
public static final String ILLT_EXPORT_LOGFILE = "ILLT_EXPORT_LOGFILE";
public static final String LOG_DB = "LOG_DB";
public static final String MANDATOR_SERVICE2_ENABLED = "MANDATOR_SERVICE2_ENABLED";
public static final String MANDATOR_SERVICE_ENABLED = "MANDATOR_SERVICE_ENABLED";
public static final String MASTER_PREFIX = "MASTER_PREFIX";
public static final String MAX_LEN_OF_CDR_SERIAL_NO = "MAX_LEN_OF_CDR_SERIAL_NO";
public static final String MAX_NUM_OF_ATI_DATA_FIELDS = "MAX_NUM_OF_ATI_DATA_FIELDS";
public static final String MAX_NUM_OF_SU_TOURS = "MAX_NUM_OF_SU_TOURS";
public static final String MD_GLOBAL_SHORTNAME = "MD_GLOBAL_SHORTNAME";
public static final String MD_IMPORT_UPLOAD_PATH = "MD_IMPORT_UPLOAD_PATH";
public static final String MENU_USER_STATE_ITEMLIST_OUTPUT = "MENU_USER_STATE_ITEMLIST_OUTPUT";
public static final String MENU_USER_STATE_ITEMS = "MENU_USER_STATE_ITEMS";
public static final String MESSAGE_MAX_BODY_LENGTH = "MESSAGE_MAX_BODY_LENGTH";
public static final String MESSAGE_MIN_DAYS_BEFORE = "MESSAGE_MIN_DAYS_BEFORE";
public static final String MG_STATUS = "MG_STATUS";
public static final String MODE_COPY_JOB = "MODE_COPY_JOB";
public static final String MODE_INTERMEDIATION = "MODE_INTERMEDIATION";
public static final String MODE_LATER_JOB = "MODE_LATER_JOB";
public static final String NEWSTICKER_MAX_BODY_LENGTH = "NEWSTICKER_MAX_BODY_LENGTH";
public static final String PATH_DOCROOT = "PATH_DOCROOT";
public static final String REMOTE_FUNCTION_CALL_LOGFILE = "REMOTE_FUNCTION_CALL_LOGFILE";
public static final String RIGHTS_TABLE_SERVICE = "RIGHTS_TABLE_SERVICE";
public static final String SEND_REQUEST_TO_STB_RETURN_RESPONSE = "SEND_REQUEST_TO_STB_RETURN_RESPONSE";
public static final String SEND_REQUEST_TO_STB_VHT_ID = "SEND_REQUEST_TO_STB_VHT_ID";
public static final String SIMILARITY_SEARCH_FILTER_HQ = "SIMILARITY_SEARCH_FILTER_HQ";
public static final String TA_STATUS = "TA_STATUS";
public static final String TEMP_PATH = "TEMP_PATH";
public static final String TRACKING_ENABLED_CS = "TRACKING_ENABLED_CS_";
public static final String VEHICLE_STOCK_PARENT_ID = "VEHICLE_STOCK_PARENT_ID";
public static final String XML_REQUEST_LOGLEVEL_MAX = "XML_REQUEST_LOGLEVEL_MAX";
// ======== MOTIVATION (6) ========
public static final String MOTIVATIONCOUNTER = "MOTIVATIONCOUNTER_";
public static final String MOTIVATIONCOUNTER_EXCLUDED_CS = "MOTIVATIONCOUNTER_EXCLUDED_CS";
public static final String MOTIVATIONCOUNTER_MODE = "MOTIVATIONCOUNTER_MODE";
public static final String MOTIVATIONCOUNTER_PASSWORD = "MOTIVATIONCOUNTER_PASSWORD";
public static final String MOTIVATIONCOUNTER_PREVIOUS_MONTH = "MOTIVATIONCOUNTER_PREVIOUS_MONTH";
public static final String MOTIVATIONCOUNTER_VIEWMODE_BUSINESS_VOL = "MOTIVATIONCOUNTER_VIEWMODE_BUSINESS_VOL";
// ======== PDF (7) ========
public static final String LICENCE_PDFLIB = "LICENCE_PDFLIB";
public static final String LICENCE_PDFLIB_NEW = "LICENCE_PDFLIB_NEW";
public static final String PDF_JB_STATIONS_LINE_FEED = "PDF_JB_STATIONS_LINE_FEED";
public static final String PDF_JB_STATIONS_PER_LINE = "PDF_JB_STATIONS_PER_LINE";
public static final String PDF_PAGE_HEIGHT = "PDF_PAGE_HEIGHT";
public static final String PDF_PAGE_WIDTH = "PDF_PAGE_WIDTH";
public static final String PDF_TEXT_OFFSET_LINE = "PDF_TEXT_OFFSET_LINE";
// ======== RANKING (27) ========
public static final String AUTORANKING_ASSIGNMENT_ENABLED = "AUTORANKING_ASSIGNMENT_ENABLED";
public static final String AUTORANKING_CR_VHT_GETS_JB_VHT = "AUTORANKING_CR_VHT_GETS_JB_VHT";
public static final String AUTORANKING_DEBUG_LOG = "AUTORANKING_DEBUG_LOG";
public static final String AUTORANKING_LOGFILE = "AUTORANKING_LOGFILE";
public static final String AUTORANKING_MAXNUMBER_OF_CHALLENGES = "AUTORANKING_MAXNUMBER_OF_CHALLENGES";
public static final String AUTORANKING_NEIGHBOUR_LEVEL = "AUTORANKING_NEIGHBOUR_LEVEL";
public static final String AUTORANKING_NUMBER_OF_ITERATIONS = "AUTORANKING_NUMBER_OF_ITERATIONS";
public static final String AUTORANKING_REVOCATION_ENABLED = "AUTORANKING_REVOCATION_ENABLED";
public static final String AUTORANKING_REVOKETIME_IN_MINUTES = "AUTORANKING_REVOKETIME_IN_MINUTES";
public static final String AUTORANKING_REVOKETIME_IN_SECONDS = "AUTORANKING_REVOKETIME_IN_SECONDS";
public static final String AUTORANKING_REVOKETIME_MANUELL_IN_MINUTES = "AUTORANKING_REVOKETIME_MANUELL_IN_MINUTES";
public static final String AUTORANKING_REVOKETIME_MANUELL_IN_SECONDS = "AUTORANKING_REVOKETIME_MANUELL_IN_SECONDS";
public static final String AUTORANKING_REVOKE_JOB_MODE = "AUTORANKING_REVOKE_JOB_MODE";
public static final String AUTORANKING_VEHICLE_LKW = "AUTORANKING_VEHICLE_LKW";
public static final String AUTORANKING_VEHICLE_TYPE_LEVEL_BEING_LKW = "AUTORANKING_VEHICLE_TYPE_LEVEL_BEING_LKW";
public static final String RANKING_BLOCKED_COURIER_FOR_PAYER = "RANKING_BLOCKED_COURIER_FOR_PAYER";
public static final String RANKING_BLOCKED_COURIER_FOR_STATION = "RANKING_BLOCKED_COURIER_FOR_STATION";
public static final String RANKING_CR2CRVH_MULTI_RELATION = "RANKING_CR2CRVH_MULTI_RELATION";
public static final String RANKING_FAVOURED_COURIER_AREA_RESTRICTION = "RANKING_FAVOURED_COURIER_AREA_RESTRICTION";
public static final String RANKING_FAVOURED_COURIER_CRVH = "RANKING_FAVOURED_COURIER_CRVH";
public static final String RANKING_FAVOURED_COURIER_FILTER = "RANKING_FAVOURED_COURIER_FILTER";
public static final String RANKING_FAVOURED_COURIER_FOR_PAYER = "RANKING_FAVOURED_COURIER_FOR_PAYER";
public static final String RANKING_FAVOURED_COURIER_FOR_STATION = "RANKING_FAVOURED_COURIER_FOR_STATION";
public static final String RANKING_JB2CRVH_MEASURE = "RANKING_JB2CRVH_MEASURE";
public static final String RANKING_NORESET_CRSID = "RANKING_NORESET_CRSID";
public static final String RANKING_RADIUS_KM = "RANKING_RADIUS_KM";
public static final String RANKING_USE_CRVH_RESTRICTION = "RANKING_USE_CRVH_RESTRICTION";
// ======== SERVICE (3) ========
public static final String SERVICE_DISPLAY_MODE_DEFAULT = "SERVICE_DISPLAY_MODE_DEFAULT";
public static final String SERVICE_VEHICLE_TYPE_ENABLED = "SERVICE_VEHICLE_TYPE_ENABLED";
public static final String SERVICE_VEHICLE_TYPE_MAPPING = "SERVICE_VEHICLE_TYPE_MAPPING";
// ======== SERVICEUNIT (13) ========
public static final String SERVICEUNIT_CRITICAL_ADDED_BY_VEHICLE = "SERVICEUNIT_CRITICAL_ADDED_BY_VEHICLE";
public static final String SERVICEUNIT_CRITICAL_BY_VEHICLE_ONLY = "SERVICEUNIT_CRITICAL_BY_VEHICLE_ONLY";
public static final String SERVICEUNIT_SAWTOOTH_DISABLED = "SERVICEUNIT_SAWTOOTH_DISABLED";
public static final String SERVICEUNIT_STOCK_PARENT_ID = "SERVICEUNIT_STOCK_PARENT_ID";
public static final String SERVICEUNIT_TIME_DEFAULT = "SERVICEUNIT_TIME_DEFAULT";
public static final String SU_ATI_TV_COMPARISON = "SU_ATI_TV_COMPARISON";
public static final String SU_AT_TYPES_FOR_TV = "SU_AT_TYPES_FOR_TV";
public static final String SU_CASH_BOX_GROUP_ID = "SU_CASH_BOX_GROUP_ID";
public static final String SU_CB_TYPES = "SU_CB_TYPES_";
public static final String SU_IS_CRITICAL_PERMANENTLY = "SU_IS_CRITICAL_PERMANENTLY";
public static final String SU_STK_ROOT = "SU_STK_ROOT";
public static final String SU_TICKET_MACHINE_GROUP_ID = "SU_TICKET_MACHINE_GROUP_ID";
public static final String SU_TRESHOLD_VALUES = "SU_TRESHOLD_VALUES";
// ======== SMS (3) ========
public static final String SMS_LOGFILE = "SMS_LOGFILE";
public static final String SMS_MAIL_FROM = "SMS_MAIL_FROM";
public static final String SMS_USE_DAYTIME_AND_NO_TIME_OFFSET = "SMS_USE_DAYTIME_AND_NO_TIME_OFFSET";
// ======== STATISTIC (25) ========
public static final String MASK_STATISTIC_CR_EID_EDIT = "MASK_STATISTIC_CR_EID_EDIT";
public static final String MASK_STATISTIC_CS_CREATE_DATE_DISABLED = "MASK_STATISTIC_CS_CREATE_DATE_DISABLED";
public static final String MASK_STATISTIC_CS_EID_EDIT = "MASK_STATISTIC_CS_EID_EDIT";
public static final String MASK_STATISTIC_DATE_MODE = "MASK_STATISTIC_DATE_MODE";
public static final String MASK_STATISTIC_PRICE_MODE = "MASK_STATISTIC_PRICE_MODE";
public static final String MASK_STATISTIC_STATIONS_SURVEY = "MASK_STATISTIC_STATIONS_SURVEY";
public static final String MASK_STAT_ILLT_ROWS_DISPLAYED = "MASK_STAT_ILLT_ROWS_DISPLAYED";
public static final String MASK_STAT_ILLT_ROWS_DISPLAYED_101 = "MASK_STAT_ILLT_ROWS_DISPLAYED_101";
public static final String MASK_STAT_ILLT_ROWS_DISPLAYED_102 = "MASK_STAT_ILLT_ROWS_DISPLAYED_102";
public static final String MASK_STAT_ILLT_ROWS_DISPLAYED_103 = "MASK_STAT_ILLT_ROWS_DISPLAYED_103";
public static final String MASK_STAT_ILLT_ROWS_DISPLAYED_104 = "MASK_STAT_ILLT_ROWS_DISPLAYED_104";
public static final String STATISTIC_CREIDS_EXCLUDED = "STATISTIC_CREIDS_EXCLUDED";
public static final String STATISTIC_CREIDS_EXCLUDED_2 = "STATISTIC_CREIDS_EXCLUDED_2";
public static final String STATISTIC_CRVHSIDS_EXCLUDED = "STATISTIC_CRVHSIDS_EXCLUDED";
public static final String STATISTIC_CSEIDS_EXCLUDED = "STATISTIC_CSEIDS_EXCLUDED";
public static final String STATISTIC_CSEIDS_EXCLUDED_2 = "STATISTIC_CSEIDS_EXCLUDED_2";
public static final String STATISTIC_DATE_MODE = "STATISTIC_DATE_MODE";
public static final String STATISTIC_EXCLUDED_CS = "STATISTIC_EXCLUDED_CS";
public static final String STATISTIC_INTERVALS_ENABLED = "STATISTIC_INTERVALS_ENABLED";
public static final String STATISTIC_INTERVALS_NUMBER_OF = "STATISTIC_INTERVALS_NUMBER_OF";
public static final String STATISTIC_NO_STORNOJOBS = "STATISTIC_NO_STORNOJOBS";
public static final String STATISTIC_PREFERED_CATEGORY_INDEX_JB = "STATISTIC_PREFERED_CATEGORY_INDEX_JB";
public static final String STATISTIC_YEAR_OF_BEGIN_HISTORY = "STATISTIC_YEAR_OF_BEGIN_HISTORY";
public static final String STATISTIC_YEAR_OF_BEGIN_HISTORY_2 = "STATISTIC_YEAR_OF_BEGIN_HISTORY_2";
public static final String STATISTIC_YEAR_OF_BEGIN_HISTORY_3 = "STATISTIC_YEAR_OF_BEGIN_HISTORY_3";
// ======== STOCK (17) ========
public static final String MASK_STKAT_SHOW_PERMANENT = "MASK_STKAT_SHOW_PERMANENT_";
public static final String MASK_STK_ARTICLE_ACCESS = "MASK_STK_ARTICLE_ACCESS";
public static final String MASK_STK_DATAFIELDHEADLINES = "MASK_STK_DATAFIELDHEADLINES_";
public static final String MASK_STK_DATAFIELDS = "MASK_STK_DATAFIELDS_";
public static final String MASK_STK_JOURNALHEADLINES = "MASK_STK_JOURNALHEADLINES_";
public static final String MASK_STK_JOURNALHEADLINES_DISPLAYED = "MASK_STK_JOURNALHEADLINES_DISPLAYED_";
public static final String MASK_STK_JOURNAL_ORDERBY_DIRECTION = "MASK_STK_JOURNAL_ORDERBY_DIRECTION_";
public static final String MASK_STK_MOVEHEADLINES = "MASK_STK_MOVEHEADLINES_";
public static final String MASK_STK_READONLY = "MASK_STK_READONLY";
public static final String MASK_STK_READONLY_WHERE_DEFINED_WRITEACCESS = "MASK_STK_READONLY_WHERE_DEFINED_WRITEACCESS";
public static final String MASK_STK_ROOT_ACCESS = "MASK_STK_ROOT_ACCESS";
public static final String MASK_STK_SUBSTOCK_ACCESS = "MASK_STK_SUBSTOCK_ACCESS";
public static final String STK_ATIH_COLUMN_TYPES = "STK_ATIH_COLUMN_TYPES";
public static final String STK_ATI_COLUMN_TYPES = "STK_ATI_COLUMN_TYPES";
public static final String STOCK_ARTICLEMOVE_SERNO_NO_CHECK = "STOCK_ARTICLEMOVE_SERNO_NO_CHECK_";
public static final String STOCK_ARTICLEMOVE_STKFROM_EQ_STKTO = "STOCK_ARTICLEMOVE_STKFROM_EQ_STKTO";
public static final String STOCK_EXPORT_STK_NAME_PREFIX_IF_NUM = "STOCK_EXPORT_STK_NAME_PREFIX_IF_NUM_";
}

View File

@@ -0,0 +1,34 @@
package de.votian.services.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
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.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.security.web.SecurityFilterChain;
@Configuration
@EnableWebSecurity
public class SecurityConfig {
private final de.votian.services.security.AuthTokenFilter authTokenFilter;
public SecurityConfig(de.votian.services.security.AuthTokenFilter authTokenFilter) {
this.authTokenFilter = authTokenFilter;
}
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http
.csrf(csrf -> csrf.disable())
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
.authorizeHttpRequests(auth -> auth
.requestMatchers("/api/auth/**").permitAll()
.requestMatchers("/service/**").permitAll()
.anyRequest().authenticated()
)
.addFilterBefore(authTokenFilter, UsernamePasswordAuthenticationFilter.class);
return http.build();
}
}

View File

@@ -0,0 +1,35 @@
package de.votian.services.controller;
import de.votian.services.entity.Address;
import de.votian.services.service.AddressService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/api/addresses")
public class AddressController {
private final AddressService addressService;
public AddressController(AddressService addressService) {
this.addressService = addressService;
}
@GetMapping("/{id}")
public ResponseEntity<Address> findById(@PathVariable Long id) {
return addressService.findById(id)
.map(ResponseEntity::ok)
.orElse(ResponseEntity.notFound().build());
}
@PostMapping("/find-or-create")
public ResponseEntity<Address> findOrCreate(@RequestBody Address address) {
return ResponseEntity.ok(addressService.findOrCreate(
address.getStreet(), address.getZipcode(), address.getCity(), address.getCountry()));
}
@PostMapping
public ResponseEntity<Address> save(@RequestBody Address address) {
return ResponseEntity.ok(addressService.save(address));
}
}

View File

@@ -0,0 +1,72 @@
package de.votian.services.controller;
import de.votian.services.dto.AuthLoginRequest;
import de.votian.services.dto.AuthResponse;
import de.votian.services.dto.AuthTotpRequest;
import de.votian.services.dto.ChangePasswordRequest;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.service.AuthService;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
@RestController
@RequestMapping("/api/auth")
public class AuthController {
private final AuthService authService;
public AuthController(AuthService authService) {
this.authService = authService;
}
@PostMapping("/login")
public ResponseEntity<AuthResponse> login(@RequestBody AuthLoginRequest request) {
return authService.login(request.getAccount(), request.getPassword())
.map(ResponseEntity::ok)
.orElse(ResponseEntity.status(HttpStatus.UNAUTHORIZED).build());
}
@PostMapping("/verify-totp")
public ResponseEntity<AuthResponse> verifyTotp(@RequestBody AuthTotpRequest request) {
return authService.verifyTotp(request.getPendingToken(), request.getCode())
.map(ResponseEntity::ok)
.orElse(ResponseEntity.status(HttpStatus.UNAUTHORIZED).build());
}
@GetMapping("/me")
public ResponseEntity<UserSessionDto> me(Authentication authentication) {
if (authentication == null || !(authentication.getPrincipal() instanceof UserSessionDto user)) {
return ResponseEntity.status(HttpStatus.UNAUTHORIZED).build();
}
return ResponseEntity.ok(user);
}
@PostMapping("/change-password")
public ResponseEntity<Map<String, Object>> changePassword(Authentication authentication,
@RequestBody ChangePasswordRequest request) {
if (authentication == null || !(authentication.getPrincipal() instanceof UserSessionDto user)) {
return ResponseEntity.status(HttpStatus.UNAUTHORIZED).build();
}
boolean changed = authService.changePassword(user.getUserId(),
request.getCurrentPassword(),
request.getNewPassword());
if (!changed) {
return ResponseEntity.status(HttpStatus.BAD_REQUEST)
.body(Map.of("changed", false, "message", "Aktuelles Passwort ist ungueltig."));
}
return ResponseEntity.ok(Map.of("changed", true));
}
@PostMapping("/logout")
public ResponseEntity<Void> logout(@RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authorization) {
if (authorization != null && authorization.startsWith("Bearer ")) {
authService.logout(authorization.substring("Bearer ".length()).trim());
}
return ResponseEntity.ok().build();
}
}

View File

@@ -0,0 +1,329 @@
package de.votian.services.controller;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.security.AccessControlService;
import de.votian.services.service.CommunicationWorkspaceService;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
@RestController
@RequestMapping("/api/communication-workspace")
public class CommunicationWorkspaceController {
private final CommunicationWorkspaceService communicationWorkspaceService;
private final AccessControlService accessControlService;
public CommunicationWorkspaceController(CommunicationWorkspaceService communicationWorkspaceService,
AccessControlService accessControlService) {
this.communicationWorkspaceService = communicationWorkspaceService;
this.accessControlService = accessControlService;
}
@GetMapping("/bootstrap")
public ResponseEntity<CommunicationWorkspaceService.Bootstrap> bootstrap(@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(communicationWorkspaceService.bootstrap(user, hqId));
}
@GetMapping("/tickers")
public ResponseEntity<List<CommunicationWorkspaceService.TickerRow>> tickers(@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(communicationWorkspaceService.findTickers(user, hqId));
}
@PostMapping("/tickers")
public ResponseEntity<CommunicationWorkspaceService.TickerRow> createTicker(@RequestBody TickerRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || !isAllowed(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(communicationWorkspaceService.createTicker(
user,
request.hqId,
request.targetHeadquartersId,
request.targetEmployeeId,
request.startAt,
request.endAt,
request.text,
request.unerasable
));
}
@DeleteMapping("/tickers/{id}")
public ResponseEntity<Void> deleteTicker(@PathVariable Long id,
@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
communicationWorkspaceService.deleteTicker(user, hqId, id);
return ResponseEntity.ok().build();
}
@GetMapping("/groups")
public ResponseEntity<List<CommunicationWorkspaceService.MessageGroupRow>> groups(@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(communicationWorkspaceService.findMessageGroups(user, hqId));
}
@PostMapping("/groups")
public ResponseEntity<CommunicationWorkspaceService.MessageGroupRow> createGroup(@RequestBody MessageGroupRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || !isAllowed(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(communicationWorkspaceService.saveMessageGroup(user, request.hqId, null, request.name));
}
@PutMapping("/groups/{id}")
public ResponseEntity<CommunicationWorkspaceService.MessageGroupRow> updateGroup(@PathVariable Long id,
@RequestBody MessageGroupRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || !isAllowed(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(communicationWorkspaceService.saveMessageGroup(user, request.hqId, id, request.name));
}
@DeleteMapping("/groups/{id}")
public ResponseEntity<Void> deleteGroup(@PathVariable Long id,
@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
communicationWorkspaceService.deleteMessageGroup(user, hqId, id);
return ResponseEntity.ok().build();
}
@GetMapping("/couriers")
public ResponseEntity<List<CommunicationWorkspaceService.CourierOption>> couriers(@RequestParam Long hqId,
@RequestParam(required = false) String query,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(communicationWorkspaceService.findCouriers(user, hqId, query));
}
@PutMapping("/couriers/{id}/groups")
public ResponseEntity<CommunicationWorkspaceService.CourierOption> updateCourierGroups(@PathVariable Long id,
@RequestBody CourierGroupRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || !isAllowed(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(communicationWorkspaceService.updateCourierGroups(
user,
request.hqId,
id,
request.groupIds
));
}
@GetMapping("/assignments")
public ResponseEntity<List<CommunicationWorkspaceService.GroupAssignmentRow>> assignments(@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(communicationWorkspaceService.findGroupAssignments(user, hqId));
}
@GetMapping("/employees")
public ResponseEntity<List<CommunicationWorkspaceService.EmployeeOption>> employees(@RequestParam Long hqId,
@RequestParam(required = false) String query,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(communicationWorkspaceService.findEmployees(user, hqId, query));
}
@GetMapping("/newsletter")
public ResponseEntity<List<CommunicationWorkspaceService.NewsletterRecipientRow>> newsletter(@RequestParam Long hqId,
@RequestParam(defaultValue = "all") String type,
@RequestParam(defaultValue = "all") String status,
@RequestParam(required = false) String search,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isNewsletterAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(communicationWorkspaceService.findNewsletterRecipients(user, hqId, type, status, search));
}
@PutMapping("/newsletter/{type}/{id}")
public ResponseEntity<CommunicationWorkspaceService.NewsletterRecipientRow> updateNewsletter(@PathVariable String type,
@PathVariable Long id,
@RequestBody NewsletterStateRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || !isNewsletterAllowed(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(communicationWorkspaceService.updateNewsletterRecipient(
user,
request.hqId,
type,
id,
request.newsletterActive,
request.dsgvoConfirmed
));
}
@GetMapping("/messages")
public ResponseEntity<List<CommunicationWorkspaceService.MessageRow>> messages(@RequestParam Long hqId,
@RequestParam(required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate from,
@RequestParam(required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate to,
@RequestParam(required = false) List<Integer> states,
@RequestParam(defaultValue = "all") String type,
@RequestParam(required = false) String search,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(communicationWorkspaceService.findMessages(user, hqId, from, to, states, type, search));
}
@PostMapping("/messages/{id}/read")
public ResponseEntity<CommunicationWorkspaceService.MessageRow> markRead(@PathVariable Long id,
@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(communicationWorkspaceService.markMessageRead(user, hqId, id));
}
@PostMapping("/messages/{id}/answer")
public ResponseEntity<CommunicationWorkspaceService.MessageRow> answer(@PathVariable Long id,
@RequestBody AnswerRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || !isAllowed(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(communicationWorkspaceService.answerMessage(
user,
request.hqId,
id,
request.subject,
request.body
));
}
@PostMapping("/send")
public ResponseEntity<CommunicationWorkspaceService.SendResult> send(@RequestBody SendRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || !isAllowed(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(communicationWorkspaceService.sendMessage(
user,
request.hqId,
request.groupIds,
request.courierSid,
request.subject,
request.body,
request.allActiveCouriers
));
}
private boolean isAllowed(UserSessionDto user, Long hqId) {
return accessControlService.canViewCommunication(user)
&& accessControlService.canAccessHeadquarters(user, hqId);
}
private boolean isNewsletterAllowed(UserSessionDto user, Long hqId) {
return isAllowed(user, hqId) && accessControlService.canManageNewsletter(user);
}
@ExceptionHandler(IllegalArgumentException.class)
public ResponseEntity<String> handleIllegalArgument(IllegalArgumentException exception) {
return ResponseEntity.badRequest().body(exception.getMessage());
}
public static class TickerRequest {
public Long hqId;
public Long targetHeadquartersId;
public Long targetEmployeeId;
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
public LocalDateTime startAt;
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
public LocalDateTime endAt;
public String text;
public boolean unerasable;
}
public static class MessageGroupRequest {
public Long hqId;
public String name;
}
public static class CourierGroupRequest {
public Long hqId;
public List<Long> groupIds;
}
public static class NewsletterStateRequest {
public Long hqId;
public boolean newsletterActive;
public boolean dsgvoConfirmed;
}
public static class AnswerRequest {
public Long hqId;
public String subject;
public String body;
}
public static class SendRequest {
public Long hqId;
public List<Long> groupIds;
public String courierSid;
public String subject;
public String body;
public boolean allActiveCouriers;
}
}

View File

@@ -0,0 +1,124 @@
package de.votian.services.controller;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.entity.CostCenter;
import de.votian.services.entity.CostCenterAddress;
import de.votian.services.repository.CostCenterAddressRepository;
import de.votian.services.repository.CostCenterRepository;
import de.votian.services.security.AccessControlService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.lang.NonNull;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Objects;
@RestController
@RequestMapping("/api/costcenters")
public class CostCenterController {
private final CostCenterRepository costCenterRepository;
private final CostCenterAddressRepository costCenterAddressRepository;
private final AccessControlService accessControlService;
public CostCenterController(CostCenterRepository costCenterRepository,
CostCenterAddressRepository costCenterAddressRepository,
AccessControlService accessControlService) {
this.costCenterRepository = costCenterRepository;
this.costCenterAddressRepository = costCenterAddressRepository;
this.accessControlService = accessControlService;
}
@GetMapping("/{id}")
public ResponseEntity<CostCenter> findById(@PathVariable @NonNull Long id, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
return costCenterRepository.findById(id)
.map(costCenter -> accessControlService.canAccessCostCenter(user, costCenter)
? ResponseEntity.ok(costCenter)
: ResponseEntity.status(HttpStatus.FORBIDDEN).<CostCenter>build())
.orElse(ResponseEntity.notFound().build());
}
@GetMapping("/customer/{customerId}")
public ResponseEntity<List<CostCenter>> findByCustomer(@PathVariable Long customerId, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canAccessCustomer(user, customerId) || !accessControlService.canViewCostCenters(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(costCenterRepository.findByCustomerId(customerId).stream()
.filter(costCenter -> accessControlService.canAccessCostCenter(user, costCenter))
.toList());
}
@GetMapping("/customer/{customerId}/visible")
public ResponseEntity<List<CostCenter>> findVisibleByCustomer(@PathVariable Long customerId, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canAccessCustomer(user, customerId) || !accessControlService.canViewCostCenters(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(costCenterRepository.findVisibleByCustomerId(customerId).stream()
.filter(costCenter -> accessControlService.canAccessCostCenter(user, costCenter))
.toList());
}
@PostMapping
public ResponseEntity<CostCenter> save(@RequestBody CostCenter costCenter, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (costCenter == null
|| !accessControlService.canAccessCustomer(user, costCenter.getCustomerId())
|| !accessControlService.canManageCostCenters(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(costCenterRepository.save(costCenter));
}
@PutMapping("/{id}")
public ResponseEntity<CostCenter> update(@PathVariable @NonNull Long id,
@RequestBody CostCenter updates,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
return costCenterRepository.findById(id).map(costCenter -> {
if (!accessControlService.canAccessCostCenter(user, costCenter)
|| !accessControlService.canManageCostCenters(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).<CostCenter>build();
}
if (updates.getName() != null) costCenter.setName(updates.getName());
if (updates.getPath() != null) costCenter.setPath(updates.getPath());
if (updates.getVisible() != null) costCenter.setVisible(updates.getVisible());
if (updates.getIsExtern() != null) costCenter.setIsExtern(updates.getIsExtern());
return ResponseEntity.ok(costCenterRepository.save(Objects.requireNonNull(costCenter)));
}).orElse(ResponseEntity.notFound().build());
}
@GetMapping("/{id}/addresses")
public ResponseEntity<List<CostCenterAddress>> getAddresses(@PathVariable @NonNull Long id, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
CostCenter costCenter = costCenterRepository.findById(id).orElse(null);
if (costCenter == null) {
return ResponseEntity.notFound().build();
}
if (!accessControlService.canAccessCostCenter(user, costCenter)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(costCenterAddressRepository.findByCostCenterId(id));
}
@PostMapping("/{id}/addresses")
public ResponseEntity<CostCenterAddress> addAddress(@PathVariable @NonNull Long id,
@RequestBody CostCenterAddress address,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
CostCenter costCenter = costCenterRepository.findById(id).orElse(null);
if (costCenter == null) {
return ResponseEntity.notFound().build();
}
if (!accessControlService.canAccessCostCenter(user, costCenter)
|| !accessControlService.canManageCostCenters(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
address.setCostCenterId(id);
return ResponseEntity.ok(costCenterAddressRepository.save(address));
}
}

View File

@@ -0,0 +1,201 @@
package de.votian.services.controller;
import de.votian.services.dto.CourierDetailDto;
import de.votian.services.dto.CourierListItemDto;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.entity.Address;
import de.votian.services.entity.Courier;
import de.votian.services.entity.CourierVehicle;
import de.votian.services.security.AccessControlService;
import de.votian.services.service.CourierService;
import de.votian.services.service.ViewDataService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/api/couriers")
public class CourierController {
private final CourierService courierService;
private final ViewDataService viewDataService;
private final AccessControlService accessControlService;
public CourierController(CourierService courierService,
ViewDataService viewDataService,
AccessControlService accessControlService) {
this.courierService = courierService;
this.viewDataService = viewDataService;
this.accessControlService = accessControlService;
}
@GetMapping("/{id}")
public ResponseEntity<CourierDetailDto> findById(@PathVariable Long id, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canViewCouriers(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return viewDataService.findCourierDetail(id)
.map(courier -> accessControlService.canAccessHeadquarters(user, courier.getHeadquartersId())
? ResponseEntity.ok(courier)
: ResponseEntity.status(HttpStatus.FORBIDDEN).<CourierDetailDto>build())
.orElse(ResponseEntity.notFound().build());
}
@GetMapping("/hq/{hqId}")
public ResponseEntity<List<CourierListItemDto>> findByHeadquarters(@PathVariable Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canViewCouriers(user) || !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(viewDataService.findCouriersByHeadquarters(hqId));
}
@GetMapping("/search")
public ResponseEntity<List<CourierListItemDto>> search(@RequestParam Long hqId,
@RequestParam String term,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canViewCouriers(user) || !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(viewDataService.searchCouriers(hqId, term));
}
@GetMapping("/sid-unique")
public ResponseEntity<Boolean> isSidUnique(@RequestParam String sid,
@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageCouriers(user) || !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(courierService.isSidUnique(sid, hqId));
}
@GetMapping("/eid-unique")
public ResponseEntity<Boolean> isEidUnique(@RequestParam String eid,
@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageCouriers(user) || !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(courierService.isEidUnique(eid, hqId));
}
@PostMapping
public ResponseEntity<Courier> create(@RequestBody CourierCreateRequest request, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null
|| request.courier == null
|| !accessControlService.canManageCouriers(user)
|| !accessControlService.canAccessHeadquarters(user, request.courier.getHeadquartersId())) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
Courier courier = courierService.createCourier(
request.courier, request.company, request.user, request.address, request.password);
return ResponseEntity.ok(courier);
}
@PutMapping("/{id}")
public ResponseEntity<Courier> update(@PathVariable Long id,
@RequestBody CourierUpdateRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
Courier existing = courierService.findById(id).orElse(null);
if (existing == null) {
return ResponseEntity.notFound().build();
}
if (!accessControlService.canManageCouriers(user)
|| !accessControlService.canAccessHeadquarters(user, existing.getHeadquartersId())) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
Courier updated = courierService.updateCourier(id, request.courier, request.company, request.user, request.address);
return ResponseEntity.ok(updated);
}
@GetMapping("/{id}/vehicles")
public ResponseEntity<List<CourierVehicle>> getVehicles(@PathVariable Long id, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
Courier existing = courierService.findById(id).orElse(null);
if (existing == null) {
return ResponseEntity.notFound().build();
}
if (!accessControlService.canViewCouriers(user)
|| !accessControlService.canAccessHeadquarters(user, existing.getHeadquartersId())) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(courierService.getVehicles(id));
}
@PostMapping("/{id}/vehicles")
public ResponseEntity<CourierVehicle> addVehicle(@PathVariable Long id,
@RequestBody CourierVehicle vehicle,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
Courier existing = courierService.findById(id).orElse(null);
if (existing == null) {
return ResponseEntity.notFound().build();
}
if (!accessControlService.canManageCouriers(user)
|| !accessControlService.canAccessHeadquarters(user, existing.getHeadquartersId())) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
vehicle.setCourierId(id);
return ResponseEntity.ok(courierService.saveVehicle(vehicle));
}
@PutMapping("/{id}/vehicles/{vehicleId}")
public ResponseEntity<CourierVehicle> updateVehicle(@PathVariable Long id,
@PathVariable Long vehicleId,
@RequestBody CourierVehicle vehicle,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
Courier existing = courierService.findById(id).orElse(null);
if (existing == null) {
return ResponseEntity.notFound().build();
}
if (!accessControlService.canManageCouriers(user)
|| !accessControlService.canAccessHeadquarters(user, existing.getHeadquartersId())) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(courierService.updateVehicle(id, vehicleId, vehicle));
}
@DeleteMapping("/{id}/vehicles/{vehicleId}")
public ResponseEntity<Void> deleteVehicle(@PathVariable Long id,
@PathVariable Long vehicleId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
Courier existing = courierService.findById(id).orElse(null);
if (existing == null) {
return ResponseEntity.notFound().build();
}
if (!accessControlService.canManageCouriers(user)
|| !accessControlService.canAccessHeadquarters(user, existing.getHeadquartersId())) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
courierService.deleteVehicle(id, vehicleId);
return ResponseEntity.ok().build();
}
public static class CourierCreateRequest {
public Courier courier;
public de.votian.services.entity.Company company;
public Address address;
public de.votian.services.entity.User user;
public String password;
}
public static class CourierUpdateRequest {
public Courier courier;
public de.votian.services.entity.Company company;
public Address address;
public de.votian.services.entity.User user;
}
}

View File

@@ -0,0 +1,141 @@
package de.votian.services.controller;
import de.votian.services.dto.CustomerDetailDto;
import de.votian.services.dto.CustomerListItemDto;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.entity.CostCenter;
import de.votian.services.entity.Customer;
import de.votian.services.security.AccessControlService;
import de.votian.services.service.CustomerService;
import de.votian.services.service.ViewDataService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/api/customers")
public class CustomerController {
private final CustomerService customerService;
private final ViewDataService viewDataService;
private final AccessControlService accessControlService;
public CustomerController(CustomerService customerService,
ViewDataService viewDataService,
AccessControlService accessControlService) {
this.customerService = customerService;
this.viewDataService = viewDataService;
this.accessControlService = accessControlService;
}
@GetMapping("/{id}")
public ResponseEntity<CustomerDetailDto> findById(@PathVariable Long id, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
return viewDataService.findCustomerDetail(id)
.map(customer -> accessControlService.canAccessCustomer(user, customer.getId())
? ResponseEntity.ok(customer)
: ResponseEntity.status(HttpStatus.FORBIDDEN).<CustomerDetailDto>build())
.orElse(ResponseEntity.notFound().build());
}
@GetMapping("/eid/{eid}")
public ResponseEntity<Customer> findByEid(@PathVariable String eid, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canViewCustomers(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return customerService.findByEid(eid)
.map(customer -> accessControlService.canAccessHeadquarters(user, customer.getHeadquartersId())
? ResponseEntity.ok(customer)
: ResponseEntity.status(HttpStatus.FORBIDDEN).<Customer>build())
.orElse(ResponseEntity.notFound().build());
}
@GetMapping("/hq/{hqId}")
public ResponseEntity<List<CustomerListItemDto>> findByHeadquarters(@PathVariable Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if ((!accessControlService.canViewCustomers(user) && !accessControlService.canManagePricing(user))
|| !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(viewDataService.findCustomersByHeadquarters(hqId));
}
@GetMapping("/search")
public ResponseEntity<List<CustomerListItemDto>> search(@RequestParam Long hqId,
@RequestParam String term,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if ((!accessControlService.canViewCustomers(user) && !accessControlService.canManagePricing(user))
|| !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(viewDataService.searchCustomers(hqId, term));
}
@PostMapping
public ResponseEntity<Customer> create(@RequestBody CustomerCreateRequest request, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null
|| request.customer == null
|| !accessControlService.canManageCustomers(user)
|| !accessControlService.canAccessHeadquarters(user, request.customer.getHeadquartersId())) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
Customer customer = customerService.createCustomer(
request.customer, request.company, request.user, request.password);
return ResponseEntity.ok(customer);
}
@PutMapping("/{id}")
public ResponseEntity<Customer> update(@PathVariable Long id,
@RequestBody CustomerUpdateRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
Customer existing = customerService.findById(id).orElse(null);
if (existing == null) {
return ResponseEntity.notFound().build();
}
if (!accessControlService.canManageCustomers(user)
|| !accessControlService.canAccessHeadquarters(user, existing.getHeadquartersId())) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
Customer updated = customerService.updateCustomer(id, request.customer, request.company, request.user);
return ResponseEntity.ok(updated);
}
@GetMapping("/{id}/costcenters")
public ResponseEntity<List<CostCenter>> getCostCenters(@PathVariable Long id, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canAccessCustomer(user, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(customerService.getCostCenters(id));
}
@GetMapping("/{id}/costcenters/visible")
public ResponseEntity<List<CostCenter>> getVisibleCostCenters(@PathVariable Long id, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canAccessCustomer(user, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(customerService.getVisibleCostCenters(id));
}
public static class CustomerCreateRequest {
public Customer customer;
public de.votian.services.entity.Company company;
public de.votian.services.entity.User user;
public String password;
}
public static class CustomerUpdateRequest {
public Customer customer;
public de.votian.services.entity.Company company;
public de.votian.services.entity.User user;
}
}

View File

@@ -0,0 +1,274 @@
package de.votian.services.controller;
import de.votian.services.dto.AcceptanceProtocolDto;
import de.votian.services.dto.CustomerAcceptanceProtocolConfigDto;
import de.votian.services.dto.CustomerDeliveryReasonConfigDto;
import de.votian.services.dto.CustomerServiceConfigDto;
import de.votian.services.dto.DeliveryReasonListDto;
import de.votian.services.dto.ServiceRadiusDto;
import de.votian.services.dto.ServiceZoneDto;
import de.votian.services.dto.ServiceZoneMappingDto;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.security.AccessControlService;
import de.votian.services.service.CustomerServiceConfigService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
import java.util.List;
@RestController
@RequestMapping("/api/customers")
public class CustomerServiceConfigController {
private final CustomerServiceConfigService customerServiceConfigService;
private final AccessControlService accessControlService;
public CustomerServiceConfigController(CustomerServiceConfigService customerServiceConfigService,
AccessControlService accessControlService) {
this.customerServiceConfigService = customerServiceConfigService;
this.accessControlService = accessControlService;
}
@GetMapping("/{id}/service-config")
public ResponseEntity<CustomerServiceConfigDto> getConfiguration(@PathVariable Long id, Authentication authentication) {
if (!canViewCustomer(authentication, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(customerServiceConfigService.getConfiguration(id));
}
@PutMapping("/{id}/service-config")
public ResponseEntity<Void> saveConfiguration(@PathVariable Long id,
@RequestBody ServiceConfigRequest request,
Authentication authentication) {
if (!canManageCustomer(authentication, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
customerServiceConfigService.saveConfiguration(id, request.serviceIds, request.serviceTypeIds);
return ResponseEntity.ok().build();
}
@GetMapping("/{id}/delivery-reasons")
public ResponseEntity<CustomerDeliveryReasonConfigDto> getDeliveryReasons(@PathVariable Long id,
Authentication authentication) {
if (!canViewCustomer(authentication, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(customerServiceConfigService.getDeliveryReasons(id));
}
@PutMapping("/{id}/delivery-reasons")
public ResponseEntity<Void> saveDeliveryReasons(@PathVariable Long id,
@RequestBody DeliveryReasonConfigRequest request,
Authentication authentication) {
if (!canManageCustomer(authentication, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
customerServiceConfigService.saveDeliveryReasons(id, request != null ? request.lists : List.of());
return ResponseEntity.ok().build();
}
@GetMapping("/{id}/acceptance-protocols")
public ResponseEntity<CustomerAcceptanceProtocolConfigDto> getAcceptanceProtocols(@PathVariable Long id,
Authentication authentication) {
if (!canViewCustomer(authentication, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(customerServiceConfigService.getAcceptanceProtocols(id));
}
@PutMapping("/{id}/acceptance-protocols")
public ResponseEntity<Void> saveAcceptanceProtocols(@PathVariable Long id,
@RequestBody AcceptanceProtocolConfigRequest request,
Authentication authentication) {
if (!canManageCustomer(authentication, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
customerServiceConfigService.saveAcceptanceProtocols(id, request != null ? request.protocols : List.of());
return ResponseEntity.ok().build();
}
@GetMapping("/{id}/service-zones")
public ResponseEntity<List<ServiceZoneDto>> getZones(@PathVariable Long id, Authentication authentication) {
if (!canViewCustomer(authentication, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(customerServiceConfigService.getZones(id));
}
@PostMapping("/{id}/service-zones")
public ResponseEntity<ServiceZoneDto> createZone(@PathVariable Long id,
@RequestBody ServiceZoneRequest request,
Authentication authentication) {
if (!canManageCustomer(authentication, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(customerServiceConfigService.createZone(
id, request.name, request.price, request.price1, request.price2, request.price3));
}
@PutMapping("/{id}/service-zones/{zoneId}")
public ResponseEntity<ServiceZoneDto> updateZone(@PathVariable Long id,
@PathVariable Long zoneId,
@RequestBody ServiceZoneRequest request,
Authentication authentication) {
if (!canManageCustomer(authentication, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(customerServiceConfigService.updateZone(
id, zoneId, request.name, request.price, request.price1, request.price2, request.price3));
}
@DeleteMapping("/{id}/service-zones/{zoneId}")
public ResponseEntity<Void> deleteZone(@PathVariable Long id,
@PathVariable Long zoneId,
Authentication authentication) {
if (!canManageCustomer(authentication, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
customerServiceConfigService.deleteZone(id, zoneId);
return ResponseEntity.ok().build();
}
@GetMapping("/{id}/service-zone-mappings")
public ResponseEntity<List<ServiceZoneMappingDto>> getZoneMappings(@PathVariable Long id,
Authentication authentication) {
if (!canViewCustomer(authentication, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(customerServiceConfigService.getZoneMappings(id));
}
@PostMapping("/{id}/service-zone-mappings")
public ResponseEntity<ServiceZoneMappingDto> createZoneMapping(@PathVariable Long id,
@RequestBody ServiceZoneMappingRequest request,
Authentication authentication) {
if (!canManageCustomer(authentication, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(customerServiceConfigService.createZoneMapping(
id, request.zoneId, request.zipcode, request.mappedValue1, request.mappedValue2, request.mappedValue3));
}
@PutMapping("/{id}/service-zone-mappings/{zoneId}/{zipCodeId}")
public ResponseEntity<ServiceZoneMappingDto> updateZoneMapping(@PathVariable Long id,
@PathVariable Long zoneId,
@PathVariable Long zipCodeId,
@RequestBody ServiceZoneMappingRequest request,
Authentication authentication) {
if (!canManageCustomer(authentication, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(customerServiceConfigService.updateZoneMapping(
id, zoneId, zipCodeId, request.zoneId, request.zipcode, request.mappedValue1, request.mappedValue2, request.mappedValue3));
}
@DeleteMapping("/{id}/service-zone-mappings/{zoneId}/{zipCodeId}")
public ResponseEntity<Void> deleteZoneMapping(@PathVariable Long id,
@PathVariable Long zoneId,
@PathVariable Long zipCodeId,
Authentication authentication) {
if (!canManageCustomer(authentication, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
customerServiceConfigService.deleteZoneMapping(id, zoneId, zipCodeId);
return ResponseEntity.ok().build();
}
@GetMapping("/{id}/service-radii")
public ResponseEntity<List<ServiceRadiusDto>> getRadii(@PathVariable Long id, Authentication authentication) {
if (!canViewCustomer(authentication, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(customerServiceConfigService.getRadii(id));
}
@PostMapping("/{id}/service-radii")
public ResponseEntity<ServiceRadiusDto> createRadius(@PathVariable Long id,
@RequestBody ServiceRadiusRequest request,
Authentication authentication) {
if (!canManageCustomer(authentication, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(customerServiceConfigService.createRadius(
id, request.zipcode, request.cityDistrict, request.radiusAreaNo));
}
@PutMapping("/{id}/service-radii/{radiusId}")
public ResponseEntity<ServiceRadiusDto> updateRadius(@PathVariable Long id,
@PathVariable Long radiusId,
@RequestBody ServiceRadiusRequest request,
Authentication authentication) {
if (!canManageCustomer(authentication, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(customerServiceConfigService.updateRadius(
id, radiusId, request.zipcode, request.cityDistrict, request.radiusAreaNo));
}
@DeleteMapping("/{id}/service-radii/{radiusId}")
public ResponseEntity<Void> deleteRadius(@PathVariable Long id,
@PathVariable Long radiusId,
Authentication authentication) {
if (!canManageCustomer(authentication, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
customerServiceConfigService.deleteRadius(id, radiusId);
return ResponseEntity.ok().build();
}
private boolean canViewCustomer(Authentication authentication, Long customerId) {
UserSessionDto user = accessControlService.sessionUser(authentication);
return accessControlService.canAccessCustomer(user, customerId);
}
private boolean canManageCustomer(Authentication authentication, Long customerId) {
UserSessionDto user = accessControlService.sessionUser(authentication);
return accessControlService.canManageCustomers(user) && accessControlService.canAccessCustomer(user, customerId);
}
public static class ServiceConfigRequest {
public List<Long> serviceIds;
public List<Long> serviceTypeIds;
}
public static class ServiceZoneRequest {
public String name;
public BigDecimal price;
public BigDecimal price1;
public BigDecimal price2;
public BigDecimal price3;
}
public static class ServiceZoneMappingRequest {
public Long zoneId;
public String zipcode;
public BigDecimal mappedValue1;
public BigDecimal mappedValue2;
public BigDecimal mappedValue3;
}
public static class ServiceRadiusRequest {
public String zipcode;
public String cityDistrict;
public Integer radiusAreaNo;
}
public static class DeliveryReasonConfigRequest {
public List<DeliveryReasonListDto> lists;
}
public static class AcceptanceProtocolConfigRequest {
public List<AcceptanceProtocolDto> protocols;
}
}

View File

@@ -0,0 +1,109 @@
package de.votian.services.controller;
import de.votian.services.dto.DispositionJobRowDto;
import de.votian.services.dto.DispositionStationDto;
import de.votian.services.dto.DispositionVehicleRowDto;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.security.AccessControlService;
import de.votian.services.service.DispositionService;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.time.LocalDate;
import java.util.List;
@RestController
@RequestMapping("/api/disposition")
public class DispositionController {
private final DispositionService dispositionService;
private final AccessControlService accessControlService;
public DispositionController(DispositionService dispositionService,
AccessControlService accessControlService) {
this.dispositionService = dispositionService;
this.accessControlService = accessControlService;
}
@GetMapping("/jobs")
public ResponseEntity<List<DispositionJobRowDto>> getJobs(
@RequestParam Long hqId,
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate day,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canViewDisposition(user) || !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(dispositionService.findJobsForDay(hqId, day));
}
@GetMapping("/vehicles")
public ResponseEntity<List<DispositionVehicleRowDto>> getVehicles(
@RequestParam Long hqId,
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate day,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canViewDisposition(user) || !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(dispositionService.findVehiclesForDay(hqId, day));
}
@GetMapping("/stations")
public ResponseEntity<List<DispositionStationDto>> getStations(
@RequestParam Long hqId,
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate day,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canViewDisposition(user) || !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(dispositionService.findStationsForDay(hqId, day));
}
@PutMapping("/jobs/{jobId}/assignment")
public ResponseEntity<DispositionJobRowDto> assignVehicle(
@PathVariable Long jobId,
@RequestParam Long hqId,
@RequestBody AssignmentRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageDisposition(user) || !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(dispositionService.assignVehicle(
hqId,
jobId,
request != null ? request.courierId : null,
request != null ? request.courierVehicleId : null
));
}
@DeleteMapping("/jobs/{jobId}/assignment")
public ResponseEntity<Void> clearVehicleAssignment(
@PathVariable Long jobId,
@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageDisposition(user) || !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
dispositionService.clearVehicleAssignment(hqId, jobId);
return ResponseEntity.ok().build();
}
public static class AssignmentRequest {
public Long courierId;
public Long courierVehicleId;
}
}

View File

@@ -0,0 +1,316 @@
package de.votian.services.controller;
import de.votian.services.dto.EmployeeDetailDto;
import de.votian.services.dto.EmployeeListItemDto;
import de.votian.services.dto.EmployeeWarehouseConfigDto;
import de.votian.services.dto.EmployeeWarehouseConfigRequest;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.entity.CostCenter;
import de.votian.services.entity.Employee;
import de.votian.services.entity.EmployeeCostCenter;
import de.votian.services.entity.EmployeeRights;
import de.votian.services.entity.User;
import de.votian.services.repository.CostCenterRepository;
import de.votian.services.security.AccessControlService;
import de.votian.services.service.EmployeeService;
import de.votian.services.service.EmployeeWarehouseConfigService;
import de.votian.services.service.ViewDataService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Objects;
@RestController
@RequestMapping("/api/employees")
public class EmployeeController {
private final EmployeeService employeeService;
private final ViewDataService viewDataService;
private final CostCenterRepository costCenterRepository;
private final AccessControlService accessControlService;
private final EmployeeWarehouseConfigService employeeWarehouseConfigService;
public EmployeeController(EmployeeService employeeService,
ViewDataService viewDataService,
CostCenterRepository costCenterRepository,
AccessControlService accessControlService,
EmployeeWarehouseConfigService employeeWarehouseConfigService) {
this.employeeService = employeeService;
this.viewDataService = viewDataService;
this.costCenterRepository = costCenterRepository;
this.accessControlService = accessControlService;
this.employeeWarehouseConfigService = employeeWarehouseConfigService;
}
@GetMapping("/{id}")
public ResponseEntity<EmployeeDetailDto> findById(@PathVariable Long id, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canViewEmployees(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return viewDataService.findEmployeeDetail(id)
.map(employee -> accessControlService.canAccessEmployee(user, employee)
? ResponseEntity.ok(employee)
: ResponseEntity.status(HttpStatus.FORBIDDEN).<EmployeeDetailDto>build())
.orElse(ResponseEntity.notFound().build());
}
@GetMapping
public ResponseEntity<List<EmployeeListItemDto>> findAll(Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canViewEmployees(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(viewDataService.findEmployees().stream()
.filter(employee -> canAccessEmployeeListItem(user, employee))
.toList());
}
@PostMapping
public ResponseEntity<Employee> create(@RequestBody EmployeeCreateRequest request, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || request.employee == null || request.user == null
|| !accessControlService.canManageEmployees(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
if (!prepareAndValidateRequest(user, request.employee, request.user, null)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
Employee created = employeeService.createEmployee(request.employee, request.user, request.password);
return ResponseEntity.ok(created);
}
@PutMapping("/{id}")
public ResponseEntity<Employee> update(@PathVariable Long id,
@RequestBody EmployeeUpdateRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || request.employee == null || request.user == null) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
EmployeeDetailDto existingDetail = viewDataService.findEmployeeDetail(id).orElse(null);
if (existingDetail == null) {
return ResponseEntity.notFound().build();
}
if (!accessControlService.canEditEmployee(user, existingDetail)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
if (!prepareAndValidateRequest(user, request.employee, request.user, existingDetail)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
Employee updated = employeeService.updateEmployee(id, request.employee, request.user);
return ResponseEntity.ok(updated);
}
@GetMapping("/{id}/rights")
public ResponseEntity<List<EmployeeRights>> getRights(@PathVariable Long id, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
EmployeeDetailDto existingDetail = viewDataService.findEmployeeDetail(id).orElse(null);
if (existingDetail == null) {
return ResponseEntity.notFound().build();
}
if (!accessControlService.canManageEmployeeMatrixRights(user)
|| !accessControlService.canAccessEmployee(user, existingDetail)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(employeeService.getRights(id));
}
@PutMapping("/{id}/rights")
public ResponseEntity<Void> setRights(@PathVariable Long id,
@RequestBody List<EmployeeRights> rights,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
EmployeeDetailDto existingDetail = viewDataService.findEmployeeDetail(id).orElse(null);
if (existingDetail == null) {
return ResponseEntity.notFound().build();
}
if (!accessControlService.canManageEmployeeMatrixRights(user)
|| !accessControlService.canAccessEmployee(user, existingDetail)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
employeeService.setRights(id, rights);
return ResponseEntity.ok().build();
}
@GetMapping("/{id}/costcenters")
public ResponseEntity<List<EmployeeCostCenter>> getCostCenterAccess(@PathVariable Long id,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
EmployeeDetailDto existingDetail = viewDataService.findEmployeeDetail(id).orElse(null);
if (existingDetail == null) {
return ResponseEntity.notFound().build();
}
if (!accessControlService.canManageEmployeeCostCenterMatrix(user)
|| !accessControlService.canAccessEmployee(user, existingDetail)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(employeeService.getCostCenterAccess(id));
}
@PutMapping("/{id}/costcenters")
public ResponseEntity<Void> setCostCenterAccess(@PathVariable Long id,
@RequestBody List<EmployeeCostCenter> costCenters,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
EmployeeDetailDto existingDetail = viewDataService.findEmployeeDetail(id).orElse(null);
if (existingDetail == null) {
return ResponseEntity.notFound().build();
}
if (!accessControlService.canManageEmployeeCostCenterMatrix(user)
|| !accessControlService.canAccessEmployee(user, existingDetail)
|| !allCostCentersAllowed(user, costCenters)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
employeeService.setCostCenterAccess(id, costCenters);
return ResponseEntity.ok().build();
}
@GetMapping("/warehouse-config-template")
public ResponseEntity<EmployeeWarehouseConfigDto> warehouseConfigTemplate(Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageEmployeeWarehouseConfig(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(employeeWarehouseConfigService.loadTemplate(user.getHeadquartersId()));
}
@GetMapping("/{id}/warehouse-config")
public ResponseEntity<EmployeeWarehouseConfigDto> getWarehouseConfig(@PathVariable Long id,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
EmployeeDetailDto existingDetail = viewDataService.findEmployeeDetail(id).orElse(null);
if (existingDetail == null) {
return ResponseEntity.notFound().build();
}
if (!accessControlService.canManageEmployeeWarehouseConfig(user)
|| !accessControlService.canAccessEmployee(user, existingDetail)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(employeeWarehouseConfigService.loadConfig(id));
}
@PutMapping("/{id}/warehouse-config")
public ResponseEntity<Void> setWarehouseConfig(@PathVariable Long id,
@RequestBody EmployeeWarehouseConfigRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
EmployeeDetailDto existingDetail = viewDataService.findEmployeeDetail(id).orElse(null);
if (existingDetail == null) {
return ResponseEntity.notFound().build();
}
if (!accessControlService.canManageEmployeeWarehouseConfig(user)
|| !accessControlService.canEditEmployee(user, existingDetail)
|| !accessControlService.canAccessEmployee(user, existingDetail)
|| (user != null && user.getEmployeeId() != null && user.getEmployeeId().equals(id))) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
employeeWarehouseConfigService.saveConfig(id, request);
return ResponseEntity.ok().build();
}
private boolean prepareAndValidateRequest(UserSessionDto sessionUser,
Employee employee,
User user,
EmployeeDetailDto existingDetail) {
if (accessControlService.isHeadquartersUser(sessionUser)) {
Long effectiveHqId = employee.getHeadquartersId() != null ? employee.getHeadquartersId() : sessionUser.getHeadquartersId();
employee.setHeadquartersId(effectiveHqId);
if (user.getHeadquartersId() == null) {
user.setHeadquartersId(effectiveHqId);
}
return accessControlService.canAccessHeadquarters(sessionUser, effectiveHqId);
}
if (!accessControlService.isCustomerUser(sessionUser)) {
return false;
}
if (existingDetail != null && !Integer.valueOf(2).equals(existingDetail.getUserType())) {
return false;
}
if (user.getType() != null && user.getType() != 2) {
return false;
}
if (!accessControlService.canManageEmployees(sessionUser)) {
if (existingDetail == null
|| !accessControlService.canEditEmployee(sessionUser, existingDetail)
|| !accessControlService.canEditOwnEmployeeAccount(sessionUser)) {
return false;
}
employee.setCostCenterId(existingDetail.getCostCenterId());
employee.setRights(existingDetail.getRights());
employee.setHeadquartersId(existingDetail.getHeadquartersId());
employee.setHeadquarters(existingDetail.getHeadquarters());
} else {
employee.setHeadquartersId(sessionUser.getHeadquartersId());
employee.setHeadquarters("");
}
user.setType(2);
user.setHeadquartersId(sessionUser.getHeadquartersId());
if (employee.getCostCenterId() == null) {
return false;
}
CostCenter primaryCostCenter = costCenterRepository.findById(Objects.requireNonNull(employee.getCostCenterId())).orElse(null);
return primaryCostCenter != null
&& sessionUser.getCustomerId() != null
&& sessionUser.getCustomerId().equals(primaryCostCenter.getCustomerId())
&& accessControlService.hasCostCenterAccess(sessionUser, Objects.requireNonNull(primaryCostCenter.getId()));
}
private boolean allCostCentersAllowed(UserSessionDto user, List<EmployeeCostCenter> costCenters) {
if (costCenters == null || costCenters.isEmpty()) {
return true;
}
if (accessControlService.isHeadquartersUser(user)) {
return true;
}
for (EmployeeCostCenter row : costCenters) {
if (row == null || row.getCostCenterId() == null) {
return false;
}
CostCenter costCenter = costCenterRepository.findById(Objects.requireNonNull(row.getCostCenterId())).orElse(null);
if (costCenter == null
|| user.getCustomerId() == null
|| !user.getCustomerId().equals(costCenter.getCustomerId())
|| !accessControlService.hasCostCenterAccess(user, costCenter.getId())) {
return false;
}
}
return true;
}
private boolean canAccessEmployeeListItem(UserSessionDto user, EmployeeListItemDto employee) {
if (employee == null || user == null) {
return false;
}
if (accessControlService.isHeadquartersUser(user)) {
return employee.getHeadquartersId() != null
&& accessControlService.canAccessHeadquarters(user, employee.getHeadquartersId());
}
return accessControlService.isCustomerUser(user)
&& employee.getCustomerId() != null
&& employee.getCustomerId().equals(user.getCustomerId())
&& (accessControlService.canManageEmployees(user)
|| (user.getEmployeeId() != null && user.getEmployeeId().equals(employee.getId())));
}
public static class EmployeeCreateRequest {
public Employee employee;
public User user;
public String password;
}
public static class EmployeeUpdateRequest {
public Employee employee;
public User user;
}
}

View File

@@ -0,0 +1,234 @@
package de.votian.services.controller;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.security.AccessControlService;
import de.votian.services.service.GenericExportWorkspaceService;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.http.ContentDisposition;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.time.LocalDate;
import java.util.List;
@RestController
@RequestMapping("/api/export-workspace")
public class GenericExportWorkspaceController {
private final GenericExportWorkspaceService genericExportWorkspaceService;
private final AccessControlService accessControlService;
public GenericExportWorkspaceController(GenericExportWorkspaceService genericExportWorkspaceService,
AccessControlService accessControlService) {
this.genericExportWorkspaceService = genericExportWorkspaceService;
this.accessControlService = accessControlService;
}
@GetMapping("/bootstrap")
public ResponseEntity<GenericExportWorkspaceService.Bootstrap> bootstrap(@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(genericExportWorkspaceService.bootstrap(user, hqId));
}
@GetMapping("/profiles")
public ResponseEntity<List<GenericExportWorkspaceService.ProfileRow>> profiles(@RequestParam Long hqId,
@RequestParam(required = false) Long customerId,
@RequestParam Long categoryId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(genericExportWorkspaceService.findProfiles(user, hqId, customerId, categoryId));
}
@PostMapping("/profiles")
public ResponseEntity<GenericExportWorkspaceService.ProfileRow> createProfile(@RequestBody ProfileRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || !isAllowed(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(genericExportWorkspaceService.saveProfile(
user,
request.hqId,
request.customerId,
request.categoryId,
null,
request.name,
request.parameterString,
request.headline,
request.beginOfLineChars,
request.endOfLineChars,
request.beginOfFileChars,
request.endOfFileChars,
request.fileExtension
));
}
@PutMapping("/profiles/{id}")
public ResponseEntity<GenericExportWorkspaceService.ProfileRow> updateProfile(@PathVariable Long id,
@RequestBody ProfileRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || !isAllowed(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(genericExportWorkspaceService.saveProfile(
user,
request.hqId,
request.customerId,
request.categoryId,
id,
request.name,
request.parameterString,
request.headline,
request.beginOfLineChars,
request.endOfLineChars,
request.beginOfFileChars,
request.endOfFileChars,
request.fileExtension
));
}
@DeleteMapping("/profiles/{id}")
public ResponseEntity<Void> deleteProfile(@PathVariable Long id,
@RequestParam Long hqId,
@RequestParam(required = false) Long customerId,
@RequestParam Long categoryId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
genericExportWorkspaceService.deleteProfile(user, hqId, customerId, categoryId, id);
return ResponseEntity.ok().build();
}
@PostMapping("/run")
public ResponseEntity<GenericExportWorkspaceService.ExportResult> runExport(@RequestBody ExportRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || !isAllowed(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(genericExportWorkspaceService.generateExport(
user,
request.hqId,
request.customerId,
request.categoryId,
request.profileId,
request.from,
request.to,
request.statusFilter,
request.customerCodeFilter,
request.delimiter,
request.fileName,
request.includeHeadline
));
}
@GetMapping("/files")
public ResponseEntity<List<GenericExportWorkspaceService.ExportFileRow>> files(@RequestParam Long hqId,
@RequestParam(required = false) Long customerId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(genericExportWorkspaceService.listFiles(user, hqId, customerId));
}
@GetMapping("/files/{id}/content")
public ResponseEntity<byte[]> download(@PathVariable Long id,
@RequestParam Long hqId,
@RequestParam(required = false) Long customerId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
GenericExportWorkspaceService.ExportFileRow file = genericExportWorkspaceService.listFiles(user, hqId, customerId).stream()
.filter(row -> row.id().equals(id))
.findFirst()
.orElse(null);
if (file == null) {
return ResponseEntity.notFound().build();
}
byte[] data = genericExportWorkspaceService.downloadFile(user, hqId, customerId, id);
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.parseMediaType("text/plain;charset=UTF-8"));
headers.setContentDisposition(ContentDisposition.attachment().filename(file.fileName()).build());
return new ResponseEntity<>(data, headers, HttpStatus.OK);
}
@DeleteMapping("/files/{id}")
public ResponseEntity<Void> deleteFile(@PathVariable Long id,
@RequestParam Long hqId,
@RequestParam(required = false) Long customerId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
genericExportWorkspaceService.deleteFile(user, hqId, customerId, id);
return ResponseEntity.ok().build();
}
private boolean isAllowed(UserSessionDto user, Long hqId) {
return accessControlService.canViewGenericExports(user)
&& accessControlService.canAccessHeadquarters(user, hqId);
}
@ExceptionHandler(IllegalArgumentException.class)
public ResponseEntity<String> handleIllegalArgument(IllegalArgumentException exception) {
return ResponseEntity.badRequest().body(exception.getMessage());
}
public static class ProfileRequest {
public Long hqId;
public Long customerId;
public Long categoryId;
public String name;
public String parameterString;
public boolean headline;
public String beginOfLineChars;
public String endOfLineChars;
public String beginOfFileChars;
public String endOfFileChars;
public String fileExtension;
}
public static class ExportRequest {
public Long hqId;
public Long customerId;
public Long categoryId;
public Long profileId;
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
public LocalDate from;
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
public LocalDate to;
public Integer statusFilter;
public String customerCodeFilter;
public String delimiter;
public String fileName;
public boolean includeHeadline;
}
}

View File

@@ -0,0 +1,180 @@
package de.votian.services.controller;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.security.AccessControlService;
import de.votian.services.service.GeoOperationsWorkspaceService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/api/geo-operations")
public class GeoOperationsWorkspaceController {
private final GeoOperationsWorkspaceService geoOperationsWorkspaceService;
private final AccessControlService accessControlService;
public GeoOperationsWorkspaceController(GeoOperationsWorkspaceService geoOperationsWorkspaceService,
AccessControlService accessControlService) {
this.geoOperationsWorkspaceService = geoOperationsWorkspaceService;
this.accessControlService = accessControlService;
}
@GetMapping("/bootstrap")
public ResponseEntity<GeoOperationsWorkspaceService.Bootstrap> bootstrap(@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isWorkspaceAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(geoOperationsWorkspaceService.bootstrap(user, hqId));
}
@GetMapping("/map")
public ResponseEntity<GeoOperationsWorkspaceService.MapDashboard> map(@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isWorkspaceAllowed(user, hqId) || !accessControlService.canViewGlobalMap(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(geoOperationsWorkspaceService.loadMapDashboard(user, hqId));
}
@GetMapping("/addresses/search")
public ResponseEntity<GeoOperationsWorkspaceService.AddressSearchResult> searchAddresses(@RequestParam Long hqId,
@RequestParam(required = false) String street,
@RequestParam(required = false) String zipcode,
@RequestParam(required = false) String city,
@RequestParam(required = false) String country,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isWorkspaceAllowed(user, hqId) || !accessControlService.canManageAddressDirectory(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(geoOperationsWorkspaceService.searchAddresses(user, hqId, street, zipcode, city, country));
}
@PutMapping("/addresses/{id}")
public ResponseEntity<GeoOperationsWorkspaceService.AddressRow> updateAddress(@PathVariable Long id,
@RequestBody AddressMutationRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || !isWorkspaceAllowed(user, request.hqId) || !accessControlService.canManageAddressDirectory(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(geoOperationsWorkspaceService.updateAddress(
user,
request.hqId,
id,
request.street,
request.zipcode,
request.city,
request.country
));
}
@PostMapping("/addresses/validated")
public ResponseEntity<GeoOperationsWorkspaceService.ValidatedStreetRow> createValidatedStreet(@RequestBody AddressMutationRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || !isWorkspaceAllowed(user, request.hqId) || !accessControlService.canManageAddressDirectory(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(geoOperationsWorkspaceService.createValidatedStreet(
user,
request.hqId,
request.street,
request.zipcode,
request.city,
request.country
));
}
@DeleteMapping("/addresses/validated/{id}")
public ResponseEntity<Void> deleteValidatedStreet(@PathVariable Long id,
@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isWorkspaceAllowed(user, hqId) || !accessControlService.canManageAddressDirectory(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
geoOperationsWorkspaceService.deleteValidatedStreet(user, hqId, id);
return ResponseEntity.ok().build();
}
@GetMapping("/similarity")
public ResponseEntity<List<GeoOperationsWorkspaceService.SimilarityResultRow>> similarity(@RequestParam Long hqId,
@RequestParam String type,
@RequestParam String phrase,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isWorkspaceAllowed(user, hqId) || !accessControlService.canViewSimilaritySearch(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(geoOperationsWorkspaceService.searchSimilarity(user, hqId, type, phrase));
}
@GetMapping("/travel-times")
public ResponseEntity<GeoOperationsWorkspaceService.TravelTimeResult> travelTimes(@RequestParam Long hqId,
@RequestParam String mode,
@RequestParam String zipcodeFrom,
@RequestParam String zipcodeTo,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isWorkspaceAllowed(user, hqId) || !accessControlService.canManageTravelTimes(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(geoOperationsWorkspaceService.loadTravelTimes(user, hqId, mode, zipcodeFrom, zipcodeTo));
}
@PutMapping("/travel-times")
public ResponseEntity<GeoOperationsWorkspaceService.SaveResult> saveTravelTimes(@RequestBody TravelTimeSaveRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || !isWorkspaceAllowed(user, request.hqId) || !accessControlService.canManageTravelTimes(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(geoOperationsWorkspaceService.saveTravelTimes(
user,
request.hqId,
request.mode,
request.rows
));
}
private boolean isWorkspaceAllowed(UserSessionDto user, Long hqId) {
return accessControlService.canViewGeoOperations(user)
&& accessControlService.canAccessHeadquarters(user, hqId);
}
@ExceptionHandler(IllegalArgumentException.class)
public ResponseEntity<String> handleIllegalArgument(IllegalArgumentException exception) {
return ResponseEntity.badRequest().body(exception.getMessage());
}
public static class AddressMutationRequest {
public Long hqId;
public String street;
public String zipcode;
public String city;
public String country;
}
public static class TravelTimeSaveRequest {
public Long hqId;
public String mode;
public List<GeoOperationsWorkspaceService.TravelTimeUpdate> rows;
}
}

View File

@@ -0,0 +1,182 @@
package de.votian.services.controller;
import de.votian.services.dto.FilterAdminDto;
import de.votian.services.dto.GroupAdminDto;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.security.AccessControlService;
import de.votian.services.service.GroupFilterAdminService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/api/group-filter-admin")
public class GroupFilterAdminController {
private final GroupFilterAdminService groupFilterAdminService;
private final AccessControlService accessControlService;
public GroupFilterAdminController(GroupFilterAdminService groupFilterAdminService,
AccessControlService accessControlService) {
this.groupFilterAdminService = groupFilterAdminService;
this.accessControlService = accessControlService;
}
@GetMapping("/groups")
public ResponseEntity<List<GroupAdminDto>> getGroups(@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.isHeadquartersUser(user)
|| !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(groupFilterAdminService.findGroups(hqId));
}
@PostMapping("/groups")
public ResponseEntity<GroupAdminDto> createGroup(@RequestBody GroupRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null
|| request.hqId == null
|| !accessControlService.canManageHeadquarters(user)
|| !accessControlService.canAccessHeadquarters(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(groupFilterAdminService.createGroup(
request.hqId,
request.name,
request.globalVisible
));
}
@PutMapping("/groups/{id}")
public ResponseEntity<GroupAdminDto> updateGroup(@PathVariable Long id,
@RequestBody GroupRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null
|| request.hqId == null
|| !accessControlService.canManageHeadquarters(user)
|| !accessControlService.canAccessHeadquarters(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(groupFilterAdminService.updateGroup(
id,
request.hqId,
request.name,
request.globalVisible
));
}
@DeleteMapping("/groups/{id}")
public ResponseEntity<Void> deleteGroup(@PathVariable Long id,
@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageHeadquarters(user)
|| !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
groupFilterAdminService.deleteGroup(id, hqId);
return ResponseEntity.ok().build();
}
@GetMapping("/filters")
public ResponseEntity<List<FilterAdminDto>> getFilters(@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.isHeadquartersUser(user)
|| !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(groupFilterAdminService.findFilters());
}
@PostMapping("/filters")
public ResponseEntity<FilterAdminDto> createFilter(@RequestBody FilterRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null
|| request.hqId == null
|| !accessControlService.canManageHeadquarters(user)
|| !accessControlService.canAccessHeadquarters(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(groupFilterAdminService.createFilter(
request.shortCode,
request.text,
request.type,
request.status,
request.sort,
request.longText
));
}
@PutMapping("/filters/{id}")
public ResponseEntity<FilterAdminDto> updateFilter(@PathVariable Long id,
@RequestBody FilterRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null
|| request.hqId == null
|| !accessControlService.canManageHeadquarters(user)
|| !accessControlService.canAccessHeadquarters(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(groupFilterAdminService.updateFilter(
id,
request.text,
request.type,
request.status,
request.sort,
request.longText
));
}
@DeleteMapping("/filters/{id}")
public ResponseEntity<Void> deleteFilter(@PathVariable Long id,
@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageHeadquarters(user)
|| !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
groupFilterAdminService.deleteFilter(id);
return ResponseEntity.ok().build();
}
public static class GroupRequest {
public Long hqId;
public String name;
public boolean globalVisible;
}
public static class FilterRequest {
public Long hqId;
public String shortCode;
public String text;
public Integer type;
public Integer status;
public Integer sort;
public String longText;
}
@ExceptionHandler(IllegalArgumentException.class)
public ResponseEntity<String> handleIllegalArgument(IllegalArgumentException exception) {
return ResponseEntity.badRequest().body(exception.getMessage());
}
}

View File

@@ -0,0 +1,129 @@
package de.votian.services.controller;
import de.votian.services.dto.GroupwareAppointmentCommandDto;
import de.votian.services.dto.GroupwareAppointmentDto;
import de.votian.services.dto.GroupwareCancellationCommandDto;
import de.votian.services.dto.GroupwareOptionsDto;
import de.votian.services.dto.GroupwareResubmissionCommandDto;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.security.AccessControlService;
import de.votian.services.service.GroupwareService;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.time.LocalDate;
import java.util.List;
@RestController
@RequestMapping("/api/groupware")
public class GroupwareController {
private final GroupwareService groupwareService;
private final AccessControlService accessControlService;
public GroupwareController(GroupwareService groupwareService,
AccessControlService accessControlService) {
this.groupwareService = groupwareService;
this.accessControlService = accessControlService;
}
@GetMapping("/options")
public ResponseEntity<GroupwareOptionsDto> getOptions(Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canViewGroupware(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(groupwareService.loadOptions(user));
}
@GetMapping("/appointments")
public ResponseEntity<List<GroupwareAppointmentDto>> getAppointments(
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate from,
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate to,
@RequestParam(required = false) Long userId,
@RequestParam(required = false) Integer category1,
@RequestParam(required = false) Integer category3,
@RequestParam(required = false) Integer category4,
@RequestParam(required = false) Long customerId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canViewGroupware(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(groupwareService.findAppointments(user, from, to, userId, category1, category3, category4, customerId));
}
@PostMapping("/appointments")
public ResponseEntity<GroupwareAppointmentDto> createAppointment(@RequestBody GroupwareAppointmentCommandDto request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageGroupware(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(groupwareService.createAppointment(user, request));
}
@PutMapping("/appointments/{appointmentId}")
public ResponseEntity<GroupwareAppointmentDto> updateAppointment(@PathVariable Long appointmentId,
@RequestBody GroupwareAppointmentCommandDto request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageGroupware(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(groupwareService.updateAppointment(user, appointmentId, request));
}
@PostMapping("/appointments/{appointmentId}/cancel")
public ResponseEntity<Void> cancelAppointment(@PathVariable Long appointmentId,
@RequestBody(required = false) GroupwareCancellationCommandDto request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageGroupware(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
groupwareService.cancelAppointment(user, appointmentId, request);
return ResponseEntity.ok().build();
}
@PostMapping("/appointments/{appointmentId}/confirm")
public ResponseEntity<GroupwareAppointmentDto> confirmAppointment(@PathVariable Long appointmentId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageGroupware(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(groupwareService.confirmAppointment(user, appointmentId));
}
@PostMapping("/appointments/{appointmentId}/finish")
public ResponseEntity<GroupwareAppointmentDto> finishAppointment(@PathVariable Long appointmentId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageGroupware(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(groupwareService.finishAppointment(user, appointmentId));
}
@PostMapping("/appointments/{appointmentId}/resubmission")
public ResponseEntity<GroupwareAppointmentDto> resubmitAppointment(@PathVariable Long appointmentId,
@RequestBody GroupwareResubmissionCommandDto request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageGroupware(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(groupwareService.resubmitAppointment(user, appointmentId, request));
}
}

View File

@@ -0,0 +1,97 @@
package de.votian.services.controller;
import de.votian.services.dto.HeadquartersDetailDto;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.entity.Address;
import de.votian.services.entity.Company;
import de.votian.services.entity.Headquarters;
import de.votian.services.security.AccessControlService;
import de.votian.services.service.HeadquartersService;
import de.votian.services.service.ViewDataService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/api/headquarters")
public class HeadquartersController {
private final HeadquartersService headquartersService;
private final ViewDataService viewDataService;
private final AccessControlService accessControlService;
public HeadquartersController(HeadquartersService headquartersService,
ViewDataService viewDataService,
AccessControlService accessControlService) {
this.headquartersService = headquartersService;
this.viewDataService = viewDataService;
this.accessControlService = accessControlService;
}
@GetMapping
public ResponseEntity<List<Headquarters>> findAll(Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageEmployees(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(headquartersService.findAll().stream()
.filter(headquarters -> accessControlService.canAccessHeadquarters(user, headquarters.getId()))
.toList());
}
@GetMapping("/{id}")
public ResponseEntity<HeadquartersDetailDto> findById(@PathVariable Long id, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canAccessHeadquarters(user, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return viewDataService.findHeadquartersDetail(id)
.map(ResponseEntity::ok)
.orElse(ResponseEntity.notFound().build());
}
@GetMapping("/{id}/company")
public ResponseEntity<Company> getCompany(@PathVariable Long id, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canAccessHeadquarters(user, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return headquartersService.getCompany(id)
.map(ResponseEntity::ok)
.orElse(ResponseEntity.notFound().build());
}
@PutMapping("/{id}")
public ResponseEntity<HeadquartersDetailDto> update(@PathVariable Long id,
@RequestBody HeadquartersUpdateRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageHeadquarters(user) || !accessControlService.canAccessHeadquarters(user, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
headquartersService.updateHeadquarters(
id,
request.headquarters,
request.company,
request.address,
request.bwvPhone,
request.gln,
request.duns
);
return viewDataService.findHeadquartersDetail(id)
.map(ResponseEntity::ok)
.orElse(ResponseEntity.notFound().build());
}
public static class HeadquartersUpdateRequest {
public Headquarters headquarters;
public Company company;
public Address address;
public String bwvPhone;
public String gln;
public String duns;
}
}

View File

@@ -0,0 +1,138 @@
package de.votian.services.controller;
import de.votian.services.dto.CustomerListItemDto;
import de.votian.services.dto.ImportExecutionResultDto;
import de.votian.services.dto.ImportFileDto;
import de.votian.services.dto.ImportProcessDto;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.security.AccessControlService;
import de.votian.services.service.ImportWorkspaceService;
import de.votian.services.service.ViewDataService;
import org.springframework.core.io.ByteArrayResource;
import org.springframework.http.ContentDisposition;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.MediaTypeFactory;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import java.util.Objects;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
@RestController
@RequestMapping("/api/imports")
public class ImportController {
private final ImportWorkspaceService importWorkspaceService;
private final AccessControlService accessControlService;
private final ViewDataService viewDataService;
public ImportController(ImportWorkspaceService importWorkspaceService,
AccessControlService accessControlService,
ViewDataService viewDataService) {
this.importWorkspaceService = importWorkspaceService;
this.accessControlService = accessControlService;
this.viewDataService = viewDataService;
}
@GetMapping("/processes")
public ResponseEntity<List<ImportProcessDto>> getProcesses(Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageImports(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(importWorkspaceService.getProcesses());
}
@GetMapping("/customers")
public ResponseEntity<List<CustomerListItemDto>> getCustomers(Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageImports(user) || user == null || user.getHeadquartersId() == null) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(viewDataService.findCustomersByHeadquarters(user.getHeadquartersId()));
}
@GetMapping("/processes/{processKey}/files")
public ResponseEntity<List<ImportFileDto>> getFiles(@PathVariable String processKey, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageImports(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(importWorkspaceService.listFiles(processKey));
}
@PostMapping("/processes/{processKey}/files")
public ResponseEntity<ImportFileDto> uploadFile(@PathVariable String processKey,
@RequestParam("file") MultipartFile file,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageImports(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(importWorkspaceService.storeFile(processKey, file));
}
@DeleteMapping("/processes/{processKey}/files")
public ResponseEntity<Void> deleteFile(@PathVariable String processKey,
@RequestParam("name") String fileName,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageImports(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
importWorkspaceService.deleteFile(processKey, fileName);
return ResponseEntity.ok().build();
}
@GetMapping("/processes/{processKey}/files/content")
public ResponseEntity<ByteArrayResource> downloadFile(@PathVariable String processKey,
@RequestParam("name") String fileName,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageImports(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
byte[] content = importWorkspaceService.loadFile(processKey, fileName);
return ResponseEntity.ok()
.contentType(Objects.requireNonNull(MediaTypeFactory.getMediaType(fileName).orElse(MediaType.APPLICATION_OCTET_STREAM)))
.header(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition.attachment().filename(fileName).build().toString())
.body(new ByteArrayResource(Objects.requireNonNull(content)));
}
@PostMapping("/processes/{processKey}/execute")
public ResponseEntity<ImportExecutionResultDto> execute(@PathVariable String processKey,
@RequestBody ImportExecutionRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageImports(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
try {
return ResponseEntity.ok(importWorkspaceService.execute(
processKey,
request != null ? request.fileName : null,
request != null ? request.customerId : null,
user != null ? user.getHeadquartersId() : null
));
} catch (RuntimeException ex) {
return ResponseEntity.ok(ImportExecutionResultDto.failure(processKey, ex.getMessage()));
}
}
public static class ImportExecutionRequest {
public String fileName;
public Long customerId;
}
}

View File

@@ -0,0 +1,242 @@
package de.votian.services.controller;
import de.votian.services.dto.InvoiceCustomerSummaryDto;
import de.votian.services.dto.InvoiceJobRowDto;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.security.AccessControlService;
import de.votian.services.service.InvoiceExportService;
import de.votian.services.service.JobService;
import de.votian.services.service.ViewDataService;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.time.LocalDate;
import java.util.List;
import java.util.Objects;
@RestController
@RequestMapping("/api/invoices")
public class InvoiceController {
private final ViewDataService viewDataService;
private final InvoiceExportService invoiceExportService;
private final JobService jobService;
private final AccessControlService accessControlService;
public InvoiceController(ViewDataService viewDataService,
InvoiceExportService invoiceExportService,
JobService jobService,
AccessControlService accessControlService) {
this.viewDataService = viewDataService;
this.invoiceExportService = invoiceExportService;
this.jobService = jobService;
this.accessControlService = accessControlService;
}
@GetMapping("/customers")
public ResponseEntity<List<InvoiceCustomerSummaryDto>> getCustomers(
@RequestParam Long hqId,
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate from,
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate to,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canViewInvoices(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
if (accessControlService.isCustomerUser(user)) {
return ResponseEntity.ok(viewDataService.findInvoiceCustomers(
user.getHeadquartersId(),
user.getCustomerId(),
user.getAccessibleCostCenterIds(),
from,
to
));
}
if (!accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(viewDataService.findInvoiceCustomers(hqId, from, to));
}
@GetMapping("/items")
public ResponseEntity<List<InvoiceJobRowDto>> getItems(
@RequestParam Long hqId,
@RequestParam Long customerId,
@RequestParam(required = false) Long costCenterId,
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate from,
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate to,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canViewInvoices(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
if (accessControlService.isCustomerUser(user)) {
return ResponseEntity.ok(viewDataService.findInvoiceItems(
user.getHeadquartersId(),
user.getCustomerId(),
costCenterId,
user.getAccessibleCostCenterIds(),
from,
to
));
}
if (!accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(viewDataService.findInvoiceItems(hqId, customerId, costCenterId, from, to));
}
@GetMapping("/courier-items")
public ResponseEntity<List<InvoiceJobRowDto>> getCourierItems(
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate from,
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate to,
@RequestParam(defaultValue = "finished") String mode,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.isCourierUser(user) || !accessControlService.canViewInvoices(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(viewDataService.findCourierInvoiceItems(
user.getCourierId(),
from,
to,
isFinishedMode(mode)
));
}
@GetMapping("/export/csv")
public ResponseEntity<byte[]> exportCsv(
@RequestParam Long hqId,
@RequestParam Long customerId,
@RequestParam(required = false) Long costCenterId,
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate from,
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate to,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canExportInvoices(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
List<InvoiceJobRowDto> rows = accessControlService.isCustomerUser(user)
? viewDataService.findInvoiceItems(user.getHeadquartersId(), user.getCustomerId(), costCenterId, user.getAccessibleCostCenterIds(), from, to)
: loadInvoiceItemsForHeadquarters(user, hqId, customerId, costCenterId, from, to);
if (rows == null) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
jobService.markExported(rows.stream().map(InvoiceJobRowDto::getJobId).toList());
return fileResponse(
buildInvoiceFilename("invoices", customerId, from, to, "csv"),
"text/csv; charset=UTF-8",
invoiceExportService.createCsv("Rechnungsausgabe", rows)
);
}
@GetMapping("/export/pdf")
public ResponseEntity<byte[]> exportPdf(
@RequestParam Long hqId,
@RequestParam Long customerId,
@RequestParam(required = false) Long costCenterId,
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate from,
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate to,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canExportInvoices(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
List<InvoiceJobRowDto> rows = accessControlService.isCustomerUser(user)
? viewDataService.findInvoiceItems(user.getHeadquartersId(), user.getCustomerId(), costCenterId, user.getAccessibleCostCenterIds(), from, to)
: loadInvoiceItemsForHeadquarters(user, hqId, customerId, costCenterId, from, to);
if (rows == null) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
jobService.markExported(rows.stream().map(InvoiceJobRowDto::getJobId).toList());
return fileResponse(
buildInvoiceFilename("invoices", customerId, from, to, "pdf"),
MediaType.APPLICATION_PDF_VALUE,
invoiceExportService.createPdf("Rechnungsausgabe", rows)
);
}
@GetMapping("/courier-export/csv")
public ResponseEntity<byte[]> exportCourierCsv(
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate from,
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate to,
@RequestParam(defaultValue = "finished") String mode,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.isCourierUser(user) || !accessControlService.canExportInvoices(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
List<InvoiceJobRowDto> rows = viewDataService.findCourierInvoiceItems(
user.getCourierId(),
from,
to,
isFinishedMode(mode)
);
jobService.markExported(rows.stream().map(InvoiceJobRowDto::getJobId).toList());
return fileResponse(
buildInvoiceFilename("courier_jobs", user.getCourierId(), from, to, "csv"),
"text/csv; charset=UTF-8",
invoiceExportService.createCsv("Kurierauftraege", rows)
);
}
@GetMapping("/courier-export/pdf")
public ResponseEntity<byte[]> exportCourierPdf(
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate from,
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate to,
@RequestParam(defaultValue = "finished") String mode,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.isCourierUser(user) || !accessControlService.canExportInvoices(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
List<InvoiceJobRowDto> rows = viewDataService.findCourierInvoiceItems(
user.getCourierId(),
from,
to,
isFinishedMode(mode)
);
jobService.markExported(rows.stream().map(InvoiceJobRowDto::getJobId).toList());
return fileResponse(
buildInvoiceFilename("courier_jobs", user.getCourierId(), from, to, "pdf"),
MediaType.APPLICATION_PDF_VALUE,
invoiceExportService.createPdf("Kurierauftraege", rows)
);
}
private List<InvoiceJobRowDto> loadInvoiceItemsForHeadquarters(UserSessionDto user,
Long hqId,
Long customerId,
Long costCenterId,
LocalDate from,
LocalDate to) {
if (!accessControlService.canAccessHeadquarters(user, hqId)) {
return null;
}
return viewDataService.findInvoiceItems(hqId, customerId, costCenterId, from, to);
}
private ResponseEntity<byte[]> fileResponse(String filename, String contentType, byte[] body) {
return ResponseEntity.ok()
.header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + filename + "\"")
.header(HttpHeaders.CACHE_CONTROL, "no-store")
.contentType(Objects.requireNonNull(MediaType.parseMediaType(Objects.requireNonNull(contentType))))
.body(body);
}
private String buildInvoiceFilename(String prefix, Long referenceId, LocalDate from, LocalDate to, String extension) {
return prefix + "_" + (referenceId != null ? referenceId : "all") + "_" + from + "_" + to + "." + extension;
}
private boolean isFinishedMode(String mode) {
return mode == null || !"running".equalsIgnoreCase(mode);
}
}

View File

@@ -0,0 +1,865 @@
package de.votian.services.controller;
import de.votian.services.dto.JobAcceptanceProtocolDto;
import de.votian.services.dto.InvoiceSummaryDto;
import de.votian.services.dto.JobListRowDto;
import de.votian.services.dto.JobPricingRequest;
import de.votian.services.dto.JobPricingResultDto;
import de.votian.services.dto.JobTourServiceRowDto;
import de.votian.services.dto.TourDetailDto;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.entity.*;
import de.votian.services.repository.AddressRepository;
import de.votian.services.security.AccessControlService;
import de.votian.services.service.JobBatchService;
import de.votian.services.service.JobAcceptanceProtocolService;
import de.votian.services.service.JobListExportService;
import de.votian.services.service.JobPricingService;
import de.votian.services.service.JobService;
import de.votian.services.service.JobTourServiceReadService;
import de.votian.services.service.ViewDataService;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@RestController
@RequestMapping("/api/jobs")
public class JobController {
private final JobService jobService;
private final JobBatchService jobBatchService;
private final JobAcceptanceProtocolService jobAcceptanceProtocolService;
private final JobPricingService jobPricingService;
private final JobListExportService jobListExportService;
private final JobTourServiceReadService jobTourServiceReadService;
private final ViewDataService viewDataService;
private final AddressRepository addressRepository;
private final AccessControlService accessControlService;
public JobController(JobService jobService,
JobBatchService jobBatchService,
JobAcceptanceProtocolService jobAcceptanceProtocolService,
JobPricingService jobPricingService,
JobListExportService jobListExportService,
JobTourServiceReadService jobTourServiceReadService,
ViewDataService viewDataService,
AddressRepository addressRepository,
AccessControlService accessControlService) {
this.jobService = jobService;
this.jobBatchService = jobBatchService;
this.jobAcceptanceProtocolService = jobAcceptanceProtocolService;
this.jobPricingService = jobPricingService;
this.jobListExportService = jobListExportService;
this.jobTourServiceReadService = jobTourServiceReadService;
this.viewDataService = viewDataService;
this.addressRepository = addressRepository;
this.accessControlService = accessControlService;
}
@GetMapping("/{id}")
public ResponseEntity<Job> findById(@PathVariable Long id, Authentication authentication) {
return jobService.findById(id)
.map(job -> canAccessJob(authentication, job)
? ResponseEntity.ok(job)
: ResponseEntity.status(HttpStatus.FORBIDDEN).<Job>build())
.orElse(ResponseEntity.notFound().<Job>build());
}
@GetMapping("/hq/{hqId}")
public ResponseEntity<List<Job>> findByHeadquarters(@PathVariable Long hqId, Authentication authentication) {
UserSessionDto user = sessionUser(authentication);
if (!accessControlService.canViewJobs(user) || !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(jobService.findByHeadquarters(hqId));
}
@GetMapping("/list")
public ResponseEntity<List<JobListRowDto>> findForList(
@RequestParam Long hqId,
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate from,
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate to,
@RequestParam(required = false) String term,
@RequestParam(required = false) Integer status,
@RequestParam(required = false) Long costCenterId,
@RequestParam(required = false) String courierSid,
@RequestParam(required = false) Boolean exported,
Authentication authentication) {
UserSessionDto user = sessionUser(authentication);
if (!accessControlService.canViewJobs(user) || accessControlService.isCourierUser(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
if (isCustomerUser(user)) {
return ResponseEntity.ok(viewDataService.findJobListRowsForCostCenters(
user.getHeadquartersId(),
user.getAccessibleCostCenterIds(),
from,
to,
term,
status,
costCenterId,
courierSid,
exported
));
}
if (!accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(viewDataService.findJobListRows(
hqId,
from,
to,
term,
status,
costCenterId,
courierSid,
exported
));
}
@GetMapping("/export/csv")
public ResponseEntity<byte[]> exportListCsv(
@RequestParam Long hqId,
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate from,
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate to,
@RequestParam(required = false) String term,
@RequestParam(required = false) Integer status,
@RequestParam(required = false) Long costCenterId,
@RequestParam(required = false) String courierSid,
@RequestParam(required = false) Boolean exported,
Authentication authentication) {
UserSessionDto user = sessionUser(authentication);
if (!accessControlService.canExportJobs(user) || accessControlService.isCourierUser(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
List<JobListRowDto> rows = loadJobListRowsForExport(
user,
hqId,
from,
to,
term,
status,
costCenterId,
courierSid,
exported
);
if (rows == null) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return fileResponse(
buildJobListFilename(from, to),
"text/csv; charset=UTF-8",
jobListExportService.createCsv("Auftragsliste", rows)
);
}
@GetMapping("/filter-costcenters")
public ResponseEntity<List<CostCenter>> getFilterCostCenters(@RequestParam Long hqId, Authentication authentication) {
UserSessionDto user = sessionUser(authentication);
if (!accessControlService.canViewJobs(user) || accessControlService.isCourierUser(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
if (!isCustomerUser(user) && !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(viewDataService.findJobFilterCostCenters(
isCustomerUser(user) ? user.getHeadquartersId() : hqId,
isCustomerUser(user) ? user.getAccessibleCostCenterIds() : null
));
}
@GetMapping("/daterange")
public ResponseEntity<List<Job>> findByDateRange(
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime from,
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime to,
@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = sessionUser(authentication);
if (isCourierUser(user)) {
return ResponseEntity.ok(jobService.findByCourierId(user.getCourierId()).stream()
.filter(job -> matchesDateRange(job.getOrderTime(), from, to))
.toList());
}
if (!accessControlService.canViewJobs(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
if (isCustomerUser(user)) {
return ResponseEntity.ok(jobService.findByPayerCostCenters(user.getAccessibleCostCenterIds()).stream()
.filter(job -> matchesDateRange(job.getOrderTime(), from, to))
.filter(job -> user.getHeadquartersId() == null || user.getHeadquartersId().equals(job.getHeadquartersId()))
.toList());
}
if (!accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(jobService.findByOrderTimeBetween(from, to, hqId));
}
@GetMapping("/commission")
public ResponseEntity<List<Job>> findByCommissionNo(@RequestParam String commNo,
@RequestParam Long customerId,
Authentication authentication) {
UserSessionDto user = sessionUser(authentication);
if (!accessControlService.canViewJobs(user) || !accessControlService.canAccessCustomer(user, customerId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(jobService.findByCommissionNoAndCustomer(commNo, customerId));
}
@GetMapping("/today")
public ResponseEntity<List<Job>> findTodaysJobs(Authentication authentication) {
UserSessionDto user = sessionUser(authentication);
if (isCourierUser(user)) {
return ResponseEntity.ok(jobService.findByCourierId(user.getCourierId()).stream()
.filter(job -> matchesDateRange(job.getOrderTime(),
java.time.LocalDate.now().atStartOfDay(),
java.time.LocalDate.now().atTime(23, 59, 59)))
.toList());
}
if (!accessControlService.canViewJobs(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
if (isCustomerUser(user)) {
return ResponseEntity.ok(jobService.findByPayerCostCenters(user.getAccessibleCostCenterIds()).stream()
.filter(job -> matchesDateRange(job.getOrderTime(),
java.time.LocalDate.now().atStartOfDay(),
java.time.LocalDate.now().atTime(23, 59, 59)))
.filter(job -> user.getHeadquartersId() == null || user.getHeadquartersId().equals(job.getHeadquartersId()))
.toList());
}
return ResponseEntity.ok(jobService.findTodaysJobs());
}
@PostMapping
public ResponseEntity<Job> create(@RequestBody JobCreateRequest request, Authentication authentication) {
UserSessionDto user = sessionUser(authentication);
if (!accessControlService.canManageJobs(user) || isCourierUser(user) || !requestWithinCustomerScope(user, request)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
if (isHeadquartersUser(user) && request.job != null && !accessControlService.canAccessHeadquarters(user, request.job.getHeadquartersId())) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
if (request.job != null && user != null && user.getHeadquartersId() != null && !isHeadquartersUser(user)) {
request.job.setHeadquartersId(user.getHeadquartersId());
}
sanitizeLonghaulUpdate(user, request != null ? request.job : null);
Job created = jobService.createJob(
request.job,
mapTours(null, request.tours),
request.articles,
request.prices
);
return ResponseEntity.ok(created);
}
@PostMapping("/batch")
public ResponseEntity<List<Job>> createBatch(@RequestBody BatchCreateRequest request, Authentication authentication) {
UserSessionDto user = sessionUser(authentication);
if (!accessControlService.canBatchJobs(user)
|| isCourierUser(user)
|| request == null
|| request.customerId == null
|| request.costCenterId == null) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
if (isCustomerUser(user)) {
if (!request.customerId.equals(user.getCustomerId())
|| !hasCostCenterAccess(user, request.costCenterId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
} else if (!accessControlService.canAccessHeadquarters(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
Long effectiveHqId = user != null && user.getHeadquartersId() != null ? user.getHeadquartersId() : request.hqId;
List<JobBatchService.BatchJobRow> rows = request.rows != null
? request.rows.stream()
.map(row -> new JobBatchService.BatchJobRow(
row.orderTime,
row.description,
row.commissionNo,
row.totalPrice,
row.courierPrice,
row.courierId
))
.toList()
: List.of();
return ResponseEntity.ok(jobBatchService.createBatchJobs(
effectiveHqId,
request.customerId,
request.costCenterId,
rows
));
}
@PutMapping("/{id}")
public ResponseEntity<Job> update(@PathVariable Long id,
@RequestBody Job updates,
Authentication authentication) {
Job existing = jobService.findById(id).orElse(null);
if (existing == null) {
return ResponseEntity.notFound().build();
}
UserSessionDto user = sessionUser(authentication);
if (!canAccessJob(authentication, existing) || !accessControlService.canManageJobs(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
sanitizeLonghaulUpdate(user, updates);
return ResponseEntity.ok(jobService.updateJob(id, updates));
}
@PutMapping("/{id}/details")
public ResponseEntity<Job> updateDetails(@PathVariable Long id,
@RequestBody JobCreateRequest request,
Authentication authentication) {
Job existing = jobService.findById(id).orElse(null);
if (existing == null) {
return ResponseEntity.notFound().<Job>build();
}
UserSessionDto user = sessionUser(authentication);
if (!canAccessJob(authentication, existing)
|| !accessControlService.canManageJobs(user)
|| isCourierUser(user)
|| !requestWithinCustomerScope(user, request)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).<Job>build();
}
if (request.job != null && user != null && user.getHeadquartersId() != null && !isHeadquartersUser(user)) {
request.job.setHeadquartersId(user.getHeadquartersId());
}
sanitizeLonghaulUpdate(user, request.job);
Job updated = jobService.updateJob(id, request.job);
for (Tour tour : mapTours(id, request.tours)) {
jobService.saveTour(tour);
}
jobService.replaceTourArticles(id, request.articles != null ? request.articles : List.of());
return ResponseEntity.ok(updated);
}
@PutMapping("/{id}/cancel")
public ResponseEntity<Void> cancel(@PathVariable Long id, Authentication authentication) {
Job existing = jobService.findById(id).orElse(null);
if (existing == null) {
return ResponseEntity.notFound().build();
}
UserSessionDto user = sessionUser(authentication);
if (!canAccessJob(authentication, existing)
|| !accessControlService.canManageJobs(user)
|| isCourierUser(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
jobService.cancelJob(id);
return ResponseEntity.ok().build();
}
@PutMapping("/clear-tournames")
public ResponseEntity<Void> clearTourNames(@RequestBody List<Long> jobIds, Authentication authentication) {
UserSessionDto user = sessionUser(authentication);
if (!isHeadquartersUser(user) || !accessControlService.canManageJobs(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
jobService.clearTourNames(jobIds);
return ResponseEntity.ok().build();
}
// Tour endpoints
@GetMapping("/{id}/tours")
public ResponseEntity<List<TourDetailDto>> getTours(@PathVariable Long id, Authentication authentication) {
Job existing = jobService.findById(id).orElse(null);
if (existing == null) {
return ResponseEntity.notFound().build();
}
if (!canAccessJob(authentication, existing)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(viewDataService.findToursForJob(id));
}
@PostMapping("/{id}/tours")
public ResponseEntity<Tour> addTour(@PathVariable Long id,
@RequestBody Tour tour,
Authentication authentication) {
Job existing = jobService.findById(id).orElse(null);
UserSessionDto user = sessionUser(authentication);
if (existing == null) {
return ResponseEntity.notFound().build();
}
if (!canAccessJob(authentication, existing) || !accessControlService.canManageJobs(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
tour.setJobId(id);
return ResponseEntity.ok(jobService.saveTour(tour));
}
@PutMapping("/{id}/tours/{tourId}")
public ResponseEntity<Tour> updateTour(@PathVariable Long id,
@PathVariable Long tourId,
@RequestBody Tour tour,
Authentication authentication) {
Job existing = jobService.findById(id).orElse(null);
UserSessionDto user = sessionUser(authentication);
if (existing == null) {
return ResponseEntity.notFound().build();
}
if (!canAccessJob(authentication, existing) || !accessControlService.canManageJobs(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
tour.setId(tourId);
tour.setJobId(id);
return ResponseEntity.ok(jobService.saveTour(tour));
}
// Tour Article endpoints
@GetMapping("/{id}/articles")
public ResponseEntity<List<TourArticle>> getTourArticles(@PathVariable Long id, Authentication authentication) {
Job existing = jobService.findById(id).orElse(null);
if (existing == null) {
return ResponseEntity.notFound().build();
}
if (!canAccessJob(authentication, existing)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(jobService.getTourArticles(id));
}
@PostMapping("/{id}/articles")
public ResponseEntity<TourArticle> addTourArticle(@PathVariable Long id,
@RequestBody TourArticle article,
Authentication authentication) {
Job existing = jobService.findById(id).orElse(null);
UserSessionDto user = sessionUser(authentication);
if (existing == null) {
return ResponseEntity.notFound().build();
}
if (!canAccessJob(authentication, existing) || !accessControlService.canManageJobs(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
article.setJobId(id);
return ResponseEntity.ok(jobService.saveTourArticle(article));
}
@GetMapping("/{id}/weight")
public ResponseEntity<BigDecimal> getTotalWeight(@PathVariable Long id, Authentication authentication) {
Job existing = jobService.findById(id).orElse(null);
if (existing == null) {
return ResponseEntity.notFound().build();
}
if (!canAccessJob(authentication, existing)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(jobService.getTotalWeight(id));
}
@GetMapping("/{id}/packing-pieces")
public ResponseEntity<Integer> getTotalPackingPieces(@PathVariable Long id, Authentication authentication) {
Job existing = jobService.findById(id).orElse(null);
if (existing == null) {
return ResponseEntity.notFound().build();
}
if (!canAccessJob(authentication, existing)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(jobService.getTotalPackingPieces(id));
}
@GetMapping("/{id}/acceptance-protocol")
public ResponseEntity<JobAcceptanceProtocolDto> getAcceptanceProtocol(@PathVariable Long id, Authentication authentication) {
Job existing = jobService.findById(id).orElse(null);
if (existing == null) {
return ResponseEntity.notFound().build();
}
if (!canAccessJob(authentication, existing)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(jobAcceptanceProtocolService.getProtocol(id));
}
@GetMapping("/{id}/acceptance-protocol/pdf")
public ResponseEntity<byte[]> exportAcceptanceProtocolPdf(@PathVariable Long id, Authentication authentication) {
Job existing = jobService.findById(id).orElse(null);
if (existing == null) {
return ResponseEntity.notFound().build();
}
if (!canAccessJob(authentication, existing)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return fileResponse(
"abnahmeprotokoll_" + id + ".pdf",
MediaType.APPLICATION_PDF_VALUE,
jobAcceptanceProtocolService.createPdf(id)
);
}
@GetMapping("/{id}/acceptance-protocol/signature")
public ResponseEntity<byte[]> getAcceptanceProtocolSignature(@PathVariable Long id, Authentication authentication) {
Job existing = jobService.findById(id).orElse(null);
if (existing == null) {
return ResponseEntity.notFound().build();
}
if (!canAccessJob(authentication, existing)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
byte[] image = jobAcceptanceProtocolService.loadSignatureImage(id);
if (image.length == 0) {
return ResponseEntity.notFound().build();
}
return ResponseEntity.ok()
.header(HttpHeaders.CACHE_CONTROL, "no-store")
.contentType(Objects.requireNonNull(MediaType.IMAGE_PNG))
.body(image);
}
// Price endpoints
@GetMapping("/{id}/prices")
public ResponseEntity<List<JobPrice>> getJobPrices(@PathVariable Long id, Authentication authentication) {
Job existing = jobService.findById(id).orElse(null);
if (existing == null) {
return ResponseEntity.notFound().build();
}
if (!canAccessJob(authentication, existing)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(jobService.getJobPrices(id));
}
@GetMapping("/{id}/tourservices")
public ResponseEntity<List<JobTourServiceRowDto>> getJobTourServices(@PathVariable Long id, Authentication authentication) {
Job existing = jobService.findById(id).orElse(null);
if (existing == null) {
return ResponseEntity.notFound().build();
}
if (!canAccessJob(authentication, existing)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(jobTourServiceReadService.findByJobId(id));
}
@PostMapping("/{id}/prices")
public ResponseEntity<Void> saveJobPrice(@PathVariable Long id,
@RequestBody JobPrice price,
Authentication authentication) {
Job existing = jobService.findById(id).orElse(null);
if (existing == null) {
return ResponseEntity.notFound().build();
}
UserSessionDto user = sessionUser(authentication);
if (!canAccessJob(authentication, existing) || !accessControlService.canManageJobs(user) || isCourierUser(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
price.setJobId(id);
jobService.saveJobPrice(price);
return ResponseEntity.ok().build();
}
@PutMapping("/{id}/prices")
public ResponseEntity<Void> replaceJobPrices(@PathVariable Long id,
@RequestBody List<JobPrice> prices,
Authentication authentication) {
Job existing = jobService.findById(id).orElse(null);
if (existing == null) {
return ResponseEntity.notFound().build();
}
UserSessionDto user = sessionUser(authentication);
if (!canAccessJob(authentication, existing) || !accessControlService.canManageJobs(user) || isCourierUser(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
jobService.replaceJobPrices(id, prices != null ? prices : List.of());
return ResponseEntity.ok().build();
}
@DeleteMapping("/{id}/prices/{metaSort}")
public ResponseEntity<Void> deleteJobPrice(@PathVariable Long id,
@PathVariable Integer metaSort,
Authentication authentication) {
Job existing = jobService.findById(id).orElse(null);
if (existing == null) {
return ResponseEntity.notFound().build();
}
UserSessionDto user = sessionUser(authentication);
if (!canAccessJob(authentication, existing) || !accessControlService.canManageJobs(user) || isCourierUser(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
jobService.deleteJobPrice(id, metaSort);
return ResponseEntity.ok().build();
}
@PostMapping("/pricing/calculate")
public ResponseEntity<JobPricingResultDto> calculatePricing(@RequestBody JobPricingRequest request,
Authentication authentication) {
UserSessionDto user = sessionUser(authentication);
JobCreateRequest scopeRequest = new JobCreateRequest();
scopeRequest.job = request != null ? request.getJob() : null;
if (request == null
|| request.getJob() == null
|| !accessControlService.canManageJobs(user)
|| isCourierUser(user)
|| !requestWithinCustomerScope(user, scopeRequest)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
if (isHeadquartersUser(user)
&& request.getJob().getHeadquartersId() != null
&& !accessControlService.canAccessHeadquarters(user, request.getJob().getHeadquartersId())) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
if (request.getJob().getHeadquartersId() == null && user != null && user.getHeadquartersId() != null) {
request.getJob().setHeadquartersId(user.getHeadquartersId());
}
return ResponseEntity.ok(jobPricingService.calculateDraft(
request.getJob(),
request.getPrices(),
request.getTours(),
request.isManualCourierTotalOverride()
));
}
// Disposition
@GetMapping("/{id}/disposition")
public ResponseEntity<VehicleDisposition> getDisposition(@PathVariable Long id, Authentication authentication) {
Job existing = jobService.findById(id).orElse(null);
if (existing == null) {
return ResponseEntity.notFound().build();
}
if (!canAccessJob(authentication, existing)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return jobService.getVehicleDisposition(id)
.map(ResponseEntity::ok)
.orElse(ResponseEntity.notFound().build());
}
@GetMapping("/invoice-summary")
public ResponseEntity<InvoiceSummaryDto> getInvoiceSummary(
@RequestParam Long hqId,
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) java.time.LocalDate from,
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) java.time.LocalDate to,
Authentication authentication) {
UserSessionDto user = sessionUser(authentication);
if (!accessControlService.canViewInvoices(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
if (isCustomerUser(user)) {
return ResponseEntity.ok(viewDataService.buildInvoiceSummaryForCostCenters(
user.getHeadquartersId(),
user.getAccessibleCostCenterIds(),
from,
to
));
}
if (!accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(viewDataService.buildInvoiceSummary(hqId, from, to));
}
private List<JobListRowDto> loadJobListRowsForExport(UserSessionDto user,
Long hqId,
LocalDate from,
LocalDate to,
String term,
Integer status,
Long costCenterId,
String courierSid,
Boolean exported) {
if (isCustomerUser(user)) {
if (!accessControlService.hasCostCenterAccess(user, costCenterId)) {
return null;
}
return viewDataService.findJobListRowsForCostCenters(
user.getHeadquartersId(),
user.getAccessibleCostCenterIds(),
from,
to,
term,
status,
costCenterId,
courierSid,
exported
);
}
if (!accessControlService.canAccessHeadquarters(user, hqId)) {
return null;
}
return viewDataService.findJobListRows(
hqId,
from,
to,
term,
status,
costCenterId,
courierSid,
exported
);
}
private ResponseEntity<byte[]> fileResponse(String filename, String contentType, byte[] body) {
return ResponseEntity.ok()
.header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + filename + "\"")
.header(HttpHeaders.CACHE_CONTROL, "no-store")
.contentType(Objects.requireNonNull(MediaType.parseMediaType(Objects.requireNonNull(contentType))))
.body(body);
}
private String buildJobListFilename(LocalDate from, LocalDate to) {
return "jobs_" + from + "_" + to + ".csv";
}
private boolean canAccessJob(Authentication authentication, Job job) {
return accessControlService.canAccessJob(sessionUser(authentication), job);
}
private void sanitizeLonghaulUpdate(UserSessionDto user, Job job) {
if (job == null || job.getLonghaul() == null) {
return;
}
if (!accessControlService.canManageLonghaul(user)) {
job.setLonghaul(null);
return;
}
if (!Integer.valueOf(0).equals(job.getLonghaul()) && !Integer.valueOf(3).equals(job.getLonghaul())) {
job.setLonghaul(null);
}
}
private boolean requestWithinCustomerScope(UserSessionDto user, JobCreateRequest request) {
if (user == null || !isCustomerUser(user)) {
return true;
}
if (request == null || request.job == null) {
return false;
}
if (!hasCostCenterAccess(user, request.job.getCostCenterPayerId())
|| !hasCostCenterAccess(user, request.job.getCostCenterRelatedId())) {
return false;
}
if (request.tours != null) {
for (TourRequest tour : request.tours) {
if (!hasCostCenterAccess(user, tour.costCenterId)) {
return false;
}
}
}
return true;
}
private boolean hasCostCenterAccess(UserSessionDto user, Long costCenterId) {
return accessControlService.hasCostCenterAccess(user, costCenterId);
}
private boolean matchesDateRange(LocalDateTime value, LocalDateTime from, LocalDateTime to) {
return value != null && !value.isBefore(from) && !value.isAfter(to);
}
private UserSessionDto sessionUser(Authentication authentication) {
return accessControlService.sessionUser(authentication);
}
private boolean isHeadquartersUser(UserSessionDto user) {
return accessControlService.isHeadquartersUser(user);
}
private boolean isCustomerUser(UserSessionDto user) {
return accessControlService.isCustomerUser(user);
}
private boolean isCourierUser(UserSessionDto user) {
return accessControlService.isCourierUser(user);
}
public static class JobCreateRequest {
public Job job;
public List<TourRequest> tours;
public List<TourArticle> articles;
public List<JobPrice> prices;
}
public static class TourRequest {
public Long id;
public Integer sort;
public String comp;
public String person;
public String street;
public String zipcode;
public String city;
public String hsno;
public String commissionNo;
public Integer status;
public String remark;
public String phone;
public Long costCenterId;
}
public static class BatchCreateRequest {
public Long hqId;
public Long customerId;
public Long costCenterId;
public List<BatchRowRequest> rows;
}
public static class BatchRowRequest {
public LocalDateTime orderTime;
public String description;
public String commissionNo;
public BigDecimal totalPrice;
public BigDecimal courierPrice;
public Long courierId;
}
private List<Tour> mapTours(Long jobId, List<TourRequest> requests) {
if (requests == null) {
return List.of();
}
Map<Integer, Tour> existingBySort = new HashMap<>();
if (jobId != null) {
for (Tour existingTour : jobService.getTours(jobId)) {
existingBySort.put(existingTour.getSort(), existingTour);
}
}
return requests.stream().map(request -> {
Tour tour = new Tour();
Tour existing = request.sort != null ? existingBySort.get(request.sort) : null;
if (request.id != null) {
tour.setId(request.id);
} else if (existing != null) {
tour.setId(existing.getId());
}
tour.setJobId(jobId);
tour.setSort(request.sort);
tour.setComp(request.comp);
tour.setPerson(request.person);
tour.setHsno(request.hsno);
tour.setCommissionNo(request.commissionNo);
tour.setStatus(request.status);
tour.setRemark(request.remark);
tour.setPhone(request.phone);
tour.setCostCenterId(request.costCenterId);
tour.setAddressId(saveAddress(existing != null ? existing.getAddressId() : null, request));
return tour;
}).toList();
}
private Long saveAddress(Long existingAddressId, TourRequest request) {
Address address = existingAddressId != null
? addressRepository.findById(existingAddressId).orElseGet(Address::new)
: new Address();
address.setStreet(request.street);
address.setZipcode(request.zipcode);
address.setCity(request.city);
if (address.getCountry() == null || address.getCountry().isBlank()) {
address.setCountry("DE");
}
return addressRepository.save(address).getId();
}
}

View File

@@ -0,0 +1,124 @@
package de.votian.services.controller;
import de.votian.services.dto.JobAttachmentDto;
import de.votian.services.dto.JobPhotoDto;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.entity.Job;
import de.votian.services.security.AccessControlService;
import de.votian.services.service.JobMediaService;
import de.votian.services.service.JobService;
import org.springframework.core.io.ByteArrayResource;
import org.springframework.http.ContentDisposition;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.MediaTypeFactory;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.Objects;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
@RestController
@RequestMapping("/api/jobs")
public class JobMediaController {
private final JobMediaService jobMediaService;
private final JobService jobService;
private final AccessControlService accessControlService;
public JobMediaController(JobMediaService jobMediaService,
JobService jobService,
AccessControlService accessControlService) {
this.jobMediaService = jobMediaService;
this.jobService = jobService;
this.accessControlService = accessControlService;
}
@GetMapping("/{id}/attachments")
public ResponseEntity<List<JobAttachmentDto>> getAttachments(@PathVariable Long id, Authentication authentication) {
if (!canAccessJob(authentication, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(jobMediaService.getAttachments(id));
}
@PostMapping("/{id}/attachments")
public ResponseEntity<JobAttachmentDto> uploadAttachment(@PathVariable Long id,
@RequestParam("file") MultipartFile file,
@RequestParam(name = "remark", required = false) String remark,
Authentication authentication) {
if (!canManageJob(authentication, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(jobMediaService.saveAttachment(id, file, remark));
}
@DeleteMapping("/{id}/attachments/{attachmentId}")
public ResponseEntity<Void> deleteAttachment(@PathVariable Long id,
@PathVariable Long attachmentId,
Authentication authentication) {
if (!canManageJob(authentication, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
jobMediaService.deleteAttachment(id, attachmentId);
return ResponseEntity.ok().build();
}
@GetMapping("/{id}/attachments/content")
public ResponseEntity<ByteArrayResource> downloadAttachment(@PathVariable Long id,
@RequestParam("name") String fileName,
Authentication authentication) {
if (!canAccessJob(authentication, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
byte[] data = jobMediaService.loadAttachment(id, fileName);
return ResponseEntity.ok()
.contentType(Objects.requireNonNull(MediaTypeFactory.getMediaType(fileName).orElse(MediaType.APPLICATION_OCTET_STREAM)))
.header(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition.inline().filename(fileName).build().toString())
.body(new ByteArrayResource(Objects.requireNonNull(data)));
}
@GetMapping("/{id}/photos")
public ResponseEntity<List<JobPhotoDto>> getPhotos(@PathVariable Long id, Authentication authentication) {
if (!canAccessJob(authentication, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(jobMediaService.getPhotos(id));
}
@GetMapping("/{id}/photos/content")
public ResponseEntity<ByteArrayResource> downloadPhoto(@PathVariable Long id,
@RequestParam("name") String fileName,
Authentication authentication) {
if (!canAccessJob(authentication, id)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
byte[] data = jobMediaService.loadPhoto(id, fileName);
return ResponseEntity.ok()
.contentType(Objects.requireNonNull(MediaTypeFactory.getMediaType(fileName).orElse(MediaType.APPLICATION_OCTET_STREAM)))
.header(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition.inline().filename(fileName).build().toString())
.body(new ByteArrayResource(Objects.requireNonNull(data)));
}
private boolean canAccessJob(Authentication authentication, Long jobId) {
UserSessionDto user = accessControlService.sessionUser(authentication);
Job job = jobService.findById(jobId).orElse(null);
return job != null && accessControlService.canAccessJob(user, job);
}
private boolean canManageJob(Authentication authentication, Long jobId) {
UserSessionDto user = accessControlService.sessionUser(authentication);
Job job = jobService.findById(jobId).orElse(null);
return job != null && accessControlService.canAccessJob(user, job) && accessControlService.canManageJobs(user);
}
}

View File

@@ -0,0 +1,137 @@
package de.votian.services.controller;
import de.votian.services.service.LegacyXmlIntegrationService;
import de.votian.services.service.LegacyXmlMetaobjectIntegrationService;
import de.votian.services.service.LegacyXmlOrderDataIntegrationService;
import de.votian.services.service.LegacyXmlOrderRequestIntegrationService;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class LegacyXmlController {
private final LegacyXmlIntegrationService legacyXmlIntegrationService;
private final LegacyXmlMetaobjectIntegrationService legacyXmlMetaobjectIntegrationService;
private final LegacyXmlOrderDataIntegrationService legacyXmlOrderDataIntegrationService;
private final LegacyXmlOrderRequestIntegrationService legacyXmlOrderRequestIntegrationService;
private final de.votian.services.service.LegacyXmlSystemIntegrationService legacyXmlSystemIntegrationService;
public LegacyXmlController(LegacyXmlIntegrationService legacyXmlIntegrationService,
LegacyXmlMetaobjectIntegrationService legacyXmlMetaobjectIntegrationService,
LegacyXmlOrderDataIntegrationService legacyXmlOrderDataIntegrationService,
LegacyXmlOrderRequestIntegrationService legacyXmlOrderRequestIntegrationService,
de.votian.services.service.LegacyXmlSystemIntegrationService legacyXmlSystemIntegrationService) {
this.legacyXmlIntegrationService = legacyXmlIntegrationService;
this.legacyXmlMetaobjectIntegrationService = legacyXmlMetaobjectIntegrationService;
this.legacyXmlOrderDataIntegrationService = legacyXmlOrderDataIntegrationService;
this.legacyXmlOrderRequestIntegrationService = legacyXmlOrderRequestIntegrationService;
this.legacyXmlSystemIntegrationService = legacyXmlSystemIntegrationService;
}
@RequestMapping(
value = "/service/costcenter_request.php",
method = {RequestMethod.GET, RequestMethod.POST},
produces = MediaType.APPLICATION_XML_VALUE
)
public ResponseEntity<String> costcenter(@RequestBody(required = false) String body,
@RequestParam(required = false) String costcenterReq) {
return ResponseEntity.ok(legacyXmlIntegrationService.handleCostcenterRequest(resolveRequest(body, costcenterReq)));
}
@RequestMapping(
value = "/service/customer_request.php",
method = {RequestMethod.GET, RequestMethod.POST},
produces = MediaType.APPLICATION_XML_VALUE
)
public ResponseEntity<String> customer(@RequestBody(required = false) String body,
@RequestParam(required = false) String customerReq) {
return ResponseEntity.ok(legacyXmlSystemIntegrationService.handleCustomerRequest(resolveRequest(body, customerReq)));
}
@RequestMapping(
value = "/service/metaobject_request.php",
method = {RequestMethod.GET, RequestMethod.POST},
produces = MediaType.APPLICATION_XML_VALUE
)
public ResponseEntity<String> metaobject(@RequestBody(required = false) String body,
@RequestParam(required = false) String metaobjectReq) {
return ResponseEntity.ok(legacyXmlMetaobjectIntegrationService.handleMetaobjectRequest(resolveRequest(body, metaobjectReq)));
}
@RequestMapping(
value = "/service/order_data_request.php",
method = {RequestMethod.GET, RequestMethod.POST},
produces = MediaType.APPLICATION_XML_VALUE
)
public ResponseEntity<String> orderData(@RequestBody(required = false) String body,
@RequestParam(required = false) String orderDataReq) {
return ResponseEntity.ok(legacyXmlOrderDataIntegrationService.handleOrderDataRequest(resolveRequest(body, orderDataReq)));
}
@RequestMapping(
value = "/service/order_request.php",
method = {RequestMethod.GET, RequestMethod.POST},
produces = MediaType.APPLICATION_XML_VALUE
)
public ResponseEntity<String> order(@RequestBody(required = false) String body,
@RequestParam(required = false) String orderReq) {
return ResponseEntity.ok(legacyXmlOrderRequestIntegrationService.handleOrderRequest(resolveRequest(body, orderReq)));
}
@RequestMapping(
value = "/service/station_request.php",
method = {RequestMethod.GET, RequestMethod.POST},
produces = MediaType.APPLICATION_XML_VALUE
)
public ResponseEntity<String> station(@RequestBody(required = false) String body,
@RequestParam(required = false) String stationReq,
@RequestParam(required = false) String orderReq) {
return ResponseEntity.ok(legacyXmlOrderRequestIntegrationService.handleStationRequest(
resolveRequest(body, firstNonBlank(stationReq, orderReq))
));
}
@RequestMapping(
value = "/service/zone_request.php",
method = {RequestMethod.GET, RequestMethod.POST},
produces = MediaType.APPLICATION_XML_VALUE
)
public ResponseEntity<String> zone(@RequestBody(required = false) String body,
@RequestParam(required = false) String zoneReq) {
return ResponseEntity.ok(legacyXmlIntegrationService.handleZoneRequest(resolveRequest(body, zoneReq)));
}
@RequestMapping(
value = "/service/price_request.php",
method = {RequestMethod.GET, RequestMethod.POST},
produces = MediaType.APPLICATION_XML_VALUE
)
public ResponseEntity<String> price(@RequestBody(required = false) String body,
@RequestParam(required = false) String priceReq) {
return ResponseEntity.ok(legacyXmlIntegrationService.handlePriceRequest(resolveRequest(body, priceReq)));
}
private String resolveRequest(String body, String requestParam) {
if (requestParam != null && !requestParam.isBlank()) {
return requestParam;
}
return body != null ? body : "";
}
private String firstNonBlank(String... values) {
if (values == null) {
return null;
}
for (String value : values) {
if (value != null && !value.isBlank()) {
return value;
}
}
return null;
}
}

View File

@@ -0,0 +1,87 @@
package de.votian.services.controller;
import de.votian.services.dto.LonghaulDashboardDto;
import de.votian.services.dto.LonghaulJobDetailDto;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.security.AccessControlService;
import de.votian.services.service.LonghaulService;
import de.votian.services.service.LonghaulRemoteDbService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/api/longhaul")
public class LonghaulController {
private final LonghaulService longhaulService;
private final LonghaulRemoteDbService longhaulRemoteDbService;
private final AccessControlService accessControlService;
public LonghaulController(LonghaulService longhaulService,
LonghaulRemoteDbService longhaulRemoteDbService,
AccessControlService accessControlService) {
this.longhaulService = longhaulService;
this.longhaulRemoteDbService = longhaulRemoteDbService;
this.accessControlService = accessControlService;
}
@GetMapping("/dashboard")
public ResponseEntity<LonghaulDashboardDto> getDashboard(@RequestParam Long hqId,
@RequestParam(required = false) Boolean remoteDb,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canViewLonghaul(user) || !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
boolean remoteDbAvailable = accessControlService.canUseLonghaulRemoteDb(user)
&& longhaulRemoteDbService.isConfigured();
if (Boolean.TRUE.equals(remoteDb) && !remoteDbAvailable) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
LonghaulDashboardDto dto = longhaulService.getDashboard(hqId, Boolean.TRUE.equals(remoteDb));
dto.setRemoteDbAvailable(remoteDbAvailable);
return ResponseEntity.ok(dto);
}
@PutMapping("/jobs/{jobId}/return")
public ResponseEntity<Void> returnToHeadquarters(@PathVariable Long jobId,
@RequestParam Long hqId,
@RequestParam(required = false) Boolean remoteDb,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageLonghaul(user) || !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
boolean remoteDbAvailable = accessControlService.canUseLonghaulRemoteDb(user)
&& longhaulRemoteDbService.isConfigured();
if (Boolean.TRUE.equals(remoteDb) && !remoteDbAvailable) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
longhaulService.returnJobToHeadquarters(hqId, jobId, Boolean.TRUE.equals(remoteDb));
return ResponseEntity.ok().build();
}
@GetMapping("/jobs/{jobId}/detail")
public ResponseEntity<LonghaulJobDetailDto> getJobDetail(@PathVariable Long jobId,
@RequestParam Long hqId,
@RequestParam(required = false) Boolean remoteDb,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canViewLonghaul(user) || !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
boolean remoteDbAvailable = accessControlService.canUseLonghaulRemoteDb(user)
&& longhaulRemoteDbService.isConfigured();
if (Boolean.TRUE.equals(remoteDb) && !remoteDbAvailable) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(longhaulService.getJobDetail(hqId, jobId, Boolean.TRUE.equals(remoteDb)));
}
}

View File

@@ -0,0 +1,223 @@
package de.votian.services.controller;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.security.AccessControlService;
import de.votian.services.service.MetaFieldAdminService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/api/meta-admin")
public class MetaFieldAdminController {
private final MetaFieldAdminService metaFieldAdminService;
private final AccessControlService accessControlService;
public MetaFieldAdminController(MetaFieldAdminService metaFieldAdminService,
AccessControlService accessControlService) {
this.metaFieldAdminService = metaFieldAdminService;
this.accessControlService = accessControlService;
}
@GetMapping("/categories")
public ResponseEntity<List<MetaFieldAdminService.CategoryRow>> getCategories(@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(metaFieldAdminService.findCategories(hqId));
}
@PostMapping("/categories")
public ResponseEntity<MetaFieldAdminService.CategoryRow> createCategory(@RequestBody CategoryRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || !isAllowed(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(metaFieldAdminService.createCategory(
request.hqId,
request.mnemonic,
request.description,
request.templateId
));
}
@PutMapping("/categories/{id}")
public ResponseEntity<MetaFieldAdminService.CategoryRow> updateCategory(@PathVariable Long id,
@RequestBody CategoryRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || !isAllowed(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(metaFieldAdminService.updateCategory(
id,
request.hqId,
request.mnemonic,
request.description,
request.templateId
));
}
@GetMapping("/fields")
public ResponseEntity<List<MetaFieldAdminService.FieldRow>> getFields(@RequestParam Long hqId,
@RequestParam(required = false) String filter,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(metaFieldAdminService.findFields(filter));
}
@PostMapping("/fields")
public ResponseEntity<MetaFieldAdminService.FieldRow> createField(@RequestBody FieldRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || !isAllowed(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(metaFieldAdminService.createField(request.type, request.name));
}
@PutMapping("/fields/{id}")
public ResponseEntity<MetaFieldAdminService.FieldRow> updateField(@PathVariable Long id,
@RequestBody FieldRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || !isAllowed(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(metaFieldAdminService.updateField(id, request.type, request.name));
}
@GetMapping("/templates")
public ResponseEntity<List<MetaFieldAdminService.TemplateRow>> getTemplates(@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(metaFieldAdminService.findTemplates());
}
@PostMapping("/templates")
public ResponseEntity<MetaFieldAdminService.TemplateRow> createTemplate(@RequestBody TemplateRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || !isAllowed(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(metaFieldAdminService.createTemplate(request.name, request.content));
}
@PutMapping("/templates/{id}")
public ResponseEntity<MetaFieldAdminService.TemplateRow> updateTemplate(@PathVariable Long id,
@RequestBody TemplateRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || !isAllowed(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(metaFieldAdminService.updateTemplate(id, request.name, request.content));
}
@GetMapping("/categories/{id}/fields")
public ResponseEntity<List<MetaFieldAdminService.CategoryFieldRow>> getCategoryFields(@PathVariable Long id,
@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(metaFieldAdminService.findCategoryFields(id, hqId));
}
@PostMapping("/categories/{id}/fields")
public ResponseEntity<MetaFieldAdminService.CategoryFieldRow> addCategoryField(@PathVariable Long id,
@RequestBody CategoryFieldRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || !isAllowed(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(metaFieldAdminService.addCategoryField(id, request.hqId, request.fieldId));
}
@PutMapping("/categories/{id}/fields/order")
public ResponseEntity<List<MetaFieldAdminService.CategoryFieldRow>> reorderCategoryFields(@PathVariable Long id,
@RequestBody CategoryFieldOrderRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || !isAllowed(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(metaFieldAdminService.reorderCategoryFields(id, request.hqId, request.assignmentIds));
}
@DeleteMapping("/category-fields/{assignmentId}")
public ResponseEntity<Void> deleteCategoryField(@PathVariable Long assignmentId,
@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
metaFieldAdminService.deleteCategoryField(assignmentId, hqId);
return ResponseEntity.ok().build();
}
private boolean isAllowed(UserSessionDto user, Long hqId) {
return accessControlService.canManageMetaFields(user)
&& accessControlService.canAccessHeadquarters(user, hqId);
}
@ExceptionHandler(IllegalArgumentException.class)
public ResponseEntity<String> handleIllegalArgument(IllegalArgumentException exception) {
return ResponseEntity.badRequest().body(exception.getMessage());
}
public static class CategoryRequest {
public Long hqId;
public String mnemonic;
public String description;
public Long templateId;
}
public static class FieldRequest {
public Long hqId;
public String type;
public String name;
}
public static class TemplateRequest {
public Long hqId;
public String name;
public String content;
}
public static class CategoryFieldRequest {
public Long hqId;
public Long fieldId;
}
public static class CategoryFieldOrderRequest {
public Long hqId;
public List<Long> assignmentIds;
}
}

View File

@@ -0,0 +1,34 @@
package de.votian.services.controller;
import de.votian.services.entity.MetaType;
import de.votian.services.repository.MetaTypeRepository;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/api/metatypes")
public class MetaTypeController {
private final MetaTypeRepository metaTypeRepository;
public MetaTypeController(MetaTypeRepository metaTypeRepository) {
this.metaTypeRepository = metaTypeRepository;
}
@GetMapping("/type/{type}")
public ResponseEntity<List<MetaType>> findByType(@PathVariable String type) {
return ResponseEntity.ok(metaTypeRepository.findByTypeOrderBySort(type));
}
@GetMapping("/vehicletypes")
public ResponseEntity<List<MetaType>> getVehicleTypes() {
return ResponseEntity.ok(metaTypeRepository.findByTypeOrderBySort("vehicletype"));
}
@GetMapping("/permanent-types")
public ResponseEntity<List<MetaType>> getPermanentTypes() {
return ResponseEntity.ok(metaTypeRepository.findByTypeOrderBySort("permanent"));
}
}

View File

@@ -0,0 +1,142 @@
package de.votian.services.controller;
import de.votian.services.entity.Parameter;
import de.votian.services.service.ParameterService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("/api/parameters")
public class ParameterController {
private final ParameterService parameterService;
public ParameterController(ParameterService parameterService) {
this.parameterService = parameterService;
}
/**
* Get a single parameter value with PHP-compatible fallback logic.
* Equivalent to PHP getParameterValue($empId, $key, $hqId).
*/
@GetMapping("/value")
public ResponseEntity<String> getValue(@RequestParam String key,
@RequestParam Long hqId,
@RequestParam(required = false, defaultValue = "0") Long empId) {
String value = parameterService.getParameterValue(empId, key, hqId);
if (value.isEmpty()) {
return ResponseEntity.notFound().build();
}
return ResponseEntity.ok(value);
}
/**
* Get a parameter value with automatic fallback to global (hq_id=0).
* Equivalent to the common PHP pattern:
* $val = getParameterValue("0", "KEY", $hq_id);
* if ($val == "") : $val = getParameterValue("0", "KEY", "0"); endif;
*/
@GetMapping("/value-with-fallback")
public ResponseEntity<String> getValueWithFallback(@RequestParam String key,
@RequestParam Long hqId) {
String value = parameterService.getParameterValueWithFallback(key, hqId);
if (value.isEmpty()) {
return ResponseEntity.notFound().build();
}
return ResponseEntity.ok(value);
}
/**
* Get a parameter value with full fallback chain: emp+hq -> emp+0 -> 0+hq -> 0+0.
*/
@GetMapping("/value-full-fallback")
public ResponseEntity<String> getValueFullFallback(@RequestParam String key,
@RequestParam Long hqId,
@RequestParam(required = false, defaultValue = "0") Long empId) {
String value = parameterService.getParameterValueFullFallback(empId, key, hqId);
if (value.isEmpty()) {
return ResponseEntity.notFound().build();
}
return ResponseEntity.ok(value);
}
/**
* Get an object-based parameter value with cascading fallback.
* Equivalent to PHP getObjectBasedParameterValue().
*/
@GetMapping("/value-object-based")
public ResponseEntity<String> getObjectBasedValue(@RequestParam String key,
@RequestParam(required = false) Long objId,
@RequestParam Long hqId,
@RequestParam(required = false, defaultValue = "0") Long empId,
@RequestParam(required = false, defaultValue = "false") boolean noGlobalCheck) {
String value = parameterService.getObjectBasedParameterValue(key, objId, hqId, empId, noGlobalCheck);
if (value.isEmpty()) {
return ResponseEntity.notFound().build();
}
return ResponseEntity.ok(value);
}
/**
* Bulk-load all parameters for a headquarters and employee.
* Equivalent to PHP defineGlobalParameters() but also includes employee-specific overrides.
* Returns a map of key -> value.
*/
@GetMapping("/bulk")
public ResponseEntity<Map<String, String>> bulkLoad(@RequestParam Long hqId,
@RequestParam(required = false, defaultValue = "0") Long empId) {
Map<String, String> params = parameterService.loadAllParameters(hqId, empId);
return ResponseEntity.ok(params);
}
/**
* Get all parameter entries by key (across all headquarters).
*/
@GetMapping("/by-key/{key}")
public ResponseEntity<List<Parameter>> getByKey(@PathVariable String key) {
return ResponseEntity.ok(parameterService.getParametersByKey(key));
}
/**
* Get all parameters matching a key prefix for a specific headquarters.
*/
@GetMapping("/by-prefix")
public ResponseEntity<List<Parameter>> getByPrefix(@RequestParam String prefix,
@RequestParam(required = false) Long hqId) {
if (hqId != null) {
return ResponseEntity.ok(parameterService.getParametersByKeyPrefix(prefix, hqId));
}
return ResponseEntity.ok(parameterService.getParametersByKeyPrefix(prefix));
}
/**
* Create or update a parameter.
*/
@PostMapping
public ResponseEntity<Parameter> save(@RequestBody Parameter parameter) {
return ResponseEntity.ok(parameterService.save(parameter));
}
/**
* Set a parameter value (create or update).
*/
@PutMapping("/set")
public ResponseEntity<Parameter> setValue(@RequestParam String key,
@RequestParam String value,
@RequestParam Long hqId,
@RequestParam(required = false, defaultValue = "0") Long empId) {
return ResponseEntity.ok(parameterService.setParameterValue(key, value, hqId, empId));
}
/**
* Update value of an existing parameter by ID.
*/
@PutMapping("/{id}/value")
public ResponseEntity<Void> updateValue(@PathVariable Long id, @RequestBody String value) {
parameterService.updateValue(id, value);
return ResponseEntity.ok().build();
}
}

View File

@@ -0,0 +1,60 @@
package de.votian.services.controller;
import de.votian.services.dto.PublicHolidayDayDto;
import de.votian.services.dto.PublicHolidayYearDto;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.security.AccessControlService;
import de.votian.services.service.PublicHolidayService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
@RestController
@RequestMapping("/api/public-holidays")
public class PublicHolidayController {
private final PublicHolidayService publicHolidayService;
private final AccessControlService accessControlService;
public PublicHolidayController(PublicHolidayService publicHolidayService,
AccessControlService accessControlService) {
this.publicHolidayService = publicHolidayService;
this.accessControlService = accessControlService;
}
@GetMapping
public ResponseEntity<PublicHolidayYearDto> getYear(@RequestParam Long hqId,
@RequestParam int year,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageHeadquarters(user) || !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(publicHolidayService.getYear(hqId, year));
}
@PutMapping
public ResponseEntity<PublicHolidayYearDto> saveYear(@RequestParam Long hqId,
@RequestParam int year,
@RequestBody PublicHolidayUpdateRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageHeadquarters(user) || !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(publicHolidayService.saveYear(hqId, year, request.days));
}
public static class PublicHolidayUpdateRequest {
public List<PublicHolidayDayDto> days = new ArrayList<>();
}
}

View File

@@ -0,0 +1,230 @@
package de.votian.services.controller;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.security.AccessControlService;
import de.votian.services.service.ReportWorkspaceService;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.http.ContentDisposition;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.time.LocalDate;
import java.util.List;
@RestController
@RequestMapping("/api/report-workspace")
public class ReportWorkspaceController {
private final ReportWorkspaceService reportWorkspaceService;
private final AccessControlService accessControlService;
public ReportWorkspaceController(ReportWorkspaceService reportWorkspaceService,
AccessControlService accessControlService) {
this.reportWorkspaceService = reportWorkspaceService;
this.accessControlService = accessControlService;
}
@GetMapping("/bootstrap")
public ResponseEntity<ReportWorkspaceService.Bootstrap> bootstrap(@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isWorkspaceAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(reportWorkspaceService.bootstrap(user, hqId));
}
@GetMapping("/report-types")
public ResponseEntity<List<ReportWorkspaceService.ReportTypeOption>> reportTypes(@RequestParam Long hqId,
@RequestParam String objectType,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isWorkspaceAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(reportWorkspaceService.findReportTypes(user, hqId, objectType));
}
@GetMapping("/search")
public ResponseEntity<List<ReportWorkspaceService.ObjectOption>> search(@RequestParam Long hqId,
@RequestParam String objectType,
@RequestParam(required = false) String query,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isWorkspaceAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(reportWorkspaceService.searchObjects(user, hqId, objectType, query));
}
@GetMapping("/reports")
public ResponseEntity<List<ReportWorkspaceService.ReportRow>> reports(
@RequestParam Long hqId,
@RequestParam String objectType,
@RequestParam(required = false) Long objectId,
@RequestParam(required = false) Integer reportType,
@RequestParam(required = false) String search,
@RequestParam(required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate from,
@RequestParam(required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate to,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isWorkspaceAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(reportWorkspaceService.findReports(user, hqId, objectType, objectId, from, to, reportType, search));
}
@PostMapping("/reports")
public ResponseEntity<ReportWorkspaceService.ReportRow> createReport(@RequestBody ReportRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || !isWorkspaceAllowed(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(reportWorkspaceService.createReport(
user,
request.hqId,
request.objectType,
request.objectId,
request.reportType,
request.text,
request.confidential
));
}
@PutMapping("/reports/{id}")
public ResponseEntity<ReportWorkspaceService.ReportRow> updateReport(@PathVariable Long id,
@RequestBody ReportRequest request,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (request == null || !isWorkspaceAllowed(user, request.hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(reportWorkspaceService.updateReport(
user,
request.hqId,
id,
request.reportType,
request.text,
request.confidential
));
}
@DeleteMapping("/reports/{id}")
public ResponseEntity<Void> deleteReport(@PathVariable Long id,
@RequestParam Long hqId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isWorkspaceAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
reportWorkspaceService.deleteReport(user, hqId, id);
return ResponseEntity.ok().build();
}
@GetMapping("/statistics")
public ResponseEntity<List<ReportWorkspaceService.StatisticRow>> statistics(
@RequestParam Long hqId,
@RequestParam String objectType,
@RequestParam(required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate from,
@RequestParam(required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate to,
@RequestParam(defaultValue = "false") boolean splitByReportType,
@RequestParam(defaultValue = "false") boolean splitByCustomerType,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isWorkspaceAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(reportWorkspaceService.statistics(
user,
hqId,
objectType,
from,
to,
splitByReportType,
splitByCustomerType
));
}
@GetMapping("/export/history")
public ResponseEntity<byte[]> exportHistory(
@RequestParam Long hqId,
@RequestParam String objectType,
@RequestParam(required = false) Long objectId,
@RequestParam(required = false) Integer reportType,
@RequestParam(required = false) String search,
@RequestParam(required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate from,
@RequestParam(required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate to,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isWorkspaceAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
byte[] data = reportWorkspaceService.exportHistoryCsv(user, hqId, objectType, objectId, from, to, reportType, search);
return csvResponse(data, "berichte.csv");
}
@GetMapping("/export/statistics")
public ResponseEntity<byte[]> exportStatistics(
@RequestParam Long hqId,
@RequestParam String objectType,
@RequestParam(required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate from,
@RequestParam(required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate to,
@RequestParam(defaultValue = "false") boolean splitByReportType,
@RequestParam(defaultValue = "false") boolean splitByCustomerType,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!isWorkspaceAllowed(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
byte[] data = reportWorkspaceService.exportStatisticsCsv(
user,
hqId,
objectType,
from,
to,
splitByReportType,
splitByCustomerType
);
return csvResponse(data, "berichtsstatistik.csv");
}
private boolean isWorkspaceAllowed(UserSessionDto user, Long hqId) {
return accessControlService.canViewReports(user)
&& accessControlService.canAccessHeadquarters(user, hqId);
}
private ResponseEntity<byte[]> csvResponse(byte[] data, String filename) {
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.parseMediaType("text/csv;charset=UTF-8"));
headers.setContentDisposition(ContentDisposition.attachment().filename(filename).build());
return new ResponseEntity<>(data, headers, HttpStatus.OK);
}
@ExceptionHandler(IllegalArgumentException.class)
public ResponseEntity<String> handleIllegalArgument(IllegalArgumentException exception) {
return ResponseEntity.badRequest().body(exception.getMessage());
}
public static class ReportRequest {
public Long hqId;
public String objectType;
public Long objectId;
public Integer reportType;
public String text;
public boolean confidential;
}
}

View File

@@ -0,0 +1,54 @@
package de.votian.services.controller;
import de.votian.services.dto.StatisticsSummaryDto;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.security.AccessControlService;
import de.votian.services.service.ViewDataService;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.time.LocalDate;
@RestController
@RequestMapping("/api/reporting")
public class ReportingController {
private final ViewDataService viewDataService;
private final AccessControlService accessControlService;
public ReportingController(ViewDataService viewDataService,
AccessControlService accessControlService) {
this.viewDataService = viewDataService;
this.accessControlService = accessControlService;
}
@GetMapping("/statistics")
public ResponseEntity<StatisticsSummaryDto> statistics(
@RequestParam Long hqId,
@RequestParam(required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate from,
@RequestParam(required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate to,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canViewStatistics(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
if (accessControlService.isCustomerUser(user)) {
return ResponseEntity.ok(viewDataService.buildStatisticsSummaryForCostCenters(
user.getHeadquartersId(),
user.getAccessibleCostCenterIds(),
from,
to
));
}
if (!accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(viewDataService.buildStatisticsSummary(hqId, from, to));
}
}

View File

@@ -0,0 +1,37 @@
package de.votian.services.controller;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.entity.AppRight;
import de.votian.services.repository.AppRightRepository;
import de.votian.services.security.AccessControlService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/api/rights")
public class RightsController {
private final AppRightRepository appRightRepository;
private final AccessControlService accessControlService;
public RightsController(AppRightRepository appRightRepository,
AccessControlService accessControlService) {
this.appRightRepository = appRightRepository;
this.accessControlService = accessControlService;
}
@GetMapping
public ResponseEntity<List<AppRight>> findAll(Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManageEmployeeMatrixRights(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(appRightRepository.findAllByOrderByIdAsc());
}
}

View File

@@ -0,0 +1,87 @@
package de.votian.services.controller;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.entity.Courier;
import de.votian.services.entity.CourierVehicle;
import de.votian.services.entity.Customer;
import de.votian.services.entity.Job;
import de.votian.services.repository.CourierVehicleRepository;
import de.votian.services.security.AccessControlService;
import de.votian.services.service.CourierService;
import de.votian.services.service.CustomerService;
import de.votian.services.service.JobService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("/api/search")
public class SearchController {
private final CustomerService customerService;
private final CourierService courierService;
private final JobService jobService;
private final CourierVehicleRepository courierVehicleRepository;
private final AccessControlService accessControlService;
public SearchController(CustomerService customerService,
CourierService courierService,
JobService jobService,
CourierVehicleRepository courierVehicleRepository,
AccessControlService accessControlService) {
this.customerService = customerService;
this.courierService = courierService;
this.jobService = jobService;
this.courierVehicleRepository = courierVehicleRepository;
this.accessControlService = accessControlService;
}
@GetMapping
public ResponseEntity<Map<String, Object>> globalSearch(@RequestParam String term,
@RequestParam Long hqId,
@RequestParam(required = false) String type,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
Map<String, Object> results = new HashMap<>();
if ((type == null || "customer".equals(type)) && accessControlService.canViewCustomers(user)) {
List<Customer> customers = customerService.search(hqId, term);
results.put("customers", customers);
}
if ((type == null || "courier".equals(type)) && accessControlService.canViewCouriers(user)) {
List<Courier> couriers = courierService.search(hqId, term);
results.put("couriers", couriers);
}
if ((type == null || "job".equals(type)) && accessControlService.canViewJobs(user)) {
try {
Long jobId = Long.parseLong(term);
jobService.findById(jobId)
.filter(job -> accessControlService.canAccessJob(user, job))
.ifPresent(job -> results.put("jobs", List.of(job)));
} catch (NumberFormatException e) {
List<Job> jobs = jobService.findByCommissionNoAndCustomer(term, null).stream()
.filter(job -> accessControlService.canAccessJob(user, job))
.toList();
results.put("jobs", jobs);
}
}
if ((type == null || "vehicle".equals(type)) && accessControlService.canViewCouriers(user)) {
List<CourierVehicle> vehicles = courierVehicleRepository.searchBySidAndHq(hqId, term);
results.put("vehicles", vehicles);
}
return ResponseEntity.ok(results);
}
}

View File

@@ -0,0 +1,181 @@
package de.votian.services.controller;
import de.votian.services.dto.ServicePriceRowDto;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.entity.ServiceEntity;
import de.votian.services.entity.ServiceHistory;
import de.votian.services.entity.ServiceType;
import de.votian.services.repository.ServiceEntityRepository;
import de.votian.services.repository.ServiceHistoryRepository;
import de.votian.services.repository.ServiceTypeRepository;
import de.votian.services.security.AccessControlService;
import de.votian.services.service.ViewDataService;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDate;
import java.time.LocalTime;
import java.util.List;
import java.util.Objects;
@RestController
@RequestMapping("/api/services")
public class ServiceController {
private final ServiceEntityRepository serviceRepository;
private final ServiceTypeRepository serviceTypeRepository;
private final ServiceHistoryRepository serviceHistoryRepository;
private final ViewDataService viewDataService;
private final AccessControlService accessControlService;
public ServiceController(ServiceEntityRepository serviceRepository,
ServiceTypeRepository serviceTypeRepository,
ServiceHistoryRepository serviceHistoryRepository,
ViewDataService viewDataService,
AccessControlService accessControlService) {
this.serviceRepository = serviceRepository;
this.serviceTypeRepository = serviceTypeRepository;
this.serviceHistoryRepository = serviceHistoryRepository;
this.viewDataService = viewDataService;
this.accessControlService = accessControlService;
}
@GetMapping("/hq/{hqId}")
public ResponseEntity<List<ServiceEntity>> findByHq(@PathVariable Long hqId, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManagePricing(user) || !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(serviceRepository.findByHeadquartersId(hqId));
}
@GetMapping("/types/hq/{hqId}")
public ResponseEntity<List<ServiceType>> findTypesByHq(@PathVariable Long hqId, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManagePricing(user) || !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(serviceTypeRepository.findByHeadquartersId(hqId));
}
@GetMapping("/price")
public ResponseEntity<ServiceHistory> getPrice(@RequestParam Long serviceId,
@RequestParam Long customerId,
@RequestParam Long hqId,
@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManagePricing(user) || !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return serviceHistoryRepository.findLatestPrice(serviceId, customerId, hqId, date.atTime(LocalTime.MAX))
.map(ResponseEntity::ok)
.orElse(ResponseEntity.notFound().build());
}
@GetMapping("/prices")
public ResponseEntity<List<ServicePriceRowDto>> getPrices(@RequestParam Long hqId,
@RequestParam(required = false) Long customerId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canManagePricing(user) || !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(viewDataService.findServicePrices(hqId, customerId));
}
@PostMapping("/entity")
public ResponseEntity<ServiceEntity> createService(@RequestBody ServiceEntity serviceEntity, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (serviceEntity == null
|| !accessControlService.canManagePricing(user)
|| !accessControlService.canAccessHeadquarters(user, serviceEntity.getHeadquartersId())) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(serviceRepository.save(serviceEntity));
}
@PutMapping("/entity/{id}")
public ResponseEntity<ServiceEntity> updateService(@PathVariable Long id,
@RequestBody ServiceEntity updates,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
return serviceRepository.findById(Objects.requireNonNull(id))
.map(existing -> {
if (!accessControlService.canManagePricing(user)
|| !accessControlService.canAccessHeadquarters(user, existing.getHeadquartersId())) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).<ServiceEntity>build();
}
if (updates.getName() != null) {
existing.setName(updates.getName());
}
if (updates.getMode() != null) {
existing.setMode(updates.getMode());
}
if (updates.getServiceTypeId() != null) {
existing.setServiceTypeId(updates.getServiceTypeId());
}
if (updates.getHeadquartersId() != null) {
existing.setHeadquartersId(updates.getHeadquartersId());
}
if (updates.getCustomerId() != null) {
existing.setCustomerId(updates.getCustomerId());
}
return ResponseEntity.ok(serviceRepository.save(existing));
})
.orElse(ResponseEntity.notFound().build());
}
@PostMapping("/types")
public ResponseEntity<ServiceType> createServiceType(@RequestBody ServiceType serviceType, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (serviceType == null
|| !accessControlService.canManagePricing(user)
|| !accessControlService.canAccessHeadquarters(user, serviceType.getHeadquartersId())) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(serviceTypeRepository.save(serviceType));
}
@PutMapping("/types/{id}")
public ResponseEntity<ServiceType> updateServiceType(@PathVariable Long id,
@RequestBody ServiceType updates,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
return serviceTypeRepository.findById(Objects.requireNonNull(id))
.map(existing -> {
if (!accessControlService.canManagePricing(user)
|| !accessControlService.canAccessHeadquarters(user, existing.getHeadquartersId())) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).<ServiceType>build();
}
if (updates.getName() != null) {
existing.setName(updates.getName());
}
if (updates.getMode() != null) {
existing.setMode(updates.getMode());
}
if (updates.getHeadquartersId() != null) {
existing.setHeadquartersId(updates.getHeadquartersId());
}
if (updates.getCustomerId() != null) {
existing.setCustomerId(updates.getCustomerId());
}
return ResponseEntity.ok(serviceTypeRepository.save(existing));
})
.orElse(ResponseEntity.notFound().build());
}
@PostMapping("/history")
public ResponseEntity<ServiceHistory> savePriceHistory(@RequestBody ServiceHistory history, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (history == null
|| !accessControlService.canManagePricing(user)
|| !accessControlService.canAccessHeadquarters(user, history.getHeadquartersId())) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(serviceHistoryRepository.save(history));
}
}

View File

@@ -0,0 +1,66 @@
package de.votian.services.controller;
import de.votian.services.dto.TrackingDashboardDto;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.security.AccessControlService;
import de.votian.services.service.TrackingService;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.time.LocalDate;
import java.util.List;
@RestController
@RequestMapping("/api/tracking")
public class TrackingController {
private final TrackingService trackingService;
private final AccessControlService accessControlService;
public TrackingController(TrackingService trackingService,
AccessControlService accessControlService) {
this.trackingService = trackingService;
this.accessControlService = accessControlService;
}
@GetMapping("/dashboard")
public ResponseEntity<TrackingDashboardDto> getDashboard(@RequestParam Long hqId,
@RequestParam(required = false)
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
LocalDate day,
@RequestParam(required = false) Boolean includeCompleted,
@RequestParam(required = false) Long customerId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canViewTracking(user) || !accessControlService.canAccessHeadquarters(user, hqId)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
Long effectiveCustomerId = customerId;
List<Long> accessibleCostCenterIds = null;
if (accessControlService.isCustomerUser(user)) {
if (user.getCustomerId() == null) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
if (customerId != null && !customerId.equals(user.getCustomerId())) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
effectiveCustomerId = user.getCustomerId();
accessibleCostCenterIds = user.getAccessibleCostCenterIds();
}
return ResponseEntity.ok(trackingService.getDashboard(
hqId,
day,
Boolean.TRUE.equals(includeCompleted),
effectiveCustomerId,
accessibleCostCenterIds
));
}
}

View File

@@ -0,0 +1,75 @@
package de.votian.services.controller;
import de.votian.services.entity.User;
import de.votian.services.service.UserService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/api/users")
public class UserController {
private final UserService userService;
public UserController(UserService userService) {
this.userService = userService;
}
@GetMapping("/{id}")
public ResponseEntity<User> findById(@PathVariable Long id) {
return userService.findById(id)
.map(ResponseEntity::ok)
.orElse(ResponseEntity.notFound().build());
}
@GetMapping("/account/{account}")
public ResponseEntity<User> findByAccount(@PathVariable String account) {
return userService.findByAccount(account)
.map(ResponseEntity::ok)
.orElse(ResponseEntity.notFound().build());
}
@GetMapping("/email/{email}")
public ResponseEntity<List<User>> findByEmail(@PathVariable String email) {
return ResponseEntity.ok(userService.findByEmail(email));
}
@GetMapping("/account-unique/{account}")
public ResponseEntity<Boolean> isAccountUnique(@PathVariable String account,
@RequestParam(required = false) Long excludeId) {
if (excludeId != null) {
return ResponseEntity.ok(userService.isAccountUniqueExcluding(account, excludeId));
}
return ResponseEntity.ok(userService.isAccountUnique(account));
}
@PostMapping
public ResponseEntity<User> save(@RequestBody User user) {
return ResponseEntity.ok(userService.save(user));
}
@PutMapping("/{id}/password")
public ResponseEntity<Void> changePassword(@PathVariable Long id, @RequestBody String passwordHash) {
userService.changePassword(id, passwordHash);
return ResponseEntity.ok().build();
}
@DeleteMapping("/{id}/password")
public ResponseEntity<Void> clearPassword(@PathVariable Long id) {
userService.clearPassword(id);
return ResponseEntity.ok().build();
}
@PutMapping("/{id}/totp-session")
public ResponseEntity<Void> setTotpSessionKey(@PathVariable Long id, @RequestBody String sessionKey) {
userService.setTotpSessionKey(id, sessionKey);
return ResponseEntity.ok().build();
}
@GetMapping("/birthdays-today")
public ResponseEntity<List<Object[]>> getBirthdaysToday() {
return ResponseEntity.ok(userService.getBirthdaysToday());
}
}

View File

@@ -0,0 +1,117 @@
package de.votian.services.controller;
import de.votian.services.dto.UserSessionDto;
import de.votian.services.dto.WarehouseArticleOptionDto;
import de.votian.services.dto.WarehouseBootstrapDto;
import de.votian.services.dto.WarehouseInventoryRowDto;
import de.votian.services.dto.WarehouseJournalEntryDto;
import de.votian.services.dto.WarehouseMoveRequest;
import de.votian.services.dto.WarehouseSerialItemDto;
import de.votian.services.dto.WarehouseStockNodeDto;
import de.votian.services.security.AccessControlService;
import de.votian.services.service.WarehouseService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.time.LocalDate;
import java.util.List;
@RestController
@RequestMapping("/api/warehouse")
public class WarehouseController {
private final WarehouseService warehouseService;
private final AccessControlService accessControlService;
public WarehouseController(WarehouseService warehouseService, AccessControlService accessControlService) {
this.warehouseService = warehouseService;
this.accessControlService = accessControlService;
}
@GetMapping("/bootstrap")
public ResponseEntity<WarehouseBootstrapDto> bootstrap(Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canViewWarehouse(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(warehouseService.loadBootstrap(user));
}
@GetMapping("/stocks")
public ResponseEntity<List<WarehouseStockNodeDto>> stocks(@RequestParam Long rootStockId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canViewWarehouse(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(warehouseService.loadStocks(user, rootStockId));
}
@GetMapping("/articles")
public ResponseEntity<List<WarehouseArticleOptionDto>> articles(@RequestParam(required = false) Long rootStockId,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canViewWarehouse(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(warehouseService.loadArticleOptions(user, rootStockId));
}
@GetMapping("/inventory")
public ResponseEntity<List<WarehouseInventoryRowDto>> inventory(@RequestParam Long stockId,
@RequestParam(defaultValue = "true") boolean includeSubstocks,
@RequestParam(required = false) String search,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canViewWarehouse(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(warehouseService.loadInventory(user, stockId, includeSubstocks, search));
}
@GetMapping("/serials")
public ResponseEntity<List<WarehouseSerialItemDto>> serials(@RequestParam Long stockId,
@RequestParam(defaultValue = "true") boolean includeSubstocks,
@RequestParam Long articleId,
@RequestParam(required = false) String search,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canViewWarehouse(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(warehouseService.loadSerialItems(user, stockId, includeSubstocks, articleId, search));
}
@GetMapping("/journal")
public ResponseEntity<List<WarehouseJournalEntryDto>> journal(@RequestParam Long rootStockId,
@RequestParam(required = false) Long stockFromId,
@RequestParam(required = false) Long stockToId,
@RequestParam(required = false) Long articleId,
@RequestParam(required = false) LocalDate from,
@RequestParam(required = false) LocalDate to,
@RequestParam(required = false) String search,
Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canViewWarehouse(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
return ResponseEntity.ok(warehouseService.loadJournal(user, rootStockId, stockFromId, stockToId, articleId, from, to, search));
}
@PostMapping("/moves")
public ResponseEntity<Void> move(@RequestBody WarehouseMoveRequest request, Authentication authentication) {
UserSessionDto user = accessControlService.sessionUser(authentication);
if (!accessControlService.canViewWarehouse(user)) {
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
warehouseService.moveArticle(user, request);
return ResponseEntity.ok().build();
}
}

View File

@@ -0,0 +1,44 @@
package de.votian.services.dto;
import java.util.ArrayList;
import java.util.List;
public class AcceptanceProtocolDto {
private Integer serviceKey;
private String serviceLabel;
private String text;
private List<AcceptanceProtocolQuestionDto> questions = new ArrayList<>();
public Integer getServiceKey() {
return serviceKey;
}
public void setServiceKey(Integer serviceKey) {
this.serviceKey = serviceKey;
}
public String getServiceLabel() {
return serviceLabel;
}
public void setServiceLabel(String serviceLabel) {
this.serviceLabel = serviceLabel;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public List<AcceptanceProtocolQuestionDto> getQuestions() {
return questions;
}
public void setQuestions(List<AcceptanceProtocolQuestionDto> questions) {
this.questions = questions;
}
}

View File

@@ -0,0 +1,32 @@
package de.votian.services.dto;
public class AcceptanceProtocolQuestionDto {
private Integer sort;
private String question;
private String mailState;
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public String getQuestion() {
return question;
}
public void setQuestion(String question) {
this.question = question;
}
public String getMailState() {
return mailState;
}
public void setMailState(String mailState) {
this.mailState = mailState;
}
}

View File

@@ -0,0 +1,31 @@
package de.votian.services.dto;
public class AppointmentCategoryOptionDto {
private Integer value;
private String label;
public AppointmentCategoryOptionDto() {
}
public AppointmentCategoryOptionDto(Integer value, String label) {
this.value = value;
this.label = label;
}
public Integer getValue() {
return value;
}
public void setValue(Integer value) {
this.value = value;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
}

View File

@@ -0,0 +1,35 @@
package de.votian.services.dto;
import java.util.ArrayList;
import java.util.List;
public class AppointmentGroupOptionDto {
private Long id;
private String name;
private List<Long> memberUserIds = new ArrayList<>();
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List<Long> getMemberUserIds() {
return memberUserIds;
}
public void setMemberUserIds(List<Long> memberUserIds) {
this.memberUserIds = memberUserIds != null ? new ArrayList<>(memberUserIds) : new ArrayList<>();
}
}

View File

@@ -0,0 +1,62 @@
package de.votian.services.dto;
import java.util.ArrayList;
import java.util.List;
public class AppointmentParticipantOptionDto {
private Long userId;
private Long employeeId;
private String name;
private String email;
private String headquartersMnemonic;
private List<Long> groupIds = new ArrayList<>();
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Long getEmployeeId() {
return employeeId;
}
public void setEmployeeId(Long employeeId) {
this.employeeId = employeeId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getHeadquartersMnemonic() {
return headquartersMnemonic;
}
public void setHeadquartersMnemonic(String headquartersMnemonic) {
this.headquartersMnemonic = headquartersMnemonic;
}
public List<Long> getGroupIds() {
return groupIds;
}
public void setGroupIds(List<Long> groupIds) {
this.groupIds = groupIds != null ? new ArrayList<>(groupIds) : new ArrayList<>();
}
}

View File

@@ -0,0 +1,41 @@
package de.votian.services.dto;
public class AppointmentParticipantStateDto {
private Long userId;
private String name;
private String email;
private boolean confirmed;
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public boolean isConfirmed() {
return confirmed;
}
public void setConfirmed(boolean confirmed) {
this.confirmed = confirmed;
}
}

View File

@@ -0,0 +1,23 @@
package de.votian.services.dto;
public class AuthLoginRequest {
private String account;
private String password;
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}

View File

@@ -0,0 +1,50 @@
package de.votian.services.dto;
public class AuthResponse {
private boolean authenticated;
private boolean requiresTotp;
private String pendingToken;
private String authToken;
private UserSessionDto user;
public boolean isAuthenticated() {
return authenticated;
}
public void setAuthenticated(boolean authenticated) {
this.authenticated = authenticated;
}
public boolean isRequiresTotp() {
return requiresTotp;
}
public void setRequiresTotp(boolean requiresTotp) {
this.requiresTotp = requiresTotp;
}
public String getPendingToken() {
return pendingToken;
}
public void setPendingToken(String pendingToken) {
this.pendingToken = pendingToken;
}
public String getAuthToken() {
return authToken;
}
public void setAuthToken(String authToken) {
this.authToken = authToken;
}
public UserSessionDto getUser() {
return user;
}
public void setUser(UserSessionDto user) {
this.user = user;
}
}

View File

@@ -0,0 +1,23 @@
package de.votian.services.dto;
public class AuthTotpRequest {
private String pendingToken;
private String code;
public String getPendingToken() {
return pendingToken;
}
public void setPendingToken(String pendingToken) {
this.pendingToken = pendingToken;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
}

View File

@@ -0,0 +1,41 @@
package de.votian.services.dto;
public class CatalogOptionDto {
private Long id;
private String name;
private Integer mode;
public CatalogOptionDto() {
}
public CatalogOptionDto(Long id, String name, Integer mode) {
this.id = id;
this.name = name;
this.mode = mode;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getMode() {
return mode;
}
public void setMode(Integer mode) {
this.mode = mode;
}
}

View File

@@ -0,0 +1,23 @@
package de.votian.services.dto;
public class ChangePasswordRequest {
private String currentPassword;
private String newPassword;
public String getCurrentPassword() {
return currentPassword;
}
public void setCurrentPassword(String currentPassword) {
this.currentPassword = currentPassword;
}
public String getNewPassword() {
return newPassword;
}
public void setNewPassword(String newPassword) {
this.newPassword = newPassword;
}
}

View File

@@ -0,0 +1,295 @@
package de.votian.services.dto;
import java.time.LocalDate;
public class CourierDetailDto {
private Long id;
private Long headquartersId;
private String eid;
private String sid;
private String available;
private Integer vehicleTypeId;
private String companyName;
private String companyName2;
private String hsno;
private String street;
private String zipcode;
private String city;
private String iln;
private String taxIdNo;
private String group;
private String filter;
private String account;
private String name;
private String firstname;
private String email;
private String phone;
private String phone2;
private String fax;
private LocalDate birthdate;
private String country;
private String mobilePda;
private String locationZipcode;
private Double gpsLongitude;
private Double gpsLatitude;
private java.time.LocalDateTime gpsTime;
private Integer gpsType;
private java.time.LocalDateTime availableTime;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getHeadquartersId() {
return headquartersId;
}
public void setHeadquartersId(Long headquartersId) {
this.headquartersId = headquartersId;
}
public String getEid() {
return eid;
}
public void setEid(String eid) {
this.eid = eid;
}
public String getSid() {
return sid;
}
public void setSid(String sid) {
this.sid = sid;
}
public String getAvailable() {
return available;
}
public void setAvailable(String available) {
this.available = available;
}
public Integer getVehicleTypeId() {
return vehicleTypeId;
}
public void setVehicleTypeId(Integer vehicleTypeId) {
this.vehicleTypeId = vehicleTypeId;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getCompanyName2() {
return companyName2;
}
public void setCompanyName2(String companyName2) {
this.companyName2 = companyName2;
}
public String getHsno() {
return hsno;
}
public void setHsno(String hsno) {
this.hsno = hsno;
}
public String getStreet() {
return street;
}
public void setStreet(String street) {
this.street = street;
}
public String getZipcode() {
return zipcode;
}
public void setZipcode(String zipcode) {
this.zipcode = zipcode;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getIln() {
return iln;
}
public void setIln(String iln) {
this.iln = iln;
}
public String getTaxIdNo() {
return taxIdNo;
}
public void setTaxIdNo(String taxIdNo) {
this.taxIdNo = taxIdNo;
}
public String getGroup() {
return group;
}
public void setGroup(String group) {
this.group = group;
}
public String getFilter() {
return filter;
}
public void setFilter(String filter) {
this.filter = filter;
}
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getFirstname() {
return firstname;
}
public void setFirstname(String firstname) {
this.firstname = firstname;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getPhone2() {
return phone2;
}
public void setPhone2(String phone2) {
this.phone2 = phone2;
}
public String getFax() {
return fax;
}
public void setFax(String fax) {
this.fax = fax;
}
public LocalDate getBirthdate() {
return birthdate;
}
public void setBirthdate(LocalDate birthdate) {
this.birthdate = birthdate;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public String getMobilePda() {
return mobilePda;
}
public void setMobilePda(String mobilePda) {
this.mobilePda = mobilePda;
}
public String getLocationZipcode() {
return locationZipcode;
}
public void setLocationZipcode(String locationZipcode) {
this.locationZipcode = locationZipcode;
}
public Double getGpsLongitude() {
return gpsLongitude;
}
public void setGpsLongitude(Double gpsLongitude) {
this.gpsLongitude = gpsLongitude;
}
public Double getGpsLatitude() {
return gpsLatitude;
}
public void setGpsLatitude(Double gpsLatitude) {
this.gpsLatitude = gpsLatitude;
}
public java.time.LocalDateTime getGpsTime() {
return gpsTime;
}
public void setGpsTime(java.time.LocalDateTime gpsTime) {
this.gpsTime = gpsTime;
}
public Integer getGpsType() {
return gpsType;
}
public void setGpsType(Integer gpsType) {
this.gpsType = gpsType;
}
public java.time.LocalDateTime getAvailableTime() {
return availableTime;
}
public void setAvailableTime(java.time.LocalDateTime availableTime) {
this.availableTime = availableTime;
}
}

View File

@@ -0,0 +1,59 @@
package de.votian.services.dto;
public class CourierListItemDto {
private Long id;
private String eid;
private String sid;
private String companyName;
private String contact;
private String available;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getEid() {
return eid;
}
public void setEid(String eid) {
this.eid = eid;
}
public String getSid() {
return sid;
}
public void setSid(String sid) {
this.sid = sid;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getContact() {
return contact;
}
public void setContact(String contact) {
this.contact = contact;
}
public String getAvailable() {
return available;
}
public void setAvailable(String available) {
this.available = available;
}
}

View File

@@ -0,0 +1,26 @@
package de.votian.services.dto;
import java.util.ArrayList;
import java.util.List;
public class CustomerAcceptanceProtocolConfigDto {
private Long customerId;
private List<AcceptanceProtocolDto> protocols = new ArrayList<>();
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public List<AcceptanceProtocolDto> getProtocols() {
return protocols;
}
public void setProtocols(List<AcceptanceProtocolDto> protocols) {
this.protocols = protocols;
}
}

View File

@@ -0,0 +1,26 @@
package de.votian.services.dto;
import java.util.ArrayList;
import java.util.List;
public class CustomerDeliveryReasonConfigDto {
private Long customerId;
private List<DeliveryReasonListDto> lists = new ArrayList<>();
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public List<DeliveryReasonListDto> getLists() {
return lists;
}
public void setLists(List<DeliveryReasonListDto> lists) {
this.lists = lists;
}
}

View File

@@ -0,0 +1,250 @@
package de.votian.services.dto;
import java.math.BigDecimal;
public class CustomerDetailDto {
private Long id;
private Long headquartersId;
private String eid;
private BigDecimal discount;
private BigDecimal markup;
private String group;
private String filter;
private String commissionNo;
private String companyName;
private String companyName2;
private String companyName3;
private String companyName4;
private String hsno;
private String street;
private String zipcode;
private String city;
private String iln;
private String taxIdNo;
private String staxIdNo;
private String account;
private String name;
private String firstname;
private String email;
private String phone;
private String phone2;
private String fax;
private String tracking;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getHeadquartersId() {
return headquartersId;
}
public void setHeadquartersId(Long headquartersId) {
this.headquartersId = headquartersId;
}
public String getEid() {
return eid;
}
public void setEid(String eid) {
this.eid = eid;
}
public BigDecimal getDiscount() {
return discount;
}
public void setDiscount(BigDecimal discount) {
this.discount = discount;
}
public BigDecimal getMarkup() {
return markup;
}
public void setMarkup(BigDecimal markup) {
this.markup = markup;
}
public String getGroup() {
return group;
}
public void setGroup(String group) {
this.group = group;
}
public String getFilter() {
return filter;
}
public void setFilter(String filter) {
this.filter = filter;
}
public String getCommissionNo() {
return commissionNo;
}
public void setCommissionNo(String commissionNo) {
this.commissionNo = commissionNo;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getCompanyName2() {
return companyName2;
}
public void setCompanyName2(String companyName2) {
this.companyName2 = companyName2;
}
public String getCompanyName3() {
return companyName3;
}
public void setCompanyName3(String companyName3) {
this.companyName3 = companyName3;
}
public String getCompanyName4() {
return companyName4;
}
public void setCompanyName4(String companyName4) {
this.companyName4 = companyName4;
}
public String getHsno() {
return hsno;
}
public void setHsno(String hsno) {
this.hsno = hsno;
}
public String getStreet() {
return street;
}
public void setStreet(String street) {
this.street = street;
}
public String getZipcode() {
return zipcode;
}
public void setZipcode(String zipcode) {
this.zipcode = zipcode;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getIln() {
return iln;
}
public void setIln(String iln) {
this.iln = iln;
}
public String getTaxIdNo() {
return taxIdNo;
}
public void setTaxIdNo(String taxIdNo) {
this.taxIdNo = taxIdNo;
}
public String getStaxIdNo() {
return staxIdNo;
}
public void setStaxIdNo(String staxIdNo) {
this.staxIdNo = staxIdNo;
}
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getFirstname() {
return firstname;
}
public void setFirstname(String firstname) {
this.firstname = firstname;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getPhone2() {
return phone2;
}
public void setPhone2(String phone2) {
this.phone2 = phone2;
}
public String getFax() {
return fax;
}
public void setFax(String fax) {
this.fax = fax;
}
public String getTracking() {
return tracking;
}
public void setTracking(String tracking) {
this.tracking = tracking;
}
}

View File

@@ -0,0 +1,59 @@
package de.votian.services.dto;
public class CustomerListItemDto {
private Long id;
private String eid;
private String companyName;
private String contact;
private String email;
private String phone;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getEid() {
return eid;
}
public void setEid(String eid) {
this.eid = eid;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getContact() {
return contact;
}
public void setContact(String contact) {
this.contact = contact;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
}

View File

@@ -0,0 +1,62 @@
package de.votian.services.dto;
import java.util.ArrayList;
import java.util.List;
public class CustomerServiceConfigDto {
private Long customerId;
private Long headquartersId;
private List<CatalogOptionDto> availableServices = new ArrayList<>();
private List<Long> selectedServiceIds = new ArrayList<>();
private List<CatalogOptionDto> availableServiceTypes = new ArrayList<>();
private List<Long> selectedServiceTypeIds = new ArrayList<>();
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public Long getHeadquartersId() {
return headquartersId;
}
public void setHeadquartersId(Long headquartersId) {
this.headquartersId = headquartersId;
}
public List<CatalogOptionDto> getAvailableServices() {
return availableServices;
}
public void setAvailableServices(List<CatalogOptionDto> availableServices) {
this.availableServices = availableServices;
}
public List<Long> getSelectedServiceIds() {
return selectedServiceIds;
}
public void setSelectedServiceIds(List<Long> selectedServiceIds) {
this.selectedServiceIds = selectedServiceIds;
}
public List<CatalogOptionDto> getAvailableServiceTypes() {
return availableServiceTypes;
}
public void setAvailableServiceTypes(List<CatalogOptionDto> availableServiceTypes) {
this.availableServiceTypes = availableServiceTypes;
}
public List<Long> getSelectedServiceTypeIds() {
return selectedServiceTypeIds;
}
public void setSelectedServiceTypeIds(List<Long> selectedServiceTypeIds) {
this.selectedServiceTypeIds = selectedServiceTypeIds;
}
}

View File

@@ -0,0 +1,32 @@
package de.votian.services.dto;
public class DeliveryReasonItemDto {
private Integer sort;
private String code;
private String reason;
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason;
}
}

View File

@@ -0,0 +1,44 @@
package de.votian.services.dto;
import java.util.ArrayList;
import java.util.List;
public class DeliveryReasonListDto {
private Integer listNo;
private String label;
private String text;
private List<DeliveryReasonItemDto> items = new ArrayList<>();
public Integer getListNo() {
return listNo;
}
public void setListNo(Integer listNo) {
this.listNo = listNo;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public List<DeliveryReasonItemDto> getItems() {
return items;
}
public void setItems(List<DeliveryReasonItemDto> items) {
this.items = items;
}
}

View File

@@ -0,0 +1,251 @@
package de.votian.services.dto;
import java.math.BigDecimal;
import java.time.LocalDateTime;
public class DispositionJobRowDto {
private Long jobId;
private Integer status;
private LocalDateTime orderTime;
private LocalDateTime finishTime;
private String tourName;
private Long customerId;
private String customerName;
private Long costCenterId;
private String costCenterName;
private String commissionNo;
private String pickupName;
private String pickupStreet;
private String pickupZipcode;
private String pickupCity;
private String deliveryName;
private String deliveryStreet;
private String deliveryZipcode;
private String deliveryCity;
private Long courierId;
private String courierSid;
private Integer vehicleTypeId;
private Long courierVehicleId;
private String courierVehicleSid;
private Long headquartersDispoId;
private BigDecimal totalPrice;
private BigDecimal courierPrice;
private boolean exported;
public Long getJobId() {
return jobId;
}
public void setJobId(Long jobId) {
this.jobId = jobId;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public LocalDateTime getOrderTime() {
return orderTime;
}
public void setOrderTime(LocalDateTime orderTime) {
this.orderTime = orderTime;
}
public LocalDateTime getFinishTime() {
return finishTime;
}
public void setFinishTime(LocalDateTime finishTime) {
this.finishTime = finishTime;
}
public String getTourName() {
return tourName;
}
public void setTourName(String tourName) {
this.tourName = tourName;
}
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public Long getCostCenterId() {
return costCenterId;
}
public void setCostCenterId(Long costCenterId) {
this.costCenterId = costCenterId;
}
public String getCostCenterName() {
return costCenterName;
}
public void setCostCenterName(String costCenterName) {
this.costCenterName = costCenterName;
}
public String getCommissionNo() {
return commissionNo;
}
public void setCommissionNo(String commissionNo) {
this.commissionNo = commissionNo;
}
public String getPickupName() {
return pickupName;
}
public void setPickupName(String pickupName) {
this.pickupName = pickupName;
}
public String getPickupStreet() {
return pickupStreet;
}
public void setPickupStreet(String pickupStreet) {
this.pickupStreet = pickupStreet;
}
public String getPickupZipcode() {
return pickupZipcode;
}
public void setPickupZipcode(String pickupZipcode) {
this.pickupZipcode = pickupZipcode;
}
public String getPickupCity() {
return pickupCity;
}
public void setPickupCity(String pickupCity) {
this.pickupCity = pickupCity;
}
public String getDeliveryName() {
return deliveryName;
}
public void setDeliveryName(String deliveryName) {
this.deliveryName = deliveryName;
}
public String getDeliveryStreet() {
return deliveryStreet;
}
public void setDeliveryStreet(String deliveryStreet) {
this.deliveryStreet = deliveryStreet;
}
public String getDeliveryZipcode() {
return deliveryZipcode;
}
public void setDeliveryZipcode(String deliveryZipcode) {
this.deliveryZipcode = deliveryZipcode;
}
public String getDeliveryCity() {
return deliveryCity;
}
public void setDeliveryCity(String deliveryCity) {
this.deliveryCity = deliveryCity;
}
public Long getCourierId() {
return courierId;
}
public void setCourierId(Long courierId) {
this.courierId = courierId;
}
public String getCourierSid() {
return courierSid;
}
public void setCourierSid(String courierSid) {
this.courierSid = courierSid;
}
public Integer getVehicleTypeId() {
return vehicleTypeId;
}
public void setVehicleTypeId(Integer vehicleTypeId) {
this.vehicleTypeId = vehicleTypeId;
}
public Long getCourierVehicleId() {
return courierVehicleId;
}
public void setCourierVehicleId(Long courierVehicleId) {
this.courierVehicleId = courierVehicleId;
}
public String getCourierVehicleSid() {
return courierVehicleSid;
}
public void setCourierVehicleSid(String courierVehicleSid) {
this.courierVehicleSid = courierVehicleSid;
}
public Long getHeadquartersDispoId() {
return headquartersDispoId;
}
public void setHeadquartersDispoId(Long headquartersDispoId) {
this.headquartersDispoId = headquartersDispoId;
}
public BigDecimal getTotalPrice() {
return totalPrice;
}
public void setTotalPrice(BigDecimal totalPrice) {
this.totalPrice = totalPrice;
}
public BigDecimal getCourierPrice() {
return courierPrice;
}
public void setCourierPrice(BigDecimal courierPrice) {
this.courierPrice = courierPrice;
}
public boolean isExported() {
return exported;
}
public void setExported(boolean exported) {
this.exported = exported;
}
}

View File

@@ -0,0 +1,133 @@
package de.votian.services.dto;
import java.time.LocalDateTime;
public class DispositionStationDto {
private Long jobId;
private LocalDateTime orderTime;
private Integer stopSort;
private Integer stopStatus;
private String customerName;
private String commissionNo;
private String stopName;
private String street;
private String zipcode;
private String city;
private String country;
private String remark;
private String phone;
private String courierSid;
public Long getJobId() {
return jobId;
}
public void setJobId(Long jobId) {
this.jobId = jobId;
}
public LocalDateTime getOrderTime() {
return orderTime;
}
public void setOrderTime(LocalDateTime orderTime) {
this.orderTime = orderTime;
}
public Integer getStopSort() {
return stopSort;
}
public void setStopSort(Integer stopSort) {
this.stopSort = stopSort;
}
public Integer getStopStatus() {
return stopStatus;
}
public void setStopStatus(Integer stopStatus) {
this.stopStatus = stopStatus;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public String getCommissionNo() {
return commissionNo;
}
public void setCommissionNo(String commissionNo) {
this.commissionNo = commissionNo;
}
public String getStopName() {
return stopName;
}
public void setStopName(String stopName) {
this.stopName = stopName;
}
public String getStreet() {
return street;
}
public void setStreet(String street) {
this.street = street;
}
public String getZipcode() {
return zipcode;
}
public void setZipcode(String zipcode) {
this.zipcode = zipcode;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getCourierSid() {
return courierSid;
}
public void setCourierSid(String courierSid) {
this.courierSid = courierSid;
}
}

View File

@@ -0,0 +1,77 @@
package de.votian.services.dto;
public class DispositionVehicleRowDto {
private Long courierId;
private String courierSid;
private String courierEid;
private String available;
private Long courierVehicleId;
private String courierVehicleSid;
private Integer vehicleTypeId;
private Long assignedJobs;
public Long getCourierId() {
return courierId;
}
public void setCourierId(Long courierId) {
this.courierId = courierId;
}
public String getCourierSid() {
return courierSid;
}
public void setCourierSid(String courierSid) {
this.courierSid = courierSid;
}
public String getCourierEid() {
return courierEid;
}
public void setCourierEid(String courierEid) {
this.courierEid = courierEid;
}
public String getAvailable() {
return available;
}
public void setAvailable(String available) {
this.available = available;
}
public Long getCourierVehicleId() {
return courierVehicleId;
}
public void setCourierVehicleId(Long courierVehicleId) {
this.courierVehicleId = courierVehicleId;
}
public String getCourierVehicleSid() {
return courierVehicleSid;
}
public void setCourierVehicleSid(String courierVehicleSid) {
this.courierVehicleSid = courierVehicleSid;
}
public Integer getVehicleTypeId() {
return vehicleTypeId;
}
public void setVehicleTypeId(Integer vehicleTypeId) {
this.vehicleTypeId = vehicleTypeId;
}
public Long getAssignedJobs() {
return assignedJobs;
}
public void setAssignedJobs(Long assignedJobs) {
this.assignedJobs = assignedJobs;
}
}

View File

@@ -0,0 +1,151 @@
package de.votian.services.dto;
import java.time.LocalDate;
public class EmployeeDetailDto {
private Long id;
private Long userId;
private Long headquartersId;
private Long customerId;
private Long costCenterId;
private Integer userType;
private String headquarters;
private String account;
private String name;
private String firstname;
private String email;
private String phone;
private String phone2;
private LocalDate birthdate;
private String rights;
private String group;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Long getHeadquartersId() {
return headquartersId;
}
public void setHeadquartersId(Long headquartersId) {
this.headquartersId = headquartersId;
}
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public Long getCostCenterId() {
return costCenterId;
}
public void setCostCenterId(Long costCenterId) {
this.costCenterId = costCenterId;
}
public Integer getUserType() {
return userType;
}
public void setUserType(Integer userType) {
this.userType = userType;
}
public String getHeadquarters() {
return headquarters;
}
public void setHeadquarters(String headquarters) {
this.headquarters = headquarters;
}
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getFirstname() {
return firstname;
}
public void setFirstname(String firstname) {
this.firstname = firstname;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getPhone2() {
return phone2;
}
public void setPhone2(String phone2) {
this.phone2 = phone2;
}
public LocalDate getBirthdate() {
return birthdate;
}
public void setBirthdate(LocalDate birthdate) {
this.birthdate = birthdate;
}
public String getRights() {
return rights;
}
public void setRights(String rights) {
this.rights = rights;
}
public String getGroup() {
return group;
}
public void setGroup(String group) {
this.group = group;
}
}

View File

@@ -0,0 +1,86 @@
package de.votian.services.dto;
public class EmployeeListItemDto {
private Long id;
private Long userId;
private Long headquartersId;
private Long customerId;
private String userName;
private String userFirstname;
private String userEmail;
private String headquarters;
private Integer userType;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Long getHeadquartersId() {
return headquartersId;
}
public void setHeadquartersId(Long headquartersId) {
this.headquartersId = headquartersId;
}
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getUserFirstname() {
return userFirstname;
}
public void setUserFirstname(String userFirstname) {
this.userFirstname = userFirstname;
}
public String getUserEmail() {
return userEmail;
}
public void setUserEmail(String userEmail) {
this.userEmail = userEmail;
}
public String getHeadquarters() {
return headquarters;
}
public void setHeadquarters(String headquarters) {
this.headquarters = headquarters;
}
public Integer getUserType() {
return userType;
}
public void setUserType(Integer userType) {
this.userType = userType;
}
}

View File

@@ -0,0 +1,14 @@
package de.votian.services.dto;
import java.util.List;
public record EmployeeWarehouseConfigDto(
List<EmployeeWarehouseRootDto> roots,
List<Long> selectedRootIds,
Long defaultRootStockId,
boolean readOnly,
boolean articleAccess,
boolean restrictVisibilityToAssignedSubstocks,
List<EmployeeWarehouseSubstockAssignmentDto> substockAssignments
) {
}

View File

@@ -0,0 +1,13 @@
package de.votian.services.dto;
import java.util.List;
public record EmployeeWarehouseConfigRequest(
List<Long> selectedRootIds,
Long defaultRootStockId,
boolean readOnly,
boolean articleAccess,
boolean restrictVisibilityToAssignedSubstocks,
List<EmployeeWarehouseSubstockAssignmentDto> substockAssignments
) {
}

View File

@@ -0,0 +1,10 @@
package de.votian.services.dto;
import java.util.List;
public record EmployeeWarehouseRootDto(
Long id,
String name,
List<EmployeeWarehouseStockOptionDto> substocks
) {
}

View File

@@ -0,0 +1,9 @@
package de.votian.services.dto;
public record EmployeeWarehouseStockOptionDto(
Long id,
Long parentId,
int level,
String name
) {
}

View File

@@ -0,0 +1,9 @@
package de.votian.services.dto;
import java.util.List;
public record EmployeeWarehouseSubstockAssignmentDto(
Long rootStockId,
List<Long> stockIds
) {
}

View File

@@ -0,0 +1,104 @@
package de.votian.services.dto;
public class FilterAdminDto {
private Long id;
private Integer type;
private String typeLabel;
private Integer status;
private String statusLabel;
private String shortCode;
private String text;
private Integer sort;
private String longText;
private long usageCount;
private String usageSummary;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public String getTypeLabel() {
return typeLabel;
}
public void setTypeLabel(String typeLabel) {
this.typeLabel = typeLabel;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getStatusLabel() {
return statusLabel;
}
public void setStatusLabel(String statusLabel) {
this.statusLabel = statusLabel;
}
public String getShortCode() {
return shortCode;
}
public void setShortCode(String shortCode) {
this.shortCode = shortCode;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public String getLongText() {
return longText;
}
public void setLongText(String longText) {
this.longText = longText;
}
public long getUsageCount() {
return usageCount;
}
public void setUsageCount(long usageCount) {
this.usageCount = usageCount;
}
public String getUsageSummary() {
return usageSummary;
}
public void setUsageSummary(String usageSummary) {
this.usageSummary = usageSummary;
}
}

View File

@@ -0,0 +1,68 @@
package de.votian.services.dto;
public class GroupAdminDto {
private Long id;
private String name;
private Long headquartersId;
private boolean globalVisible;
private boolean readonly;
private long usageCount;
private String usageSummary;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Long getHeadquartersId() {
return headquartersId;
}
public void setHeadquartersId(Long headquartersId) {
this.headquartersId = headquartersId;
}
public boolean isGlobalVisible() {
return globalVisible;
}
public void setGlobalVisible(boolean globalVisible) {
this.globalVisible = globalVisible;
}
public boolean isReadonly() {
return readonly;
}
public void setReadonly(boolean readonly) {
this.readonly = readonly;
}
public long getUsageCount() {
return usageCount;
}
public void setUsageCount(long usageCount) {
this.usageCount = usageCount;
}
public String getUsageSummary() {
return usageSummary;
}
public void setUsageSummary(String usageSummary) {
this.usageSummary = usageSummary;
}
}

View File

@@ -0,0 +1,126 @@
package de.votian.services.dto;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
public class GroupwareAppointmentCommandDto {
private LocalDateTime startTime;
private LocalDateTime endTime;
private Integer category1;
private Integer category2;
private Integer category3;
private Integer category4;
private Long customerId;
private String text;
private List<Long> participantUserIds = new ArrayList<>();
private Boolean notifyParticipants;
private List<String> externalEmails = new ArrayList<>();
private String mailSalutation;
private String mailGreetings;
public LocalDateTime getStartTime() {
return startTime;
}
public void setStartTime(LocalDateTime startTime) {
this.startTime = startTime;
}
public LocalDateTime getEndTime() {
return endTime;
}
public void setEndTime(LocalDateTime endTime) {
this.endTime = endTime;
}
public Integer getCategory1() {
return category1;
}
public void setCategory1(Integer category1) {
this.category1 = category1;
}
public Integer getCategory2() {
return category2;
}
public void setCategory2(Integer category2) {
this.category2 = category2;
}
public Integer getCategory3() {
return category3;
}
public void setCategory3(Integer category3) {
this.category3 = category3;
}
public Integer getCategory4() {
return category4;
}
public void setCategory4(Integer category4) {
this.category4 = category4;
}
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public List<Long> getParticipantUserIds() {
return participantUserIds;
}
public void setParticipantUserIds(List<Long> participantUserIds) {
this.participantUserIds = participantUserIds != null ? new ArrayList<>(participantUserIds) : new ArrayList<>();
}
public Boolean getNotifyParticipants() {
return notifyParticipants;
}
public void setNotifyParticipants(Boolean notifyParticipants) {
this.notifyParticipants = notifyParticipants;
}
public List<String> getExternalEmails() {
return externalEmails;
}
public void setExternalEmails(List<String> externalEmails) {
this.externalEmails = externalEmails != null ? new ArrayList<>(externalEmails) : new ArrayList<>();
}
public String getMailSalutation() {
return mailSalutation;
}
public void setMailSalutation(String mailSalutation) {
this.mailSalutation = mailSalutation;
}
public String getMailGreetings() {
return mailGreetings;
}
public void setMailGreetings(String mailGreetings) {
this.mailGreetings = mailGreetings;
}
}

View File

@@ -0,0 +1,207 @@
package de.votian.services.dto;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
public class GroupwareAppointmentDto {
private Long id;
private Long headquartersId;
private Long authorUserId;
private String authorName;
private Long customerId;
private String customerEid;
private String customerName;
private Integer category1;
private Integer category2;
private Integer category3;
private Integer category4;
private String category1Label;
private String category2Label;
private String category3Label;
private String category4Label;
private String text;
private LocalDateTime startTime;
private LocalDateTime endTime;
private boolean reminderActive;
private boolean finished;
private List<Long> participantUserIds = new ArrayList<>();
private List<AppointmentParticipantStateDto> participants = new ArrayList<>();
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getHeadquartersId() {
return headquartersId;
}
public void setHeadquartersId(Long headquartersId) {
this.headquartersId = headquartersId;
}
public Long getAuthorUserId() {
return authorUserId;
}
public void setAuthorUserId(Long authorUserId) {
this.authorUserId = authorUserId;
}
public String getAuthorName() {
return authorName;
}
public void setAuthorName(String authorName) {
this.authorName = authorName;
}
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public String getCustomerEid() {
return customerEid;
}
public void setCustomerEid(String customerEid) {
this.customerEid = customerEid;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public Integer getCategory1() {
return category1;
}
public void setCategory1(Integer category1) {
this.category1 = category1;
}
public Integer getCategory2() {
return category2;
}
public void setCategory2(Integer category2) {
this.category2 = category2;
}
public Integer getCategory3() {
return category3;
}
public void setCategory3(Integer category3) {
this.category3 = category3;
}
public Integer getCategory4() {
return category4;
}
public void setCategory4(Integer category4) {
this.category4 = category4;
}
public String getCategory1Label() {
return category1Label;
}
public void setCategory1Label(String category1Label) {
this.category1Label = category1Label;
}
public String getCategory2Label() {
return category2Label;
}
public void setCategory2Label(String category2Label) {
this.category2Label = category2Label;
}
public String getCategory3Label() {
return category3Label;
}
public void setCategory3Label(String category3Label) {
this.category3Label = category3Label;
}
public String getCategory4Label() {
return category4Label;
}
public void setCategory4Label(String category4Label) {
this.category4Label = category4Label;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public LocalDateTime getStartTime() {
return startTime;
}
public void setStartTime(LocalDateTime startTime) {
this.startTime = startTime;
}
public LocalDateTime getEndTime() {
return endTime;
}
public void setEndTime(LocalDateTime endTime) {
this.endTime = endTime;
}
public boolean isReminderActive() {
return reminderActive;
}
public void setReminderActive(boolean reminderActive) {
this.reminderActive = reminderActive;
}
public boolean isFinished() {
return finished;
}
public void setFinished(boolean finished) {
this.finished = finished;
}
public List<Long> getParticipantUserIds() {
return participantUserIds;
}
public void setParticipantUserIds(List<Long> participantUserIds) {
this.participantUserIds = participantUserIds != null ? new ArrayList<>(participantUserIds) : new ArrayList<>();
}
public List<AppointmentParticipantStateDto> getParticipants() {
return participants;
}
public void setParticipants(List<AppointmentParticipantStateDto> participants) {
this.participants = participants != null ? new ArrayList<>(participants) : new ArrayList<>();
}
}

View File

@@ -0,0 +1,26 @@
package de.votian.services.dto;
import java.util.ArrayList;
import java.util.List;
public class GroupwareCancellationCommandDto {
private Boolean notifyParticipants;
private List<String> externalEmails = new ArrayList<>();
public Boolean getNotifyParticipants() {
return notifyParticipants;
}
public void setNotifyParticipants(Boolean notifyParticipants) {
this.notifyParticipants = notifyParticipants;
}
public List<String> getExternalEmails() {
return externalEmails;
}
public void setExternalEmails(List<String> externalEmails) {
this.externalEmails = externalEmails != null ? new ArrayList<>(externalEmails) : new ArrayList<>();
}
}

View File

@@ -0,0 +1,89 @@
package de.votian.services.dto;
import java.util.ArrayList;
import java.util.List;
public class GroupwareOptionsDto {
private List<AppointmentCategoryOptionDto> statusOptions = new ArrayList<>();
private List<AppointmentCategoryOptionDto> visibilityOptions = new ArrayList<>();
private List<AppointmentCategoryOptionDto> typeOptions = new ArrayList<>();
private List<AppointmentCategoryOptionDto> reminderOptions = new ArrayList<>();
private List<AppointmentParticipantOptionDto> participants = new ArrayList<>();
private List<AppointmentGroupOptionDto> groups = new ArrayList<>();
private List<CustomerListItemDto> customers = new ArrayList<>();
private Integer defaultTypeCategory;
private Integer defaultReminderCategory;
public List<AppointmentCategoryOptionDto> getStatusOptions() {
return statusOptions;
}
public void setStatusOptions(List<AppointmentCategoryOptionDto> statusOptions) {
this.statusOptions = statusOptions != null ? new ArrayList<>(statusOptions) : new ArrayList<>();
}
public List<AppointmentCategoryOptionDto> getVisibilityOptions() {
return visibilityOptions;
}
public void setVisibilityOptions(List<AppointmentCategoryOptionDto> visibilityOptions) {
this.visibilityOptions = visibilityOptions != null ? new ArrayList<>(visibilityOptions) : new ArrayList<>();
}
public List<AppointmentCategoryOptionDto> getTypeOptions() {
return typeOptions;
}
public void setTypeOptions(List<AppointmentCategoryOptionDto> typeOptions) {
this.typeOptions = typeOptions != null ? new ArrayList<>(typeOptions) : new ArrayList<>();
}
public List<AppointmentCategoryOptionDto> getReminderOptions() {
return reminderOptions;
}
public void setReminderOptions(List<AppointmentCategoryOptionDto> reminderOptions) {
this.reminderOptions = reminderOptions != null ? new ArrayList<>(reminderOptions) : new ArrayList<>();
}
public List<AppointmentParticipantOptionDto> getParticipants() {
return participants;
}
public void setParticipants(List<AppointmentParticipantOptionDto> participants) {
this.participants = participants != null ? new ArrayList<>(participants) : new ArrayList<>();
}
public List<AppointmentGroupOptionDto> getGroups() {
return groups;
}
public void setGroups(List<AppointmentGroupOptionDto> groups) {
this.groups = groups != null ? new ArrayList<>(groups) : new ArrayList<>();
}
public List<CustomerListItemDto> getCustomers() {
return customers;
}
public void setCustomers(List<CustomerListItemDto> customers) {
this.customers = customers != null ? new ArrayList<>(customers) : new ArrayList<>();
}
public Integer getDefaultTypeCategory() {
return defaultTypeCategory;
}
public void setDefaultTypeCategory(Integer defaultTypeCategory) {
this.defaultTypeCategory = defaultTypeCategory;
}
public Integer getDefaultReminderCategory() {
return defaultReminderCategory;
}
public void setDefaultReminderCategory(Integer defaultReminderCategory) {
this.defaultReminderCategory = defaultReminderCategory;
}
}

View File

@@ -0,0 +1,61 @@
package de.votian.services.dto;
import java.time.LocalDateTime;
public class GroupwareResubmissionCommandDto {
private LocalDateTime startTime;
private LocalDateTime endTime;
private Integer category1;
private Integer category2;
private Integer category3;
private Integer category4;
public LocalDateTime getStartTime() {
return startTime;
}
public void setStartTime(LocalDateTime startTime) {
this.startTime = startTime;
}
public LocalDateTime getEndTime() {
return endTime;
}
public void setEndTime(LocalDateTime endTime) {
this.endTime = endTime;
}
public Integer getCategory1() {
return category1;
}
public void setCategory1(Integer category1) {
this.category1 = category1;
}
public Integer getCategory2() {
return category2;
}
public void setCategory2(Integer category2) {
this.category2 = category2;
}
public Integer getCategory3() {
return category3;
}
public void setCategory3(Integer category3) {
this.category3 = category3;
}
public Integer getCategory4() {
return category4;
}
public void setCategory4(Integer category4) {
this.category4 = category4;
}
}

View File

@@ -0,0 +1,149 @@
package de.votian.services.dto;
public class HeadquartersDetailDto {
private Long id;
private String mnemonic;
private String name;
private Integer workmode;
private Long companyId;
private String companyName;
private String companyName2;
private String companyName3;
private String companyName4;
private String hsno;
private String street;
private String zipcode;
private String city;
private String bwvPhone;
private String gln;
private String duns;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getMnemonic() {
return mnemonic;
}
public void setMnemonic(String mnemonic) {
this.mnemonic = mnemonic;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getWorkmode() {
return workmode;
}
public void setWorkmode(Integer workmode) {
this.workmode = workmode;
}
public Long getCompanyId() {
return companyId;
}
public void setCompanyId(Long companyId) {
this.companyId = companyId;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getCompanyName2() {
return companyName2;
}
public void setCompanyName2(String companyName2) {
this.companyName2 = companyName2;
}
public String getCompanyName3() {
return companyName3;
}
public void setCompanyName3(String companyName3) {
this.companyName3 = companyName3;
}
public String getCompanyName4() {
return companyName4;
}
public void setCompanyName4(String companyName4) {
this.companyName4 = companyName4;
}
public String getHsno() {
return hsno;
}
public void setHsno(String hsno) {
this.hsno = hsno;
}
public String getStreet() {
return street;
}
public void setStreet(String street) {
this.street = street;
}
public String getZipcode() {
return zipcode;
}
public void setZipcode(String zipcode) {
this.zipcode = zipcode;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getBwvPhone() {
return bwvPhone;
}
public void setBwvPhone(String bwvPhone) {
this.bwvPhone = bwvPhone;
}
public String getGln() {
return gln;
}
public void setGln(String gln) {
this.gln = gln;
}
public String getDuns() {
return duns;
}
public void setDuns(String duns) {
this.duns = duns;
}
}

View File

@@ -0,0 +1,88 @@
package de.votian.services.dto;
import java.util.ArrayList;
import java.util.List;
public class ImportExecutionResultDto {
private boolean success;
private String processKey;
private String summary;
private int createdCount;
private int updatedCount;
private int deletedCount;
private int ignoredCount;
private List<String> messages = new ArrayList<>();
public static ImportExecutionResultDto failure(String processKey, String summary) {
ImportExecutionResultDto dto = new ImportExecutionResultDto();
dto.setSuccess(false);
dto.setProcessKey(processKey);
dto.setSummary(summary);
return dto;
}
public boolean isSuccess() {
return success;
}
public void setSuccess(boolean success) {
this.success = success;
}
public String getProcessKey() {
return processKey;
}
public void setProcessKey(String processKey) {
this.processKey = processKey;
}
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
public int getCreatedCount() {
return createdCount;
}
public void setCreatedCount(int createdCount) {
this.createdCount = createdCount;
}
public int getUpdatedCount() {
return updatedCount;
}
public void setUpdatedCount(int updatedCount) {
this.updatedCount = updatedCount;
}
public int getDeletedCount() {
return deletedCount;
}
public void setDeletedCount(int deletedCount) {
this.deletedCount = deletedCount;
}
public int getIgnoredCount() {
return ignoredCount;
}
public void setIgnoredCount(int ignoredCount) {
this.ignoredCount = ignoredCount;
}
public List<String> getMessages() {
return messages;
}
public void setMessages(List<String> messages) {
this.messages = messages != null ? new ArrayList<>(messages) : new ArrayList<>();
}
}

View File

@@ -0,0 +1,34 @@
package de.votian.services.dto;
import java.time.LocalDateTime;
public class ImportFileDto {
private String fileName;
private long size;
private LocalDateTime modifiedAt;
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public long getSize() {
return size;
}
public void setSize(long size) {
this.size = size;
}
public LocalDateTime getModifiedAt() {
return modifiedAt;
}
public void setModifiedAt(LocalDateTime modifiedAt) {
this.modifiedAt = modifiedAt;
}
}

View File

@@ -0,0 +1,107 @@
package de.votian.services.dto;
import java.util.ArrayList;
import java.util.List;
public class ImportProcessDto {
private String key;
private String label;
private String description;
private String schemaHint;
private boolean nativeExecution;
private boolean customerRequired;
private String status;
private String priority;
private String decisionSummary;
private String successorWorkspace;
private List<String> legacySources = new ArrayList<>();
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getSchemaHint() {
return schemaHint;
}
public void setSchemaHint(String schemaHint) {
this.schemaHint = schemaHint;
}
public boolean isNativeExecution() {
return nativeExecution;
}
public void setNativeExecution(boolean nativeExecution) {
this.nativeExecution = nativeExecution;
}
public boolean isCustomerRequired() {
return customerRequired;
}
public void setCustomerRequired(boolean customerRequired) {
this.customerRequired = customerRequired;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getPriority() {
return priority;
}
public void setPriority(String priority) {
this.priority = priority;
}
public String getDecisionSummary() {
return decisionSummary;
}
public void setDecisionSummary(String decisionSummary) {
this.decisionSummary = decisionSummary;
}
public String getSuccessorWorkspace() {
return successorWorkspace;
}
public void setSuccessorWorkspace(String successorWorkspace) {
this.successorWorkspace = successorWorkspace;
}
public List<String> getLegacySources() {
return legacySources;
}
public void setLegacySources(List<String> legacySources) {
this.legacySources = legacySources != null ? new ArrayList<>(legacySources) : new ArrayList<>();
}
}

View File

@@ -0,0 +1,52 @@
package de.votian.services.dto;
import java.math.BigDecimal;
public class InvoiceCustomerSummaryDto {
private Long customerId;
private String customerEid;
private String customerName;
private long invoiceableJobs;
private BigDecimal totalRevenue;
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public String getCustomerEid() {
return customerEid;
}
public void setCustomerEid(String customerEid) {
this.customerEid = customerEid;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public long getInvoiceableJobs() {
return invoiceableJobs;
}
public void setInvoiceableJobs(long invoiceableJobs) {
this.invoiceableJobs = invoiceableJobs;
}
public BigDecimal getTotalRevenue() {
return totalRevenue;
}
public void setTotalRevenue(BigDecimal totalRevenue) {
this.totalRevenue = totalRevenue;
}
}

View File

@@ -0,0 +1,188 @@
package de.votian.services.dto;
import java.math.BigDecimal;
import java.time.LocalDateTime;
public class InvoiceJobRowDto {
private Long jobId;
private Long customerId;
private Long costCenterId;
private String customerName;
private String costCenterName;
private LocalDateTime orderTime;
private LocalDateTime finishTime;
private String courierSid;
private String tourName;
private String commissionNo;
private String pickupName;
private String deliveryName;
private Integer status;
private Integer incomplete;
private BigDecimal totalPrice;
private BigDecimal courierPrice;
private BigDecimal margin;
private boolean exported;
private String serviceDetails;
private String invoiceText;
public Long getJobId() {
return jobId;
}
public void setJobId(Long jobId) {
this.jobId = jobId;
}
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public Long getCostCenterId() {
return costCenterId;
}
public void setCostCenterId(Long costCenterId) {
this.costCenterId = costCenterId;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public String getCostCenterName() {
return costCenterName;
}
public void setCostCenterName(String costCenterName) {
this.costCenterName = costCenterName;
}
public LocalDateTime getOrderTime() {
return orderTime;
}
public void setOrderTime(LocalDateTime orderTime) {
this.orderTime = orderTime;
}
public LocalDateTime getFinishTime() {
return finishTime;
}
public void setFinishTime(LocalDateTime finishTime) {
this.finishTime = finishTime;
}
public String getCourierSid() {
return courierSid;
}
public void setCourierSid(String courierSid) {
this.courierSid = courierSid;
}
public String getTourName() {
return tourName;
}
public void setTourName(String tourName) {
this.tourName = tourName;
}
public String getCommissionNo() {
return commissionNo;
}
public void setCommissionNo(String commissionNo) {
this.commissionNo = commissionNo;
}
public String getPickupName() {
return pickupName;
}
public void setPickupName(String pickupName) {
this.pickupName = pickupName;
}
public String getDeliveryName() {
return deliveryName;
}
public void setDeliveryName(String deliveryName) {
this.deliveryName = deliveryName;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getIncomplete() {
return incomplete;
}
public void setIncomplete(Integer incomplete) {
this.incomplete = incomplete;
}
public BigDecimal getTotalPrice() {
return totalPrice;
}
public void setTotalPrice(BigDecimal totalPrice) {
this.totalPrice = totalPrice;
}
public BigDecimal getCourierPrice() {
return courierPrice;
}
public void setCourierPrice(BigDecimal courierPrice) {
this.courierPrice = courierPrice;
}
public BigDecimal getMargin() {
return margin;
}
public void setMargin(BigDecimal margin) {
this.margin = margin;
}
public boolean isExported() {
return exported;
}
public void setExported(boolean exported) {
this.exported = exported;
}
public String getServiceDetails() {
return serviceDetails;
}
public void setServiceDetails(String serviceDetails) {
this.serviceDetails = serviceDetails;
}
public String getInvoiceText() {
return invoiceText;
}
public void setInvoiceText(String invoiceText) {
this.invoiceText = invoiceText;
}
}

View File

@@ -0,0 +1,80 @@
package de.votian.services.dto;
import java.math.BigDecimal;
import java.time.LocalDate;
public class InvoiceSummaryDto {
private Long headquartersId;
private LocalDate fromDate;
private LocalDate toDate;
private long totalJobs;
private long billableJobs;
private BigDecimal totalRevenue;
private BigDecimal totalCourierCosts;
private BigDecimal contributionMargin;
public Long getHeadquartersId() {
return headquartersId;
}
public void setHeadquartersId(Long headquartersId) {
this.headquartersId = headquartersId;
}
public LocalDate getFromDate() {
return fromDate;
}
public void setFromDate(LocalDate fromDate) {
this.fromDate = fromDate;
}
public LocalDate getToDate() {
return toDate;
}
public void setToDate(LocalDate toDate) {
this.toDate = toDate;
}
public long getTotalJobs() {
return totalJobs;
}
public void setTotalJobs(long totalJobs) {
this.totalJobs = totalJobs;
}
public long getBillableJobs() {
return billableJobs;
}
public void setBillableJobs(long billableJobs) {
this.billableJobs = billableJobs;
}
public BigDecimal getTotalRevenue() {
return totalRevenue;
}
public void setTotalRevenue(BigDecimal totalRevenue) {
this.totalRevenue = totalRevenue;
}
public BigDecimal getTotalCourierCosts() {
return totalCourierCosts;
}
public void setTotalCourierCosts(BigDecimal totalCourierCosts) {
this.totalCourierCosts = totalCourierCosts;
}
public BigDecimal getContributionMargin() {
return contributionMargin;
}
public void setContributionMargin(BigDecimal contributionMargin) {
this.contributionMargin = contributionMargin;
}
}

View File

@@ -0,0 +1,143 @@
package de.votian.services.dto;
import java.util.ArrayList;
import java.util.List;
public class JobAcceptanceProtocolDto {
private Long jobId;
private Integer jobService;
private boolean featureEnabled;
private boolean dataAvailable;
private boolean signatureAvailable;
private Integer protocolServiceKey;
private String protocolServiceLabel;
private String text;
private Integer packingPieces;
private Integer mobilePhotoCount;
private String mailStatus;
private String letterStatus;
private String resolutionNotice;
private List<String> selectedServices = new ArrayList<>();
private List<JobAcceptanceProtocolQuestionDto> questions = new ArrayList<>();
public Long getJobId() {
return jobId;
}
public void setJobId(Long jobId) {
this.jobId = jobId;
}
public Integer getJobService() {
return jobService;
}
public void setJobService(Integer jobService) {
this.jobService = jobService;
}
public boolean isFeatureEnabled() {
return featureEnabled;
}
public void setFeatureEnabled(boolean featureEnabled) {
this.featureEnabled = featureEnabled;
}
public boolean isDataAvailable() {
return dataAvailable;
}
public void setDataAvailable(boolean dataAvailable) {
this.dataAvailable = dataAvailable;
}
public boolean isSignatureAvailable() {
return signatureAvailable;
}
public void setSignatureAvailable(boolean signatureAvailable) {
this.signatureAvailable = signatureAvailable;
}
public Integer getProtocolServiceKey() {
return protocolServiceKey;
}
public void setProtocolServiceKey(Integer protocolServiceKey) {
this.protocolServiceKey = protocolServiceKey;
}
public String getProtocolServiceLabel() {
return protocolServiceLabel;
}
public void setProtocolServiceLabel(String protocolServiceLabel) {
this.protocolServiceLabel = protocolServiceLabel;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public Integer getPackingPieces() {
return packingPieces;
}
public void setPackingPieces(Integer packingPieces) {
this.packingPieces = packingPieces;
}
public Integer getMobilePhotoCount() {
return mobilePhotoCount;
}
public void setMobilePhotoCount(Integer mobilePhotoCount) {
this.mobilePhotoCount = mobilePhotoCount;
}
public String getMailStatus() {
return mailStatus;
}
public void setMailStatus(String mailStatus) {
this.mailStatus = mailStatus;
}
public String getLetterStatus() {
return letterStatus;
}
public void setLetterStatus(String letterStatus) {
this.letterStatus = letterStatus;
}
public String getResolutionNotice() {
return resolutionNotice;
}
public void setResolutionNotice(String resolutionNotice) {
this.resolutionNotice = resolutionNotice;
}
public List<String> getSelectedServices() {
return selectedServices;
}
public void setSelectedServices(List<String> selectedServices) {
this.selectedServices = selectedServices;
}
public List<JobAcceptanceProtocolQuestionDto> getQuestions() {
return questions;
}
public void setQuestions(List<JobAcceptanceProtocolQuestionDto> questions) {
this.questions = questions;
}
}

View File

@@ -0,0 +1,59 @@
package de.votian.services.dto;
public class JobAcceptanceProtocolQuestionDto {
private Integer sort;
private String question;
private String answer;
private String article;
private String remark;
private String mailState;
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public String getQuestion() {
return question;
}
public void setQuestion(String question) {
this.question = question;
}
public String getAnswer() {
return answer;
}
public void setAnswer(String answer) {
this.answer = answer;
}
public String getArticle() {
return article;
}
public void setArticle(String article) {
this.article = article;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getMailState() {
return mailState;
}
public void setMailState(String mailState) {
this.mailState = mailState;
}
}

View File

@@ -0,0 +1,77 @@
package de.votian.services.dto;
public class JobAttachmentDto {
private Long id;
private String fileName;
private String remark;
private String source;
private String modifiedAt;
private Long sizeBytes;
private boolean downloadable;
private boolean deletable;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public String getModifiedAt() {
return modifiedAt;
}
public void setModifiedAt(String modifiedAt) {
this.modifiedAt = modifiedAt;
}
public Long getSizeBytes() {
return sizeBytes;
}
public void setSizeBytes(Long sizeBytes) {
this.sizeBytes = sizeBytes;
}
public boolean isDownloadable() {
return downloadable;
}
public void setDownloadable(boolean downloadable) {
this.downloadable = downloadable;
}
public boolean isDeletable() {
return deletable;
}
public void setDeletable(boolean deletable) {
this.deletable = deletable;
}
}

View File

@@ -0,0 +1,161 @@
package de.votian.services.dto;
import java.math.BigDecimal;
import java.time.LocalDateTime;
public class JobListRowDto {
private Long id;
private Integer status;
private LocalDateTime orderTime;
private LocalDateTime finishTime;
private String tourName;
private Long customerId;
private String customerName;
private Long costCenterId;
private String costCenterName;
private String commissionNo;
private String pickupName;
private String deliveryName;
private Long courierId;
private String courierSid;
private Integer vehicleTypeId;
private BigDecimal totalPrice;
private boolean exported;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public LocalDateTime getOrderTime() {
return orderTime;
}
public void setOrderTime(LocalDateTime orderTime) {
this.orderTime = orderTime;
}
public LocalDateTime getFinishTime() {
return finishTime;
}
public void setFinishTime(LocalDateTime finishTime) {
this.finishTime = finishTime;
}
public String getTourName() {
return tourName;
}
public void setTourName(String tourName) {
this.tourName = tourName;
}
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public Long getCostCenterId() {
return costCenterId;
}
public void setCostCenterId(Long costCenterId) {
this.costCenterId = costCenterId;
}
public String getCostCenterName() {
return costCenterName;
}
public void setCostCenterName(String costCenterName) {
this.costCenterName = costCenterName;
}
public String getCommissionNo() {
return commissionNo;
}
public void setCommissionNo(String commissionNo) {
this.commissionNo = commissionNo;
}
public String getPickupName() {
return pickupName;
}
public void setPickupName(String pickupName) {
this.pickupName = pickupName;
}
public String getDeliveryName() {
return deliveryName;
}
public void setDeliveryName(String deliveryName) {
this.deliveryName = deliveryName;
}
public Long getCourierId() {
return courierId;
}
public void setCourierId(Long courierId) {
this.courierId = courierId;
}
public String getCourierSid() {
return courierSid;
}
public void setCourierSid(String courierSid) {
this.courierSid = courierSid;
}
public Integer getVehicleTypeId() {
return vehicleTypeId;
}
public void setVehicleTypeId(Integer vehicleTypeId) {
this.vehicleTypeId = vehicleTypeId;
}
public BigDecimal getTotalPrice() {
return totalPrice;
}
public void setTotalPrice(BigDecimal totalPrice) {
this.totalPrice = totalPrice;
}
public boolean isExported() {
return exported;
}
public void setExported(boolean exported) {
this.exported = exported;
}
}

View File

@@ -0,0 +1,32 @@
package de.votian.services.dto;
public class JobPhotoDto {
private String fileName;
private String source;
private boolean downloadable;
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public boolean isDownloadable() {
return downloadable;
}
public void setDownloadable(boolean downloadable) {
this.downloadable = downloadable;
}
}

View File

@@ -0,0 +1,47 @@
package de.votian.services.dto;
import de.votian.services.entity.Job;
import de.votian.services.entity.JobPrice;
import java.util.ArrayList;
import java.util.List;
public class JobPricingRequest {
private Job job;
private List<JobPrice> prices = new ArrayList<>();
private List<TourDetailDto> tours = new ArrayList<>();
private boolean manualCourierTotalOverride;
public Job getJob() {
return job;
}
public void setJob(Job job) {
this.job = job;
}
public List<JobPrice> getPrices() {
return prices;
}
public void setPrices(List<JobPrice> prices) {
this.prices = prices != null ? prices : new ArrayList<>();
}
public List<TourDetailDto> getTours() {
return tours;
}
public void setTours(List<TourDetailDto> tours) {
this.tours = tours != null ? tours : new ArrayList<>();
}
public boolean isManualCourierTotalOverride() {
return manualCourierTotalOverride;
}
public void setManualCourierTotalOverride(boolean manualCourierTotalOverride) {
this.manualCourierTotalOverride = manualCourierTotalOverride;
}
}

View File

@@ -0,0 +1,84 @@
package de.votian.services.dto;
import de.votian.services.entity.Job;
import de.votian.services.entity.JobPrice;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
public class JobPricingResultDto {
private Job job;
private List<JobPrice> prices = new ArrayList<>();
private List<JobTourServiceDraftRowDto> tourServices = new ArrayList<>();
private BigDecimal discountRate;
private BigDecimal selfServiceDiscount;
private BigDecimal baseServicePrice;
private BigDecimal automaticStreetServicePrice;
private boolean servicePriceDiscountApplied;
public Job getJob() {
return job;
}
public void setJob(Job job) {
this.job = job;
}
public List<JobPrice> getPrices() {
return prices;
}
public void setPrices(List<JobPrice> prices) {
this.prices = prices != null ? prices : new ArrayList<>();
}
public List<JobTourServiceDraftRowDto> getTourServices() {
return tourServices;
}
public void setTourServices(List<JobTourServiceDraftRowDto> tourServices) {
this.tourServices = tourServices != null ? tourServices : new ArrayList<>();
}
public BigDecimal getDiscountRate() {
return discountRate;
}
public void setDiscountRate(BigDecimal discountRate) {
this.discountRate = discountRate;
}
public BigDecimal getSelfServiceDiscount() {
return selfServiceDiscount;
}
public void setSelfServiceDiscount(BigDecimal selfServiceDiscount) {
this.selfServiceDiscount = selfServiceDiscount;
}
public BigDecimal getBaseServicePrice() {
return baseServicePrice;
}
public void setBaseServicePrice(BigDecimal baseServicePrice) {
this.baseServicePrice = baseServicePrice;
}
public BigDecimal getAutomaticStreetServicePrice() {
return automaticStreetServicePrice;
}
public void setAutomaticStreetServicePrice(BigDecimal automaticStreetServicePrice) {
this.automaticStreetServicePrice = automaticStreetServicePrice;
}
public boolean isServicePriceDiscountApplied() {
return servicePriceDiscountApplied;
}
public void setServicePriceDiscountApplied(boolean servicePriceDiscountApplied) {
this.servicePriceDiscountApplied = servicePriceDiscountApplied;
}
}

View File

@@ -0,0 +1,52 @@
package de.votian.services.dto;
import java.math.BigDecimal;
public class JobTourServiceDraftRowDto {
private Integer tourSort;
private String serviceName;
private String serviceTypeName;
private BigDecimal price;
private BigDecimal discount;
public Integer getTourSort() {
return tourSort;
}
public void setTourSort(Integer tourSort) {
this.tourSort = tourSort;
}
public String getServiceName() {
return serviceName;
}
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
public String getServiceTypeName() {
return serviceTypeName;
}
public void setServiceTypeName(String serviceTypeName) {
this.serviceTypeName = serviceTypeName;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public BigDecimal getDiscount() {
return discount;
}
public void setDiscount(BigDecimal discount) {
this.discount = discount;
}
}

View File

@@ -0,0 +1,79 @@
package de.votian.services.dto;
import java.math.BigDecimal;
public class JobTourServiceRowDto {
private Long costCenterId;
private String costCenterName;
private Integer tourSort;
private String serviceName;
private String serviceTypeName;
private BigDecimal price;
private BigDecimal discount;
private BigDecimal businessVolume;
public Long getCostCenterId() {
return costCenterId;
}
public void setCostCenterId(Long costCenterId) {
this.costCenterId = costCenterId;
}
public String getCostCenterName() {
return costCenterName;
}
public void setCostCenterName(String costCenterName) {
this.costCenterName = costCenterName;
}
public Integer getTourSort() {
return tourSort;
}
public void setTourSort(Integer tourSort) {
this.tourSort = tourSort;
}
public String getServiceName() {
return serviceName;
}
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
public String getServiceTypeName() {
return serviceTypeName;
}
public void setServiceTypeName(String serviceTypeName) {
this.serviceTypeName = serviceTypeName;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public BigDecimal getDiscount() {
return discount;
}
public void setDiscount(BigDecimal discount) {
this.discount = discount;
}
public BigDecimal getBusinessVolume() {
return businessVolume;
}
public void setBusinessVolume(BigDecimal businessVolume) {
this.businessVolume = businessVolume;
}
}

View File

@@ -0,0 +1,117 @@
package de.votian.services.dto;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
public class LonghaulDashboardDto {
private boolean mediationActive;
private int minimumDistanceKm;
private int pendingCount;
private int acceptedCount;
private int returnCount;
private boolean remoteDbAvailable;
private boolean remoteDbActive;
private Long effectiveHeadquartersId;
private LocalDateTime generatedAt;
private List<LonghaulJobRowDto> pendingJobs = new ArrayList<>();
private List<LonghaulJobRowDto> acceptedJobs = new ArrayList<>();
private List<LonghaulJobRowDto> returnJobs = new ArrayList<>();
public boolean isMediationActive() {
return mediationActive;
}
public void setMediationActive(boolean mediationActive) {
this.mediationActive = mediationActive;
}
public int getMinimumDistanceKm() {
return minimumDistanceKm;
}
public void setMinimumDistanceKm(int minimumDistanceKm) {
this.minimumDistanceKm = minimumDistanceKm;
}
public int getPendingCount() {
return pendingCount;
}
public void setPendingCount(int pendingCount) {
this.pendingCount = pendingCount;
}
public int getAcceptedCount() {
return acceptedCount;
}
public void setAcceptedCount(int acceptedCount) {
this.acceptedCount = acceptedCount;
}
public int getReturnCount() {
return returnCount;
}
public void setReturnCount(int returnCount) {
this.returnCount = returnCount;
}
public boolean isRemoteDbAvailable() {
return remoteDbAvailable;
}
public void setRemoteDbAvailable(boolean remoteDbAvailable) {
this.remoteDbAvailable = remoteDbAvailable;
}
public boolean isRemoteDbActive() {
return remoteDbActive;
}
public void setRemoteDbActive(boolean remoteDbActive) {
this.remoteDbActive = remoteDbActive;
}
public Long getEffectiveHeadquartersId() {
return effectiveHeadquartersId;
}
public void setEffectiveHeadquartersId(Long effectiveHeadquartersId) {
this.effectiveHeadquartersId = effectiveHeadquartersId;
}
public LocalDateTime getGeneratedAt() {
return generatedAt;
}
public void setGeneratedAt(LocalDateTime generatedAt) {
this.generatedAt = generatedAt;
}
public List<LonghaulJobRowDto> getPendingJobs() {
return pendingJobs;
}
public void setPendingJobs(List<LonghaulJobRowDto> pendingJobs) {
this.pendingJobs = pendingJobs != null ? pendingJobs : new ArrayList<>();
}
public List<LonghaulJobRowDto> getAcceptedJobs() {
return acceptedJobs;
}
public void setAcceptedJobs(List<LonghaulJobRowDto> acceptedJobs) {
this.acceptedJobs = acceptedJobs != null ? acceptedJobs : new ArrayList<>();
}
public List<LonghaulJobRowDto> getReturnJobs() {
return returnJobs;
}
public void setReturnJobs(List<LonghaulJobRowDto> returnJobs) {
this.returnJobs = returnJobs != null ? returnJobs : new ArrayList<>();
}
}

View File

@@ -0,0 +1,187 @@
package de.votian.services.dto;
import java.time.LocalDateTime;
public class LonghaulJobDetailDto extends LonghaulJobRowDto {
private boolean remoteDbActive;
private Long effectiveHeadquartersId;
private String tourName;
private String pickupPerson;
private String pickupPhone;
private String pickupRemark;
private String pickupStreet;
private String pickupCountry;
private String deliveryPerson;
private String deliveryPhone;
private String deliveryRemark;
private String deliveryStreet;
private String deliveryCountry;
private Double locatingLatitude;
private Double locatingLongitude;
private LocalDateTime locatingTime;
private Integer locatingType;
private String locatingTypeLabel;
private String locatingZipcode;
private LocalDateTime availableTime;
public boolean isRemoteDbActive() {
return remoteDbActive;
}
public void setRemoteDbActive(boolean remoteDbActive) {
this.remoteDbActive = remoteDbActive;
}
public Long getEffectiveHeadquartersId() {
return effectiveHeadquartersId;
}
public void setEffectiveHeadquartersId(Long effectiveHeadquartersId) {
this.effectiveHeadquartersId = effectiveHeadquartersId;
}
public String getTourName() {
return tourName;
}
public void setTourName(String tourName) {
this.tourName = tourName;
}
public String getPickupPerson() {
return pickupPerson;
}
public void setPickupPerson(String pickupPerson) {
this.pickupPerson = pickupPerson;
}
public String getPickupPhone() {
return pickupPhone;
}
public void setPickupPhone(String pickupPhone) {
this.pickupPhone = pickupPhone;
}
public String getPickupRemark() {
return pickupRemark;
}
public void setPickupRemark(String pickupRemark) {
this.pickupRemark = pickupRemark;
}
public String getPickupStreet() {
return pickupStreet;
}
public void setPickupStreet(String pickupStreet) {
this.pickupStreet = pickupStreet;
}
public String getPickupCountry() {
return pickupCountry;
}
public void setPickupCountry(String pickupCountry) {
this.pickupCountry = pickupCountry;
}
public String getDeliveryPerson() {
return deliveryPerson;
}
public void setDeliveryPerson(String deliveryPerson) {
this.deliveryPerson = deliveryPerson;
}
public String getDeliveryPhone() {
return deliveryPhone;
}
public void setDeliveryPhone(String deliveryPhone) {
this.deliveryPhone = deliveryPhone;
}
public String getDeliveryRemark() {
return deliveryRemark;
}
public void setDeliveryRemark(String deliveryRemark) {
this.deliveryRemark = deliveryRemark;
}
public String getDeliveryStreet() {
return deliveryStreet;
}
public void setDeliveryStreet(String deliveryStreet) {
this.deliveryStreet = deliveryStreet;
}
public String getDeliveryCountry() {
return deliveryCountry;
}
public void setDeliveryCountry(String deliveryCountry) {
this.deliveryCountry = deliveryCountry;
}
public Double getLocatingLatitude() {
return locatingLatitude;
}
public void setLocatingLatitude(Double locatingLatitude) {
this.locatingLatitude = locatingLatitude;
}
public Double getLocatingLongitude() {
return locatingLongitude;
}
public void setLocatingLongitude(Double locatingLongitude) {
this.locatingLongitude = locatingLongitude;
}
public LocalDateTime getLocatingTime() {
return locatingTime;
}
public void setLocatingTime(LocalDateTime locatingTime) {
this.locatingTime = locatingTime;
}
public Integer getLocatingType() {
return locatingType;
}
public void setLocatingType(Integer locatingType) {
this.locatingType = locatingType;
}
public String getLocatingTypeLabel() {
return locatingTypeLabel;
}
public void setLocatingTypeLabel(String locatingTypeLabel) {
this.locatingTypeLabel = locatingTypeLabel;
}
public String getLocatingZipcode() {
return locatingZipcode;
}
public void setLocatingZipcode(String locatingZipcode) {
this.locatingZipcode = locatingZipcode;
}
public LocalDateTime getAvailableTime() {
return availableTime;
}
public void setAvailableTime(LocalDateTime availableTime) {
this.availableTime = availableTime;
}
}

View File

@@ -0,0 +1,269 @@
package de.votian.services.dto;
import java.math.BigDecimal;
import java.time.LocalDateTime;
public class LonghaulJobRowDto {
private Long jobId;
private Integer status;
private Integer longhaulState;
private LocalDateTime orderTime;
private LocalDateTime takeTime;
private LocalDateTime finishTime;
private String customerName;
private String costCenterName;
private String commissionNo;
private String pickupName;
private String pickupZipcode;
private String pickupCity;
private Double pickupLatitude;
private Double pickupLongitude;
private String deliveryName;
private String deliveryZipcode;
private String deliveryCity;
private Double deliveryLatitude;
private Double deliveryLongitude;
private Long courierId;
private String courierSid;
private Long courierVehicleId;
private String courierVehicleSid;
private Integer vehicleTypeId;
private String vehicleTypeName;
private BigDecimal totalPrice;
private Double airDistanceKm;
private boolean manualLonghaul;
private boolean returnable;
public Long getJobId() {
return jobId;
}
public void setJobId(Long jobId) {
this.jobId = jobId;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getLonghaulState() {
return longhaulState;
}
public void setLonghaulState(Integer longhaulState) {
this.longhaulState = longhaulState;
}
public LocalDateTime getOrderTime() {
return orderTime;
}
public void setOrderTime(LocalDateTime orderTime) {
this.orderTime = orderTime;
}
public LocalDateTime getTakeTime() {
return takeTime;
}
public void setTakeTime(LocalDateTime takeTime) {
this.takeTime = takeTime;
}
public LocalDateTime getFinishTime() {
return finishTime;
}
public void setFinishTime(LocalDateTime finishTime) {
this.finishTime = finishTime;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public String getCostCenterName() {
return costCenterName;
}
public void setCostCenterName(String costCenterName) {
this.costCenterName = costCenterName;
}
public String getCommissionNo() {
return commissionNo;
}
public void setCommissionNo(String commissionNo) {
this.commissionNo = commissionNo;
}
public String getPickupName() {
return pickupName;
}
public void setPickupName(String pickupName) {
this.pickupName = pickupName;
}
public String getPickupZipcode() {
return pickupZipcode;
}
public void setPickupZipcode(String pickupZipcode) {
this.pickupZipcode = pickupZipcode;
}
public String getPickupCity() {
return pickupCity;
}
public void setPickupCity(String pickupCity) {
this.pickupCity = pickupCity;
}
public Double getPickupLatitude() {
return pickupLatitude;
}
public void setPickupLatitude(Double pickupLatitude) {
this.pickupLatitude = pickupLatitude;
}
public Double getPickupLongitude() {
return pickupLongitude;
}
public void setPickupLongitude(Double pickupLongitude) {
this.pickupLongitude = pickupLongitude;
}
public String getDeliveryName() {
return deliveryName;
}
public void setDeliveryName(String deliveryName) {
this.deliveryName = deliveryName;
}
public String getDeliveryZipcode() {
return deliveryZipcode;
}
public void setDeliveryZipcode(String deliveryZipcode) {
this.deliveryZipcode = deliveryZipcode;
}
public String getDeliveryCity() {
return deliveryCity;
}
public void setDeliveryCity(String deliveryCity) {
this.deliveryCity = deliveryCity;
}
public Double getDeliveryLatitude() {
return deliveryLatitude;
}
public void setDeliveryLatitude(Double deliveryLatitude) {
this.deliveryLatitude = deliveryLatitude;
}
public Double getDeliveryLongitude() {
return deliveryLongitude;
}
public void setDeliveryLongitude(Double deliveryLongitude) {
this.deliveryLongitude = deliveryLongitude;
}
public Long getCourierId() {
return courierId;
}
public void setCourierId(Long courierId) {
this.courierId = courierId;
}
public String getCourierSid() {
return courierSid;
}
public void setCourierSid(String courierSid) {
this.courierSid = courierSid;
}
public Long getCourierVehicleId() {
return courierVehicleId;
}
public void setCourierVehicleId(Long courierVehicleId) {
this.courierVehicleId = courierVehicleId;
}
public String getCourierVehicleSid() {
return courierVehicleSid;
}
public void setCourierVehicleSid(String courierVehicleSid) {
this.courierVehicleSid = courierVehicleSid;
}
public Integer getVehicleTypeId() {
return vehicleTypeId;
}
public void setVehicleTypeId(Integer vehicleTypeId) {
this.vehicleTypeId = vehicleTypeId;
}
public String getVehicleTypeName() {
return vehicleTypeName;
}
public void setVehicleTypeName(String vehicleTypeName) {
this.vehicleTypeName = vehicleTypeName;
}
public BigDecimal getTotalPrice() {
return totalPrice;
}
public void setTotalPrice(BigDecimal totalPrice) {
this.totalPrice = totalPrice;
}
public Double getAirDistanceKm() {
return airDistanceKm;
}
public void setAirDistanceKm(Double airDistanceKm) {
this.airDistanceKm = airDistanceKm;
}
public boolean isManualLonghaul() {
return manualLonghaul;
}
public void setManualLonghaul(boolean manualLonghaul) {
this.manualLonghaul = manualLonghaul;
}
public boolean isReturnable() {
return returnable;
}
public void setReturnable(boolean returnable) {
this.returnable = returnable;
}
}

View File

@@ -0,0 +1,68 @@
package de.votian.services.dto;
public class PublicHolidayDayDto {
private String isoDate;
private Integer month;
private Integer day;
private String weekdayName;
private boolean holiday;
private String name;
private boolean editable;
public String getIsoDate() {
return isoDate;
}
public void setIsoDate(String isoDate) {
this.isoDate = isoDate;
}
public Integer getMonth() {
return month;
}
public void setMonth(Integer month) {
this.month = month;
}
public Integer getDay() {
return day;
}
public void setDay(Integer day) {
this.day = day;
}
public String getWeekdayName() {
return weekdayName;
}
public void setWeekdayName(String weekdayName) {
this.weekdayName = weekdayName;
}
public boolean isHoliday() {
return holiday;
}
public void setHoliday(boolean holiday) {
this.holiday = holiday;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public boolean isEditable() {
return editable;
}
public void setEditable(boolean editable) {
this.editable = editable;
}
}

View File

@@ -0,0 +1,62 @@
package de.votian.services.dto;
import java.util.ArrayList;
import java.util.List;
public class PublicHolidayYearDto {
private Long headquartersId;
private int year;
private boolean editable;
private List<Integer> availableYears = new ArrayList<>();
private List<Integer> copySourceYears = new ArrayList<>();
private List<PublicHolidayDayDto> days = new ArrayList<>();
public Long getHeadquartersId() {
return headquartersId;
}
public void setHeadquartersId(Long headquartersId) {
this.headquartersId = headquartersId;
}
public int getYear() {
return year;
}
public void setYear(int year) {
this.year = year;
}
public boolean isEditable() {
return editable;
}
public void setEditable(boolean editable) {
this.editable = editable;
}
public List<Integer> getAvailableYears() {
return availableYears;
}
public void setAvailableYears(List<Integer> availableYears) {
this.availableYears = availableYears != null ? availableYears : new ArrayList<>();
}
public List<Integer> getCopySourceYears() {
return copySourceYears;
}
public void setCopySourceYears(List<Integer> copySourceYears) {
this.copySourceYears = copySourceYears != null ? copySourceYears : new ArrayList<>();
}
public List<PublicHolidayDayDto> getDays() {
return days;
}
public void setDays(List<PublicHolidayDayDto> days) {
this.days = days != null ? days : new ArrayList<>();
}
}

View File

@@ -0,0 +1,98 @@
package de.votian.services.dto;
import java.math.BigDecimal;
import java.time.LocalDate;
public class ServicePriceRowDto {
private Long serviceId;
private String serviceName;
private Integer serviceMode;
private Long serviceTypeId;
private String serviceTypeName;
private Long customerId;
private LocalDate validFrom;
private BigDecimal price;
private BigDecimal courierPrice;
private BigDecimal discount;
public Long getServiceId() {
return serviceId;
}
public void setServiceId(Long serviceId) {
this.serviceId = serviceId;
}
public String getServiceName() {
return serviceName;
}
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
public Integer getServiceMode() {
return serviceMode;
}
public void setServiceMode(Integer serviceMode) {
this.serviceMode = serviceMode;
}
public Long getServiceTypeId() {
return serviceTypeId;
}
public void setServiceTypeId(Long serviceTypeId) {
this.serviceTypeId = serviceTypeId;
}
public String getServiceTypeName() {
return serviceTypeName;
}
public void setServiceTypeName(String serviceTypeName) {
this.serviceTypeName = serviceTypeName;
}
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public LocalDate getValidFrom() {
return validFrom;
}
public void setValidFrom(LocalDate validFrom) {
this.validFrom = validFrom;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public BigDecimal getCourierPrice() {
return courierPrice;
}
public void setCourierPrice(BigDecimal courierPrice) {
this.courierPrice = courierPrice;
}
public BigDecimal getDiscount() {
return discount;
}
public void setDiscount(BigDecimal discount) {
this.discount = discount;
}
}

View File

@@ -0,0 +1,41 @@
package de.votian.services.dto;
public class ServiceRadiusDto {
private Long id;
private String zipcode;
private String cityDistrict;
private Integer radiusAreaNo;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getZipcode() {
return zipcode;
}
public void setZipcode(String zipcode) {
this.zipcode = zipcode;
}
public String getCityDistrict() {
return cityDistrict;
}
public void setCityDistrict(String cityDistrict) {
this.cityDistrict = cityDistrict;
}
public Integer getRadiusAreaNo() {
return radiusAreaNo;
}
public void setRadiusAreaNo(Integer radiusAreaNo) {
this.radiusAreaNo = radiusAreaNo;
}
}

View File

@@ -0,0 +1,70 @@
package de.votian.services.dto;
import java.math.BigDecimal;
public class ServiceZoneDto {
private Long id;
private Integer zoneNo;
private String name;
private BigDecimal price;
private BigDecimal price1;
private BigDecimal price2;
private BigDecimal price3;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Integer getZoneNo() {
return zoneNo;
}
public void setZoneNo(Integer zoneNo) {
this.zoneNo = zoneNo;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public BigDecimal getPrice1() {
return price1;
}
public void setPrice1(BigDecimal price1) {
this.price1 = price1;
}
public BigDecimal getPrice2() {
return price2;
}
public void setPrice2(BigDecimal price2) {
this.price2 = price2;
}
public BigDecimal getPrice3() {
return price3;
}
public void setPrice3(BigDecimal price3) {
this.price3 = price3;
}
}

View File

@@ -0,0 +1,79 @@
package de.votian.services.dto;
import java.math.BigDecimal;
public class ServiceZoneMappingDto {
private Long zoneId;
private Integer zoneNo;
private String zoneName;
private Long zipCodeId;
private String zipcode;
private BigDecimal mappedValue1;
private BigDecimal mappedValue2;
private BigDecimal mappedValue3;
public Long getZoneId() {
return zoneId;
}
public void setZoneId(Long zoneId) {
this.zoneId = zoneId;
}
public Integer getZoneNo() {
return zoneNo;
}
public void setZoneNo(Integer zoneNo) {
this.zoneNo = zoneNo;
}
public String getZoneName() {
return zoneName;
}
public void setZoneName(String zoneName) {
this.zoneName = zoneName;
}
public Long getZipCodeId() {
return zipCodeId;
}
public void setZipCodeId(Long zipCodeId) {
this.zipCodeId = zipCodeId;
}
public String getZipcode() {
return zipcode;
}
public void setZipcode(String zipcode) {
this.zipcode = zipcode;
}
public BigDecimal getMappedValue1() {
return mappedValue1;
}
public void setMappedValue1(BigDecimal mappedValue1) {
this.mappedValue1 = mappedValue1;
}
public BigDecimal getMappedValue2() {
return mappedValue2;
}
public void setMappedValue2(BigDecimal mappedValue2) {
this.mappedValue2 = mappedValue2;
}
public BigDecimal getMappedValue3() {
return mappedValue3;
}
public void setMappedValue3(BigDecimal mappedValue3) {
this.mappedValue3 = mappedValue3;
}
}

View File

@@ -0,0 +1,125 @@
package de.votian.services.dto;
import java.math.BigDecimal;
import java.time.LocalDate;
public class StatisticsSummaryDto {
private Long headquartersId;
private LocalDate fromDate;
private LocalDate toDate;
private long totalJobs;
private long openJobs;
private long deliveredJobs;
private long cancelledJobs;
private long todaysJobs;
private long customerCount;
private long courierCount;
private long employeeCount;
private BigDecimal totalRevenue;
private BigDecimal totalCourierCosts;
public Long getHeadquartersId() {
return headquartersId;
}
public void setHeadquartersId(Long headquartersId) {
this.headquartersId = headquartersId;
}
public LocalDate getFromDate() {
return fromDate;
}
public void setFromDate(LocalDate fromDate) {
this.fromDate = fromDate;
}
public LocalDate getToDate() {
return toDate;
}
public void setToDate(LocalDate toDate) {
this.toDate = toDate;
}
public long getTotalJobs() {
return totalJobs;
}
public void setTotalJobs(long totalJobs) {
this.totalJobs = totalJobs;
}
public long getOpenJobs() {
return openJobs;
}
public void setOpenJobs(long openJobs) {
this.openJobs = openJobs;
}
public long getDeliveredJobs() {
return deliveredJobs;
}
public void setDeliveredJobs(long deliveredJobs) {
this.deliveredJobs = deliveredJobs;
}
public long getCancelledJobs() {
return cancelledJobs;
}
public void setCancelledJobs(long cancelledJobs) {
this.cancelledJobs = cancelledJobs;
}
public long getTodaysJobs() {
return todaysJobs;
}
public void setTodaysJobs(long todaysJobs) {
this.todaysJobs = todaysJobs;
}
public long getCustomerCount() {
return customerCount;
}
public void setCustomerCount(long customerCount) {
this.customerCount = customerCount;
}
public long getCourierCount() {
return courierCount;
}
public void setCourierCount(long courierCount) {
this.courierCount = courierCount;
}
public long getEmployeeCount() {
return employeeCount;
}
public void setEmployeeCount(long employeeCount) {
this.employeeCount = employeeCount;
}
public BigDecimal getTotalRevenue() {
return totalRevenue;
}
public void setTotalRevenue(BigDecimal totalRevenue) {
this.totalRevenue = totalRevenue;
}
public BigDecimal getTotalCourierCosts() {
return totalCourierCosts;
}
public void setTotalCourierCosts(BigDecimal totalCourierCosts) {
this.totalCourierCosts = totalCourierCosts;
}
}

View File

@@ -0,0 +1,140 @@
package de.votian.services.dto;
public class TourDetailDto {
private Long id;
private Long jobId;
private Integer sort;
private String comp;
private String person;
private Long addressId;
private String street;
private String zipcode;
private String city;
private String hsno;
private String commissionNo;
private Integer status;
private String remark;
private String phone;
private Long costCenterId;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getJobId() {
return jobId;
}
public void setJobId(Long jobId) {
this.jobId = jobId;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public String getComp() {
return comp;
}
public void setComp(String comp) {
this.comp = comp;
}
public String getPerson() {
return person;
}
public void setPerson(String person) {
this.person = person;
}
public Long getAddressId() {
return addressId;
}
public void setAddressId(Long addressId) {
this.addressId = addressId;
}
public String getStreet() {
return street;
}
public void setStreet(String street) {
this.street = street;
}
public String getZipcode() {
return zipcode;
}
public void setZipcode(String zipcode) {
this.zipcode = zipcode;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getHsno() {
return hsno;
}
public void setHsno(String hsno) {
this.hsno = hsno;
}
public String getCommissionNo() {
return commissionNo;
}
public void setCommissionNo(String commissionNo) {
this.commissionNo = commissionNo;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public Long getCostCenterId() {
return costCenterId;
}
public void setCostCenterId(Long costCenterId) {
this.costCenterId = costCenterId;
}
}

Some files were not shown because too many files have changed in this diff Show More