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
91263a4c
Commit
91263a4c
authored
Aug 20, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
writeCommunicationLog update status ook
parent
fd549e65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
center-order/app/base/service/impl/dbneed/needinfoSve.js
+15
-4
No files found.
center-order/app/base/service/impl/dbneed/needinfoSve.js
View file @
91263a4c
...
@@ -177,18 +177,29 @@ class NeedinfoService extends ServiceBase {
...
@@ -177,18 +177,29 @@ class NeedinfoService extends ServiceBase {
async
writeCommunicationLog
(
pobj
,
actionBody
)
{
async
writeCommunicationLog
(
pobj
,
actionBody
)
{
// 查询需求沟通记录
// 查询需求沟通记录
actionBody
.
Note
=
[
"noteTime"
,
moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
),
"note"
,
actionBody
.
Note
];
// 2020 0820 lin 修改channel传过来的参数 为 note/intentionBizId
let
needRes
=
await
this
.
findOne
({
channelNeedNo
:
actionBody
.
BizId
});
actionBody
.
Note
=
[
"noteTime"
,
moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
),
"note"
,
actionBody
.
note
];
let
needRes
=
await
this
.
findOne
({
channelNeedNo
:
actionBody
.
intentionBizId
});
// 没有需求单直接返回
// 没有需求单直接返回
if
(
!
needRes
)
{
if
(
!
needRes
)
{
return
system
.
getResult
(
"没有这个需求单"
);
return
system
.
getResult
(
"没有这个需求单"
);
}
}
// 如果未推送/以推送 修改为已跟进
if
(
needRes
.
status
==
"wts"
||
needRes
.
status
==
"yts"
)
{
var
sql
=
"update n_need_info set status=:status, statusName=:statusName where channelNeedNo=:BizId"
var
paramWhere
=
{
statusName
:
'已跟进'
,
status
:
'ygj'
,
BizId
:
actionBody
.
intentionBizId
};
var
updateRes
=
await
this
.
customUpdate
(
sql
,
paramWhere
);
}
// 有需求单但没有沟通记录 直接set
// 有需求单但没有沟通记录 直接set
if
(
!
needRes
.
followContent
)
{
if
(
!
needRes
.
followContent
)
{
var
sql
=
"update n_need_info set followContent=JSON_OBJECT(:followContent) where channelNeedNo=:BizId"
var
sql
=
"update n_need_info set followContent=JSON_OBJECT(:followContent) where channelNeedNo=:BizId"
var
paramWhere
=
{
var
paramWhere
=
{
followContent
:
actionBody
.
Note
,
followContent
:
actionBody
.
Note
,
BizId
:
actionBody
.
BizId
BizId
:
actionBody
.
intention
BizId
};
};
var
updateRes
=
await
this
.
customUpdate
(
sql
,
paramWhere
);
var
updateRes
=
await
this
.
customUpdate
(
sql
,
paramWhere
);
if
(
updateRes
[
1
])
{
if
(
updateRes
[
1
])
{
...
@@ -201,7 +212,7 @@ class NeedinfoService extends ServiceBase {
...
@@ -201,7 +212,7 @@ class NeedinfoService extends ServiceBase {
// var sql = "update n_need_info set followContent=json_array_append(followContent, '$', "+ "\"" + JSON.stringify(actionBody.Note) + "\""+") where channelNeedNo="+ "\"" +actionBody.BizId +"\"" +" "
// var sql = "update n_need_info set followContent=json_array_append(followContent, '$', "+ "\"" + JSON.stringify(actionBody.Note) + "\""+") where channelNeedNo="+ "\"" +actionBody.BizId +"\"" +" "
var
paramWhere
=
{
var
paramWhere
=
{
Note
:
actionBody
.
Note
,
Note
:
actionBody
.
Note
,
BizId
:
actionBody
.
BizId
BizId
:
actionBody
.
intention
BizId
};
};
var
updateRes
=
await
this
.
customUpdate
(
sql
,
paramWhere
);
var
updateRes
=
await
this
.
customUpdate
(
sql
,
paramWhere
);
if
(
updateRes
[
1
])
{
if
(
updateRes
[
1
])
{
...
...
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