Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
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
8timerv2
8timerapiv200
Commits
7ae183ac
Commit
7ae183ac
authored
Aug 31, 2020
by
leialin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lal' into 'develop'
提交 See merge request 8timerv2/8timerapiv200!466
parents
092c78de
f893f0dc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
src/main/java/cn/timer/api/controller/crm/CrmController.java
+10
-5
No files found.
src/main/java/cn/timer/api/controller/crm/CrmController.java
View file @
7ae183ac
...
...
@@ -401,15 +401,15 @@ public class CrmController {
Integer
clientSource
=
crmClientData
.
getClientSource
();
Integer
clientType
=
crmClientData
.
getClientType
();
Integer
industry
=
crmClientData
.
getIndustry
();
if
(
clientSource
!=
null
)
{
if
(
clientSource
!=
null
&&
clientSource
>
0
)
{
String
clientSourceName
=
ClientSourceClass
.
builder
().
id
(
clientSource
).
build
().
selectById
().
getName
();
// 客户来源
crmClientData
.
setClientSourceName
(
clientSourceName
);
}
if
(
clientType
!=
null
)
{
if
(
clientType
!=
null
&&
clientType
>
0
)
{
String
clientTypeName
=
ClientTypeClass
.
builder
().
id
(
clientType
).
build
().
selectById
().
getName
();
// 客户类型
crmClientData
.
setClientTypeName
(
clientTypeName
);
}
if
(
industry
!=
null
)
{
if
(
industry
!=
null
&&
industry
>
0
)
{
String
industryName
=
IndustryClass
.
builder
().
id
(
industry
).
build
().
selectById
().
getName
();
// 行业名
crmClientData
.
setIndustryName
(
industryName
);
}
...
...
@@ -417,11 +417,14 @@ public class CrmController {
return
ResultUtil
.
error
(
"新增失败"
);
Integer
crmDataId
=
crmClientData
.
getId
();
Integer
[]
ids
=
crmClientData
.
getIds
();
if
(
ids
!=
null
)
{
for
(
Integer
id
:
ids
)
{
CrmClientAssociate
.
builder
().
cid
(
crmDataId
).
associateId
(
id
).
orgCode
(
getOrgCode
(
userBean
)).
build
().
insert
();
}
}
List
<
CrmClientContacts
>
crmClientContacts
=
crmClientData
.
getCrmClientContacts
();
int
contactsnum
=
0
;
if
(
crmClientContacts
!=
null
)
{
for
(
CrmClientContacts
crmClientContact
:
crmClientContacts
)
{
if
(
crmClientContact
.
getName
()
!=
null
)
{
crmClientContact
.
setCid
(
crmDataId
);
...
...
@@ -429,6 +432,7 @@ public class CrmController {
contactsnum
++;
}
}
}
crmClientData
.
setContactsNum
(
contactsnum
);
crmClientData
.
updateById
();
return
ResultUtil
.
success
(
"新增成功"
);
...
...
@@ -474,6 +478,7 @@ public class CrmController {
CrmClientAssociate
.
builder
().
cid
(
cid
).
associateId
(
id
).
orgCode
(
getOrgCode
(
userBean
)).
build
().
insert
();
}
crmClientData
.
setModifyUser
(
getEmpNum
(
userBean
));
crmClientData
.
setOrgCode
(
userBean
.
getOrgCode
());
if
(
crmClientData
.
updateById
())
return
ResultUtil
.
success
(
"编辑成功"
);
return
ResultUtil
.
error
(
"编辑失败"
);
...
...
@@ -1462,7 +1467,7 @@ public class CrmController {
}
crmClientData
.
setClientStatus
(
1
);
if
(
linkname
!=
null
)
{
if
(
!(
""
).
equals
(
linkname
)
&&
linkname
!=
null
)
{
crmClientData
.
setContactsNum
(
1
);
}
crmClientData
.
setBelongUser
(
empNum
);
...
...
@@ -1487,7 +1492,7 @@ public class CrmController {
Integer
cid
=
crmClientData
.
getId
();
if
(
linkname
!=
null
)
{
if
(
!(
""
).
equals
(
linkname
)
&&
linkname
!=
null
)
{
CrmClientContacts
contacts
=
new
CrmClientContacts
();
contacts
.
setName
(
linkname
);
contacts
.
setCellphone
(
linkcellphone
);
...
...
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