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
5cbb7c39
Commit
5cbb7c39
authored
Jun 11, 2020
by
dengshichuan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dsc' into 'develop'
Dsc See merge request 8timerv2/8timerapiv200!162
parents
47431ee2
b10841b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
19 deletions
+49
-19
src/main/java/cn/timer/api/bean/crm/CrmBusinessGroup.java
+5
-0
src/main/java/cn/timer/api/controller/crm/CrmController.java
+44
-19
No files found.
src/main/java/cn/timer/api/bean/crm/CrmBusinessGroup.java
View file @
5cbb7c39
...
@@ -91,6 +91,11 @@ public class CrmBusinessGroup extends Model<CrmBusinessGroup> {
...
@@ -91,6 +91,11 @@ public class CrmBusinessGroup extends Model<CrmBusinessGroup> {
@Transient
@Transient
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"组管理员信息"
)
private
List
<
Map
<
String
,
Object
>>
members
;
@Transient
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"组成员id"
)
@ApiModelProperty
(
value
=
"组成员id"
)
private
Integer
[]
memberIds
;
private
Integer
[]
memberIds
;
...
...
src/main/java/cn/timer/api/controller/crm/CrmController.java
View file @
5cbb7c39
...
@@ -160,6 +160,9 @@ public class CrmController {
...
@@ -160,6 +160,9 @@ public class CrmController {
List
<
CrmBusinessGroupMember
>
crmBusinessGroupManagers
=
CrmBusinessGroupMember
.
builder
().
build
().
selectList
(
List
<
CrmBusinessGroupMember
>
crmBusinessGroupManagers
=
CrmBusinessGroupMember
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
CrmBusinessGroupMember
>().
lambda
().
eq
(
CrmBusinessGroupMember:
:
getGid
,
gid
)
new
QueryWrapper
<
CrmBusinessGroupMember
>().
lambda
().
eq
(
CrmBusinessGroupMember:
:
getGid
,
gid
)
.
eq
(
CrmBusinessGroupMember:
:
getType
,
1
).
select
(
CrmBusinessGroupMember:
:
getEmpNum
));
.
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
>>();
List
<
Map
<
String
,
Object
>>
managers
=
new
ArrayList
<
Map
<
String
,
Object
>>();
for
(
CrmBusinessGroupMember
crmBusinessGroupManager
:
crmBusinessGroupManagers
)
{
for
(
CrmBusinessGroupMember
crmBusinessGroupManager
:
crmBusinessGroupManagers
)
{
Integer
empNum
=
crmBusinessGroupManager
.
getEmpNum
();
Integer
empNum
=
crmBusinessGroupManager
.
getEmpNum
();
...
@@ -169,29 +172,51 @@ public class CrmController {
...
@@ -169,29 +172,51 @@ public class CrmController {
managers
.
add
(
map
);
managers
.
add
(
map
);
}
}
crmBusinessGroup
.
setManagers
(
managers
);
crmBusinessGroup
.
setManagers
(
managers
);
}
return
ResultUtil
.
data
(
list
,
"获取成功"
);
}
@GetMapping
(
"getBusinessGroupMembers"
)
List
<
Map
<
String
,
Object
>>
members
=
new
ArrayList
<
Map
<
String
,
Object
>>();
@ApiOperation
(
value
=
"获取业务组列表成员"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
for
(
CrmBusinessGroupMember
crmBusinessGroupManager
:
crmBusinessGroupMembers
)
{
public
Result
<
Object
>
getBusinessGroupMembers
(
@CurrentUser
UserBean
userBean
,
@RequestParam
Integer
gid
)
{
Integer
empNum
=
crmBusinessGroupManager
.
getEmpNum
();
List
<
CrmBusinessGroupMember
>
crmBusinessGroupMembers
=
CrmBusinessGroupMember
.
builder
().
build
().
selectList
(
String
name
=
getEmpName
(
getOrgCode
(
userBean
),
empNum
);
new
QueryWrapper
<
CrmBusinessGroupMember
>().
lambda
().
eq
(
CrmBusinessGroupMember:
:
getGid
,
gid
));
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
List
<
YgglMainEmp
>
ygglMainEmps
=
new
ArrayList
<
YgglMainEmp
>();
map
.
put
(
"name"
,
name
);
for
(
CrmBusinessGroupMember
crmBusinessGroupMember
:
crmBusinessGroupMembers
)
{
members
.
add
(
map
);
ygglMainEmps
.
add
(
getYg
(
getOrgCode
(
userBean
),
crmBusinessGroupMember
.
getEmpNum
()));
}
crmBusinessGroup
.
setMembers
(
members
);
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 扫描规则进行回收操作
// @GetMapping("getBusinessGroupMembers")
@ApiOperation
(
value
=
"获取业务组公海规则"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
// @ApiOperation(value = "获取业务组列表成员", httpMethod = "GET", notes = "接口发布说明")
public
Result
<
Object
>
getBusinessGroupRules
(
@RequestParam
Integer
gid
)
{
// public Result<Object> getBusinessGroupMembers(@CurrentUser UserBean userBean, @RequestParam Integer gid) {
List
<
CrmSeaRule
>
crmSeaRules
=
CrmSeaRule
.
builder
().
build
()
// List<CrmBusinessGroupMember> crmBusinessGroupMembers = CrmBusinessGroupMember.builder().build()
.
selectList
(
new
QueryWrapper
<
CrmSeaRule
>().
lambda
().
eq
(
CrmSeaRule:
:
getGid
,
gid
));
// .selectList(new QueryWrapper<CrmBusinessGroupMember>().lambda().eq(CrmBusinessGroupMember::getGid, gid)
return
ResultUtil
.
data
(
crmSeaRules
,
"获取成功"
);
// .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
)
{
private
SysRegion
getSysRegion
(
Integer
keyId
)
{
return
SysRegion
.
builder
().
build
()
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