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
ccdebf65
Commit
ccdebf65
authored
Apr 18, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
cc5e6840
1dfa4f5b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
78 deletions
+66
-78
center-channel/app/base/api/impl/opreceive/need.js
+9
-2
center-channel/app/base/service/impl/common/centerorderSve.js
+54
-73
center-channel/app/front/entry/public/apidoc/platform/icpOrder.md
+3
-3
No files found.
center-channel/app/base/api/impl/opreceive/need.js
View file @
ccdebf65
...
...
@@ -37,7 +37,13 @@ class Need extends APIBase {
break
;
case
"needCloseIcp"
:
//关闭需求
opResult
=
await
this
.
utilsNeedSve
.
needCloseIcp
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
case
"needDetailByChannelNo"
:
opResult
=
await
this
.
utilsNeedSve
.
needDetailByChannelNo
(
pobj
,
pobj
.
actionBody
);
break
;
case
"getItemByChannelNeedNo"
:
opResult
=
await
this
.
utilsNeedSve
.
getItemByChannelNeedNo
(
pobj
,
pobj
.
actionBody
);
break
;
case
"getItemByNeedNo"
:
opResult
=
await
this
.
utilsNeedSve
.
getItemByNeedNo
(
pobj
,
pobj
.
actionBody
);
break
;
...
...
@@ -45,7 +51,8 @@ class Need extends APIBase {
opResult
=
await
this
.
centerorderSve
.
reqCenterOrderApi
(
pobj
);
break
;
case
"icpFeedbackSubmit"
:
//icp接收方案反馈信息
opResult
=
await
this
.
utilsNeedSve
.
icpFeedbackSubmit
(
pobj
);
pobj
.
actionType
=
"receiveIcpFeedback"
;
opResult
=
await
this
.
utilsNeedSve
.
reqCenterOrderApi
(
pobj
);
break
;
case
"icpNotify"
:
//icp方案更新
var
rtn
=
await
this
.
utilsNeedSve
.
icpNotify
(
pobj
,
pobj
.
actionBody
);
...
...
center-channel/app/base/service/impl/common/centerorderSve.js
View file @
ccdebf65
const
system
=
require
(
"../../../system"
);
const
crypto
=
require
(
'crypto'
);
var
settings
=
require
(
"../../../../config/settings"
);
class
CenterorderService
{
const
AppServiceBase
=
require
(
"../../app.base"
);
class
CenterorderService
extends
AppServiceBase
{
constructor
()
{
super
();
this
.
centerOrderUrl
=
settings
.
centerOrderUrl
();
this
.
execClient
=
system
.
getObject
(
"util.execClient"
);
this
.
aliclient
=
system
.
getObject
(
"util.aliyunClient"
);
...
...
@@ -198,34 +200,11 @@ class CenterorderService {
}
async
icppaysuccess
(
pobj
)
{
if
(
!
pobj
.
actionBody
.
bizId
)
{
return
system
.
getResult
(
null
,
"actionBody.bizId can not be empty,100491"
);
}
var
solutionobj
=
{
actionType
:
""
,
actionBody
:
pobj
.
actionBody
.
bizId
,
appInfo
:
pobj
.
appInfo
,
actionProcess
:
pobj
.
actionProcess
}
var
solutionrtn
=
await
this
.
execClient
.
execPost
(
solutionobj
,
url
);
if
(
!
solutionrtn
||
!
solutionrtn
.
stdout
)
{
return
system
.
getResultFail
(
-
5011
,
"方案查询失败"
);
}
var
solutiondata
=
JSON
.
parse
(
solutionrtn
.
stdout
);
if
(
solutiondata
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
5011
,
"方案查询失败"
);
}
if
(
solutiondata
.
data
&&
solutiondata
.
data
.
channelNeedNo
)
{
pobj
.
actionBody
.
needId
=
solutiondata
.
data
.
channelNeedNo
;
}
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
itemResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
if
(
needResult
.
status
!=
0
)
{
return
needResult
;
}
var
sobj
=
{
actionType
:
"getaliicpProduce"
,
actionBody
:
pobj
.
actionBody
,
// actionBody: { typeCode: itemResult.data.channelTypeCode, province: itemResult.data.province },
actionBody
:
{
typeCode
:
pobj
.
actionBody
.
channelTypeCode
,
province
:
pobj
.
actionBody
.
province
},
appInfo
:
pobj
.
appInfo
,
actionProcess
:
pobj
.
actionProcess
}
...
...
@@ -239,10 +218,12 @@ class CenterorderService {
if
(
data
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
5010
,
"产品查询失败"
);
}
pobj
.
actionBody
=
data
.
data
;
//
pobj.actionBody = data.data;
pobj
.
actionBody
.
orderNo
=
pobj
.
actionBody
.
bizId
;
pobj
.
actionBody
.
totalSum
=
pobj
.
actionBody
.
price
;
pobj
.
actionBody
.
payTotalSum
=
pobj
.
actionBody
.
price
;
pobj
.
actionBody
.
totalSum
=
data
.
data
.
price
;
pobj
.
actionBody
.
payTotalSum
=
data
.
data
.
price
;
pobj
.
actionBody
.
payCode
=
data
.
data
.
payCode
;
pobj
.
actionBody
.
channelItemCode
=
data
.
data
.
channelItemCode
;
pobj
.
actionBody
.
quantity
=
1
;
pobj
.
actionBody
.
channelOrder
=
{
channelServiceNo
:
pobj
.
actionBody
.
orderNo
,
...
...
@@ -285,24 +266,24 @@ class CenterorderService {
//--------------------------阿里ICP---start--------------------------------------------------------
//提交公司注册方案
async
submitIcpProgramme
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/icpapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
&&
res
.
data
.
needinfo
&&
res
.
data
.
needsolution
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/icpapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
&&
res
.
data
.
needinfo
&&
res
.
data
.
needsolution
)
{
var
needinfo
=
res
.
data
.
needinfo
;
//需求信息
var
needsolution
=
res
.
data
.
needsolution
;
//方案信息
var
ab
=
pobj
.
actionBody
;
if
(
typeof
(
ab
.
solutionContent
)
==
"string"
)
{
if
(
typeof
(
ab
.
solutionContent
)
==
"string"
)
{
ab
.
solutionContent
=
JSON
.
parse
(
ab
.
solutionContent
);
}
if
(
typeof
(
needsolution
.
solutionContent
)
==
"string"
)
{
if
(
typeof
(
needsolution
.
solutionContent
)
==
"string"
)
{
needsolution
.
solutionContent
=
JSON
.
parse
(
needsolution
.
solutionContent
);
}
var
solution
=
needsolution
.
solutionContent
.
solution
;
//推送数据至阿里
var
bizType
=
needinfo
.
channelTypeCode
;
//业务类型里
var
pushObj
=
{
IntentionBizId
:
needinfo
.
channelNeedNo
,
CompanyName
:
solution
.
CompanyName
,
IcpType
:
solution
.
IcpType
,
CompanyAddress
:
solution
.
CompanyAddress
,
Area
:
solution
.
Area
,
Note
:
solution
.
Note
IntentionBizId
:
needinfo
.
channelNeedNo
,
CompanyName
:
solution
.
CompanyName
,
IcpType
:
solution
.
IcpType
,
CompanyAddress
:
solution
.
CompanyAddress
,
Area
:
solution
.
Area
,
Note
:
solution
.
Note
};
var
self
=
this
;
//推送方案
...
...
@@ -312,22 +293,22 @@ class CenterorderService {
return
res
;
}
//推送ICP方案
async
pushIcpSolution
(
pushObj
,
solutionNo
,
appInfo
,
self
)
{
async
pushIcpSolution
(
pushObj
,
solutionNo
,
appInfo
,
self
)
{
//推送方案信息
var
pushRes
=
await
self
.
aliclient
.
reqbyget
({
action
:
"SubmitIcpSolution"
,
reqbody
:
pushObj
,
apiVersion
:
"2019-05-08"
});
if
(
pushRes
&&
pushRes
.
status
==
0
&&
pushRes
.
data
)
{
var
pushRes
=
await
self
.
aliclient
.
reqbyget
({
action
:
"SubmitIcpSolution"
,
reqbody
:
pushObj
,
apiVersion
:
"2019-05-08"
});
if
(
pushRes
&&
pushRes
.
status
==
0
&&
pushRes
.
data
)
{
var
resData
=
pushRes
.
data
;
if
(
resData
.
BizId
)
{
if
(
resData
.
BizId
)
{
var
reqObj2
=
{
actionType
:
"receiveProgrammeNo"
,
appInfo
:
appInfo
,
actionBody
:{
solutionNo
:
solutionNo
,
solutionBizId
:
resData
.
BizId
actionType
:
"receiveProgrammeNo"
,
appInfo
:
appInfo
,
actionBody
:
{
solutionNo
:
solutionNo
,
solutionBizId
:
resData
.
BizId
}
};
var
a
=
await
self
.
reqCenterOrderApi
(
reqObj2
);
//保存渠道方案id
if
(
a
&&
a
.
status
==
0
)
{
if
(
a
&&
a
.
status
==
0
)
{
//推送方案确认信息
await
self
.
aliclient
.
reqbyget
({
action
:
"ConfirmIntention"
,
reqbody
:{
BizId
:
pushObj
.
IntentionBizId
},
apiVersion
:
"2019-05-08"
});
}
...
...
@@ -335,7 +316,7 @@ class CenterorderService {
}
}
//材料链接转换
async
materialUrlConversion
(
pobj
){
async
materialUrlConversion
(
pobj
)
{
// if(!pobj || !pobj.actionBody || !pobj.actionBody.material){
// return pobj;
// }
...
...
@@ -347,31 +328,31 @@ class CenterorderService {
//icp材料提交
async
submitIcpMaterial
(
pobj
)
{
// pobj = await this.materialUrlConversion(pobj);
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/icpapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/icpapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
var
needsolution
=
res
.
data
;
//方案信息
var
ab
=
pobj
.
actionBody
;
if
(
typeof
(
ab
.
material
)
==
"string"
)
{
if
(
typeof
(
ab
.
material
)
==
"string"
)
{
ab
.
material
=
JSON
.
parse
(
ab
.
material
);
}
var
material
=
ab
.
material
;
//推送数据至阿里
var
BizId
=
ab
.
BizId
;
//⽅案业务ID
var
pushObj
=
{
"BizId"
:
BizId
,
"Domain"
:
material
.
Domain
,
"CorporateName"
:
material
.
CorporateName
,
"IncludeForeignInvestment"
:
material
.
IncludeForeignInvestment
,
"PartnerBusinessLicense"
:
material
.
PartnerBusinessLicense
,
"PartnerIdCardList"
:
material
.
PartnerIdCardList
,
"PartnerDomainCertificate"
:
material
.
PartnerDomainCertificate
,
"PartnerPreviewOtherList"
:
material
.
PartnerPreviewOtherList
||
[],
"PartnerPlan"
:
material
.
PartnerPlan
||
""
,
"PartnerForeignInvestment"
:
material
.
PartnerForeignInvestment
||
""
,
"PartnerLaw"
:
material
.
PartnerLaw
||
""
,
"PartnerStampOtherList"
:
material
.
PartnerStampOtherList
||
[],
"PartnerSignOtherList"
:
material
.
PartnerSignOtherList
||
[],
"PartnerSignAndStampOtherList"
:
material
.
PartnerSignAndStampOtherList
||
[]
"BizId"
:
BizId
,
"Domain"
:
material
.
Domain
,
"CorporateName"
:
material
.
CorporateName
,
"IncludeForeignInvestment"
:
material
.
IncludeForeignInvestment
,
"PartnerBusinessLicense"
:
material
.
PartnerBusinessLicense
,
"PartnerIdCardList"
:
material
.
PartnerIdCardList
,
"PartnerDomainCertificate"
:
material
.
PartnerDomainCertificate
,
"PartnerPreviewOtherList"
:
material
.
PartnerPreviewOtherList
||
[],
"PartnerPlan"
:
material
.
PartnerPlan
||
""
,
"PartnerForeignInvestment"
:
material
.
PartnerForeignInvestment
||
""
,
"PartnerLaw"
:
material
.
PartnerLaw
||
""
,
"PartnerStampOtherList"
:
material
.
PartnerStampOtherList
||
[],
"PartnerSignOtherList"
:
material
.
PartnerSignOtherList
||
[],
"PartnerSignAndStampOtherList"
:
material
.
PartnerSignAndStampOtherList
||
[]
};
var
self
=
this
;
//推送方案材料
...
...
@@ -381,9 +362,9 @@ class CenterorderService {
return
res
;
}
//icp通知状态变更
async
acceptIcpPartnerNotification
(
pobj
){
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/icpapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
async
acceptIcpPartnerNotification
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/icpapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
var
ab
=
pobj
.
actionBody
;
//推送数据至阿里
// var pushObj = res.data;
...
...
@@ -399,17 +380,17 @@ class CenterorderService {
return
res
;
}
//服务商icp方案关闭
async
abolishIcpProgramme
(
pobj
){
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/icpapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
async
abolishIcpProgramme
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/icpapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
var
needsolution
=
res
.
data
;
//方案信息
var
ab
=
pobj
.
actionBody
;
if
(
typeof
(
ab
.
material
)
==
"string"
)
{
if
(
typeof
(
ab
.
material
)
==
"string"
)
{
ab
.
material
=
JSON
.
parse
(
ab
.
material
);
}
//推送数据至阿里
var
pushObj
=
{
BizId
:
ab
.
BizId
,
Note
:
ab
.
Note
BizId
:
ab
.
BizId
,
Note
:
ab
.
Note
};
//关闭方案
this
.
aliclient
.
reqbyget
({
action
:
"CloseIcpProduce"
,
reqbody
:
pushObj
,
apiVersion
:
"2019-05-08"
});
...
...
center-channel/app/front/entry/public/apidoc/platform/icpOrder.md
View file @
ccdebf65
...
...
@@ -544,19 +544,19 @@ ApplicationStatus:
}
```
## **<a name="getItemByNeedNo"> 获取需求详情</a>**
## **<a name="getItemBy
Channel
NeedNo"> 获取需求详情</a>**
[
返回到目录
](
#menu
)
##### URL
[
/web/opreceive/need/springBoard
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 请求头中需要增加userpin(用户登录后的凭证)的值
#### 渠道执行的类型 actionType:getItemByNeedNo
#### 渠道执行的类型 actionType:getItemBy
Channel
NeedNo
```
javascript
{
"actionType"
:
"getItemByNeedNo"
,
"actionType"
:
"getItemBy
Channel
NeedNo"
,
"actionBody"
:{
"needNo"
:
"NS202004131008iKPRDB"
}
...
...
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