feat(statistics): implement statistics module with controller and service for POS invoices

This commit is contained in:
2026-05-23 18:09:41 +03:30
parent 2dc9480170
commit 2c97b7302d
8 changed files with 317 additions and 0 deletions
+46
View File
@@ -14,4 +14,50 @@ export class PosKeyMaker {
static goodListByGuildPattern(guildId: string): string {
return `pos:goods:list:guildId:${guildId}:ba:*`
}
static statisticInvoicesPattern(businessActivityId: string): string {
return `pos:statistics:invoices:ba:${businessActivityId}:*`
}
static statisticInvoices(
businessActivityId: string,
posId: string,
from: string,
): string {
return `pos:statistics:invoices:ba:${businessActivityId}:pos:${posId}:from:${from}:all`
}
static statisticInvoicesNotSent(
businessActivityId: string,
posId: string,
from: string,
): string {
return `pos:statistics:invoices:ba:${businessActivityId}:pos:${posId}:from:${from}:not-sent`
}
static statisticInvoicesSuccess(
businessActivityId: string,
posId: string,
from: string,
): string {
return `pos:statistics:invoices:ba:${businessActivityId}:pos:${posId}:from:${from}:success`
}
static statisticInvoicesFailure(
businessActivityId: string,
posId: string,
from: string,
): string {
return `pos:statistics:invoices:ba:${businessActivityId}:pos:${posId}:from:${from}:failure`
}
static statisticInvoicesPending(
businessActivityId: string,
posId: string,
from: string,
): string {
return `pos:statistics:invoices:ba:${businessActivityId}:pos:${posId}:from:${from}:pending`
}
static statisticInvoicesCredit(
businessActivityId: string,
posId: string,
from: string,
): string {
return `pos:statistics:invoices:ba:${businessActivityId}:pos:${posId}:from:${from}:credit`
}
}