瀏覽代碼

机台日报表新增相关接口优化

曹鹤洋 1 年之前
父節點
當前提交
cca52f6bd7
共有 1 個文件被更改,包括 11 次插入0 次删除
  1. 11 0
      application/api/controller/MachineProductionReport.php

+ 11 - 0
application/api/controller/MachineProductionReport.php

@@ -640,6 +640,17 @@ class MachineProductionReport extends Api
         if(!$this->request->isGet()){
             $this->error('请求方式错误');
         }
+        $req = $this->request->param();
+        if (!isset($req['sczl_jtbh'])){
+            $this->error('参数错误');
+        }
+        if(!empty($req['sczl_jtbh'])){
+            $row = db('dic_lzde')
+            ->field('sys_bh')
+            ->where('适用机型',$req['sczl_jtbh'])
+            ->find();
+            $this->success('成功',$row);
+        }
 
         $row = db('dic_lzde')
             ->field('Key_, sys_bh, rtrim(sys_mc) as sys_mc')