| | |
| | | public class WarehouseGridServiceImpl extends BaseServiceImpl<WarehouseGridMapper, WarehouseGrid> implements IWarehouseGridService { |
| | | private IWarehouseStationService warehouseStationService; |
| | | |
| | | private static /* synthetic */ Object $deserializeLambda$(SerializedLambda lambda) { |
| | | String implMethodName = lambda.getImplMethodName(); |
| | | boolean z = true; |
| | | switch (implMethodName.hashCode()) { |
| | | case -2090991943: |
| | | if (implMethodName.equals("getStationId")) { |
| | | z = false; |
| | | break; |
| | | } |
| | | break; |
| | | case -75622813: |
| | | if (implMethodName.equals("getCode")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 98245393: |
| | | if (implMethodName.equals("getId")) { |
| | | 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/WarehouseGrid") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getStationId(); |
| | | }; |
| | | } |
| | | 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/WarehouseGrid") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getCode(); |
| | | }; |
| | | } |
| | | break; |
| | | } |
| | | throw new IllegalArgumentException("Invalid lambda deserialization"); |
| | | } |
| | | |
| | | public WarehouseGridServiceImpl(final IWarehouseStationService warehouseStationService) { |
| | | this.warehouseStationService = warehouseStationService; |
| | | } |
| | |
| | | |
| | | @Override // org.springblade.modules.cps.service.IWarehouseGridService |
| | | public List<WarehouseGridVO> listByStationId(Long stationId) { |
| | | List<WarehouseGrid> list = list(Wrappers.<WarehouseGrid>lambdaQuery().eq(WarehouseGrid::getStationId, stationId)); |
| | | /* |
| | | List<WarehouseGrid> list = list((Wrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getStationId(); |
| | | }, stationId)); |
| | | }, stationId));*/ |
| | | return WarehouseGridConvert.INSTANCE.convert(list); |
| | | } |
| | | |
| | | private void checkWarehouseGrid(WarehouseGrid warehouseGrid) { |
| | | long count = count(Wrappers.<WarehouseGrid>lambdaQuery() |
| | | .ne(Func.isNotEmpty(warehouseGrid.getId()), WarehouseGrid::getId, warehouseGrid.getId()).eq(WarehouseGrid::getCode, warehouseGrid.getCode())); |
| | | /* |
| | | long count = count((Wrapper) Wrappers.lambdaQuery().ne(Func.isNotEmpty(warehouseGrid.getId()), (v0) -> { |
| | | return v0.getId(); |
| | | }, warehouseGrid.getId()).eq((v0) -> { |
| | | return v0.getCode(); |
| | | }, warehouseGrid.getCode())); |
| | | }, warehouseGrid.getCode()));*/ |
| | | if (count > 0) { |
| | | throw new ServiceException(MessageUtils.message("cps.warehouse.grid.code.already.exists", new Object[0])); |
| | | } |