瀏覽代碼

修改考核优化

qiuenguang 1 年之前
父節點
當前提交
9cc69527fa
共有 1 個文件被更改,包括 8 次插入2 次删除
  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{