Commit 838d8d50 authored by 李尚科's avatar 李尚科

callrisk fix

parent e48ee5d9
Pipeline #14618 passed with stage
in 6 seconds
......@@ -139,9 +139,30 @@ class CallriskService extends Service {
const { ctx } = this;
const call_behavior = await ctx.prometheusModel.CreditCallriskCallBehavior.one({ where: { report_id } });
const call_behavior_silence_cycles = await ctx.prometheusModel.CreditCallriskSilenceCycle.all({ where: { report_id } });
call_behavior.silence_cycle = call_behavior ? [] : call_behavior_silence_cycles;
const ret = {
silence_count_3day: call_behavior.silence_count_3day,
silence_time_3day: call_behavior.silence_time_3day,
silence_time_rate_3day: call_behavior.silence_time_rate_3day,
silence_cycle: call_behavior_silence_cycles,
call_each_other: {
active_call_count: call_behavior.active_call_count,
passive_call_count: call_behavior.passive_call_count,
each_call_count: call_behavior.each_call_count,
},
call_rank: {
maximum_active_call_count: call_behavior.maximum_active_call_count,
maximum_active_call_number: call_behavior.maximum_active_call_number,
maximum_active_call_city: call_behavior.maximum_active_call_city,
maximum_passive_call_count: call_behavior.maximum_passive_call_count,
maximum_passive_call_number: call_behavior.maximum_passive_call_number,
maximum_passive_call_city: call_behavior.maximum_passive_call_city,
maximum_call_time: call_behavior.maximum_call_time,
maximum_call_time_number: call_behavior.maximum_call_time_number,
maximum_call_time_city: call_behavior.maximum_call_time_city,
},
};
return call_behavior;
return ret;
}
async formatReport() {
......@@ -433,7 +454,7 @@ class CallriskService extends Service {
call_behavior_socre = 10;
}
console.info(net_time_score , fee_avg_score , call_type_score , call_active_score , call_behavior_socre);
console.info(net_time_score, fee_avg_score, call_type_score, call_active_score, call_behavior_socre);
const sum_score = net_time_score + fee_avg_score + call_type_score + call_active_score + call_behavior_socre;
let call_result_assessment = '优质';
......
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