| | |
| | | package com.qianwen.smartman.modules.cps.service.impl; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.google.common.collect.Lists; |
| | | import java.lang.invoke.SerializedLambda; |
| | | import java.util.List; |
| | | import com.qianwen.smartman.common.utils.MessageUtils; |
| | | import com.qianwen.core.mp.service.impl.BladeServiceImpl; |
| | | import com.qianwen.smartman.common.utils.MessageUtils; |
| | | import com.qianwen.smartman.modules.cps.convert.TraySurfaceConvert; |
| | | import com.qianwen.smartman.modules.cps.entity.TrayFixture; |
| | | import com.qianwen.smartman.modules.cps.entity.TraySurface; |
| | | import com.qianwen.smartman.modules.cps.excel.TrayFixtureImport; |
| | | import com.qianwen.smartman.modules.cps.mapper.TraySurfaceMapper; |
| | |
| | | import com.qianwen.smartman.modules.cps.vo.TrayFaceAddVO; |
| | | import com.qianwen.smartman.modules.cps.vo.TrayFaceUpdateVO; |
| | | import com.qianwen.smartman.modules.cps.vo.TraySurfaceVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | /* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/cps/service/impl/TraySurfaceServiceImpl.class */ |
| | | public class TraySurfaceServiceImpl extends BladeServiceImpl<TraySurfaceMapper, TraySurface> implements ITraySurfaceService { |
| | | private final ITrayFixtureService fixtureService; |
| | | |
| | | private static /* synthetic */ Object $deserializeLambda$(SerializedLambda lambda) { |
| | | String implMethodName = lambda.getImplMethodName(); |
| | | boolean z = true; |
| | | switch (implMethodName.hashCode()) { |
| | | case -75622813: |
| | | if (implMethodName.equals("getCode")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case -75308287: |
| | | if (implMethodName.equals("getName")) { |
| | | z = false; |
| | | break; |
| | | } |
| | | break; |
| | | case 98245393: |
| | | if (implMethodName.equals("getId")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 413851470: |
| | | if (implMethodName.equals("getFaceId")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 830319079: |
| | | if (implMethodName.equals("getTrayId")) { |
| | | 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/cps/entity/TraySurface") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getName(); |
| | | }; |
| | | } |
| | | break; |
| | | case true: |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/cps/entity/TrayFixture") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getFaceId(); |
| | | }; |
| | | } |
| | | 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/cps/entity/TrayFixture") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getTrayId(); |
| | | }; |
| | | } |
| | | 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/cps/entity/TraySurface") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getTrayId(); |
| | | }; |
| | | } |
| | | 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/modules/cps/entity/TraySurface") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getCode(); |
| | | }; |
| | | } |
| | | break; |
| | | } |
| | | throw new IllegalArgumentException("Invalid lambda deserialization"); |
| | | } |
| | | |
| | | |
| | | public TraySurfaceServiceImpl(final ITrayFixtureService fixtureService) { |
| | | this.fixtureService = fixtureService; |
| | |
| | | public Boolean removeFace(Long trayId, Long faceId) { |
| | | int count = this.baseMapper.removeFixture(trayId, faceId); |
| | | ThrowFun.isTrue(count > 0).throwMessage(MessageUtils.message("cps.face.fixture.station.fixture", new Object[0])); |
| | | boolean removeFixture = this.fixtureService.remove(Wrappers.<TrayFixture>lambdaQuery().eq(TrayFixture::getTrayId, trayId).eq(TrayFixture::getFaceId, faceId)); |
| | | /* |
| | | boolean removeFixture = this.fixtureService.remove((Wrapper) ((LambdaQueryWrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getTrayId(); |
| | | }, trayId)).eq((v0) -> { |
| | | return v0.getFaceId(); |
| | | }, faceId)); |
| | | }, faceId));*/ |
| | | this.fixtureService.updateFixtureStatusByTray(Lists.newArrayList(new Long[]{trayId})); |
| | | return Boolean.valueOf(removeById(faceId) && removeFixture); |
| | | } |
| | |
| | | |
| | | @Override // org.springblade.modules.cps.service.ITraySurfaceService |
| | | public Boolean updateTraySurface(TrayFaceUpdateVO vo) { |
| | | return Boolean.valueOf(update(Wrappers.<TraySurface>lambdaUpdate().set(TraySurface::getName, vo.getName()).eq(TraySurface::getId, vo.getId()))); |
| | | /* |
| | | return Boolean.valueOf(update((Wrapper) ((LambdaUpdateWrapper) Wrappers.lambdaUpdate().set((v0) -> { |
| | | return v0.getName(); |
| | | }, vo.getName())).eq((v0) -> { |
| | | return v0.getId(); |
| | | }, vo.getId()))); |
| | | }, vo.getId())));*/ |
| | | } |
| | | |
| | | @Override // org.springblade.modules.cps.service.ITraySurfaceService |
| | |
| | | } |
| | | |
| | | public void validFaceCode(String code, Long trayId) { |
| | | long count = count(Wrappers.<TraySurface>lambdaQuery().eq(TraySurface::getTrayId, trayId).eq(TraySurface::getCode, code)); |
| | | /* |
| | | long count = count((Wrapper) ((LambdaQueryWrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getTrayId(); |
| | | }, trayId)).eq((v0) -> { |
| | | return v0.getCode(); |
| | | }, code)); |
| | | }, code));*/ |
| | | ThrowFun.isTrue(count > 0).throwMessage(MessageUtils.message("cps.tray.face.name.exist", new Object[0])); |
| | | } |
| | | } |