Beispiel #1
0
     if (is_object($date)) {
         $pdDateExpe = "'" . $date->format('Ymd') . "'";
     }
 }
 $objSmartgang->logFile(basename(__FILE__), "script", "EXE", "Commande -> {$pnIdCommande}");
 $conDbo = $objSmartgang->getConDbo();
 //-- conn to dbo
 if (!$conDbo) {
     //-- success connect
     $pnIdPlanche = $objSmartgang->getCreationPlancheNegoce($pnIdCommande, $pnIDAtelier, $pnIdUtilisateur, $pdDateExpe);
     //-- creationsql planche negoce
     if (is_numeric($pnIdPlanche)) {
         //-- recuperation des infos de planches
         $objSmartgang->getPapierBrochure($pnIdCommande, $pnIdPlanche);
         //-- add format "BROCHURE" if needed
         $resu_info = $objSmartgang->getInfoPlanche($pnIdPlanche);
         //-- recup info planche
         $objSmartgang->getFicheFabV2($resu_info);
         //-- create Fiche de fab negoce PDF
         $objSmartgang->getXmlFile($pnIdPlanche);
         //-- genere le xml de la fiche de fab
         sleep(120);
         //-- wait 120sec to be sur that all the files are copied
         $objSmartgang->getImport($resu_info);
         //-- appel au script de déplacement des fichiers dans IMPORTS
         $objSmartgang->getRenameImport($pnIdPlanche, $pnIdCommande);
         //-- rename IMPORTS
         if ($pnIdPlanche > 0) {
             $resu_negoce = $objSmartgang->execMsSql("SELECT\n     CONVERT(CHAR(11),TP.DateExpeditionUrgente, 13) AS DateExp\n     , TP.IDAtelier AS IDAtelier\n     , TA.Code AS CodeAtelier\n FROM\n     dbo.TBL_PLANCHE AS TP\n     JOIN TBL_ATELIER AS TA ON TP.IDAtelier = TA.IDAtelier\n WHERE\n     TP.IDPlanche = '{$pnIdPlanche}'");
             $pdDateExpe = $resu_negoce[0]->DateExp;
             $idatelier = $resu_negoce[0]->IDAtelier;
Beispiel #2
0
 $start = $exaprint->getmicrotime();
 $exaprint->logFile(basename(__FILE__), "script", "RUN", "IDPlanche: {$pnIdPlanche} - ExportPDF: {$exportAsked}");
 $deviceId = "Speedmaster 102";
 $bascule = "Sheetwise";
 $bleed = "2";
 $params = $exaprint->getParams();
 $pathMontage = $params['montage']['url'];
 $pathInputMxml = $params['metrix']['path'];
 $conDbo = $exaprint->getConDbo();
 if ($exportAsked != "non") {
     $exec = "exec dbo.P_FluxEvenementCreation null,{$pnIdPlanche},3,687,'MetrixAutomation',0";
 } else {
     $exec = "exec dbo.P_FluxEvenementCreation null,{$pnIdPlanche},2,687,'MetrixAutomation',0";
 }
 $exaprint->execMsSql($exec);
 $info_planche = $exaprint->getInfoPlanche($pnIdPlanche);
 $pListeCommandes = $info_planche['pListeCommandes'];
 $psCodeTete = $info_planche['psCodeTete'];
 $psActiviteProd = $info_planche['psActiviteProd'];
 $pdDateCreationPlanche = $info_planche['pdDateCreationPlanche'];
 $psCodeatelier = $info_planche['psCodeAtelier'];
 $pathImport = "Volumes/mnt/raid1/datas/Production/Chef_de_fab_v2/MONTAGE/{$psCodeTete}/{$pdDateCreationPlanche}/{$pnIdPlanche}/IMPORTS";
 $pathPlanche = "Volumes/Chef_de_fab_v2/MONTAGE/{$psCodeTete}/{$pdDateCreationPlanche}/{$pnIdPlanche}/{$psCodeatelier}_{$psActiviteProd}_{$pnIdPlanche}";
 $import_content = $exaprint->getReadDir("/" . $pathImport);
 $qGangSize = "SELECT TOP 1\n    TP.Largeur AS Largeur\n    , TP.Longueur AS Longueur\n    , TP.Bascule AS Bascule\n    , CASE WHEN TPTPOV.IDProduitOptionValeur = 181 THEN 'Sheetwise' WHEN TPTPOV.IDProduitOptionValeur = 238 THEN 'Sheetwise' ELSE 'OneSided' END AS IDProduitOptionValeur\nFROM\n    dbo.TBL_PLANCHE AS TP \n    LEFT OUTER JOIN dbo.TBL_PLANCHE_TL_PRODUIT_OPTION_VALEUR AS TPTPOV ON TP.IDPlanche = TPTPOV.IDPlanche\nWHERE\n    TP.EstSupp = '0'\n    AND TPTPOV.IDProduitOptionValeur IN (376,238,181,180)\n    AND TP.IDPlanche = {$pnIdPlanche}\nORDER BY\n  TPTPOV.IDProduitOptionValeur DESC";
 $gangSize = $exaprint->execMsSql($qGangSize);
 if (isset($gangSize[0]->IDProduitOptionValeur) && $gangSize[0]->IDProduitOptionValeur != '') {
     $bascule = $gangSize[0]->IDProduitOptionValeur;
 }
 switch ($gangSize[0]->Bascule) {
     case 1: