Browse Source

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

曹鹤洋 1 year ago
parent
commit
3a03c2e774
1 changed files with 24 additions and 0 deletions
  1. 24 0
      application/api/controller/MachineProductionReport.php

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

@@ -676,6 +676,30 @@ class MachineProductionReport extends Api
         $this->success('成功',$row);
     }
 
+    /**
+     * 定额代号查询比例
+     * @ApiMethod (GET)
+     */
+    public function dedhGetRate()
+    {
+        //get请求
+        if(!$this->request->isGet()){
+            $this->error('请求方式错误');
+        }
+        $req = $this->request->param();
+        if (!(isset($req['dedh'])) || empty($req['dedh'])){
+            $this->error('参数错误');
+        }
+        $row = db('dic_lzde')
+            ->field('机长比例 as sczl_rate1, 副机比例 as sczl_rate2, 调墨比例 as sczl_rate3, 二手比例 as sczl_rate4, 飞达比例 as sczl_rate5, 
+            辅助比例 as sczl_rate6, 放卷比例 as sczl_rate7, 分切1比例 as sczl_rate8, 分切2比例 as sczl_rate9, 检验比例 as sczl_rate10')
+            ->where('sys_bh',$req['dedh'])
+            ->find();
+
+        $this->success('成功',$row);
+    }
+            
+
     /**
      * 新增
      * @ApiMethod (POST)