Ver Fonte

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

曹鹤洋 há 1 ano atrás
pai
commit
cca52f6bd7
1 ficheiros alterados com 11 adições e 0 exclusões
  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')