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
a57d946f
Commit
a57d946f
authored
Jun 24, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
33e1c5fc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
9 deletions
+11
-9
xggsve-chance/app/base/db/models/chance/cscheme.js
+1
-0
xggsve-chance/app/base/service/impl/chance/cclueSve.js
+9
-9
xggsve-chance/app/base/service/impl/chance/cschemeSve.js
+1
-0
No files found.
xggsve-chance/app/base/db/models/chance/cscheme.js
View file @
a57d946f
...
...
@@ -12,6 +12,7 @@ module.exports = (db, DataTypes) => {
service_ids
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
defaultValue
:
"0"
,
COMMENT
:
'服务IDs'
},
business_type
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
defaultValue
:
""
,
COMMENT
:
'经营范围'
},
businessscope
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
defaultValue
:
""
,
COMMENT
:
'经营范围详情'
},
business_type_id
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
defaultValue
:
""
,
COMMENT
:
'经营范围ID'
},
remarks
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
defaultValue
:
""
,
COMMENT
:
'备注'
},
},
{
paranoid
:
true
,
//假的删除
...
...
xggsve-chance/app/base/service/impl/chance/cclueSve.js
View file @
a57d946f
...
...
@@ -44,6 +44,8 @@ class CclueService extends ServiceBase {
id
:
cclueBean
.
id
,
clue_type_name
:
clue_properties
.
clue_type_name
,
deliver_id
:
clue_properties
.
deliver_id
,
legal_name
:
clue_properties
.
contacts
,
legal_mobile
:
clue_properties
.
contact_mobile
,
};
await
this
.
cschemeDao
.
create
(
scheme_properties
,
t
);
});
...
...
@@ -173,7 +175,7 @@ class CclueService extends ServiceBase {
if
(
clueIds
&&
clueIds
.
length
>
0
){
cschemeArrayList
=
await
this
.
cfollowlogDao
.
listFollowlogsByClueIds
({
clueIds
:
clueIds
});
for
(
let
item
of
cschemeArrayList
)
{
this
.
handleDate
(
item
,
[
"created_at"
],
null
,
null
);
this
.
handleDate
(
item
,
[
"created_at"
,
"follow_date"
],
null
,
null
);
if
(
!
cschemeMap
[
item
.
clue_id
]){
cschemeMap
[
item
.
clue_id
]
=
[];
}
...
...
@@ -261,21 +263,19 @@ class CclueService extends ServiceBase {
if
(
!
cclueBean
){
return
system
.
getResult
(
null
,
`线索不存在`
);
}
this
.
handleDate
(
cclueBean
,
[
"created_at"
],
null
,
null
);
//查询方案
let
cschemeBean
=
await
this
.
cschemeDao
.
getById
(
cclueBean
.
id
)
||
{};
this
.
handleDate
(
cschemeBean
,
[
"created_at"
],
null
,
null
);
cclueBean
.
cscheme
Bean
=
cschemeBean
;
cclueBean
.
cscheme
=
cschemeBean
;
cclueBean
.
cschemeIsShow
=
cschemeBean
.
name
?
true
:
false
;
//查询跟踪记录
let
cfollowlog
=
await
this
.
cfollowlogDao
.
followlogsByClueIds
({
clue_id
:
cschemeBean
.
id
});
for
(
let
item
in
cfollowlog
){
for
(
let
key
in
cschemeMap
)
{
this
.
handleDate
(
cschemeMap
[
key
],
[
"created_at"
],
null
,
null
);
}
let
cfollowlog
=
await
this
.
cfollowlogDao
.
listFollowlogsByClueIds
({
clue_id
:
cschemeBean
.
id
});
for
(
let
item
of
cfollowlog
){
this
.
handleDate
(
item
,
[
"created_at"
,
"follow_date"
],
null
,
null
);
}
cclueBean
.
cfollowlog
=
cfollowlog
[
cclueBean
.
id
]
||
[];
cclueBean
.
cfollowlog
=
cfollowlog
||
[];
cclueBean
.
cfollowlogIsShow
=
cclueBean
.
cfollowlog
.
length
>
0
?
true
:
false
;
return
system
.
getResult
(
cclueBean
);
}
catch
(
e
)
{
...
...
xggsve-chance/app/base/service/impl/chance/cschemeSve.js
View file @
a57d946f
...
...
@@ -74,6 +74,7 @@ class CschemeService extends ServiceBase {
service_ids
:
this
.
trim
(
params
.
service_ids
)
,
business_type
:
this
.
trim
(
params
.
business_type
),
businessscope
:
this
.
trim
(
params
.
businessscope
),
business_type_id
:
this
.
trim
(
params
.
business_type_id
)
||
""
,
remarks
:
this
.
trim
(
params
.
remarks
)
||
""
};
await
this
.
db
.
transaction
(
async
t
=>
{
...
...
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