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
4e6cf107
Commit
4e6cf107
authored
Feb 11, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
policy notes
parent
b739a44e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
2 deletions
+44
-2
center-order/app/base/api/impl/action/policy.js
+1
-1
center-order/app/base/service/impl/dbpolicy/policyneedSve.js
+43
-1
No files found.
center-order/app/base/api/impl/action/policy.js
View file @
4e6cf107
...
...
@@ -47,7 +47,7 @@ class PolicyAPI extends APIBase {
opResult
=
this
.
policyneedSve
.
getPolicyNeedList
(
pobj
);
break
;
case
"submitPolicyNeedNotes"
:
//申请信息备注提交
opResult
=
system
.
getResult
(
null
,
"接口开发中"
);
opResult
=
this
.
policyneedSve
.
submitPolicyNeedNotes
(
pobj
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
...
...
center-order/app/base/service/impl/dbpolicy/policyneedSve.js
View file @
4e6cf107
...
...
@@ -24,7 +24,7 @@ class PolicyneedService extends ServiceBase {
if
(
policyinfo
&&
policyinfo
.
id
){
paramObj
[
"policySnapshot"
]
=
JSON
.
stringify
(
policyinfo
);
paramObj
[
"policy_id"
]
=
obj
.
policy_id
;
paramObj
[
"policyName"
]
=
policyinfo
.
policyName
;
//
paramObj["policyName"] = policyinfo.policyName;
}
}
paramObj
[
"contacts"
]
=
obj
.
contacts
;
...
...
@@ -90,5 +90,47 @@ class PolicyneedService extends ServiceBase {
result
.
dataCount
=
tmpResultCount
&&
tmpResultCount
.
length
>
0
?
tmpResultCount
[
0
].
dataCount
:
0
;
return
result
;
}
//需求备注提交
async
submitPolicyNeedNotes
(
pobj
){
var
user
=
pobj
.
userInfo
;
var
app
=
pobj
.
appInfo
;
var
obj
=
pobj
.
actionBody
||
{};
if
(
!
user
||
!
user
.
channel_userid
){
return
system
.
getResult
(
null
,
"未知用户"
);
}
if
(
!
obj
.
needId
){
return
system
.
getResult
(
null
,
"需求id不能为空"
);
}
if
(
!
obj
.
customerIntention
){
return
system
.
getResult
(
null
,
"客户意向不能为空"
);
}
if
(
!
obj
.
intentionContent
){
return
system
.
getResult
(
null
,
"意向内容不能为空"
);
}
var
policyneed
=
await
this
.
dao
.
model
.
findOne
({
where
:{
id
:
obj
.
needId
,
uapp_id
:
app
.
uapp_id
},
raw
:
true
});
if
(
!
policyneed
||
!
policyneed
.
id
){
return
system
.
getResult
(
null
,
"未知政策需求"
);
}
if
(
policyneed
.
popularizeUserCode
!=
user
.
channel_userid
){
return
system
.
getResult
(
null
,
"非法操作,只能修改本人数据"
);
}
var
paramObj
=
{
id
:
obj
.
needId
,
customerIntention
:
obj
.
customerIntention
};
var
noteparam
=
{
customerIntention
:
obj
.
customerIntention
,
intentionContent
:
obj
.
intentionContent
,
submitDate
:
new
Date
()};
if
(
policyneed
.
opNotes
){
var
notes
=
JSON
.
parse
(
policyneed
.
opNotes
);
var
noteList
=
notes
.
data
;
noteList
.
push
(
noteparam
);
paramObj
[
"opNotes"
]
=
JSON
.
stringify
({
data
:
noteList
});
}
else
{
paramObj
[
"opNotes"
]
=
JSON
.
stringify
({
data
:[
noteparam
]});
}
var
newPolicyNeed
=
await
this
.
dao
.
update
(
paramObj
);
return
system
.
getResultSuccess
();
}
}
module
.
exports
=
PolicyneedService
;
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