|
|
@@ -1175,4 +1175,31 @@ class WorkOrder extends Api
|
|
|
}
|
|
|
return $list;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取小时产能
|
|
|
+ * @ApiMethod (GET)
|
|
|
+ * @param void
|
|
|
+ * @return void
|
|
|
+ * @throws \think\db\exception\DataNotFoundException
|
|
|
+ * @throws \think\db\exception\ModelNotFoundException
|
|
|
+ * @throws \think\exception\DbException
|
|
|
+ */
|
|
|
+
|
|
|
+ public function capacityList()
|
|
|
+ {
|
|
|
+ if ($this->request->isGet() === false){
|
|
|
+ $this->error('请求错误');
|
|
|
+ }
|
|
|
+ $param = $this->request->param();
|
|
|
+ if (empty($param)){
|
|
|
+ $this->error('参数错误');
|
|
|
+ }
|
|
|
+ $machine = explode(' ',$param['machine'])[0];
|
|
|
+ $number = \db('设备_基本资料')->where('设备编号',$machine)->field('rtrim(排单小时定额) as 小时产能')->find();
|
|
|
+ if (empty($number)){
|
|
|
+ $this->error('未找到小时产能');
|
|
|
+ }
|
|
|
+ $this->success('成功',$number['小时产能']);
|
|
|
+ }
|
|
|
}
|