Sfoglia il codice sorgente

Refactoring services #885

refactoring
Guillaume 1 anno fa
parent
commit
892cfaad7f
32 ha cambiato i file con 42 aggiunte e 39 eliminazioni
  1. +1
    -1
      common/components/BusinessLogicTrait.php
  2. +1
    -1
      common/logic/Config/TaxRate/Model/TaxRate.php
  3. +1
    -1
      common/logic/Config/TaxRate/Repository/TaxRateRepository.php
  4. +1
    -1
      common/logic/Config/TaxRate/Repository/TaxRateRepositoryQuery.php
  5. +2
    -1
      common/logic/Config/TaxRate/Service/TaxRateBuilder.php
  6. +4
    -1
      common/logic/Config/TaxRate/Wrapper/TaxRateContainer.php
  7. +3
    -1
      common/logic/Config/TaxRate/Wrapper/TaxRateManager.php
  8. +4
    -0
      common/logic/Distribution/Distribution/Service/DistributionBuilder.php
  9. +2
    -2
      common/logic/Distribution/Distribution/Service/DistributionSolver.php
  10. +1
    -2
      common/logic/Distribution/Distribution/Wrapper/DistributionManager.php
  11. +1
    -1
      common/logic/Distribution/PointSaleDistribution/Model/PointSaleDistribution.php
  12. +1
    -1
      common/logic/Distribution/PointSaleDistribution/Repository/PointSaleDistributionRepository.php
  13. +1
    -0
      common/logic/Distribution/PointSaleDistribution/Service/PointSaleDistributionBuilder.php
  14. +1
    -1
      common/logic/Distribution/ProductDistribution/Model/ProductDistribution.php
  15. +1
    -1
      common/logic/Distribution/ProductDistribution/Repository/ProductDistributionRepository.php
  16. +1
    -1
      common/logic/Document/DeliveryNote/Model/DeliveryNote.php
  17. +1
    -1
      common/logic/Document/DeliveryNote/Service/DeliveryNoteBuilder.php
  18. +2
    -2
      common/logic/Document/DeliveryNote/Service/DeliveryNoteSolver.php
  19. +1
    -1
      common/logic/Document/DeliveryNote/Wrapper/DeliveryNoteManager.php
  20. +2
    -2
      common/logic/Document/Document/Service/DocumentSolver.php
  21. +3
    -0
      common/logic/Document/Document/Wrapper/DocumentManager.php
  22. +0
    -1
      common/logic/Document/Quotation/Model/Quotation.php
  23. +1
    -1
      common/logic/Order/Order/Service/OrderBuilder.php
  24. +0
    -1
      common/logic/Order/Order/Service/OrderSolver.php
  25. +2
    -2
      common/logic/Order/ProductOrder/Model/ProductOrder.php
  26. +1
    -1
      common/logic/PointSale/PointSale/Repository/PointSaleRepository.php
  27. +1
    -1
      common/logic/Producer/Producer/Model/Producer.php
  28. +2
    -2
      common/logic/Product/Product/Model/Product.php
  29. +0
    -1
      common/logic/Product/ProductCategory/Model/ProductCategory.php
  30. +0
    -1
      common/logic/Product/ProductCategory/Model/ProductCategorySearch.php
  31. +0
    -2
      common/logic/Subscription/ProductSubscription/Model/ProductSubscription.php
  32. +0
    -4
      common/logic/Subscription/Subscription/Event/SubscriptionEventSubscriber.php

+ 1
- 1
common/components/BusinessLogicTrait.php Vedi File

@@ -4,7 +4,7 @@ namespace common\components;

use common\logic\Config\TaxRate\TaxRateContainer;
use common\logic\Config\TaxRate\TaxRateManager;
use common\logic\Distribution\Distribution\DistributionManager;
use common\logic\Distribution\Distribution\Wrapper\DistributionManager;
use common\logic\Distribution\Distribution\Wrapper\DistributionContainer;
use common\logic\Distribution\PointSaleDistribution\Wrapper\PointSaleDistributionContainer;
use common\logic\Distribution\PointSaleDistribution\Wrapper\PointSaleDistributionManager;

common/logic/Config/TaxRate/TaxRate.php → common/logic/Config/TaxRate/Model/TaxRate.php Vedi File

@@ -1,6 +1,6 @@
<?php

namespace common\logic\Config\TaxRate;
namespace common\logic\Config\TaxRate\Model;

use common\components\ActiveRecordCommon;


common/logic/Config/TaxRate/TaxRateRepository.php → common/logic/Config/TaxRate/Repository/TaxRateRepository.php Vedi File

@@ -1,6 +1,6 @@
<?php

namespace common\logic\Config\TaxRate;
namespace common\logic\Config\TaxRate\Repository;

use common\logic\AbstractRepository;


common/logic/Config/TaxRate/TaxRateRepositoryQuery.php → common/logic/Config/TaxRate/Repository/TaxRateRepositoryQuery.php Vedi File

@@ -1,6 +1,6 @@
<?php

namespace common\logic\Config\TaxRate;
namespace common\logic\Config\TaxRate\Repository;

use common\logic\AbstractRepositoryQuery;


common/logic/Config/TaxRate/TaxRateBuilder.php → common/logic/Config/TaxRate/Service/TaxRateBuilder.php Vedi File

@@ -1,8 +1,9 @@
<?php

namespace common\logic\Config\TaxRate;
namespace common\logic\Config\TaxRate\Service;

use common\logic\AbstractBuilder;
use common\logic\Config\TaxRate\Model\TaxRate;

class TaxRateBuilder extends AbstractBuilder
{

common/logic/Config/TaxRate/TaxRateContainer.php → common/logic/Config/TaxRate/Wrapper/TaxRateContainer.php Vedi File

@@ -1,8 +1,11 @@
<?php

namespace common\logic\Config\TaxRate;
namespace common\logic\Config\TaxRate\Wrapper;

use common\logic\AbstractContainer;
use common\logic\Config\TaxRate\Model\TaxRate;
use common\logic\Config\TaxRate\Repository\TaxRateRepository;
use common\logic\Config\TaxRate\Service\TaxRateBuilder;

class TaxRateContainer extends AbstractContainer
{

common/logic/Config/TaxRate/TaxRateManager.php → common/logic/Config/TaxRate/Wrapper/TaxRateManager.php Vedi File

@@ -1,8 +1,10 @@
<?php

namespace common\logic\Config\TaxRate;
namespace common\logic\Config\TaxRate\Wrapper;

use common\logic\AbstractManager;
use common\logic\Config\TaxRate\Repository\TaxRateRepository;
use common\logic\Config\TaxRate\Service\TaxRateBuilder;

/**
* @mixin TaxRateRepository

+ 4
- 0
common/logic/Distribution/Distribution/Service/DistributionBuilder.php Vedi File

@@ -6,12 +6,16 @@ use common\logic\AbstractBuilder;
use common\logic\Distribution\Distribution\Event\DistributionActiveEvent;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Distribution\Distribution\Repository\DistributionRepository;
use common\logic\Distribution\PointSaleDistribution\Model\PointSaleDistribution;
use common\logic\Distribution\PointSaleDistribution\Repository\PointSaleDistributionRepository;
use common\logic\Distribution\PointSaleDistribution\Service\PointSaleDistributionBuilder;
use common\logic\Distribution\ProductDistribution\Model\ProductDistribution;
use common\logic\Distribution\ProductDistribution\Repository\ProductDistributionRepository;
use common\logic\Distribution\ProductDistribution\Service\ProductDistributionBuilder;
use common\logic\Order\Order\Repository\OrderRepository;
use common\logic\Order\ProductOrder\Service\ProductOrderBuilder;
use common\logic\PointSale\PointSale\Model\PointSale;
use common\logic\Product\Product\Model\Product;
use common\logic\Product\Product\Repository\ProductRepository;
use common\logic\User\UserProducer\Repository\UserProducerRepository;


+ 2
- 2
common/logic/Distribution/Distribution/Service/DistributionSolver.php Vedi File

@@ -5,8 +5,8 @@ namespace common\logic\Distribution\Distribution\Service;
use common\helpers\GlobalParam;
use common\logic\AbstractService;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\PointSale\PointSale\PointSale;
use common\logic\Product\Product\Product;
use common\logic\PointSale\PointSale\Model\PointSale;
use common\logic\Product\Product\Model\Product;
use common\logic\SolverInterface;

class DistributionSolver extends AbstractService implements SolverInterface

+ 1
- 2
common/logic/Distribution/Distribution/Wrapper/DistributionManager.php Vedi File

@@ -1,12 +1,11 @@
<?php

namespace common\logic\Distribution\Distribution;
namespace common\logic\Distribution\Distribution\Wrapper;

use common\logic\AbstractManager;
use common\logic\Distribution\Distribution\Repository\DistributionRepository;
use common\logic\Distribution\Distribution\Service\DistributionBuilder;
use common\logic\Distribution\Distribution\Service\DistributionSolver;
use common\logic\Distribution\Distribution\Wrapper\DistributionContainer;

/**
* @mixin DistributionSolver

+ 1
- 1
common/logic/Distribution/PointSaleDistribution/Model/PointSaleDistribution.php Vedi File

@@ -40,7 +40,7 @@ namespace common\logic\Distribution\PointSaleDistribution\Model;

use common\components\ActiveRecordCommon ;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\PointSale\PointSale\PointSale;
use common\logic\PointSale\PointSale\Model\PointSale;

class PointSaleDistribution extends ActiveRecordCommon
{

+ 1
- 1
common/logic/Distribution/PointSaleDistribution/Repository/PointSaleDistributionRepository.php Vedi File

@@ -5,7 +5,7 @@ namespace common\logic\Distribution\PointSaleDistribution\Repository;
use common\logic\AbstractRepository;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Distribution\PointSaleDistribution\Model\PointSaleDistribution;
use common\logic\PointSale\PointSale\PointSale;
use common\logic\PointSale\PointSale\Model\PointSale;

class PointSaleDistributionRepository extends AbstractRepository
{

+ 1
- 0
common/logic/Distribution/PointSaleDistribution/Service/PointSaleDistributionBuilder.php Vedi File

@@ -7,6 +7,7 @@ use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Distribution\Distribution\Repository\DistributionRepository;
use common\logic\Distribution\PointSaleDistribution\Model\PointSaleDistribution;
use common\logic\Distribution\PointSaleDistribution\Repository\PointSaleDistributionRepository;
use common\logic\PointSale\PointSale\Model\PointSale;
use common\logic\PointSale\PointSale\Repository\PointSaleRepository;

class PointSaleDistributionBuilder extends AbstractBuilder

+ 1
- 1
common/logic/Distribution/ProductDistribution/Model/ProductDistribution.php Vedi File

@@ -40,7 +40,7 @@ namespace common\logic\Distribution\ProductDistribution\Model;

use common\components\ActiveRecordCommon ;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Product\Product\Product;
use common\logic\Product\Product\Model\Product;

class ProductDistribution extends ActiveRecordCommon
{

+ 1
- 1
common/logic/Distribution/ProductDistribution/Repository/ProductDistributionRepository.php Vedi File

@@ -5,7 +5,7 @@ namespace common\logic\Distribution\ProductDistribution\Repository;
use common\logic\AbstractRepository;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Distribution\ProductDistribution\Model\ProductDistribution;
use common\logic\Product\Product\Product;
use common\logic\Product\Product\Model\Product;

class ProductDistributionRepository extends AbstractRepository
{

+ 1
- 1
common/logic/Document/DeliveryNote/Model/DeliveryNote.php Vedi File

@@ -38,7 +38,7 @@

namespace common\logic\Document\DeliveryNote\Model;

use common\logic\Document\Document\Document;
use common\logic\Document\Document\Model\Document;

class DeliveryNote extends Document
{

+ 1
- 1
common/logic/Document/DeliveryNote/Service/DeliveryNoteBuilder.php Vedi File

@@ -3,7 +3,7 @@
namespace common\logic\Document\DeliveryNote\Service;

use common\logic\Document\DeliveryNote\Model\DeliveryNote;
use common\logic\Document\Document\DocumentBuilder;
use common\logic\Document\Document\Service\DocumentBuilder;

class DeliveryNoteBuilder extends DocumentBuilder
{

+ 2
- 2
common/logic/Document/DeliveryNote/Service/DeliveryNoteSolver.php Vedi File

@@ -3,8 +3,8 @@
namespace common\logic\Document\DeliveryNote\Service;

use common\logic\Document\DeliveryNote\Model\DeliveryNote;
use common\logic\Document\Document\DocumentSolver;
use common\logic\Document\Invoice\Invoice;
use common\logic\Document\Document\Service\DocumentSolver;
use common\logic\Document\Invoice\Model\Invoice;
use common\logic\SolverInterface;

class DeliveryNoteSolver extends DocumentSolver implements SolverInterface

+ 1
- 1
common/logic/Document/DeliveryNote/Wrapper/DeliveryNoteManager.php Vedi File

@@ -5,7 +5,7 @@ namespace common\logic\Document\DeliveryNote\Wrapper;
use common\logic\Document\DeliveryNote\Repository\DeliveryNoteRepository;
use common\logic\Document\DeliveryNote\Service\DeliveryNoteBuilder;
use common\logic\Document\DeliveryNote\Service\DeliveryNoteSolver;
use common\logic\Document\Document\DocumentManager;
use common\logic\Document\Document\Wrapper\DocumentManager;

/**
* @mixin DeliveryNoteSolver

+ 2
- 2
common/logic/Document/Document/Service/DocumentSolver.php Vedi File

@@ -6,8 +6,8 @@ use common\helpers\Price;
use common\logic\AbstractService;
use common\logic\Document\Document\Model\Document;
use common\logic\Document\Document\Model\DocumentInterface;
use common\logic\Order\Order\Order;
use common\logic\PointSale\PointSale\PointSale;
use common\logic\Order\Order\Model\Order;
use common\logic\PointSale\PointSale\Model\PointSale;
use common\logic\SolverInterface;

class DocumentSolver extends AbstractService implements SolverInterface

+ 3
- 0
common/logic/Document/Document/Wrapper/DocumentManager.php Vedi File

@@ -3,6 +3,9 @@
namespace common\logic\Document\Document\Wrapper;

use common\logic\AbstractManager;
use common\logic\Document\Document\Service\DocumentBuilder;
use common\logic\Document\Document\Service\DocumentSolver;
use common\logic\Document\Document\Service\DocumentUtils;

/**
* @mixin DocumentSolver

+ 0
- 1
common/logic/Document/Quotation/Model/Quotation.php Vedi File

@@ -45,7 +45,6 @@ use common\logic\Document\Document\Model\Document;
*/
class Quotation extends Document
{

/**
* @inheritdoc
*/

+ 1
- 1
common/logic/Order/Order/Service/OrderBuilder.php Vedi File

@@ -6,7 +6,7 @@ use common\helpers\GlobalParam;
use common\helpers\MeanPayment;
use common\helpers\Price;
use common\logic\AbstractBuilder;
use common\logic\Config\TaxRate\TaxRate;
use common\logic\Config\TaxRate\Model\TaxRate;
use common\logic\Distribution\Distribution\Repository\DistributionRepository;
use common\logic\Document\Document\Model\Document;
use common\logic\Order\Order\Model\Order;

+ 0
- 1
common/logic/Order/Order/Service/OrderSolver.php Vedi File

@@ -12,7 +12,6 @@ use common\logic\User\User\Model\User;
use common\logic\User\User\Service\UserSolver;
use yii\helpers\Html;


class OrderSolver extends AbstractService implements SolverInterface
{
protected UserSolver $userSolver;

+ 2
- 2
common/logic/Order/ProductOrder/Model/ProductOrder.php Vedi File

@@ -40,9 +40,9 @@ namespace common\logic\Order\ProductOrder\Model;

use common\helpers\GlobalParam;
use common\components\ActiveRecordCommon;
use common\logic\Config\TaxRate\TaxRate;
use common\logic\Config\TaxRate\Model\TaxRate;
use common\logic\Order\Order\Model\Order;
use common\logic\Product\Product\Product;
use common\logic\Product\Product\Model\Product;

/**
* This is the model class for table "product_order".

+ 1
- 1
common/logic/PointSale/PointSale/Repository/PointSaleRepository.php Vedi File

@@ -6,7 +6,7 @@ use common\helpers\GlobalParam;
use common\logic\AbstractRepository;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\PointSale\PointSale\Model\PointSale;
use common\logic\Producer\Producer\Producer;
use common\logic\Producer\Producer\Model\Producer;

class PointSaleRepository extends AbstractRepository
{

+ 1
- 1
common/logic/Producer/Producer/Model/Producer.php Vedi File

@@ -38,8 +38,8 @@

namespace common\logic\Producer\Producer\Model;

use common\logic\Config\TaxRate\Model\TaxRate;
use common\logic\User\User\Model\User;
use common\logic\Config\TaxRate\TaxRate;
use common\logic\User\UserProducer\Model\UserProducer;
use common\components\ActiveRecordCommon;


+ 2
- 2
common/logic/Product/Product/Model/Product.php Vedi File

@@ -39,15 +39,15 @@
namespace common\logic\Product\Product\Model;

use common\helpers\GlobalParam;
use common\logic\Config\TaxRate\TaxRate;
use common\logic\Config\TaxRate\Model\TaxRate;
use common\logic\Distribution\ProductDistribution\Model\ProductDistribution;
use common\logic\Producer\Producer\Model\Producer;
use common\logic\Product\Product\Service\ProductSolver;
use common\logic\Product\ProductCategory\Model\ProductCategory;
use common\logic\Product\ProductPointSale\Model\ProductPointSale;
use common\logic\Product\ProductPrice\Model\ProductPrice;
use common\logic\Subscription\ProductSubscription\ProductSubscription;
use common\components\ActiveRecordCommon;
use common\logic\Subscription\ProductSubscription\Model\ProductSubscription;

/**
* This is the model class for table "product".

+ 0
- 1
common/logic/Product/ProductCategory/Model/ProductCategory.php Vedi File

@@ -42,7 +42,6 @@ use common\components\ActiveRecordCommon;

/**
* This is the model class for table "product_category".
*
*/
class ProductCategory extends ActiveRecordCommon
{

+ 0
- 1
common/logic/Product/ProductCategory/Model/ProductCategorySearch.php Vedi File

@@ -44,7 +44,6 @@ use yii\data\ActiveDataProvider;

class ProductCategorySearch extends ProductCategory
{
public function rules()
{
return [

+ 0
- 2
common/logic/Subscription/ProductSubscription/Model/ProductSubscription.php Vedi File

@@ -43,11 +43,9 @@ use common\logic\Product\Product\Model\Product;

/**
* This is the model class for table "commande_auto_produit".
*
*/
class ProductSubscription extends ActiveRecordCommon
{

/**
* @inheritdoc
*/

+ 0
- 4
common/logic/Subscription/Subscription/Event/SubscriptionEventSubscriber.php Vedi File

@@ -7,10 +7,6 @@ use common\logic\Order\Order\Wrapper\OrderManager;

class SubscriptionEventSubscriber
{
/**
* @param Distribution $distribution
* @return void
*/
public static function onActiveDistribution(Distribution $distribution): void
{
$orderManager = OrderManager::getInstance();

Loading…
Annulla
Salva