performance issues

This commit is contained in:
Ralph Soika 2025-12-08 12:27:28 +01:00
parent 5b445adee0
commit 82b3771fc8
4 changed files with 24 additions and 11 deletions

View file

@ -262,6 +262,7 @@ public class BusinessPartnerService {
* @return
*/
public List<ItemCollection> findOutgoingInvoices(String _dbtrNumber) {
logger.info("search outgoing invoices....");
// Aus der dbtrNummer muss das führendde D entfernt werden
String query = "(type:workitem) AND ($modelversion:rechnungsausgang-*)";

View file

@ -118,7 +118,7 @@ public class InvoiceService {
* @throws PluginException
*/
public String getCurrenciesOutMain() throws PluginException {
logger.info("Load currency Configuration....");
// ermittle die Hauptwährungen
ItemCollection configItemCollection = configService.loadConfiguration("AGL_CONFIGURATION");
List<String> currencyList = configItemCollection.getItemValue("currency.out");

View file

@ -51,6 +51,8 @@ public class OPListController implements Serializable {
private String lastCurrencyFilter = null;
private List<ItemCollection> invoiceList = null;
private String currenciesOutMain = null;
private List<String> currenciesOut = null;
@Inject
protected WorkflowController workflowController;
@ -183,7 +185,7 @@ public class OPListController implements Serializable {
/*
* Mahnlauf ?
*
* Bei einem Mahnlauf selektieren wir alle Rechnungne immer vor. Das ist eine
* Bei einem Mahnlauf selektieren wir alle Rechnungen immer vor. Das ist eine
* Anforderung von AGL Der Benutzer kann dann einzelne Rechnungen wieder
* abwählen.
*
@ -289,6 +291,7 @@ public class OPListController implements Serializable {
*/
@SuppressWarnings("rawtypes")
public void updateChildList(ItemCollection workitem) {
long l = System.currentTimeMillis();
double paymentTotal = 0;
List<Map> mapInvoiceItems = new ArrayList<Map>();
logger.fine("Convert child items into Map...");
@ -313,6 +316,9 @@ public class OPListController implements Serializable {
workitem.replaceItemValue(ZahlungseingangService.ITEM_PAYMENT_DETAILS, mapInvoiceItems);
// Update $workitemref
workitem.setItemValue("$workitemref", selectionList);
// logger.info("update child list completed in " + (System.currentTimeMillis() -
// l) + "ms");
}
/**
@ -438,19 +444,26 @@ public class OPListController implements Serializable {
}
public List<String> getCurrenciesOut() {
if (currenciesOut == null) {
try {
return invoiceService.getCurrenciesOut();
currenciesOut = invoiceService.getCurrenciesOut();
} catch (PluginException e) {
return new ArrayList<String>();
currenciesOut = new ArrayList<String>();
}
}
return currenciesOut;
}
public String getCurrenciesOutMain() {
if (currenciesOutMain == null) {
try {
return invoiceService.getCurrenciesOutMain();
currenciesOutMain = invoiceService.getCurrenciesOutMain();
} catch (PluginException e) {
return "undefined currency";
currenciesOutMain = "undefined currency";
}
}
return currenciesOutMain;
}
}

View file

@ -20,7 +20,6 @@
</dd>
</dl>
<table style="width: 100%; margin: 5px;">
<tr>
<th style="text-align: left;">#{custom['oplist.invoicenumber']}</th>