|
@@ -41,19 +41,6 @@ class StatisticsService extends Service {
|
|
|
async taskCond(baseData) {
|
|
|
const { ctx } = this;
|
|
|
// ?
|
|
|
- await this.sign([ 'app_task', 'ivi_online_user', 't_rbac_user' ], baseData, async () => {
|
|
|
- try {
|
|
|
- await ctx.service.tRbacUserService.statistics(baseData);// 重新处理
|
|
|
- } catch (e) {
|
|
|
- await this.writeError(baseData, e, 'tRbacUserService');
|
|
|
- }
|
|
|
- try {
|
|
|
- await ctx.service.onlineUserService2.statistics(baseData);// 重新处理
|
|
|
- } catch (e) {
|
|
|
- await this.writeError(baseData, e, 'onlineUserService2');
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
await this.sign([ 'app_task' ], baseData, async () => {
|
|
|
try {
|
|
|
await ctx.service.appBehaviorRecordService.statistics(baseData);
|
|
@@ -71,47 +58,61 @@ class StatisticsService extends Service {
|
|
|
await this.writeError(baseData, e, 'appFeedbackRecordService');
|
|
|
}
|
|
|
});
|
|
|
- await this.sign([ 'driving_behavior_info', 't_vehicle_record' ], baseData, async () => {
|
|
|
+ await this.sign([ 'msc_query_record' ], baseData, async () => {
|
|
|
try {
|
|
|
- await ctx.service.tVehicleRecordService2.statistics(baseData);// 重新处理
|
|
|
+ await ctx.service.msgQueryRecordService.statistics(baseData);
|
|
|
} catch (e) {
|
|
|
- await this.writeError(baseData, e, 'tVehicleRecordService2');
|
|
|
+ await this.writeError(baseData, e, 'msgQueryRecordService');
|
|
|
}
|
|
|
+ });
|
|
|
+ await this.sign([ 'msg_center_record' ], baseData, async () => {
|
|
|
try {
|
|
|
- await ctx.service.tVehicleReportInfoService.statistics(baseData);// 重新处理
|
|
|
+ await ctx.service.msgCenterRecordService2.statistics(baseData);
|
|
|
} catch (e) {
|
|
|
- await this.writeError(baseData, e, 'tVehicleReportInfoService');
|
|
|
+ await this.writeError(baseData, e, 'msgCenterRecordService2');
|
|
|
}
|
|
|
+ });
|
|
|
+ await ctx.service.tBoxAutoTestService.statistics(baseData);// 重新处理
|
|
|
+ await this.sign([ 'stats_base_info', 't_vehicle_record' ], baseData, async () => {
|
|
|
try {
|
|
|
- await ctx.service.drivingBehaviorInfoService2.statistics(baseData);// 重新处理
|
|
|
+ await ctx.service.statsBaseInfoService2.statistics(baseData);// 重新处理
|
|
|
} catch (e) {
|
|
|
- await this.writeError(baseData, e, 'drivingBehaviorInfoService2');
|
|
|
+ await this.writeError(baseData, e, 'statsBaseInfoService2');
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ await this.sign([ 'app_task', 'ivi_online_user', 't_rbac_user' ], baseData, async () => {
|
|
|
+ try {
|
|
|
+ await ctx.service.tRbacUserService.statistics(baseData);// 重新处理
|
|
|
+ } catch (e) {
|
|
|
+ await this.writeError(baseData, e, 'tRbacUserService');
|
|
|
}
|
|
|
try {
|
|
|
- await ctx.service.tFsmHitoryService.statistics(baseData);// 重新处理
|
|
|
+ await ctx.service.onlineUserService2.statistics(baseData);// 重新处理
|
|
|
} catch (e) {
|
|
|
- await this.writeError(baseData, e, 'tFsmHitoryService');
|
|
|
+ await this.writeError(baseData, e, 'onlineUserService2');
|
|
|
}
|
|
|
});
|
|
|
- await this.sign([ 'stats_base_info', 't_vehicle_record' ], baseData, async () => {
|
|
|
+ await this.sign([ 'driving_behavior_info', 't_vehicle_record' ], baseData, async () => {
|
|
|
try {
|
|
|
- await ctx.service.statsBaseInfoService2.statistics(baseData);// 重新处理
|
|
|
+ await ctx.service.tVehicleRecordService2.statistics(baseData);// 重新处理
|
|
|
} catch (e) {
|
|
|
- await this.writeError(baseData, e, 'statsBaseInfoService2');
|
|
|
+ await this.writeError(baseData, e, 'tVehicleRecordService2');
|
|
|
}
|
|
|
- });
|
|
|
- await this.sign([ 'msc_query_record' ], baseData, async () => {
|
|
|
try {
|
|
|
- await ctx.service.msgQueryRecordService.statistics(baseData);
|
|
|
+ await ctx.service.tVehicleReportInfoService.statistics(baseData);// 重新处理
|
|
|
} catch (e) {
|
|
|
- await this.writeError(baseData, e, 'msgQueryRecordService');
|
|
|
+ await this.writeError(baseData, e, 'tVehicleReportInfoService');
|
|
|
}
|
|
|
- });
|
|
|
- await this.sign([ 'msg_center_record' ], baseData, async () => {
|
|
|
try {
|
|
|
- await ctx.service.msgCenterRecordService2.statistics(baseData);
|
|
|
+ await ctx.service.drivingBehaviorInfoService2.statistics(baseData);// 重新处理
|
|
|
} catch (e) {
|
|
|
- await this.writeError(baseData, e, 'msgCenterRecordService2');
|
|
|
+ await this.writeError(baseData, e, 'drivingBehaviorInfoService2');
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ await ctx.service.tFsmHitoryService.statistics(baseData);// 重新处理
|
|
|
+ } catch (e) {
|
|
|
+ await this.writeError(baseData, e, 'tFsmHitoryService');
|
|
|
}
|
|
|
});
|
|
|
if (baseData.timeRangData.startTime >= ctx.helper.timeMonthSeven) {
|
|
@@ -123,7 +124,6 @@ class StatisticsService extends Service {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- await ctx.service.tBoxAutoTestService.statistics(baseData);// 重新处理
|
|
|
}
|
|
|
|
|
|
|
|
@@ -160,7 +160,7 @@ class StatisticsService extends Service {
|
|
|
}
|
|
|
if (!satrtMoment) {
|
|
|
satrtMoment = moment(this.ctx.helper.yesterday());
|
|
|
- // satrtMoment = moment('2021-06-01');
|
|
|
+ // satrtMoment = moment('2020-01-01');
|
|
|
}
|
|
|
endTime = endTime || this.ctx.helper.today();
|
|
|
ctx.logger.info(`任务进行 开始${satrtMoment.valueOf()} 结束${endTime}`);
|