Browse Source

获取工序号

qiuenguang 1 year ago
parent
commit
73ca6c22b8
2 changed files with 12 additions and 0 deletions
  1. 6 0
      application/api/controller/Product.php
  2. 6 0
      application/api/controller/WorkOrder.php

+ 6 - 0
application/api/controller/Product.php

@@ -1120,6 +1120,12 @@ class Product extends Api
             ->where('yj_yjno',$param['yjno'])
             ->field('rtrim(yj_ks) as 开数,rtrim(yj_ls) as 联数')
             ->find();
+        $process = \db('产品_工艺资料')
+            ->where('Gy0_cpdh',$param['product'])
+            ->where('Gy0_yjno',$param['yjno'])
+            ->order('Gy0_gxh desc')
+            ->value('Gy0_gxh');
+        $list['工序号'] = $process + 1;
         $this->success('成功',$list);
     }
 }

+ 6 - 0
application/api/controller/WorkOrder.php

@@ -2421,6 +2421,12 @@ class WorkOrder extends Api
             ->where('yj_Yjno',$param['yjno'])
             ->field('rtrim(yj_ks) as 开数,rtrim(yj_ls) as 联数')
             ->find();
+        $process = \db('工单_工艺资料')
+            ->where('Gy0_gdbh',$param['gdbh'])
+            ->where('Gy0_yjno',$param['yjno'])
+            ->order('Gy0_gxh desc')
+            ->value('Gy0_gxh');
+        $list['工序号'] = $process + 1;
         $this->success('成功',$list);
     }
 }