Browse Source

获取开数联数

qiuenguang 1 year ago
parent
commit
db04874d25
1 changed files with 24 additions and 0 deletions
  1. 24 0
      application/api/controller/WorkOrder.php

+ 24 - 0
application/api/controller/WorkOrder.php

@@ -2358,4 +2358,28 @@ class WorkOrder extends Api
             ->find();
         $this->success('成功',$orderList);
     }
+
+    /**
+     * 获取联数
+     * @return void
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @throws \think\exception\DbException
+     */
+    public function getCouplet()
+    {
+        if ($this->request->isGet() === false){
+            $this->error('请求错误');
+        }
+        $param = $this->request->param();
+        if (empty($param['gdbh']) || empty($param['yjno'])){
+            $this->error('参数错误');
+        }
+        $list = \db('工单_印件资料')
+            ->where('Yj_gdbh',$param['gdbh'])
+            ->where('yj_Yjno',$param['yjno'])
+            ->field('rtrim(yj_ks) as 开数,rtrim(yj_ls) as 联数')
+            ->find();
+        $this->success('成功',$list);
+    }
 }