Commit 899d8777 by 涂亚平

临时上个版本 联调中

1 parent f1e581fc
...@@ -16,6 +16,7 @@ import com.subsidy.mapper.CompanyFieldMappingMapper; ...@@ -16,6 +16,7 @@ import com.subsidy.mapper.CompanyFieldMappingMapper;
import com.subsidy.mapper.DepartmentDictMapper; import com.subsidy.mapper.DepartmentDictMapper;
import com.subsidy.mapper.FieldDictMapper; import com.subsidy.mapper.FieldDictMapper;
import com.subsidy.mapper.JobDictMapper; import com.subsidy.mapper.JobDictMapper;
import com.subsidy.mapper.RankDictMapper;
import com.subsidy.mapper.RoleAdministerMappingMapper; import com.subsidy.mapper.RoleAdministerMappingMapper;
import com.subsidy.model.AdministerDO; import com.subsidy.model.AdministerDO;
import com.subsidy.model.ClassHourDictDO; import com.subsidy.model.ClassHourDictDO;
...@@ -25,6 +26,7 @@ import com.subsidy.model.CompanyFieldMappingDO; ...@@ -25,6 +26,7 @@ import com.subsidy.model.CompanyFieldMappingDO;
import com.subsidy.model.DepartmentDictDO; import com.subsidy.model.DepartmentDictDO;
import com.subsidy.model.FieldDictDO; import com.subsidy.model.FieldDictDO;
import com.subsidy.model.JobDictDO; import com.subsidy.model.JobDictDO;
import com.subsidy.model.RankDictDO;
import com.subsidy.model.RoleAdministerMappingDO; import com.subsidy.model.RoleAdministerMappingDO;
import com.subsidy.service.CompanyDictService; import com.subsidy.service.CompanyDictService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
...@@ -79,21 +81,25 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa ...@@ -79,21 +81,25 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
@Autowired @Autowired
private ClassHourDictMapper classHourDictMapper; private ClassHourDictMapper classHourDictMapper;
@Autowired
private RankDictMapper rankDictMapper;
public IPage<OperatorsVO> operators(OperatorsDTO operatorsDTO) { public IPage<OperatorsVO> operators(OperatorsDTO operatorsDTO) {
Page pager = new Page(operatorsDTO.getPageNum(), operatorsDTO.getPageSize()); 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()); 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()); IPage page = this.baseMapper.operators(pager, operatorsDTO.getCompanyName(), operatorsDTO.getFieldId(),administerDO.getCompanyId());
List<OperatorsVO> operatorsVOS = page.getRecords(); List<OperatorsVO> operatorsVOS = page.getRecords();
for (OperatorsVO operatorsVO : operatorsVOS) { for (OperatorsVO operatorsVO : operatorsVOS) {
...@@ -179,9 +185,19 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa ...@@ -179,9 +185,19 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
jobDictMapper.insert(jobDictDO); 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 classTypeDictDO = new ClassTypeDictDO();
classTypeDictDO.setClassType("企业内训"); classTypeDictDO.setClassType("企业内训");
classTypeDictDO.setCompanyId(companyDictDO.getId());
classTypeDictMapper.insert(classTypeDictDO); classTypeDictMapper.insert(classTypeDictDO);
return ConstantUtils.ADD_SUCCESS; return ConstantUtils.ADD_SUCCESS;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!