Commit 84dd47e4 authored by Hsinli's avatar Hsinli

addd

parent b62db576
Pipeline #13664 passed with stage
in 4 seconds
...@@ -338,28 +338,26 @@ class CommonService extends Service { ...@@ -338,28 +338,26 @@ class CommonService extends Service {
} }
let shmfList = await ctx.prometheusModel.CreditShuhemofang.findAll(shmfFilter); let shmfList = await ctx.prometheusModel.CreditShuhemofang.findAll(shmfFilter);
ctx.logger.info({ shmfList: JSON.stringify(shmfList) }); ctx.logger.info({ shmfList: JSON.stringify(shmfList) });
if (shmfList !== undefined && shmfList.length > 0) { let history = {
let history = { in: false,
in: false, detail: {}
detail: {} };
}; for (let i in shmfList) {
for (let i in shmfList) { if (shmfList[i].name === inputParams.name && shmfList[i].phone === inputParams.phone && shmfList[i].id_card === inputParams.id_card) {
if (shmfList[i].name === inputParams.name && shmfList[i].phone === inputParams.phone && shmfList[i].id_card === inputParams.id_card) { history.in = true;
history.in = true; history.detail = shmfList[i];
history.detail = shmfList[i]; break;
break;
}
} }
if (history.in) { }
await this.noticeShuhemofang(Number(history.detail.status)); if (history.in) {
await this.noticeShuhemofang(Number(history.detail.status));
} else {
if (shmfList.length >= 5) {
ctx.failed('您输入的想要检测人数已超过最大限制,仅可检测输入过的检测信息');
} else { } else {
if (shmfList.length >= 5) { let resp = this.queryShuhemofang(type, inputParams);
ctx.failed('您输入的想要检测人数已超过最大限制,仅可检测输入过的检测信息'); ctx.logger.info({ resp: JSON.stringify(resp) });
} else { await this.noticeShuhemofang(resp.status);
let resp = this.queryShuhemofang(type, inputParams);
ctx.logger.info({ resp: JSON.stringify(resp) });
await this.noticeShuhemofang(resp.status);
}
} }
} }
} }
......
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