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
d7ce1dc1
Commit
d7ce1dc1
authored
Sep 01, 2020
by
王栋源
Browse files
Options
Browse Files
Download
Plain Diff
wdy
parents
7ea7454e
1c2fe25f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
42 deletions
+50
-42
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+50
-42
No files found.
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
d7ce1dc1
...
...
@@ -19,8 +19,8 @@ class UtilsNeedService extends AppServiceBase {
/**
* 提交需求
* @param {*} pobj
* @param {*} actionBody
* @param {*} pobj
* @param {*} actionBody
*/
async
submitNeed
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
intentionBizId
)
{
...
...
@@ -94,7 +94,7 @@ class UtilsNeedService extends AppServiceBase {
}
var
self
=
this
;
pobj
.
actionType
=
"receiveIcpFeedback"
;
// 2020 0803 lin 修改;
// 2020 0803 lin 修改;
if
(
pobj
.
intentionStatus
)
{
// 如果需求当前字段为5(已关闭)则通知fq
if
(
pobj
.
intentionStatus
==
5
)
{
...
...
@@ -148,7 +148,7 @@ class UtilsNeedService extends AppServiceBase {
/**
* 获取需求详情
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody needNo 需求号
*/
async
getItemByNeedNo
(
pobj
,
actionBody
)
{
...
...
@@ -161,7 +161,7 @@ class UtilsNeedService extends AppServiceBase {
}
/**
* 获取需求详情
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody needNo 需求号
*/
async
getItemByChannelNeedNo
(
pobj
,
actionBody
)
{
...
...
@@ -174,7 +174,7 @@ class UtilsNeedService extends AppServiceBase {
}
/**
* 获取需求详情
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody bizId 渠道方案号
*/
async
getItemByChannelSolutionNo
(
pobj
,
actionBody
)
{
...
...
@@ -187,8 +187,8 @@ class UtilsNeedService extends AppServiceBase {
}
/**
* 关闭需求
* @param {*} pobj
* @param {*} actionBody
* @param {*} pobj
* @param {*} actionBody
*/
async
needClose
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
intentionBizId
)
{
...
...
@@ -206,8 +206,8 @@ class UtilsNeedService extends AppServiceBase {
/**
* icp关闭需求
* @param {*} pobj
* @param {*} actionBody
* @param {*} pobj
* @param {*} actionBody
*/
async
needCloseIcp
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
channelNeedNo
)
{
...
...
@@ -492,8 +492,8 @@ class UtilsNeedService extends AppServiceBase {
/**
* 2020 0827 lin 新增 4.1 用户在公司宝前端提交需求
* @param {*} pobj
* @param {*} actionBody
* @param {*} pobj
* @param {*} actionBody
*/
async
submitIcpIntention
(
pobj
,
actionBody
)
{
// 校验文档上必填字段
...
...
@@ -522,8 +522,8 @@ class UtilsNeedService extends AppServiceBase {
/**
* 2020 0827 lin 新增 4.2 需求列表查询
* @param {*} pobj
* @param {*} actionBody
* @param {*} pobj
* @param {*} actionBody
*/
async
queryIntentionList
(
pobj
,
actionBody
)
{
var
aliResult
=
await
self
.
aliclient
.
reqbyget
({
action
:
"QueryIntentionList"
,
reqbody
:
actionBody
,
apiVersion
:
"2019-05-08"
});
...
...
@@ -536,8 +536,8 @@ class UtilsNeedService extends AppServiceBase {
/**
* 2020 0827 lin 新增 4.3 用户需求确认 未测试
* @param {*} pobj
* @param {*} actionBody
* @param {*} pobj
* @param {*} actionBody
*/
async
confirmIcpIntention
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
intentionBizId
)
{
...
...
@@ -559,37 +559,45 @@ class UtilsNeedService extends AppServiceBase {
// if (!pobj.actionBody.userFeedBack) {
// return system.getResult(null, "actionBody.userFeedBack can not be empty,100494");
// }
pobj
.
actionBody
.
data
=
[];
await
this
.
queryByAli
(
pobj
,
1
);
pobj
.
actionType
=
"getUnCreated"
;
let
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
let
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
if
(
result
.
status
==
0
)
{
pobj
.
actionBody
=
{
type
:
"tmjy"
};
for
(
let
item
of
result
.
data
){
pobj
.
actionBody
.
intentionBizId
=
item
.
BizId
;
pobj
.
actionBody
.
mobile
=
item
.
Mobile
?
item
.
Mobile
:
""
;
pobj
.
actionBody
.
userName
=
item
.
UserName
?
item
.
UserName
:
""
;
pobj
.
notes
=
`
${
item
.
RegisterNumber
?
"RegisterNumber:"
+
item
.
RegisterNumber
:
""
}${
item
.
Classification
?
"Classification:"
+
item
.
Classification
:
""
}
`
;
let
res
=
await
this
.
submitNeed
(
JSON
.
parse
(
JSON
.
stringify
(
pobj
)),{
intentionBizId
:
item
.
BizId
});
console
.
log
(
res
)
}
return
system
.
getResultSuccess
();
}
else
{
return
system
.
getResultFail
(
result
.
status
,
result
.
msg
);
}
return
system
.
getResultFail
(
res
.
status
,
res
.
msg
);
}
async
queryByAli
(
pobj
,
page
){
let
res
=
await
this
.
aliclient
.
reqbyget
({
action
:
"QueryTradeIntentionUserList"
,
reqbody
:
{
Begin
:
pobj
.
actionBody
.
Begin
?
pobj
.
actionBody
.
Begin
:
""
,
End
:
pobj
.
actionBody
.
End
?
pobj
.
actionBody
.
End
:
""
,
},
apiVersion
:
"2019-05-08"
action
:
"QueryTradeIntentionUserList"
,
reqbody
:
{
Begin
:
pobj
.
actionBody
.
Begin
?
pobj
.
actionBody
.
Begin
:
""
,
End
:
pobj
.
actionBody
.
End
?
pobj
.
actionBody
.
End
:
""
,
PageNum
:
page
,
PageSize
:
10
,
},
apiVersion
:
"2019-05-08"
});
if
(
res
.
status
==
0
)
{
pobj
.
actionType
=
"getUnCreated"
;
pobj
.
actionBody
.
data
=
res
.
data
.
Data
;
let
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
let
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
if
(
result
.
status
==
0
)
{
pobj
.
actionBody
=
{
type
:
"tmjy"
};
for
(
let
item
of
result
.
data
)
{
pobj
.
actionBody
.
intentionBizId
=
item
.
BizId
;
pobj
.
actionBody
.
mobile
=
item
.
Mobile
?
item
.
Mobile
:
""
;
pobj
.
actionBody
.
userName
=
item
.
UserName
?
item
.
UserName
:
""
;
pobj
.
notes
=
`
${
item
.
RegisterNumber
?
"RegisterNumber:"
+
item
.
RegisterNumber
:
""
}${
item
.
Classification
?
"Classification:"
+
item
.
Classification
:
""
}
`
;
let
res
=
await
this
.
submitNeed
(
JSON
.
parse
(
JSON
.
stringify
(
pobj
)),
{
intentionBizId
:
item
.
BizId
});
console
.
log
(
res
)
pobj
.
actionBody
.
data
.
push
(...
res
.
data
.
Data
);
if
(
page
<
res
.
data
.
TotalPageNum
){
await
this
.
queryByAli
(
pobj
,
page
+
1
)
}
return
system
.
getResultSuccess
();
}
else
{
return
system
.
getResultFail
(
result
.
status
,
result
.
msg
);
}
}
return
system
.
getResultFail
(
res
.
status
,
res
.
msg
);
}
}
async
testsymq
(
pobj
)
{
var
a
=
null
;
try
{
...
...
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