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
6194744f
Commit
6194744f
authored
Jun 12, 2020
by
dengshichuan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dsc' into 'develop'
Dsc See merge request 8timerv2/8timerapiv200!180
parents
80098e01
662edd6c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
13 deletions
+26
-13
src/main/java/cn/timer/api/controller/crm/CrmController.java
+22
-9
src/main/resources/application-pro.yml
+2
-2
src/main/resources/application-test.yml
+2
-2
No files found.
src/main/java/cn/timer/api/controller/crm/CrmController.java
View file @
6194744f
...
@@ -256,11 +256,23 @@ public class CrmController {
...
@@ -256,11 +256,23 @@ public class CrmController {
@GetMapping
(
"getBusinessGroupId"
)
@GetMapping
(
"getBusinessGroupId"
)
@ApiOperation
(
value
=
"获取业务组列表(id,name)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"获取业务组列表(id,name)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
getBusinessGroupId
(
@CurrentUser
UserBean
userBean
)
{
public
Result
<
Object
>
getBusinessGroupId
(
@CurrentUser
UserBean
userBean
)
{
return
ResultUtil
.
data
(
CrmBusinessGroup
.
builder
().
build
()
Integer
empNum
=
getEmpNum
(
userBean
);
.
selectList
(
new
LambdaQueryWrapper
<
CrmBusinessGroup
>()
List
<
CrmBusinessGroupMember
>
list
=
CrmBusinessGroupMember
.
builder
().
build
()
.
eq
(
CrmBusinessGroup:
:
getOrgCode
,
getOrgCode
(
userBean
))
.
selectList
(
new
LambdaQueryWrapper
<
CrmBusinessGroupMember
>()
.
select
(
CrmBusinessGroup:
:
getId
,
CrmBusinessGroup:
:
getName
)),
.
eq
(
CrmBusinessGroupMember:
:
getEmpNum
,
empNum
).
select
(
CrmBusinessGroupMember:
:
getGid
));
"获取成功"
);
List
<
Integer
>
gids
=
list
.
stream
().
map
(
CrmBusinessGroupMember:
:
getGid
).
collect
(
Collectors
.
toList
()).
stream
()
.
distinct
().
collect
(
Collectors
.
toList
());
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<
Map
<
String
,
Object
>>();
for
(
Integer
gid
:
gids
)
{
System
.
err
.
println
(
gid
);
String
name
=
CrmBusinessGroup
.
builder
().
build
().
selectOne
(
new
LambdaQueryWrapper
<
CrmBusinessGroup
>()
.
eq
(
CrmBusinessGroup:
:
getId
,
gid
).
select
(
CrmBusinessGroup:
:
getName
)).
getName
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"id"
,
gid
);
map
.
put
(
"name"
,
name
);
result
.
add
(
map
);
}
return
ResultUtil
.
data
(
result
,
"获取成功"
);
}
}
// @GetMapping("getBusinessGroupMembers")
// @GetMapping("getBusinessGroupMembers")
...
@@ -304,6 +316,7 @@ public class CrmController {
...
@@ -304,6 +316,7 @@ public class CrmController {
public
Result
<
Object
>
addClient
(
@CurrentUser
UserBean
userBean
,
@RequestBody
CrmClientData
crmClientData
)
{
public
Result
<
Object
>
addClient
(
@CurrentUser
UserBean
userBean
,
@RequestBody
CrmClientData
crmClientData
)
{
Integer
empNum
=
getEmpNum
(
userBean
);
Integer
empNum
=
getEmpNum
(
userBean
);
Integer
orgCode
=
getOrgCode
(
userBean
);
Integer
orgCode
=
getOrgCode
(
userBean
);
crmClientData
.
setClientStatus
(
1
);
crmClientData
.
setCreateUser
(
empNum
);
crmClientData
.
setCreateUser
(
empNum
);
SysRegion
district
=
getSysRegion
(
crmClientData
.
getDistrictId
());
SysRegion
district
=
getSysRegion
(
crmClientData
.
getDistrictId
());
// crmClientData.setZipCode(district.getZipCode());
// crmClientData.setZipCode(district.getZipCode());
...
@@ -702,7 +715,7 @@ public class CrmController {
...
@@ -702,7 +715,7 @@ public class CrmController {
crmClientData
.
updateById
();
crmClientData
.
updateById
();
return
ResultUtil
.
success
(
"封档成功"
);
return
ResultUtil
.
success
(
"封档成功"
);
}
else
if
(
status
==
5
)
{
}
else
if
(
status
==
5
)
{
crmClientData
.
setClientStatus
(
0
);
// 解封后默认无状态
//
crmClientData.setClientStatus(0); // 解封后默认无状态
crmClientData
.
updateById
();
crmClientData
.
updateById
();
return
ResultUtil
.
success
(
"解封成功"
);
return
ResultUtil
.
success
(
"解封成功"
);
}
else
}
else
...
@@ -1053,7 +1066,7 @@ public class CrmController {
...
@@ -1053,7 +1066,7 @@ public class CrmController {
String
filePath
=
null
;
String
filePath
=
null
;
String
time
=
null
;
String
time
=
null
;
try
{
try
{
time
=
DateUtil
.
format
(
new
Date
(),
"yyyyMMddHHmmssSSS"
);
time
=
DateUtil
.
format
(
new
Date
(),
"yyyyMMddHHmmssSSS"
);
filePath
=
FileHelper
.
downLoadFromUrl
(
url
,
time
+
".xls"
,
realPath
);
filePath
=
FileHelper
.
downLoadFromUrl
(
url
,
time
+
".xls"
,
realPath
);
System
.
err
.
println
(
filePath
);
System
.
err
.
println
(
filePath
);
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
...
@@ -1062,7 +1075,7 @@ public class CrmController {
...
@@ -1062,7 +1075,7 @@ public class CrmController {
// 从文件中读取Excel为ExcelReader
// 从文件中读取Excel为ExcelReader
ExcelReader
reader
;
ExcelReader
reader
;
// 从流中读取Excel为ExcelReader(比如从ClassPath中读取Excel文件)
// 从流中读取Excel为ExcelReader(比如从ClassPath中读取Excel文件)
reader
=
ExcelUtil
.
getReader
(
ResourceUtil
.
getStream
(
"/data/"
+
filePath
));
reader
=
ExcelUtil
.
getReader
(
ResourceUtil
.
getStream
(
filePath
));
reader
.
addHeaderAlias
(
"*客户名称(必填)"
,
"clientName"
);
reader
.
addHeaderAlias
(
"*客户名称(必填)"
,
"clientName"
);
reader
.
addHeaderAlias
(
"*所属分组(必填)"
,
"belongGroupName"
);
reader
.
addHeaderAlias
(
"*所属分组(必填)"
,
"belongGroupName"
);
reader
.
addHeaderAlias
(
"行业"
,
"industryName"
);
reader
.
addHeaderAlias
(
"行业"
,
"industryName"
);
...
@@ -1133,7 +1146,7 @@ public class CrmController {
...
@@ -1133,7 +1146,7 @@ public class CrmController {
crmClientData
.
setClientType
(
clientTypeClass
.
getId
());
crmClientData
.
setClientType
(
clientTypeClass
.
getId
());
}
}
crmClientData
.
setClientStatus
(
0
);
crmClientData
.
setClientStatus
(
1
);
crmClientData
.
setContactsNum
(
1
);
crmClientData
.
setContactsNum
(
1
);
crmClientData
.
setBelongUser
(
empNum
);
crmClientData
.
setBelongUser
(
empNum
);
crmClientData
.
setBelongUserName
(
getEmpName
(
orgCode
,
empNum
));
crmClientData
.
setBelongUserName
(
getEmpName
(
orgCode
,
empNum
));
...
...
src/main/resources/application-pro.yml
View file @
6194744f
...
@@ -175,4 +175,4 @@ config-8timer:
...
@@ -175,4 +175,4 @@ config-8timer:
# 客户管理导入服务器保存路径
# 客户管理导入服务器保存路径
crm-excel
:
crm-excel
:
realPath
:
'
crm-excel/'
realPath
:
'
/data/crm-excel/'
\ No newline at end of file
\ No newline at end of file
src/main/resources/application-test.yml
View file @
6194744f
...
@@ -174,4 +174,4 @@ config-8timer:
...
@@ -174,4 +174,4 @@ config-8timer:
# 客户管理导入服务器保存路径
# 客户管理导入服务器保存路径
crm-excel
:
crm-excel
:
realPath
:
'
./crm-excel/'
realPath
:
'
/data/crm-excel/'
\ No newline at end of file
\ No newline at end of file
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