示例#1
0
文件: start.php 项目: exaflo/appli
 $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;
             $psCodeAtelier = $resu_negoce[0]->CodeAtelier;
             $objSmartgang->logFile(basename(__FILE__), "script", "OK ", ": Commande -> {$pnIdCommande} | IdPlanche => {$pnIdPlanche} | DateExp -> {$pdDateExpe} | Atelier : {$psCodeAtelier}");
             $objSmartgang->getFicheRetirage($pnIdPlanche);
             //-- create Fiche de fab retirage PDF