qiuenguang преди 1 година
родител
ревизия
460f95e329
променени са 1 файла, в които са добавени 28 реда и са изтрити 0 реда
  1. 28 0
      application/api/controller/Manufacture.php

+ 28 - 0
application/api/controller/Manufacture.php

@@ -844,4 +844,32 @@ class Manufacture extends Api
         }
         $this->success('成功',$data);
     }
+
+    /**
+     * 机组调整
+     * @return void
+     * @throws \think\Exception
+     * @throws \think\db\exception\BindParamException
+     * @throws \think\exception\PDOException
+     */
+    public function MachineTeamEdit()
+    {
+        if ($this->request->isGet() === false){
+            $this->error('请求错误');
+        }
+        $param = $this->request->param();
+        if (empty($param) || isset($param['UniqId']) === false){
+            $this->error('参数错误');
+        }
+        $sql = \db('工单_工艺资料')
+            ->where('UniqId',$param['UniqId'])
+            ->fetchSql(true)
+            ->update(['Gy0_sbbh'=>$param['machine']]);
+        $res = \db()->query($sql);
+        if ($res !== false){
+            $this->success('修改成功');
+        }else{
+            $this->error('修改失败');
+        }
+    }
 }