| | |
| | | package com.qianwen.smartman.modules.dnc.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.google.common.collect.Lists; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.lang.invoke.SerializedLambda; |
| | | import java.net.URLEncoder; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.ArrayList; |
| | | import java.util.Collection; |
| | | import java.util.Comparator; |
| | | import java.util.Date; |
| | | import java.util.LinkedList; |
| | |
| | | import java.util.TreeSet; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import com.qianwen.smartman.common.cache.RegionCache; |
| | | import com.qianwen.smartman.common.constant.CommonConstant; |
| | | import com.qianwen.smartman.common.constant.DncConstant; |
| | | import com.qianwen.smartman.common.utils.MessageUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.google.common.collect.Lists; |
| | | import com.qianwen.core.log.exception.ServiceException; |
| | | import com.qianwen.core.mp.base.BaseServiceImpl; |
| | | import com.qianwen.core.mp.support.Condition; |
| | |
| | | import com.qianwen.core.secure.BladeUser; |
| | | import com.qianwen.core.secure.utils.AuthUtil; |
| | | import com.qianwen.core.tool.utils.Func; |
| | | import com.qianwen.smartman.common.constant.CommonConstant; |
| | | import com.qianwen.smartman.common.constant.DncConstant; |
| | | import com.qianwen.smartman.common.utils.MessageUtils; |
| | | import com.qianwen.smartman.modules.cps.entity.Machine; |
| | | import com.qianwen.smartman.modules.cps.entity.Workstation; |
| | | import com.qianwen.smartman.modules.cps.entity.WorkstationOfMachine; |
| | |
| | | import com.qianwen.smartman.modules.resource.builder.oss.OssBuilder; |
| | | import com.qianwen.smartman.modules.system.entity.User; |
| | | import com.qianwen.smartman.modules.system.service.IUserService; |
| | | 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/TransferDirectoryFileServiceImpl.class */ |
| | |
| | | private final IObsFileService obsFileService; |
| | | private final IDncFixedSpaceService fixedSpaceService; |
| | | private final OssBuilder ossBuilder; |
| | | |
| | | private static /* synthetic */ Object $deserializeLambda$(SerializedLambda lambda) { |
| | | String implMethodName = lambda.getImplMethodName(); |
| | | boolean z = true; |
| | | switch (implMethodName.hashCode()) { |
| | | case -75127775: |
| | | if (implMethodName.equals("getTdId")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 98245393: |
| | | if (implMethodName.equals("getId")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 537556537: |
| | | if (implMethodName.equals("getIsCurrent")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 727664238: |
| | | if (implMethodName.equals("getOriginalFilename")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 973507584: |
| | | if (implMethodName.equals("getCovertTime")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 989020860: |
| | | if (implMethodName.equals("getStorageSpaceId")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 1342380108: |
| | | if (implMethodName.equals("getFileType")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 1343131517: |
| | | if (implMethodName.equals("getFilename")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 1388468386: |
| | | if (implMethodName.equals("getVersion")) { |
| | | z = false; |
| | | break; |
| | | } |
| | | break; |
| | | case 1956478023: |
| | | if (implMethodName.equals("getTransferDirectoryId")) { |
| | | 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/TransferDirectoryFile") && lambda.getImplMethodSignature().equals("()Ljava/lang/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getVersion(); |
| | | }; |
| | | } |
| | | 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/String;")) { |
| | | return (v0) -> { |
| | | return v0.getOriginalFilename(); |
| | | }; |
| | | } |
| | | 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/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getIsCurrent(); |
| | | }; |
| | | } |
| | | 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/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getIsCurrent(); |
| | | }; |
| | | } |
| | | 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/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getIsCurrent(); |
| | | }; |
| | | } |
| | | 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/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getIsCurrent(); |
| | | }; |
| | | } |
| | | 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/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getIsCurrent(); |
| | | }; |
| | | } |
| | | 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/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getIsCurrent(); |
| | | }; |
| | | } |
| | | 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/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getIsCurrent(); |
| | | }; |
| | | } |
| | | 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/DncFactoryFile") && lambda.getImplMethodSignature().equals("()Ljava/lang/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getIsCurrent(); |
| | | }; |
| | | } |
| | | 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/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getIsCurrent(); |
| | | }; |
| | | } |
| | | 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/String;")) { |
| | | return (v0) -> { |
| | | return v0.getFilename(); |
| | | }; |
| | | } |
| | | 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(); |
| | | }; |
| | | } |
| | | 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/TransferDirectoryFile") && lambda.getImplMethodSignature().equals("()Ljava/util/Date;")) { |
| | | return (v0) -> { |
| | | return v0.getCovertTime(); |
| | | }; |
| | | } |
| | | 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(); |
| | | }; |
| | | } |
| | | 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 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.getTransferDirectoryId(); |
| | | }; |
| | | } |
| | | 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.getTransferDirectoryId(); |
| | | }; |
| | | } |
| | | 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(); |
| | | }; |
| | | } |
| | | 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(); |
| | | }; |
| | | } |
| | | 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(); |
| | | }; |
| | | } |
| | | 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(); |
| | | }; |
| | | } |
| | | 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(); |
| | | }; |
| | | } |
| | | 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; |
| | | 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/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getFileType(); |
| | | }; |
| | | } |
| | | 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/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getFileType(); |
| | | }; |
| | | } |
| | | break; |
| | | } |
| | | throw new IllegalArgumentException("Invalid lambda deserialization"); |
| | | } |
| | | |
| | | public TransferDirectoryFileServiceImpl(final IWorkstationService workstationService, final IDncOperationLogService operationLogService, final IFileService fileService, final IUserService userService, final IDncFactoryFileService dncFactoryFileService, final TransferDirectoryFileMapper transferDirectoryFileMapper, final IWorkstationOfMachineService workstationOfMachineService, final IMachineService machineService, final DncOnlineFileClient dncOnlineFileClient, final IDncArtFileService artFileService, final IObsFileService obsFileService, final IDncFixedSpaceService fixedSpaceService, final OssBuilder ossBuilder) { |
| | | this.workstationService = workstationService; |
| | |
| | | Map<Long, DncFixedSpace> dncFixedSpaceMap = null; |
| | | List<DncFixedSpace> list = this.fixedSpaceService.list(); |
| | | if (Func.isNotEmpty(list)) { |
| | | dncFixedSpaceMap = (Map) list.stream().collect(Collectors.toMap((v0) -> { |
| | | dncFixedSpaceMap = list.stream().collect(Collectors.toMap((v0) -> { |
| | | return v0.getId(); |
| | | }, Function.identity())); |
| | | } |
| | |
| | | } |
| | | Map<String, TransferDirectoryFile> transferDirectoryFileMap = null; |
| | | if (Func.isNotEmpty(repeatFileIds) && repeatFileIds.size() > 0) { |
| | | update(Wrappers.<TransferDirectoryFile>lambdaUpdate().in(TransferDirectoryFile::getId, repeatFileIds) |
| | | .set(TransferDirectoryFile::getIsCurrent, DncEnums.CurrentVersion.NO.getCode()) |
| | | .set(TransferDirectoryFile::getCovertTime, new Date())); |
| | | List<TransferDirectoryFile> exitList = list(Wrappers.<TransferDirectoryFile>lambdaQuery().in(TransferDirectoryFile::getId, repeatFileIds)); |
| | | /* |
| | | update((Wrapper) ((LambdaUpdateWrapper) ((LambdaUpdateWrapper) Wrappers.lambdaUpdate().in((v0) -> { |
| | | return v0.getId(); |
| | | }, repeatFileIds)).set((v0) -> { |
| | |
| | | }, new Date())); |
| | | List<TransferDirectoryFile> exitList = list((Wrapper) Wrappers.lambdaQuery().in((v0) -> { |
| | | return v0.getId(); |
| | | }, repeatFileIds)); |
| | | }, repeatFileIds));*/ |
| | | if (Func.isNotEmpty(exitList)) { |
| | | transferDirectoryFileMap = (Map) exitList.stream().collect(Collectors.toMap(s -> { |
| | | transferDirectoryFileMap = exitList.stream().collect(Collectors.toMap(s -> { |
| | | return s.getFilename() + "/" + s.getFileType() + "/" + s.getStorageSpaceId(); |
| | | }, Function.identity())); |
| | | } |
| | |
| | | workstationDirectoryFileVOList.forEach(sa -> { |
| | | List<TransferDirectoryFile> list = null; |
| | | if (Func.isNotEmpty(sa.getStorageSpaceId())) { |
| | | list = list(Wrappers.<TransferDirectoryFile>lambdaQuery().eq(TransferDirectoryFile::getStorageSpaceId, sa.getStorageSpaceId())); |
| | | /* |
| | | list = list((Wrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getStorageSpaceId(); |
| | | }, sa.getStorageSpaceId())); |
| | | }, sa.getStorageSpaceId()));*/ |
| | | } |
| | | if (Func.isEmpty(sa.getStorageSpaceId())) { |
| | | list = list(Wrappers.<TransferDirectoryFile>lambdaQuery().eq(TransferDirectoryFile::getStorageSpaceId, storageSpaceId)); |
| | | /* |
| | | list = list((Wrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getStorageSpaceId(); |
| | | }, storageSpaceId)); |
| | | }, storageSpaceId));*/ |
| | | } |
| | | if (Func.isNotEmpty(list)) { |
| | | Map<String, TransferDirectoryFile> fileMap = (Map) list.stream().filter(s -> { |
| | | Map<String, TransferDirectoryFile> fileMap = list.stream().filter(s -> { |
| | | return s.getIsCurrent().equals(DncEnums.CurrentVersion.YES.getCode()); |
| | | }).collect(Collectors.toMap(s2 -> { |
| | | return s2.getFilename() + "/" + s2.getFileType() + "/" + s2.getStorageSpaceId(); |
| | |
| | | workstationDirectoryFileVOList.forEach(sa -> { |
| | | List<TransferDirectoryFile> list = null; |
| | | if (Func.isNotEmpty(sa.getStorageSpaceId())) { |
| | | list = list(Wrappers.<TransferDirectoryFile>lambdaQuery() |
| | | .eq(TransferDirectoryFile::getStorageSpaceId, sa.getStorageSpaceId()) |
| | | .eq(TransferDirectoryFile::getIsCurrent, DncEnums.CurrentVersion.YES.getCode())); |
| | | /* |
| | | list = list((Wrapper) ((LambdaQueryWrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getStorageSpaceId(); |
| | | }, sa.getStorageSpaceId())).eq((v0) -> { |
| | | return v0.getIsCurrent(); |
| | | }, DncEnums.CurrentVersion.YES.getCode())); |
| | | }, DncEnums.CurrentVersion.YES.getCode()));*/ |
| | | } |
| | | if (Func.isEmpty(sa.getStorageSpaceId())) { |
| | | list = list(Wrappers.<TransferDirectoryFile>lambdaQuery( |
| | | ).eq(TransferDirectoryFile::getStorageSpaceId, storageSpaceId) |
| | | .eq(TransferDirectoryFile::getIsCurrent, DncEnums.CurrentVersion.YES.getCode())); |
| | | /* |
| | | list = list((Wrapper) ((LambdaQueryWrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getStorageSpaceId(); |
| | | }, storageSpaceId)).eq((v0) -> { |
| | | return v0.getIsCurrent(); |
| | | }, DncEnums.CurrentVersion.YES.getCode())); |
| | | }, DncEnums.CurrentVersion.YES.getCode()));*/ |
| | | } |
| | | if (Func.isNotEmpty(list)) { |
| | | Map<String, TransferDirectoryFile> fileMap = (Map) list.stream().collect(Collectors.toMap(s -> { |
| | | Map<String, TransferDirectoryFile> fileMap = list.stream().collect(Collectors.toMap(s -> { |
| | | return s.getFilename() + "/" + s.getFileType() + "/" + s.getStorageSpaceId(); |
| | | }, Function.identity())); |
| | | TransferDirectoryFile transferDirectoryFile = null; |
| | |
| | | } |
| | | String fromPath = ""; |
| | | if (Func.isNotEmpty(ids)) { |
| | | fromPath = this.fileService.list(Wrappers.<File>lambdaQuery().in(File::getId, ids)).stream().map(File::getDisplayName).collect(Collectors.joining("/")); |
| | | /* |
| | | fromPath = (String) this.fileService.list((Wrapper) Wrappers.lambdaQuery().in((v0) -> { |
| | | return v0.getId(); |
| | | }, ids)).stream().map((v0) -> { |
| | | return v0.getDisplayName(); |
| | | }).collect(Collectors.joining("/")); |
| | | }).collect(Collectors.joining("/"));*/ |
| | | } |
| | | DncOperationLogDto dncOperationLogDto = new DncOperationLogDto(); |
| | | WorkstationVO workstationVO = this.workstationService.getDetail(transferDirectoryFile.getWorkstationId()); |
| | |
| | | @Override // org.springblade.modules.dnc.service.ITransferDirectoryFileService |
| | | public List<FileHistoryVO> getFileCoverHistory(String id) { |
| | | TransferDirectoryFile transferDirectoryFile; |
| | | Map<Long, User> userMap = (Map) this.userService.list().stream().collect(Collectors.toMap((v0) -> { |
| | | Map<Long, User> userMap = this.userService.list().stream().collect(Collectors.toMap((v0) -> { |
| | | return v0.getId(); |
| | | }, Function.identity())); |
| | | if (Func.isNotBlank(id) && (transferDirectoryFile = (TransferDirectoryFile) getById(id)) != null) { |
| | | Long transferDirectoryId = transferDirectoryFile.getTransferDirectoryId(); |
| | | String filename = transferDirectoryFile.getFilename(); |
| | | Integer fileType = transferDirectoryFile.getFileType(); |
| | | List<TransferDirectoryFile> list = list(Wrappers.<TransferDirectoryFile>lambdaQuery().eq(TransferDirectoryFile::getTransferDirectoryId, transferDirectoryId) |
| | | .eq(TransferDirectoryFile::getFilename, filename) |
| | | .eq(TransferDirectoryFile::getFileType, fileType) |
| | | .eq(TransferDirectoryFile::getStorageSpaceId, transferDirectoryFile.getStorageSpaceId()) |
| | | .orderByDesc(TransferDirectoryFile::getIsCurrent).orderByDesc(TransferDirectoryFile::getVersion)); |
| | | /* |
| | | List<TransferDirectoryFile> list = list((Wrapper) ((LambdaQueryWrapper) ((LambdaQueryWrapper) ((LambdaQueryWrapper) ((LambdaQueryWrapper) ((LambdaQueryWrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getTransferDirectoryId(); |
| | | }, transferDirectoryId)).eq((v0) -> { |
| | |
| | | return v0.getIsCurrent(); |
| | | })).orderByDesc((v0) -> { |
| | | return v0.getVersion(); |
| | | })); |
| | | }));*/ |
| | | if (Func.isNotEmpty(list)) { |
| | | List<Long> artFileIds = (List) list.stream().filter(s -> { |
| | | List<Long> artFileIds = list.stream().filter(s -> { |
| | | return DncEnums.FileSource.PROCESSING_PROGRAM.getCode().equals(s.getFileSource()); |
| | | }).map((v0) -> { |
| | | return v0.getCraftFileId(); |
| | | }).collect(Collectors.toList()); |
| | | Map<Long, ArtFileInformationDTO> artFileInformationMap = artFileInformationMap(artFileIds); |
| | | return (List) list.stream().map(s2 -> { |
| | | return list.stream().map(s2 -> { |
| | | ArtFileInformationDTO fileInformation; |
| | | FileHistoryVO build = FileHistoryVO.builder().id(s2.getId()).createTime(s2.getCreateTime()).filename(s2.getFilename()).objectKey(s2.getObjectKey()).isCurrent(s2.getIsCurrent()).covertTime(s2.getCovertTime()).link(s2.getLink()).contentMd5(s2.getContentMd5()).contentLength(s2.getContentLength()).contentType(s2.getContentType()).suffix(s2.getSuffix()).createUser(String.valueOf(s2.getCreateUser())).updateUser(String.valueOf(s2.getUpdateUser())).createUserName(userMap.get(s2.getCreateUser()) != null ? ((User) userMap.get(s2.getCreateUser())).getAccount() : "").updateUserName(userMap.get(s2.getUpdateUser()) != null ? ((User) userMap.get(s2.getUpdateUser())).getAccount() : "").updateTime(s2.getUpdateTime()).version(s2.getVersion() != null ? String.valueOf(s2.getVersion()) : "1").versionDesc(s2.getVersion() + CommonConstant.FILE_SUFFIX).build(); |
| | | if (DncEnums.FileSource.PROCESSING_PROGRAM.getCode().equals(s2.getFileSource()) && !artFileInformationMap.isEmpty() && (fileInformation = (ArtFileInformationDTO) artFileInformationMap.get(s2.getCraftFileId())) != null) { |
| | |
| | | }).collect(Collectors.toList()); |
| | | } |
| | | } |
| | | return new ArrayList(); |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.dnc.service.ITransferDirectoryFileService |
| | |
| | | if (file == null || !DncEnums.CurrentVersion.YES.getCode().equals(file.getIsCurrent())) { |
| | | throw new ServiceException(MessageUtils.message("dnc.workstation.file.is.not.exist.or.is.not.current.version", new Object[0])); |
| | | } |
| | | |
| | | boolean updateSwitch = update(Wrappers.<TransferDirectoryFile>lambdaUpdate().set(TransferDirectoryFile::getIsCurrent, DncEnums.CurrentVersion.YES.getCode()).eq(TransferDirectoryFile::getId, fileVersionSwitchVO.getSwitchFileId())); |
| | | boolean updateCurrent = update(Wrappers.<TransferDirectoryFile>lambdaUpdate().set(TransferDirectoryFile::getIsCurrent, DncEnums.CurrentVersion.NO.getCode()).eq(TransferDirectoryFile::getId, fileVersionSwitchVO.getCurrentFileId())); |
| | | |
| | | /* |
| | | boolean updateSwitch = update((Wrapper) ((LambdaUpdateWrapper) Wrappers.lambdaUpdate().set((v0) -> { |
| | | return v0.getIsCurrent(); |
| | | }, DncEnums.CurrentVersion.YES.getCode())).eq((v0) -> { |
| | |
| | | }, DncEnums.CurrentVersion.NO.getCode())).eq((v0) -> { |
| | | return v0.getId(); |
| | | }, fileVersionSwitchVO.getCurrentFileId())); |
| | | */ |
| | | if (updateSwitch && updateCurrent) { |
| | | result = true; |
| | | } |
| | |
| | | if (collect.size() > 0) { |
| | | noSuffix = CommonConstant.NOT_SUFFIX; |
| | | } |
| | | suffixs = (List) suffixs.stream().filter(s -> { |
| | | suffixs = suffixs.stream().filter(s -> { |
| | | return !CommonConstant.NOT_SUFFIX.equals(s); |
| | | }).collect(Collectors.toList()); |
| | | } |
| | |
| | | }); |
| | | return page.setRecords(filePages); |
| | | } |
| | | return page.setRecords(new ArrayList()); |
| | | return page.setRecords(new ArrayList<>()); |
| | | } |
| | | |
| | | private List<String> getStringList(List<String> suffixs) { |
| | | return (List) suffixs.stream().filter((v1) -> { |
| | | |
| | | return suffixs.stream().filter(CommonConstant.NOT_SUFFIX::equals).collect(Collectors.toList()); |
| | | /* |
| | | return suffixs.stream().filter((v1) -> { |
| | | return r1.equals(v1); |
| | | }).collect(Collectors.toList()); |
| | | }).collect(Collectors.toList());*/ |
| | | } |
| | | |
| | | @Override // org.springblade.modules.dnc.service.ITransferDirectoryFileService |
| | |
| | | if (DncConstant.REGULAR_SPACE.equals(regularSpace)) { |
| | | storageSpaceIds.add(storageRootSpaceId.getId()); |
| | | } else { |
| | | List<DncFixedSpace> list = this.fixedSpaceService.list(Wrappers.<DncFixedSpace>lambdaQuery().eq(DncFixedSpace::getTdId, storageRootSpaceId.getTdId())); |
| | | /* |
| | | List<DncFixedSpace> list = this.fixedSpaceService.list((Wrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getTdId(); |
| | | }, storageRootSpaceId.getTdId())); |
| | | }, storageRootSpaceId.getTdId()));*/ |
| | | if (Func.isNotEmpty(list)) { |
| | | storageSpaceIds.addAll((Collection) list.stream().map((v0) -> { |
| | | storageSpaceIds.addAll(list.stream().map((v0) -> { |
| | | return v0.getId(); |
| | | }).distinct().collect(Collectors.toList())); |
| | | } |
| | |
| | | DncFixedSpace storageRootSpaceId2 = getStorageRootSpaceId(Long.valueOf(Func.toLong(workstationId))); |
| | | if (storageRootSpaceId2 != null) { |
| | | Long tdId = storageRootSpaceId2.getTdId(); |
| | | List<DncFixedSpace> list2 = this.fixedSpaceService.list(Wrappers.<DncFixedSpace>lambdaQuery().eq(DncFixedSpace::getTdId, tdId)); |
| | | /* |
| | | List<DncFixedSpace> list2 = this.fixedSpaceService.list((Wrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getTdId(); |
| | | }, tdId)); |
| | | }, tdId));*/ |
| | | if (Func.isNotEmpty(list2)) { |
| | | storageSpaceIds.addAll((Collection) list2.stream().map((v0) -> { |
| | | storageSpaceIds.addAll(list2.stream().map((v0) -> { |
| | | return v0.getId(); |
| | | }).distinct().collect(Collectors.toList())); |
| | | } |
| | | } |
| | | } |
| | | Map<Long, User> userMap = (Map) this.userService.list().stream().collect(Collectors.toMap((v0) -> { |
| | | Map<Long, User> userMap = this.userService.list().stream().collect(Collectors.toMap((v0) -> { |
| | | return v0.getId(); |
| | | }, Function.identity())); |
| | | Map<Long, String> fixSpaceLocationMap = this.fixedSpaceService.getFixSpaceLocation(Long.valueOf(Long.parseLong(workstationId))); |
| | | if (Func.isNotEmpty(fileLocations) && fileLocations.contains(CommonConstant.API_SCOPE_CATEGORY) && Func.isNotEmpty(storageSpaceIds) && workstationDetailVO.getFileLocations().contains(CommonConstant.API_SCOPE_CATEGORY)) { |
| | | List<TransferDirectoryFile> transferDirectoryFiles = list(new QueryWrapper<TransferDirectoryFile>().lambda() |
| | | .in(TransferDirectoryFile::getStorageSpaceId, storageSpaceIds) |
| | | .eq(TransferDirectoryFile::getIsCurrent, DncEnums.CurrentVersion.YES.getCode()) |
| | | .like(Func.isNotBlank(workstationDetailVO.getFileName()), TransferDirectoryFile::getOriginalFilename, workstationDetailVO.getFileName())); |
| | | /* |
| | | List<TransferDirectoryFile> transferDirectoryFiles = list(((LambdaQueryWrapper) ((LambdaQueryWrapper) new QueryWrapper().lambda().in((v0) -> { |
| | | return v0.getStorageSpaceId(); |
| | | }, storageSpaceIds)).eq((v0) -> { |
| | | return v0.getIsCurrent(); |
| | | }, DncEnums.CurrentVersion.YES.getCode())).like(Func.isNotBlank(workstationDetailVO.getFileName()), (v0) -> { |
| | | return v0.getOriginalFilename(); |
| | | }, workstationDetailVO.getFileName())); |
| | | List<Long> artFileIds = (List) transferDirectoryFiles.stream().filter(s -> { |
| | | }, workstationDetailVO.getFileName()));*/ |
| | | List<Long> artFileIds = transferDirectoryFiles.stream().filter(s -> { |
| | | return DncEnums.FileSource.PROCESSING_PROGRAM.getCode().equals(s.getFileSource()); |
| | | }).map((v0) -> { |
| | | return v0.getCraftFileId(); |
| | | }).collect(Collectors.toList()); |
| | | Map<Long, ArtFileInformationDTO> artFileInformationMap = artFileInformationMap(artFileIds); |
| | | List<TransferDirectoryFileVo> ethernetList = (List) transferDirectoryFiles.stream().map(transferDirectoryFile -> { |
| | | List<TransferDirectoryFileVo> ethernetList = transferDirectoryFiles.stream().map(transferDirectoryFile -> { |
| | | ArtFileInformationDTO fileInformation; |
| | | TransferDirectoryFileVo transferDirectoryFileVo = TransferDirectoryFileConvert.INSTANCE.convert(transferDirectoryFile); |
| | | User updateUser = (User) userMap.get(transferDirectoryFile.getUpdateUser()); |
| | |
| | | if (Func.isNotEmpty(ethernetList)) { |
| | | collect.addAll(ethernetList); |
| | | } |
| | | List<DncFactoryFile> list3 = this.dncFactoryFileService.list(Wrappers.<DncFactoryFile>lambdaQuery().eq(DncFactoryFile::getIsCurrent, DncEnums.CurrentVersion.YES.getCode())); |
| | | /* |
| | | List<DncFactoryFile> list3 = this.dncFactoryFileService.list((Wrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getIsCurrent(); |
| | | }, DncEnums.CurrentVersion.YES.getCode())); |
| | | }, DncEnums.CurrentVersion.YES.getCode()));*/ |
| | | if (Func.isNotEmpty(list3)) { |
| | | List<TransferDirectoryFileVo> factoryList = (List) list3.stream().map(s2 -> { |
| | | User updateUser = (User) userMap.get(s2.getUpdateUser()); |
| | | User createUser = (User) userMap.get(s2.getCreateUser()); |
| | | List<TransferDirectoryFileVo> factoryList =list3.stream().map(s2 -> { |
| | | User updateUser = userMap.get(s2.getUpdateUser()); |
| | | User createUser = userMap.get(s2.getCreateUser()); |
| | | return TransferDirectoryFileVo.builder().id(s2.getId()).fileType(DncEnums.FileType.PROCESS_DOCUMENTS.getCode()).filename(s2.getFilename()).originalFilename(s2.getOriginalFilename()).contentMd5(s2.getContentMd5()).contentLength(s2.getContentLength()).contentType(s2.getContentType()).objectKey(s2.getObjectKey()).suffix(s2.getSuffix()).link(s2.getLink()).version(s2.getVersion()).versionDesc(s2.getVersion() + CommonConstant.FILE_SUFFIX).storageSpace(DncEnums.StorageSpace.ROUTINE.getCode()).documentOwnership(DncEnums.FileOwnership.FACTORY.getName()).documentOwnerships(DncEnums.FileOwnership.FACTORY.getCode()).updateUser(String.valueOf(s2.getUpdateUser())).updateUserName(updateUser != null ? updateUser.getAccount() : "").createUser(String.valueOf(s2.getCreateUser())).createUserName(createUser != null ? createUser.getAccount() : "").updateTime(s2.getUpdateTime()).whetherArchive(s2.getWhetherArchive()).whetherArchiveDesc(DncEnums.WhetherArchive.Archive.getNameByCode(s2.getWhetherArchive())).build(); |
| | | }).collect(Collectors.toList()); |
| | | collect.addAll(factoryList); |
| | | } |
| | | } |
| | | return (List) collect.stream().peek(c -> { |
| | | return collect.stream().peek(c -> { |
| | | if (DncConstant.TRANSMISSION_METHOD.equals(transmissionMethod) && DncEnums.FileType.PROCESSING_PROGRAM.getCode().equals(c.getFileType())) { |
| | | c.setCanSent(1); |
| | | } |
| | |
| | | |
| | | @Override // org.springblade.modules.dnc.service.ITransferDirectoryFileService |
| | | public List<TransferDirectoryFile> findProgram(Long id) { |
| | | return list(Wrappers.<TransferDirectoryFile>lambdaQuery() |
| | | .eq(TransferDirectoryFile::getTransferDirectoryId, id) |
| | | .eq(TransferDirectoryFile::getFileType, 1) |
| | | .eq(TransferDirectoryFile::getIsCurrent, DncEnums.CurrentVersion.YES.getCode())); |
| | | /* |
| | | return list((Wrapper) ((LambdaQueryWrapper) ((LambdaQueryWrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getTransferDirectoryId(); |
| | | }, id)).eq((v0) -> { |
| | | return v0.getFileType(); |
| | | }, 1)).eq((v0) -> { |
| | | return v0.getIsCurrent(); |
| | | }, DncEnums.CurrentVersion.YES.getCode())); |
| | | }, DncEnums.CurrentVersion.YES.getCode()));*/ |
| | | } |
| | | |
| | | @Override // org.springblade.modules.dnc.service.ITransferDirectoryFileService |
| | |
| | | if (storageSpace.intValue() == 1) { |
| | | vo.setStorageSpaceId(rootSpaceId); |
| | | } else { |
| | | List<DncFixedSpace> list1 = this.fixedSpaceService.list(Wrappers.<DncFixedSpace>lambdaQuery().eq(DncFixedSpace::getTdId, storageRootSpaceId.getTdId())); |
| | | /* |
| | | Long id = (Long) this.fixedSpaceService.list((Wrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getTdId(); |
| | | }, storageRootSpaceId.getTdId())).stream().map((v0) -> { |
| | | return v0.getId(); |
| | | }).filter(c -> { |
| | | return !c.equals(rootSpaceId); |
| | | }).findFirst().get(); |
| | | }).findFirst().get();*/ |
| | | Long id = list1.stream().map(DncFixedSpace::getId).filter(c -> !c.equals(rootSpaceId)).findFirst().get(); |
| | | vo.setStorageSpaceId(id); |
| | | } |
| | | } |
| | |
| | | saveBatchLists.addAll(addLists); |
| | | } |
| | | if (Func.isNotEmpty(saveBatchLists)) { |
| | | List<TransferDirectoryFile> collect = (List) saveBatchLists.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> { |
| | | return new TreeSet(Comparator.comparing(alarm -> { |
| | | |
| | | //gui |
| | | /* |
| | | List<TransferDirectoryFile> collect = saveBatchLists.stream().collect( |
| | | Collectors.collectingAndThen( |
| | | Collectors.toCollection(() -> new TreeSet(Comparator.comparing(()))), ArrayList::new)); |
| | | */ |
| | | |
| | | List<TransferDirectoryFile> collect = saveBatchLists.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> { |
| | | return new TreeSet<>(Comparator.comparing(alarm -> { |
| | | return alarm.getFilename() + "===" + alarm.getStorageSpaceId() + "===" + alarm.getIsCurrent() + "===" + alarm.getVersion() + "===" + alarm.getFileType(); |
| | | })); |
| | | }), (v1) -> { |
| | | return new ArrayList(v1); |
| | | return new ArrayList<>(v1); |
| | | })); |
| | | saveBatch(collect); |
| | | } |