add Logging
This commit is contained in:
parent
b279dd058f
commit
b5f1ba6f87
@ -61,7 +61,9 @@ class HiltesExportCommand extends Command
|
|||||||
|
|
||||||
|
|
||||||
foreach ($orders as $order) {
|
foreach ($orders as $order) {
|
||||||
if ($order->getStatus() > 0) continue;
|
if ($order->getStatus() > 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$tA = $order->getData();#json_decode($order->getData());
|
$tA = $order->getData();#json_decode($order->getData());
|
||||||
$tA['orderdate'] = "2023-08-30T12:05:24.000Z";
|
$tA['orderdate'] = "2023-08-30T12:05:24.000Z";
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ use Symfony\Component\Console\Input\InputOption;
|
|||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||||
use Symfony\Component\HttpKernel\KernelInterface;
|
use Symfony\Component\HttpKernel\KernelInterface;
|
||||||
|
|
||||||
use function Sentry\captureCheckIn;
|
use function Sentry\captureCheckIn;
|
||||||
|
|
||||||
#[AsCommand(
|
#[AsCommand(
|
||||||
@ -35,8 +36,7 @@ class HiltesImportCommand extends Command
|
|||||||
StockRepository $stockRepository,
|
StockRepository $stockRepository,
|
||||||
WarehouseRepository $warehouseRepository,
|
WarehouseRepository $warehouseRepository,
|
||||||
LoggerInterface $logger
|
LoggerInterface $logger
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
$this->productRepository = $productRepository;
|
$this->productRepository = $productRepository;
|
||||||
$this->stockRepository = $stockRepository;
|
$this->stockRepository = $stockRepository;
|
||||||
$this->warehouseRepository = $warehouseRepository;
|
$this->warehouseRepository = $warehouseRepository;
|
||||||
|
@ -32,8 +32,7 @@ class JtlExportCommand extends Command
|
|||||||
StockRepository $stockRepository,
|
StockRepository $stockRepository,
|
||||||
WarehouseRepository $warehouseRepository,
|
WarehouseRepository $warehouseRepository,
|
||||||
LoggerInterface $logger
|
LoggerInterface $logger
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
$this->productRepository = $productRepository;
|
$this->productRepository = $productRepository;
|
||||||
$this->stockRepository = $stockRepository;
|
$this->stockRepository = $stockRepository;
|
||||||
$this->warehouseRepository = $warehouseRepository;
|
$this->warehouseRepository = $warehouseRepository;
|
||||||
|
@ -9,7 +9,6 @@ use DateTimeInterface;
|
|||||||
use Doctrine\DBAL\Types\Types;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Bestellungen Status:
|
* Bestellungen Status:
|
||||||
* 1 = Bestellung eingegangen
|
* 1 = Bestellung eingegangen
|
||||||
|
@ -15,7 +15,6 @@ use Symfony\Component\HttpFoundation\Request;
|
|||||||
use Symfony\Component\HttpKernel\Event\ViewEvent;
|
use Symfony\Component\HttpKernel\Event\ViewEvent;
|
||||||
use Symfony\Component\HttpKernel\KernelEvents;
|
use Symfony\Component\HttpKernel\KernelEvents;
|
||||||
|
|
||||||
|
|
||||||
class SlackNotifySubscriber implements EventSubscriberInterface
|
class SlackNotifySubscriber implements EventSubscriberInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Helper;
|
namespace App\Helper;
|
||||||
|
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
|
|
||||||
class Ftp
|
class Ftp
|
||||||
|
@ -9,7 +9,6 @@ use Symfony\Component\Filesystem\Exception\IOExceptionInterface;
|
|||||||
use Symfony\Component\Filesystem\Filesystem;
|
use Symfony\Component\Filesystem\Filesystem;
|
||||||
use Symfony\Component\Finder\Finder;
|
use Symfony\Component\Finder\Finder;
|
||||||
|
|
||||||
|
|
||||||
class Hiltes
|
class Hiltes
|
||||||
{
|
{
|
||||||
// init file system
|
// init file system
|
||||||
@ -37,7 +36,7 @@ class Hiltes
|
|||||||
* @param string $data
|
* @param string $data
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function export(string $data) : void
|
public function export(string $data): void
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$new_file_path = $this->current_dir_path . "/hiltes/c2h/" . $this->createFileName();
|
$new_file_path = $this->current_dir_path . "/hiltes/c2h/" . $this->createFileName();
|
||||||
@ -114,8 +113,8 @@ class Hiltes
|
|||||||
$tSalNr = array();
|
$tSalNr = array();
|
||||||
foreach ($tA['positions'] as $v) {
|
foreach ($tA['positions'] as $v) {
|
||||||
if ($v['type'] == 'versandposition' || $v['sku'] == '') {
|
if ($v['type'] == 'versandposition' || $v['sku'] == '') {
|
||||||
// $SalesNumber = '000001';
|
// $SalesNumber = '000001';
|
||||||
// $SalesGoodsGroupNumber = 9350;
|
// $SalesGoodsGroupNumber = 9350;
|
||||||
|
|
||||||
// Versandkosten werden nicht übermittelt
|
// Versandkosten werden nicht übermittelt
|
||||||
continue;
|
continue;
|
||||||
@ -258,7 +257,7 @@ class Hiltes
|
|||||||
* @param mixed $data The data to be converted to JSON.
|
* @param mixed $data The data to be converted to JSON.
|
||||||
* @return array The JSON object.
|
* @return array The JSON object.
|
||||||
*/
|
*/
|
||||||
public function createJson($data) : array
|
public function createJson($data): array
|
||||||
{
|
{
|
||||||
$arr = array(
|
$arr = array(
|
||||||
'File' => array(
|
'File' => array(
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Helper;
|
namespace App\Helper;
|
||||||
|
|
||||||
|
|
||||||
use App\Entity\Product;
|
use App\Entity\Product;
|
||||||
use App\Entity\Stock;
|
use App\Entity\Stock;
|
||||||
use App\Entity\Warehouse;
|
use App\Entity\Warehouse;
|
||||||
|
@ -12,7 +12,6 @@ use Exception;
|
|||||||
use League\Csv\Writer;
|
use League\Csv\Writer;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
|
|
||||||
|
|
||||||
class Jtl
|
class Jtl
|
||||||
{
|
{
|
||||||
private $productRepository;
|
private $productRepository;
|
||||||
@ -45,8 +44,8 @@ class Jtl
|
|||||||
WarehouseRepository $warehouseRepository,
|
WarehouseRepository $warehouseRepository,
|
||||||
StockRepository $stockRepository,
|
StockRepository $stockRepository,
|
||||||
LoggerInterface $logger,
|
LoggerInterface $logger,
|
||||||
string $rootPath)
|
string $rootPath
|
||||||
{
|
) {
|
||||||
$this->productRepository = $productRepository;
|
$this->productRepository = $productRepository;
|
||||||
$this->warehouseRepository = $warehouseRepository;
|
$this->warehouseRepository = $warehouseRepository;
|
||||||
$this->stockRepository = $stockRepository;
|
$this->stockRepository = $stockRepository;
|
||||||
|
@ -39,28 +39,28 @@ class HlsCountryRepository extends ServiceEntityRepository
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * @return HlsCountry[] Returns an array of HlsCountry objects
|
// * @return HlsCountry[] Returns an array of HlsCountry objects
|
||||||
// */
|
// */
|
||||||
// public function findByExampleField($value): array
|
// public function findByExampleField($value): array
|
||||||
// {
|
// {
|
||||||
// return $this->createQueryBuilder('h')
|
// return $this->createQueryBuilder('h')
|
||||||
// ->andWhere('h.exampleField = :val')
|
// ->andWhere('h.exampleField = :val')
|
||||||
// ->setParameter('val', $value)
|
// ->setParameter('val', $value)
|
||||||
// ->orderBy('h.id', 'ASC')
|
// ->orderBy('h.id', 'ASC')
|
||||||
// ->setMaxResults(10)
|
// ->setMaxResults(10)
|
||||||
// ->getQuery()
|
// ->getQuery()
|
||||||
// ->getResult()
|
// ->getResult()
|
||||||
// ;
|
// ;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// public function findOneBySomeField($value): ?HlsCountry
|
// public function findOneBySomeField($value): ?HlsCountry
|
||||||
// {
|
// {
|
||||||
// return $this->createQueryBuilder('h')
|
// return $this->createQueryBuilder('h')
|
||||||
// ->andWhere('h.exampleField = :val')
|
// ->andWhere('h.exampleField = :val')
|
||||||
// ->setParameter('val', $value)
|
// ->setParameter('val', $value)
|
||||||
// ->getQuery()
|
// ->getQuery()
|
||||||
// ->getOneOrNullResult()
|
// ->getOneOrNullResult()
|
||||||
// ;
|
// ;
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
@ -59,30 +59,30 @@ class OrderRepository extends ServiceEntityRepository
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * @return Order[] Returns an array of Order objects
|
// * @return Order[] Returns an array of Order objects
|
||||||
// */
|
// */
|
||||||
// public function findByExampleField($value): array
|
// public function findByExampleField($value): array
|
||||||
// {
|
// {
|
||||||
// return $this->createQueryBuilder('o')
|
// return $this->createQueryBuilder('o')
|
||||||
// ->andWhere('o.exampleField = :val')
|
// ->andWhere('o.exampleField = :val')
|
||||||
// ->setParameter('val', $value)
|
// ->setParameter('val', $value)
|
||||||
// ->orderBy('o.id', 'ASC')
|
// ->orderBy('o.id', 'ASC')
|
||||||
// ->setMaxResults(10)
|
// ->setMaxResults(10)
|
||||||
// ->getQuery()
|
// ->getQuery()
|
||||||
// ->getResult()
|
// ->getResult()
|
||||||
// ;
|
// ;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// public function findOneBySomeField($value): ?Order
|
// public function findOneBySomeField($value): ?Order
|
||||||
// {
|
// {
|
||||||
// return $this->createQueryBuilder('o')
|
// return $this->createQueryBuilder('o')
|
||||||
// ->andWhere('o.exampleField = :val')
|
// ->andWhere('o.exampleField = :val')
|
||||||
// ->setParameter('val', $value)
|
// ->setParameter('val', $value)
|
||||||
// ->getQuery()
|
// ->getQuery()
|
||||||
// ->getOneOrNullResult()
|
// ->getOneOrNullResult()
|
||||||
// ;
|
// ;
|
||||||
// }
|
// }
|
||||||
/**
|
/**
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
@ -39,28 +39,28 @@ class SettingsRepository extends ServiceEntityRepository
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * @return Settings[] Returns an array of Settings objects
|
// * @return Settings[] Returns an array of Settings objects
|
||||||
// */
|
// */
|
||||||
// public function findByExampleField($value): array
|
// public function findByExampleField($value): array
|
||||||
// {
|
// {
|
||||||
// return $this->createQueryBuilder('s')
|
// return $this->createQueryBuilder('s')
|
||||||
// ->andWhere('s.exampleField = :val')
|
// ->andWhere('s.exampleField = :val')
|
||||||
// ->setParameter('val', $value)
|
// ->setParameter('val', $value)
|
||||||
// ->orderBy('s.id', 'ASC')
|
// ->orderBy('s.id', 'ASC')
|
||||||
// ->setMaxResults(10)
|
// ->setMaxResults(10)
|
||||||
// ->getQuery()
|
// ->getQuery()
|
||||||
// ->getResult()
|
// ->getResult()
|
||||||
// ;
|
// ;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// public function findOneBySomeField($value): ?Settings
|
// public function findOneBySomeField($value): ?Settings
|
||||||
// {
|
// {
|
||||||
// return $this->createQueryBuilder('s')
|
// return $this->createQueryBuilder('s')
|
||||||
// ->andWhere('s.exampleField = :val')
|
// ->andWhere('s.exampleField = :val')
|
||||||
// ->setParameter('val', $value)
|
// ->setParameter('val', $value)
|
||||||
// ->getQuery()
|
// ->getQuery()
|
||||||
// ->getOneOrNullResult()
|
// ->getOneOrNullResult()
|
||||||
// ;
|
// ;
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
@ -55,13 +55,13 @@ class WarehouseRepository extends ServiceEntityRepository
|
|||||||
->getResult();
|
->getResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
// public function findOneBySomeField($value): ?Warehouse
|
// public function findOneBySomeField($value): ?Warehouse
|
||||||
// {
|
// {
|
||||||
// return $this->createQueryBuilder('w')
|
// return $this->createQueryBuilder('w')
|
||||||
// ->andWhere('w.exampleField = :val')
|
// ->andWhere('w.exampleField = :val')
|
||||||
// ->setParameter('val', $value)
|
// ->setParameter('val', $value)
|
||||||
// ->getQuery()
|
// ->getQuery()
|
||||||
// ->getOneOrNullResult()
|
// ->getOneOrNullResult()
|
||||||
// ;
|
// ;
|
||||||
// }
|
// }
|
||||||
}
|
}
|
@ -15,7 +15,6 @@ use Symfony\Component\Security\Http\Authenticator\Passport\SelfValidatingPasspor
|
|||||||
|
|
||||||
class ApiKeyAuthenticator extends AbstractAuthenticator
|
class ApiKeyAuthenticator extends AbstractAuthenticator
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called on every request to decide if this authenticator should be
|
* Called on every request to decide if this authenticator should be
|
||||||
* used for the request. Returning `false` will cause this authenticator
|
* used for the request. Returning `false` will cause this authenticator
|
||||||
|
Loading…
Reference in New Issue
Block a user