Browse Source

备件台账需求变更

master
songguoqiang 7 months ago
parent
commit
c77fe6d3ad
  1. 3
      win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/controller/item/vo/ItemPageReqVO.java
  2. 14
      win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/item/ItemMapper.java

3
win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/controller/item/vo/ItemPageReqVO.java

@ -57,6 +57,9 @@ public class ItemPageReqVO extends PageParam {
@Schema(description = "价格", example = "4")
private BigDecimal price;
@Schema(description = "0:正常查询1查询的库位不包含已存在台账信息")
private String flag;
@Schema(description = "描述")
private String describes;

14
win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/item/ItemMapper.java

@ -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) {

Loading…
Cancel
Save