| | |
| | | package com.qianwen.smartman.modules.tpm.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import java.lang.invoke.SerializedLambda; |
| | | import java.util.ArrayList; |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | import java.util.Comparator; |
| | | import java.util.Date; |
| | |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.Stream; |
| | | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import com.qianwen.smartman.common.cache.RegionCache; |
| | | import com.qianwen.smartman.common.utils.MessageUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.qianwen.core.log.exception.ServiceException; |
| | | import com.qianwen.core.mp.support.Condition; |
| | | import com.qianwen.core.mp.support.Query; |
| | | import com.qianwen.core.secure.utils.AuthUtil; |
| | | import com.qianwen.core.tool.utils.Func; |
| | | import com.qianwen.smartman.common.utils.MessageUtils; |
| | | import com.qianwen.smartman.modules.cps.service.IMachineService; |
| | | import com.qianwen.smartman.modules.cps.vo.RepairRecordMaterialAddVO; |
| | | import com.qianwen.smartman.modules.system.service.ICodeGeneratorService; |
| | |
| | | import com.qianwen.smartman.modules.tpm.vo.RepairRecordUpdateVO; |
| | | import com.qianwen.smartman.modules.tpm.vo.RepairRecordVO; |
| | | import com.qianwen.smartman.modules.tpm.vo.excel.RepairRecordExcelVO; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | @Service |
| | | /* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/tpm/service/impl/RepairRecordServiceImpl.class */ |
| | |
| | | private final RepairRecordMapper repairRecordMapper; |
| | | private final ICodeGeneratorService codeGeneratorService; |
| | | |
| | | private static /* synthetic */ Object $deserializeLambda$(SerializedLambda lambda) { |
| | | String implMethodName = lambda.getImplMethodName(); |
| | | boolean z = true; |
| | | switch (implMethodName.hashCode()) { |
| | | case -2085769275: |
| | | if (implMethodName.equals("getApplyCode")) { |
| | | z = false; |
| | | break; |
| | | } |
| | | break; |
| | | case -1107875961: |
| | | if (implMethodName.equals("getDeviceId")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case -826050023: |
| | | if (implMethodName.equals("getRecordStatus")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case -151423706: |
| | | if (implMethodName.equals("getRepairApplyId")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 98245393: |
| | | if (implMethodName.equals("getId")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 436647380: |
| | | if (implMethodName.equals("getRecordCode")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 457411340: |
| | | if (implMethodName.equals("getRepairStartTime")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 482925913: |
| | | if (implMethodName.equals("getDeviceCode")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 483240439: |
| | | if (implMethodName.equals("getDeviceName")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 731625057: |
| | | if (implMethodName.equals("getDeviceTypeId")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 771206363: |
| | | if (implMethodName.equals("getTenantId")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 1278665410: |
| | | if (implMethodName.equals("getRecordId")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 1788066762: |
| | | if (implMethodName.equals("getApplyStatus")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 1916606703: |
| | | if (implMethodName.equals("getRepairRecordId")) { |
| | | 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/tpm/entity/RepairApply") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getApplyCode(); |
| | | }; |
| | | } |
| | | 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(); |
| | | }; |
| | | } |
| | | 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/tenant/mp/TenantEntity") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getTenantId(); |
| | | }; |
| | | } |
| | | 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/tenant/mp/TenantEntity") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getTenantId(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/util/Date;")) { |
| | | return (v0) -> { |
| | | return v0.getRepairStartTime(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getDeviceId(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairApply") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getDeviceId(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairApply") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getDeviceId(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getDeviceId(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getDeviceId(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairApply") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getDeviceId(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairApply") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getDeviceId(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getDeviceCode(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getDeviceCode(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecordFile") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getRepairRecordId(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecordFile") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getRepairRecordId(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecordFile") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getRepairRecordId(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecordFile") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getRepairRecordId(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getRecordCode(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getRecordCode(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getRecordCode(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getRecordCode(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getRecordCode(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/DeviceMaterialRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getRecordId(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairApply") && lambda.getImplMethodSignature().equals("()Ljava/lang/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getApplyStatus(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairApply") && lambda.getImplMethodSignature().equals("()Ljava/lang/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getApplyStatus(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairApply") && lambda.getImplMethodSignature().equals("()Ljava/lang/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getApplyStatus(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairApply") && lambda.getImplMethodSignature().equals("()Ljava/lang/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getApplyStatus(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getDeviceTypeId(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getDeviceTypeId(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getRecordStatus(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getRecordStatus(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getRecordStatus(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getRecordStatus(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getRecordStatus(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getRecordStatus(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getRecordStatus(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getDeviceName(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getDeviceName(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getRepairApplyId(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairApplyFile") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getRepairApplyId(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getRepairApplyId(); |
| | | }; |
| | | } |
| | | 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/tpm/entity/RepairRecord") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getRepairApplyId(); |
| | | }; |
| | | } |
| | | break; |
| | | } |
| | | throw new IllegalArgumentException("Invalid lambda deserialization"); |
| | | } |
| | | |
| | | public RepairRecordServiceImpl(final IRepairApplyService repairApplyService, final IRepairApplyFileService repairApplyFileService, final IRepairRecordFileService repairRecordFileService, final IDeviceMaterialRecordService deviceMaterialRecordService, final IMachineService machineService, final RepairRecordMapper repairRecordMapper, final ICodeGeneratorService codeGeneratorService) { |
| | | this.repairApplyService = repairApplyService; |
| | |
| | | RepairRecord repairRecord = RepairRecordConvert.INSTANCE.convert(repairRecordUpdateVO); |
| | | updateById(repairRecord); |
| | | if (Func.isNotEmpty(repairRecordUpdateVO.getRecordFileList())) { |
| | | List<RepairRecordFile> oldFiles = this.repairRecordFileService.list(Wrappers.<RepairRecordFile>query().lambda().eq(RepairRecordFile::getRepairRecordId, repairRecordUpdateVO.getId())); |
| | | /* |
| | | List<RepairRecordFile> oldFiles = this.repairRecordFileService.list((Wrapper) Wrappers.query().lambda().eq((v0) -> { |
| | | return v0.getRepairRecordId(); |
| | | }, repairRecordUpdateVO.getId())); |
| | |
| | | this.repairRecordFileService.removeByIds((Collection) oldFiles.stream().map((v0) -> { |
| | | return v0.getId(); |
| | | }).collect(Collectors.toList())); |
| | | } |
| | | }*/ |
| | | List<RepairRecordFile> newFiles = RepairRecordFileConvert.INSTANCE.convert(repairRecordUpdateVO.getRecordFileList()); |
| | | newFiles.forEach(s -> { |
| | | s.setRepairRecordId(repairRecord.getId()); |
| | | }); |
| | | this.repairRecordFileService.saveBatch(newFiles); |
| | | } else { |
| | | List<RepairRecordFile> oldFiles2 = this.repairRecordFileService.list(Wrappers.<RepairRecordFile>query().lambda().eq(RepairRecordFile::getRepairRecordId, repairRecordUpdateVO.getId())); |
| | | /* |
| | | List<RepairRecordFile> oldFiles2 = this.repairRecordFileService.list((Wrapper) Wrappers.query().lambda().eq((v0) -> { |
| | | return v0.getRepairRecordId(); |
| | | }, repairRecordUpdateVO.getId())); |
| | | }, repairRecordUpdateVO.getId()));*/ |
| | | if (!Func.isNull(oldFiles2)) { |
| | | this.repairRecordFileService.removeByIds((Collection) oldFiles2.stream().map((v0) -> { |
| | | this.repairRecordFileService.removeByIds(oldFiles2.stream().map((v0) -> { |
| | | return v0.getId(); |
| | | }).collect(Collectors.toList())); |
| | | } |
| | | } |
| | | RepairApply repairApply = (RepairApply) this.repairApplyService.getById(repairRecord.getRepairApplyId()); |
| | | RepairApply repairApply = this.repairApplyService.getById(repairRecord.getRepairApplyId()); |
| | | if (Func.isNotEmpty(repairRecordUpdateVO.getMaterialVOList())) { |
| | | List<RepairRecordMaterialAddVO> materialAddDTOList = repairRecordUpdateVO.getMaterialVOList(); |
| | | materialAddDTOList.forEach(i -> { |
| | |
| | | |
| | | @Override // org.springblade.modules.tpm.service.IRepairRecordService |
| | | public IPage<RepairRecordVO> getPageRecord(RepairRecordSearchDTO repairRecordSearchDTO, Query query) { |
| | | IPage<RepairRecord> pages = page(Condition.getPage(query), Wrappers.<RepairRecord>lambdaQuery() |
| | | .eq(Func.isNotEmpty(AuthUtil.getTenantId()), RepairRecord::getTenantId, AuthUtil.getTenantId()) |
| | | .and(Func.isNotEmpty(repairRecordSearchDTO.getDeviceTypeId()), i -> i.eq(RepairRecord::getDeviceTypeId, repairRecordSearchDTO.getDeviceTypeId())) |
| | | .and(Func.isNotEmpty(repairRecordSearchDTO.getRecordStatus()), i -> i.eq(RepairRecord::getRecordStatus, repairRecordSearchDTO.getRecordStatus())) |
| | | .and(Func.isNotEmpty(repairRecordSearchDTO.getKeyWords()), i -> i.like(RepairRecord::getRecordCode, repairRecordSearchDTO.getKeyWords()).or().like(RepairRecord::getDeviceCode, repairRecordSearchDTO.getKeyWords()).or().like(RepairRecord::getRepairApplyId, getApplyId(repairRecordSearchDTO.getKeyWords())).or().like(RepairRecord::getDeviceName, repairRecordSearchDTO.getKeyWords()))); |
| | | |
| | | /* |
| | | IPage<RepairRecord> pages = page(Condition.getPage(query), Wrappers.lambdaQuery().eq(Func.isNotEmpty(AuthUtil.getTenantId()), (v0) -> { |
| | | return v0.getTenantId(); |
| | | }, AuthUtil.getTenantId()).and(Func.isNotEmpty(repairRecordSearchDTO.getDeviceTypeId()), i -> { |
| | |
| | | }, getApplyId(repairRecordSearchDTO.getKeyWords()))).or()).like((v0) -> { |
| | | return v0.getDeviceName(); |
| | | }, repairRecordSearchDTO.getKeyWords()); |
| | | })); |
| | | IPage<RepairRecordVO> repairRecordVoIPage = RepairRecordConvert.INSTANCE.convert((IPage) pages); |
| | | }));*/ |
| | | IPage<RepairRecordVO> repairRecordVoIPage = RepairRecordConvert.INSTANCE.convert( pages); |
| | | repairRecordVoIPage.getRecords().forEach(i4 -> { |
| | | if (Func.isNotEmpty(i4.getRepairApplyId())) { |
| | | Long repairApplyId = i4.getRepairApplyId(); |
| | |
| | | } |
| | | }); |
| | | List<RepairRecordVO> records = repairRecordVoIPage.getRecords(); |
| | | |
| | | records.sort(Comparator.comparing(RepairRecordVO::getRepairStartTime, Comparator.nullsFirst(Date::compareTo)).reversed()); |
| | | records.sort(Comparator.comparing(RepairRecordVO::getUrgency, Comparator.nullsFirst(Integer::compareTo)).reversed()); |
| | | records.sort(Comparator.comparing(RepairRecordVO::getRecordStatus, Comparator.nullsFirst(Integer::compareTo))); |
| | | |
| | | /* |
| | | records.sort(Comparator.comparing((v0) -> { |
| | | return v0.getRepairStartTime(); |
| | | }, Comparator.nullsFirst((v0, v1) -> { |
| | |
| | | return v0.getRecordStatus(); |
| | | }, Comparator.nullsFirst((v0, v1) -> { |
| | | return v0.compareTo(v1); |
| | | }))); |
| | | })));*/ |
| | | repairRecordVoIPage.setRecords(records); |
| | | return repairRecordVoIPage; |
| | | } |
| | |
| | | } |
| | | |
| | | private Long getApplyId(String applyCode) { |
| | | RepairApply one = this.repairApplyService.getOne(Wrappers.<RepairApply>query().lambda().eq(RepairApply::getApplyCode, applyCode)); |
| | | /* |
| | | RepairApply one = (RepairApply) this.repairApplyService.getOne((Wrapper) Wrappers.query().lambda().eq((v0) -> { |
| | | return v0.getApplyCode(); |
| | | }, applyCode)); |
| | | }, applyCode));*/ |
| | | if (Func.isNotEmpty(one)) { |
| | | return one.getId(); |
| | | } |
| | |
| | | if (Func.isNotEmpty(recordByRecord)) { |
| | | repairRecordDetailVo.setMaterialVOList(recordByRecord); |
| | | } else { |
| | | repairRecordDetailVo.setMaterialVOList(new ArrayList()); |
| | | repairRecordDetailVo.setMaterialVOList(new ArrayList<>()); |
| | | } |
| | | List<RepairRecordFile> fileList = this.repairRecordFileService.list(Wrappers.<RepairRecordFile>lambdaQuery().eq(RepairRecordFile::getRepairRecordId, id)); |
| | | /* |
| | | List<RepairRecordFile> fileList = this.repairRecordFileService.list((Wrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getRepairRecordId(); |
| | | }, id)); |
| | | }, id));*/ |
| | | List<RepairRecordFileAddDTO> fileAddDtoList = fileList.stream().map(RepairRecordFileConvert.INSTANCE::convert).collect(Collectors.toList()); |
| | | /* |
| | | Stream<RepairRecordFile> stream = fileList.stream(); |
| | | RepairRecordFileConvert repairRecordFileConvert = RepairRecordFileConvert.INSTANCE; |
| | | repairRecordFileConvert.getClass(); |
| | | List<RepairRecordFileAddDTO> fileAddDtoList = (List) stream.map(this::convert).collect(Collectors.toList()); |
| | | List<RepairRecordFileAddDTO> fileAddDtoList = (List) stream.map(this::convert).collect(Collectors.toList());*/ |
| | | if (Func.isNotEmpty(fileAddDtoList)) { |
| | | repairRecordDetailVo.setRecordFileList(fileAddDtoList); |
| | | } else { |
| | | repairRecordDetailVo.setRecordFileList(new ArrayList()); |
| | | repairRecordDetailVo.setRecordFileList(new ArrayList<>()); |
| | | } |
| | | return repairRecordDetailVo; |
| | | } |
| | |
| | | this.repairApplyService.updateById(repairApply); |
| | | } |
| | | boolean update = updateById(repairRecord); |
| | | List<RepairRecord> toBeConfirmedList = list(Wrappers.<RepairRecord>lambdaQuery().eq(RepairRecord::getDeviceId, repairRecord.getDeviceId()).eq(RepairRecord::getRecordStatus, Integer.valueOf(RepairRecordEnum.R1.getType()))); |
| | | List<RepairApply> inMaintenanceList = this.repairApplyService.list(Wrappers.<RepairApply>lambdaQuery().eq(RepairApply::getDeviceId, repairRecord.getDeviceId()).eq(RepairApply::getApplyStatus, Integer.valueOf(RepairApplyStatusEnum.Y2.getType()))); |
| | | List<RepairApply> toBeRepairedList = this.repairApplyService.list(Wrappers.<RepairApply>lambdaQuery().eq(RepairApply::getDeviceId, repairRecord.getDeviceId()).eq(RepairApply::getApplyStatus, Integer.valueOf(RepairApplyStatusEnum.Y1.getType()))); |
| | | /* |
| | | List<RepairRecord> toBeConfirmedList = list((Wrapper) ((LambdaQueryWrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getDeviceId(); |
| | | }, repairRecord.getDeviceId())).eq((v0) -> { |
| | |
| | | return v0.getDeviceId(); |
| | | }, repairRecord.getDeviceId())).eq((v0) -> { |
| | | return v0.getApplyStatus(); |
| | | }, Integer.valueOf(RepairApplyStatusEnum.Y1.getType()))); |
| | | }, Integer.valueOf(RepairApplyStatusEnum.Y1.getType())));*/ |
| | | this.machineService.updateMachineRepairPriority(repairRecord.getDeviceId(), toBeConfirmedList, inMaintenanceList, toBeRepairedList); |
| | | this.machineService.renewMachineRepairTime(repairRecord.getDeviceId()); |
| | | return update; |
| | |
| | | |
| | | @Override // org.springblade.modules.tpm.service.IRepairRecordService |
| | | public List<RepairRecordVO> getRecordByDeviceId(Long deviceId) { |
| | | List<RepairRecord> list = list(Wrappers.<RepairRecord>query().lambda().eq(RepairRecord::getDeviceId, deviceId).orderByDesc(RepairRecord::getRepairStartTime)); |
| | | /* |
| | | List<RepairRecord> list = list((Wrapper) ((LambdaQueryWrapper) Wrappers.query().lambda().eq((v0) -> { |
| | | return v0.getDeviceId(); |
| | | }, deviceId)).orderByDesc((v0) -> { |
| | | return v0.getRepairStartTime(); |
| | | })); |
| | | }));*/ |
| | | if (Func.isEmpty(list)) { |
| | | throw new ServiceException(MessageUtils.message("cps.tpm.repair.record.not.exists", new Object[0])); |
| | | } |
| | |
| | | i.setApplyUserName(repairApply.getApplyUserName()); |
| | | } |
| | | }); |
| | | |
| | | convert.sort(Comparator.comparing(RepairRecordVO::getRepairStartTime, Comparator.nullsFirst(Date::compareTo)).reversed()); |
| | | convert.sort(Comparator.comparing(RepairRecordVO::getUrgency, Comparator.nullsFirst(Integer::compareTo)).reversed()); |
| | | convert.sort(Comparator.comparing(RepairRecordVO::getRecordStatus, Comparator.nullsFirst(Integer::compareTo))); |
| | | /* |
| | | convert.sort(Comparator.comparing((v0) -> { |
| | | return v0.getRepairStartTime(); |
| | | }, Comparator.nullsFirst((v0, v1) -> { |
| | |
| | | return v0.getRecordStatus(); |
| | | }, Comparator.nullsFirst((v0, v1) -> { |
| | | return v0.compareTo(v1); |
| | | }))); |
| | | })));*/ |
| | | return convert; |
| | | } |
| | | |
| | |
| | | if (Func.isNull(repairRecord)) { |
| | | throw new ServiceException(MessageUtils.message("cps.tpm.repair.record.not.exists", new Object[0])); |
| | | } |
| | | List<RepairApplyFile> applyFileList = this.repairApplyFileService.list(Wrappers.<RepairApplyFile>query().lambda().eq(RepairApplyFile::getRepairApplyId, repairRecord.getRepairApplyId())); |
| | | /* |
| | | List<RepairApplyFile> applyFileList = this.repairApplyFileService.list((Wrapper) Wrappers.query().lambda().eq((v0) -> { |
| | | return v0.getRepairApplyId(); |
| | | }, repairRecord.getRepairApplyId())); |
| | | }, repairRecord.getRepairApplyId()));*/ |
| | | ApplyRecordMaterialVO applyRecordMaterialVo = new ApplyRecordMaterialVO(); |
| | | if (Func.isNotEmpty(applyFileList)) { |
| | | List<RepairApplyFileAddDTO> collect = applyFileList.stream().map(RepairApplyFileConvert.INSTANCE::convert).collect(Collectors.toList()); |
| | | /* |
| | | Stream<RepairApplyFile> stream = applyFileList.stream(); |
| | | RepairApplyFileConvert repairApplyFileConvert = RepairApplyFileConvert.INSTANCE; |
| | | repairApplyFileConvert.getClass(); |
| | | List<RepairApplyFileAddDTO> collect = (List) stream.map(this::convert).collect(Collectors.toList()); |
| | | List<RepairApplyFileAddDTO> collect = stream.map(this::convert).collect(Collectors.toList()); |
| | | */ |
| | | if (Func.isNotEmpty(collect)) { |
| | | applyRecordMaterialVo.setRepairApplyFileAddDTOList(collect); |
| | | } |
| | | } else { |
| | | applyRecordMaterialVo.setRepairApplyFileAddDTOList(new ArrayList()); |
| | | applyRecordMaterialVo.setRepairApplyFileAddDTOList(new ArrayList<>()); |
| | | } |
| | | List<RepairRecordFile> repairRecordFileList = this.repairRecordFileService.list(Wrappers.<RepairRecordFile>query().lambda().eq(RepairRecordFile::getRepairRecordId, id)); |
| | | /* |
| | | List<RepairRecordFile> repairRecordFileList = this.repairRecordFileService.list((Wrapper) Wrappers.query().lambda().eq((v0) -> { |
| | | return v0.getRepairRecordId(); |
| | | }, id)); |
| | | }, id));*/ |
| | | if (Func.isNotEmpty(repairRecordFileList)) { |
| | | List<RepairRecordFileAddDTO> collect2 = repairRecordFileList.stream().map(RepairRecordFileConvert.INSTANCE::convert).collect(Collectors.toList()); |
| | | /* |
| | | Stream<RepairRecordFile> stream2 = repairRecordFileList.stream(); |
| | | RepairRecordFileConvert repairRecordFileConvert = RepairRecordFileConvert.INSTANCE; |
| | | repairRecordFileConvert.getClass(); |
| | | List<RepairRecordFileAddDTO> collect2 = (List) stream2.map(this::convert).collect(Collectors.toList()); |
| | | */ |
| | | if (Func.isNotEmpty(collect2)) { |
| | | applyRecordMaterialVo.setRepairRecordFileAddDTOList(collect2); |
| | | } |
| | | } else { |
| | | applyRecordMaterialVo.setRepairRecordFileAddDTOList(new ArrayList()); |
| | | applyRecordMaterialVo.setRepairRecordFileAddDTOList(new ArrayList<>()); |
| | | } |
| | | List<DeviceMaterialRecord> deviceMaterialRecordList = this.deviceMaterialRecordService.list(Wrappers.<DeviceMaterialRecord>query().lambda().eq(DeviceMaterialRecord::getRecordId, id)); |
| | | /* |
| | | List<DeviceMaterialRecord> deviceMaterialRecordList = this.deviceMaterialRecordService.list((Wrapper) Wrappers.query().lambda().eq((v0) -> { |
| | | return v0.getRecordId(); |
| | | }, id)); |
| | | }, id));*/ |
| | | if (Func.isNotEmpty(deviceMaterialRecordList)) { |
| | | List<MaterialVO> collect3 = deviceMaterialRecordList.stream().map(MaterialRecordConvert.INSTANCE::convert).collect(Collectors.toList()); |
| | | /* |
| | | Stream<DeviceMaterialRecord> stream3 = deviceMaterialRecordList.stream(); |
| | | MaterialRecordConvert materialRecordConvert = MaterialRecordConvert.INSTANCE; |
| | | materialRecordConvert.getClass(); |
| | | List<MaterialVO> collect3 = (List) stream3.map(this::convert).collect(Collectors.toList()); |
| | | List<MaterialVO> collect3 = (List) stream3.map(this::convert).collect(Collectors.toList());*/ |
| | | if (Func.isNotEmpty(collect3)) { |
| | | applyRecordMaterialVo.setMaterialVoList(collect3); |
| | | } |
| | | } else { |
| | | applyRecordMaterialVo.setMaterialVoList(new ArrayList()); |
| | | applyRecordMaterialVo.setMaterialVoList(new ArrayList<>()); |
| | | } |
| | | return applyRecordMaterialVo; |
| | | } |
| | |
| | | this.repairApplyService.updateById(repairApply); |
| | | } |
| | | } |
| | | List<RepairRecord> r1List = list(Wrappers.<RepairRecord>lambdaQuery().eq(RepairRecord::getDeviceId, repairRecord.getDeviceId()).eq(RepairRecord::getRecordStatus, Integer.valueOf(RepairRecordEnum.R1.getType()))); |
| | | List<RepairApply> y2List = this.repairApplyService.list(Wrappers.<RepairApply>query().lambda().eq(RepairApply::getDeviceId, repairRecord.getDeviceId()).eq(RepairApply::getApplyStatus, Integer.valueOf(RepairApplyStatusEnum.Y2.getType()))); |
| | | List<RepairApply> y1List = this.repairApplyService.list(Wrappers.<RepairApply>query().lambda().eq(RepairApply::getDeviceId, repairRecord.getDeviceId()).eq(RepairApply::getApplyStatus, Integer.valueOf(RepairApplyStatusEnum.Y1.getType()))); |
| | | /* |
| | | List<RepairRecord> r1List = list((Wrapper) ((LambdaQueryWrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getDeviceId(); |
| | | }, repairRecord.getDeviceId())).eq((v0) -> { |
| | |
| | | return v0.getDeviceId(); |
| | | }, repairRecord.getDeviceId())).eq((v0) -> { |
| | | return v0.getApplyStatus(); |
| | | }, Integer.valueOf(RepairApplyStatusEnum.Y1.getType()))); |
| | | }, Integer.valueOf(RepairApplyStatusEnum.Y1.getType())));*/ |
| | | this.machineService.updateMachineRepairPriority(repairRecord.getDeviceId(), r1List, y2List, y1List); |
| | | return true; |
| | | } |
| | |
| | | |
| | | @Override // org.springblade.modules.tpm.service.IRepairRecordService |
| | | public List<RepairRecordVO> queryRecord(RepairRecordLookVO repairRecordLookVO) { |
| | | List<RepairRecord> recordList = list(Wrappers.<RepairRecord>lambdaQuery() |
| | | .and(Func.isNotEmpty(repairRecordLookVO.getDeviceTypeId()), i -> i.eq(RepairRecord::getDeviceTypeId, repairRecordLookVO.getDeviceTypeId())) |
| | | .and(Func.isNotEmpty(repairRecordLookVO.getRecordStatus()), i -> i.eq(RepairRecord::getRecordStatus, repairRecordLookVO.getRecordStatus())) |
| | | .and(Func.isNotEmpty(repairRecordLookVO.getKeyWords()), i -> i.like(RepairRecord::getRecordCode, repairRecordLookVO.getKeyWords()).or().like(RepairRecord::getDeviceCode, repairRecordLookVO.getKeyWords()).or().like(RepairRecord::getRepairApplyId, getApplyId(repairRecordLookVO.getKeyWords())).or().like(RepairRecord::getDeviceName, repairRecordLookVO.getKeyWords())) |
| | | |
| | | .orderByDesc(RepairRecord::getRecordCode)); |
| | | /* |
| | | List<RepairRecord> recordList = list((Wrapper) Wrappers.lambdaQuery().and(Func.isNotEmpty(repairRecordLookVO.getDeviceTypeId()), i -> { |
| | | LambdaQueryWrapper lambdaQueryWrapper = (LambdaQueryWrapper) i.eq((v0) -> { |
| | | return v0.getDeviceTypeId(); |
| | |
| | | }, repairRecordLookVO.getKeyWords()); |
| | | }).orderByDesc((v0) -> { |
| | | return v0.getRecordCode(); |
| | | })); |
| | | }));*/ |
| | | List<RepairRecordVO> convert = RepairRecordConvert.INSTANCE.convert(recordList); |
| | | return convert; |
| | | } |
| | | |
| | | @Override // org.springblade.modules.tpm.service.IRepairRecordService |
| | | public List<RepairRecord> getRecordByMalId(Long malId) { |
| | | List<RepairRecord> repairRecordList = list(Wrappers.<RepairRecord>lambdaQuery().eq(RepairRecord::getRecordStatus, Integer.valueOf(RepairRecordEnum.R1.getType())).orderByDesc(RepairRecord::getRecordCode)); |
| | | /* |
| | | List<RepairRecord> repairRecordList = list((Wrapper) ((LambdaQueryWrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getRecordStatus(); |
| | | }, Integer.valueOf(RepairRecordEnum.R1.getType()))).orderByDesc((v0) -> { |
| | | return v0.getRecordCode(); |
| | | })); |
| | | }));*/ |
| | | if (Func.isNull(repairRecordList)) { |
| | | throw new ServiceException(MessageUtils.message("cps.tpm.repair.record.malfunction.not.exists", new Object[0])); |
| | | } |
| | |
| | | if (!Func.isNull(repairRecordList)) { |
| | | List<RepairRecord> collect = null; |
| | | if (action.equals(Integer.valueOf(ActionEnum.UPDATE_MAL.getType()))) { |
| | | collect = (List) repairRecordList.stream().peek(i -> { |
| | | collect = repairRecordList.stream().peek(i -> { |
| | | i.setMalfunctionId(malId); |
| | | i.setMalfunctionName(malName); |
| | | i.setMalfunctionCode(malCode); |
| | | }).collect(Collectors.toList()); |
| | | } else if (action.equals(Integer.valueOf(ActionEnum.DELETE_MAL.getType()))) { |
| | | collect = (List) repairRecordList.stream().peek(i2 -> { |
| | | collect = repairRecordList.stream().peek(i2 -> { |
| | | i2.setMalfunctionId(null); |
| | | i2.setMalfunctionName(null); |
| | | i2.setMalfunctionCode(null); |
| | |
| | | }); |
| | | return repairRecordExcelVos; |
| | | } |
| | | return new ArrayList(); |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.tpm.service.IRepairRecordService |
| | |
| | | if (Func.isNotEmpty(repairTodayRecordPages)) { |
| | | return page.setRecords(repairTodayRecordPages); |
| | | } |
| | | return page.setRecords(new ArrayList()); |
| | | return page.setRecords(new ArrayList<>()); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.tpm.service.IRepairRecordService |
| | | public Long countRecord() { |
| | | Long count = Long.valueOf(count(Wrappers.<RepairRecord>lambdaQuery().eq(RepairRecord::getRecordStatus, Integer.valueOf(RepairRecordEnum.R1.getType())))); |
| | | /* |
| | | Long count = Long.valueOf(count((Wrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getRecordStatus(); |
| | | }, Integer.valueOf(RepairRecordEnum.R1.getType())))); |
| | | }, Integer.valueOf(RepairRecordEnum.R1.getType()))));*/ |
| | | return (Long) Optional.of(count).orElse(0L); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | private boolean checkRecordConfirm(List<Long> ids) { |
| | | List<RepairRecord> list = list(Wrappers.<RepairRecord>lambdaQuery().ne(RepairRecord::getRecordStatus, Integer.valueOf(RepairRecordEnum.R2.getType())).in(RepairRecord::getId, ids)); |
| | | /* |
| | | List<RepairRecord> list = list((Wrapper) ((LambdaQueryWrapper) Wrappers.lambdaQuery().ne((v0) -> { |
| | | return v0.getRecordStatus(); |
| | | }, Integer.valueOf(RepairRecordEnum.R2.getType()))).in((v0) -> { |
| | | return v0.getId(); |
| | | }, ids)); |
| | | }, ids));*/ |
| | | return Func.isNull(list); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | private boolean checkApplyCode(Long id) { |
| | | RepairRecord repairRecord = this.baseMapper.selectOne(Wrappers.<RepairRecord>query().lambda().eq(RepairRecord::getRepairApplyId, id)); |
| | | /* |
| | | RepairRecord repairRecord = (RepairRecord) this.baseMapper.selectOne((Wrapper) Wrappers.query().lambda().eq((v0) -> { |
| | | return v0.getRepairApplyId(); |
| | | }, id)); |
| | | }, id));*/ |
| | | return Func.isNull(repairRecord); |
| | | } |
| | | |
| | | private boolean checkRecordCode(String recordCode) { |
| | | RepairRecord repairRecord = this.baseMapper.selectOne(Wrappers.<RepairRecord>query().lambda().eq(Func.isNotEmpty(AuthUtil.getTenantId()), RepairRecord::getTenantId, AuthUtil.getTenantId()).eq(RepairRecord::getRecordCode, recordCode)); |
| | | /* |
| | | RepairRecord repairRecord = (RepairRecord) this.baseMapper.selectOne((Wrapper) Wrappers.query().lambda().eq(Func.isNotEmpty(AuthUtil.getTenantId()), (v0) -> { |
| | | return v0.getTenantId(); |
| | | }, AuthUtil.getTenantId()).eq((v0) -> { |
| | | return v0.getRecordCode(); |
| | | }, recordCode)); |
| | | }, recordCode));*/ |
| | | return repairRecord != null; |
| | | } |
| | | |