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
456c0fe7
Commit
456c0fe7
authored
Jun 12, 2020
by
邓实川
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试导入
parent
3c1ebcb7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
src/main/java/cn/timer/api/controller/crm/CrmController.java
+9
-11
No files found.
src/main/java/cn/timer/api/controller/crm/CrmController.java
View file @
456c0fe7
...
@@ -7,7 +7,6 @@
...
@@ -7,7 +7,6 @@
*/
*/
package
cn
.
timer
.
api
.
controller
.
crm
;
package
cn
.
timer
.
api
.
controller
.
crm
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Collections
;
...
@@ -369,9 +368,11 @@ public class CrmController {
...
@@ -369,9 +368,11 @@ public class CrmController {
if
(
oldData
.
getClientStatus
()
==
5
)
if
(
oldData
.
getClientStatus
()
==
5
)
return
ResultUtil
.
error
(
"请解封后继续编辑操作"
);
return
ResultUtil
.
error
(
"请解封后继续编辑操作"
);
List
<
CrmClientContacts
>
crmClientContacts
=
crmClientData
.
getCrmClientContacts
();
List
<
CrmClientContacts
>
crmClientContacts
=
crmClientData
.
getCrmClientContacts
();
if
(
crmClientContacts
!=
null
)
{
for
(
CrmClientContacts
crmClientContact
:
crmClientContacts
)
{
for
(
CrmClientContacts
crmClientContact
:
crmClientContacts
)
{
crmClientContact
.
updateById
();
crmClientContact
.
updateById
();
}
}
}
List
<
CrmClientAssociate
>
oldAssociates
=
CrmClientAssociate
.
builder
().
build
()
List
<
CrmClientAssociate
>
oldAssociates
=
CrmClientAssociate
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
CrmClientAssociate
>().
lambda
().
eq
(
CrmClientAssociate:
:
getCid
,
cid
));
.
selectList
(
new
QueryWrapper
<
CrmClientAssociate
>().
lambda
().
eq
(
CrmClientAssociate:
:
getCid
,
cid
));
List
<
Integer
>
oldIdsList
=
oldAssociates
.
stream
().
map
(
CrmClientAssociate:
:
getAssociateId
)
List
<
Integer
>
oldIdsList
=
oldAssociates
.
stream
().
map
(
CrmClientAssociate:
:
getAssociateId
)
...
@@ -483,7 +484,8 @@ public class CrmController {
...
@@ -483,7 +484,8 @@ public class CrmController {
if
(
type
==
null
||
type
==
0
)
{
// 全部客户(去重)
if
(
type
==
null
||
type
==
0
)
{
// 全部客户(去重)
List
<
CrmClientData
>
myClient
=
getMyCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
);
List
<
CrmClientData
>
myClient
=
getMyCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
);
List
<
CrmClientData
>
myAsso
=
getMyAssociateCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
);
List
<
CrmClientData
>
myAsso
=
getMyAssociateCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
);
crmClientDatas
=
CheckUtil
.
distinct
(
myClient
,
myAsso
,
true
);
crmClientDatas
=
CheckUtil
.
distinct
(
myClient
,
myAsso
,
true
).
stream
()
.
filter
(
CheckUtil
.
distinctByKey
(
CrmClientData:
:
getId
)).
collect
(
Collectors
.
toList
());
}
else
if
(
type
==
1
)
// 我负责的客户
}
else
if
(
type
==
1
)
// 我负责的客户
crmClientDatas
=
getMyCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
);
crmClientDatas
=
getMyCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
);
else
if
(
type
==
2
)
// 我协作的客户
else
if
(
type
==
2
)
// 我协作的客户
...
@@ -930,7 +932,7 @@ public class CrmController {
...
@@ -930,7 +932,7 @@ public class CrmController {
for
(
Integer
memberId
:
members
)
{
for
(
Integer
memberId
:
members
)
{
Map
<
String
,
Object
>
map
=
selectMap
(
orgCode
,
memberId
,
status
,
startCreateTime
,
endCreateTime
);
Map
<
String
,
Object
>
map
=
selectMap
(
orgCode
,
memberId
,
status
,
startCreateTime
,
endCreateTime
);
if
(
memberId
.
equals
(
12414
))
{
if
(
memberId
.
equals
(
12414
))
{
System
.
err
.
println
(
"map++"
+
map
);
System
.
err
.
println
(
"map++"
+
map
);
}
}
if
((
Integer
)
map
.
get
(
"num"
)
>
0
)
{
if
((
Integer
)
map
.
get
(
"num"
)
>
0
)
{
list
.
add
(
map
);
list
.
add
(
map
);
...
@@ -1049,22 +1051,18 @@ public class CrmController {
...
@@ -1049,22 +1051,18 @@ public class CrmController {
Integer
orgCode
=
getOrgCode
(
userBean
);
Integer
orgCode
=
getOrgCode
(
userBean
);
String
filePath
=
null
;
String
filePath
=
null
;
String
time
=
null
;
try
{
try
{
File
savefile
=
new
File
(
realPath
);
time
=
DateUtil
.
format
(
new
Date
(),
"yyyyMMddHHmmssSSS"
);
// File savefile = new File("excel/");
if
(!
savefile
.
exists
())
{
savefile
.
mkdirs
();
}
String
time
=
DateUtil
.
format
(
new
Date
(),
"yyyyMMddHHmmssSSS"
);
filePath
=
FileHelper
.
downLoadFromUrl
(
url
,
time
+
".xls"
,
realPath
);
filePath
=
FileHelper
.
downLoadFromUrl
(
url
,
time
+
".xls"
,
realPath
);
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
System
.
err
.
println
();
// 从文件中读取Excel为ExcelReader
// 从文件中读取Excel为ExcelReader
ExcelReader
reader
;
ExcelReader
reader
;
// 从流中读取Excel为ExcelReader(比如从ClassPath中读取Excel文件)
// 从流中读取Excel为ExcelReader(比如从ClassPath中读取Excel文件)
reader
=
ExcelUtil
.
getReader
(
ResourceUtil
.
getStream
(
filePath
));
reader
=
ExcelUtil
.
getReader
(
ResourceUtil
.
getStream
(
"crm-excel/"
+
time
+
".xls"
));
reader
.
addHeaderAlias
(
"*客户名称(必填)"
,
"clientName"
);
reader
.
addHeaderAlias
(
"*客户名称(必填)"
,
"clientName"
);
reader
.
addHeaderAlias
(
"*所属分组(必填)"
,
"belongGroupName"
);
reader
.
addHeaderAlias
(
"*所属分组(必填)"
,
"belongGroupName"
);
reader
.
addHeaderAlias
(
"行业"
,
"industryName"
);
reader
.
addHeaderAlias
(
"行业"
,
"industryName"
);
...
...
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