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
3e17e4e2
Commit
3e17e4e2
authored
Aug 27, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
submitIcpIntention,queryIntentionList,confirmIcpIntention add
parent
d12bcb68
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
0 deletions
+77
-0
center-order/app/base/api/impl/action/need.js
+9
-0
center-order/app/base/service/impl/dbneed/needinfoSve.js
+68
-0
No files found.
center-order/app/base/api/impl/action/need.js
View file @
3e17e4e2
...
@@ -51,6 +51,15 @@ class IcAPI extends APIBase {
...
@@ -51,6 +51,15 @@ class IcAPI extends APIBase {
case
"writeCommunicationLog"
:
//渠道方案号获取需求详情
case
"writeCommunicationLog"
:
//渠道方案号获取需求详情
opResult
=
await
this
.
needinfoSve
.
writeCommunicationLog
(
pobj
,
pobj
.
actionBody
,
req
);
opResult
=
await
this
.
needinfoSve
.
writeCommunicationLog
(
pobj
,
pobj
.
actionBody
,
req
);
break
;
break
;
case
"submitIcpIntention"
:
// 2020 0827 lin 新增 4.1 提交需求
opResult
=
await
this
.
needinfoSve
.
submitIcpIntention
(
pobj
,
pobj
.
actionBody
,
req
);
break
;
case
"queryIntentionList"
:
// 2020 0827 lin 新增 4.2 需求列表查询
opResult
=
await
this
.
needinfoSve
.
queryIntentionList
(
pobj
,
pobj
.
actionBody
,
req
);
break
;
case
"confirmIcpIntention"
:
// 2020 0827 lin 新增 4.3 用户需求确认
opResult
=
await
this
.
needinfoSve
.
confirmIcpIntention
(
pobj
,
pobj
.
actionBody
,
req
);
break
;
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
break
;
...
...
center-order/app/base/service/impl/dbneed/needinfoSve.js
View file @
3e17e4e2
...
@@ -224,6 +224,74 @@ class NeedinfoService extends ServiceBase {
...
@@ -224,6 +224,74 @@ class NeedinfoService extends ServiceBase {
return
system
.
getResult
(
"添加记录失败"
);
return
system
.
getResult
(
"添加记录失败"
);
}
}
}
}
async
submitIcpIntention
(
pobj
,
actionBody
,
req
)
{
var
needNo
=
await
this
.
getBusUid
(
"n"
);
var
nobj
=
{
uapp_id
:
pobj
.
appInfo
.
uapp_id
,
needNo
:
needNo
,
channelUserId
:
pobj
.
userInfo
.
channel_userid
,
publishName
:
actionBody
.
UserName
,
publishContent
:
actionBody
.
Description
,
publishMobile
:
actionBody
.
Mobile
,
city
:
actionBody
.
Area
,
typeCode
:
actionBody
.
type_code
,
typeName
:
actionBody
.
type_name
,
channelTypeCode
:
actionBody
.
channel_type_code
,
channelTypeName
:
actionBody
.
channel_type_name
,
status
:
"wts"
}
if
(
nobj
.
channelTypeCode
==
7
||
nobj
.
channelTypeCode
==
5
)
{
nobj
.
province
=
nobj
.
city
,
nobj
.
city
=
""
;
}
await
this
.
dao
.
create
(
nobj
);
return
system
.
getResultSuccess
();
}
async
queryIntentionList
(
pobj
,
actionBody
,
req
)
{
if
(
!
actionBody
.
intentionBizId
)
{
return
system
.
getResultFail
(
-
5005
,
"intentionBizId不能为空"
);
}
var
needinfo
=
await
this
.
findOne
({
channelNeedNo
:
actionBody
.
intentionBizId
});
if
(
!
needinfo
)
{
return
system
.
getResultFail
(
-
5004
,
"需求不存在"
);
}
if
(
needinfo
.
status
==
"ygb"
||
needinfo
.
status
==
"ycd"
)
{
return
system
.
getResultSuccess
();
}
else
{
needinfo
.
status
=
"ygb"
;
// 2020 0821 lin 新增 修改增加 跟进者唯一码(非必填),跟进者手机号(必填)
needinfo
.
followManMobile
=
actionBody
.
followManMobile
;
needinfo
.
followManUserId
=
actionBody
.
followManUserId
;
var
self
=
this
;
await
self
.
update
(
needinfo
.
dataValues
);
await
self
.
needsolutionSve
.
abolishProgrammeByNeed
(
pobj
);
return
system
.
getResultSuccess
();
}
}
async
confirmIcpIntention
(
pobj
,
actionBody
,
req
)
{
if
(
!
actionBody
.
intentionBizId
)
{
return
system
.
getResultFail
(
-
5005
,
"intentionBizId不能为空"
);
}
var
needinfo
=
await
this
.
findOne
({
channelNeedNo
:
actionBody
.
intentionBizId
});
if
(
!
needinfo
)
{
return
system
.
getResultFail
(
-
5004
,
"需求不存在"
);
}
if
(
needinfo
.
status
==
"ygb"
||
needinfo
.
status
==
"ycd"
)
{
return
system
.
getResultSuccess
();
}
else
{
needinfo
.
status
=
"ygb"
;
// 2020 0821 lin 新增 修改增加 跟进者唯一码(非必填),跟进者手机号(必填)
needinfo
.
followManMobile
=
actionBody
.
followManMobile
;
needinfo
.
followManUserId
=
actionBody
.
followManUserId
;
var
self
=
this
;
await
self
.
update
(
needinfo
.
dataValues
);
await
self
.
needsolutionSve
.
abolishProgrammeByNeed
(
pobj
);
return
system
.
getResultSuccess
();
}
}
}
}
module
.
exports
=
NeedinfoService
;
module
.
exports
=
NeedinfoService
;
...
...
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