Parcourir la source

当前生产订单产品代号

qiuenguang il y a 1 an
Parent
commit
1270b0664e
1 fichiers modifiés avec 5 ajouts et 2 suppressions
  1. 5 2
      application/api/controller/Facility.php

+ 5 - 2
application/api/controller/Facility.php

@@ -251,7 +251,9 @@ class Facility extends Api
             $list['工单编号'] = $data['工单编号'];
             $list['印件号'] = $data['印件号'];
             $name = \db('工单_基本资料')->where('Gd_Gdbh',$data['工单编号'])->value('成品名称');
+            $code = \db('工单_基本资料')->where('Gd_Gdbh',$data['工单编号'])->value('成品代号');
             $list['产品名称'] = rtrim($name);
+            $list['产品代号'] = rtrim($code);
             $where['Gy0_gdbh'] = $data['工单编号'];
             $where['Gy0_yjno'] = $data['印件号'];
             $where['Gy0_gxh'] = $data['工序号'];
@@ -270,6 +272,7 @@ class Facility extends Api
             $list['印件号'] = 0;
             $list['产品名称'] = '';
             $list['工序名称'] = '';
+            $list['产品代号'] = '';
         }
         $list['状态'] = rtrim($data['当前状态']);
         $list['班组编号'] = rtrim($data['班组编号']);
@@ -347,8 +350,8 @@ class Facility extends Api
                 AND b.Gy0_sbbh = '{$machine}' 
                 AND b.PD_WG = '1900-01-01 00:00:00' 
                 AND b.Gy0_sj1 <> '1900-01-01 00:00:00'
-                AND b.Gy0_sj1 < '2099-01-01 00:00:00'
-            GROUP BY a.Gd_gdbh,b.Gy0_yjno,b.Gy0_gxh
+                AND b.Gy0_sj1 < '2099-01-01 00:00:00' 
+            GROUP BY a.Gd_gdbh,b.Gy0_yjno, b.Gy0_gxh
             ORDER BY b.Gy0_sj1";
         $orderList = Db::query($sql);
         if (empty($orderList)){