| | |
| | | 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; |
| | |
| | | @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); |
| | | } |