| | |
| | | package com.qianwen.smartman.modules.dnc.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import java.lang.invoke.SerializedLambda; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | | import com.qianwen.smartman.common.cache.RegionCache; |
| | | import com.qianwen.smartman.common.constant.CommonConstant; |
| | | import com.qianwen.smartman.common.utils.Lambda; |
| | | import com.qianwen.smartman.common.utils.MessageUtils; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.qianwen.core.log.exception.ServiceException; |
| | | import com.qianwen.core.mp.base.BaseServiceImpl; |
| | | import com.qianwen.core.tool.utils.Func; |
| | | import com.qianwen.smartman.common.constant.CommonConstant; |
| | | import com.qianwen.smartman.common.utils.Lambda; |
| | | import com.qianwen.smartman.common.utils.MessageUtils; |
| | | import com.qianwen.smartman.modules.dnc.entity.DncFixedSpace; |
| | | import com.qianwen.smartman.modules.dnc.entity.DncWsRelationTd; |
| | | import com.qianwen.smartman.modules.dnc.entity.TransferDirectoryFile; |
| | |
| | | import com.qianwen.smartman.modules.dnc.vo.DncFixedSpaceAdVO; |
| | | import com.qianwen.smartman.modules.dnc.vo.DncFixedSpaceUpVO; |
| | | import com.qianwen.smartman.modules.dnc.vo.SpaceRootNodeVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | @Service |
| | | /* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/dnc/service/impl/DncFixedSpaceServiceImpl.class */ |
| | |
| | | @Lazy |
| | | private ITransferDirectoryFileService directoryFileService; |
| | | |
| | | private static /* synthetic */ Object $deserializeLambda$(SerializedLambda lambda) { |
| | | String implMethodName = lambda.getImplMethodName(); |
| | | boolean z = true; |
| | | switch (implMethodName.hashCode()) { |
| | | case -1041904421: |
| | | if (implMethodName.equals("getParentId")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case -557259320: |
| | | if (implMethodName.equals("getWorkstationId")) { |
| | | z = false; |
| | | break; |
| | | } |
| | | break; |
| | | case -75308287: |
| | | if (implMethodName.equals("getName")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case -75127775: |
| | | if (implMethodName.equals("getTdId")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 98245393: |
| | | if (implMethodName.equals("getId")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 124572976: |
| | | if (implMethodName.equals("getAllPath")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 388778789: |
| | | if (implMethodName.equals("getSpaceLocation")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 989020860: |
| | | if (implMethodName.equals("getStorageSpaceId")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | } |
| | | switch (z) { |
| | | case false: |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/DncWsRelationTd") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getWorkstationId(); |
| | | }; |
| | | } |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/DncWsRelationTd") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getWorkstationId(); |
| | | }; |
| | | } |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/DncWsRelationTd") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getWorkstationId(); |
| | | }; |
| | | } |
| | | break; |
| | | case true: |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/DncFixedSpace") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getName(); |
| | | }; |
| | | } |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/DncFixedSpace") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getName(); |
| | | }; |
| | | } |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/DncFixedSpace") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getName(); |
| | | }; |
| | | } |
| | | break; |
| | | case true: |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/DncFixedSpace") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getTdId(); |
| | | }; |
| | | } |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/DncFixedSpace") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getTdId(); |
| | | }; |
| | | } |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/DncFixedSpace") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getTdId(); |
| | | }; |
| | | } |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/DncFixedSpace") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getTdId(); |
| | | }; |
| | | } |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/DncFixedSpace") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getTdId(); |
| | | }; |
| | | } |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/DncFixedSpace") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getTdId(); |
| | | }; |
| | | } |
| | | break; |
| | | case true: |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/DncFixedSpace") && lambda.getImplMethodSignature().equals("()Ljava/lang/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getSpaceLocation(); |
| | | }; |
| | | } |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/DncFixedSpace") && lambda.getImplMethodSignature().equals("()Ljava/lang/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getSpaceLocation(); |
| | | }; |
| | | } |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/DncFixedSpace") && lambda.getImplMethodSignature().equals("()Ljava/lang/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getSpaceLocation(); |
| | | }; |
| | | } |
| | | break; |
| | | case true: |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/core/mp/base/BaseEntity") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getId(); |
| | | }; |
| | | } |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/core/mp/base/BaseEntity") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getId(); |
| | | }; |
| | | } |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/core/mp/base/BaseEntity") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getId(); |
| | | }; |
| | | } |
| | | break; |
| | | case RegionCache.VILLAGE_LEVEL /* 5 */: |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/DncFixedSpace") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getAllPath(); |
| | | }; |
| | | } |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/DncFixedSpace") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getAllPath(); |
| | | }; |
| | | } |
| | | break; |
| | | case true: |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/DncFixedSpace") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getParentId(); |
| | | }; |
| | | } |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/DncFixedSpace") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getParentId(); |
| | | }; |
| | | } |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/DncFixedSpace") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getParentId(); |
| | | }; |
| | | } |
| | | break; |
| | | case true: |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/TransferDirectoryFile") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getStorageSpaceId(); |
| | | }; |
| | | } |
| | | break; |
| | | } |
| | | throw new IllegalArgumentException("Invalid lambda deserialization"); |
| | | } |
| | | |
| | | |
| | | @Override // org.springblade.modules.dnc.service.IDncFixedSpaceService |
| | | public boolean initializeRootNode(String workstationId, String workstationName, String tdId) { |
| | | DncFixedSpace space = getOne(Wrappers.<DncFixedSpace>lambdaQuery().eq(DncFixedSpace::getName, workstationName) |
| | | .eq(DncFixedSpace::getParentId, workstationId).eq(DncFixedSpace::getTdId, tdId)); |
| | | |
| | | /* |
| | | DncFixedSpace space = (DncFixedSpace) getOne((Wrapper) ((LambdaQueryWrapper) ((LambdaQueryWrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getName(); |
| | | }, workstationName)).eq((v0) -> { |
| | | return v0.getParentId(); |
| | | }, workstationId)).eq((v0) -> { |
| | | return v0.getTdId(); |
| | | }, tdId)); |
| | | }, tdId));*/ |
| | | boolean result = Boolean.FALSE.booleanValue(); |
| | | if (space == null) { |
| | | DncFixedSpace fixedSpace = new DncFixedSpace(); |
| | |
| | | |
| | | @Override // org.springblade.modules.dnc.service.IDncFixedSpaceService |
| | | public Boolean updateName(DncFixedSpaceUpVO dncFixedSpaceUpVO) { |
| | | return Boolean.valueOf(update(Wrappers.<DncFixedSpace>lambdaUpdate().eq(DncFixedSpace::getTdId, Long.parseLong(dncFixedSpaceUpVO.getDirectoryId())) |
| | | .eq(DncFixedSpace::getId, dncFixedSpaceUpVO.getId()) |
| | | .set(DncFixedSpace::getName, dncFixedSpaceUpVO.getName()))); |
| | | /* |
| | | return Boolean.valueOf(update((Wrapper) ((LambdaUpdateWrapper) ((LambdaUpdateWrapper) Wrappers.lambdaUpdate().eq((v0) -> { |
| | | return v0.getTdId(); |
| | | }, Long.valueOf(Long.parseLong(dncFixedSpaceUpVO.getDirectoryId())))).eq((v0) -> { |
| | | return v0.getId(); |
| | | }, dncFixedSpaceUpVO.getId())).set((v0) -> { |
| | | return v0.getName(); |
| | | }, dncFixedSpaceUpVO.getName()))); |
| | | }, dncFixedSpaceUpVO.getName())));*/ |
| | | } |
| | | |
| | | @Override // org.springblade.modules.dnc.service.IDncFixedSpaceService |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public DncFixSpaceVO saveFixSpace(DncFixedSpaceAdVO dncFixedSpaceAdVO) { |
| | | DncFixSpaceVO dncFixSpaceVO = new DncFixSpaceVO(); |
| | | |
| | | DncFixedSpace one = getOne(Wrappers.<DncFixedSpace>lambdaQuery().eq(DncFixedSpace::getTdId, dncFixedSpaceAdVO.getDirectoryId()) |
| | | .eq(DncFixedSpace::getParentId, dncFixedSpaceAdVO.getParentId()).eq(DncFixedSpace::getName, dncFixedSpaceAdVO.getName())); |
| | | /* |
| | | DncFixedSpace one = (DncFixedSpace) getOne((Wrapper) ((LambdaQueryWrapper) ((LambdaQueryWrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getTdId(); |
| | | }, dncFixedSpaceAdVO.getDirectoryId())).eq((v0) -> { |
| | | return v0.getParentId(); |
| | | }, dncFixedSpaceAdVO.getParentId())).eq((v0) -> { |
| | | return v0.getName(); |
| | | }, dncFixedSpaceAdVO.getName())); |
| | | }, dncFixedSpaceAdVO.getName()));*/ |
| | | if (one != null) { |
| | | throw new ServiceException(MessageUtils.message("dnc.ftp.directory.already.exist.please.duplicate.creation", new Object[0])); |
| | | } |
| | |
| | | dncFixedSpace.setTdId(Long.valueOf(Long.parseLong(dncFixedSpaceAdVO.getDirectoryId()))); |
| | | dncFixedSpace.setParentId(Long.valueOf(Long.parseLong(dncFixedSpaceAdVO.getParentId()))); |
| | | save(dncFixedSpace); |
| | | update(Wrappers.<DncFixedSpace>lambdaUpdate().eq(DncFixedSpace::getId, dncFixedSpace.getId()) |
| | | .set(DncFixedSpace::getAllPath, parentDncFixedSpace.getAllPath() + "/" + dncFixedSpace.getId())); |
| | | /* |
| | | update((Wrapper) ((LambdaUpdateWrapper) Wrappers.lambdaUpdate().eq((v0) -> { |
| | | return v0.getId(); |
| | | }, dncFixedSpace.getId())).set((v0) -> { |
| | | return v0.getAllPath(); |
| | | }, parentDncFixedSpace.getAllPath() + "/" + dncFixedSpace.getId())); |
| | | }, parentDncFixedSpace.getAllPath() + "/" + dncFixedSpace.getId()));*/ |
| | | return dncFixSpaceVO.setId(dncFixedSpace.getId()).setAllPath(parentDncFixedSpace.getAllPath() + "/" + dncFixedSpace.getId()).setName(dncFixedSpaceAdVO.getName()).setParentId(Long.valueOf(Long.parseLong(dncFixedSpaceAdVO.getParentId()))).setTdId(Long.valueOf(Long.parseLong(dncFixedSpaceAdVO.getDirectoryId()))); |
| | | } |
| | | |
| | |
| | | if (dncFixedSpace == null) { |
| | | throw new ServiceException(MessageUtils.message("dnc.ftp.del.directory.fail", new Object[0])); |
| | | } |
| | | List<DncFixedSpace> dncFixedSpaces = this.baseMapper.selectList(Lambda.<DncFixedSpace>create().findIn(DncFixedSpace::getAllPath, id, "/")); |
| | | /* |
| | | List<DncFixedSpace> dncFixedSpaces = ((DncFixedSpaceMapper) this.baseMapper).selectList(Lambda.create().findIn((v0) -> { |
| | | return v0.getAllPath(); |
| | | }, id, "/")); |
| | | }, id, "/"));*/ |
| | | if (Func.isNotEmpty(dncFixedSpaces)) { |
| | | List<Long> removeIds = (List) dncFixedSpaces.stream().map((v0) -> { |
| | | List<Long> removeIds = dncFixedSpaces.stream().map((v0) -> { |
| | | return v0.getId(); |
| | | }).distinct().collect(Collectors.toList()); |
| | | List<TransferDirectoryFile> list = this.directoryFileService.list(Wrappers.<TransferDirectoryFile>lambdaQuery().in(TransferDirectoryFile::getStorageSpaceId, removeIds)); |
| | | /* |
| | | List<TransferDirectoryFile> list = this.directoryFileService.list((Wrapper) Wrappers.lambdaQuery().in((v0) -> { |
| | | return v0.getStorageSpaceId(); |
| | | }, removeIds)); |
| | | }, removeIds));*/ |
| | | if (Func.isNotEmpty(list)) { |
| | | this.directoryFileService.removeBatchByIds(list); |
| | | } |
| | |
| | | |
| | | @Override // org.springblade.modules.dnc.service.IDncFixedSpaceService |
| | | public List<DncFixSpaceVO> getFixSpaceTree(String workstationId, String nodeId) { |
| | | DncWsRelationTd dncWsRelationTd = this.wsRelationTdService.getOne(Wrappers.<DncWsRelationTd>lambdaQuery().eq(DncWsRelationTd::getWorkstationId, workstationId)); |
| | | /* |
| | | DncWsRelationTd dncWsRelationTd = (DncWsRelationTd) this.wsRelationTdService.getOne((Wrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getWorkstationId(); |
| | | }, workstationId)); |
| | | }, workstationId));*/ |
| | | if (dncWsRelationTd == null) { |
| | | throw new ServiceException(MessageUtils.message("dnc.workstation.not.binding.ftp.directory", new Object[0])); |
| | | } |
| | | List<DncFixedSpace> list = list(Wrappers.<DncFixedSpace>lambdaQuery().eq(DncFixedSpace::getParentId, nodeId) |
| | | .eq(DncFixedSpace::getTdId, dncWsRelationTd.getTransferDirectorId())); |
| | | /* |
| | | List<DncFixedSpace> list = list((Wrapper) ((LambdaQueryWrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getParentId(); |
| | | }, nodeId)).eq((v0) -> { |
| | | return v0.getTdId(); |
| | | }, dncWsRelationTd.getTransferDirectorId())); |
| | | }, dncWsRelationTd.getTransferDirectorId()));*/ |
| | | if (Func.isNotEmpty(list)) { |
| | | return (List) list.stream().map(item -> { |
| | | return list.stream().map(item -> { |
| | | DncFixSpaceVO dncFixSpace = new DncFixSpaceVO(); |
| | | dncFixSpace.setId(item.getId()); |
| | | dncFixSpace.setName(item.getName()); |
| | |
| | | @Override // org.springblade.modules.dnc.service.IDncFixedSpaceService |
| | | public SpaceRootNodeVO getRootNodeId(String workstationId) { |
| | | SpaceRootNodeVO spaceRootNodeVO = new SpaceRootNodeVO(); |
| | | DncWsRelationTd dncWsRelationTd = this.wsRelationTdService.getOne(Wrappers.<DncWsRelationTd>lambdaQuery().eq(DncWsRelationTd::getWorkstationId, workstationId)); |
| | | /* |
| | | DncWsRelationTd dncWsRelationTd = (DncWsRelationTd) this.wsRelationTdService.getOne((Wrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getWorkstationId(); |
| | | }, workstationId)); |
| | | }, workstationId));*/ |
| | | if (dncWsRelationTd == null) { |
| | | throw new ServiceException(MessageUtils.message("dnc.workstation.not.binding.ftp.directory", new Object[0])); |
| | | } |
| | | |
| | | DncFixedSpace dncFixedSpace = getOne(Wrappers.<DncFixedSpace>lambdaQuery() |
| | | .eq(DncFixedSpace::getTdId, dncWsRelationTd.getTransferDirectorId()) |
| | | .eq(DncFixedSpace::getSpaceLocation, CommonConstant.ASSOCIATED_DIRECTORY)); |
| | | /* |
| | | DncFixedSpace dncFixedSpace = (DncFixedSpace) getOne((Wrapper) ((LambdaQueryWrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getTdId(); |
| | | }, dncWsRelationTd.getTransferDirectorId())).eq((v0) -> { |
| | | return v0.getSpaceLocation(); |
| | | }, CommonConstant.ASSOCIATED_DIRECTORY)); |
| | | }, CommonConstant.ASSOCIATED_DIRECTORY));*/ |
| | | if (dncFixedSpace != null) { |
| | | spaceRootNodeVO.setRootNodeId(dncFixedSpace.getId()).setName(dncFixedSpace.getName()).setParentId(dncFixedSpace.getParentId()).setTitle(dncFixedSpace.getName()); |
| | | } |
| | |
| | | |
| | | @Override // org.springblade.modules.dnc.service.IDncFixedSpaceService |
| | | public Boolean isRootSpace(Long fixId) { |
| | | DncFixedSpace dncFixedSpace = getOne(Wrappers.<DncFixedSpace>lambdaQuery() |
| | | .eq(DncFixedSpace::getId, fixId).eq(DncFixedSpace::getSpaceLocation, CommonConstant.ASSOCIATED_DIRECTORY)); |
| | | /* |
| | | DncFixedSpace dncFixedSpace = (DncFixedSpace) getOne((Wrapper) ((LambdaQueryWrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getId(); |
| | | }, fixId)).eq((v0) -> { |
| | | return v0.getSpaceLocation(); |
| | | }, CommonConstant.ASSOCIATED_DIRECTORY)); |
| | | }, CommonConstant.ASSOCIATED_DIRECTORY));*/ |
| | | if (dncFixedSpace != null) { |
| | | return Boolean.TRUE; |
| | | } |
| | |
| | | List<DncFixedSpace> list = list(); |
| | | Long rootNodeId = getRootNodeId(String.valueOf(workstationId)).getRootNodeId(); |
| | | if (Func.isNotEmpty(list)) { |
| | | Map<Long, DncFixedSpace> dncFixedSpaceMap = (Map) list.stream().collect(Collectors.toMap((v0) -> { |
| | | Map<Long, DncFixedSpace> dncFixedSpaceMap = list.stream().collect(Collectors.toMap((v0) -> { |
| | | return v0.getId(); |
| | | }, Function.identity())); |
| | | list.forEach(fix -> { |
| | |
| | | |
| | | @Override // org.springblade.modules.dnc.service.IDncFixedSpaceService |
| | | public Map<Long, DncWsRelationTd> getWorkstationRelationDirectory() { |
| | | return (Map) this.wsRelationTdService.list().stream().collect(Collectors.toMap((v0) -> { |
| | | return this.wsRelationTdService.list().stream().collect(Collectors.toMap((v0) -> { |
| | | return v0.getWorkstationId(); |
| | | }, Function.identity())); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.dnc.service.IDncFixedSpaceService |
| | | public List<DncFixSpaceTreeVO> getFixSpaceDirectLoadingTree(Long workstationId) { |
| | | DncWsRelationTd dncWsRelationTd = this.wsRelationTdService.getOne(Wrappers.<DncWsRelationTd>lambdaQuery().eq(DncWsRelationTd::getWorkstationId, workstationId)); |
| | | /* |
| | | DncWsRelationTd dncWsRelationTd = (DncWsRelationTd) this.wsRelationTdService.getOne((Wrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getWorkstationId(); |
| | | }, workstationId)); |
| | | }, workstationId));*/ |
| | | if (dncWsRelationTd == null) { |
| | | throw new ServiceException(MessageUtils.message("dnc.workstation.not.binding.ftp.directory", new Object[0])); |
| | | } |
| | | List<DncFixedSpace> list = list(Wrappers.<DncFixedSpace>lambdaQuery().eq(DncFixedSpace::getTdId, dncWsRelationTd.getTransferDirectorId())); |
| | | /* |
| | | List<DncFixedSpace> list = list((Wrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getTdId(); |
| | | }, dncWsRelationTd.getTransferDirectorId())); |
| | | }, dncWsRelationTd.getTransferDirectorId()));*/ |
| | | if (Func.isNotEmpty(list)) { |
| | | return (List) list.stream().map(item -> { |
| | | return list.stream().map(item -> { |
| | | DncFixSpaceTreeVO dncFixSpace = new DncFixSpaceTreeVO(); |
| | | dncFixSpace.setId(item.getId()); |
| | | dncFixSpace.setName(item.getName()); |
| | |
| | | return dncFixSpace; |
| | | }).collect(Collectors.toList()); |
| | | } |
| | | return new ArrayList(); |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.dnc.service.IDncFixedSpaceService |
| | | public Map<Long, DncFixedSpace> getRootSpace() { |
| | | List<DncFixedSpace> list = list(Wrappers.<DncFixedSpace>lambdaQuery().eq(DncFixedSpace::getSpaceLocation,1)); |
| | | /* |
| | | List<DncFixedSpace> list = list((Wrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getSpaceLocation(); |
| | | }, 1)); |
| | | }, 1));*/ |
| | | if (Func.isNotEmpty(list)) { |
| | | return (Map) list.stream().collect(Collectors.toMap((v0) -> { |
| | | return list.stream().collect(Collectors.toMap((v0) -> { |
| | | return v0.getTdId(); |
| | | }, Function.identity())); |
| | | } |