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
aa5dea7e
Commit
aa5dea7e
authored
Aug 12, 2020
by
wkliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
04bf6a69
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
144 additions
and
82 deletions
+144
-82
center-channel/app/base/api/impl/zzzd/zzzd.js
+77
-70
center-channel/app/base/service/impl/utilsSve/utilsDiagnosisSve.js
+33
-11
center-channel/app/config/routes/api.js
+1
-1
center-channel/app/front/entry/public/apidoc/platform/zzzd.md
+33
-0
No files found.
center-channel/app/base/api/impl/zzzd/zzzd.js
View file @
aa5dea7e
...
@@ -4,17 +4,17 @@ var settings = require("../../../../config/settings");
...
@@ -4,17 +4,17 @@ var settings = require("../../../../config/settings");
const
axios
=
require
(
"axios"
);
const
axios
=
require
(
"axios"
);
const
{
getResult
}
=
require
(
"../../../system"
);
const
{
getResult
}
=
require
(
"../../../system"
);
class
Zzzd
extends
WEBBase
{
class
Zzzd
extends
WEBBase
{
constructor
()
{
constructor
()
{
super
();
super
();
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
redisClient
=
system
.
getObject
(
"util.redisClient"
);
this
.
redisClient
=
system
.
getObject
(
"util.redisClient"
);
this
.
zzzApi
=
{
this
.
zzzApi
=
{
"industryOne"
:
"/gsb/api/industry_one"
,
//一级大类列表
"industryOne"
:
"/gsb/api/industry_one"
,
//一级大类列表
"industryTwo"
:
"/gsb/api/industry_two"
,
//二级大类列表
"industryTwo"
:
"/gsb/api/industry_two"
,
//二级大类列表
"getQualificationByIndustry"
:
"/gsb/api/qualifications"
,
//根据行业ID 查询所有相关的资质
"getQualificationByIndustry"
:
"/gsb/api/qualifications"
,
//根据行业ID 查询所有相关的资质
"recommendationBusiness"
:
"/gsb/api/recommendation_business"
,
//立即查看结果
"recommendationBusiness"
:
"/gsb/api/recommendation_business"
,
//立即查看结果
"phoneNumber"
:
"/gsb/api/phone_number"
,
//免费咨询
"phoneNumber"
:
"/gsb/api/phone_number"
,
//免费咨询
}
}
this
.
utilsDiagnosisSve
=
system
.
getObject
(
"service.utilsSve.utilsDiagnosisSve"
);
this
.
utilsDiagnosisSve
=
system
.
getObject
(
"service.utilsSve.utilsDiagnosisSve"
);
}
}
...
@@ -24,7 +24,7 @@ class Zzzd extends WEBBase {
...
@@ -24,7 +24,7 @@ class Zzzd extends WEBBase {
* action_type 执行的类型
* action_type 执行的类型
* action_body 执行的参数
* action_body 执行的参数
*/
*/
async
springBoard
(
pobj
,
qobj
,
req
)
{
async
springBoard
(
pobj
,
qobj
,
req
)
{
if
(
!
pobj
.
actionProcess
)
{
if
(
!
pobj
.
actionProcess
)
{
return
system
.
getResult
(
null
,
"actionProcess参数不能为空"
);
return
system
.
getResult
(
null
,
"actionProcess参数不能为空"
);
}
}
...
@@ -34,51 +34,51 @@ class Zzzd extends WEBBase {
...
@@ -34,51 +34,51 @@ class Zzzd extends WEBBase {
var
result
=
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionType
,
req
);
var
result
=
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionType
,
req
);
return
result
;
return
result
;
}
}
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
pobj
.
requestId
=
req
.
requestId
;
pobj
.
requestId
=
req
.
requestId
;
var
opResult
=
null
;
var
opResult
=
null
;
switch
(
action_type
)
{
switch
(
action_type
)
{
case
"getIndustries"
:
//获取一级大类列表
case
"getIndustries"
:
//获取一级大类列表
try
{
try
{
console
.
log
(
`获取一级大类列表 参数:`
+
JSON
.
stringify
(
pobj
.
actionBody
));
console
.
log
(
`获取一级大类列表 参数:`
+
JSON
.
stringify
(
pobj
.
actionBody
));
if
(
!
pobj
.
actionBody
.
platformCode
)
{
if
(
!
pobj
.
actionBody
.
platformCode
)
{
return
system
.
getResult
(
null
,
`平台ID不能为空`
)
return
system
.
getResult
(
null
,
`平台ID不能为空`
)
}
}
// 2020 0807 林 修改 rediskey 增加platformCode 平台ID必填参数
// 2020 0807 林 修改 rediskey 增加platformCode 平台ID必填参数
let
_industryOne
=
await
this
.
redisClient
.
get
(
"industryOne"
+
pobj
.
actionBody
.
platformCode
);
let
_industryOne
=
await
this
.
redisClient
.
get
(
"industryOne"
+
pobj
.
actionBody
.
platformCode
);
if
(
_industryOne
)
{
if
(
_industryOne
)
{
opResult
=
system
.
getResult
(
JSON
.
parse
(
_industryOne
));
opResult
=
system
.
getResult
(
JSON
.
parse
(
_industryOne
));
console
.
log
(
"redis数据:"
+
_industryOne
);
console
.
log
(
"redis数据:"
+
_industryOne
);
}
else
{
}
else
{
opResult
=
await
this
.
restPostUrl
(
pobj
.
actionBody
,
settings
.
zzzdUrl
()
+
this
.
zzzApi
.
industryOne
);
opResult
=
await
this
.
restPostUrl
(
pobj
.
actionBody
,
settings
.
zzzdUrl
()
+
this
.
zzzApi
.
industryOne
);
await
this
.
redisClient
.
setWithEx
(
"industryOne"
,
JSON
.
stringify
(
opResult
.
data
),
45
*
60
);
await
this
.
redisClient
.
setWithEx
(
"industryOne"
,
JSON
.
stringify
(
opResult
.
data
),
45
*
60
);
console
.
log
(
`获取一级大类列表 结果`
+
JSON
.
stringify
(
opResult
));
console
.
log
(
`获取一级大类列表 结果`
+
JSON
.
stringify
(
opResult
));
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
return
system
.
getResult
(
null
,
`系统错误`
);
return
system
.
getResult
(
null
,
`系统错误`
);
}
}
break
;
break
;
case
"getSecondIndustries"
:
//获取二级大类列表
case
"getSecondIndustries"
:
//获取二级大类列表
console
.
log
(
`获取二级大类列表 参数:`
+
JSON
.
stringify
(
pobj
.
actionBody
));
console
.
log
(
`获取二级大类列表 参数:`
+
JSON
.
stringify
(
pobj
.
actionBody
));
if
(
!
pobj
.
actionBody
.
industryId
)
{
if
(
!
pobj
.
actionBody
.
industryId
)
{
return
system
.
getResult
(
null
,
`一级行业ID不能为空`
)
return
system
.
getResult
(
null
,
`一级行业ID不能为空`
)
}
}
if
(
!
pobj
.
actionBody
.
platformCode
)
{
if
(
!
pobj
.
actionBody
.
platformCode
)
{
return
system
.
getResult
(
null
,
`平台ID不能为空`
)
return
system
.
getResult
(
null
,
`平台ID不能为空`
)
}
}
try
{
try
{
// await this.redisClient.delete(`industryTwo:${pobj.actionBody.industryId}`);
// await this.redisClient.delete(`industryTwo:${pobj.actionBody.industryId}`);
let
_industryTwo
=
await
this
.
redisClient
.
get
(
`industryTwo:
${
pobj
.
actionBody
.
industryId
}
`
+
pobj
.
actionBody
.
platformCode
);
let
_industryTwo
=
await
this
.
redisClient
.
get
(
`industryTwo:
${
pobj
.
actionBody
.
industryId
}
`
+
pobj
.
actionBody
.
platformCode
);
if
(
_industryTwo
)
{
if
(
_industryTwo
)
{
opResult
=
system
.
getResult
(
JSON
.
parse
(
_industryTwo
));
opResult
=
system
.
getResult
(
JSON
.
parse
(
_industryTwo
));
console
.
log
(
"redis数据:"
+
_industryTwo
);
console
.
log
(
"redis数据:"
+
_industryTwo
);
}
else
{
}
else
{
opResult
=
await
this
.
restPostUrl
(
pobj
.
actionBody
,
settings
.
zzzdUrl
()
+
this
.
zzzApi
.
industryTwo
);
opResult
=
await
this
.
restPostUrl
(
pobj
.
actionBody
,
settings
.
zzzdUrl
()
+
this
.
zzzApi
.
industryTwo
);
await
this
.
redisClient
.
setWithEx
(
`industryTwo:
${
pobj
.
actionBody
.
industryId
}
`
,
JSON
.
stringify
(
opResult
.
data
),
45
*
60
);
await
this
.
redisClient
.
setWithEx
(
`industryTwo:
${
pobj
.
actionBody
.
industryId
}
`
,
JSON
.
stringify
(
opResult
.
data
),
45
*
60
);
console
.
log
(
`获取二级大类列表 结果`
+
JSON
.
stringify
(
opResult
));
console
.
log
(
`获取二级大类列表 结果`
+
JSON
.
stringify
(
opResult
));
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
return
system
.
getResult
(
null
,
`系统错误`
);
return
system
.
getResult
(
null
,
`系统错误`
);
}
}
...
@@ -86,93 +86,93 @@ class Zzzd extends WEBBase {
...
@@ -86,93 +86,93 @@ class Zzzd extends WEBBase {
case
"getQualificationByIndustry"
:
//根据行业获取资质
case
"getQualificationByIndustry"
:
//根据行业获取资质
try
{
try
{
console
.
log
(
`根据行业获取资质 参数:`
+
JSON
.
stringify
(
pobj
.
actionBody
));
console
.
log
(
`根据行业获取资质 参数:`
+
JSON
.
stringify
(
pobj
.
actionBody
));
if
(
!
pobj
.
actionBody
.
hasOwnProperty
(
"isImports"
))
{
if
(
!
pobj
.
actionBody
.
hasOwnProperty
(
"isImports"
))
{
return
system
.
getResult
(
null
,
`参数错误 是否进口不能为空`
)
return
system
.
getResult
(
null
,
`参数错误 是否进口不能为空`
)
}
}
if
(
!
pobj
.
actionBody
.
hasOwnProperty
(
"storeTypeId"
)
&&!
pobj
.
actionBody
.
storeTypeId
)
{
if
(
!
pobj
.
actionBody
.
hasOwnProperty
(
"storeTypeId"
)
&&
!
pobj
.
actionBody
.
storeTypeId
)
{
return
system
.
getResult
(
null
,
`参数错误 店铺类型ID不能为空`
)
return
system
.
getResult
(
null
,
`参数错误 店铺类型ID不能为空`
)
}
}
if
(
!
pobj
.
actionBody
.
industryId
)
{
if
(
!
pobj
.
actionBody
.
industryId
)
{
return
system
.
getResult
(
null
,
`一级行业ID不能为空`
)
return
system
.
getResult
(
null
,
`一级行业ID不能为空`
)
}
}
if
(
!
pobj
.
actionBody
.
secondIndustry
&&
pobj
.
actionBody
.
secondIndustry
.
length
>
0
)
{
if
(
!
pobj
.
actionBody
.
secondIndustry
&&
pobj
.
actionBody
.
secondIndustry
.
length
>
0
)
{
return
system
.
getResult
(
null
,
`二级行业不能为空`
)
return
system
.
getResult
(
null
,
`二级行业不能为空`
)
}
}
opResult
=
await
this
.
restPostUrl
(
pobj
.
actionBody
,
settings
.
zzzdUrl
()
+
this
.
zzzApi
.
getQualificationByIndustry
);
opResult
=
await
this
.
restPostUrl
(
pobj
.
actionBody
,
settings
.
zzzdUrl
()
+
this
.
zzzApi
.
getQualificationByIndustry
);
console
.
log
(
`根据行业获取资质 结果`
+
JSON
.
stringify
(
opResult
));
console
.
log
(
`根据行业获取资质 结果`
+
JSON
.
stringify
(
opResult
));
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
return
system
.
getResult
(
null
,
`系统错误`
);
return
system
.
getResult
(
null
,
`系统错误`
);
}
}
break
;
break
;
case
"check"
:
//立即查看结果
case
"check"
:
//立即查看结果
if
(
!
pobj
.
actionBody
.
industryId
)
{
if
(
!
pobj
.
actionBody
.
industryId
)
{
return
system
.
getResult
(
null
,
`行业ID不能为空`
)
return
system
.
getResult
(
null
,
`行业ID不能为空`
)
}
}
if
(
!
pobj
.
actionBody
.
mobile
)
{
if
(
!
pobj
.
actionBody
.
mobile
)
{
return
system
.
getResult
(
null
,
`电话不能为空`
);
return
system
.
getResult
(
null
,
`电话不能为空`
);
}
}
if
(
!
pobj
.
actionBody
.
enterprise
)
{
if
(
!
pobj
.
actionBody
.
enterprise
)
{
return
system
.
getResult
(
null
,
`企业名称不能为空`
);
return
system
.
getResult
(
null
,
`企业名称不能为空`
);
}
}
if
(
!
pobj
.
actionBody
.
data
)
{
if
(
!
pobj
.
actionBody
.
data
)
{
return
system
.
getResult
(
null
,
`资质列表不能为空`
);
return
system
.
getResult
(
null
,
`资质列表不能为空`
);
}
}
try
{
try
{
opResult
=
await
this
.
restPostUrl
(
pobj
.
actionBody
,
settings
.
zzzdUrl
()
+
this
.
zzzApi
.
recommendationBusiness
);
opResult
=
await
this
.
restPostUrl
(
pobj
.
actionBody
,
settings
.
zzzdUrl
()
+
this
.
zzzApi
.
recommendationBusiness
);
// console.log(`根据行业获取资质 结果` + JSON.stringify(opResult));
// console.log(`根据行业获取资质 结果` + JSON.stringify(opResult));
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
return
system
.
getResult
(
null
,
`系统错误`
+
JSON
.
stringify
(
e
));
return
system
.
getResult
(
null
,
`系统错误`
+
JSON
.
stringify
(
e
));
}
}
break
;
break
;
case
"counselling"
:
//免费咨询
case
"counselling"
:
//免费咨询
if
(
!
pobj
.
actionBody
.
id
)
{
if
(
!
pobj
.
actionBody
.
id
)
{
return
system
.
getResult
(
null
,
`业务ID不能为空`
)
return
system
.
getResult
(
null
,
`业务ID不能为空`
)
}
}
if
(
!
pobj
.
actionBody
.
mobile
)
{
if
(
!
pobj
.
actionBody
.
mobile
)
{
return
system
.
getResult
(
null
,
`电话不能为空`
);
return
system
.
getResult
(
null
,
`电话不能为空`
);
}
}
pobj
.
actionBody
.
enterprise
=
pobj
.
actionBody
.
enterprise
?
pobj
.
actionBody
.
enterprise
:
""
;
pobj
.
actionBody
.
enterprise
=
pobj
.
actionBody
.
enterprise
?
pobj
.
actionBody
.
enterprise
:
""
;
try
{
try
{
console
.
log
(
"免费参数"
+
JSON
.
stringify
(
pobj
));
console
.
log
(
"免费参数"
+
JSON
.
stringify
(
pobj
));
opResult
=
await
this
.
restPostUrl
(
pobj
.
actionBody
,
settings
.
zzzdUrl
()
+
this
.
zzzApi
.
phoneNumber
);
opResult
=
await
this
.
restPostUrl
(
pobj
.
actionBody
,
settings
.
zzzdUrl
()
+
this
.
zzzApi
.
phoneNumber
);
console
.
log
(
`根据行业获取资质 结果`
+
JSON
.
stringify
(
opResult
));
console
.
log
(
`根据行业获取资质 结果`
+
JSON
.
stringify
(
opResult
));
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
return
system
.
getResult
(
null
,
`系统错误`
);
return
system
.
getResult
(
null
,
`系统错误`
);
}
}
break
;
break
;
case
"uploadBusiness"
:
case
"uploadBusiness"
:
if
(
!
pobj
.
actionBody
.
picUrl
)
{
if
(
!
pobj
.
actionBody
.
picUrl
)
{
return
system
.
getResult
(
null
,
`-zzzd03 图片地址不能为空`
);
return
system
.
getResult
(
null
,
`-zzzd03 图片地址不能为空`
);
}
}
if
(
!
pobj
.
actionBody
.
identityCardNo
)
{
if
(
!
pobj
.
actionBody
.
identityCardNo
)
{
return
system
.
getResult
(
null
,
`-zzzd04 身份证号不能为空`
);
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
,
"-zzzd01"
+
result
.
msg
)
return
getResult
(
null
,
"-zzzd01"
+
result
.
msg
)
}
}
// 判断 如果四要素有空 则 不请求 并返回营业执照解析失败
// 判断 如果四要素有空 则 不请求 并返回营业执照解析失败
if
(
result
.
data
.
legal_person
==
"无"
)
{
if
(
result
.
data
.
legal_person
==
"无"
)
{
return
system
.
getResult
(
null
,
"-zzzd06 审核不通过,原因:营业执照法人名字分析失败"
);
return
system
.
getResult
(
null
,
"-zzzd06 审核不通过,原因:营业执照法人名字分析失败"
);
}
}
// 这里写死判断,如果等于测试的营业执照 不走判断地址 因为测试营业执照分析不出地址
// 这里写死判断,如果等于测试的营业执照 不走判断地址 因为测试营业执照分析不出地址
// https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_958415948076283422020615.jpg
// https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_958415948076283422020615.jpg
if
(
result
.
data
.
credit_code
==
"92410204MA47NYPD41"
)
{
if
(
result
.
data
.
credit_code
==
"92410204MA47NYPD41"
)
{
result
.
data
.
company_name
=
"开封市鼓楼区任我行科技技术服务部"
result
.
data
.
company_name
=
"开封市鼓楼区任我行科技技术服务部"
}
else
{
}
else
{
if
(
result
.
data
.
company_name
==
"无"
)
{
if
(
result
.
data
.
company_name
==
"无"
)
{
return
system
.
getResult
(
null
,
"-zzzd05 审核不通过,原因:营业执照组织机构名称分析失败"
);
return
system
.
getResult
(
null
,
"-zzzd05 审核不通过,原因:营业执照组织机构名称分析失败"
);
}
}
}
}
if
(
result
.
data
.
credit_code
==
"无"
&&
result
.
data
.
reg_number
==
"无"
)
{
if
(
result
.
data
.
credit_code
==
"无"
&&
result
.
data
.
reg_number
==
"无"
)
{
return
system
.
getResult
(
null
,
"-zzzd07 审核不通过,原因:营业执照社会信用代码或注册号分析失败"
);
return
system
.
getResult
(
null
,
"-zzzd07 审核不通过,原因:营业执照社会信用代码或注册号分析失败"
);
}
}
// 请求四要素验证
// 请求四要素验证
var
fourFactorsReqParam
=
{
var
fourFactorsReqParam
=
{
...
@@ -180,16 +180,16 @@ class Zzzd extends WEBBase {
...
@@ -180,16 +180,16 @@ class Zzzd extends WEBBase {
legalRepIdNo
:
pobj
.
actionBody
.
identityCardNo
,
// 法人身份证号
legalRepIdNo
:
pobj
.
actionBody
.
identityCardNo
,
// 法人身份证号
legalRepName
:
result
.
data
.
legal_person
,
// 法人名字
legalRepName
:
result
.
data
.
legal_person
,
// 法人名字
name
:
result
.
data
.
company_name
,
// 组织机构证件(如营业执照)上的组织机构名称
name
:
result
.
data
.
company_name
,
// 组织机构证件(如营业执照)上的组织机构名称
orgCode
:
result
.
data
.
credit_code
!=
"无"
?
result
.
data
.
credit_code
:
result
.
data
.
reg_number
// 组织机构证件号,支持统一社会信用代码号和工商注册号(部分个体工商户)
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"
);
var
fourFactorsCompareResult
=
await
this
.
restPostUrl
(
fourFactorsReqParam
,
settings
.
fourFactorsUrl
()
+
"auth/organize/fourFactors/compare"
);
// 请求失败
// 请求失败
if
(
fourFactorsCompareResult
.
code
!=
0
)
{
if
(
fourFactorsCompareResult
.
code
!=
0
)
{
return
system
.
getResult
(
null
,
"-zzzd08"
+
fourFactorsCompareResult
.
msg
);
return
system
.
getResult
(
null
,
"-zzzd08"
+
fourFactorsCompareResult
.
msg
);
}
}
// 验证失败
// 验证失败
if
(
fourFactorsCompareResult
.
data
.
state
!=
1
)
{
if
(
fourFactorsCompareResult
.
data
.
state
!=
1
)
{
return
system
.
getResult
(
null
,
"-zzzd09"
+
fourFactorsCompareResult
.
msg
);
return
system
.
getResult
(
null
,
"-zzzd09"
+
fourFactorsCompareResult
.
msg
);
}
}
// 记录检测结果 用来做检测记录用???暂时未做,表已建好在center-order/c_zzzd_test_business
// 记录检测结果 用来做检测记录用???暂时未做,表已建好在center-order/c_zzzd_test_business
...
@@ -205,6 +205,13 @@ class Zzzd extends WEBBase {
...
@@ -205,6 +205,13 @@ class Zzzd extends WEBBase {
case
"enterpriseInfo"
:
case
"enterpriseInfo"
:
opResult
=
await
this
.
utilsDiagnosisSve
.
enterpriseInfo
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsDiagnosisSve
.
enterpriseInfo
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
case
'getNeedListUser'
:
// 需求列表 20 08 12 liang
pobj
.
actionType
=
'getNeedList'
opResult
=
await
this
.
utilsDiagnosisSve
.
opNeedList
(
pobj
,
pobj
.
actionBody
,
req
);
break
case
'getNeedDetail'
:
// 需求详情 20 08 12 liang
opResult
=
await
this
.
utilsDiagnosisSve
.
getItemByNeedNo
(
pobj
);
break
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
break
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsDiagnosisSve.js
View file @
aa5dea7e
...
@@ -6,7 +6,7 @@ const { json } = require("sequelize");
...
@@ -6,7 +6,7 @@ const { json } = require("sequelize");
// 2020 0807 lin 新增 诊断宝相关
// 2020 0807 lin 新增 诊断宝相关
// 接口文档地址:
// 接口文档地址:
class
UtilsDiagnosisService
extends
AppServiceBase
{
class
UtilsDiagnosisService
extends
AppServiceBase
{
constructor
()
{
constructor
()
{
super
();
super
();
this
.
centerOrderUrl
=
settings
.
centerOrderUrl
();
this
.
centerOrderUrl
=
settings
.
centerOrderUrl
();
}
}
...
@@ -16,9 +16,9 @@ class UtilsDiagnosisService extends AppServiceBase {
...
@@ -16,9 +16,9 @@ class UtilsDiagnosisService extends AppServiceBase {
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody
* @param {*} actionBody
*/
*/
async
manualEvaluation
(
pobj
,
actionBody
)
{
async
manualEvaluation
(
pobj
,
actionBody
)
{
var
reqUrl
=
this
.
centerOrderUrl
+
"action/diagnosis/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/diagnosis/springBoard"
;
var
manualEvaluationResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
manualEvaluationResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
return
manualEvaluationResult
;
return
manualEvaluationResult
;
}
}
/**
/**
...
@@ -26,9 +26,9 @@ class UtilsDiagnosisService extends AppServiceBase {
...
@@ -26,9 +26,9 @@ class UtilsDiagnosisService extends AppServiceBase {
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody
* @param {*} actionBody
*/
*/
async
diagnosisInfo
(
pobj
,
actionBody
)
{
async
diagnosisInfo
(
pobj
,
actionBody
)
{
var
reqUrl
=
this
.
centerOrderUrl
+
"action/diagnosis/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/diagnosis/springBoard"
;
var
diagnosisInfoResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
diagnosisInfoResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
return
diagnosisInfoResult
;
return
diagnosisInfoResult
;
}
}
/**
/**
...
@@ -36,9 +36,9 @@ class UtilsDiagnosisService extends AppServiceBase {
...
@@ -36,9 +36,9 @@ class UtilsDiagnosisService extends AppServiceBase {
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody
* @param {*} actionBody
*/
*/
async
enterpriseInfo
(
pobj
,
actionBody
)
{
async
enterpriseInfo
(
pobj
,
actionBody
)
{
var
reqUrl
=
this
.
centerOrderUrl
+
"action/diagnosis/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/diagnosis/springBoard"
;
var
enterpriseInfoResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
enterpriseInfoResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
return
enterpriseInfoResult
;
return
enterpriseInfoResult
;
}
}
/**
/**
...
@@ -46,9 +46,9 @@ class UtilsDiagnosisService extends AppServiceBase {
...
@@ -46,9 +46,9 @@ class UtilsDiagnosisService extends AppServiceBase {
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody
* @param {*} actionBody
*/
*/
async
needInfo
(
pobj
,
actionBody
)
{
async
needInfo
(
pobj
,
actionBody
)
{
var
reqUrl
=
this
.
centerOrderUrl
+
"action/diagnosis/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/diagnosis/springBoard"
;
var
enterpriseInfoResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
enterpriseInfoResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
return
enterpriseInfoResult
;
return
enterpriseInfoResult
;
}
}
/**
/**
...
@@ -56,9 +56,31 @@ class UtilsDiagnosisService extends AppServiceBase {
...
@@ -56,9 +56,31 @@ class UtilsDiagnosisService extends AppServiceBase {
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody
* @param {*} actionBody
*/
*/
async
needDetail
(
pobj
,
actionBody
)
{
async
needDetail
(
pobj
,
actionBody
)
{
var
reqUrl
=
this
.
centerOrderUrl
+
"action/diagnosis/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/diagnosis/springBoard"
;
var
enterpriseInfoResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
enterpriseInfoResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
return
enterpriseInfoResult
;
}
/**
* @description
* @author liangwk
* @param {*} pobj
* @param {*} actionBody
* @param {*} req
* @returns
* @memberof UtilsDiagnosisService
*/
async
opNeedList
(
pobj
)
{
var
reqUrl
=
this
.
centerOrderUrl
+
"action/diagnosis/springBoard"
;
var
enterpriseInfoResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
return
enterpriseInfoResult
;
}
async
getItemByNeedNo
(
pobj
)
{
var
reqUrl
=
this
.
centerOrderUrl
+
"action/diagnosis/springBoard"
;
var
enterpriseInfoResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
return
enterpriseInfoResult
;
return
enterpriseInfoResult
;
}
}
}
}
...
...
center-channel/app/config/routes/api.js
View file @
aa5dea7e
...
@@ -244,7 +244,7 @@ module.exports = function (app) {
...
@@ -244,7 +244,7 @@ module.exports = function (app) {
"submitProgramme"
,
"getProgrammeListByUser"
,
"getProgrammeInfoByNeedNo"
,
"abolishProgramme"
,
"getAliPayInfo"
,
"submitProgramme"
,
"getProgrammeListByUser"
,
"getProgrammeInfoByNeedNo"
,
"abolishProgramme"
,
"getAliPayInfo"
,
"getPaidLogoListByUser"
,
"getCollectibleLogoListByUser"
,
"collectLogo"
,
"getLogoMaterial"
,
"cancelCollectLogo"
,
"icpNotify"
,
"createName"
,
"getNameDetail"
,
"orderConfirm"
,
"getPaidLogoListByUser"
,
"getCollectibleLogoListByUser"
,
"collectLogo"
,
"getLogoMaterial"
,
"cancelCollectLogo"
,
"icpNotify"
,
"createName"
,
"getNameDetail"
,
"orderConfirm"
,
"orderTotalSum"
,
"collect"
,
"reg"
,
"orderCheck"
,
"getReOrderList"
,
"getOfficalList"
,
"addReviewList"
,
"opSubmitNeed"
,
"opNeedClose"
,
"opNeedList"
,
"opNeedDetailByChannelNo"
,
"orderTotalSum"
,
"collect"
,
"reg"
,
"orderCheck"
,
"getReOrderList"
,
"getOfficalList"
,
"addReviewList"
,
"opSubmitNeed"
,
"opNeedClose"
,
"opNeedList"
,
"opNeedDetailByChannelNo"
,
"manualEvaluation"
"manualEvaluation"
,
'getNeedListUser'
];
];
if
(
lst
.
indexOf
(
req
.
body
.
actionType
)
>=
0
)
{
if
(
lst
.
indexOf
(
req
.
body
.
actionType
)
>=
0
)
{
var
userpin
=
req
.
headers
[
"userpin"
]
||
""
;
var
userpin
=
req
.
headers
[
"userpin"
]
||
""
;
...
...
center-channel/app/front/entry/public/apidoc/platform/zzzd.md
View file @
aa5dea7e
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
2.
[
人工评估-开始入职评估
](
#manualEvaluation
)
2.
[
人工评估-开始入职评估
](
#manualEvaluation
)
3.
[
个人中心-诊断列表
](
#diagnosisInfo
)
3.
[
个人中心-诊断列表
](
#diagnosisInfo
)
4.
[
个人中心-企业信息
](
#enterpriseInfo
)
4.
[
个人中心-企业信息
](
#enterpriseInfo
)
5.
[
需求列表
](
#getNeedListUser
)
6.
[
需求详情
](
#getNeedDetail
)
## **<a name="uploadBusiness"> 四要素诊断</a>**
## **<a name="uploadBusiness"> 四要素诊断</a>**
[
返回到目录
](
#menu
)
[
返回到目录
](
#menu
)
...
@@ -144,4 +146,34 @@
...
@@ -144,4 +146,34 @@
"data"
:
null
,
"data"
:
null
,
"requestId"
:
"837ea5c284074d568fa198f7f259088a"
"requestId"
:
"837ea5c284074d568fa198f7f259088a"
}
}
```
## **<a name="getNeedListUser"> 需求列表</a>**
[
返回到目录
](
#menu
)
##### URL
[
/web/zzzd/zzzd/springBoard
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:enterpriseInfo
```
javascript
{
"status"
:
"状态"
,
// 目前枚举和原型不同 不建议筛选
"needNo"
:
""
,
// 需求单号
"publishName"
:
""
,
// 联系人姓名
"publishMobile"
:
""
,
// 联系人电话
"updatedAt"
:
[],
// 更新时间 两个日期
"pageNo"
:
1
,
// 页数
"pageSize"
:
10
// 每页条数
}
```
#### 返回结果
```
javascript
// 等待填写
{
"status"
:
0
,
"msg"
:
"success"
,
"data"
:
null
,
"requestId"
:
"837ea5c284074d568fa198f7f259088a"
}
```
```
\ No newline at end of file
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