Commit 12887d2d authored by 李尚科's avatar 李尚科

Fix

parent d2868fe2
Pipeline #14809 passed with stage
in 7 seconds
......@@ -37,7 +37,7 @@ module.exports = app => {
allowNull: false,
},
silence_time_rate_3day: {
type: INTEGER,
type: STRING,
allowNull: false,
},
maximum_active_call_count: {
......
......@@ -71,7 +71,7 @@ class CallriskService extends Service {
const { ctx } = this;
let basics = await ctx.prometheusModel.CreditCallriskReport.one({ where: { id: report_id, user_id: ctx.userId } });
let basics = await ctx.prometheusModel.CreditCallriskReport.one({ where: { id: report_id } });
if (!basics || !basics.id) {
ctx.failed('error report_id');
}
......@@ -434,8 +434,8 @@ class CallriskService extends Service {
}
//通话活跃分数计算
const call_time_percent = call_active.night_call_time / call_active.routine_call_time;
const call_count_percent = call_active.night_call_count / call_active.routine_call_count;
const call_time_percent = call_active.routine_call_time ? (call_active.night_call_time / call_active.routine_call_time).toFixed(2) : 0;
const call_count_percent = call_active.routine_call_count ? (call_active.night_call_count / call_active.routine_call_count).toFixed(2) : 0;
let call_time_score = 0;
let call_count_score = 0;
if (call_time_percent >= 0.2) {
......@@ -456,7 +456,7 @@ class CallriskService extends Service {
} else if (call_count_percent > 0.03) {
call_count_score = 10;
}
const call_active_score = call_time_score < call_count_score ? call_time_score : call_count_score;
const call_active_score = call_time_score < call_count_score ? call_count_score : call_time_score;
//通话行为分数计算
let call_behavior_socre = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment