Browse Source

工单同步

qiuenguang 1 year ago
parent
commit
5eaba6740e
1 changed files with 2 additions and 6 deletions
  1. 2 6
      application/api/controller/Synchronization.php

+ 2 - 6
application/api/controller/Synchronization.php

@@ -24,6 +24,7 @@ class Synchronization extends Api
         }
         $db3 = Db::connect(config('database.db3'));
         $workOrderList = $db3->name('U8_06工单资料')
+            ->where('工单编号','like','Y%')
             ->where('MES接收时间',null)
             ->where('MES接收状态','0')
             ->where('U8插入类型','<>','关闭')
@@ -59,13 +60,8 @@ class Synchronization extends Api
                 \db()->query($productSql);
             }
             //插入工单资料
-            if (preg_match("/[A-Za-z]/",$value['工单编号'])){
-                $workcode = $value['工单编号'];
-            }else{
-                $workcode = 'Y'.$value['工单编号'];
-            }
             $data = [
-                'Gd_gdbh' => $workcode,
+                'Gd_gdbh' => $value['工单编号'],
                 '行号' => $value['行号'],
                 'Gd_客户代号' => $code,
                 'Gd_客户名称' => $client,