qiuenguang 1 rok pred
rodič
commit
1c522a1d00
1 zmenil súbory, kde vykonal 39 pridanie a 0 odobranie
  1. 39 0
      application/api/controller/Facility.php

+ 39 - 0
application/api/controller/Facility.php

@@ -2213,4 +2213,43 @@ class Facility extends Api
             $this->success('修改成功');
         }
     }
+
+    /**
+     * 色度系数修改
+     * @return void
+     * @throws \think\Exception
+     * @throws \think\db\exception\BindParamException
+     * @throws \think\exception\PDOException
+     */
+    public function PrintingModeDataEdit()
+    {
+        if (Request::instance()->isPost() === false){
+            $this->error('请求错误');
+        }
+        $params = Request::instance()->post();
+        if (empty($params['id'])){
+            $this->error('参数错误');
+        }
+        $idList = explode(',',$params['id']);
+        //获取工单印件工序
+        $orderList = \db('工单_产量计酬')
+            ->where('UniqId',$idList[0])
+            ->field('rtrim(sczl_gdbh) as 工单编号,rtrim(sczl_yjno) as 印件号,rtrim(sczl_gxh) as 工序号')
+            ->find();
+        //修改工艺资料
+        $sql = \db('工单_工艺资料')
+            ->where([
+                'Gy0_gdbh'=>$orderList['工单编号'],
+                'Gy0_yjno'=>$orderList['印件号'],
+                'Gy0_gxh'=>$orderList['工序号']
+            ])
+            ->fetchSql(true)
+            ->update(['版距'=>$params['plate'],'印刷方式'=>$params['mode']]);
+        $res = \db()->query($sql);
+        if ($res === false){
+            $this->error('修改失败');
+        }else{
+            $this->success('修改成功');
+        }
+    }
 }