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
df5816e6
Commit
df5816e6
authored
Apr 13, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
icp
parent
f37530a5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
131 additions
and
9 deletions
+131
-9
center-channel/app/base/api/impl/action/icpapi.js
+3
-0
center-channel/app/base/service/impl/common/centerorderSve.js
+45
-7
center-channel/app/base/utils/aliyunClient.js
+1
-1
center-channel/app/config/routes/api.js
+1
-1
center-channel/app/front/entry/public/apidoc/platform/icpOrder.md
+81
-0
No files found.
center-channel/app/base/api/impl/action/icpapi.js
View file @
df5816e6
...
@@ -31,6 +31,9 @@ class IcpAPI extends APIBase {
...
@@ -31,6 +31,9 @@ class IcpAPI extends APIBase {
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
var
opResult
=
null
;
var
opResult
=
null
;
switch
(
action_type
)
{
switch
(
action_type
)
{
case
"getNeedSolutionDetailByUser"
:
//获取方案详情
opResult
=
await
this
.
centerorderSve
.
reqCenterOrderApi
(
pobj
,
"action/icpapi/springBoard"
);
break
;
case
"submitIcpProgramme"
:
//icp方案提交
case
"submitIcpProgramme"
:
//icp方案提交
opResult
=
await
this
.
centerorderSve
.
submitIcpProgramme
(
pobj
);
opResult
=
await
this
.
centerorderSve
.
submitIcpProgramme
(
pobj
);
break
;
break
;
...
...
center-channel/app/base/service/impl/common/centerorderSve.js
View file @
df5816e6
...
@@ -9,6 +9,7 @@ class CenterorderService {
...
@@ -9,6 +9,7 @@ class CenterorderService {
this
.
cacheManager
=
system
.
getObject
(
"db.common.cacheManager"
);
this
.
cacheManager
=
system
.
getObject
(
"db.common.cacheManager"
);
this
.
utilsOrderSve
=
system
.
getObject
(
"service.utilsSve.utilsOrderSve"
);
this
.
utilsOrderSve
=
system
.
getObject
(
"service.utilsSve.utilsOrderSve"
);
this
.
utilsPushSve
=
system
.
getObject
(
"service.utilsSve.utilsPushSve"
);
this
.
utilsPushSve
=
system
.
getObject
(
"service.utilsSve.utilsPushSve"
);
this
.
utilsTmAliyunSve
=
system
.
getObject
(
"service.utilsSve.utilsTmAliyunSve"
);
//测试用
};
};
//调用center-order
//调用center-order
async
reqCenterOrderApi
(
pobj
,
reqUrl
)
{
async
reqCenterOrderApi
(
pobj
,
reqUrl
)
{
...
@@ -208,7 +209,10 @@ class CenterorderService {
...
@@ -208,7 +209,10 @@ class CenterorderService {
if
(
typeof
(
ab
.
solutionContent
)
==
"string"
){
if
(
typeof
(
ab
.
solutionContent
)
==
"string"
){
ab
.
solutionContent
=
JSON
.
parse
(
ab
.
solutionContent
);
ab
.
solutionContent
=
JSON
.
parse
(
ab
.
solutionContent
);
}
}
var
solution
=
ab
.
solutionContent
.
solution
;
if
(
typeof
(
needsolution
.
solutionContent
)
==
"string"
){
needsolution
.
solutionContent
=
JSON
.
parse
(
needsolution
.
solutionContent
);
}
var
solution
=
needsolution
.
solutionContent
.
solution
;
//推送数据至阿里
//推送数据至阿里
var
bizType
=
needinfo
.
channelTypeCode
;
//业务类型里
var
bizType
=
needinfo
.
channelTypeCode
;
//业务类型里
var
pushObj
=
{
var
pushObj
=
{
...
@@ -218,13 +222,47 @@ class CenterorderService {
...
@@ -218,13 +222,47 @@ class CenterorderService {
};
};
var
self
=
this
;
var
self
=
this
;
//推送方案
//推送方案
// this.push
Submit
Solution(pushObj,needsolution.solutionNo,pobj.appInfo,self);
// this.push
Icp
Solution(pushObj,needsolution.solutionNo,pobj.appInfo,self);
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
return
res
;
return
res
;
}
}
//推送ICP方案
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
resData
=
pushRes
.
data
;
if
(
resData
.
BizId
){
var
reqObj2
=
{
actionType
:
"receiveProgrammeNo"
,
appInfo
:
appInfo
,
actionBody
:{
solutionNo
:
solutionNo
,
solutionBizId
:
resData
.
BizId
}
};
var
a
=
await
self
.
reqCenterOrderApi
(
reqObj2
);
//保存渠道方案id
if
(
a
&&
a
.
status
==
0
){
//推送方案确认信息
await
self
.
aliclient
.
reqbyget
({
action
:
"ConfirmIntention"
,
reqbody
:{
BizId
:
resData
.
BizId
}});
}
}
}
}
//材料链接转换
async
materialUrlConversion
(
pobj
){
// if(!pobj || !pobj.actionBody || !pobj.actionBody.material){
// return pobj;
// }
// var material = pobj.actionBody.material;
// if(material.PartnerBusinessLicense){//营业执照
// var aliPartnerBusinessLicense = await this.utilsTmAliyunSve.getAliOssFileUrl("trade-mark-user-upload", pobj, this.utilsTmAliyunSve.aliOssFileType.BUSINESS_LICENSE, material.PartnerBusinessLicense, rpcParam);
// }
}
//icp材料提交
//icp材料提交
async
submitIcpMaterial
(
pobj
)
{
async
submitIcpMaterial
(
pobj
)
{
// pobj = await this.materialUrlConversion(pobj);
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/icpapi/springBoard"
);
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/icpapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
){
if
(
res
&&
res
.
status
==
0
&&
res
.
data
){
var
needsolution
=
res
.
data
;
//方案信息
var
needsolution
=
res
.
data
;
//方案信息
...
@@ -233,7 +271,7 @@ class CenterorderService {
...
@@ -233,7 +271,7 @@ class CenterorderService {
ab
.
material
=
JSON
.
parse
(
ab
.
material
);
ab
.
material
=
JSON
.
parse
(
ab
.
material
);
}
}
var
material
=
ab
.
material
;
var
material
=
ab
.
material
;
//推送数据至阿里
//推送数据至阿里
var
BizId
=
ab
.
BizId
;
//⽅案业务ID
var
BizId
=
ab
.
BizId
;
//⽅案业务ID
var
pushObj
=
{
var
pushObj
=
{
"BizId"
:
BizId
,
"BizId"
:
BizId
,
...
@@ -252,8 +290,8 @@ class CenterorderService {
...
@@ -252,8 +290,8 @@ class CenterorderService {
"PartnerSignAndStampOtherList"
:
material
.
PartnerSignAndStampOtherList
||
[]
"PartnerSignAndStampOtherList"
:
material
.
PartnerSignAndStampOtherList
||
[]
};
};
var
self
=
this
;
var
self
=
this
;
//推送方案
//推送方案
材料
//
this.pushSubmitSolution(pushObj,needsolution.solutionNo,pobj.appInfo,self
);
//
self.aliclient.reqbyget({action:"SavePartnerSubmitMaterial",reqbody:pushObj}
);
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
return
res
;
return
res
;
...
@@ -266,7 +304,7 @@ class CenterorderService {
...
@@ -266,7 +304,7 @@ class CenterorderService {
//推送数据至阿里
//推送数据至阿里
var
pushObj
=
res
.
data
;
var
pushObj
=
res
.
data
;
//推送方案
//推送方案
//
this.pushSubmitSolution(pushObj,needsolution.solutionNo,pobj.appInfo,self
);
//
this.aliclient.reqbyget({action:"AcceptPartnerNotification",reqbody:pushObj}
);
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
return
res
;
return
res
;
...
@@ -285,7 +323,7 @@ class CenterorderService {
...
@@ -285,7 +323,7 @@ class CenterorderService {
BizId
:
ab
.
BizId
,
Note
:
ab
.
Note
BizId
:
ab
.
BizId
,
Note
:
ab
.
Note
};
};
//推送方案
//推送方案
//
this.pushSubmitSolution(pushObj,needsolution.solutionNo,pobj.appInfo,self
);
//
this.aliclient.reqbyget({action:"CloseIcpProduce",reqbody:pushObj}
);
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
return
res
;
return
res
;
...
...
center-channel/app/base/utils/aliyunClient.js
View file @
df5816e6
...
@@ -30,7 +30,7 @@ class aliyunClient {
...
@@ -30,7 +30,7 @@ class aliyunClient {
var
action
=
obj
.
action
;
var
action
=
obj
.
action
;
var
reqbody
=
obj
.
reqbody
;
var
reqbody
=
obj
.
reqbody
;
try
{
try
{
if
(
rpcParam
.
apiVersion
)
{
if
(
obj
.
apiVersion
)
{
this
.
aliclient
.
apiVersion
=
obj
.
apiVersion
;
this
.
aliclient
.
apiVersion
=
obj
.
apiVersion
;
}
}
var
res
=
await
this
.
aliclient
.
request
(
action
,
reqbody
,
{
var
res
=
await
this
.
aliclient
.
request
(
action
,
reqbody
,
{
...
...
center-channel/app/config/routes/api.js
View file @
df5816e6
...
@@ -109,7 +109,7 @@ module.exports = function (app) {
...
@@ -109,7 +109,7 @@ module.exports = function (app) {
}
}
req
.
body
.
appInfo
=
result
.
data
;
req
.
body
.
appInfo
=
result
.
data
;
req
.
body
.
actionProcess
=
result
.
data
.
app_code
;
req
.
body
.
actionProcess
=
result
.
data
.
app_code
;
var
lst
=
[
"tmConfirm"
,
var
lst
=
[
"tmConfirm"
,
"getNeedSolutionDetailByUser"
,
"submitIcpProgramme"
,
"submitIcpMaterial"
,
"acceptIcpPartnerNotification"
,
"abolishIcpProgramme"
,
"submitIcpProgramme"
,
"submitIcpMaterial"
,
"acceptIcpPartnerNotification"
,
"abolishIcpProgramme"
,
"addOrder"
,
"getH5PayUrl"
,
"getOrderQrCode"
,
"queryOrderStatus"
,
"getOrderInfo"
,
"getOrderDeliveryInfo"
,
"getOrderDetails"
,
"addOrder"
,
"getH5PayUrl"
,
"getOrderQrCode"
,
"queryOrderStatus"
,
"getOrderInfo"
,
"getOrderDeliveryInfo"
,
"getOrderDetails"
,
"getOrderDeliveryFlowInfo"
,
"getOrderDeliveryFlowList"
,
"getOrderLogInfo"
,
"updateContacts"
,
"updateTmOrder"
,
"delOrder"
,
"getOrderDeliveryFlowInfo"
,
"getOrderDeliveryFlowList"
,
"getOrderLogInfo"
,
"updateContacts"
,
"updateTmOrder"
,
"delOrder"
,
...
...
center-channel/app/front/entry/public/apidoc/platform/icpOrder.md
View file @
df5816e6
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
1.
[
根据需求产看方案详情
](
#getProgrammeInfoByNeedNo
)
1.
[
根据需求产看方案详情
](
#getProgrammeInfoByNeedNo
)
1.
[
icp通知状态变更
](
#acceptIcpPartnerNotification
)
1.
[
icp通知状态变更
](
#acceptIcpPartnerNotification
)
1.
[
服务商关闭icp方案
](
#abolishIcpProgramme
)
1.
[
服务商关闭icp方案
](
#abolishIcpProgramme
)
1.
[
获取方案详情
](
#getNeedSolutionDetailByUser
)
## **<a name="submitIcpProgramme"> icp方案提交</a>**
## **<a name="submitIcpProgramme"> icp方案提交</a>**
[
返回到目录
](
#menu
)
[
返回到目录
](
#menu
)
...
@@ -202,3 +203,83 @@ ApplicationStatus:
...
@@ -202,3 +203,83 @@ ApplicationStatus:
"requestId"
:
"40769e74e83f4505a78b24d84fed870b"
"requestId"
:
"40769e74e83f4505a78b24d84fed870b"
}
}
```
```
## **<a name="getNeedSolutionDetailByUser"> 获取方案详情</a>**
[
返回到目录
](
#menu
)
##### URL
[
/web/action/icapi/springBoard
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 请求头中需要增加userpin(用户登录后的凭证)的值
#### 渠道执行的类型 actionType:getNeedSolutionDetailByUser
```
javascript
{
"actionType"
:
"getNeedSolutionDetailByUser"
,
"actionBody"
:{
"solutionNo"
:
"NS202004131008iKPRDB"
}
}
```
#### 返回结果
```
javascript
{
"status"
:
0
,
"msg"
:
"success"
,
"data"
:[
{
"id"
:
229
,
"channelNeedNo"
:
"I20200320201737000221"
,
//渠道需求编号
"needNo"
:
"N202004111217gD5T8TJ"
,
//需求编号
"solutionNo"
:
"NS202004131008iKPRDB"
,
//方案编号
"channelSolutionNo"
:
"S20200323174838000zhb6"
,
//渠道方案编号 同 BizId
"orderNo"
:
null
,
//服务订单号
"solutionContent"
:{
//方案交付信息
"notes"
:
""
,
//用户反馈备注
"status"
:
"ACCOUNT_REGISTERED"
,
//方案流程状态
"bizType"
:
"icp"
,
//
"solution"
:{
//方案信息
"Area"
:
"区域"
,
"Note"
:
"备注"
,
"IcpType"
:
"icp"
,
"CompanyName"
:
"公司名测试数据"
,
"CompanyAddress"
:
"公司地址"
},
"totalSum"
:
""
,
//订单金额
"statusName"
:
"完成账户注册"
,
//方案流程状态名称
"solutionFlowList"
:[
//方案流程列表
{
"status"
:
"ACCOUNT_REGISTERED"
,
"statusName"
:
"完成账户注册"
,
"updated_at"
:
"2020-04-13T05:28:57.977Z"
}
],
"applicationStatusList"
:[
//方案通知状态列表 -- 前端未用到
{
"created_at"
:
"2020-04-13T02:08:37.317Z"
,
"OfficialFileURL"
:
""
,
"ApplicationStatus"
:
"submitIcpProgramme"
,
"ApplicationStatusName"
:
"提交方案"
},
{
"created_at"
:
"2020-04-13T05:28:57.977Z"
,
"OfficialFileURL"
:
""
,
"ApplicationStatus"
:
"507"
,
"ApplicationStatusName"
:
"507"
}
]
},
"status"
:
"dqr"
,
//方案状态
"statusName"
:
"待确认"
,
"createUserId"
:
100
,
"created_at"
:
"2020-04-13T02:08:37.000Z"
,
"updated_at"
:
"2020-04-13T05:28:58.000Z"
,
"deleted_at"
:
null
,
"version"
:
0
}
],
"requestId"
:
"2131d6e9c69e4a1399d6db948122363c"
}
```
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