|
|
@@ -666,4 +666,30 @@ class ReportingWork extends Api
|
|
|
];
|
|
|
$this->success('成功',$data);
|
|
|
}
|
|
|
+
|
|
|
+ /**检品机获取废品率系数
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function getRejectRate()
|
|
|
+ {
|
|
|
+ if ($this->request->isGet() === false){
|
|
|
+ $this->error('请求错误');
|
|
|
+ }
|
|
|
+ $param = $this->request->param();
|
|
|
+ if (!isset($param['order']) || !isset($param['yjno']) || !isset($param['gxh']) || !isset($param['type'])){
|
|
|
+ $this->error('参数错误');
|
|
|
+ }
|
|
|
+ if ($param['type'] === ''){
|
|
|
+ $param['type'] = '次品板';
|
|
|
+ }
|
|
|
+ if ($param['type'] === '废品板'){
|
|
|
+ $param['type'] = '废检';
|
|
|
+ }
|
|
|
+ $res = \db('工单_工艺资料')
|
|
|
+ ->where('Gy0_gdbh',$param['order'])
|
|
|
+ ->where('Gy0_yjno',$param['yjno'])
|
|
|
+ ->where('Gy0_gxh',$param['gxh'])
|
|
|
+ ->column('机检_'.$param['type'])[0];
|
|
|
+ $this->success('成功',$res);
|
|
|
+ }
|
|
|
}
|