diff --git a/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/controller/itemaccounts/vo/ItemAccountsPageReqVO.java b/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/controller/itemaccounts/vo/ItemAccountsPageReqVO.java index f6599fb..6da2028 100644 --- a/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/controller/itemaccounts/vo/ItemAccountsPageReqVO.java +++ b/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/controller/itemaccounts/vo/ItemAccountsPageReqVO.java @@ -30,4 +30,7 @@ public class ItemAccountsPageReqVO extends PageParam { @Schema(description = "库区编号") private String areaNumber; + @Schema(description = "项目号") + private String project; + } diff --git a/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/itemaccounts/ItemAccountsMapper.java b/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/itemaccounts/ItemAccountsMapper.java index daf7bcb..91aa7e0 100644 --- a/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/itemaccounts/ItemAccountsMapper.java +++ b/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/itemaccounts/ItemAccountsMapper.java @@ -1,5 +1,6 @@ package com.win.module.eam.dal.mysql.itemaccounts; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -14,6 +15,7 @@ import com.win.module.eam.controller.itemaccounts.vo.ItemAccountsPageReqVO; import com.win.module.eam.convert.itemaccounts.ItemAccountsConvert; import com.win.module.eam.dal.dataobject.itemaccounts.ItemAccountsDO; import com.win.module.eam.dal.dataobject.transaction.TransactionDO; +import com.win.module.eam.dal.mysql.item.ItemMapper; import com.win.module.eam.enums.itemAccount.ItemAccountStatusEnum; import com.win.module.eam.enums.transaction.TransactionEnum; import com.win.module.eam.enums.transactionType.TransactionTypeEnum; @@ -37,6 +39,8 @@ import static com.win.module.eam.enums.ErrorCodeConstants.COUNT_IS_HAVA; @Mapper public interface ItemAccountsMapper extends BaseMapperX { + + /** * 更新库存余额数量,出库qty是负数 */ @@ -231,13 +235,18 @@ public interface ItemAccountsMapper extends BaseMapperX { } default PageResult selectPage(ItemAccountsPageReqVO reqVO) { - return selectPage(reqVO, new LambdaQueryWrapperX() + LambdaQueryWrapper itemAccountsDOLambdaQueryWrapper = new LambdaQueryWrapperX() .likeIfPresent(ItemAccountsDO::getItemNumber, reqVO.getItemNumber()) .likeIfPresent(ItemAccountsDO::getLocationNumber, reqVO.getLocationNumber()) .likeIfPresent(ItemAccountsDO::getAreaNumber, reqVO.getAreaNumber()) .eqIfPresent(ItemAccountsDO::getType, reqVO.getType()) .eqIfPresent(ItemAccountsDO::getAvailable, reqVO.getAvailable()) - .orderByDesc(ItemAccountsDO::getId)); + .orderByDesc(ItemAccountsDO::getId); + if(reqVO.getProject()!=null&& !reqVO.getProject().isEmpty()){ + itemAccountsDOLambdaQueryWrapper.inSql(ItemAccountsDO::getItemNumber, "select number from basic_item where available = 'TRUE' and deleted = 0 and project like CONCAT('%','" + reqVO.getProject() + "','%') "); + } + return selectPage(reqVO, itemAccountsDOLambdaQueryWrapper); + } default List selectList(ItemAccountsExportReqVO reqVO) { diff --git a/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/iteminlocation/ItemInLocationMapper.java b/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/iteminlocation/ItemInLocationMapper.java index b9561d3..f7e25cb 100644 --- a/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/iteminlocation/ItemInLocationMapper.java +++ b/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/iteminlocation/ItemInLocationMapper.java @@ -24,8 +24,8 @@ public interface ItemInLocationMapper extends BaseMapperX { return selectPage(reqVO, new LambdaQueryWrapperX() .eqIfPresent(ItemInLocationDO::getId, reqVO.getId()) .eqIfPresent(ItemInLocationDO::getNumber, reqVO.getNumber()) - .eqIfPresent(ItemInLocationDO::getItemNumber, reqVO.getItemNumber()) - .eqIfPresent(ItemInLocationDO::getLocationNumber, reqVO.getLocationNumber()) + .likeIfPresent(ItemInLocationDO::getItemNumber, reqVO.getItemNumber()) + .likeIfPresent(ItemInLocationDO::getLocationNumber, reqVO.getLocationNumber()) .eqIfPresent(ItemInLocationDO::getType, reqVO.getType()) .eqIfPresent(ItemInLocationDO::getQty, reqVO.getQty()) .orderByDesc(ItemInLocationDO::getId)); diff --git a/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/itemoutlocation/ItemOutLocationMapper.java b/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/itemoutlocation/ItemOutLocationMapper.java index 3f2870c..90250c8 100644 --- a/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/itemoutlocation/ItemOutLocationMapper.java +++ b/win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/itemoutlocation/ItemOutLocationMapper.java @@ -24,8 +24,8 @@ public interface ItemOutLocationMapper extends BaseMapperX { return selectPage(reqVO, new LambdaQueryWrapperX() .eqIfPresent(ItemOutLocationDO::getId, reqVO.getId()) .eqIfPresent(ItemOutLocationDO::getNumber, reqVO.getNumber()) - .eqIfPresent(ItemOutLocationDO::getItemNumber, reqVO.getItemNumber()) - .eqIfPresent(ItemOutLocationDO::getLocationNumber, reqVO.getLocationNumber()) + .likeIfPresent(ItemOutLocationDO::getItemNumber, reqVO.getItemNumber()) + .likeIfPresent(ItemOutLocationDO::getLocationNumber, reqVO.getLocationNumber()) .eqIfPresent(ItemOutLocationDO::getType, reqVO.getType()) .eqIfPresent(ItemOutLocationDO::getQty, reqVO.getQty()) .orderByDesc(ItemOutLocationDO::getId));