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
a8a049f5
Commit
a8a049f5
authored
Jun 11, 2020
by
邓实川
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
业务组列表接口-根据前端要求修改
parent
1a1a9e41
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
18 deletions
+48
-18
src/main/java/cn/timer/api/bean/crm/CrmBusinessGroup.java
+5
-0
src/main/java/cn/timer/api/controller/crm/CrmController.java
+43
-18
No files found.
src/main/java/cn/timer/api/bean/crm/CrmBusinessGroup.java
View file @
a8a049f5
...
...
@@ -91,6 +91,11 @@ public class CrmBusinessGroup extends Model<CrmBusinessGroup> {
@Transient
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"组管理员信息"
)
private
List
<
Map
<
String
,
Object
>>
members
;
@Transient
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"组成员id"
)
private
Integer
[]
memberIds
;
...
...
src/main/java/cn/timer/api/controller/crm/CrmController.java
View file @
a8a049f5
...
...
@@ -160,6 +160,9 @@ public class CrmController {
List
<
CrmBusinessGroupMember
>
crmBusinessGroupManagers
=
CrmBusinessGroupMember
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
CrmBusinessGroupMember
>().
lambda
().
eq
(
CrmBusinessGroupMember:
:
getGid
,
gid
)
.
eq
(
CrmBusinessGroupMember:
:
getType
,
1
).
select
(
CrmBusinessGroupMember:
:
getEmpNum
));
List
<
CrmBusinessGroupMember
>
crmBusinessGroupMembers
=
CrmBusinessGroupMember
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
CrmBusinessGroupMember
>().
lambda
().
eq
(
CrmBusinessGroupMember:
:
getGid
,
gid
)
.
eq
(
CrmBusinessGroupMember:
:
getType
,
0
).
select
(
CrmBusinessGroupMember:
:
getEmpNum
));
List
<
Map
<
String
,
Object
>>
managers
=
new
ArrayList
<
Map
<
String
,
Object
>>();
for
(
CrmBusinessGroupMember
crmBusinessGroupManager
:
crmBusinessGroupManagers
)
{
Integer
empNum
=
crmBusinessGroupManager
.
getEmpNum
();
...
...
@@ -169,29 +172,51 @@ public class CrmController {
managers
.
add
(
map
);
}
crmBusinessGroup
.
setManagers
(
managers
);
List
<
Map
<
String
,
Object
>>
members
=
new
ArrayList
<
Map
<
String
,
Object
>>();
for
(
CrmBusinessGroupMember
crmBusinessGroupManager
:
crmBusinessGroupMembers
)
{
Integer
empNum
=
crmBusinessGroupManager
.
getEmpNum
();
String
name
=
getEmpName
(
getOrgCode
(
userBean
),
empNum
);
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"name"
,
name
);
members
.
add
(
map
);
}
return
ResultUtil
.
data
(
list
,
"获取成功"
);
}
crmBusinessGroup
.
setMembers
(
members
);
@GetMapping
(
"getBusinessGroupMembers"
)
@ApiOperation
(
value
=
"获取业务组列表成员"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
getBusinessGroupMembers
(
@CurrentUser
UserBean
userBean
,
@RequestParam
Integer
gid
)
{
List
<
CrmBusinessGroupMember
>
crmBusinessGroupMembers
=
CrmBusinessGroupMember
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
CrmBusinessGroupMember
>().
lambda
().
eq
(
CrmBusinessGroupMember:
:
getGid
,
gid
));
List
<
YgglMainEmp
>
ygglMainEmps
=
new
ArrayList
<
YgglMainEmp
>();
for
(
CrmBusinessGroupMember
crmBusinessGroupMember
:
crmBusinessGroupMembers
)
{
ygglMainEmps
.
add
(
getYg
(
getOrgCode
(
userBean
),
crmBusinessGroupMember
.
getEmpNum
()));
CrmSeaRule
crmSeaRules
=
CrmSeaRule
.
builder
().
build
()
.
selectOne
(
new
QueryWrapper
<
CrmSeaRule
>().
lambda
().
eq
(
CrmSeaRule:
:
getGid
,
gid
));
crmBusinessGroup
.
setCrmSeaRules
(
crmSeaRules
);
}
return
ResultUtil
.
data
(
ygglMainEmps
,
"获取成功"
);
return
ResultUtil
.
data
(
list
,
"获取成功"
);
}
@GetMapping
(
"getBusinessGroupRules"
)
// TODO 扫描规则进行回收操作
@ApiOperation
(
value
=
"获取业务组公海规则"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
getBusinessGroupRules
(
@RequestParam
Integer
gid
)
{
List
<
CrmSeaRule
>
crmSeaRules
=
CrmSeaRule
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
CrmSeaRule
>().
lambda
().
eq
(
CrmSeaRule:
:
getGid
,
gid
));
return
ResultUtil
.
data
(
crmSeaRules
,
"获取成功"
);
}
// @GetMapping("getBusinessGroupMembers")
// @ApiOperation(value = "获取业务组列表成员", httpMethod = "GET", notes = "接口发布说明")
// public Result<Object> getBusinessGroupMembers(@CurrentUser UserBean userBean, @RequestParam Integer gid) {
// List<CrmBusinessGroupMember> crmBusinessGroupMembers = CrmBusinessGroupMember.builder().build()
// .selectList(new QueryWrapper<CrmBusinessGroupMember>().lambda().eq(CrmBusinessGroupMember::getGid, gid)
// .eq(CrmBusinessGroupMember::getType, 0));
// List<YgglMainEmp> ygglMainEmps = new ArrayList<YgglMainEmp>();
// for (CrmBusinessGroupMember crmBusinessGroupMember : crmBusinessGroupMembers) {
// ygglMainEmps.add(getYg(getOrgCode(userBean), crmBusinessGroupMember.getEmpNum()));
// }
// List<CrmBusinessGroupMember> crmBusinessGroupManagers = CrmBusinessGroupMember.builder().build()
// .selectList(new QueryWrapper<CrmBusinessGroupMember>().lambda().eq(CrmBusinessGroupMember::getGid, gid)
// .eq(CrmBusinessGroupMember::getType, 1));
// List<YgglMainEmp> ygglMainEmps2 = new ArrayList<YgglMainEmp>();
// for (CrmBusinessGroupMember crmBusinessGroupManager : crmBusinessGroupManagers) {
// ygglMainEmps2.add(getYg(getOrgCode(userBean), crmBusinessGroupManager.getEmpNum()));
// }
// return ResultUtil.datas(ygglMainEmps2,ygglMainEmps, "获取成功");
// }
// @GetMapping("getBusinessGroupRules") // TODO 扫描规则进行回收操作
// @ApiOperation(value = "获取业务组公海规则", httpMethod = "GET", notes = "接口发布说明")
// public Result<Object> getBusinessGroupRules(@RequestParam Integer gid) {
// List<CrmSeaRule> crmSeaRules = CrmSeaRule.builder().build()
// .selectList(new QueryWrapper<CrmSeaRule>().lambda().eq(CrmSeaRule::getGid, gid));
// return ResultUtil.data(crmSeaRules, "获取成功");
// }
private
SysRegion
getSysRegion
(
Integer
keyId
)
{
return
SysRegion
.
builder
().
build
()
...
...
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