]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commit
feat(ERP-33): add stock history ETL — migration, model, service, command
authorAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Wed, 25 Feb 2026 14:45:52 +0000 (17:45 +0300)
committerAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Wed, 25 Feb 2026 14:45:52 +0000 (17:45 +0300)
commitc6ee891e57247809800038842f87997f93fcef3a
tree3355da9dbb89975ad847109c79c048ac1f1baf98
parent55c53c90a40c4a00f8a00977b4b852295019ab14
feat(ERP-33): add stock history ETL — migration, model, service, command

- migration: partitioned table stock_history, уникальный индекс ON CONFLICT
- records/StockHistory: ActiveRecord модель
- services/StockHistoryService: ETL с advisory lock, batch INSERT 1000, DQ assertions (DQ-1..6), Telegram alerts
- services/CollectResult, DqResult: DTO
- commands/StockHistoryController: actionCollect, actionCreatePartition, actionDropOldPartitions

Crontab (в комментарии контроллера):
  0 8,20 * * * php yii stock-history/collect
  0 1 1 * * php yii stock-history/create-partition
  0 2 1 * * php yii stock-history/drop-old-partitions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
erp24/commands/StockHistoryController.php [new file with mode: 0644]
erp24/migrations/m260221_100000_create_stock_history_table.php [new file with mode: 0644]
erp24/records/StockHistory.php [new file with mode: 0644]
erp24/services/CollectResult.php [new file with mode: 0644]
erp24/services/DqResult.php [new file with mode: 0644]
erp24/services/StockHistoryService.php [new file with mode: 0644]