|
|
@ -25,11 +25,15 @@ import java.util.Map; |
|
|
|
public interface ItemMapper extends BaseMapperX<ItemDO> { |
|
|
|
|
|
|
|
default PageResult<ItemDO> selectPage(ItemPageReqVO reqVO) { |
|
|
|
return selectPage(reqVO, new LambdaQueryWrapperX<ItemDO>() |
|
|
|
.eqIfPresent(ItemDO::getNumber, reqVO.getNumber()) |
|
|
|
.eqIfPresent(ItemDO::getAvailable, reqVO.getAvailable()) |
|
|
|
.likeIfPresent(ItemDO::getName, reqVO.getName()) |
|
|
|
.orderByDesc(ItemDO::getId)); |
|
|
|
LambdaQueryWrapperX<ItemDO> wrapperX = new LambdaQueryWrapperX<>(); |
|
|
|
wrapperX.eqIfPresent(ItemDO::getNumber, reqVO.getNumber()); |
|
|
|
wrapperX.eqIfPresent(ItemDO::getAvailable, reqVO.getAvailable()); |
|
|
|
wrapperX.likeIfPresent(ItemDO::getName, reqVO.getName()); |
|
|
|
if("1".equals(reqVO.getFlag())){//查询排除有台账的备件
|
|
|
|
wrapperX.notInSql(ItemDO::getNumber,"select DISTINCT a.item_number from basic_item_accounts a where a.available = 'TRUE' and a.deleted = 0"); |
|
|
|
} |
|
|
|
wrapperX.orderByDesc(ItemDO::getId); |
|
|
|
return selectPage(reqVO,wrapperX); |
|
|
|
} |
|
|
|
|
|
|
|
default List<ItemDO> selectList(ItemExportReqVO reqVO) { |
|
|
|