Browse Source

机台日报表新增相关接口优化

曹鹤洋 1 year ago
parent
commit
0e709924dd
1 changed files with 7 additions and 4 deletions
  1. 7 4
      application/api/controller/MachineProductionReport.php

+ 7 - 4
application/api/controller/MachineProductionReport.php

@@ -500,8 +500,11 @@ class MachineProductionReport extends Api
             ->field('rtrim(Gd_cpmc) as Gd_cpmc')
             ->where('Gd_gdbh',$gdbh)
             ->find();
-
-        if (!$row) $this->error('失败');
+        $yjno= db('工单_工艺资料')
+            ->where('Gy0_gdbh',$gdbh)
+            ->column('distinct Gy0_yjno');
+        $row['yjno'] = $yjno;
+        if (!$row) $this->error('查无此编号的工单, 请仔细检查后重新输入!');
         $this->success('成功',$row);
     }
 
@@ -535,7 +538,7 @@ class MachineProductionReport extends Api
             ->where(['Yj_Gdbh'=>$gdbh,'yj_Yjno'=>$yjno])
             ->find();
 
-        if (!$row) $this->error('失败');
+        if (!$row) $this->error('印件编号不存在, 将恢复默认值, 请仔细确认数据准确性!');
         $this->success('成功',$row);
     }
 
@@ -567,7 +570,7 @@ class MachineProductionReport extends Api
         if (isset($req['keyword']) && !empty($req['keyword'])){
             $keyword = $req['keyword'];
         }else{
-            $keyword = '';
+            $keyword = '拆片';
         }
 
         $rows = db('工单_工艺资料')