'use strict'; const Controller = require('egg').Controller; // 车辆基础信息统计分析模块 class CarBaseInfoController2 extends Controller { // 车况 从驾驶行为取值(弃用) async index() { const { ctx, service } = this; // 校验参数 组装参数 const payload = ctx.validate(); // // 调用 Service 进行业务处理 const data = await service.drivingBehaviorInfoService2.index(payload, this.ctx.params.id); // // 设置响应内容和响应状态码 ctx.success({ data }); } // 车况 基础 async stats() { const { ctx, service } = this; // 校验参数 组装参数 const payload = ctx.validate(); // // 调用 Service 进行业务处理 const data = await service.statsBaseInfoService2.stats(payload, this.ctx.params.id); // // 设置响应内容和响应状态码 ctx.success({ data }); } // 车况 带驾驶模式 async statsWithMode() { const { ctx, service } = this; // 校验参数 组装参数 const payload = ctx.validate(); // // 调用 Service 进行业务处理 const data = await service.statsBaseInfoService2.statsWithMode(payload, this.ctx.params.id); // // 设置响应内容和响应状态码 ctx.success({ data }); } // 车况 减速度结构专用 async dece() { const { ctx, service } = this; // 校验参数 组装参数 const payload = ctx.validate(); // // 调用 Service 进行业务处理 const data = await service.statsBaseInfoService2.dece(payload); // // 设置响应内容和响应状态码 ctx.success({ data }); } // 车况 加速踏板过程专用 async acce() { const { ctx, service } = this; // 校验参数 组装参数 const payload = ctx.validate(); // // 调用 Service 进行业务处理 const data = await service.statsBaseInfoService2.acceAndAs(payload, 'acce'); // // 设置响应内容和响应状态码 ctx.success({ data }); } // 车况 加速度过程专用 async as() { const { ctx, service } = this; // 校验参数 组装参数 const payload = ctx.validate(); // // 调用 Service 进行业务处理 const data = await service.statsBaseInfoService2.acceAndAs(payload, 'as'); // // 设置响应内容和响应状态码 ctx.success({ data }); } // 车况 从驾驶行为取值累加值 async count() { const { ctx, service } = this; // 校验参数 组装参数 const payload = ctx.validate(); // // 调用 Service 进行业务处理 const data = await service.drivingBehaviorInfoService2.count(payload, this.ctx.params.id); // // 设置响应内容和响应状态码 ctx.success({ data }); } } module.exports = CarBaseInfoController2;