Neue Ordner Sturktur(Data, Queue, QueueSave, QueueCopy, QueueFailed) + Optionales Speichern
This commit is contained in:
@@ -4,9 +4,14 @@
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
<appSettings>
|
||||
<add key="GkvAbrechnungResultFolderPath" value="C:\GkvAbrechnung\Results\" />
|
||||
<add key="GkvAbrechnungQueueFolderPath" value="C:\GkvAbrechnung\Queue\" />
|
||||
<add key="GkvAbrechnungFailedFolderPath" value="C:\GkvAbrechnung\Failed\" />
|
||||
<add key="GkvAbrechnungResultFolderPath" value="C:\GkvAbrechnung\Results\" />
|
||||
<add key="GkvAbrechnungQueueFolderPath" value="C:\GkvAbrechnung\Data\Queue\" />
|
||||
<add key="GkvAbrechnungCopyFolderPath" value="C:\GkvAbrechnung\Data\QueueCopy\" />
|
||||
<add key="GkvAbrechnungFailedFolderPath" value="C:\GkvAbrechnung\Data\QueueFailed\" />
|
||||
<add key="GkvAbrechnungSuccessFolderPath" value="C:\GkvAbrechnung\Data\QueueSuccess\" />
|
||||
<add key="GkvAbrechnungCopySave" value="True" />
|
||||
<add key="GkvAbrechnungFailedSave" value="True" />
|
||||
<add key="GkvAbrechnungSuccessSave" value="True" />
|
||||
<add key="DakotaExePath" value="C:\Program Files (x86)\ITSG\dakotale\dakota30.exe" />
|
||||
<add key="DakotaFolder" value="C:\dakotale\" />
|
||||
<add key="ProcessWaitForExitMs" value="10000" />
|
||||
|
||||
@@ -10,22 +10,44 @@ namespace DakotaSender
|
||||
{
|
||||
internal static class Config
|
||||
{
|
||||
public static string GkvSecretKey { get; set; } = ConfigurationManager.AppSettings.Get("GkvSecretKey");
|
||||
public static DirectoryInfo ResultFolder { get; }
|
||||
= new DirectoryInfo(ConfigurationManager.AppSettings.Get("GkvAbrechnungResultFolderPath") ?? @"C:\GkvAbrechnung\Results\");
|
||||
|
||||
public static DirectoryInfo QueueFolder { get; }
|
||||
= new DirectoryInfo(ConfigurationManager.AppSettings.Get("GkvAbrechnungQueueFolderPath") ?? @"C:\GkvAbrechnung\Data\Queue\");
|
||||
|
||||
public static DirectoryInfo CopyFolder { get; }
|
||||
= new DirectoryInfo(ConfigurationManager.AppSettings.Get("GkvAbrechnungCopyFolderPath") ?? @"C:\GkvAbrechnung\Data\Copy\");
|
||||
|
||||
public static DirectoryInfo FailedFolder { get; }
|
||||
= new DirectoryInfo(ConfigurationManager.AppSettings.Get("GkvAbrechnungFailedFolderPath") ?? @"C:\GkvAbrechnung\Data\Failed\");
|
||||
|
||||
public static DirectoryInfo SuccessFolder { get; }
|
||||
= new DirectoryInfo(ConfigurationManager.AppSettings.Get("GkvAbrechnungSuccessFolderPath") ?? @"C:\GkvAbrechnung\Data\Success\");
|
||||
|
||||
public static bool CopySave { get; }
|
||||
= bool.Parse(ConfigurationManager.AppSettings.Get("GkvAbrechnungCopySave") ?? bool.TrueString);
|
||||
|
||||
public static bool FailedSave { get; }
|
||||
= bool.Parse(ConfigurationManager.AppSettings.Get("GkvAbrechnungFailedSave") ?? bool.TrueString);
|
||||
|
||||
public static bool SuccessSave { get; }
|
||||
= bool.Parse(ConfigurationManager.AppSettings.Get("GkvAbrechnungSuccessSave") ?? bool.TrueString);
|
||||
|
||||
public static FileInfo DakotaExe { get; }
|
||||
= new FileInfo(ConfigurationManager.AppSettings.Get("DakotaExePath") ?? @"C:\Program Files (x86)\ITSG\dakotale\dakota30.exe");
|
||||
|
||||
public static DirectoryInfo DakotaFolder { get; }
|
||||
= new DirectoryInfo(ConfigurationManager.AppSettings.Get("DakotaFolder") ?? @"C:\dakotale\");
|
||||
|
||||
public static int ProcessWaitForExitMs { get; }
|
||||
= int.Parse(ConfigurationManager.AppSettings.Get("ProcessWaitForExitMs") ?? "10000");
|
||||
|
||||
public static string LogPath { get; }
|
||||
= ConfigurationManager.AppSettings.Get("LogPath") ?? @"C:\GkvAbrechnung\Sender\log.txt";
|
||||
public static int ProcessWaitForExitMs { get; }
|
||||
= int.Parse(ConfigurationManager.AppSettings.Get("ProcessWaitForExitMs") ?? "10000");
|
||||
public static FileInfo DakotaExe { get; }
|
||||
= new FileInfo(ConfigurationManager.AppSettings.Get("DakotaExePath") ?? @"C:\Program Files (x86)\ITSG\dakotale\dakota30.exe");
|
||||
public static DirectoryInfo DakotaFolder { get; }
|
||||
= new DirectoryInfo(ConfigurationManager.AppSettings.Get("DakotaFolder") ?? @"C:\dakotale\");
|
||||
public static DirectoryInfo QueueFolder { get; }
|
||||
= new DirectoryInfo(ConfigurationManager.AppSettings.Get("GkvAbrechnungQueueFolderPath") ?? @"C:\GkvAbrechnung\Queue\");
|
||||
public static DirectoryInfo ResultFolder { get; }
|
||||
= new DirectoryInfo(ConfigurationManager.AppSettings.Get("GkvAbrechnungResultFolderPath") ?? @"C:\GkvAbrechnung\Results\");
|
||||
public static DirectoryInfo FailedFolder { get; }
|
||||
= new DirectoryInfo(ConfigurationManager.AppSettings.Get("GkvAbrechnungFailedFolderPath") ?? @"C:\GkvAbrechnung\Failed\");
|
||||
|
||||
public static string GkvSecretKey { get; set; } = ConfigurationManager.AppSettings.Get("GkvSecretKey");
|
||||
|
||||
|
||||
public static bool IsDatenannahmestelleValid(string datenannahmestelle)
|
||||
{
|
||||
|
||||
@@ -10,13 +10,36 @@ namespace DakotaSender
|
||||
{
|
||||
internal static class FileController
|
||||
{
|
||||
internal static void CopyFileToCopy(DakotaSystemFile file)
|
||||
{
|
||||
if (!Config.CopySave)
|
||||
return;
|
||||
|
||||
var folder = Config.CopyFolder;
|
||||
|
||||
CopyFileTo(file.SourceAuftragsdatei, folder.FullName);
|
||||
CopyFileTo(file.SourceNutzdatendatei, folder.FullName);
|
||||
}
|
||||
internal static void CopyFileToFailed(DakotaSystemFile file)
|
||||
{
|
||||
if (!Config.FailedSave)
|
||||
return;
|
||||
|
||||
var failed_folder = Config.FailedFolder;
|
||||
|
||||
CopyFileTo(file.SourceAuftragsdatei, failed_folder.FullName);
|
||||
CopyFileTo(file.SourceNutzdatendatei, failed_folder.FullName);
|
||||
}
|
||||
internal static void CopyFileToSuccesss(DakotaSystemFile file)
|
||||
{
|
||||
if (!Config.SuccessSave)
|
||||
return;
|
||||
|
||||
var success_folder = Config.SuccessFolder;
|
||||
|
||||
CopyFileTo(file.SourceAuftragsdatei, success_folder.FullName);
|
||||
CopyFileTo(file.SourceNutzdatendatei, success_folder.FullName);
|
||||
}
|
||||
internal static void CopyFileToDestination(DakotaSystemFile file)
|
||||
{
|
||||
var folder = Config.LoadDatenannahmestelleFolder(file.Datenannahmestelle);
|
||||
|
||||
@@ -263,6 +263,10 @@ namespace DakotaSender
|
||||
PrintLine(msg);
|
||||
|
||||
Add2Results(file, GkvTransferResultType.Success);
|
||||
|
||||
FileController.CopyFileToCopy(file);
|
||||
|
||||
FileController.CopyFileToSuccesss(file);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -272,6 +276,8 @@ namespace DakotaSender
|
||||
|
||||
Add2Results(file, GkvTransferResultType.FailSoft, msg, "DS:Fehler");
|
||||
|
||||
FileController.CopyFileToCopy(file);
|
||||
|
||||
FileController.CopyFileToFailed(file);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
<add key="OpenrouteServiceApiUrlGeocode" value="https://api.openrouteservice.org/geocode/search" />
|
||||
<add key="OpenrouteServiceApiKey" value="5b3ce3597851110001cf62484b0917529e9a4008acda819dc06e47e8" />
|
||||
<add key="GkvAbrechnungResultFolderPath" value="C:\GkvAbrechnung\Results\" />
|
||||
<add key="GkvAbrechnungQueueFolderPath" value="C:\GkvAbrechnung\Queue\" />
|
||||
<add key="GkvAbrechnungQueueFolderPath" value="C:\GkvAbrechnung\Data\Queue\" />
|
||||
<add key="GkvKostentragerdateiFolderPath" value="C:\GkvAbrechnung\KTDatei\" />
|
||||
<add key="DakotaPath" value="C:\Program Files (x86)\ITSG\dakotale\dakota30.exe" />
|
||||
<add key="GkvSecretKey" value="DfDGNGn72PKfSYxSUsmRdzuBtpR9novewlmYU3gsjiFgSkaZZeylUXlbO42cWNqiKgLdMUFtWUNZT962F1raQDR7HGUzCNYsFeC" />
|
||||
|
||||
Reference in New Issue
Block a user