From 946896c1cf0c81befeae145bb363e1a250defc0d Mon Sep 17 00:00:00 2001 From: liding <756868258@qq.com> Date: 星期五, 20 六月 2025 17:38:40 +0800 Subject: [PATCH] 煤种都存id --- main-business/src/main/java/com/ruoyi/business/service/impl/PurchaseRegistrationServiceImpl.java | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/main-business/src/main/java/com/ruoyi/business/service/impl/PurchaseRegistrationServiceImpl.java b/main-business/src/main/java/com/ruoyi/business/service/impl/PurchaseRegistrationServiceImpl.java index ff4252d..ed6177c 100644 --- a/main-business/src/main/java/com/ruoyi/business/service/impl/PurchaseRegistrationServiceImpl.java +++ b/main-business/src/main/java/com/ruoyi/business/service/impl/PurchaseRegistrationServiceImpl.java @@ -16,6 +16,7 @@ import com.ruoyi.business.mapper.PurchaseRegistrationMapper; import com.ruoyi.business.service.PurchaseRegistrationService; import com.ruoyi.common.exception.base.BaseException; +import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.bean.BeanUtils; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @@ -49,6 +50,13 @@ @Override public IPage<PurchaseRegistration> selectPurchaseRegistrationList(Page page, PurchaseRegistrationDto purchaseRegistrationDto) { LambdaQueryWrapper<PurchaseRegistration> queryWrapper = new LambdaQueryWrapper<>(); + if (StringUtils.isNotBlank(purchaseRegistrationDto.getSearchAll())){ + queryWrapper.and(wrapper -> wrapper + .like(PurchaseRegistration::getCoal, purchaseRegistrationDto.getSearchAll()) + .or() + .like(PurchaseRegistration::getSupplierName, purchaseRegistrationDto.getSearchAll()) + ); + } queryWrapper.orderByDesc(PurchaseRegistration::getCreateTime); return purchaseRegistrationMapper.selectPage(page, queryWrapper); } @@ -80,7 +88,6 @@ // 閲囪喘鐧昏鎴愬姛锛屽悓姝ュ垱寤哄緟鍏ュ簱璁板綍 PendingInventory pendingInventory = createPendingInventory(purchaseRegistration); pendingInventory.setSupplierName(supply.getSupplierName()); - pendingInventory.setCoal(coalInfo.getCoal()); return pendingInventoryMapper.insert(pendingInventory); } return insertCount; -- Gitblit v1.9.3