update 20250324

This commit is contained in:
Stefan Hutter
2025-03-24 21:19:13 +01:00
parent 9651721aa0
commit c767e2ed82
184 changed files with 908767 additions and 445 deletions

View File

@@ -24,6 +24,8 @@ using DOCGEN.Klassen;
using CSVNET;
using System.Data;
using Helper;
using System.Runtime.CompilerServices;
using System.Web.UI.WebControls;
namespace API_NetFramework.Controllers
@@ -140,7 +142,7 @@ namespace API_NetFramework.Controllers
[HttpGet]
[Route("API/ArchiveDocFromDatabase")]
public IHttpActionResult ArchivDocFromDatabase(string DokumentID)
public IHttpActionResult ArchivDocFromDatabase(string DokumentID, string pdfdoc = "")
{
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
{
@@ -305,6 +307,10 @@ namespace API_NetFramework.Controllers
onbasedoc.attributes.Add(na);
}
onbasedoc.dokumentDatei = dok.dokument;
if(pdfdoc != ""){
onbasedoc.dokumentDatum=pdfdoc;
}
db = null;
ILResponse ilr = new ILResponse();
string debugfilename = System.Configuration.ConfigurationManager.AppSettings["JSONDebugPath"];
@@ -539,5 +545,125 @@ namespace API_NetFramework.Controllers
return Content(HttpStatusCode.InternalServerError, ilr);
}
}
[HttpPost]
[Route("API/Send_Versandstrasse")]
public IHttpActionResult Send_Versandstrasse()
{
string json_versandpaket = Request.Content.ReadAsStringAsync().Result;
Versandpaket versandpaket = new Versandpaket();
versandpaket.Dokument = new List<Versanddokument>();
versandpaket = JsonConvert.DeserializeObject<Versandpaket>(json_versandpaket);
string inthandle = "";
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
{
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
}
string ArchivAktiv;
ArchivAktiv = System.Configuration.ConfigurationManager.AppSettings["ArchivierungAktiv"].ToString();
if (ArchivAktiv != "True")
{
string message = "Hinweismeldung: " + System.Configuration.ConfigurationManager.AppSettings["ArchivierungNoAktivMessage"].ToString();
return Content(HttpStatusCode.OK, message);
}
try
{
OnBase_Attributes oba = new OnBase_Attributes();
if (!versandpaket.send_onbase_doc)
{
oba.BPNummer = versandpaket.partnernr.ToString();
oba.DocumentHandle = "";
oba.DistributionOption = versandpaket.Versandoption.ToString();
oba.GASCouvert = versandpaket.GAS;
oba.Returnaddress = versandpaket.GASAdresse;
oba.O2ODochandle = "";
oba.Status = "";
}
else
{
foreach (Versanddokument vd in versandpaket.Dokument)
{
IHttpActionResult res = ArchivDocFromDatabase(vd.DokumentID, vd.dokument);
DB db = new DB(connectionstring);
db.clear_parameter();
db.add_parameter("@dokumentid", vd.DokumentID);
db.Get_Tabledata("sp_get_handle", true, false);
if (db.dsdaten.Tables[0].Rows.Count > 0)
{
inthandle = db.dsdaten.Tables[0].Rows[0][0].ToString();
oba.DocumentHandle = inthandle;
versandpaket.finaldoc = "";
}
db = null;
}
}
OnBaseDocUpload.OnBaseDokument onbasedoc = new OnBaseDocUpload.OnBaseDokument();
onbasedoc.bpNummer = oba.BPNummer;
onbasedoc.personNummer = "";
onbasedoc.dokumentDatum = DateTime.Now.ToString("dd.MM.yyyy");
onbasedoc.dokumentDatei = versandpaket.finaldoc;
onbasedoc.dateiTyp = "PDF";
onbasedoc.attributes = new List<OnBaseDocUpload.attribute>();
onbasedoc.attributes.Add(new OnBaseDocUpload.attribute("Document Handle",oba.DocumentHandle.ToString()));
onbasedoc.attributes.Add(new OnBaseDocUpload.attribute("O2O DistributionOption",oba.DistributionOption.ToString()));
onbasedoc.attributes.Add(new OnBaseDocUpload.attribute("O2O GasCouvert", oba.GASCouvert.ToString()));
onbasedoc.attributes.Add(new OnBaseDocUpload.attribute("O2O Returnaddress", oba.Returnaddress.ToString()));
onbasedoc.attributes.Add(new OnBaseDocUpload.attribute("O2O Dochandle", oba.O2ODochandle.ToString()));
onbasedoc.attributes.Add(new OnBaseDocUpload.attribute("O2O Status", oba.Status.ToString()));
ILResponse ilr = new ILResponse();
string debugfilename = System.Configuration.ConfigurationManager.AppSettings["JSONDebugPath"];
string SendToOnBase = System.Configuration.ConfigurationManager.AppSettings["SendToOnBase"];
string SendToFile = System.Configuration.ConfigurationManager.AppSettings["SendToFile"];
string debugdir = System.Configuration.ConfigurationManager.AppSettings["DebugDir"];
string jsonstring = Newtonsoft.Json.JsonConvert.SerializeObject(onbasedoc);
IHttpActionResult transferResult = null;
if (SendToOnBase != "Yes")
{
transferResult = Transfer_OnBase(uploadtype.fast, ref jsonstring, ref ilr);
if (SendToFile == "Yes")
{
if (debugfilename != "")
{
debugfilename = debugfilename + "VS_"+oba.BPNummer+"_"+DateTime.Now.ToString("yyyyMMddhhmmss")+".json";
System.IO.File.WriteAllText(debugfilename, jsonstring);
debugfilename = debugfilename + ".pdf";
Helper.clsFileHelper fh = new Helper.clsFileHelper();
fh.SaveBase64ToFile(onbasedoc.dokumentDatei, debugfilename);
fh = null;
}
}
}
APILogging.Log((HttpRequestMessage)Request, "Opload Versandstrasse:" + debugfilename, LogLevelType.Debug);
//Log nachführen
// Update_IL_Log(ref ilr, DokumentID);
if (ilr.senderror == 1)
{
return Content(HttpStatusCode.InternalServerError, ilr.response);
}
else
{
update_dokumentstatus(debugfilename);
return Content(HttpStatusCode.OK, oba.BPNummer.ToString() + " *archiviert*");
}
}
catch (Exception e)
{
APILogging.Log((HttpRequestMessage)Request, e.Message, LogLevelType.Error);
return Content(HttpStatusCode.InternalServerError, e.Message);
}
finally
{
}
}
}
}

View File

@@ -41,7 +41,7 @@
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.8.1" />
<httpRuntime targetFramework="4.8.1" />
<httpRuntime targetFramework="4.8.1" maxRequestLength="102400" />
</system.web>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
@@ -148,6 +148,11 @@
<remove name="TRACEVerbHandler" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="104857600" />
</requestFiltering>
</security>
</system.webServer>
</configuration>

Binary file not shown.

Binary file not shown.

View File

@@ -41,7 +41,7 @@
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.8.1" />
<httpRuntime targetFramework="4.8.1" />
<httpRuntime targetFramework="4.8.1" maxRequestLength="102400" />
</system.web>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
@@ -148,6 +148,11 @@
<remove name="TRACEVerbHandler" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="104857600" />
</requestFiltering>
</security>
</system.webServer>
</configuration>

View File

@@ -5852,3 +5852,108 @@ done
2025-03-19 17:34:30.3949|DEBUG|OnDoc|
2025-03-19 17:34:30.4079|DEBUG|OnDoc|
2025-03-19 17:34:30.4244|DEBUG|OnDoc|Mail Versand NOK: Spalte 1 wurde nicht gefunden.
2025-03-23 20:30:22.2820|ERROR|OnDoc|Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
2025-03-23 20:30:36.2531|ERROR|OnDoc|Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
2025-03-23 20:31:25.3946|ERROR|OnDoc|Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
2025-03-23 20:31:43.2455|ERROR|OnDoc|Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
2025-03-23 20:33:13.7869|ERROR|OnDoc|Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
2025-03-23 20:33:49.0744|ERROR|OnDoc|Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
2025-03-23 20:38:19.4570|DEBUG|OnDoc|Start Transfer to OnBase
2025-03-23 20:38:19.6060|DEBUG|OnDoc|Ende Transfer to OnBase
2025-03-23 20:38:27.3017|DEBUG|OnDoc|Opload Versandstrasse:X:\\jsontemp\VS_1000208_20250323083822.json.pdf
2025-03-23 20:39:17.1137|DEBUG|OnDoc|Start Transfer to OnBase
2025-03-23 20:39:17.1271|DEBUG|OnDoc|Ende Transfer to OnBase
2025-03-23 20:39:17.1271|DEBUG|OnDoc|Opload Versandstrasse:X:\\jsontemp\VS_1000208_20250323083917.json.pdf
2025-03-23 20:39:17.1271|DEBUG|OnDoc|
2025-03-23 20:39:17.1271|DEBUG|OnDoc|
2025-03-23 20:43:19.1828|DEBUG|OnDoc|Start ArchiveDocFromDatabase: DokumentID:OFFEDK0082025002491700
2025-03-23 20:43:19.2478|DEBUG|OnDoc|
2025-03-23 20:43:19.2781|DEBUG|OnDoc|
2025-03-23 20:43:19.2811|DEBUG|OnDoc|
2025-03-23 20:43:19.2811|DEBUG|OnDoc|
2025-03-23 20:43:19.2811|DEBUG|OnDoc|
2025-03-23 20:43:19.5365|DEBUG|OnDoc|
2025-03-23 20:43:19.5365|DEBUG|OnDoc|
2025-03-23 20:43:19.5365|DEBUG|OnDoc|
2025-03-23 20:43:20.7732|DEBUG|OnDoc|Start Transfer to OnBase
2025-03-23 20:43:20.9579|DEBUG|OnDoc|Ende Transfer to OnBase
2025-03-23 20:43:20.9579|DEBUG|OnDoc|Ende ArchiveDocFromDatabase: DokumentID:OFFEDK0082025002491700
2025-03-23 20:43:20.9579|DEBUG|OnDoc|Start Update IL_Log: DokumentID:OFFEDK0082025002491700
2025-03-23 20:43:20.9754|DEBUG|OnDoc|Ende Update IL_Log: DokumentID:OFFEDK0082025002491700
2025-03-23 20:43:20.9754|DEBUG|OnDoc|
2025-03-23 20:43:20.9754|DEBUG|OnDoc|
2025-03-23 20:43:20.9754|DEBUG|OnDoc|
2025-03-23 20:43:21.0277|DEBUG|OnDoc|
2025-03-23 20:43:21.0277|DEBUG|OnDoc|
2025-03-23 20:43:21.0322|DEBUG|OnDoc|
2025-03-23 20:43:30.0448|DEBUG|OnDoc|
2025-03-23 20:43:30.1080|DEBUG|OnDoc|
2025-03-23 20:43:46.9277|DEBUG|OnDoc|
2025-03-23 20:43:46.9632|DEBUG|OnDoc|
2025-03-23 20:44:00.7693|DEBUG|OnDoc|Start ArchiveDocFromDatabase: DokumentID:OFFEDK0082025002491700
2025-03-23 20:44:02.6271|DEBUG|OnDoc|
2025-03-23 20:44:02.6609|DEBUG|OnDoc|
2025-03-23 20:44:10.0466|DEBUG|OnDoc|
2025-03-23 20:44:10.0820|DEBUG|OnDoc|
2025-03-23 20:44:16.5448|DEBUG|OnDoc|
2025-03-23 20:44:16.5862|DEBUG|OnDoc|
2025-03-23 20:44:22.1131|DEBUG|OnDoc|
2025-03-23 20:44:22.1502|DEBUG|OnDoc|
2025-03-23 20:44:42.8538|DEBUG|OnDoc|Start Transfer to OnBase
2025-03-23 20:44:42.9284|DEBUG|OnDoc|Ende Transfer to OnBase
2025-03-23 20:44:48.6483|DEBUG|OnDoc|Ende ArchiveDocFromDatabase: DokumentID:OFFEDK0082025002491700
2025-03-23 20:44:49.9665|DEBUG|OnDoc|Start Update IL_Log: DokumentID:OFFEDK0082025002491700
2025-03-23 20:44:49.9823|DEBUG|OnDoc|Ende Update IL_Log: DokumentID:OFFEDK0082025002491700
2025-03-23 20:45:29.7115|DEBUG|OnDoc|
2025-03-23 20:45:29.7467|DEBUG|OnDoc|
2025-03-23 20:45:29.7467|DEBUG|OnDoc|
2025-03-23 20:45:29.7517|DEBUG|OnDoc|
2025-03-23 20:45:29.7517|DEBUG|OnDoc|
2025-03-23 20:45:29.7517|DEBUG|OnDoc|
2025-03-23 20:45:34.9513|DEBUG|OnDoc|
2025-03-23 20:45:34.9875|DEBUG|OnDoc|
2025-03-23 20:47:10.9616|DEBUG|OnDoc|Start Transfer to OnBase
2025-03-23 20:47:11.0159|DEBUG|OnDoc|Ende Transfer to OnBase
2025-03-23 20:47:11.0159|DEBUG|OnDoc|Opload Versandstrasse:X:\\jsontemp\VS__20250323084711.json.pdf
2025-03-23 20:47:11.0159|DEBUG|OnDoc|
2025-03-23 20:47:11.0159|DEBUG|OnDoc|
2025-03-23 20:47:57.9891|DEBUG|OnDoc|Start ArchiveDocFromDatabase: DokumentID:OFFEDK0082025002491692
2025-03-23 20:47:58.0220|DEBUG|OnDoc|
2025-03-23 20:47:58.0496|DEBUG|OnDoc|
2025-03-23 20:47:58.0496|DEBUG|OnDoc|
2025-03-23 20:47:58.0496|DEBUG|OnDoc|
2025-03-23 20:47:58.0496|DEBUG|OnDoc|OFFEDK0082025002491692 ErstellungInOffec - EDKB02DMS
2025-03-23 20:47:58.0496|DEBUG|OnDoc|
2025-03-23 20:47:58.0673|DEBUG|OnDoc|
2025-03-23 20:47:58.0673|INFO|OnDoc|Dokumentarchivierung via EDKB02_DMS ausgelöstOFFEDK0082025002491692
2025-03-23 20:48:18.6242|DEBUG|OnDoc|Start ArchiveDocFromDatabase: DokumentID:OFFEDK0082025002491692
2025-03-23 20:48:21.0110|DEBUG|OnDoc|
2025-03-23 20:48:21.0445|DEBUG|OnDoc|
2025-03-23 20:48:37.6183|DEBUG|OnDoc|
2025-03-23 20:48:50.3467|DEBUG|OnDoc|
2025-03-23 20:49:00.0544|DEBUG|OnDoc|OFFEDK0082025002491692 ErstellungInOffec - EDKB02DMS
2025-03-23 20:49:00.1124|DEBUG|OnDoc|
2025-03-23 20:49:00.1124|DEBUG|OnDoc|
2025-03-23 20:49:00.1124|DEBUG|OnDoc|Dokument nicht im Status in Bearbeitung - Bereits archiviert: OFFEDK0082025002491692OFFEDK0082025002491692
2025-03-23 20:49:00.1124|DEBUG|OnDoc|
2025-03-23 20:49:00.1124|DEBUG|OnDoc|
2025-03-23 20:49:00.1124|DEBUG|OnDoc|Start Transfer to OnBase
2025-03-23 20:49:00.2337|DEBUG|OnDoc|Ende Transfer to OnBase
2025-03-23 20:49:00.2337|DEBUG|OnDoc|Opload Versandstrasse:X:\\jsontemp\VS__20250323084900.json.pdf
2025-03-23 20:49:00.2498|DEBUG|OnDoc|
2025-03-23 20:49:00.2498|DEBUG|OnDoc|
2025-03-23 20:50:41.3756|DEBUG|OnDoc|Start ArchiveDocFromDatabase: DokumentID:OFFEDK0082025002491726
2025-03-23 20:50:41.4116|DEBUG|OnDoc|
2025-03-23 20:50:41.4366|DEBUG|OnDoc|
2025-03-23 20:50:41.4396|DEBUG|OnDoc|
2025-03-23 20:50:41.4396|DEBUG|OnDoc|
2025-03-23 20:50:41.4396|DEBUG|OnDoc|
2025-03-23 20:50:41.4396|DEBUG|OnDoc|
2025-03-23 20:50:41.4396|DEBUG|OnDoc|
2025-03-23 20:50:41.4526|DEBUG|OnDoc|
2025-03-23 20:50:49.4205|DEBUG|OnDoc|Start Transfer to OnBase
2025-03-23 20:50:57.4507|DEBUG|OnDoc|Ende ArchiveDocFromDatabase: DokumentID:OFFEDK0082025002491726
2025-03-23 20:50:57.9901|DEBUG|OnDoc|Start Update IL_Log: DokumentID:OFFEDK0082025002491726
2025-03-23 20:50:58.0061|DEBUG|OnDoc|Ende Update IL_Log: DokumentID:OFFEDK0082025002491726
2025-03-23 20:51:12.6050|DEBUG|OnDoc|
2025-03-23 20:51:12.6140|DEBUG|OnDoc|