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
32d319a2
Commit
32d319a2
authored
Sep 16, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
needBatchUpload
parent
537ee14a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
12 deletions
+32
-12
center-channel/app/base/service/impl/common/qcCenterOrderSve.js
+5
-2
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+18
-9
center-channel/app/base/system.js
+9
-1
No files found.
center-channel/app/base/service/impl/common/qcCenterOrderSve.js
View file @
32d319a2
...
...
@@ -54,7 +54,8 @@ class QcCenterOrderService extends AppServiceBase {
}
var
self
=
this
;
//推送方案
await
this
.
pushIcpSolution
(
pushObj
,
needsolution
.
solutionNo
,
pobj
.
appInfo
,
self
);
// 2020 0916 lin 修改 增加获取返回值
var
pushIcpSolutionRes
=
await
this
.
pushIcpSolution
(
pushObj
,
needsolution
.
solutionNo
,
pobj
.
appInfo
,
self
);
// // 2020 0806 lin 新增推送
// var reqParams = {
...
...
@@ -87,7 +88,8 @@ class QcCenterOrderService extends AppServiceBase {
appInfo
:
pobj
.
appInfo
}
this
.
utilsPushSve
.
aliBusiness2Delivery
(
reqParams
,
"updateChanceStatus"
);
return
system
.
getResultSuccess
();
//
return
system
.
getResultSuccess
(
pushIcpSolutionRes
);
}
return
res
;
}
...
...
@@ -124,6 +126,7 @@ class QcCenterOrderService extends AppServiceBase {
var
a
=
await
self
.
reqCenterOrderApi
(
reqObj3
);
//保存用户确认方案url
}
}
return
confirmRes
;
}
}
}
...
...
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
32d319a2
...
...
@@ -449,7 +449,8 @@ class UtilsNeedService extends AppServiceBase {
var
self
=
this
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
await
self
.
aliclient
.
reqbyget
({
action
:
"WriteCommunicationLog"
,
reqbody
:
{
BizId
:
pobj
.
actionBody
.
intentionBizId
,
Note
:
pobj
.
actionBody
.
note
},
apiVersion
:
"2019-05-08"
});
var
res
=
await
self
.
aliclient
.
reqbyget
({
action
:
"WriteCommunicationLog"
,
reqbody
:
{
BizId
:
pobj
.
actionBody
.
intentionBizId
,
Note
:
pobj
.
actionBody
.
note
},
apiVersion
:
"2019-05-08"
});
console
.
log
(
"res"
,
res
)
//推送交付系统
var
reqParams
=
{
actionBody
:
{
...
...
@@ -614,7 +615,7 @@ class UtilsNeedService extends AppServiceBase {
// 2020 0914 lin 新增 刷单一条龙服务
async
needBatchUpload
(
pobj
,
actionBody
)
{
var
BizIds
=
[]
;
var
BizIds
=
""
;
var
demands
=
[];
for
(
var
i
=
0
;
i
<
actionBody
.
demands
.
length
;
i
++
)
{
// 第一步
...
...
@@ -639,7 +640,8 @@ class UtilsNeedService extends AppServiceBase {
}
// 第二步
// 创建企服通需求单
var
npobj
=
pobj
;
var
objString
=
JSON
.
stringify
(
pobj
);
var
npobj
=
JSON
.
parse
(
objString
);
npobj
.
actionBody
=
{
intentionBizId
:
aliResult
.
data
.
BizId
,
type
:
this
.
bizTypeChange
(
actionBody
.
demands
[
i
].
type
),
...
...
@@ -650,7 +652,8 @@ class UtilsNeedService extends AppServiceBase {
console
.
log
(
"needBatchUpload-opResult"
,
opResult
)
// 第三步
// 提交Icp注册方案
var
spobj
=
pobj
;
var
sobjString
=
JSON
.
stringify
(
pobj
);
var
spobj
=
JSON
.
parse
(
sobjString
);
spobj
.
actionType
=
"submitIcpProgramme"
;
spobj
.
actionBody
=
{
"needNo"
:
aliResult
.
data
.
BizId
,
//渠道需求号
...
...
@@ -666,37 +669,43 @@ class UtilsNeedService extends AppServiceBase {
}
}
}
var
subRes
=
await
this
.
qcCenterOrderSve
.
submitIcpProgramme
(
pobj
);
var
subRes
=
await
this
.
qcCenterOrderSve
.
submitIcpProgramme
(
spobj
);
console
.
log
(
"----------------------------------start"
);
console
.
log
(
"needBatchUpload-res"
,
subRes
)
console
.
log
(
"----------------------------------end"
);
// 第四步
// 需求沟通记录接口
var
writeRes
=
await
this
.
writeCommunicationLog
({
actionBody
:{
intentionBizId
:
"20200804200124000001"
,
note
:
"测试反馈"
}});
console
.
log
(
"needBatchUpload-writeRes"
,
writeRes
)
// 整合前端需要的数据
BizIds
.
push
(
aliResult
.
data
.
BizId
)
// BizIds.push(aliResult.data.BizId)
BizIds
+=
aliResult
.
data
.
BizId
+
","
;
demands
.
push
({
uniqueCode
:
actionBody
.
demands
[
i
].
uniqueCode
,
demandCode
:
opResult
.
data
.
needNo
})
}
BizIds
=
BizIds
.
substr
(
0
,
BizIds
.
length
-
1
);
// 第五步 用户需求确认
var
aliConfirmResult
=
await
this
.
aliclient
.
reqbyget
({
action
:
"ConfirmIcpIntention"
,
reqbody
:
{
BizIds
:
BizIds
},
apiVersion
:
"2019-05-08"
});
console
.
log
(
"needBatchUpload-aliConfirmResult"
,
aliConfirmResult
)
// 获取链接失败
if
(
aliConfirmResult
.
status
!=
0
)
{
var
res
=
{
paymentLink
:
""
,
paymentLink
:
"
www.baidu.com
"
,
batchNumber
:
actionBody
.
batchNumber
,
demands
:
demands
}
return
system
.
getResultFail
(
-
5018
,
"confirmIcpIntention fail"
);
// return system.getResultRedisSuccess(res);
}
var
res
=
{
paymentLink
:
aliConfirmResult
.
c
onfirmUrl
,
paymentLink
:
aliConfirmResult
.
data
.
C
onfirmUrl
,
batchNumber
:
actionBody
.
batchNumber
,
demands
:
demands
}
return
system
.
getResultSuccess
(
res
);
// 2020 0916 lin 新增返回格式 成功status为1
return
system
.
getResultRedisSuccess
(
res
);
}
async
testsymq
(
pobj
)
{
var
a
=
null
;
...
...
center-channel/app/base/system.js
View file @
32d319a2
...
...
@@ -172,7 +172,15 @@ class System {
data
:
data
||
null
,
};
}
// 2020 0916 lin 新增返回格式 成功status为1
static
getResultRedisQueueSuccess
(
data
,
okmsg
=
"success"
)
{
return
{
status
:
1
,
msg
:
okmsg
,
data
:
data
||
null
,
};
}
/**
* 请求返回成功 自定义
* @param {*} data 操作成功返回的数据
...
...
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