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
9433de9d
Commit
9433de9d
authored
Jun 15, 2020
by
dengshichuan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dsc' into 'develop'
bug修改 See merge request 8timerv2/8timerapiv200!190
parents
351502be
4a74a4ee
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 @
9433de9d
...
@@ -280,23 +280,37 @@ public class CrmController {
...
@@ -280,23 +280,37 @@ 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
)
{
List
<
CrmBusinessGroupMember
>
list
=
CrmBusinessGroupMember
.
builder
().
build
()
.
selectList
(
new
LambdaQueryWrapper
<
CrmBusinessGroupMember
>()
Integer
nowEmpNum
=
getEmpNum
(
userBean
);
.
eq
(
CrmBusinessGroupMember:
:
getEmpNum
,
getEmpNum
(
userBean
))
Integer
orgCode
=
getOrgCode
(
userBean
);
.
eq
(
CrmBusinessGroupMember:
:
getOrgCode
,
getOrgCode
(
userBean
))
.
select
(
CrmBusinessGroupMember:
:
getGid
));
YgglMainEmp
yg
=
YgglMainEmp
.
builder
().
build
()
List
<
Integer
>
gids
=
list
.
stream
().
map
(
CrmBusinessGroupMember:
:
getGid
).
collect
(
Collectors
.
toList
()).
stream
()
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
)
.
distinct
().
collect
(
Collectors
.
toList
());
.
eq
(
YgglMainEmp:
:
getEmpNum
,
nowEmpNum
).
select
(
YgglMainEmp:
:
getIsManager
));
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<
Map
<
String
,
Object
>>();
if
(
yg
!=
null
&&
yg
.
getIsManager
()
!=
null
&&
(
yg
.
getIsManager
()
==
1
||
yg
.
getIsManager
()
==
2
))
{
for
(
Integer
gid
:
gids
)
{
List
<
CrmBusinessGroup
>
list
=
CrmBusinessGroup
.
builder
().
build
()
String
name
=
CrmBusinessGroup
.
builder
().
build
().
selectOne
(
new
LambdaQueryWrapper
<
CrmBusinessGroup
>()
.
selectList
(
new
LambdaQueryWrapper
<
CrmBusinessGroup
>().
eq
(
CrmBusinessGroup:
:
getOrgCode
,
orgCode
)
.
eq
(
CrmBusinessGroup:
:
getId
,
gid
).
select
(
CrmBusinessGroup:
:
getName
)).
getName
();
.
select
(
CrmBusinessGroup:
:
getName
,
CrmBusinessGroup:
:
getId
));
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
return
ResultUtil
.
data
(
list
,
"获取成功"
);
map
.
put
(
"id"
,
gid
);
}
else
{
map
.
put
(
"name"
,
name
);
List
<
CrmBusinessGroupMember
>
list
=
CrmBusinessGroupMember
.
builder
().
build
()
result
.
add
(
map
);
.
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")
// @GetMapping("getBusinessGroupMembers")
...
@@ -559,25 +573,45 @@ public class CrmController {
...
@@ -559,25 +573,45 @@ public class CrmController {
@RequestParam
(
required
=
false
)
Integer
status
,
@RequestParam
(
required
=
false
)
String
like
)
{
@RequestParam
(
required
=
false
)
Integer
status
,
@RequestParam
(
required
=
false
)
String
like
)
{
Integer
empNum
=
getEmpNum
(
userBean
);
Integer
empNum
=
getEmpNum
(
userBean
);
Integer
orgCode
=
getOrgCode
(
userBean
);
Integer
orgCode
=
getOrgCode
(
userBean
);
// 当前用户加入的组
List
<
Integer
>
gids1
=
MyJoinGroup
(
empNum
,
orgCode
);
YgglMainEmp
yg
=
YgglMainEmp
.
builder
().
build
()
// 当前用户管理的组
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
)
List
<
Integer
>
gids2
=
MyManageGroup
(
empNum
,
orgCode
);
.
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
select
(
YgglMainEmp:
:
getIsManager
));
List
<
Integer
>
myGids
=
CheckUtil
.
distinct
(
gids1
,
gids2
,
true
);
// 当前用户所有业务组id
if
(
yg
!=
null
&&
yg
.
getIsManager
()
!=
null
&&
(
yg
.
getIsManager
()
==
1
||
yg
.
getIsManager
()
==
2
))
{
List
<
CrmClientData
>
crmClientDatas
=
new
ArrayList
<
CrmClientData
>();
for
(
Integer
gid
:
myGids
)
{
List
<
CrmClientData
>
list
=
CrmClientData
.
builder
().
build
()
List
<
CrmClientData
>
datas
=
CrmClientData
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
CrmClientData
>().
lambda
().
eq
(
CrmClientData:
:
getOrgCode
,
orgCode
)
.
selectList
(
new
QueryWrapper
<
CrmClientData
>().
lambda
().
eq
(
CrmClientData:
:
getBelongGroup
,
gid
)
.
eq
(
CrmClientData:
:
getBelongUser
,
0
)
.
eq
(
CrmClientData:
:
getBelongUser
,
0
)
.
eq
(
type
!=
null
&&
type
>=
0
,
CrmClientData:
:
getClientType
,
type
)
.
eq
(
type
!=
null
&&
type
>=
0
,
CrmClientData:
:
getClientType
,
type
)
.
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
));
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"
)
@GetMapping
(
"getAllCilentTotal"
)
...
@@ -589,14 +623,16 @@ public class CrmController {
...
@@ -589,14 +623,16 @@ public class CrmController {
@RequestParam
(
required
=
false
)
String
endCreateTime
,
@RequestParam
(
required
=
false
)
String
endCreateTime
,
@RequestParam
(
required
=
false
)
String
startFollowTime
,
@RequestParam
(
required
=
false
)
String
startFollowTime
,
@RequestParam
(
required
=
false
)
String
endFollowTime
)
{
@RequestParam
(
required
=
false
)
String
endFollowTime
)
{
Integer
empNum
=
getEmpNum
(
userBean
);
Integer
empNum
=
getEmpNum
(
userBean
);
Integer
orgCode
=
getOrgCode
(
userBean
);
Integer
orgCode
=
getOrgCode
(
userBean
);
// 当前用户管理的组
List
<
Integer
>
gids
=
MyManageGroup
(
empNum
,
orgCode
);
YgglMainEmp
yg
=
YgglMainEmp
.
builder
().
build
()
List
<
Object
>
crmClientDatas
=
new
ArrayList
<
Object
>();
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
)
for
(
Integer
gid
:
gids
)
{
.
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
()
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
(
groupId
!=
null
&&
groupId
>=
0
,
CrmClientData:
:
getBelongGroup
,
groupId
)
.
eq
(
type
!=
null
&&
type
>=
0
,
CrmClientData:
:
getClientType
,
type
)
.
eq
(
type
!=
null
&&
type
>=
0
,
CrmClientData:
:
getClientType
,
type
)
.
eq
(
status
!=
null
&&
status
>=
0
,
CrmClientData:
:
getClientStatus
,
status
)
.
eq
(
status
!=
null
&&
status
>=
0
,
CrmClientData:
:
getClientStatus
,
status
)
...
@@ -606,10 +642,29 @@ public class CrmController {
...
@@ -606,10 +642,29 @@ public class CrmController {
.
le
(
StringUtils
.
isNotBlank
(
endFollowTime
),
CrmClientData:
:
getCreateTime
,
endFollowTime
)
.
le
(
StringUtils
.
isNotBlank
(
endFollowTime
),
CrmClientData:
:
getCreateTime
,
endFollowTime
)
.
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
));
for
(
CrmClientData
data
:
datas
)
return
ResultUtil
.
data
(
datas
,
"查询成功"
);
crmClientDatas
.
add
(
data
);
}
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"
)
@PostMapping
(
"addCilentLinkMan"
)
...
...
src/main/java/cn/timer/api/controller/qyxx/CmsController.java
View file @
9433de9d
...
@@ -358,7 +358,7 @@ public class CmsController {
...
@@ -358,7 +358,7 @@ public class CmsController {
// 查询条件
// 查询条件
QueryWrapper
<
CmsContent
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
CmsContent
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"organization_id"
,
userBean
.
getOrgCode
())
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"
)
"summary"
,
"releasetype"
,
"fmtpath"
)
.
ne
(
"status"
,
1
).
eq
(
t
!=
null
&&
t
>
-
1
,
"modularid"
,
t
)
.
ne
(
"status"
,
1
).
eq
(
t
!=
null
&&
t
>
-
1
,
"modularid"
,
t
)
.
between
(!
StrUtil
.
hasBlank
(
s
)
&&
!
StrUtil
.
hasBlank
(
e
),
"releasetime"
,
.
between
(!
StrUtil
.
hasBlank
(
s
)
&&
!
StrUtil
.
hasBlank
(
e
),
"releasetime"
,
...
...
src/main/java/cn/timer/api/controller/qyzx/QyzxAuthController.java
View file @
9433de9d
...
@@ -9,6 +9,7 @@ package cn.timer.api.controller.qyzx;
...
@@ -9,6 +9,7 @@ package cn.timer.api.controller.qyzx;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -22,6 +23,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -22,6 +23,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
cn.timer.api.bean.qyzx.auth.QyzxAuthAccount
;
import
cn.timer.api.bean.qyzx.auth.QyzxAuthAccount
;
...
@@ -170,4 +172,20 @@ public class QyzxAuthController {
...
@@ -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