| | |
| | | umsDepart.setDepartDes(umsDepartDto.getDepartDes()); |
| | | |
| | | // 设置部门类型 |
| | | // LambdaQueryWrapper<DataDictionary> dataDictionaryLambdaQueryWrapper = new LambdaQueryWrapper<DataDictionary>(DataDictionary::getName, umsDepartDto.getDepartTypeName()); |
| | | //// DataDictionary dataDictionary = dataDictionaryMapper.selectOne(new LambdaQueryWrapper(DataDictionary)); |
| | | //// sccgDepartMapper.selectOne(new LambdaQueryWrapper<UmsDepart>(UmsDepart::getDepartType)) |
| | | //// umsDepart.setDepartType(umsDepartDto.getDepartType()); |
| | | DataDictionary dataDictionary = dataDictionaryMapper.selectOne(new LambdaQueryWrapper<DataDictionary>().eq(DataDictionary::getName, umsDepartDto.getDepartType())); |
| | | if (Objects.isNull(dataDictionary)){ |
| | | throw new RuntimeException("部门类型不存在"); |
| | | }else { |
| | | umsDepart.setDepartType(new Long(dataDictionary.getId()).intValue()); |
| | | } |
| | | |
| | | // 设置父id |
| | | UmsDepart two = sccgDepartMapper.selectOne(new LambdaQueryWrapper<UmsDepart>().eq(UmsDepart::getDepartName, umsDepartDto.getParentDepartName())); |