stats page
This commit is contained in:
parent
2be537aae4
commit
6aebef26a6
4 changed files with 276 additions and 2 deletions
82
devi
Executable file
82
devi
Executable file
|
|
@ -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
|
||||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -0,0 +1,179 @@
|
|||
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://xmlns.jcp.org/jsf/core"
|
||||
xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
|
||||
xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
|
||||
xmlns:fn="http://xmlns.jcp.org/jsp/jstl/functions" xmlns:marty="http://xmlns.jcp.org/jsf/composite/marty"
|
||||
xmlns:a="http://xmlns.jcp.org/jsf/passthrough" xmlns:i="http://xmlns.jcp.org/jsf/composite/imixs"
|
||||
template="/layout/template.xhtml">
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
Debitor Statistik page
|
||||
|
||||
-->
|
||||
|
||||
<ui:define name="scripts">
|
||||
|
||||
<script type="text/javascript"
|
||||
src="#{facesContext.externalContext.requestContextPath}/js/imixs-office.workitem.custom.js?build=#{app.application_build_timestamp}"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
/*<![CDATA[*/
|
||||
|
||||
|
||||
$(document).ready(
|
||||
function () {
|
||||
// set navigation cookie
|
||||
document.cookie = "imixs.office.navigation=/pages/monitoring.jsf?processref=#{mahnwesen.uniqueID};path=#{facesContext.externalContext.requestContextPath}/";
|
||||
|
||||
$("input.search_input").on('keypress', function (e) {
|
||||
if (e.which == 13) {
|
||||
e.preventDefault(); //stop event
|
||||
// simulate click on search_action
|
||||
$("[data-id='search_action']").click();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
// This method refreshs the layout
|
||||
function updatePanel(data) {
|
||||
if (data.status === 'success') {
|
||||
$('form').imixsLayout();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/*]]>*/
|
||||
</script>
|
||||
</ui:define>
|
||||
|
||||
|
||||
<ui:define name="content">
|
||||
|
||||
|
||||
<f:view>
|
||||
<!-- load Mahnwesen -->
|
||||
<ui:param name="mahnwesen" value="#{teamController.getProcessByName('Mahnwesen')}"></ui:param>
|
||||
|
||||
|
||||
<h:form>
|
||||
|
||||
|
||||
<ui:include src="/pages/workitems/forms/alexander/cargsoft-creditor-search.xhtml">
|
||||
<ui:param name="workitem" value="#{debitorStatistikController.workitem}" />
|
||||
</ui:include>
|
||||
<ui:include src="/pages/workitems/forms/alexander/cargsoft-debitor-search.xhtml">
|
||||
<ui:param name="workitem" value="#{debitorStatistikController.workitem}" />
|
||||
</ui:include>
|
||||
|
||||
|
||||
<!-- Imixs-ML integration -->
|
||||
<ui:fragment rendered="#{mlController!=null}">
|
||||
<ui:include src="/pages/workitems/workitem-ml.xhtml">
|
||||
<ui:param name="workitem" value="#{debitorStatistikController.workitem}" />
|
||||
</ui:include>
|
||||
</ui:fragment>
|
||||
|
||||
<h:panelGroup styleClass="imixs-board" layout="block" id="dbtr_statistic_board">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="imixs-header">
|
||||
<h1>
|
||||
<!-- notes -->
|
||||
<h:link outcome="/pages/notes">
|
||||
<span class="typcn typcn-home-outline"></span>
|
||||
</h:link>
|
||||
Debitoren Statistik
|
||||
<!-- Search box -->
|
||||
<h:panelGroup styleClass="search" id="search_box">
|
||||
<h:inputText a:data-id="input_phrase" pt:placeholder="#{message.search}..."
|
||||
styleClass="search_input" value="#{searchController.searchFilter.item['phrase']}" />
|
||||
<h:commandLink a:data-id="search_action" action="#{boardController.refreshSearch()}">
|
||||
<f:ajax render="@form" execute="@form" /><span class="typcn typcn-zoom"
|
||||
style="margin-left:4px;"></span>
|
||||
</h:commandLink>
|
||||
<span class="extended-search">
|
||||
<h:link outcome="/pages/workitems/worklist?processref=#{mahnwesen.uniqueID}">
|
||||
#{message['nav.search_extended']}<span class="typcn typcn-zoom-in"
|
||||
style="margin-left:4px;"></span></h:link>
|
||||
</span>
|
||||
<span class="extended-search">
|
||||
<h:link
|
||||
outcome="/pages/workitems/worklist?processref=#{mahnwesen.uniqueID}&archive=true">
|
||||
#{message['nav.search_archive']}<span class="typcn typcn-archive"
|
||||
style="margin-left: 4px;"></span>
|
||||
</h:link>
|
||||
</span>
|
||||
</h:panelGroup>
|
||||
<!-- navigation -->
|
||||
<h:panelGroup layout="" styleClass="pull-right" id="portlet_worklist_nav">
|
||||
</h:panelGroup>
|
||||
</h1>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="imixs-body" style="margin-left: 10px;">
|
||||
|
||||
|
||||
<!-- *** Chart Overview -->
|
||||
|
||||
<div class="monitoring-section">
|
||||
<h2>Überblick
|
||||
|
||||
</h2>
|
||||
<div class=" imixs-form-section-2">
|
||||
<dl>
|
||||
<dt>
|
||||
Debitor:
|
||||
</dt>
|
||||
<dd>
|
||||
<h:inputText value="#{debitorStatistikController.workitem.item['dbtr.number']}"
|
||||
pt:data-item="dbtr.number"
|
||||
pt:data-resultlist="autocomplete-resultlist-cargosoft"
|
||||
pt:autocomplete="off" />
|
||||
<h:commandButton value="Aktualisieren">
|
||||
<f:ajax render="dbtr_statistic_board" onevent="updatePanel"
|
||||
execute="@form" />
|
||||
</h:commandButton>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
test=#{debitorStatistikController.workitem.item['dbtr.number']}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<h3>Statistik</h3>
|
||||
<ui:include src="/pages/workitems/forms/alexander/section_debitor_statistic.xhtml">
|
||||
<ui:param name="workitem" value="#{debitorStatistikController.workitem}" />
|
||||
|
||||
</ui:include>
|
||||
|
||||
<h3>Offene Posten</h3>
|
||||
<ui:include src="/pages/workitems/forms/alexander/section_opliste_readonly.xhtml">
|
||||
<ui:param name="workitem" value="#{debitorStatistikController.workitem}" />
|
||||
|
||||
</ui:include>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="imixs-footer"></div>
|
||||
|
||||
</h:panelGroup>
|
||||
|
||||
|
||||
|
||||
</h:form>
|
||||
</f:view>
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
|
|
@ -94,7 +94,7 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
/*<![CDATA[*/
|
||||
var barChartData = #{ debitorStatistikController.buildChartData() };
|
||||
var barChartData = #{ debitorStatistikController.buildChartData()};
|
||||
$(document).ready(
|
||||
function () {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue