| | |
| | | import com.ycl.entity.depart.UmsDepart; |
| | | import com.ycl.entity.dict.DataDictionary; |
| | | import com.ycl.mapper.depart.UmsDepartMapper; |
| | | import com.ycl.mapper.dict.DataDictionaryMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.ycl.mapper.dict.DataDictionary2Mapper; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import javax.annotation.Resource; |
| | | import java.util.Objects; |
| | | |
| | |
| | | @Resource |
| | | private UmsDepartMapper sccgDepartMapper; |
| | | @Resource |
| | | private DataDictionaryMapper dataDictionaryMapper; |
| | | private DataDictionary2Mapper dataDictionary2Mapper; |
| | | |
| | | // private static DepartListener departListener; |
| | | // |
| | |
| | | umsDepart.setDepartDes(umsDepartDto.getDepartDes()); |
| | | |
| | | // 设置部门类型 |
| | | DataDictionary dataDictionary = dataDictionaryMapper.selectOne(new LambdaQueryWrapper<DataDictionary>().eq(DataDictionary::getName, umsDepartDto.getDepartType())); |
| | | DataDictionary dataDictionary = dataDictionary2Mapper.selectOne(new LambdaQueryWrapper<DataDictionary>().eq(DataDictionary::getName, umsDepartDto.getDepartType())); |
| | | if (Objects.isNull(dataDictionary)){ |
| | | throw new RuntimeException("部门类型不存在"); |
| | | }else { |