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
4aa62ad0
Commit
4aa62ad0
authored
Sep 03, 2020
by
ilal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
34b7d0dc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
4 deletions
+34
-4
src/main/java/cn/timer/api/bean/crm/CrmClientData.java
+5
-0
src/main/java/cn/timer/api/controller/crm/CrmController.java
+29
-4
No files found.
src/main/java/cn/timer/api/bean/crm/CrmClientData.java
View file @
4aa62ad0
...
@@ -164,6 +164,11 @@ public class CrmClientData extends Model<CrmClientData> {
...
@@ -164,6 +164,11 @@ public class CrmClientData extends Model<CrmClientData> {
@Transient
@Transient
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"协作(0:否 1:是)"
)
private
Integer
iscooperation
;
@Transient
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"协作人id"
)
@ApiModelProperty
(
value
=
"协作人id"
)
private
Integer
[]
ids
;
private
Integer
[]
ids
;
...
...
src/main/java/cn/timer/api/controller/crm/CrmController.java
View file @
4aa62ad0
...
@@ -28,6 +28,7 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
...
@@ -28,6 +28,7 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
...
@@ -54,6 +55,7 @@ import cn.timer.api.dao.crm.CrmClientDataMapper;
...
@@ -54,6 +55,7 @@ import cn.timer.api.dao.crm.CrmClientDataMapper;
import
cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper
;
import
cn.timer.api.dto.crm.CrmCartogramDto
;
import
cn.timer.api.dto.crm.CrmCartogramDto
;
import
cn.timer.api.dto.crm.CrmClientDataImportVo
;
import
cn.timer.api.dto.crm.CrmClientDataImportVo
;
import
cn.timer.api.dto.kqmk.DailyDetailsDto
;
import
cn.timer.api.utils.CheckUtil
;
import
cn.timer.api.utils.CheckUtil
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
cn.timer.api.utils.ResultUtil
;
...
@@ -376,7 +378,7 @@ public class CrmController {
...
@@ -376,7 +378,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
(
0
);
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());
...
@@ -534,8 +536,8 @@ public class CrmController {
...
@@ -534,8 +536,8 @@ public class CrmController {
Integer
cid
=
crmClientAssociate
.
getCid
();
Integer
cid
=
crmClientAssociate
.
getCid
();
CrmClientData
crmClientData
=
CrmClientData
.
builder
().
build
()
CrmClientData
crmClientData
=
CrmClientData
.
builder
().
build
()
.
selectOne
(
new
QueryWrapper
<
CrmClientData
>().
lambda
().
eq
(
CrmClientData:
:
getId
,
cid
)
.
selectOne
(
new
QueryWrapper
<
CrmClientData
>().
lambda
().
eq
(
CrmClientData:
:
getId
,
cid
)
.
eq
(
groupId
!=
null
&&
groupId
>
=
0
,
CrmClientData:
:
getBelongGroup
,
groupId
)
.
eq
(
groupId
!=
null
&&
groupId
>
0
,
CrmClientData:
:
getBelongGroup
,
groupId
)
.
eq
(
status
!=
null
&&
status
>
=
0
,
CrmClientData:
:
getClientStatus
,
status
)
.
eq
(
status
!=
null
&&
status
>
0
,
CrmClientData:
:
getClientStatus
,
status
)
.
like
(!
StrUtil
.
isBlank
(
like
),
CrmClientData:
:
getClientName
,
like
).
or
()
.
like
(!
StrUtil
.
isBlank
(
like
),
CrmClientData:
:
getClientName
,
like
).
or
()
.
like
(!
StrUtil
.
isBlank
(
like
),
CrmClientData:
:
getClientCellphone
,
like
));
.
like
(!
StrUtil
.
isBlank
(
like
),
CrmClientData:
:
getClientCellphone
,
like
));
if
(
crmClientData
!=
null
)
if
(
crmClientData
!=
null
)
...
@@ -619,7 +621,30 @@ public class CrmController {
...
@@ -619,7 +621,30 @@ public class CrmController {
List
<
CrmClientData
>
result
=
getPageList
(
crmClientDatas
,
pageNumber
,
pageSize
,
List
<
CrmClientData
>
result
=
getPageList
(
crmClientDatas
,
pageNumber
,
pageSize
,
Comparator
.
comparing
(
CrmClientData:
:
getCreateTime
).
reversed
());
Comparator
.
comparing
(
CrmClientData:
:
getCreateTime
).
reversed
());
return
ResultUtil
.
pageData
(
result
,
(
long
)
crmClientDatas
.
size
(),
"查询成功"
);
List
<
CrmClientData
>
resultlist
=
new
ArrayList
<
CrmClientData
>();
for
(
CrmClientData
crmd
:
result
)
{
CrmClientData
crmdts
=
CrmClientData
.
builder
().
build
();
BeanUtil
.
copyProperties
(
crmd
,
crmdts
,
"iscooperation"
);
List
<
CrmClientAssociate
>
crmClientAssociates
=
CrmClientAssociate
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
CrmClientAssociate
>().
lambda
().
eq
(
CrmClientAssociate:
:
getCid
,
crmd
.
getId
()));
if
(
crmClientAssociates
.
size
()
>
0
)
{
for
(
CrmClientAssociate
crmClientAssociate
:
crmClientAssociates
)
{
Integer
empNum1
=
crmClientAssociate
.
getAssociateId
();
if
(
userBean
.
getEmpNum
().
equals
(
empNum1
))
{
crmdts
.
setIscooperation
(
1
);
}
else
{
crmdts
.
setIscooperation
(
0
);
}
}
}
else
{
crmdts
.
setIscooperation
(
0
);
}
resultlist
.
add
(
crmdts
);
}
return
ResultUtil
.
pageData
(
resultlist
,
(
long
)
crmClientDatas
.
size
(),
"查询成功"
);
// return ResultUtil.data(crmClientDatas, "查询成功");
// return ResultUtil.data(crmClientDatas, "查询成功");
}
}
...
...
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