| | |
| | | LambdaQueryWrapper<PurchaseRegistration> queryWrapper = new LambdaQueryWrapper<>(); |
| | | if (StringUtils.isNotBlank(purchaseRegistrationDto.getSearchAll())){ |
| | | queryWrapper.and(wrapper -> wrapper |
| | | .like(PurchaseRegistration::getCoal, purchaseRegistrationDto.getSearchAll()) |
| | | .like(PurchaseRegistration::getCoalId, purchaseRegistrationDto.getSearchAll()) |
| | | .or() |
| | | .like(PurchaseRegistration::getSupplierName, purchaseRegistrationDto.getSearchAll()) |
| | | ); |
| | |
| | | if (coalInfo == null) { |
| | | throw new BaseException("煤种信息不存在"); |
| | | } |
| | | purchaseRegistration.setCoal(coalInfo.getCoal()); |
| | | // purchaseRegistration.setCoal(coalInfo.getCoal()); |
| | | Supply supply = supplyMapper.selectById(purchaseRegistrationDto.getSupplierId()); |
| | | if (supply == null) { |
| | | throw new BaseException("供应商信息不存在"); |
| | |
| | | BeanUtils.copyProperties(purchaseRegistration, pendingInventory); |
| | | |
| | | // 设置待入库记录特有的属性(如果有) |
| | | pendingInventory.setCoalId(purchaseRegistration.getCoalId()); |
| | | pendingInventory.setInventoryQuantity(purchaseRegistration.getPurchaseQuantity()); |
| | | return pendingInventory; |
| | | } |