From ef8833dd59ed78d1897991bb765bdf482a825aaa Mon Sep 17 00:00:00 2001 From: Ralph Soika Date: Mon, 17 Jul 2023 15:54:18 +0200 Subject: [PATCH] started version 1.2.13 - debitor statistik --- office-alexander-logistics-app/pom.xml | 2 +- .../DebitorStatistikController.java | 135 +++++++++++++ .../alexander/section_debitor_statistic.xhtml | 77 ++++++++ .../alexander/section_opliste_readonly.xhtml | 186 ++++++++++++++++++ pom.xml | 2 +- ...bpmn => debitoren-statistik-de-1.0.0.bpmn} | 71 ++++--- 6 files changed, 442 insertions(+), 31 deletions(-) create mode 100644 office-alexander-logistics-app/src/main/java/com/alexanderlogistics/DebitorStatistikController.java create mode 100644 office-alexander-logistics-app/src/main/webapp/pages/workitems/forms/alexander/section_debitor_statistic.xhtml create mode 100644 office-alexander-logistics-app/src/main/webapp/pages/workitems/forms/alexander/section_opliste_readonly.xhtml rename workflow/{statistik-de-1.0.0.bpmn => debitoren-statistik-de-1.0.0.bpmn} (87%) diff --git a/office-alexander-logistics-app/pom.xml b/office-alexander-logistics-app/pom.xml index f3cf00b..e2cc210 100644 --- a/office-alexander-logistics-app/pom.xml +++ b/office-alexander-logistics-app/pom.xml @@ -4,7 +4,7 @@ office-alexander-logistics com.alexander-logistics - 1.2.12 + 1.2.13 office-alexander-logistics-app war diff --git a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/DebitorStatistikController.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/DebitorStatistikController.java new file mode 100644 index 0000000..9c222ad --- /dev/null +++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/DebitorStatistikController.java @@ -0,0 +1,135 @@ +package com.alexanderlogistics; + +import java.io.Serializable; +import java.util.logging.Logger; + +import javax.enterprise.context.ConversationScoped; +import javax.inject.Inject; +import javax.inject.Named; + +import org.imixs.workflow.engine.DocumentService; +import org.imixs.workflow.exceptions.QueryException; +import org.imixs.workflow.faces.data.WorkflowController; + +/** + * Der InvoiceAnalyseController dient zur Auswertung der Sachprüfungs WOrklfow + * Schritte. Die Analyse Seite ist büer das Admin Menü erreichbar. + * + * @author rsoika + * + */ +@Named +@ConversationScoped +public class DebitorStatistikController implements Serializable { + + private static final long serialVersionUID = 1L; + private static Logger logger = Logger.getLogger(DebitorStatistikController.class.getName()); + + @Inject + protected DocumentService documentService; + + @Inject + protected WorkflowController workflowController; + + public int getZahlungsmoral() { + + return 0; + } + + public int getRechnungen() { + int result = 0; + String dbtNr = workflowController.getWorkitem().getItemValueString("dbtr.number"); + if (dbtNr.startsWith("D") || dbtNr.startsWith("K")) { + dbtNr = dbtNr.substring(1); + } + try { + result = documentService + .count("(type:workitem OR type:workitemarchive) AND dbtr.number:" + dbtNr + + " AND $workflowgroup:\"Rechnungsausgang\""); + } catch (QueryException e) { + logger.severe("Failed to get statistic: " + e.getMessage()); + } + return result; + } + + public int getRechnungenBezahlt() { + int result = 0; + String dbtNr = workflowController.getWorkitem().getItemValueString("dbtr.number"); + if (dbtNr.startsWith("D") || dbtNr.startsWith("K")) { + dbtNr = dbtNr.substring(1); + } + try { + result = documentService + .count("(type:workitem OR type:workitemarchive) AND dbtr.number:" + dbtNr + + " AND $workflowgroup:\"Rechnungsausgang\" AND ($taskid:[5900 TO 5999])"); + } catch (QueryException e) { + logger.severe("Failed to get statistic: " + e.getMessage()); + } + return result; + } + + public int getRechnungenOffen() { + int result = 0; + String dbtNr = workflowController.getWorkitem().getItemValueString("dbtr.number"); + if (dbtNr.startsWith("D") || dbtNr.startsWith("K")) { + dbtNr = dbtNr.substring(1); + } + try { + result = documentService + .count("(type:workitem) AND dbtr.number:" + dbtNr + + " AND $workflowgroup:\"Rechnungsausgang\" AND ($taskid:[5000 TO 5099])"); + } catch (QueryException e) { + logger.severe("Failed to get statistic: " + e.getMessage()); + } + return result; + } + + public int getRechnungenFaellig() { + int result = 0; + String dbtNr = workflowController.getWorkitem().getItemValueString("dbtr.number"); + if (dbtNr.startsWith("D") || dbtNr.startsWith("K")) { + dbtNr = dbtNr.substring(1); + } + try { + result = documentService + .count("(type:workitem) AND dbtr.number:" + dbtNr + + " AND $workflowgroup:\"Rechnungsausgang\" AND ($taskid:[5100 TO 5199])"); + } catch (QueryException e) { + logger.severe("Failed to get statistic: " + e.getMessage()); + } + return result; + } + + public int getRechnungenGemahnt() { + int result = 0; + String dbtNr = workflowController.getWorkitem().getItemValueString("dbtr.number"); + if (dbtNr.startsWith("D") || dbtNr.startsWith("K")) { + dbtNr = dbtNr.substring(1); + } + try { + result = documentService + .count("(type:workitem ) AND dbtr.number:" + dbtNr + + " AND $workflowgroup:\"Rechnungsausgang\" AND ($taskid:[5200 TO 5299])"); + } catch (QueryException e) { + logger.severe("Failed to get statistic: " + e.getMessage()); + } + return result; + } + + public int getRechnungenInkasso() { + int result = 0; + String dbtNr = workflowController.getWorkitem().getItemValueString("dbtr.number"); + if (dbtNr.startsWith("D") || dbtNr.startsWith("K")) { + dbtNr = dbtNr.substring(1); + } + try { + result = documentService + .count("(type:workitem OR type:workitemarchive) AND dbtr.number:" + dbtNr + + " AND $workflowgroup:\"Rechnungsausgang\" AND ($taskid:[5300 TO 5399])"); + } catch (QueryException e) { + logger.severe("Failed to get statistic: " + e.getMessage()); + } + return result; + } + +} diff --git a/office-alexander-logistics-app/src/main/webapp/pages/workitems/forms/alexander/section_debitor_statistic.xhtml b/office-alexander-logistics-app/src/main/webapp/pages/workitems/forms/alexander/section_debitor_statistic.xhtml new file mode 100644 index 0000000..4a03772 --- /dev/null +++ b/office-alexander-logistics-app/src/main/webapp/pages/workitems/forms/alexander/section_debitor_statistic.xhtml @@ -0,0 +1,77 @@ + + + + + + + + + +
+
Anzahl Rechnungen
+
+ #{debitorStatistikController.rechnungen} +
+
+ +
+
Anzahl Offen
+
+ #{debitorStatistikController.rechnungenOffen} +
+
+
+
Anzahl Offen
+
+ #{debitorStatistikController.rechnungenFaellig} +
+
+
+
Anzahl Rechnungen in Mahnung
+
+ #{debitorStatistikController.rechnungenGemahnt} +
+
+
+
Anzahl Rechnungen in Inkasso
+
+ #{debitorStatistikController.rechnungenInkasso} +
+
+ +
+
Anzahl Rechnungen Bezahlt
+
+ #{debitorStatistikController.rechnungenBezahlt} +
+
+ + + + + +
+ + + + + + + +
\ No newline at end of file diff --git a/office-alexander-logistics-app/src/main/webapp/pages/workitems/forms/alexander/section_opliste_readonly.xhtml b/office-alexander-logistics-app/src/main/webapp/pages/workitems/forms/alexander/section_opliste_readonly.xhtml new file mode 100644 index 0000000..7efeab3 --- /dev/null +++ b/office-alexander-logistics-app/src/main/webapp/pages/workitems/forms/alexander/section_opliste_readonly.xhtml @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rg-Nr.#{message['form.date']}#{message['form.deadline']}StatusS/HKursBasisumsatz + + Saldo + +
+ + #{invoice.item['invoice.number']} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + Summary + + + + + +
+ + + + +
+
EUR
USD
+ + + + + + + + +
+ + +
+ + + + + +
\ No newline at end of file diff --git a/pom.xml b/pom.xml index 62a1ce4..3f5e89c 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.alexander-logistics office-alexander-logistics - 1.2.12 + 1.2.13 pom Imixs Office Workflow - Custom Build diff --git a/workflow/statistik-de-1.0.0.bpmn b/workflow/debitoren-statistik-de-1.0.0.bpmn similarity index 87% rename from workflow/statistik-de-1.0.0.bpmn rename to workflow/debitoren-statistik-de-1.0.0.bpmn index 4eca60c..bc3f4e7 100644 --- a/workflow/statistik-de-1.0.0.bpmn +++ b/workflow/debitoren-statistik-de-1.0.0.bpmn @@ -1,20 +1,15 @@ - + - + - - - + + + - - - - - @@ -78,7 +73,7 @@ th { font-weight: bold;} - + @@ -91,6 +86,7 @@ th { font-weight: bold;} IntermediateCatchEvent_7 IntermediateCatchEvent_6 + event_jQDkFw @@ -127,7 +123,7 @@ th { font-weight: bold;} $workflowgroup - $workflowstatus]]> SequenceFlow_10 sequenceFlow_hED8Yg - sequenceFlow_yrOwew + sequenceFlow_UsDDXQ @@ -171,6 +167,7 @@ th { font-weight: bold;} $workflowgroup - $workflowstatus]]> SequenceFlow_4 sequenceFlow_OWDjfA + sequenceFlow_dSd0Og @@ -233,7 +230,7 @@ th { font-weight: bold;} - sequenceFlow_yrOwew + sequenceFlow_UsDDXQ @@ -243,16 +240,11 @@ th { font-weight: bold;} - - - - - - - - - + + + + ]]> @@ -340,8 +332,20 @@ result.isValid=true; - - + + + + + + + + sequenceFlow_dSd0Og + + + + + + @@ -377,9 +381,9 @@ result.isValid=true; - + - + @@ -417,7 +421,6 @@ result.isValid=true; - @@ -429,9 +432,19 @@ result.isValid=true; - - + + + + + + + + + + + +