mfg
This commit is contained in:
@@ -61,9 +61,7 @@ class HiltesExportCommand extends Command
|
||||
|
||||
|
||||
foreach ($orders as $order) {
|
||||
if ($order->getStatus() > 0) {
|
||||
continue;
|
||||
}
|
||||
if ($order->getStatus() > 0) continue;
|
||||
$tA = $order->getData();#json_decode($order->getData());
|
||||
$tA['orderdate'] = "2023-08-30T12:05:24.000Z";
|
||||
|
||||
@@ -182,4 +180,4 @@ class HiltesExportCommand extends Command
|
||||
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,6 @@ use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
use Symfony\Component\HttpKernel\KernelInterface;
|
||||
|
||||
use function Sentry\captureCheckIn;
|
||||
|
||||
#[AsCommand(
|
||||
@@ -36,7 +35,8 @@ class HiltesImportCommand extends Command
|
||||
StockRepository $stockRepository,
|
||||
WarehouseRepository $warehouseRepository,
|
||||
LoggerInterface $logger
|
||||
) {
|
||||
)
|
||||
{
|
||||
$this->productRepository = $productRepository;
|
||||
$this->stockRepository = $stockRepository;
|
||||
$this->warehouseRepository = $warehouseRepository;
|
||||
@@ -125,4 +125,4 @@ class HiltesImportCommand extends Command
|
||||
//POST: $dirs = /app/public
|
||||
return implode('/', $dirs);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,8 @@ class JtlExportCommand extends Command
|
||||
StockRepository $stockRepository,
|
||||
WarehouseRepository $warehouseRepository,
|
||||
LoggerInterface $logger
|
||||
) {
|
||||
)
|
||||
{
|
||||
$this->productRepository = $productRepository;
|
||||
$this->stockRepository = $stockRepository;
|
||||
$this->warehouseRepository = $warehouseRepository;
|
||||
@@ -84,4 +85,4 @@ class JtlExportCommand extends Command
|
||||
return implode('/', $dirs);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ use DateTimeInterface;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
|
||||
/*
|
||||
* Bestellungen Status:
|
||||
* 1 = Bestellung eingegangen
|
||||
@@ -107,4 +108,4 @@ class Order
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -60,4 +60,4 @@ class Product
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -126,4 +126,4 @@ class Stock
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -93,4 +93,4 @@ class Warehouse
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40,4 +40,4 @@ class ExportHiltesSubscriber implements EventSubscriberInterface
|
||||
KernelEvents::VIEW => ['onPatchOrder', EventPriorities::POST_WRITE]
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,7 +70,7 @@ class SlackNotifySubscriber implements EventSubscriberInterface
|
||||
$warehouse = $this->getWarehouseByGtin($item['gtin']);
|
||||
|
||||
if (!$warehouse) {
|
||||
# $this->logger->error('Warehouse not found for GTIN: ' . $item['gtin']);
|
||||
// $this->logger->error('Warehouse not found for GTIN: ' . $item['gtin']);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -110,7 +110,9 @@ class SlackNotifySubscriber implements EventSubscriberInterface
|
||||
if ($gtin == null) {
|
||||
return false;
|
||||
}
|
||||
$warehouse = false;
|
||||
|
||||
//standart push in 8?
|
||||
$warehouse = 8;
|
||||
|
||||
$product = $this->productRepository->findOneBy(['gtin' => $gtin]);
|
||||
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Helper;
|
||||
|
||||
|
||||
use Exception;
|
||||
|
||||
class Ftp
|
||||
@@ -129,4 +130,4 @@ class Ftp
|
||||
{
|
||||
$this->remoteDir = $remoteDir;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Helper;
|
||||
|
||||
|
||||
use App\Entity\Product;
|
||||
use App\Entity\Stock;
|
||||
use App\Entity\Warehouse;
|
||||
@@ -322,4 +323,4 @@ class HiltesImport
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-3
@@ -12,6 +12,7 @@ use Exception;
|
||||
use League\Csv\Writer;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
|
||||
class Jtl
|
||||
{
|
||||
private $productRepository;
|
||||
@@ -44,8 +45,8 @@ class Jtl
|
||||
WarehouseRepository $warehouseRepository,
|
||||
StockRepository $stockRepository,
|
||||
LoggerInterface $logger,
|
||||
string $rootPath
|
||||
) {
|
||||
string $rootPath)
|
||||
{
|
||||
$this->productRepository = $productRepository;
|
||||
$this->warehouseRepository = $warehouseRepository;
|
||||
$this->stockRepository = $stockRepository;
|
||||
@@ -127,4 +128,4 @@ class Jtl
|
||||
$this->logger->error($e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,28 +39,28 @@ class HlsCountryRepository extends ServiceEntityRepository
|
||||
}
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return HlsCountry[] Returns an array of HlsCountry objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('h')
|
||||
// ->andWhere('h.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('h.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
// /**
|
||||
// * @return HlsCountry[] Returns an array of HlsCountry objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('h')
|
||||
// ->andWhere('h.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('h.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
|
||||
// public function findOneBySomeField($value): ?HlsCountry
|
||||
// {
|
||||
// return $this->createQueryBuilder('h')
|
||||
// ->andWhere('h.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
// public function findOneBySomeField($value): ?HlsCountry
|
||||
// {
|
||||
// return $this->createQueryBuilder('h')
|
||||
// ->andWhere('h.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -59,30 +59,30 @@ class OrderRepository extends ServiceEntityRepository
|
||||
}
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return Order[] Returns an array of Order objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('o')
|
||||
// ->andWhere('o.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('o.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
// /**
|
||||
// * @return Order[] Returns an array of Order objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('o')
|
||||
// ->andWhere('o.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('o.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
|
||||
// public function findOneBySomeField($value): ?Order
|
||||
// {
|
||||
// return $this->createQueryBuilder('o')
|
||||
// ->andWhere('o.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
// public function findOneBySomeField($value): ?Order
|
||||
// {
|
||||
// return $this->createQueryBuilder('o')
|
||||
// ->andWhere('o.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
@@ -90,4 +90,4 @@ class OrderRepository extends ServiceEntityRepository
|
||||
{
|
||||
throw new Exception($string);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -77,4 +77,4 @@ class ProductRepository extends ServiceEntityRepository
|
||||
return $product_ids;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -39,28 +39,28 @@ class SettingsRepository extends ServiceEntityRepository
|
||||
}
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return Settings[] Returns an array of Settings objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('s')
|
||||
// ->andWhere('s.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('s.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
// /**
|
||||
// * @return Settings[] Returns an array of Settings objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('s')
|
||||
// ->andWhere('s.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('s.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
|
||||
// public function findOneBySomeField($value): ?Settings
|
||||
// {
|
||||
// return $this->createQueryBuilder('s')
|
||||
// ->andWhere('s.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
// public function findOneBySomeField($value): ?Settings
|
||||
// {
|
||||
// return $this->createQueryBuilder('s')
|
||||
// ->andWhere('s.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -75,4 +75,4 @@ class StockRepository extends ServiceEntityRepository
|
||||
$this->getEntityManager()->flush();
|
||||
$this->batch = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -55,13 +55,13 @@ class WarehouseRepository extends ServiceEntityRepository
|
||||
->getResult();
|
||||
}
|
||||
|
||||
// public function findOneBySomeField($value): ?Warehouse
|
||||
// {
|
||||
// return $this->createQueryBuilder('w')
|
||||
// ->andWhere('w.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
}
|
||||
// public function findOneBySomeField($value): ?Warehouse
|
||||
// {
|
||||
// return $this->createQueryBuilder('w')
|
||||
// ->andWhere('w.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
}
|
||||
@@ -15,6 +15,7 @@ use Symfony\Component\Security\Http\Authenticator\Passport\SelfValidatingPasspor
|
||||
|
||||
class ApiKeyAuthenticator extends AbstractAuthenticator
|
||||
{
|
||||
|
||||
/**
|
||||
* Called on every request to decide if this authenticator should be
|
||||
* used for the request. Returning `false` will cause this authenticator
|
||||
@@ -60,4 +61,4 @@ class ApiKeyAuthenticator extends AbstractAuthenticator
|
||||
return new JsonResponse($data, Response::HTTP_UNAUTHORIZED);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user