From 6aebef26a6ccf19f57cc5b6f1b3c4ecbaca30628 Mon Sep 17 00:00:00 2001 From: Ralph Soika Date: Wed, 2 Aug 2023 15:06:57 +0200 Subject: [PATCH] stats page --- devi | 82 ++++++++ .../DebitorStatistikController.java | 15 +- .../src/main/webapp/pages/dbtr-stats.xhtml | 179 ++++++++++++++++++ .../alexander/section_debitor_statistic.xhtml | 2 +- 4 files changed, 276 insertions(+), 2 deletions(-) create mode 100755 devi create mode 100644 office-alexander-logistics-app/src/main/webapp/pages/dbtr-stats.xhtml diff --git a/devi b/devi new file mode 100755 index 0000000..c58f300 --- /dev/null +++ b/devi @@ -0,0 +1,82 @@ +#!/bin/bash + +############################################################ +# The Imixs Developer Script +# start, build, hot, setup, deploy +# +############################################################ + +# Funktion zum Entfernen des '-' Zeichens von einem Parameter +strip_dash() { + echo "$1" | sed 's/^-//' +} + + echo " _ _ _ _ " + echo " __| | _____ _(_) | |__ ___| |_ __" + echo " / _\` |/ _ \\ \\ / / | | '_ \\ / _ \\ | \'_ \\" + echo "| (_| | __/\ V /| | | | | | __/ | |_) |" + echo " \__,_|\___| \_/ |_| |_| |_|\___|_| .__/ " + echo " |_| " + echo " Imixs Developer Script..." + echo "_________________________________________" + +# Überprüfen, ob der Parameter 'hot' übergeben wurde +if [[ "$(strip_dash $1)" == "setup" ]]; then + echo " Dev Setup..." + sudo chmod -R 777 docker/deployments/ + + #mvn -f ~/git/imixs-ml/ clean install -Pdocker -DskipTests + + echo " starting dev enrvionment..." + mvn clean install -Pdebug + cp ./*-app/target/*.war ./docker/deployments/ + docker-compose -f docker-compose.yml up +fi + + +if [[ "$(strip_dash $1)" == "start" ]]; then + echo " Start Dev Environment..." + docker-compose -f docker-compose.yml up +fi + +if [[ "$(strip_dash $1)" == "build" ]]; then + echo " Build and Autodeploy..." + + mvn clean install -DskipTests +fi + +if [[ "$(strip_dash $1)" == "test" ]]; then + echo " Run JUnit Tests..." + + mvn clean test +fi + +if [[ "$(strip_dash $1)" == "hot" ]]; then + echo "* Hotdeploy..." + cd *-app + mvn manik-hotdeploy:hotdeploy + cd .. +fi + +if [[ "$(strip_dash $1)" == "deploy" ]]; then + echo " Deploy to Imixs-Cloud..." + + mvn clean install -Pkubernetes +fi + + +# Überprüfen, ob keine Parameter übergeben wurden - standard build +if [[ $# -eq 0 ]]; then + + echo " Run with ./dev.sh -XXX" + echo " " + echo " -start : Docker Container starten " + echo " -build : Anwendung neue bauen und deployen " + echo " -hot : Manik Hotdeploy Starten" + echo " -test : Run tests" + echo " -deploy: Imixs-Cloud Deployment starten " + echo " -setup : Developer Umgebung neu aufbauen und Docker Container starten " + echo "_________________________________________" + echo " " + +fi \ No newline at end of file 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 index 7518c29..87d3af2 100644 --- a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/DebitorStatistikController.java +++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/DebitorStatistikController.java @@ -37,6 +37,7 @@ import org.imixs.workflow.office.views.SearchController; */ @Named @ConversationScoped +// @SessionScoped public class DebitorStatistikController implements Serializable { private static final long serialVersionUID = 1L; @@ -53,6 +54,16 @@ public class DebitorStatistikController implements Serializable { @Inject protected SearchController searchController; + // private ItemCollection workitem = null; + + public DebitorStatistikController() { + // workitem = new ItemCollection(); + } + + public ItemCollection getWorkitem() { + return workflowController.getWorkitem(); + } + public int getZahlungsmoral() { return 0; } @@ -77,6 +88,7 @@ public class DebitorStatistikController implements Serializable { return result; } + /* * Bezahlt */ @@ -186,7 +198,7 @@ public class DebitorStatistikController implements Serializable { * @return */ private String getDbtNr() { - String dbtNr = workflowController.getWorkitem().getItemValueString("dbtr.number"); + String dbtNr = getWorkitem().getItemValueString("dbtr.number"); if (dbtNr.startsWith("D") || dbtNr.startsWith("K")) { dbtNr = dbtNr.substring(1); } @@ -250,6 +262,7 @@ public class DebitorStatistikController implements Serializable { for (ItemCollection invoice : invoices) { try { + logger.warning("Rechnung: " + invoice.getUniqueID()); Date invoiceDate = invoice.getItemValueDate("invoice.date"); Date invoiceDueDate = invoice.getItemValueDate("invoice.duedate"); diff --git a/office-alexander-logistics-app/src/main/webapp/pages/dbtr-stats.xhtml b/office-alexander-logistics-app/src/main/webapp/pages/dbtr-stats.xhtml new file mode 100644 index 0000000..2b1f73a --- /dev/null +++ b/office-alexander-logistics-app/src/main/webapp/pages/dbtr-stats.xhtml @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ + + + + Debitoren Statistik + + + + + + + + + #{message['nav.search_extended']} + + + + #{message['nav.search_archive']} + + + + + + +

+ +
+ + +
+ + + + +
+

Überblick + +

+
+
+
+ Debitor: +
+
+ + + + + +
+
+ test=#{debitorStatistikController.workitem.item['dbtr.number']} + +
+ + + +

Statistik

+ + + + + +

Offene Posten

+ + + + + +
+ + + +
+ + + +
+ + + +
+
+
+
\ No newline at end of file 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 index 7a3b384..87311b7 100644 --- 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 @@ -94,7 +94,7 @@