Commit eeb0a798 authored by 李尚科's avatar 李尚科
parents 4ca6fbf0 660260b4
Pipeline #14086 passed with stage
in 41 seconds
...@@ -60,7 +60,7 @@ class BlacklistService extends Service { ...@@ -60,7 +60,7 @@ class BlacklistService extends Service {
phone: reportData.phone.substring(0, 3) + '****' + reportData.phone.substring(7, 11),//手机号(只展示前三位和后四位) phone: reportData.phone.substring(0, 3) + '****' + reportData.phone.substring(7, 11),//手机号(只展示前三位和后四位)
age: reportData.age, age: reportData.age,
id_card: reportData.id_card.substring(0, 3) + '**********' + reportData.id_card.substring(15, 18),//身份证号(只展示前四位和后四位) id_card: reportData.id_card.substring(0, 3) + '**********' + reportData.id_card.substring(15, 18),//身份证号(只展示前四位和后四位)
city: reportData.city,//城市(省-市) city: reportData.city || '--',//城市(省-市)
expire_time: moment(reportData.created_at).add(30, 'days').format('YYYY-MM-DD'),//报告有效期为报告生成日期往后推30天 expire_time: moment(reportData.created_at).add(30, 'days').format('YYYY-MM-DD'),//报告有效期为报告生成日期往后推30天
}, },
blacklist: { blacklist: {
...@@ -316,11 +316,15 @@ class BlacklistService extends Service { ...@@ -316,11 +316,15 @@ class BlacklistService extends Service {
*/ */
async createReport(inputParams, blacklistInfo) { async createReport(inputParams, blacklistInfo) {
const { ctx } = this; const { ctx } = this;
let birth = parseInt(inputParams.id_card.substring(6, 10));
let age = parseInt(moment().format('YYYY')) - birth;
let reportData = { let reportData = {
name: inputParams.name, name: inputParams.name,
id_card: inputParams.id_card, id_card: inputParams.id_card,
phone: inputParams.phone, phone: inputParams.phone,
age: '', age: age,
city: '', city: '',
blacklist_of_internet_loans: blacklistInfo.pre_loan_risk.blacklist_of_internet_loans, blacklist_of_internet_loans: blacklistInfo.pre_loan_risk.blacklist_of_internet_loans,
blacklist_of_court_dishonesty: blacklistInfo.pre_loan_risk.blacklist_of_court_dishonesty, blacklist_of_court_dishonesty: blacklistInfo.pre_loan_risk.blacklist_of_court_dishonesty,
......
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