| | |
| | | package org.jeecg.modules.eam.base.service.impl; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
| | |
| | | import org.jeecg.modules.eam.base.model.EamBaseFactoryTreeModel; |
| | | import org.jeecg.modules.eam.base.model.WorkShopIdModel; |
| | | import org.jeecg.modules.eam.base.service.IBaseFactoryService; |
| | | import org.jeecg.modules.eam.base.controller.util.FindsBaseFactorysChildrenUtil; |
| | | import org.jeecg.modules.eam.base.util.FindsBaseFactorysChildrenUtil; |
| | | import org.jeecg.modules.system.entity.SysUser; |
| | | import org.jeecg.modules.system.mapper.SysUserMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void saveBaseFactoryData(BaseFactory BaseFactory) { |
| | | if (BaseFactory != null) { |
| | | if (BaseFactory.getParentId() == null) { |
| | | if (BaseFactory.getParentId() == null|| StrUtil.isEmpty(BaseFactory.getParentId())) { |
| | | BaseFactory.setParentId(""); |
| | | BaseFactory.setFactoryCategory("0"); |
| | | } |
| | | if (BaseFactory.getFactoryCategory() == null|| StrUtil.isEmpty(BaseFactory.getFactoryCategory())) { |
| | | BaseFactory.setFactoryCategory("1"); |
| | | } |
| | | BaseFactory.setId(IdWorker.getIdStr(BaseFactory)); |
| | | // 先判断该对象有无父级ID,有则意味着不是最高级,否则意味着是最高级 |