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
f893f0dc
Commit
f893f0dc
authored
Aug 31, 2020
by
ilal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
20c25be5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
src/main/java/cn/timer/api/controller/crm/CrmController.java
+17
-12
No files found.
src/main/java/cn/timer/api/controller/crm/CrmController.java
View file @
f893f0dc
...
...
@@ -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,16 +417,20 @@ public class CrmController {
return
ResultUtil
.
error
(
"新增失败"
);
Integer
crmDataId
=
crmClientData
.
getId
();
Integer
[]
ids
=
crmClientData
.
getIds
();
for
(
Integer
id
:
ids
)
{
CrmClientAssociate
.
builder
().
cid
(
crmDataId
).
associateId
(
id
).
orgCode
(
getOrgCode
(
userBean
)).
build
().
insert
();
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
;
for
(
CrmClientContacts
crmClientContact
:
crmClientContacts
)
{
if
(
crmClientContact
.
getName
()
!=
null
)
{
crmClientContact
.
setCid
(
crmDataId
);
crmClientContact
.
insert
();
contactsnum
++;
if
(
crmClientContacts
!=
null
)
{
for
(
CrmClientContacts
crmClientContact
:
crmClientContacts
)
{
if
(
crmClientContact
.
getName
()
!=
null
)
{
crmClientContact
.
setCid
(
crmDataId
);
crmClientContact
.
insert
();
contactsnum
++;
}
}
}
crmClientData
.
setContactsNum
(
contactsnum
);
...
...
@@ -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