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
faf5f60a
Commit
faf5f60a
authored
Dec 08, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'master'
Develop See merge request 8timerv2/8timerapiv200!563
parents
feff472f
51768684
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
2 deletions
+66
-2
src/main/java/cn/timer/api/bean/crm/CrmClientData.java
+3
-0
src/main/java/cn/timer/api/controller/crm/CrmController.java
+44
-2
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+17
-0
src/main/java/cn/timer/api/dto/crm/CrmClientDataImportVo.java
+2
-0
No files found.
src/main/java/cn/timer/api/bean/crm/CrmClientData.java
View file @
faf5f60a
...
...
@@ -162,6 +162,9 @@ public class CrmClientData extends Model<CrmClientData> {
@ApiModelProperty
(
value
=
"产品"
)
private
String
product
;
@ApiModelProperty
(
value
=
"跟进记录"
)
private
String
followuprecord
;
@Transient
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"协作(0:否 1:是)"
)
...
...
src/main/java/cn/timer/api/controller/crm/CrmController.java
View file @
faf5f60a
...
...
@@ -27,6 +27,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollUtil
;
...
...
@@ -57,6 +59,7 @@ import cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper;
import
cn.timer.api.dto.crm.CrmCartogramDto
;
import
cn.timer.api.dto.crm.CrmClientDataImportVo
;
import
cn.timer.api.dto.kqmk.DailyDetailsDto
;
import
cn.timer.api.dto.xcgl.ImportDescriptionDto
;
import
cn.timer.api.utils.CheckUtil
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
...
...
@@ -1423,6 +1426,13 @@ public class CrmController {
@Transactional
@ApiOperation
(
value
=
"导入客户"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
importClient
(
@CurrentUser
UserBean
userBean
,
@RequestParam
String
url
)
{
int
toinsert
=
0
;
//新增
int
toupdate
=
0
;
//更新
int
failure
=
0
;
//失败
List
<
Map
<
String
,
String
>>
reasons
=
Lists
.
newArrayList
();
Integer
empNum
=
getEmpNum
(
userBean
);
Integer
orgCode
=
getOrgCode
(
userBean
);
...
...
@@ -1459,9 +1469,18 @@ public class CrmController {
reader
.
addHeaderAlias
(
"办公电话"
,
"telephone"
);
reader
.
addHeaderAlias
(
"个人邮箱"
,
"email"
);
reader
.
addHeaderAlias
(
"个人地址"
,
"linkAddress"
);
reader
.
addHeaderAlias
(
"跟进记录"
,
"followuprecord"
);
List
<
CrmClientDataImportVo
>
list
=
reader
.
read
(
0
,
1
,
CrmClientDataImportVo
.
class
);
for
(
CrmClientDataImportVo
crmClientDataImportVo
:
list
)
{
String
name
=
crmClientDataImportVo
.
getClientName
();
Map
<
String
,
String
>
map
=
Maps
.
newHashMap
();
try
{
CrmClientData
crmd
=
CrmClientData
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
CrmClientData
>().
lambda
().
eq
(
CrmClientData:
:
getBelongUser
,
empNum
).
eq
(
CrmClientData:
:
getClientName
,
crmClientDataImportVo
.
getClientName
())
.
eq
(
CrmClientData:
:
getClientCellphone
,
crmClientDataImportVo
.
getClientCellphone
()));
if
(
crmd
==
null
)
{
String
clientName
=
crmClientDataImportVo
.
getClientName
();
// 客户名称(必填)
String
belongGroupName
=
crmClientDataImportVo
.
getBelongGroupName
();
// 分组名(必填)
String
industryName
=
crmClientDataImportVo
.
getIndustryName
();
// 行业名
...
...
@@ -1482,6 +1501,8 @@ public class CrmController {
String
linkemail
=
crmClientDataImportVo
.
getEmail
();
// 个人邮箱
String
linkaddress
=
crmClientDataImportVo
.
getLinkAddress
();
// 个人地址
String
followuprecord
=
crmClientDataImportVo
.
getFollowuprecord
();
// 跟进记录
CrmClientData
crmClientData
=
new
CrmClientData
();
// 业务组
...
...
@@ -1533,6 +1554,7 @@ public class CrmController {
crmClientData
.
setClientEmail
(
clientEmail
);
crmClientData
.
setAddress
(
clientAddress
);
crmClientData
.
setOrgCode
(
orgCode
);
crmClientData
.
setFollowuprecord
(
followuprecord
);
//跟进记录
crmClientData
.
insert
();
Integer
cid
=
crmClientData
.
getId
();
...
...
@@ -1558,11 +1580,31 @@ public class CrmController {
contacts
.
insert
();
}
}
toinsert
++;
}
else
{
failure
++;
map
.
put
(
"name"
,
name
);
map
.
put
(
"msg"
,
"该客户已存在"
);
reasons
.
add
(
map
);
}
}
catch
(
Exception
e
)
{
failure
++;
map
.
put
(
"name"
,
name
);
map
.
put
(
"msg"
,
StringUtils
.
isBlank
(
e
.
getMessage
())
?
"必填数据出现空值"
:
e
.
getMessage
());
reasons
.
add
(
map
);
}
}
ImportDescriptionDto
imds
=
new
ImportDescriptionDto
();
imds
.
setSuccess
(
toinsert
+
toupdate
);
//成功
imds
.
setToinsert
(
toinsert
);
imds
.
setToupdate
(
toupdate
);
//更新
imds
.
setFailure
(
failure
);
//失败
imds
.
setReasons
(
reasons
);
}
return
ResultUtil
.
success
(
"导入成功"
);
return
ResultUtil
.
data
(
imds
,
"成功"
);
//
return ResultUtil.success("导入成功");
}
private
ExcelReader
getReaderByUrl
(
String
url
)
{
...
...
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
faf5f60a
...
...
@@ -123,6 +123,7 @@ import cn.timer.api.dto.yggl.LoginerChargeDto;
import
cn.timer.api.dto.yggl.LzbQueryDto
;
import
cn.timer.api.dto.yggl.LzygQueryDto
;
import
cn.timer.api.dto.yggl.ModifyAvatarDto
;
import
cn.timer.api.dto.yggl.UserInfo
;
import
cn.timer.api.dto.yggl.YgCartogramDto
;
import
cn.timer.api.dto.yggl.YgKVDto
;
import
cn.timer.api.dto.yggl.YgQueryDto
;
...
...
@@ -1997,7 +1998,23 @@ public class YgglController {
return
ResultUtil
.
success
(
"上传成功"
);
}
@PostMapping
(
value
=
"/new_account"
)
@ApiOperation
(
value
=
"修改账号"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
New_account
(
@CurrentUser
UserBean
userBean
,
@RequestBody
UserInfo
userinfo
)
{
YgglMainEmp
sjhpd
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getPhone
,
userinfo
.
getPhone
())
.
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()));
if
(
sjhpd
==
null
)
{
YgglMainEmp
.
builder
().
phone
(
userinfo
.
getPhone
()).
build
().
update
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getEmpNum
,
userinfo
.
getName
()).
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()));
QyzxEmpLogin
.
builder
().
phone
(
userinfo
.
getPhone
()).
build
().
update
(
new
QueryWrapper
<
QyzxEmpLogin
>().
lambda
().
eq
(
QyzxEmpLogin:
:
getId
,
userinfo
.
getName
()).
eq
(
QyzxEmpLogin:
:
getOrgId
,
userBean
.
getOrgCode
()));
return
ResultUtil
.
success
(
"修改成功"
);
}
else
{
return
ResultUtil
.
error
(
"该号码已存在"
);
}
}
}
src/main/java/cn/timer/api/dto/crm/CrmClientDataImportVo.java
View file @
faf5f60a
...
...
@@ -65,4 +65,6 @@ public class CrmClientDataImportVo implements Serializable {
private
String
email
;
private
String
linkAddress
;
private
String
followuprecord
;
}
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