mirror of
https://github.com/serty2005/rmser.git
synced 2026-02-04 19:02:33 -06:00
редактирование и удаление сопоставлений
список накладных с позициями
This commit is contained in:
@@ -35,6 +35,7 @@ import (
|
||||
// Services
|
||||
billingServicePkg "rmser/internal/services/billing"
|
||||
draftsServicePkg "rmser/internal/services/drafts"
|
||||
invoicesServicePkg "rmser/internal/services/invoices"
|
||||
ocrServicePkg "rmser/internal/services/ocr"
|
||||
recServicePkg "rmser/internal/services/recommend"
|
||||
"rmser/internal/services/sync"
|
||||
@@ -93,6 +94,7 @@ func main() {
|
||||
recService := recServicePkg.NewService(recRepo)
|
||||
ocrService := ocrServicePkg.NewService(ocrRepo, catalogRepo, draftsRepo, accountRepo, pyClient, cfg.App.StoragePath)
|
||||
draftsService := draftsServicePkg.NewService(draftsRepo, ocrRepo, catalogRepo, accountRepo, supplierRepo, invoicesRepo, rmsFactory, billingService)
|
||||
invoicesService := invoicesServicePkg.NewService(invoicesRepo, draftsRepo, supplierRepo, rmsFactory)
|
||||
|
||||
// 7. Handlers
|
||||
draftsHandler := handlers.NewDraftsHandler(draftsService)
|
||||
@@ -100,6 +102,7 @@ func main() {
|
||||
ocrHandler := handlers.NewOCRHandler(ocrService)
|
||||
recommendHandler := handlers.NewRecommendationsHandler(recService)
|
||||
settingsHandler := handlers.NewSettingsHandler(accountRepo, catalogRepo)
|
||||
invoicesHandler := handlers.NewInvoiceHandler(invoicesService)
|
||||
|
||||
// 8. Telegram Bot (Передаем syncService)
|
||||
if cfg.Telegram.Token != "" {
|
||||
@@ -168,8 +171,12 @@ func main() {
|
||||
api.POST("/ocr/match", ocrHandler.SaveMatch)
|
||||
api.DELETE("/ocr/match", ocrHandler.DeleteMatch)
|
||||
api.GET("/ocr/unmatched", ocrHandler.GetUnmatched)
|
||||
api.DELETE("/ocr/unmatched", ocrHandler.DiscardUnmatched)
|
||||
api.GET("/ocr/search", ocrHandler.SearchProducts)
|
||||
|
||||
// Invoices
|
||||
api.GET("/invoices/:id", invoicesHandler.GetInvoice)
|
||||
|
||||
// Manual Sync Trigger
|
||||
api.POST("/sync/all", func(c *gin.Context) {
|
||||
userID := c.MustGet("userID").(uuid.UUID)
|
||||
|
||||
Reference in New Issue
Block a user