| | |
| | | import org.jeecg.modules.eam.base.entity.EamBaseRepairDepartUser; |
| | | import org.jeecg.modules.eam.base.mapper.EamBaseRepairDepartUserMapper; |
| | | import org.jeecg.modules.eam.base.service.IEamBaseRepairDepartService; |
| | | import org.jeecg.modules.system.entity.*; |
| | | import org.jeecg.modules.eam.base.mapper.EamBaseRepairDepartMapper; |
| | | import org.jeecg.modules.eam.base.model.EamBaseRepairDepartTreeModel; |
| | | import org.jeecg.modules.eam.base.model.RepairDepartIdModel; |
| | | import org.jeecg.modules.eam.base.util.FindsRepairDepartsChildrenUtil; |
| | | import org.jeecg.modules.system.entity.SysUser; |
| | | import org.jeecg.modules.system.mapper.SysUserMapper; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | // repairDepartEquipmentMapper.delete(new LambdaQueryWrapper<SysMaintainDepartEquipment>().in(SysMaintainDepartEquipment::getMaintainDepartId, idList)); |
| | | } |
| | | |
| | | /** |
| | | * 根据id查询下级维修部门班组 |
| | | */ |
| | | @Override |
| | | public List<EamBaseRepairDepart> queryRepDepByPid(String pid) { |
| | | return this.baseMapper.queryRepDepByPid(pid); |
| | | } |
| | | |
| | | // /** |
| | | // * 根据id查询下级维修部门班组 |
| | | // */ |
| | | // @Override |
| | | // public List<EamBaseRepairDepart> queryRepDepByPid(String pid) { |
| | | // return this.baseMapper.queryRepDepByPid(pid); |
| | | // } |
| | | // |
| | | /** |
| | | * 根据用户id获取维修部门班组下拉树选项 |
| | | */ |
| | |
| | | List<EamBaseRepairDepart> list = repairDepartList.stream().filter((EamBaseRepairDepart eamBaseRepairDepart) -> allMaintainDepartIds.contains(eamBaseRepairDepart.getId())).collect(Collectors.toList()); |
| | | return FindsRepairDepartsChildrenUtil.wrapTreeDataToMaintainDepartIdTreeList(list); |
| | | } |
| | | |
| | | /** |
| | | * 递归查询所有子节点id |
| | | */ |
| | | @Override |
| | | public List<String> recursionChildren(String repairDepartId) { |
| | | return this.baseMapper.recursionChildren(repairDepartId); |
| | | } |
| | | |
| | | /** |
| | | * 根据用户id和车间id获取用户拥有的车间id |
| | | * @param userId |
| | | * @param repairDepartId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public String findFirstMaintainDepart(String userId, String repairDepartId) { |
| | | return this.baseMapper.findFirstMaintain(userId, repairDepartId); |
| | | } |
| | | |
| | | /** |
| | | * 根据用户id查询用户维修部门班组权限 |
| | | */ |
| | | @Override |
| | | public String findThreeMaintainDepartId(String userId) { |
| | | return this.baseMapper.findThreeMaintainId(userId); |
| | | } |
| | | |
| | | @Override |
| | | public EamBaseRepairDepart findMaintainDepartList(String equipmentId) { |
| | | return this.baseMapper.findMaintainList(equipmentId); |
| | | } |
| | | // |
| | | // /** |
| | | // * 递归查询所有子节点id |
| | | // */ |
| | | // @Override |
| | | // public List<String> recursionChildren(String repairDepartId) { |
| | | // return this.baseMapper.recursionChildren(repairDepartId); |
| | | // } |
| | | // |
| | | // /** |
| | | // * 根据用户id和车间id获取用户拥有的车间id |
| | | // * @param userId |
| | | // * @param repairDepartId |
| | | // * @return |
| | | // */ |
| | | // @Override |
| | | // public String findFirstMaintainDepart(String userId, String repairDepartId) { |
| | | // return this.baseMapper.findFirstMaintain(userId, repairDepartId); |
| | | // } |
| | | // |
| | | // /** |
| | | // * 根据用户id查询用户维修部门班组权限 |
| | | // */ |
| | | // @Override |
| | | // public String findThreeMaintainDepartId(String userId) { |
| | | // return this.baseMapper.findThreeMaintainId(userId); |
| | | // } |
| | | // |
| | | // @Override |
| | | // public EamBaseRepairDepart findMaintainDepartList(String equipmentId) { |
| | | // return this.baseMapper.findMaintainList(equipmentId); |
| | | // } |
| | | |
| | | /** |
| | | * delete 方法调用 递归查找子集id |