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

View file

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

View file

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

View file

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