From 4f587e1466927dbe8ed33411ed36e6bfcbefeb3f Mon Sep 17 00:00:00 2001 From: Ralph Soika Date: Wed, 9 Oct 2024 14:47:14 +0200 Subject: [PATCH] debitor analyse --- .../AGLAnalyticControllerDebitor.java | 16 ++++++---- .../AGLAnalyticControllerSteuer.java | 15 +++++++-- workflow/dwc/analyse-debitor-en-1.0.0.bpmn | 32 ++++++++++++------- 3 files changed, 43 insertions(+), 20 deletions(-) diff --git a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/AGLAnalyticControllerDebitor.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/AGLAnalyticControllerDebitor.java index e4476fa..4c65db6 100644 --- a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/AGLAnalyticControllerDebitor.java +++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/AGLAnalyticControllerDebitor.java @@ -99,10 +99,14 @@ public class AGLAnalyticControllerDebitor implements Serializable { } - ItemCollection process = teamService.getProcessByName("Mahnwesen"); - String link = "/pages/workitems/worklist.xhtml?processref=" + process.getUniqueID() - + "&workflowgroup=Steuerbescheid"; - + String link = "/pages/workitems/worklist.xhtml" + "?phrase=" + getDbtNr(); + logger.info("process ref=" + workflowController.getWorkitem().getItemValueString("process.ref")); + ItemCollection process = documentService + .load(workflowController.getWorkitem().getItemValueString("process.ref")); + if (process != null) { + link = link + "&processref=" + process.getUniqueID() + + "&phrase=" + getDbtNr(); + } if ("analytic.invoices.count.all".equals(event.getKey())) { event.setValue("" + countAll); event.setLabel(formatTotals(totalAllCurrency1, totalAllCurrency2)); @@ -440,7 +444,7 @@ public class AGLAnalyticControllerDebitor implements Serializable { result = result + "datasets: ["; // Datasets 1 - result = result + "{label: 'Zahlungsziel',borderWidth: 1,"; + result = result + "{label: 'Days for payment',borderWidth: 1,"; result = result + " borderColor: [\"#3B6B82\"],"; result = result + " \"backgroundColor\" : [\"#CFE9F5\"], fill: true,tension: 0.5,"; @@ -454,7 +458,7 @@ public class AGLAnalyticControllerDebitor implements Serializable { result = result + "}, "; // Datasets 2 - result = result + "{label: 'Zahldauer',borderWidth: 1,"; + result = result + "{label: 'Payment duration',borderWidth: 1,"; result = result + " borderColor: [\"#E73B65\"],\"backgroundColor\" : [\"#70B088\" ], tension: 0.5,fill: true,"; result = result diff --git a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/AGLAnalyticControllerSteuer.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/AGLAnalyticControllerSteuer.java index ed7c582..213189f 100644 --- a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/AGLAnalyticControllerSteuer.java +++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/AGLAnalyticControllerSteuer.java @@ -13,6 +13,7 @@ import org.imixs.marty.team.TeamService; import org.imixs.workflow.ItemCollection; import org.imixs.workflow.engine.DocumentService; import org.imixs.workflow.exceptions.QueryException; +import org.imixs.workflow.faces.data.WorkflowController; import org.imixs.workflow.office.forms.AnalyticController; import org.imixs.workflow.office.forms.AnalyticEvent; @@ -45,15 +46,23 @@ public class AGLAnalyticControllerSteuer implements Serializable { TeamService teamService; @Inject + protected WorkflowController workflowController; + + @Inject + protected DebitorStatistikController debitorStatistikController; List steuerbescheide = null; public void onEvent(@Observes AnalyticEvent event) { - ItemCollection process = teamService.getProcessByName("Mahnwesen"); - String link = "/pages/workitems/worklist.xhtml?processref=" + process.getUniqueID() - + "&workflowgroup=Steuerbescheid"; + ItemCollection process = documentService + .load(workflowController.getWorkitem().getItemValueString("process.ref")); + String link = "/pages/workitems/worklist.xhtml"; + if (process != null) { + link = link + "?processref=" + process.getUniqueID() + + "&workflowgroup=Steuerbescheid"; + } if ("analytic.steuer.eust".equals(event.getKey())) { event.setValue(computeSteuerbescheideEUST()); event.setLabel("EUR"); diff --git a/workflow/dwc/analyse-debitor-en-1.0.0.bpmn b/workflow/dwc/analyse-debitor-en-1.0.0.bpmn index a0ca1a8..8510aaf 100644 --- a/workflow/dwc/analyse-debitor-en-1.0.0.bpmn +++ b/workflow/dwc/analyse-debitor-en-1.0.0.bpmn @@ -123,6 +123,7 @@ th { font-weight: bold;} $workflowgroup - $workflowstatus]]> SequenceFlow_10 sequenceFlow_OL83kQ + sequenceFlow_1K0l0g @@ -163,7 +164,7 @@ th { font-weight: bold;} $workflowgroup - $workflowstatus]]> SequenceFlow_4 sequenceFlow_17AQjg - sequenceFlow_1K0l0g + sequenceFlow_LhcuMQ @@ -180,8 +181,8 @@ th { font-weight: bold;} - - + + @@ -313,8 +314,7 @@ th { font-weight: bold;} false - Mahnwesen - + SOA Template soa_dbtr.number_$lasteventdate.xlsx @@ -356,6 +356,7 @@ th { font-weight: bold;} sequenceFlow_1K0l0g + sequenceFlow_LhcuMQ @@ -380,9 +381,12 @@ th { font-weight: bold;} - + + + + @@ -459,9 +463,9 @@ th { font-weight: bold;} - + - + @@ -476,9 +480,15 @@ th { font-weight: bold;} - - - + + + + + + + + +