Update 20260529

This commit is contained in:
Stefan Hutter
2026-05-29 12:25:25 +02:00
parent 6d764dccd0
commit 42376fc823
35 changed files with 7025 additions and 86 deletions
+38 -16
View File
@@ -3,52 +3,74 @@
{
"key": "Ondoc_Versandstrasse_Paket",
"displayName": "Ondoc_Versandstrasse_Paket",
"sqlList": "SELECT ID, erstellt_am as Name from Ondoc_Versandstrasse_Paket order by Id desc",
"sqlList": "SELECT ID, convert(varchar(10),erstellt_am,104)+' '+' ' + convert(VARCHAR(8), erstellt_am, 14) as Erstellt_am, convert(varchar(10),versendet_am,104)+' '+' ' + convert(VARCHAR(8), versendet_am, 14) as Versendet_am, Ersteller, Aktiv, isnull(signed,1) as Signed from Ondoc_Versandstrasse_Paket [FILTER] order by Id desc",
"sqlById": "SELECT paket as JsonData from Ondoc_Versandstrasse_Paket where id= @id ",
"idField": "ID",
"displayField": "ID",
"jsonField": "JsonData",
"Buttons": "Öffnen;PaketAnzeige",
"AnzeigeDokument": "SELECT paket as JsonData from Ondoc_Versandstrasse_Paket where id= @id ",
"FilterColumns": ""
"AnzeigeDokument": "Select paket as JsonData from Ondoc_versandstrasse_paket where id=@id",
"FilterColumns": "ID"
},
{
"key": "NLOGApiDoc",
"displayName": "APIDoc",
"sqlList": "SELECT ID, CreatedOn, GUID from edoka_journale.dbo.nlogapidoc where message='Input JSON' and isnull(div,'')<>'' order by Id desc",
"key": "APIDokumente",
"displayName": "API-Dokumente/Pakete",
"sqlList": "SELECT ID, Erstellt_am, GUID from edoka_journale.dbo.view_api_dokumente [FILTER] order by Id desc",
"sqlById": "SELECT div as JsonData from edoka_journale.dbo.nlogapidoc where id= @id ",
"idField": "ID",
"displayField": "ID",
"jsonField": "JsonData",
"Buttons": "Öffnen;DokumenteAnzeigen",
"Buttons": "Öffnen",
"AnzeigeDokument": "SELECT EDOKA.dbo.BinaryToBase64(EDOKA.dbo.Doks.Dokument) FROM edoka_journale.dbo.NLOGApiDoc INNER JOIN EDOKA.dbo.Doks ON edoka_journale.dbo.NLOGApiDoc.Div COLLATE SQL_Latin1_General_CP1_CI_AS = EDOKA.dbo.Doks.DokumentID WHERE edoka_journale.dbo.NLOGApiDoc.GUID = @id AND edoka_journale.dbo.NLOGApiDoc.Div LIKE 'OFFEDK%'",
"FilterColumns": "ID;GUID"
},
{
"key": "APIArchivierung",
"displayName": "API-Archivierung",
"sqlList": "SELECT ID, Erstellt_am, GUID from edoka_journale.dbo.View_API_Archivierung [FILTER] order by Id desc",
"sqlById": "SELECT div as JsonData from edoka_journale.dbo.nlogapidoc where id= @id ",
"idField": "ID",
"displayField": "ID",
"jsonField": "JsonData",
"Buttons": "Öffnen",
"AnzeigeDokument": "",
"FilterColumns": "id;GUID"
"FilterColumns": "ID;GUID"
},
{
"key": "NLOGApiDoc",
"displayName": "API-NLOGApiDoc - last 500",
"sqlList": "SELECT top 500 [id],[Origin],[Message],[LogLevel],[CreatedOn],[UserID],case when len([Div])>30 then substring(div,1,27)+'...' else [div] end as DIV,[GUID] from edoka_journale.dbo.NLOGApiDoc [FILTER] order by id desc",
"sqlById": "",
"idField": "ID",
"displayField": "ID",
"jsonField": "JsonData",
"Buttons": "",
"AnzeigeDokument": "",
"FilterColumns": "ID;GUID"
},
{
"key": "CLMDokumente",
"displayName": "CLM-Dokumente",
"sqlList": "SELECT ID, clmdokumentid as CLM_ID, GUID, Erstellt_Am, Aktiv, Archivstatus, Archiviert from ondoc_clm_dokumente [FILTER] order by Id desc",
"sqlList": "SELECT ID, clmdokumentid as CLM_ID, GUID, convert(varchar(10),erstellt_am,104)+' '+' ' + convert(VARCHAR(8), erstellt_am, 14) as Erstellt_am , Aktiv, Archivstatus, Archiviert from ondoc_clm_dokumente [FILTER] order by Id desc",
"sqlById": "SELECT jsondata as JsonData from ondoc_clm_dokumente where id= @id ",
"idField": "ID",
"displayField": "ID",
"jsonField": "JsonData",
"Buttons": "Öffnen;Anzeigen",
"AnzeigeDokument": "SELECT dbo.BinaryToBase64(dokument) FROM dbo.OnDoc_CLM_Dokumente INNER JOIN dbo.Doks ON dbo.OnDoc_CLM_Dokumente.dokumentid = dbo.Doks.DokumentID where dbo.ondoc_clm_dokumente.id=@id",
"FilterColumns": "clmdokumentid;archivstatus"
"FilterColumns": "clmdokumentid;guid;archivstatus"
},
{
"key": "CLMJournal",
"displayName": "CLM-Journal",
"sqlList": "SELECT ID, clmdokumentid as CLM_ID, Dokumentid, GUID, Erstellt_Am, Aktiv, Archivstatus, Archiviert, Archiviert_am from ondoc_clm_dokumente [FILTER] order by Id desc",
"sqlById": " ",
"sqlList": "SELECT ID, clmdokumentid as CLM_ID, Dokumentid, GUID, convert(varchar(10),erstellt_am,104)+' '+' ' + convert(VARCHAR(8), erstellt_am, 14) as Erstellt_am, Aktiv, Archivstatus, Archiviert, isnull(convert(varchar(10),archiviert_am,104)+' '+ convert(VARCHAR(8), archiviert_am, 14) ,'') as Archiviert_am from ondoc_clm_dokumente [FILTER] order by Id desc",
"sqlById": "",
"idField": "ID",
"displayField": "ID",
"jsonField": "",
"Buttons": "Anzeigen",
"AnzeigeDokument": "SELECT dbo.BinaryToBase64(dokument) FROM dbo.OnDoc_CLM_Dokumente INNER JOIN dbo.Doks ON dbo.OnDoc_CLM_Dokumente.dokumentid = dbo.Doks.DokumentID where dbo.ondoc_clm_dokumente.id=@id",
"FilterColumns": "clmdokumentid;archivstatus;dokumentid"
"FilterColumns": "clmdokumentid;guid;archivstatus;dokumentid"
}
]
}
}
+23 -9
View File
@@ -311,7 +311,7 @@
function generateFromJson() {
var jsonText = editor.getValue();
alert("Hallo");
$.ajax({
type: "POST",
@@ -323,15 +323,24 @@
"Authorization": "Bearer " + "pZkuG6l6ORCEckqQimPK58PO1A9EnkMtL5oCgRX9WiWnD4xeH7ikGzhWnTBy/vk8J4Iiz8gCSx9uFHA4+DvITG0roO97sk82d/0BCjVlwLWINpXlJfGYEF3X96AdoCQvb3ruwv/tVqEHsSU5aNfyxBAe+EhLTHQ8t7ysgJZWh98="
},
success: function (response) {
var pdfWindow = window.open("");
pdfWindow.document.write("<iframe width='100%' height='100%' src='data:application/pdf;base64," + response.file + "'></iframe>");
//alert("Server Response: " + response.file);
PageMethods.SaveTempFile(
response.file,
function (response) {
window.open("/PDFViewer.aspx", "_blank").focus();
var a = 1;
},
function (err) {
alert(err.get_message());
}
);
},
error: function (err) {
alert("Error: " + err.responseText);
}
});
}
function showDoc(tableKey, id) {
@@ -339,15 +348,20 @@
tableKey,
id,
function (result) {
var pdfWindow = window.open("");
pdfWindow.document.write("<iframe width='100%' height='100%' src='data:application/pdf;base64," + result + "'></iframe>");
PageMethods.SaveTempFile(
result,
function (result) {
window.open("/PDFViewer.aspx", "_blank").focus();
},
function (err) {
alert(err.get_message());
}
);
},
function (err) {
alert(err.get_message())
alert(err.get_message());
}
);
}
function loadJson(tableKey, id) {
+16
View File
@@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Http.Results;
@@ -203,10 +204,25 @@ namespace WebApp
con.Open();
string doc = cmd.ExecuteScalar()?.ToString();
con.Close();
System.IO.File.WriteAllBytes(@"d:\apps\ondoc\admintemp\vp.pdf", Convert.FromBase64String(doc));
return doc;
}
}
[WebMethod]
public static object SaveTempFile(string base64)
{
var ms = new MemoryStream(Convert.FromBase64String(base64));
using (System.IO.FileStream file = new System.IO.FileStream(@"d:\apps\ondoc\admintemp\vp.pdf", System.IO.FileMode.Create, System.IO.FileAccess.Write))
{
byte[] bytes = new byte[ms.Length];
ms.Read(bytes, 0, (int)ms.Length);
file.Write(bytes, 0, bytes.Length);
ms.Close();
}
return "OK";
}
[WebMethod]
public static object GetJson(string table, string id)
{
var config = TableConfigProvider.LoadConfig();
+59 -39
View File
@@ -12,9 +12,9 @@
<script src="/Scripts/ace/ext-searchbox.js"></script>
<link href="/Content/bootstrap.min.css" ref="stylesheet" />
<link href="/Scripts/bootstrap532.min.js" rel="stylesheet" />
<%--<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" />--%>
<%--<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" />--%>
<%--<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>--%>
<%--<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.23.4/ace.js"></script>--%>
<%--<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.23.4/ace.js"></script>--%>
<style>
html, body {
@@ -159,7 +159,7 @@ padding-bottom:20px;
<!-- TITEL LINKS -->
<span class="navbar-brand">OnDoc-JSON-Viewer
</span>
</span>
<div class="ms-auto d-flex gap-2">
@@ -169,7 +169,7 @@ padding-bottom:20px;
Generieren
</button>
</div>
@@ -279,55 +279,55 @@ padding-bottom:20px;
"Authorization": "Bearer " + "pZkuG6l6ORCEckqQimPK58PO1A9EnkMtL5oCgRX9WiWnD4xeH7ikGzhWnTBy/vk8J4Iiz8gCSx9uFHA4+DvITG0roO97sk82d/0BCjVlwLWINpXlJfGYEF3X96AdoCQvb3ruwv/tVqEHsSU5aNfyxBAe+EhLTHQ8t7ysgJZWh98="
},
success: function (response) {
var pdfWindow = window.open("");
pdfWindow.document.write("<iframe width='100%' height='100%' src='data:application/pdf;base64," + response.file + "'></iframe>");
},
PageMethods.SaveTempFile(
response.file,
function (response) {
window.open("/PDFViewer.aspx", "_blank").focus();
var a = 1;
},
function (err) {
alert(err.get_message());
}
);
},
error: function (err) {
alert("Error: " + err.responseText);
}
});
}
function showDoc(tableKey, id) {
PageMethods.GetDoc(
tableKey,
id,
function (result) {
var pdfWindow = window.open("");
pdfWindow.document.write("<iframe width='100%' height='100%' src='data:application/pdf;base64," + result + "'></iframe>");
},
function (err) {
PageMethods.GetDoc(
tableKey,
id,
function (result) {
PageMethods.SaveTempFile(
result,
function (result) {
window.open("/PDFViewer.aspx", "_blank").focus();
},
function (err) {
alert(err.get_message());
}
);
},
function (err) {
alert(err.get_message());
}
);
}
alert(err.get_message())
}
);
}
function showAPIDocs(tableKey, id) {
PageMethods.gwrAPIDocs(
tableKey,
id,
function (result) {
var pdfWindow = window.open("");
pdfWindow.document.write("<iframe width='100%' height='100%' src='data:application/pdf;base64," + result + "'></iframe>");
},
function (err) {
alert(err.get_message())
}
);
}
function showPacDoc(tableKey, id) {
PageMethods.GetPacDoc(
tableKey,
id,
function (result) {
window.open("\PDFViewer.aspx", '_blank').focus();
//var pdfWindow = window.open("");
//pdfWindow.document.write("<iframe width='100%' height='100%' src='data:application/pdf;base64," + result + "'></iframe>");
window.open("\PDFViewer.aspx", '_blank').focus();
},
function (err) {
@@ -336,6 +336,26 @@ padding-bottom:20px;
);
}
function showPacDoc(tableKey, id) {
PageMethods.GetPacDoc(
tableKey,
id,
function (result) {
PageMethods.SaveTempFile(
result,
function (result) {
window.open("/PDFViewer.aspx", "_blank").focus();
},
function (err) {
alert(err.get_message());
}
);
},
function (err) {
alert(err.get_message());
}
);
}
function loadJson(tableKey, id) {
editor.setValue("// lade JSON ...", -1);
+26 -12
View File
@@ -251,7 +251,7 @@ namespace WebApp
string doc = cmd.ExecuteScalar()?.ToString();
con.Close();
var ms1 = new MemoryStream(Convert.FromBase64String(doc));
using (System.IO.FileStream file = new System.IO.FileStream(@"d:\apps\ondoc\admintemp\" + prefix + dr[2].ToString() + ".pdf", System.IO.FileMode.Create, System.IO.FileAccess.Write))
using (System.IO.FileStream file = new System.IO.FileStream(@"d:\apps\ondoc\admintemp\vp.pdf" , System.IO.FileMode.Create, System.IO.FileAccess.Write))
{
byte[] bytes = new byte[ms1.Length];
ms1.Read(bytes, 0, (int)ms1.Length);
@@ -295,21 +295,35 @@ namespace WebApp
Versandpaket vp = JsonConvert.DeserializeObject<Versandpaket>(dt.Rows[0][0].ToString());
var b64 = vp.finaldoc;
var ms = new MemoryStream(Convert.FromBase64String(b64));
using (System.IO.FileStream file = new System.IO.FileStream(@"d:\apps\ondoc\admintemp\vp.pdf", System.IO.FileMode.Create, System.IO.FileAccess.Write))
{
byte[] bytes = new byte[ms.Length];
ms.Read(bytes, 0, (int)ms.Length);
file.Write(bytes, 0, bytes.Length);
ms.Close();
}
//var ms = new MemoryStream(Convert.FromBase64String(b64));
//using (System.IO.FileStream file = new System.IO.FileStream(@"d:\apps\ondoc\admintemp\vp.pdf", System.IO.FileMode.Create, System.IO.FileAccess.Write))
//{
// byte[] bytes = new byte[ms.Length];
// ms.Read(bytes, 0, (int)ms.Length);
// file.Write(bytes, 0, bytes.Length);
// ms.Close();
//}
//System.Diagnostics.Process.Start(@"d:\apps\ondoc\admintemp\vp.pdf");
//System.IO.File.Delete("d:\\ondoc\\temp\\vp.pdf");
return "";
return b64;
}
}
[WebMethod]
public static object SaveTempFile(string base64)
{
var ms = new MemoryStream(Convert.FromBase64String(base64));
using (System.IO.FileStream file = new System.IO.FileStream(@"d:\apps\ondoc\admintemp\vp.pdf", System.IO.FileMode.Create, System.IO.FileAccess.Write))
{
byte[] bytes = new byte[ms.Length];
ms.Read(bytes, 0, (int)ms.Length);
file.Write(bytes, 0, bytes.Length);
ms.Close();
}
return "OK";
}
[WebMethod]
public static object GetDoc(string table, string id)
{
@@ -323,7 +337,7 @@ namespace WebApp
con.Open();
string doc = cmd.ExecuteScalar()?.ToString();
con.Close();
return doc;
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.