Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
ecb50e9c
Commit
ecb50e9c
authored
Aug 10, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uploadBusiness update
parent
574d36f0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
8 deletions
+42
-8
center-channel/app/base/api/impl/zzzd/zzzd.js
+34
-8
center-channel/app/config/settings.js
+8
-0
No files found.
center-channel/app/base/api/impl/zzzd/zzzd.js
View file @
ecb50e9c
...
@@ -144,26 +144,52 @@ class Zzzd extends WEBBase {
...
@@ -144,26 +144,52 @@ class Zzzd extends WEBBase {
break
;
break
;
case
"uploadBusiness"
:
case
"uploadBusiness"
:
if
(
!
pobj
.
actionBody
.
picUrl
)
{
if
(
!
pobj
.
actionBody
.
picUrl
)
{
return
system
.
getResult
(
null
,
`图片地址不能为空`
);
return
system
.
getResult
(
null
,
`
-zzzd03
图片地址不能为空`
);
}
}
if
(
!
pobj
.
actionBody
.
identityCardNo
)
{
if
(
!
pobj
.
actionBody
.
identityCardNo
)
{
return
system
.
getResult
(
null
,
`身份证号不能为空`
);
return
system
.
getResult
(
null
,
`
-zzzd04
身份证号不能为空`
);
}
}
var
reqParam
=
{
var
reqParam
=
{
bl_url
:
pobj
.
actionBody
.
picUrl
bl_url
:
pobj
.
actionBody
.
picUrl
}
}
// 分析营业执照
// 分析营业执照
var
result
=
await
this
.
restPostUrl
(
reqParam
,
settings
.
businessDistinguishUrl
()
+
"gsb/businessLicenseUrlApi"
);
var
result
=
await
this
.
restPostUrl
(
reqParam
,
settings
.
businessDistinguishUrl
()
+
"gsb/businessLicenseUrlApi"
);
if
(
result
.
status
!=
1
)
{
if
(
result
.
status
!=
1
)
{
return
getResult
(
null
,
result
.
msg
)
return
getResult
(
null
,
"-zzzd01"
+
result
.
msg
)
}
}
// 判断 如果四要素有空 则 不请求 并返回营业执照解析失败
// 判断 如果四要素有空 则 不请求 并返回营业执照解析失败
if
(
result
.
data
.
reg_location
==
"无"
)
{
if
(
result
.
data
.
legal_person
==
"无"
)
{
return
system
.
getResult
(
null
,
"审核不通过,原因:营业执照分析失败"
);
return
system
.
getResult
(
null
,
"-zzzd06 审核不通过,原因:营业执照法人名字分析失败"
);
}
// 这里写死判断,如果等于测试的营业执照 不走判断地址 因为测试营业执照分析不出地址
// https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_958415948076283422020615.jpg
if
(
result
.
data
.
credit_code
==
"92410204MA47NYPD41"
)
{
result
.
data
.
company_name
=
"开封市鼓楼区任我行科技技术服务部"
}
else
{
if
(
result
.
data
.
company_name
==
"无"
)
{
return
system
.
getResult
(
null
,
"-zzzd05 审核不通过,原因:营业执照组织机构名称分析失败"
);
}
}
if
(
result
.
data
.
credit_code
==
"无"
&&
result
.
data
.
reg_number
==
"无"
)
{
return
system
.
getResult
(
null
,
"-zzzd07 审核不通过,原因:营业执照社会信用代码或注册号分析失败"
);
}
}
// 请求四要素验证
// 请求四要素验证
// var businessDistinguishResult = await this.restPostUrl(reqParam, settings.businessDistinguishUrl()+"gsb/businessLicenseUrlApi");
var
fourFactorsReqParam
=
{
channel
:
1
,
// 写死1 代表上游渠道号 e签宝的
legalRepIdNo
:
pobj
.
actionBody
.
identityCardNo
,
// 法人身份证号
legalRepName
:
result
.
data
.
legal_person
,
// 法人名字
name
:
result
.
data
.
company_name
,
// 组织机构证件(如营业执照)上的组织机构名称
orgCode
:
result
.
data
.
credit_code
!=
"无"
?
result
.
data
.
credit_code
:
result
.
data
.
reg_number
// 组织机构证件号,支持统一社会信用代码号和工商注册号(部分个体工商户)
}
var
fourFactorsCompareResult
=
await
this
.
restPostUrl
(
fourFactorsReqParam
,
settings
.
fourFactorsUrl
()
+
"auth/organize/fourFactors/compare"
);
// 请求失败
if
(
fourFactorsCompareResult
.
code
!=
0
)
{
return
system
.
getResult
(
null
,
"-zzzd08"
+
fourFactorsCompareResult
.
msg
);
}
// 验证失败
if
(
fourFactorsCompareResult
.
data
.
state
!=
1
)
{
return
system
.
getResult
(
null
,
"-zzzd09"
+
fourFactorsCompareResult
.
msg
);
}
// 记录检测结果 用来做检测记录用???暂时未做,表已建好在center-order/c_zzzd_test_business
// 记录检测结果 用来做检测记录用???暂时未做,表已建好在center-order/c_zzzd_test_business
// 返回四要素请求结果
// 返回四要素请求结果
...
...
center-channel/app/config/settings.js
View file @
ecb50e9c
...
@@ -98,6 +98,14 @@ var settings = {
...
@@ -98,6 +98,14 @@ var settings = {
businessDistinguishUrl
:
function
()
{
businessDistinguishUrl
:
function
()
{
return
"http://43.247.184.92:15504/"
return
"http://43.247.184.92:15504/"
},
},
// 2020 0810 lin 新增 四要素验证请求地址
fourFactorsUrl
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
return
"http://39.107.234.14:8026/bpo-sign/"
;
}
else
{
// 正式环境没给
}
},
centerChannelUrl
:
function
()
{
centerChannelUrl
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
if
(
this
.
env
==
"dev"
)
{
return
"http://60.205.209.94:4012/"
return
"http://60.205.209.94:4012/"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment