Browse Source

当前生产工单优化

qiuenguang 1 year ago
parent
commit
5d2761c0db
1 changed files with 1 additions and 3 deletions
  1. 1 3
      application/api/controller/Facility.php

+ 1 - 3
application/api/controller/Facility.php

@@ -251,14 +251,12 @@ class Facility extends Api
         $machine = $params['machine'];
         $machineCode = \db('dic_lzde')->where('适用机型',$machine)->value('sys_bh');
         $data = \db('设备_产量采集')->where('设备编号',$machine)->order('UniqId desc')->find();
-        if (empty($data)){
-            $this->success('未找到生产订单');
-        }
         if (empty($data['工单编号'])){
             $this->success('未找到生产订单');
         }
         $endTime = \db('工单_工艺资料')
             ->where('Gy0_gdbh',$data['工单编号'])
+            ->where('Gy0_yjno',$data['印件号'])
             ->where('Gy0_gxh',$data['工序号'])
             ->where('Gy0_sbbh','like','%'.$machine.'%')
             ->find();