Commit accec00d authored by 李尚科's avatar 李尚科

callrisk fix

parent b3295a84
Pipeline #14782 passed with stage
in 36 seconds
......@@ -64,14 +64,14 @@ module.exports = app => {
// return date ? moment(date).format('YYYY-MM-DD HH:mm:ss') : undefined;
// },
// },
// created_at: {
// type: DATE,
// allowNull: false,
// get() {
// const date = this.getDataValue('created_at');
// return date ? moment(date).format('YYYY-MM-DD HH:mm:ss') : undefined;
// },
// }
created_at: {
type: DATE,
allowNull: false,
get() {
const date = this.getDataValue('created_at');
return date ? moment(date).format('YYYY-MM-DD HH:mm:ss') : undefined;
},
}
}, {
timestamps: false,
tableName: 'credit_callrisk_report',
......
......@@ -87,9 +87,11 @@ class CallriskService extends Service {
const days = net_time % 30;
basics.net_time = months + '月' + (days ? days + '天' : '');
basics.mobile = basics.mobile.substring(0, 3) + '****' + basics.mobile.substring(7, 11);//手机号(只展示前三位和后四位)
basics.dataValues.report_time = moment(basics.created_at).format('YYYY-MM-DD');
delete basics.created_at;
const diff = function (a, b) { return b.call_count - a.call_count };
const city_active = R.sort(diff)(call_active.city_active).slice(0, 3);
console.info(city_active);
call_active.city_active = JSON.stringify(city_active);
const report_valid = await ctx.service.credit.order.getReportValid('callrisk', report_id);
let report = {
......@@ -519,7 +521,7 @@ class CallriskService extends Service {
illegal_text = '高';
advantage_text = '不利于';
}
const call_type_msg = `解读:近6个月,贷款类通话累计为【${loan_call_count}次】,金融业务通话【${loan_call_status}】您在短期内可能的申请贷款次数较正常,有利于贷款机构对您的评估;近6个月来,您的疑似风险通话次数较【${risk_call_status}】,您与违法违规事件关联度较【${illegal_text}】,【${advantage_text}】贷款机构对您的评估`;
const call_type_msg = `解读:近6个月,贷款类通话累计为【${loan_call_count}次】,金融业务通话【${loan_call_status}您在短期内可能的申请贷款次数较正常,有利于贷款机构对您的评估;近6个月来,您的疑似风险通话次数较【${risk_call_status}】,您与违法违规事件关联度较【${illegal_text}】,【${advantage_text}】贷款机构对您的评估`;
//通话活跃度解析
......
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