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
718cde6a
Commit
718cde6a
authored
Jun 15, 2020
by
邓实川
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
079faf5b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
110 additions
and
37 deletions
+110
-37
src/main/java/cn/timer/api/controller/crm/CrmController.java
+91
-36
src/main/java/cn/timer/api/controller/qyxx/CmsController.java
+1
-1
src/main/java/cn/timer/api/controller/qyzx/QyzxAuthController.java
+18
-0
No files found.
src/main/java/cn/timer/api/controller/crm/CrmController.java
View file @
718cde6a
...
...
@@ -280,23 +280,37 @@ public class CrmController {
@GetMapping
(
"getBusinessGroupId"
)
@ApiOperation
(
value
=
"获取业务组列表(id,name)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
getBusinessGroupId
(
@CurrentUser
UserBean
userBean
)
{
List
<
CrmBusinessGroupMember
>
list
=
CrmBusinessGroupMember
.
builder
().
build
()
.
selectList
(
new
LambdaQueryWrapper
<
CrmBusinessGroupMember
>()
.
eq
(
CrmBusinessGroupMember:
:
getEmpNum
,
getEmpNum
(
userBean
))
.
eq
(
CrmBusinessGroupMember:
:
getOrgCode
,
getOrgCode
(
userBean
))
.
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
)
{
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
);
Integer
nowEmpNum
=
getEmpNum
(
userBean
);
Integer
orgCode
=
getOrgCode
(
userBean
);
YgglMainEmp
yg
=
YgglMainEmp
.
builder
().
build
()
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
)
.
eq
(
YgglMainEmp:
:
getEmpNum
,
nowEmpNum
).
select
(
YgglMainEmp:
:
getIsManager
));
if
(
yg
!=
null
&&
yg
.
getIsManager
()
!=
null
&&
(
yg
.
getIsManager
()
==
1
||
yg
.
getIsManager
()
==
2
))
{
List
<
CrmBusinessGroup
>
list
=
CrmBusinessGroup
.
builder
().
build
()
.
selectList
(
new
LambdaQueryWrapper
<
CrmBusinessGroup
>().
eq
(
CrmBusinessGroup:
:
getOrgCode
,
orgCode
)
.
select
(
CrmBusinessGroup:
:
getName
,
CrmBusinessGroup:
:
getId
));
return
ResultUtil
.
data
(
list
,
"获取成功"
);
}
else
{
List
<
CrmBusinessGroupMember
>
list
=
CrmBusinessGroupMember
.
builder
().
build
()
.
selectList
(
new
LambdaQueryWrapper
<
CrmBusinessGroupMember
>()
.
eq
(
CrmBusinessGroupMember:
:
getEmpNum
,
getEmpNum
(
userBean
))
.
eq
(
CrmBusinessGroupMember:
:
getOrgCode
,
getOrgCode
(
userBean
))
.
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
)
{
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
,
"获取成功"
);
}
return
ResultUtil
.
data
(
result
,
"获取成功"
);
}
// @GetMapping("getBusinessGroupMembers")
...
...
@@ -559,25 +573,45 @@ public class CrmController {
@RequestParam
(
required
=
false
)
Integer
status
,
@RequestParam
(
required
=
false
)
String
like
)
{
Integer
empNum
=
getEmpNum
(
userBean
);
Integer
orgCode
=
getOrgCode
(
userBean
);
// 当前用户加入的组
List
<
Integer
>
gids1
=
MyJoinGroup
(
empNum
,
orgCode
);
// 当前用户管理的组
List
<
Integer
>
gids2
=
MyManageGroup
(
empNum
,
orgCode
);
List
<
Integer
>
myGids
=
CheckUtil
.
distinct
(
gids1
,
gids2
,
true
);
// 当前用户所有业务组id
List
<
CrmClientData
>
crmClientDatas
=
new
ArrayList
<
CrmClientData
>();
for
(
Integer
gid
:
myGids
)
{
List
<
CrmClientData
>
datas
=
CrmClientData
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
CrmClientData
>().
lambda
().
eq
(
CrmClientData:
:
getBelongGroup
,
gid
)
YgglMainEmp
yg
=
YgglMainEmp
.
builder
().
build
()
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
)
.
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
select
(
YgglMainEmp:
:
getIsManager
));
if
(
yg
!=
null
&&
yg
.
getIsManager
()
!=
null
&&
(
yg
.
getIsManager
()
==
1
||
yg
.
getIsManager
()
==
2
))
{
List
<
CrmClientData
>
list
=
CrmClientData
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
CrmClientData
>().
lambda
().
eq
(
CrmClientData:
:
getOrgCode
,
orgCode
)
.
eq
(
CrmClientData:
:
getBelongUser
,
0
)
.
eq
(
type
!=
null
&&
type
>=
0
,
CrmClientData:
:
getClientType
,
type
)
.
eq
(
groupId
!=
null
&&
groupId
>=
0
,
CrmClientData:
:
getBelongGroup
,
groupId
)
.
eq
(
status
!=
null
&&
status
>=
0
,
CrmClientData:
:
getClientStatus
,
status
)
.
like
(!
StrUtil
.
isBlank
(
like
),
CrmClientData:
:
getClientName
,
like
).
or
()
.
like
(!
StrUtil
.
isBlank
(
like
),
CrmClientData:
:
getClientCellphone
,
like
));
for
(
CrmClientData
data
:
datas
)
crmClientDatas
.
add
(
data
);
return
ResultUtil
.
data
(
list
,
"查询成功"
);
}
else
{
// 当前用户加入的组
List
<
Integer
>
gids1
=
MyJoinGroup
(
empNum
,
orgCode
);
// 当前用户管理的组
List
<
Integer
>
gids2
=
MyManageGroup
(
empNum
,
orgCode
);
List
<
Integer
>
myGids
=
CheckUtil
.
distinct
(
gids1
,
gids2
,
true
);
// 当前用户所有业务组id
List
<
CrmClientData
>
crmClientDatas
=
new
ArrayList
<
CrmClientData
>();
for
(
Integer
gid
:
myGids
)
{
List
<
CrmClientData
>
datas
=
CrmClientData
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
CrmClientData
>().
lambda
().
eq
(
CrmClientData:
:
getBelongGroup
,
gid
)
.
eq
(
CrmClientData:
:
getBelongUser
,
0
)
.
eq
(
type
!=
null
&&
type
>=
0
,
CrmClientData:
:
getClientType
,
type
)
.
eq
(
groupId
!=
null
&&
groupId
>=
0
,
CrmClientData:
:
getBelongGroup
,
groupId
)
.
eq
(
status
!=
null
&&
status
>=
0
,
CrmClientData:
:
getClientStatus
,
status
)
.
like
(!
StrUtil
.
isBlank
(
like
),
CrmClientData:
:
getClientName
,
like
).
or
()
.
like
(!
StrUtil
.
isBlank
(
like
),
CrmClientData:
:
getClientCellphone
,
like
));
for
(
CrmClientData
data
:
datas
)
crmClientDatas
.
add
(
data
);
}
return
ResultUtil
.
data
(
crmClientDatas
,
"查询成功"
);
}
return
ResultUtil
.
data
(
crmClientDatas
,
"查询成功"
);
}
@GetMapping
(
"getAllCilentTotal"
)
...
...
@@ -589,14 +623,16 @@ public class CrmController {
@RequestParam
(
required
=
false
)
String
endCreateTime
,
@RequestParam
(
required
=
false
)
String
startFollowTime
,
@RequestParam
(
required
=
false
)
String
endFollowTime
)
{
Integer
empNum
=
getEmpNum
(
userBean
);
Integer
orgCode
=
getOrgCode
(
userBean
);
// 当前用户管理的组
List
<
Integer
>
gids
=
MyManageGroup
(
empNum
,
orgCode
);
List
<
Object
>
crmClientDatas
=
new
ArrayList
<
Object
>();
for
(
Integer
gid
:
gids
)
{
YgglMainEmp
yg
=
YgglMainEmp
.
builder
().
build
()
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
)
.
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
select
(
YgglMainEmp:
:
getIsManager
));
if
(
yg
!=
null
&&
yg
.
getIsManager
()
!=
null
&&
(
yg
.
getIsManager
()
==
1
||
yg
.
getIsManager
()
==
2
))
{
List
<
CrmClientData
>
datas
=
CrmClientData
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
CrmClientData
>().
lambda
().
eq
(
CrmClientData:
:
get
BelongGroup
,
gid
)
.
selectList
(
new
QueryWrapper
<
CrmClientData
>().
lambda
().
eq
(
CrmClientData:
:
get
OrgCode
,
orgCode
)
.
eq
(
groupId
!=
null
&&
groupId
>=
0
,
CrmClientData:
:
getBelongGroup
,
groupId
)
.
eq
(
type
!=
null
&&
type
>=
0
,
CrmClientData:
:
getClientType
,
type
)
.
eq
(
status
!=
null
&&
status
>=
0
,
CrmClientData:
:
getClientStatus
,
status
)
...
...
@@ -606,10 +642,29 @@ public class CrmController {
.
le
(
StringUtils
.
isNotBlank
(
endFollowTime
),
CrmClientData:
:
getCreateTime
,
endFollowTime
)
.
like
(!
StrUtil
.
isBlank
(
like
),
CrmClientData:
:
getClientName
,
like
).
or
()
.
like
(!
StrUtil
.
isBlank
(
like
),
CrmClientData:
:
getClientCellphone
,
like
));
for
(
CrmClientData
data
:
datas
)
crmClientDatas
.
add
(
data
);
return
ResultUtil
.
data
(
datas
,
"查询成功"
);
}
else
{
// 当前用户管理的组
List
<
Integer
>
gids
=
MyManageGroup
(
empNum
,
orgCode
);
List
<
Object
>
crmClientDatas
=
new
ArrayList
<
Object
>();
for
(
Integer
gid
:
gids
)
{
List
<
CrmClientData
>
datas
=
CrmClientData
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
CrmClientData
>()
.
lambda
().
eq
(
CrmClientData:
:
getBelongGroup
,
gid
)
.
eq
(
groupId
!=
null
&&
groupId
>=
0
,
CrmClientData:
:
getBelongGroup
,
groupId
)
.
eq
(
type
!=
null
&&
type
>=
0
,
CrmClientData:
:
getClientType
,
type
)
.
eq
(
status
!=
null
&&
status
>=
0
,
CrmClientData:
:
getClientStatus
,
status
)
.
ge
(
StringUtils
.
isNotBlank
(
startCreateTime
),
CrmClientData:
:
getCreateTime
,
startCreateTime
)
.
le
(
StringUtils
.
isNotBlank
(
endCreateTime
),
CrmClientData:
:
getCreateTime
,
endCreateTime
)
.
ge
(
StringUtils
.
isNotBlank
(
startFollowTime
),
CrmClientData:
:
getCreateTime
,
startFollowTime
)
.
le
(
StringUtils
.
isNotBlank
(
endFollowTime
),
CrmClientData:
:
getCreateTime
,
endFollowTime
)
.
like
(!
StrUtil
.
isBlank
(
like
),
CrmClientData:
:
getClientName
,
like
).
or
()
.
like
(!
StrUtil
.
isBlank
(
like
),
CrmClientData:
:
getClientCellphone
,
like
));
for
(
CrmClientData
data
:
datas
)
crmClientDatas
.
add
(
data
);
}
return
ResultUtil
.
data
(
crmClientDatas
,
"查询成功"
);
}
return
ResultUtil
.
data
(
crmClientDatas
,
"查询成功"
);
}
@PostMapping
(
"addCilentLinkMan"
)
...
...
src/main/java/cn/timer/api/controller/qyxx/CmsController.java
View file @
718cde6a
...
...
@@ -358,7 +358,7 @@ public class CmsController {
// 查询条件
QueryWrapper
<
CmsContent
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"organization_id"
,
userBean
.
getOrgCode
())
.
select
(
"id"
,
"auditopinion"
,
"modularid"
,
"status"
,
"title"
,
"releasetime"
,
"addeddate"
,
"author"
,
.
select
(
"id"
,
"publisher_name"
,
"auditopinion"
,
"modularid"
,
"status"
,
"title"
,
"releasetime"
,
"addeddate"
,
"author"
,
"summary"
,
"releasetype"
,
"fmtpath"
)
.
ne
(
"status"
,
1
).
eq
(
t
!=
null
&&
t
>
-
1
,
"modularid"
,
t
)
.
between
(!
StrUtil
.
hasBlank
(
s
)
&&
!
StrUtil
.
hasBlank
(
e
),
"releasetime"
,
...
...
src/main/java/cn/timer/api/controller/qyzx/QyzxAuthController.java
View file @
718cde6a
...
...
@@ -9,6 +9,7 @@ package cn.timer.api.controller.qyzx;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -22,6 +23,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
cn.timer.api.bean.qyzx.auth.QyzxAuthAccount
;
...
...
@@ -170,4 +172,20 @@ public class QyzxAuthController {
}
@GetMapping
(
value
=
"/getYgAuth"
)
@ApiOperation
(
value
=
"获取全部权限信息"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
YgglMainEmp
>>
getYgAuth
(
@CurrentUser
UserBean
userBean
)
{
YgglMainEmp
main
=
YgglMainEmp
.
builder
().
build
()
.
selectOne
(
new
LambdaQueryWrapper
<
YgglMainEmp
>().
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
eq
(
YgglMainEmp:
:
getIsManager
,
1
).
select
(
YgglMainEmp:
:
getName
,
YgglMainEmp:
:
getPhone
,
YgglMainEmp:
:
getEmpNum
,
YgglMainEmp:
:
getIsManager
));
List
<
YgglMainEmp
>
child
=
YgglMainEmp
.
builder
().
build
()
.
selectList
(
new
LambdaQueryWrapper
<
YgglMainEmp
>().
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
eq
(
YgglMainEmp:
:
getIsManager
,
2
).
select
(
YgglMainEmp:
:
getName
,
YgglMainEmp:
:
getPhone
,
YgglMainEmp:
:
getEmpNum
,
YgglMainEmp:
:
getIsManager
));
child
.
add
(
main
);
return
ResultUtil
.
data
(
child
,
"查询成功"
);
}
}
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