fixes op listen
This commit is contained in:
parent
61a7fa8399
commit
a715e00a1d
3 changed files with 27 additions and 9 deletions
|
|
@ -5,6 +5,7 @@ import java.util.List;
|
|||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.eclipse.microprofile.config.inject.ConfigProperty;
|
||||
import org.eclipse.microprofile.metrics.Metadata;
|
||||
import org.eclipse.microprofile.metrics.MetricRegistry;
|
||||
import org.eclipse.microprofile.metrics.Tag;
|
||||
|
|
@ -59,6 +60,10 @@ public class MetricDebitorService {
|
|||
@Inject
|
||||
DocumentService documentService;
|
||||
|
||||
@Inject
|
||||
@ConfigProperty(name = "metrics.enabled", defaultValue = "false")
|
||||
private boolean metricsEnabled;
|
||||
|
||||
/**
|
||||
* Process Metric only if some data has changed....
|
||||
*
|
||||
|
|
@ -66,6 +71,10 @@ public class MetricDebitorService {
|
|||
* @throws PluginException
|
||||
*/
|
||||
public void onProcessingEvent(@Observes ProcessingEvent processingEvent) throws PluginException {
|
||||
|
||||
if (!metricsEnabled) {
|
||||
return;
|
||||
}
|
||||
double debitorSaldo = 0;
|
||||
ItemCollection invoice = processingEvent.getDocument();
|
||||
if (!invoice.getModelVersion().startsWith("rechnungsausgang-")) {
|
||||
|
|
|
|||
|
|
@ -283,8 +283,6 @@ public class OPListExportAdapterByWeek extends POIFindReplaceAdapter {
|
|||
} else {
|
||||
currentWeekCategory = currentWeekCategory + currentWeekNumber;
|
||||
}
|
||||
logger.info("----------HACK");
|
||||
currentWeekCategory = "2023/06";
|
||||
|
||||
/*
|
||||
* --- Phase 1 -------------------------------------------------------
|
||||
|
|
@ -342,7 +340,7 @@ public class OPListExportAdapterByWeek extends POIFindReplaceAdapter {
|
|||
for (String week : sortedWeekList) {
|
||||
// now create a new line..
|
||||
rowPos++;
|
||||
logger.info("--> Zeile " + rowPos + " Week=" + week);
|
||||
logger.fine("--> Zeile " + rowPos + " Week=" + week);
|
||||
XSSFRow row = sheet.createRow(rowPos);
|
||||
|
||||
if (week.equals(currentWeekCategory)) {
|
||||
|
|
@ -361,7 +359,7 @@ public class OPListExportAdapterByWeek extends POIFindReplaceAdapter {
|
|||
WeekInvoiceData weekDataTotal = weekDataMap.get("TOTAL/" + week);
|
||||
for (String name : spaceNames) {
|
||||
String key = name + "/" + week;
|
||||
logger.info("search WeekInvoiceData for " + key);
|
||||
logger.fine("search WeekInvoiceData for " + key);
|
||||
// list of invoices
|
||||
WeekInvoiceData weekData = weekDataMap.get(key);
|
||||
|
||||
|
|
@ -371,7 +369,7 @@ public class OPListExportAdapterByWeek extends POIFindReplaceAdapter {
|
|||
// + weekData.totalCurrency2);
|
||||
|
||||
for (String currency : currencyList) {
|
||||
logger.info("-- Col Number=" + column);
|
||||
logger.fine("-- Col Number=" + column);
|
||||
double betrag = weekData.getTotal(currency);
|
||||
row.getCell(column).setCellValue(betrag);
|
||||
|
||||
|
|
@ -385,7 +383,7 @@ public class OPListExportAdapterByWeek extends POIFindReplaceAdapter {
|
|||
}
|
||||
|
||||
} else {
|
||||
logger.info("...... NOT FOUND");
|
||||
logger.fine("...... NOT FOUND");
|
||||
// skip columns
|
||||
for (String currency : currencyList) {
|
||||
column++;
|
||||
|
|
@ -473,7 +471,7 @@ public class OPListExportAdapterByWeek extends POIFindReplaceAdapter {
|
|||
private void groupInvoicesByWeek(String spaceID, String spaceName,
|
||||
Map<String, WeekInvoiceData> weekDataCache) {
|
||||
|
||||
logger.info("...group invoices (DEBUG) for " + spaceName + "/" + spaceID);
|
||||
logger.info("...group invoices for " + spaceName + "/" + spaceID);
|
||||
try {
|
||||
List<ItemCollection> invoices = documentService.find(
|
||||
"$modelversion:rechnungsausgang-* AND type:workitem AND $uniqueidref:" + spaceID, 9999, 0,
|
||||
|
|
|
|||
|
|
@ -381,10 +381,21 @@ if (workitem.get(refField) == null || ''==workitem.get(refField)[0]) {
|
|||
<target-name>op-liste_<itemvalue>dbtr.number</itemvalue>_<itemvalue format="yyyy-MM-dd">$lasteventdate</itemvalue>.xlsx</target-name>
|
||||
</opliste>
|
||||
<poi-update name="findreplace">
|
||||
<find>A8</find>
|
||||
<find>C6</find>
|
||||
<replace><itemvalue>sequencenumber</itemvalue></replace>
|
||||
<type>text</type>
|
||||
</poi-update>
|
||||
<poi-update name="findreplace">
|
||||
<find>B7</find>
|
||||
<replace><itemvalue>space.name</itemvalue></replace>
|
||||
<type>text</type>
|
||||
</poi-update>
|
||||
|
||||
<poi-update name="findreplace">
|
||||
<find>F6</find>
|
||||
<replace><itemvalue format="dd.MM.yyyy">$lasteventdate</itemvalue></replace>
|
||||
<type>date</type>
|
||||
</poi-update>]]></imixs:value>
|
||||
</poi-update>]]></imixs:value>
|
||||
</imixs:item>
|
||||
</bpmn2:extensionElements>
|
||||
<bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
|
||||
|
|
|
|||
Loading…
Reference in a new issue