Sfoglia il codice sorgente

修改考核优化

qiuenguang 1 anno fa
parent
commit
9cc69527fa
1 ha cambiato i file con 8 aggiunte e 2 eliminazioni
  1. 8 2
      application/api/controller/OrderSuperLoss.php

+ 8 - 2
application/api/controller/OrderSuperLoss.php

@@ -867,9 +867,15 @@ class OrderSuperLoss extends Api
         if (!isset($params['examine'])){
             $this->error('参数不能为空');
         }
-        $where['Yj_gdbh'] = $params['order'];
+        if ($params['examine'] === '参与'){
+            $examine = 0;
+        }else{
+            $examine = 1;
+        }
+        $where['Yj_Gdbh'] = $params['order'];
         $where['yj_Yjno'] = $params['yj_yjno'];
-        $res =db('工单_印件资料')->where($where)->setField('质量考核',$params['examine']);
+        $sql =db('工单_印件资料')->where($where)->fetchSql(true)->update(['质量考核'=>$examine]);
+        $res = \db()->query($sql);
         if ($res !== false){
             $this->success('更新成功');
         }else{