|
@@ -8,6 +8,7 @@
|
|
|
namespace Customers\Lamborghini;
|
|
namespace Customers\Lamborghini;
|
|
|
|
|
|
|
|
use OpenMind\Labeling\FindBoxCoreSystem;
|
|
use OpenMind\Labeling\FindBoxCoreSystem;
|
|
|
|
|
+use OpenMind\Labeling\SmartESL;
|
|
|
|
|
|
|
|
class Pages extends \OpenMind\Web\BaseController
|
|
class Pages extends \OpenMind\Web\BaseController
|
|
|
{
|
|
{
|
|
@@ -53,11 +54,11 @@ class Pages extends \OpenMind\Web\BaseController
|
|
|
|
|
|
|
|
switch ($args['step']) {
|
|
switch ($args['step']) {
|
|
|
case 3:
|
|
case 3:
|
|
|
- $distinta = new Distinta($f3);
|
|
|
|
|
|
|
+ $distinta = new Distinta();
|
|
|
$distinta->CleanDistintaTable();
|
|
$distinta->CleanDistintaTable();
|
|
|
$distinta->CopyDistinta($stepValues['consegna']);
|
|
$distinta->CopyDistinta($stepValues['consegna']);
|
|
|
|
|
|
|
|
- $label = new \SmartESL($this->findBoxCore, [$stepValues['labelid']]);
|
|
|
|
|
|
|
+ $label = new SmartESL($this->findBoxCore, [$stepValues['labelid']]);
|
|
|
$label->BlinkSpecial(0, 1, 1000, 8, 0);
|
|
$label->BlinkSpecial(0, 1, 1000, 8, 0);
|
|
|
|
|
|
|
|
$distinta->SaveProductsToFindBox('3', true, 50); // prende soltanto i primi 3 dalla tabella copia delle distinte
|
|
$distinta->SaveProductsToFindBox('3', true, 50); // prende soltanto i primi 3 dalla tabella copia delle distinte
|
|
@@ -69,13 +70,13 @@ class Pages extends \OpenMind\Web\BaseController
|
|
|
return;
|
|
return;
|
|
|
break;
|
|
break;
|
|
|
case 4:
|
|
case 4:
|
|
|
- $distinta = new Distinta($f3);
|
|
|
|
|
|
|
+ $distinta = new Distinta();
|
|
|
$distinta->SaveProductsToFindBox('3, 2000', false); // LIMIT 3,1000 perchè i primi 3 sono stati fatti nel case 3
|
|
$distinta->SaveProductsToFindBox('3, 2000', false); // LIMIT 3,1000 perchè i primi 3 sono stati fatti nel case 3
|
|
|
break;
|
|
break;
|
|
|
case 5:
|
|
case 5:
|
|
|
$datiCommessa['consegna'] = $f3->get('COOKIE.consegna');
|
|
$datiCommessa['consegna'] = $f3->get('COOKIE.consegna');
|
|
|
$datiCommessa['labelid'] = $f3->get('COOKIE.labelid');
|
|
$datiCommessa['labelid'] = $f3->get('COOKIE.labelid');
|
|
|
- $distinta = new Distinta($f3);
|
|
|
|
|
|
|
+ $distinta = new Distinta();
|
|
|
$pickedBarcode = $f3->get('POST.pickedlabelid');
|
|
$pickedBarcode = $f3->get('POST.pickedlabelid');
|
|
|
// Decrease quantity and blink label
|
|
// Decrease quantity and blink label
|
|
|
if ($pickedBarcode != null) {
|
|
if ($pickedBarcode != null) {
|
|
@@ -97,7 +98,7 @@ class Pages extends \OpenMind\Web\BaseController
|
|
|
$pickedBarcode = $codeFromLabelId ?? $pickedBarcode;
|
|
$pickedBarcode = $codeFromLabelId ?? $pickedBarcode;
|
|
|
if ($distinta->RemoveQuantity($pickedBarcode)) {
|
|
if ($distinta->RemoveQuantity($pickedBarcode)) {
|
|
|
// SPEGNE LED ETICHETTA DOPO PICKING
|
|
// SPEGNE LED ETICHETTA DOPO PICKING
|
|
|
- $label = new \SmartESL($this->findBoxCore, [$distinta->GetLabelIdFromBarcode($pickedBarcode)]);
|
|
|
|
|
|
|
+ $label = new SmartESL($this->findBoxCore, [$distinta->GetLabelIdFromBarcode($pickedBarcode)]);
|
|
|
$label->BlinkOff();
|
|
$label->BlinkOff();
|
|
|
} else {
|
|
} else {
|
|
|
$f3->set('INFOTEXT', 'Barcode non riconosciuto o non associato ad alcuna etichetta elettronica');
|
|
$f3->set('INFOTEXT', 'Barcode non riconosciuto o non associato ad alcuna etichetta elettronica');
|
|
@@ -114,7 +115,7 @@ class Pages extends \OpenMind\Web\BaseController
|
|
|
$anomalie = $distinta->getAnomalieFromConsegne($datiCommessa['consegna']);
|
|
$anomalie = $distinta->getAnomalieFromConsegne($datiCommessa['consegna']);
|
|
|
$f3->set('LISTANOMALIE', $anomalie);
|
|
$f3->set('LISTANOMALIE', $anomalie);
|
|
|
|
|
|
|
|
- $label = new \SmartESL($this->findBoxCore, [$datiCommessa['labelid']]);
|
|
|
|
|
|
|
+ //$label = new SmartESL($this->findBoxCore, [$datiCommessa['labelid']]);
|
|
|
$distinta->SaveLabelCarrello($datiCommessa['labelid'], $datiCommessa['labelid'], $datiCommessa['consegna']);
|
|
$distinta->SaveLabelCarrello($datiCommessa['labelid'], $datiCommessa['labelid'], $datiCommessa['consegna']);
|
|
|
|
|
|
|
|
// Se non ci sono anomalie torna alla homepage
|
|
// Se non ci sono anomalie torna alla homepage
|
|
@@ -127,7 +128,7 @@ class Pages extends \OpenMind\Web\BaseController
|
|
|
foreach($rowsDistinta as $rowDist) {
|
|
foreach($rowsDistinta as $rowDist) {
|
|
|
$labelId = $distinta->GetLabelIdFromBarcode($rowDist['barcode']);
|
|
$labelId = $distinta->GetLabelIdFromBarcode($rowDist['barcode']);
|
|
|
if ($labelId != null) {
|
|
if ($labelId != null) {
|
|
|
- $label = new \SmartESL($this->findBoxCore, [$labelId]);
|
|
|
|
|
|
|
+ $label = new SmartESL($this->findBoxCore, [$labelId]);
|
|
|
// Se è lo stesso barcode di quello appena pickato dall'operatore, non lo blinka di nuovo
|
|
// Se è lo stesso barcode di quello appena pickato dall'operatore, non lo blinka di nuovo
|
|
|
if ($distinta->GetArticleCount($rowDist['barcode']) > 0) {
|
|
if ($distinta->GetArticleCount($rowDist['barcode']) > 0) {
|
|
|
$label->BlinkSpecial(2, 1, 1000, 20);
|
|
$label->BlinkSpecial(2, 1, 1000, 20);
|
|
@@ -163,7 +164,7 @@ class Pages extends \OpenMind\Web\BaseController
|
|
|
|
|
|
|
|
if ($args['step'] == 3) {
|
|
if ($args['step'] == 3) {
|
|
|
$this->findBoxCore->Bind($stepValues['labelid'], $stepValues['barcode']);
|
|
$this->findBoxCore->Bind($stepValues['labelid'], $stepValues['barcode']);
|
|
|
- $label = new \SmartESL($this->findBoxCore, [$stepValues['labelid']]);
|
|
|
|
|
|
|
+ $label = new SmartESL($this->findBoxCore, [$stepValues['labelid']]);
|
|
|
|
|
|
|
|
if ($stepValues['labelid'] == $stepValues['barcode'])
|
|
if ($stepValues['labelid'] == $stepValues['barcode'])
|
|
|
$devType = 79;
|
|
$devType = 79;
|
|
@@ -176,7 +177,7 @@ class Pages extends \OpenMind\Web\BaseController
|
|
|
|
|
|
|
|
// Reset label carrello if barcode = label id
|
|
// Reset label carrello if barcode = label id
|
|
|
if ($stepValues['labelid'] == $stepValues['barcode']) {
|
|
if ($stepValues['labelid'] == $stepValues['barcode']) {
|
|
|
- $d = new Distinta($f3);
|
|
|
|
|
|
|
+ $d = new Distinta();
|
|
|
$d->ResetLabelCarrello($stepValues['labelid']);
|
|
$d->ResetLabelCarrello($stepValues['labelid']);
|
|
|
} else {
|
|
} else {
|
|
|
$articles = new \DB\SQL\Mapper($this->dbHandle, 'articles');
|
|
$articles = new \DB\SQL\Mapper($this->dbHandle, 'articles');
|
|
@@ -227,7 +228,7 @@ class Pages extends \OpenMind\Web\BaseController
|
|
|
|
|
|
|
|
public function ElencoDistinta($f3)
|
|
public function ElencoDistinta($f3)
|
|
|
{
|
|
{
|
|
|
- $distinta = new Distinta($f3);
|
|
|
|
|
|
|
+ $distinta = new Distinta();
|
|
|
$f3->set('PRODUCTS', $distinta->getDistinte());
|
|
$f3->set('PRODUCTS', $distinta->getDistinte());
|
|
|
$f3->set('CONTENT', 'distinta.tpl');
|
|
$f3->set('CONTENT', 'distinta.tpl');
|
|
|
echo \Template::instance()->render('masterpage.tpl');
|
|
echo \Template::instance()->render('masterpage.tpl');
|