| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public int initFunctionalDistribution(Long companyId) { |
| | | |
| | | if (!companyId.equals(SecurityUtils.getCompanyId())){ |
| | | throw new ApiException("无权操作!"); |
| | | } |
| | | sysFunctionalDistributionMapper.delete(new LambdaQueryWrapper<SysFunctionalDistribution>().eq(SysFunctionalDistribution::getCompanyId, SecurityUtils.getLoginUser().getUser().getCompanyId())); |
| | | |
| | | sysFunctionalDistributionMapper.delByCompanyId(companyId); |
| | | SysDept sysDept = new SysDept(); |
| | | sysDept.setCompanyId(companyId); |
| | | List<DeptVo> deptVos = deptMapper.selectDeptList(sysDept); |
| | |
| | | |
| | | if (!emptyIdClauseNums.isEmpty()){ |
| | | List<SysDeptResponsibility> sysDeptResponsibilities = deptResponsibilityMapper.selectList(new LambdaQueryWrapper<SysDeptResponsibility>() |
| | | .eq(SysDeptResponsibility::getDeptId, reqVo.getDeptId()).in(SysDeptResponsibility::getClauseNum, emptyIdClauseNums).notIn(SysDeptResponsibility::getId, emptyIdClauseIds)); |
| | | .eq(SysDeptResponsibility::getDeptId, reqVo.getDeptId()) |
| | | .in(SysDeptResponsibility::getClauseNum, emptyIdClauseNums) |
| | | .notIn(SysDeptResponsibility::getId, emptyIdClauseIds).eq(SysDeptResponsibility::getDelFlag, "0")); |
| | | if (!sysDeptResponsibilities.isEmpty()){ |
| | | throw new ApiException("部门条款编码重复!"); |
| | | } |
| | |
| | | .collect(Collectors.toList()); |
| | | if (!emptyIdClauseNums.isEmpty()){ |
| | | List<SysDeptResponsibility> sysDeptResponsibilities = deptResponsibilityMapper.selectList(new LambdaQueryWrapper<SysDeptResponsibility>() |
| | | .eq(SysDeptResponsibility::getDeptId, deptId).in(SysDeptResponsibility::getClauseNum, emptyIdClauseNums)); |
| | | .eq(SysDeptResponsibility::getDeptId, deptId).in(SysDeptResponsibility::getClauseNum, emptyIdClauseNums) |
| | | .eq(SysDeptResponsibility::getCompanyId, companyId).eq(SysDeptResponsibility::getDelFlag, "0")); |
| | | if (!sysDeptResponsibilities.isEmpty()){ |
| | | throw new ApiException("部门条款编码重复!"); |
| | | } |