Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
涂亚平
/
subsidy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 899d8777
authored
Feb 22, 2022
by
涂亚平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
临时上个版本 联调中
1 parent
f1e581fc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
9 deletions
src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java
src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java
View file @
899d877
...
...
@@ -16,6 +16,7 @@ import com.subsidy.mapper.CompanyFieldMappingMapper;
import
com.subsidy.mapper.DepartmentDictMapper
;
import
com.subsidy.mapper.FieldDictMapper
;
import
com.subsidy.mapper.JobDictMapper
;
import
com.subsidy.mapper.RankDictMapper
;
import
com.subsidy.mapper.RoleAdministerMappingMapper
;
import
com.subsidy.model.AdministerDO
;
import
com.subsidy.model.ClassHourDictDO
;
...
...
@@ -25,6 +26,7 @@ import com.subsidy.model.CompanyFieldMappingDO;
import
com.subsidy.model.DepartmentDictDO
;
import
com.subsidy.model.FieldDictDO
;
import
com.subsidy.model.JobDictDO
;
import
com.subsidy.model.RankDictDO
;
import
com.subsidy.model.RoleAdministerMappingDO
;
import
com.subsidy.service.CompanyDictService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
...
...
@@ -79,21 +81,25 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
@Autowired
private
ClassHourDictMapper
classHourDictMapper
;
@Autowired
private
RankDictMapper
rankDictMapper
;
public
IPage
<
OperatorsVO
>
operators
(
OperatorsDTO
operatorsDTO
)
{
Page
pager
=
new
Page
(
operatorsDTO
.
getPageNum
(),
operatorsDTO
.
getPageSize
());
//判断该用户的角色
//Integer count = roleAdministerMappingMapper.selectCount(new QueryWrapper<RoleAdministerMappingDO>()
// .lambda()
// .eq(RoleAdministerMappingDO::getAdministerId,operatorsDTO.getId())
// .eq(RoleAdministerMappingDO::getRoleId,1));
//
//if (count > 0){
// operatorsDTO.setId(null);
//}
AdministerDO
administerDO
=
administerMapper
.
selectById
(
operatorsDTO
.
getId
());
//判断该用户的角色
Integer
count
=
roleAdministerMappingMapper
.
selectCount
(
new
QueryWrapper
<
RoleAdministerMappingDO
>()
.
lambda
()
.
eq
(
RoleAdministerMappingDO:
:
getAdministerId
,
operatorsDTO
.
getId
())
.
eq
(
RoleAdministerMappingDO:
:
getRoleId
,
1
));
if
(
count
>
0
){
administerDO
.
setCompanyId
(
null
);
}
IPage
page
=
this
.
baseMapper
.
operators
(
pager
,
operatorsDTO
.
getCompanyName
(),
operatorsDTO
.
getFieldId
(),
administerDO
.
getCompanyId
());
List
<
OperatorsVO
>
operatorsVOS
=
page
.
getRecords
();
for
(
OperatorsVO
operatorsVO
:
operatorsVOS
)
{
...
...
@@ -179,9 +185,19 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
jobDictMapper
.
insert
(
jobDictDO
);
}
//初始化运营者的职级
List
<
RankDictDO
>
rankDictDOS
=
rankDictMapper
.
selectList
(
new
QueryWrapper
<
RankDictDO
>()
.
lambda
()
.
isNull
(
RankDictDO:
:
getCompanyId
));
for
(
RankDictDO
rankDictDO
:
rankDictDOS
){
rankDictDO
.
setCompanyId
(
companyDictDO
.
getId
());
rankDictMapper
.
insert
(
rankDictDO
);
}
//班级类型
ClassTypeDictDO
classTypeDictDO
=
new
ClassTypeDictDO
();
classTypeDictDO
.
setClassType
(
"企业内训"
);
classTypeDictDO
.
setCompanyId
(
companyDictDO
.
getId
());
classTypeDictMapper
.
insert
(
classTypeDictDO
);
return
ConstantUtils
.
ADD_SUCCESS
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment