Browse Source

获取检品机废品率系数

qiuenguang 1 year ago
parent
commit
fde7511db2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      application/api/controller/ReportingWork.php

+ 2 - 2
application/api/controller/ReportingWork.php

@@ -679,13 +679,13 @@ class ReportingWork extends Api
         if (!isset($param['order']) || !isset($param['yjno']) || !isset($param['gxh']) || !isset($param['type'])){
         if (!isset($param['order']) || !isset($param['yjno']) || !isset($param['gxh']) || !isset($param['type'])){
             $this->error('参数错误');
             $this->error('参数错误');
         }
         }
-        if (strpos($param['type'],'正品')){
+        if (strpos($param['type'],'正品') !== false){
             $param['type'] = '正品板';
             $param['type'] = '正品板';
         }
         }
         if ($param['type'] === ''){
         if ($param['type'] === ''){
             $param['type'] = '次品板';
             $param['type'] = '次品板';
         }
         }
-        if (strpos($param['type'],'废品')){
+        if (strpos($param['type'],'废品') !== false){
             $param['type'] = '废检';
             $param['type'] = '废检';
         }
         }
         $res = \db('工单_工艺资料')
         $res = \db('工单_工艺资料')